SQLInjection 대응을 위해 파일 상단부에 $_POST, $_GET의 원하는 변수 타입명 지정
This commit is contained in:
@@ -3,6 +3,13 @@
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$btn = Util::getReq('btn');
|
||||
$level = Util::getReq('level', 'int');
|
||||
$genlist = Util::getReq('genlist', 'int');
|
||||
$outlist = Util::getReq('outlist', 'int');
|
||||
$citylist = Util::getReq('citylist', 'int');
|
||||
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
@@ -25,6 +32,11 @@ if($btn == "임명") {
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
if(!$general){
|
||||
echo "<script>location.replace('b_myBossInfo.php');</script>";
|
||||
exit();
|
||||
}
|
||||
|
||||
//임명할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함
|
||||
if($general[level] == 12 || $meLevel < 5 || ($general[nation] != $me[nation] && $genlist != 0)) {
|
||||
echo "<script>location.replace('b_myBossInfo.php');</script>";
|
||||
@@ -35,6 +47,11 @@ if($btn == "임명") {
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
if(!$general){
|
||||
echo "<script>location.replace('b_myBossInfo.php');</script>";
|
||||
exit();
|
||||
}
|
||||
|
||||
//추방할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함
|
||||
if($general[level] == 12 || $meLevel < 5 || ($general[nation] != $me[nation] && $outlist != 0)) {
|
||||
echo "<script>location.replace('b_myBossInfo.php');</script>";
|
||||
|
||||
Reference in New Issue
Block a user