페이지 리다이렉트 방식 변경
<script>location.replace</script>에서 PHP redirect header를 직접 이용하는 방식으로.
This commit is contained in:
+2
-4
@@ -7,8 +7,8 @@ include "func.php";
|
||||
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
if($session->userGrade < 5){
|
||||
//echo "<script>location.replace('_119.php');</script>";
|
||||
echo '_119.php';//TODO:debug all and replace
|
||||
header('location:_119.php');
|
||||
die();
|
||||
}
|
||||
|
||||
$v = new Validator($_POST);
|
||||
@@ -68,6 +68,4 @@ case "락풀기":
|
||||
break;
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('_119.php');</script>";
|
||||
//echo '_119.php';//TODO:debug all and replace
|
||||
header('Location:_119.php');
|
||||
@@ -7,8 +7,8 @@ include "func.php";
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
if ($session->userGrade < 5) {
|
||||
//echo "<script>location.replace('_admin1.php');</script>";
|
||||
echo '_admin1.php';//TODO:debug all and replace
|
||||
header('location:_admin1.php');
|
||||
die();
|
||||
}
|
||||
|
||||
$v = new Validator($_POST);
|
||||
|
||||
@@ -8,7 +8,7 @@ include "func.php";
|
||||
$weap = Util::getReq('weap', 'int');
|
||||
|
||||
//로그인 검사
|
||||
$session = Session::requireLogin()->loginGame();
|
||||
$session = Session::requireLogin()->loginGame()->setReadOnly();
|
||||
|
||||
if($session->userGrade < 5) {
|
||||
header('location:_admin2.php');
|
||||
@@ -303,6 +303,4 @@ switch($btn) {
|
||||
break;
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('_admin2.php');</script>";
|
||||
echo '_admin2.php';//TODO:debug all and replace
|
||||
|
||||
header('location:_admin2.php');
|
||||
@@ -7,8 +7,8 @@ include "func.php";
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
if($session->userGrade < 5) {
|
||||
//echo "<script>location.replace('_admin4.php');</script>";
|
||||
echo '_admin4.php';//TODO:debug all and replace
|
||||
header('location:_admin4.php');
|
||||
die();
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
@@ -57,6 +57,5 @@ switch($btn) {
|
||||
break;
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('_admin4.php');</script>";
|
||||
echo '_admin4.php'; //TODO:debug all and replace
|
||||
header('location:_admin4.php');
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ $session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
if($session->userGrade < 5) {
|
||||
//echo "<script>location.replace('_admin5.php');</script>";
|
||||
echo '_admin5.php';//TODO:debug all and replace
|
||||
header('location:_admin5.php');
|
||||
die();
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
@@ -34,7 +34,6 @@ switch($btn) {
|
||||
break;
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('_admin5.php');</script>";
|
||||
echo '_admin5.php';//TODO:debug all and replace
|
||||
header('location:_admin5.php');
|
||||
|
||||
|
||||
|
||||
+1
-2
@@ -52,8 +52,7 @@ $me = MYDB_fetch_array($result);
|
||||
<script type="text/javascript">
|
||||
function go(type) {
|
||||
if(type == 0){
|
||||
//location.replace('c_vacation.php');
|
||||
console.log('c_vacation.php');//TODO:debug all and replace
|
||||
location.replace('c_vacation.php');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -377,10 +377,11 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "
|
||||
$betting = MYDB_fetch_array($result);
|
||||
$bet = [];
|
||||
for ($i=0; $i < 16; $i++) {
|
||||
$bet[$i] = @round($betting['bet'] / $betting["bet{$i}"], 2);
|
||||
if ($bet[$i] == 0) {
|
||||
$bet[$i] = "∞";
|
||||
if($betting['bet'] == 0){
|
||||
$bet[$i] = '∞';
|
||||
continue;
|
||||
}
|
||||
$bet[$i] = round($betting['bet'] / $betting["bet{$i}"], 2);
|
||||
}
|
||||
|
||||
echo "
|
||||
|
||||
@@ -52,10 +52,4 @@ if(getBlockLevel() != 1 && getBlockLevel() != 3) {
|
||||
}
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('b_chiefboard.php');</script>";
|
||||
echo 'b_chiefboard.php';//TODO:debug all and replace
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
header('location:b_chiefboard.php');
|
||||
+2
-5
@@ -27,8 +27,7 @@ $btn = $_POST['btn'];
|
||||
|
||||
//내가 수뇌부이어야함
|
||||
if($me['level'] < 5) {
|
||||
//echo "<script>location.replace('b_myBossInfo.php');</script>";
|
||||
echo 'b_myBossInfo.php';//TODO:debug all and replace
|
||||
header('location:b_myBossInfo.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -69,7 +68,5 @@ if($btn == "국가방침") {
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('b_dipcenter.php');</script>";
|
||||
echo 'b_dipcenter.php';//TODO:debug all and replace
|
||||
|
||||
header('location:b_dipcenter.php');
|
||||
|
||||
|
||||
+25
-15
@@ -61,9 +61,13 @@ if($command == 46) {
|
||||
$query['turn'.$turnIdx] = $comStr;
|
||||
}
|
||||
$db->update('general', $query, 'owner=%i', $userID);
|
||||
header('Location:index.php');
|
||||
header('Location:./');
|
||||
die();
|
||||
|
||||
}
|
||||
|
||||
//통합제의
|
||||
} elseif($command == 53) {
|
||||
if($command == 53) {
|
||||
$query = "select nation,level from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
@@ -87,10 +91,12 @@ if($command == 46) {
|
||||
$query = "update nation set {$str} where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
//echo "<script>location.replace('b_chiefcenter.php');</script>";
|
||||
echo 'b_chiefcenter.php';//TODO:debug all and replace
|
||||
header('location:b_chiefcenter.php');
|
||||
die();
|
||||
}
|
||||
|
||||
//불가침
|
||||
} elseif($command == 61) {
|
||||
if($command == 61) {
|
||||
$query = "select nation,level from general where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
@@ -113,13 +119,16 @@ if($command == 46) {
|
||||
$query = "update nation set {$str} where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
//echo "<script>location.replace('b_chiefcenter.php');</script>";
|
||||
echo 'b_chiefcenter.php';//TODO:debug all and replace
|
||||
|
||||
header('location:b_chiefcenter.php');
|
||||
die();
|
||||
}
|
||||
|
||||
//포상, 몰수, 발령, 항복권고, 원조
|
||||
//선전포고, 종전, 파기, 초토화, 천도, 증축, 감축
|
||||
//백성동원, 수몰, 허보, 피장파장, 의병모집, 이호경식, 급습
|
||||
//국기변경
|
||||
} elseif($command == 23 || $command == 24 || $command == 27 || $command == 51 || $command == 52 || $command > 60) {
|
||||
if($command == 23 || $command == 24 || $command == 27 || $command == 51 || $command == 52 || $command > 60) {
|
||||
$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);
|
||||
@@ -136,13 +145,14 @@ if($command == 46) {
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
header('location:b_chiefcenter.php');
|
||||
} else {
|
||||
$query = [];
|
||||
foreach($turn as $turnIdx){
|
||||
$query['turn'.$turnIdx] = $comStr;
|
||||
}
|
||||
$db->update('general', $query, 'owner=%i', $userID);
|
||||
header('Location:index.php');
|
||||
die();
|
||||
}
|
||||
|
||||
//일반 턴
|
||||
$query = [];
|
||||
foreach($turn as $turnIdx){
|
||||
$query['turn'.$turnIdx] = $comStr;
|
||||
}
|
||||
$db->update('general', $query, 'owner=%i', $userID);
|
||||
header('Location:./');
|
||||
|
||||
|
||||
+21
-12
@@ -33,7 +33,7 @@ $ruler = MYDB_fetch_array($result);
|
||||
|
||||
//수뇌가 아니면 아무것도 할 수 없음
|
||||
if($meLevel < 5){
|
||||
echo 'b_myBossInfo.php';//TODO:debug all and replace
|
||||
header('location:b_myBossInfo.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ if($btn == "임명") {
|
||||
|
||||
//임명할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함
|
||||
if($general['level'] == 12 || $meLevel < 5 || ($general['nation'] != $me['nation'] && $genlist != 0)) {
|
||||
//echo "<script>location.replace('b_myBossInfo.php');</script>";
|
||||
echo 'b_myBossInfo.php';//TODO:debug all and replace
|
||||
|
||||
header('location:b_myBossInfo.php');
|
||||
exit();
|
||||
}
|
||||
} elseif($btn == "추방") {
|
||||
@@ -56,15 +56,14 @@ if($btn == "임명") {
|
||||
|
||||
//추방할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함
|
||||
if($general['level'] == 12 || $meLevel < 5 || ($general['nation'] != $me['nation'] && $outlist != 0)) {
|
||||
//echo "<script>location.replace('b_myBossInfo.php');</script>";
|
||||
echo 'b_myBossInfo.php';//TODO:debug all and replace
|
||||
header('location:b_myBossInfo.php');
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
//나와 대상 장수는 국가가 같아야 함
|
||||
if($me['nation'] != $general['nation']){
|
||||
echo 'b_myBossInfo.php';//TODO:debug all and replace
|
||||
header('location:b_myBossInfo.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -188,7 +187,11 @@ if($btn == "추방") {
|
||||
pushGenLog($general, $log);
|
||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||
}
|
||||
} elseif($btn == "임명" && $level >= 5 && $level <= 11) {
|
||||
header('location:b_myBossInfo.php');
|
||||
die();
|
||||
}
|
||||
|
||||
if($btn == "임명" && $level >= 5 && $level <= 11) {
|
||||
$query = "select l{$level}set,level,chemi from nation where nation='{$me['nation']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$nation = MYDB_fetch_array($result);
|
||||
@@ -235,7 +238,12 @@ if($btn == "추방") {
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) {
|
||||
header('location:b_myBossInfo.php');
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
if($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) {
|
||||
switch($level) {
|
||||
case 4: $lv = 1; break;
|
||||
case 3: $lv = 2; break;
|
||||
@@ -246,8 +254,7 @@ if($btn == "추방") {
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$city = MYDB_fetch_array($result);
|
||||
if(!$city){
|
||||
//echo "<script>location.replace('b_myBossInfo.php');</script>";
|
||||
echo 'b_myBossInfo.php';//TODO:debug all and replace
|
||||
header('location:b_myBossInfo.php');
|
||||
die();
|
||||
}
|
||||
$oldlist = $city["gen{$lv}"];
|
||||
@@ -283,9 +290,11 @@ if($btn == "추방") {
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
}
|
||||
header('location:b_myBossInfo.php');
|
||||
die();
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('b_myBossInfo.php');</script>";
|
||||
echo 'b_myBossInfo.php';//TODO:debug all and replace
|
||||
|
||||
header('location:b_myBossInfo.php');
|
||||
|
||||
|
||||
|
||||
@@ -50,11 +50,4 @@ if(getBlockLevel() != 1 && getBlockLevel() != 3) {
|
||||
}
|
||||
}
|
||||
|
||||
//echo "<script>location.replace('b_nationboard.php');</script>";
|
||||
echo 'b_nationboard.php';//TODO:debug all and replace
|
||||
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
header('location:b_nationboard.php');
|
||||
|
||||
@@ -21,6 +21,4 @@ $msg = addslashes(SQ2DQ($msg));
|
||||
$query = "update nation set rule='$msg' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
//echo "<script>location.replace('b_nationrule.php');</script>";
|
||||
echo 'b_nationrule.php';//TODO:debug all and replace
|
||||
|
||||
header('location:b_nationrule.php');
|
||||
@@ -33,7 +33,10 @@ case 2: $tp = "power"; $tp2 = "일기토"; $tp3 = "power"; break;
|
||||
case 3: $tp = "intel"; $tp2 = "설전"; $tp3 = "intel"; break;
|
||||
}
|
||||
|
||||
if($me['tournament'] == 1 && $session->userGrade < 5) { echo "<script>location.replace('b_tournament.php');</script>"; exit(); }
|
||||
if($me['tournament'] == 1 && $session->userGrade < 5) {
|
||||
header('locatoin:b_tournament.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
if($btn == "자동개최설정" && $session->userGrade >= 5) {
|
||||
$db->update('game', ['tnmt_trig'=>$trig], true);
|
||||
@@ -101,7 +104,10 @@ if($btn == "자동개최설정" && $session->userGrade >= 5) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
//{$admin['develcost']}원 참가비
|
||||
if($general['gold'] < $admin['develcost']) { echo "<script>location.replace('b_tournament.php');</script>"; exit(1); }
|
||||
if($general['gold'] < $admin['develcost']) {
|
||||
header('location:b_tournament.php');
|
||||
exit(1);
|
||||
}
|
||||
$general['gold'] -= $admin['develcost'];
|
||||
}
|
||||
|
||||
@@ -216,7 +222,5 @@ if($btn == "자동개최설정" && $session->userGrade >= 5) {
|
||||
$query = "update game set tnmt_msg='$msg'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
?>
|
||||
|
||||
<!--<script>location.replace('b_tournament.php');</script> //TODO:debug all and replace -->
|
||||
b_tournament.php
|
||||
header('location:b_tournament.php');
|
||||
+2
-2
@@ -19,6 +19,6 @@ $admin['killturn'] *= 3;
|
||||
$query = "update general set killturn='{$admin['killturn']}' where owner='{$userID}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
//echo "<script>location.replace('b_myPage.php');</script>";
|
||||
echo 'b_myPage.php'; //TODO:debug all and replace
|
||||
|
||||
header('location:b_myPage.php');
|
||||
|
||||
|
||||
+2
-5
@@ -56,8 +56,7 @@ else if($btn == "댓글" && $comment != "") {
|
||||
}
|
||||
|
||||
if($session->userGrade < 5){
|
||||
echo "<!--<script>location.replace('a_vote.php');</script>"; //TODO:debug all and replace -->
|
||||
echo 'a_vote.php ';
|
||||
header('location:a_vote.php');
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -96,7 +95,5 @@ if($btn == "수정") {
|
||||
$query = "update game set voteopen=2";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
?>
|
||||
|
||||
<!--<script>location.replace('a_vote.php');</script>"; //TODO:debug all and replace -->
|
||||
a_vote.php
|
||||
header('location:a_vote.php');
|
||||
+1
-1
@@ -128,5 +128,5 @@ pushGenLog($you, $youlog);
|
||||
//pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||
//pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||
|
||||
echo "<script>location.replace('msglist.php');</script>";
|
||||
header('location:msglist.php');
|
||||
|
||||
|
||||
+1
-2
@@ -109,5 +109,4 @@ pushGenLog($you, $youlog);
|
||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||
|
||||
echo "<script>location.replace('msglist.php');</script>";
|
||||
|
||||
header('location:msglist.php');
|
||||
|
||||
+1
-2
@@ -114,5 +114,4 @@ pushGenLog($you, $youlog);
|
||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||
|
||||
echo "<script>location.replace('msglist.php');</script>";
|
||||
|
||||
header('location:msglist.php');
|
||||
|
||||
+1
-1
@@ -148,5 +148,5 @@ pushGenLog($you, $youlog);
|
||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||
|
||||
echo "<script>location.replace('msglist.php');</script>";
|
||||
header('location:msglist.php');
|
||||
|
||||
|
||||
+1
-2
@@ -174,5 +174,4 @@ pushGenLog($you, $youlog);
|
||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||
//pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||
|
||||
echo "<script>location.replace('msglist.php');</script>";
|
||||
|
||||
header('location:msglist.php');
|
||||
+1
-2
@@ -137,5 +137,4 @@ pushGenLog($you, $youlog);
|
||||
pushGeneralPublicRecord($alllog, $admin['year'], $admin['month']);
|
||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||
|
||||
echo "<script>location.replace('msglist.php');</script>";
|
||||
|
||||
header('location:msglist.php');
|
||||
@@ -718,8 +718,7 @@ function command_Chief($turn, $command) {
|
||||
$query = "update nation set {$str} where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
//echo "<script>location.replace('b_chiefcenter.php');</script>";
|
||||
echo 'b_chiefcenter.php';//TODO:debug all and replace
|
||||
header('location:b_chiefcenter.php');
|
||||
}
|
||||
|
||||
function command_Other($turn, $commandtype) {
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ function GetNationColors() {
|
||||
|
||||
function backButton() {
|
||||
return "
|
||||
<input type=button value='돌아가기' onclick=location.replace('index.php')><br>
|
||||
<input type=button value='돌아가기' onclick=location.replace('./')><br>
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
@@ -276,7 +276,7 @@ function DecodeMsg($msg, $type, $who, $date, $bg, $num=0) {
|
||||
|
||||
switch($bg) {
|
||||
case 2:
|
||||
case 4: $bgcolor = "CC6600"; break;
|
||||
case 4: $bgcolor = "#CC6600"; break;
|
||||
}
|
||||
|
||||
if($category == 6) {
|
||||
|
||||
@@ -673,7 +673,7 @@ function process_47(&$general) {
|
||||
//분쟁기록 모두 지움
|
||||
DeleteConflict($general['nation']);
|
||||
// 국명, 색깔 바꿈 국가 레벨 0, 성향리셋, 기술0
|
||||
$query = "update nation set name='{$general['name']}',color='330000',level='0',type='0',tech='0',totaltech='0',capital='0' where nation='{$general['nation']}'";
|
||||
$query = "update nation set name='{$general['name']}',color='#330000',level='0',type='0',tech='0',totaltech='0',capital='0' where nation='{$general['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
// 본인 빼고 건국/임관제한
|
||||
$query = "update general set makelimit='12' where no!='{$general['no']}' and nation='{$general['nation']}'";
|
||||
|
||||
+1
-1
@@ -276,6 +276,6 @@ $rootDB->insert('member_log', [
|
||||
<script>
|
||||
window.alert('정상적으로 회원 가입되었습니다. 장수명 : <?=$name?> \n튜토리얼을 꼭 읽어보세요!');
|
||||
</script>
|
||||
<script>location.replace('index.php');</script>
|
||||
<script>location.replace('./');</script>
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ $commandtype = Util::getReq('commandtype', 'int');
|
||||
increaseRefresh("턴입력", 1);
|
||||
|
||||
if(!$turn || $commandtype === null){
|
||||
header('location:index.php');
|
||||
header('location:./');
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -31,8 +31,7 @@ $me = MYDB_fetch_array($result);
|
||||
|
||||
$con = checkLimit($me['con'], $admin['conlimit']);
|
||||
if($con >= 2) {
|
||||
//echo "<script>window.top.main.location.replace('index.php');</script>";
|
||||
echo 'index.php';//TODO:debug all and replace
|
||||
header('location:./');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -191,8 +191,8 @@ function command_99($turn) {
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
}
|
||||
//echo "<script>location.replace('b_chiefcenter.php');</script>";
|
||||
echo 'b_chiefcenter.php';//TODO:debug all and replace
|
||||
|
||||
header('location:b_chiefcenter.php');
|
||||
}
|
||||
|
||||
function command_11($turn, $command) {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
운영자가 처리할 때까지 기다려주세요
|
||||
</main>
|
||||
<div class="with_border">
|
||||
<button style='width:200px;height:2em;font-size:1.2em;' onclick="location.replace('index.php')">몇 초 뒤 눌러주세요</button>
|
||||
<button style='width:200px;height:2em;font-size:1.2em;' onclick="location.replace('./')">몇 초 뒤 눌러주세요</button>
|
||||
</div>
|
||||
<div class="with_border">
|
||||
<?=$this->message?>
|
||||
|
||||
+1
-2
@@ -25,8 +25,7 @@ $conLimit = $db->queryFirstField('SELECT conlimit FROM game LIMIT 1');
|
||||
|
||||
$con = checkLimit($myActionCnt, $conLimit);
|
||||
if($con >= 2) {
|
||||
echo "<script>window.top.main.location.replace('index.php');</script>";
|
||||
//echo 'index.php';//TODO:debug all and replace
|
||||
header('location:commandlist.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,5 +16,4 @@ $me = MYDB_fetch_array($result);
|
||||
|
||||
updateCommand($me['no'], 2);
|
||||
|
||||
//echo "<script>location.replace('b_chiefcenter.php');</script>";
|
||||
echo 'b_chiefcenter.php';//TODO:debug all and replace
|
||||
header('location:b_chiefcenter.php');
|
||||
|
||||
@@ -16,6 +16,4 @@ $me = MYDB_fetch_array($result);
|
||||
|
||||
backupdateCommand($me['no'], 2);
|
||||
|
||||
//echo "<script>location.replace('b_chiefcenter.php');</script>";
|
||||
echo 'b_chiefcenter.php';//TODO:debug all and replace
|
||||
|
||||
header('location:b_chiefcenter.php');
|
||||
|
||||
-234
@@ -1,234 +0,0 @@
|
||||
function ClearContent(sel) {
|
||||
$(sel).html("");
|
||||
}
|
||||
|
||||
function Open(url) {
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
function Replace(url) {
|
||||
//location.replace(url);
|
||||
console.log('this',url);
|
||||
}
|
||||
|
||||
function ReplaceFrame(url) {
|
||||
console.log('top',url);
|
||||
window.top.location.replace(url);
|
||||
|
||||
}
|
||||
|
||||
function ImportStyle(href) {
|
||||
var CSS = document.createElement('link');
|
||||
CSS.rel = 'stylesheet';
|
||||
CSS.type = 'text/css';
|
||||
CSS.media = 'screen';
|
||||
CSS.href = href;
|
||||
document.getElementsByTagName('head')[0].appendChild(CSS);
|
||||
}
|
||||
|
||||
function ImportView(sel, url) {
|
||||
var html = $.ajax({
|
||||
url: url,
|
||||
async: false
|
||||
});
|
||||
$(sel).append(html.responseText);
|
||||
}
|
||||
|
||||
function ImportAction(sel, url) {
|
||||
var tag = "<script type=\"text/javascript\" src=\"" + url + "\"></script>";
|
||||
$(sel).append(tag);
|
||||
}
|
||||
|
||||
function ImportAction(url) {
|
||||
// 비동기라서 동기화된 함수로 변경
|
||||
// 추후 cache: true, 로 변경
|
||||
// $.getScript(url, function() { eval(initFunc); });
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
cache: true,
|
||||
async: false,
|
||||
dataType: 'script'
|
||||
});
|
||||
}
|
||||
|
||||
function GetJSON(url, data, callback) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
cache: true,
|
||||
async: true,
|
||||
data: data,
|
||||
success: callback,
|
||||
dataType: 'json',
|
||||
error: Error
|
||||
});
|
||||
}
|
||||
|
||||
function GetJSONSync(url, data, callback) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
cache: true,
|
||||
async: false,
|
||||
data: data,
|
||||
success: callback,
|
||||
dataType: 'json',
|
||||
error: Error
|
||||
});
|
||||
}
|
||||
|
||||
function PostJSON(url, data, callback) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
cache: true,
|
||||
async: true,
|
||||
data: data,
|
||||
success: callback,
|
||||
dataType: 'json',
|
||||
error: Error
|
||||
});
|
||||
}
|
||||
|
||||
function PostJSONSync(url, data, callback) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
cache: true,
|
||||
async: false,
|
||||
data: data,
|
||||
success: callback,
|
||||
dataType: 'json',
|
||||
error: Error
|
||||
});
|
||||
}
|
||||
|
||||
function Error(xhr, textStatus, errorThrown) {
|
||||
// alert(xhr.status);
|
||||
alert(xhr.responseText);
|
||||
// alert(textStatus);
|
||||
// alert(errorThrown);
|
||||
/*
|
||||
if(xhr.status == 404) {
|
||||
alert("처리 프로그램이 없습니다!");
|
||||
alert(xhr.responseText);
|
||||
} else if(xhr.status == 500) {
|
||||
alert("처리 프로그램이 오류입니다!");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
function IsNumber(input) {
|
||||
var check = /(^\d+$)/;
|
||||
return check.test(input);
|
||||
}
|
||||
|
||||
function Second(time, amount) {
|
||||
var h = parseInt(time.substr(0, 2), 10);
|
||||
var m = parseInt(time.substr(3, 2), 10);
|
||||
var s = parseInt(time.substr(6, 2), 10);
|
||||
s += amount;
|
||||
|
||||
if(amount > 0) {
|
||||
if(s > 60) { m += Math.floor(s/60); s = s%60; }
|
||||
if(m > 60) { h += Math.floor(m/60); m = m%60; }
|
||||
if(h > 24) { h = h%24; }
|
||||
} else {
|
||||
if(s < 0) { m += Math.floor(s/60); s = 60+s%60; }
|
||||
if(m < 0) { h += Math.floor(m/60); m = 60+m%60; }
|
||||
if(h < 0) { h = 24+h%24; }
|
||||
}
|
||||
|
||||
if(h < 10) h = "0"+h;
|
||||
if(m < 10) m = "0"+m;
|
||||
if(s < 10) s = "0"+s;
|
||||
|
||||
var newTime = h+":"+m+":"+s;
|
||||
return newTime;
|
||||
}
|
||||
|
||||
function ExitButton(obj) {
|
||||
$(obj).each(function() {
|
||||
$(this).css("background", "transparent url(../e_image/button/exit0x26x25.png) no-repeat");
|
||||
$(this).mouseover(function () { $(this).css("background", "transparent url(../e_image/button/exit1x26x25.png) no-repeat" ); });
|
||||
$(this).mouseout(function () { $(this).css("background", "transparent url(../e_image/button/exit0x26x25.png) no-repeat"); });
|
||||
$(this).mousedown(function () { $(this).css("background", "transparent url(../e_image/button/exit2x26x25.png) no-repeat"); });
|
||||
$(this).mouseup(function () { $(this).css("background", "transparent url(../e_image/button/exit1x26x25.png) no-repeat"); });
|
||||
});
|
||||
}
|
||||
|
||||
function Button(obj, w) {
|
||||
$(obj).each(function() {
|
||||
$(this).css("background", "transparent url(../e_image/button/button0x"+w+"x20.png) no-repeat");
|
||||
$(this).mouseover(function () { $(this).css("background", "transparent url(../e_image/button/button1x"+w+"x20.png) no-repeat" ); });
|
||||
$(this).mouseout(function () { $(this).css("background", "transparent url(../e_image/button/button0x"+w+"x20.png) no-repeat"); });
|
||||
$(this).mousedown(function () { $(this).css("background", "transparent url(../e_image/button/button2x"+w+"x20.png) no-repeat"); });
|
||||
$(this).mouseup(function () { $(this).css("background", "transparent url(../e_image/button/button1x"+w+"x20.png) no-repeat"); });
|
||||
});
|
||||
}
|
||||
|
||||
function Disable(obj, w) {
|
||||
$(obj).each(function() {
|
||||
$(this).css("background", "transparent url(../e_image/button/button3x"+w+"x20.png) no-repeat");
|
||||
$(this).css("color", "#CCCCCC");
|
||||
$(this).css("font-style", "italic");
|
||||
$(this).css("cursor", "default");
|
||||
$(this).attr("disabled", "true");
|
||||
});
|
||||
}
|
||||
|
||||
function Enable(obj, w) {
|
||||
$(obj).each(function() {
|
||||
$(this).css("background", "transparent url(../e_image/button/button0x"+w+"x20.png) no-repeat");
|
||||
$(this).css("color", "#FFFFFF");
|
||||
$(this).css("font-style", "normal");
|
||||
$(this).css("cursor", "pointer");
|
||||
$(this).attr("disabled", "");
|
||||
});
|
||||
}
|
||||
|
||||
function Drag(obj) {
|
||||
var _ox = $(obj).offset().left;
|
||||
var _oy = $(obj).offset().top;
|
||||
|
||||
$(obj).attr("_x", 0);
|
||||
$(obj).attr("_y", 0);
|
||||
$(obj).attr("_ox", _ox);
|
||||
$(obj).attr("_oy", _oy);
|
||||
|
||||
$(obj).bind("dragstart", function(event) {
|
||||
$(this).attr("_x", $(this).scrollLeft());
|
||||
$(this).attr("_y", $(this).scrollTop());
|
||||
});
|
||||
|
||||
$(obj).bind("dragend", function(event) {
|
||||
$(this).attr("_x", $(this).scrollLeft());
|
||||
$(this).attr("_y", $(this).scrollTop());
|
||||
});
|
||||
|
||||
$(obj).bind("drag", function(event) {
|
||||
var _x = parseInt($(this).attr("_x"));
|
||||
var _y = parseInt($(this).attr("_y"));
|
||||
var _ox = parseInt($(this).attr("_ox"));
|
||||
var _oy = parseInt($(this).attr("_oy"));
|
||||
|
||||
$(this).scrollLeft(_x + _ox - event.offsetX);
|
||||
$(this).scrollTop(_y + _oy - event.offsetY);
|
||||
});
|
||||
}
|
||||
|
||||
function ScrollTo(obj, x, y) {
|
||||
var w = $(obj).width();
|
||||
var h = $(obj).height();
|
||||
|
||||
$(obj).scrollLeft(x - w/2);
|
||||
$(obj).scrollTop(y - h/2);
|
||||
}
|
||||
|
||||
function CheckIE6PNG() {
|
||||
if($.browser.msie == true && $.browser.version == "6.0") {
|
||||
DD_belatedPNG.fix(".png");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user