특별회원이 정상적으로 메시지를 보낼 수 있도록 설정

This commit is contained in:
2018-02-02 19:52:44 +09:00
parent 0fe9ba338f
commit c6be70849c
3 changed files with 31 additions and 8 deletions
+2 -3
View File
@@ -7,14 +7,13 @@ $connect = dbConn();
$admin = getAdmin($connect);
$query = "select userlevel from general where user_id='$_SESSION[p_id]'";
$query = "select no, userlevel from general where user_id='$_SESSION[p_id]'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
if($me[userlevel] < 4) {
echo "<script>location.replace('_admin3.php');</script>";
}
$pid = $_SESSION['p_id'];
switch($btn) {
case "메세지 전달":
@@ -26,7 +25,7 @@ switch($btn) {
// 상대에게 발송
$you[msgindex]++;
if($you[msgindex] >= 10) { $you[msgindex] = 0; }
$query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$pid',msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist[$i]'";
$query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who={$me['no']}*10000+$genlist[$i],msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist[$i]'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
break;