초기 커밋: 5130 레거시 시스템
- URL 하드코딩 → .env APP_URL 기반 동적 URL로 변경 - DB 연결 하드코딩 → .env 기반으로 변경 - MySQL strict mode DATE 오류 수정
This commit is contained in:
27
member/check_level.php
Normal file
27
member/check_level.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<?php $id = $_REQUEST["id"];
|
||||
|
||||
require_once("../lib/mydb.php");
|
||||
$pdo = db_connect();
|
||||
try{
|
||||
$sql = "select * from chandj.member where id = ? ";
|
||||
$stmh = $pdo->prepare($sql);
|
||||
$stmh->bindValue(1,$id,PDO::PARAM_STR);
|
||||
$stmh->execute();
|
||||
|
||||
$row = $stmh->fetch(PDO::FETCH_ASSOC); // 위의 형식이 일반적으로 DB 정보를 가져올때 사용하는 방식이다.
|
||||
|
||||
$level = $row["level"];
|
||||
} catch (PDOException $Exception) {
|
||||
print "오류: ".$Exception->getMessage();
|
||||
}
|
||||
|
||||
if($level>5){
|
||||
print "가입승인이 필요합니다. 본사 관리자에게 문의하세요.<p>";
|
||||
print "<center> <input type=button value=창닫기 onClick=self.close()> </center>" ;
|
||||
<meta http-equiv="refresh" content="1" url="../login/logout.php">
|
||||
}
|
||||
}
|
||||
header("Location:/index.php");
|
||||
?>
|
||||
Reference in New Issue
Block a user