기존 회의실, 기밀실 코드 삭제

This commit is contained in:
2019-01-22 03:17:44 +09:00
parent 006ab00f20
commit 5f0258022a
7 changed files with 2 additions and 448 deletions
-82
View File
@@ -1,82 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
increaseRefresh("기밀실", 1);
$query = "select no,nation,level from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
if($me['level'] < 5) {
echo "수뇌부가 아닙니다.";
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?=UniqueConst::$serverName?>: 기밀실</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<div style='width:1000px;margin:auto'>
<table align=center width=1000 class='tb_layout bg0'>
<tr><td>기 밀 실<br><?=backButton()?></td></tr>
<form name=form1 method=post action=c_chiefboard.php>
<tr><td align=center>
제목 <input type=textarea maxlength=50 name=title style=color:white;background-color:black;width:830px;>
</td>
</tr>
<tr><td>
<textarea name=msg style=color:white;background-color:black;width:998px;height:200px;></textarea><br>
<input type=submit value=저장하기>
<input type=hidden name=num value=-1>
</td></tr>
</form>
</table>
<br>
<?php
$nation = getNation($me['nation']);
//20개 메세지
$index = $nation['coreindex'];
for($i=0; $i < 20; $i++) {
$who = "coreboard{$index}_who";
$query = "select name,picture,imgsvr from general where no='$nation[$who]'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
if($nation["coreboard{$index}"] != '') { msgprint($nation["coreboard{$index}"], $general['name'], $general['picture'], $general['imgsvr'], $nation["coreboard{$index}_when"], $index, 1); }
$index--;
if($index < 0) { $index = 19; }
}
?>
<table width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?></td></tr>
</table>
</div>
</body>
</html>
-77
View File
@@ -1,77 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
increaseRefresh("회의실", 1);
$query = "select no,nation from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
?>
<!DOCTYPE html>
<html>
<head>
<title><?=UniqueConst::$serverName?>: 회의실</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
</head>
<body>
<div style='width:1000px;margin:auto'>
<table width=1000 class='tb_layout bg0'>
<tr><td>회 의 실<br><?=backButton()?></td></tr>
<form name=form1 method=post action=c_nationboard.php>
<tr><td align=center>
제목 <input type=textarea maxlength=50 name=title style=color:white;background-color:black;width:830px;>
</td>
</tr>
<tr><td>
<textarea name=msg style=color:white;background-color:black;width:998px;height:200px;></textarea><br>
<input type=submit value=저장하기>
<input type=hidden name=num value=-1>
</td></tr>
</form>
</table>
<br>
<?php
$nation = getNation($me['nation']);
//20개 메세지
$index = $nation['boardindex'];
for($i=0; $i < 20; $i++) {
$who = "board{$index}_who";
$query = "select name,picture,imgsvr from general where no='$nation[$who]'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
if($nation["board{$index}"] != '') { msgprint($nation["board{$index}"], $general['name'], $general['picture'], $general['imgsvr'], $nation["board{$index}_when"], $index, 0); }
$index--;
if($index < 0) { $index = 19; }
}
?>
<table width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr>
<tr><td><?=banner()?> </td></tr>
</table>
</div>
</body>
</html>
-58
View File
@@ -1,58 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$title = Util::getReq('title');
$msg = Util::getReq('msg');
$num = Util::getReq('num', 'int');
$reply = Util::getReq('reply');
// $title, $msg, $num
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
if (getBlockLevel() == 1 || getBlockLevel() == 3) {
header('location:b_chiefboard.php');
die();
}
$query = "select no,nation from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$title = str_replace("|", " ", $title);
$msg = str_replace("|", " ", $msg);
$reply = str_replace("|", " ", $reply);
$title = trim($title);
$msg = trim($msg);
$reply = trim($reply);
$nation = getNation($me['nation']);
//새글 추가시
if($num == -1 && $title != "" && $msg != "") {
$num = $nation['coreindex'] + 1;
if($num >= 20) { $num = 0; }
$msg = $title."|".$msg;
$msg = addslashes(SQ2DQ($msg));
$date = date('Y-m-d H:i:s');
$query = "update nation set coreboard{$num}='$msg',coreboard{$num}_who='{$me['no']}',coreboard{$num}_when='$date' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update nation set coreindex='$num' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//$num에 댓글시
} elseif($num >= 0 && $reply != "") {
$newmsg = $nation["coreboard{$num}"]."|".$me['no']."|".$reply;
$newmsg = addslashes(SQ2DQ($newmsg));
$query = "update nation set coreboard{$num}='$newmsg' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
header('location:b_chiefboard.php');
-54
View File
@@ -1,54 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
// $title, $msg, $num
$title = Util::getReq('title');
$msg = Util::getReq('msg');
$num = Util::getReq('num', 'int');
$reply = Util::getReq('reply');
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$connect=$db->get();
if(getBlockLevel() != 1 && getBlockLevel() != 3) {
$query = "select no,nation from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$title = str_replace("|", " ", $title);
$msg = str_replace("|", " ", $msg);
$reply = str_replace("|", " ", $reply);
$title = trim($title);
$msg = trim($msg);
$reply = trim($reply);
$nation = getNation($me['nation']);
//새글 추가시
if($num == -1 && $title != "" && $msg != "") {
$num = $nation['boardindex'] + 1;
if($num >= 20) { $num = 0; }
$msg = $title."|".$msg;
$msg = addslashes(SQ2DQ($msg));
$date = date('Y-m-d H:i:s');
$query = "update nation set board{$num}='$msg',board{$num}_who='{$me['no']}',board{$num}_when='$date' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update nation set boardindex='$num' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//$num에 댓글시
} elseif($num >= 0 && $reply != "") {
$newmsg = $nation["board{$num}"]."|".$me['no']."|".$reply;
$newmsg = addslashes(SQ2DQ($newmsg));
$query = "update nation set board{$num}='$newmsg' where nation='{$me['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
}
header('location:b_nationboard.php');
-53
View File
@@ -1183,59 +1183,6 @@ function nationMsg() {
return $msg?:''; return $msg?:'';
} }
function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
$db = DB::db();
$connect=$db->get();
$message = explode('|', $msg);
$count = (count($message) - 2)/2;
$message[0] = Tag2Code($message[0]);
$message[1] = Tag2Code($message[1]);
// $message[0] = str_replace("\n", "<br>", $message[0]);
// $message[1] = str_replace("\n", "<br>", $message[1]);
if($type == 0) { $board = "c_nationboard.php"; }
else { $board = "c_chiefboard.php"; }
$imageTemp = GetImageURL($imgsvr);
echo "
<table style='text-align:center;' width=1000 class='tb_layout bg0'>
<tr>
<td width=90 style='text-align:center;' class='bg1'><font size=1>$name</font></td>
<td width=746 style='text-align:center;' class='bg1'><font size=4><b>$message[0]</b></font></td>
<td width=148 style='text-align:center;' class='bg1'>$when</td>
</tr>
<tr>
<td width=90 height=64 valign=top><img width='64' height='64' class='generalIcon' src='{$imageTemp}/{$picture}' border='0'></td>
<td width=906 colspan=2>$message[1]</td>
</tr>";
for($i=0; $i < $count; $i++) {
$who = Tag2Code($message[2+$i*2]);
$reply = Tag2Code($message[3+$i*2]);
$query = "select name from general where no='$who'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$regen = MYDB_fetch_array($result);
echo "
<tr>
<td width=90 style='text-align:center;'><font size=1>{$regen['name']}</font></td>
<td width=906 colspan=2>$reply</td>
</tr>";
}
echo "
<tr>
<form name=reply_form{$num} method=post action=$board>
<td width=90 style='text-align:center;'>댓글달기</td>
<td width=906 colspan=2>
<input type=textarea name=reply maxlength=250 style=color:white;background-color:black;width:804px;>
<input type=submit value=댓글달기>
<input type=hidden name=num value=$num>
</td>
</form>
</tr>
</table>
<br>";
}
function banner() { function banner() {
return sprintf( return sprintf(
-122
View File
@@ -206,128 +206,6 @@ CREATE TABLE `nation` (
`level` INT(1) NULL DEFAULT '0', `level` INT(1) NULL DEFAULT '0',
`type` INT(2) NULL DEFAULT '0', `type` INT(2) NULL DEFAULT '0',
`history` MEDIUMTEXT NULL DEFAULT '', `history` MEDIUMTEXT NULL DEFAULT '',
`board0` TEXT NULL DEFAULT '',
`board0_who` INT(6) NULL DEFAULT '0',
`board0_when` DATETIME NULL DEFAULT NULL,
`board1` TEXT NULL DEFAULT '',
`board1_who` INT(6) NULL DEFAULT '0',
`board1_when` DATETIME NULL DEFAULT NULL,
`board2` TEXT NULL DEFAULT '',
`board2_who` INT(6) NULL DEFAULT '0',
`board2_when` DATETIME NULL DEFAULT NULL,
`board3` TEXT NULL DEFAULT '',
`board3_who` INT(6) NULL DEFAULT '0',
`board3_when` DATETIME NULL DEFAULT NULL,
`board4` TEXT NULL DEFAULT '',
`board4_who` INT(6) NULL DEFAULT '0',
`board4_when` DATETIME NULL DEFAULT NULL,
`board5` TEXT NULL DEFAULT '',
`board5_who` INT(6) NULL DEFAULT '0',
`board5_when` DATETIME NULL DEFAULT NULL,
`board6` TEXT NULL DEFAULT '',
`board6_who` INT(6) NULL DEFAULT '0',
`board6_when` DATETIME NULL DEFAULT NULL,
`board7` TEXT NULL DEFAULT '',
`board7_who` INT(6) NULL DEFAULT '0',
`board7_when` DATETIME NULL DEFAULT NULL,
`board8` TEXT NULL DEFAULT '',
`board8_who` INT(6) NULL DEFAULT '0',
`board8_when` DATETIME NULL DEFAULT NULL,
`board9` TEXT NULL DEFAULT '',
`board9_who` INT(6) NULL DEFAULT '0',
`board9_when` DATETIME NULL DEFAULT NULL,
`board10` TEXT NULL DEFAULT '',
`board10_who` INT(6) NULL DEFAULT '0',
`board10_when` DATETIME NULL DEFAULT NULL,
`board11` TEXT NULL DEFAULT '',
`board11_who` INT(6) NULL DEFAULT '0',
`board11_when` DATETIME NULL DEFAULT NULL,
`board12` TEXT NULL DEFAULT '',
`board12_who` INT(6) NULL DEFAULT '0',
`board12_when` DATETIME NULL DEFAULT NULL,
`board13` TEXT NULL DEFAULT '',
`board13_who` INT(6) NULL DEFAULT '0',
`board13_when` DATETIME NULL DEFAULT NULL,
`board14` TEXT NULL DEFAULT '',
`board14_who` INT(6) NULL DEFAULT '0',
`board14_when` DATETIME NULL DEFAULT NULL,
`board15` TEXT NULL DEFAULT '',
`board15_who` INT(6) NULL DEFAULT '0',
`board15_when` DATETIME NULL DEFAULT NULL,
`board16` TEXT NULL DEFAULT '',
`board16_who` INT(6) NULL DEFAULT '0',
`board16_when` DATETIME NULL DEFAULT NULL,
`board17` TEXT NULL DEFAULT '',
`board17_who` INT(6) NULL DEFAULT '0',
`board17_when` DATETIME NULL DEFAULT NULL,
`board18` TEXT NULL DEFAULT '',
`board18_who` INT(6) NULL DEFAULT '0',
`board18_when` DATETIME NULL DEFAULT NULL,
`board19` TEXT NULL DEFAULT '',
`board19_who` INT(6) NULL DEFAULT '0',
`board19_when` DATETIME NULL DEFAULT NULL,
`coreboard0` TEXT NULL DEFAULT '',
`coreboard0_who` INT(6) NULL DEFAULT '0',
`coreboard0_when` DATETIME NULL DEFAULT NULL,
`coreboard1` TEXT NULL DEFAULT '',
`coreboard1_who` INT(6) NULL DEFAULT '0',
`coreboard1_when` DATETIME NULL DEFAULT NULL,
`coreboard2` TEXT NULL DEFAULT '',
`coreboard2_who` INT(6) NULL DEFAULT '0',
`coreboard2_when` DATETIME NULL DEFAULT NULL,
`coreboard3` TEXT NULL DEFAULT '',
`coreboard3_who` INT(6) NULL DEFAULT '0',
`coreboard3_when` DATETIME NULL DEFAULT NULL,
`coreboard4` TEXT NULL DEFAULT '',
`coreboard4_who` INT(6) NULL DEFAULT '0',
`coreboard4_when` DATETIME NULL DEFAULT NULL,
`coreboard5` TEXT NULL DEFAULT '',
`coreboard5_who` INT(6) NULL DEFAULT '0',
`coreboard5_when` DATETIME NULL DEFAULT NULL,
`coreboard6` TEXT NULL DEFAULT '',
`coreboard6_who` INT(6) NULL DEFAULT '0',
`coreboard6_when` DATETIME NULL DEFAULT NULL,
`coreboard7` TEXT NULL DEFAULT '',
`coreboard7_who` INT(6) NULL DEFAULT '0',
`coreboard7_when` DATETIME NULL DEFAULT NULL,
`coreboard8` TEXT NULL DEFAULT '',
`coreboard8_who` INT(6) NULL DEFAULT '0',
`coreboard8_when` DATETIME NULL DEFAULT NULL,
`coreboard9` TEXT NULL DEFAULT '',
`coreboard9_who` INT(6) NULL DEFAULT '0',
`coreboard9_when` DATETIME NULL DEFAULT NULL,
`coreboard10` TEXT NULL DEFAULT '',
`coreboard10_who` INT(6) NULL DEFAULT '0',
`coreboard10_when` DATETIME NULL DEFAULT NULL,
`coreboard11` TEXT NULL DEFAULT '',
`coreboard11_who` INT(6) NULL DEFAULT '0',
`coreboard11_when` DATETIME NULL DEFAULT NULL,
`coreboard12` TEXT NULL DEFAULT '',
`coreboard12_who` INT(6) NULL DEFAULT '0',
`coreboard12_when` DATETIME NULL DEFAULT NULL,
`coreboard13` TEXT NULL DEFAULT '',
`coreboard13_who` INT(6) NULL DEFAULT '0',
`coreboard13_when` DATETIME NULL DEFAULT NULL,
`coreboard14` TEXT NULL DEFAULT '',
`coreboard14_who` INT(6) NULL DEFAULT '0',
`coreboard14_when` DATETIME NULL DEFAULT NULL,
`coreboard15` TEXT NULL DEFAULT '',
`coreboard15_who` INT(6) NULL DEFAULT '0',
`coreboard15_when` DATETIME NULL DEFAULT NULL,
`coreboard16` TEXT NULL DEFAULT '',
`coreboard16_who` INT(6) NULL DEFAULT '0',
`coreboard16_when` DATETIME NULL DEFAULT NULL,
`coreboard17` TEXT NULL DEFAULT '',
`coreboard17_who` INT(6) NULL DEFAULT '0',
`coreboard17_when` DATETIME NULL DEFAULT NULL,
`coreboard18` TEXT NULL DEFAULT '',
`coreboard18_who` INT(6) NULL DEFAULT '0',
`coreboard18_when` DATETIME NULL DEFAULT NULL,
`coreboard19` TEXT NULL DEFAULT '',
`coreboard19_who` INT(6) NULL DEFAULT '0',
`coreboard19_when` DATETIME NULL DEFAULT NULL,
`boardindex` INT(2) NULL DEFAULT '19',
`coreindex` INT(2) NULL DEFAULT '19',
`l12term` INT(4) NULL DEFAULT '0', `l12term` INT(4) NULL DEFAULT '0',
`l11term` INT(4) NULL DEFAULT '0', `l11term` INT(4) NULL DEFAULT '0',
`l10term` INT(4) NULL DEFAULT '0', `l10term` INT(4) NULL DEFAULT '0',
+2 -2
View File
@@ -1,7 +1,7 @@
<div class='buttonPlate bg2'> <div class='buttonPlate bg2'>
<div> <div>
<a href='b_nationboard.php'><button class='commandButton' <?=$meLevel>=1?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>회 의 실</button></a> <a href='t_board.php'><button class='commandButton' <?=$meLevel>=1?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>회 의 실</button></a>
<a href='b_chiefboard.php'><button class='commandButton' <?=$meLevel>=5?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>기 밀 실</button></a> <a href='t_board.php?isSecret=true'><button class='commandButton' <?=$meLevel>=5?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>기 밀 실</button></a>
<a href='b_troop.php'><button class='commandButton' <?=($meLevel>=1&&$nationLevel>=1)?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>부대 편성</button></a> <a href='b_troop.php'><button class='commandButton' <?=($meLevel>=1&&$nationLevel>=1)?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>부대 편성</button></a>
<a href='t_diplomacy.php'><button class='commandButton' <?=$meLevel>=1?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>외 교 부</button></a> <a href='t_diplomacy.php'><button class='commandButton' <?=$meLevel>=1?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>외 교 부</button></a>
<a href='b_myBossInfo.php'><button class='commandButton' <?=$meLevel>=1?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>인 사 부</button></a> <a href='b_myBossInfo.php'><button class='commandButton' <?=$meLevel>=1?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>인 사 부</button></a>