stylesheet 잘못 불러오는 문제 해결.

jquery.redirect 추가.
global 변수 extract 우회가 제대로 동작하지 않던 문제 해결
This commit is contained in:
2018-04-09 02:56:45 +09:00
parent 2a814dbbf9
commit 269a40ca9d
14 changed files with 216 additions and 26 deletions
+1
View File
@@ -20,6 +20,7 @@ if(!$v->validate()){
Error($v->errorStr());
}
$btn = Util::getReq('btn');
$minute = Util::getReq('minute', 'int');
$minute2 = Util::getReq('minute2', 'int');
+1 -1
View File
@@ -45,7 +45,7 @@ $(function(){
});
</script>
<link href="../d_shared/common.css" red="stylesheet">
<link href="../d_shared/common.css" rel="stylesheet">
<link href="css/normalize.css" rel="stylesheet">
<link href="css/common.css" rel="stylesheet">
<link href="css/map.css" rel="stylesheet">
+1 -1
View File
@@ -72,7 +72,7 @@ $(function(){
});
</script>
<link href="css/normalize.css" rel="stylesheet">
<link href="../d_shared/common.css" red="stylesheet">
<link href="../d_shared/common.css" rel="stylesheet">
<link href="css/common.css" rel="stylesheet">
<link href="css/map.css" rel="stylesheet">
+1 -1
View File
@@ -47,7 +47,7 @@ $me = MYDB_fetch_array($result);
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<title>내정보</title>
<link href="../d_shared/common.css" red="stylesheet">
<link href="../d_shared/common.css" rel="stylesheet">
<link rel=stylesheet href="css/common.css">
<script type="text/javascript">
function go(type) {
+30 -13
View File
@@ -694,9 +694,8 @@ function command_Single($turn, $command) {
}
$query = "update general set {$str} where owner='{$userID}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//echo "<script>location.replace('commandlist.php');</script>";
echo 'commandlist.php';//TODO:debug all and replace
header('location:commandlist.php');
}
function command_Chief($turn, $command) {
@@ -724,18 +723,36 @@ function command_Chief($turn, $command) {
}
function command_Other($turn, $commandtype) {
$db = DB::db();
$connect=$db->get();
echo "<form name=form1 action=processing.php method=post target=_parent>";
$count = count($turn);
for($i=0; $i < $count; $i++) {
echo "<input type=hidden name=turn[] value=$turn[$i]>";
$target = "processing.php?commandtype={$commandtype}";
foreach($turn as $turnItem){
$target.="&turn[]={$turnItem}";
}
echo "<input type=hidden name=commandtype value={$commandtype}>";
echo "</form>";
echo "a"; // 없으면 파폭에서 아래 스크립트 실행 안됨
echo "<script>form1.submit();</script>";
$target.="&".mt_rand();
?>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script>
parent.moveProcessing(<?=$commandtype?>, <?=Json::encode($turn)?>);
</script>
</head>
<body style="background-color:black;">
</body>
</html>
<?php
/*
<form name='form1' action='processing.php' method='post' target=_parent>
<?php foreach($turn as $turnItem): ?>
<input type='hidden' name='turn[]' value='<?=$turnItem?>'>
<?php endforeach; ?>
<input type=hidden name=commandtype value=<?=$commandtype?>>
</form>&nbsp;
<script>*/
}
+3 -2
View File
@@ -68,6 +68,7 @@ $scenario = $admin['scenario_text'];
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script src="../e_lib/jquery-3.2.1.min.js"></script>
<script src="../e_lib/jquery.redirect.js"></script>
<script src="../d_shared/common_path.js"></script>
<script src="js/common.js"></script>
<script src="js/main.js"></script>
@@ -81,7 +82,7 @@ $(function(){
});
</script>
<link href="css/normalize.css" rel="stylesheet">
<link href="../d_shared/common.css" red="stylesheet">
<link href="../d_shared/common.css" rel="stylesheet">
<link href="css/common.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link href="css/map.css" rel="stylesheet">
@@ -223,7 +224,7 @@ if ($session->userGrade >= 5) {
<td width=698 height=520 colspan=2>
<?=getMapHtml()?>
</td>
<td width=298 rowspan=4><iframe name=commandlist src='commandlist.php' width=298 height=700 frameborder=0 marginwidth=0 marginheight=0 topmargin=0 scrolling=no></iframe></td>
<td width=298 rowspan=4><iframe seamless="seamless" sandbox="allow-same-origin allow-top-navigation allow-forms allow-scripts" name=commandlist src='commandlist.php' width=298 height=700 frameborder=0 marginwidth=0 marginheight=0 topmargin=0 scrolling=no></iframe></td>
</tr>
<form name=form2 action=preprocessing.php method=post target=commandlist>
<tr>
+1 -1
View File
@@ -31,7 +31,7 @@ $connect=$db->get();
<head>
<title>장수생성</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link href="../d_shared/common.css" red="stylesheet">
<link href="../d_shared/common.css" rel="stylesheet">
<link rel='stylesheet' href="css/common.css">
<script type="text/javascript" src="../e_lib/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/join.js"></script>
+5
View File
@@ -39,6 +39,11 @@ function refreshing(obj, arg1, arg2) {
}
}
function moveProcessing(commandtype, turn){
console.log(commandtype, turn);
$.redirect("processing.php",{ commandtype: commandtype, turn: turn}, 'post');
}
function go(type) {
if(type == 1) location.replace('b_nationboard.php');
else if(type == 2) location.replace('b_troop.php');
+12 -2
View File
@@ -102,13 +102,23 @@ function extractSuperGlobals()
if (isset($_POST) && count($_POST) > 0) {
LogText($_SERVER['REQUEST_URI'], $_POST);
extract($_POST, EXTR_SKIP);
foreach($_POST as $key=>$val){
if(isset($GLOBALS[$key])){
continue;
}
$GLOBALS[$key]=$val;
}
}
if (isset($_GET) && count($_GET) > 0) {
LogText($_SERVER['REQUEST_URI'], $_GET);
extract($_POST, EXTR_SKIP);
foreach($_GET as $key=>$val){
if(isset($GLOBALS[$key])){
continue;
}
$GLOBALS[$key]=$val;
}
}
}
+1
View File
@@ -11,6 +11,7 @@ $db = DB::db();
$connect=$db->get();
$turn = Util::getReq('turn', 'array_int');
$sel = Util::getReq('sel', 'int');
$commandtype = Util::getReq('commandtype', 'int');
increaseRefresh("턴입력", 1);
+5 -2
View File
@@ -4,6 +4,10 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
$commandtype = Util::getReq('commandtype', 'int', 0);
$turn = Util::getReq('turn', 'array_int', [0]);
$session = Session::requireGameLogin()->setReadOnly();
$db = DB::db();
@@ -120,7 +124,6 @@ function starter($name, $type=0) {
<script src="../e_lib/jquery-3.2.1.min.js"></script>
<script src="../d_shared/common_path.js"></script>
<script src="js/common.js"></script>
<script src="js/main.js"></script>
<script src="js/base_map.js"></script>
<script src="js/map.js"></script>
<script>
@@ -139,7 +142,7 @@ $(function(){
});
</script>
<link href="css/normalize.css" rel="stylesheet">
<link href="../d_shared/common.css" red="stylesheet">
<link href="../d_shared/common.css" rel="stylesheet">
<link href="css/common.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link href="css/map.css" rel="stylesheet">
+2 -2
View File
@@ -19,7 +19,7 @@ class RegNPC extends \sammo\Event\Action{
int $death = 300,
$ego = null,
string $char = '',
string $text = ''
$text = ''
){
$this->npc = new \sammo\Scenario\NPC(
$affinity,
@@ -34,7 +34,7 @@ class RegNPC extends \sammo\Event\Action{
$death,
$ego,
$char,
$text
$text?:''
);
}
+1 -1
View File
@@ -23,7 +23,7 @@ class EventHandler{
$resultAction = [];
foreach($this->actions as $action){
$resultAction[] = $action->run();
$resultAction[] = $action->run($env);
}
$result['action'] = $resultAction;