log 파일이 없을 때는 빈 텍스트를 리턴하도록
This commit is contained in:
+22
-1
@@ -3000,6 +3000,9 @@ function pushHistory($connect, $history) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function TrickLog($count, $skin) {
|
function TrickLog($count, $skin) {
|
||||||
|
if(!file_exists("logs/_tricklog.txt")){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
$fp = @fopen("logs/_tricklog.txt", "r");
|
$fp = @fopen("logs/_tricklog.txt", "r");
|
||||||
@fseek($fp, -$count*150, SEEK_END);
|
@fseek($fp, -$count*150, SEEK_END);
|
||||||
$file = @fread($fp, $count*150);
|
$file = @fread($fp, $count*150);
|
||||||
@@ -3011,6 +3014,9 @@ function TrickLog($count, $skin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function AllLog($count, $skin) {
|
function AllLog($count, $skin) {
|
||||||
|
if(!file_exists("logs/_alllog.txt")){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
$fp = @fopen("logs/_alllog.txt", "r");
|
$fp = @fopen("logs/_alllog.txt", "r");
|
||||||
@fseek($fp, -$count*300, SEEK_END);
|
@fseek($fp, -$count*300, SEEK_END);
|
||||||
$file = @fread($fp, $count*300);
|
$file = @fread($fp, $count*300);
|
||||||
@@ -3024,6 +3030,9 @@ function AllLog($count, $skin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function AuctionLog($count, $skin) {
|
function AuctionLog($count, $skin) {
|
||||||
|
if(!file_exists("logs/_auctionlog.txt")){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
$fp = @fopen("logs/_auctionlog.txt", "r");
|
$fp = @fopen("logs/_auctionlog.txt", "r");
|
||||||
@fseek($fp, -$count*300, SEEK_END);
|
@fseek($fp, -$count*300, SEEK_END);
|
||||||
$file = @fread($fp, $count*300);
|
$file = @fread($fp, $count*300);
|
||||||
@@ -3035,8 +3044,11 @@ function AuctionLog($count, $skin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function History($count, $skin) {
|
function History($count, $skin) {
|
||||||
|
if(!file_exists("logs/_history.txt")){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
$fp = @fopen("logs/_history.txt", "r");
|
$fp = @fopen("logs/_history.txt", "r");
|
||||||
@fseek($fp, -$count*300, SEEK_END);
|
@fseek($fp, -300*$count, SEEK_END); //
|
||||||
$file = @fread($fp, $count*300);
|
$file = @fread($fp, $count*300);
|
||||||
@fclose($fp);
|
@fclose($fp);
|
||||||
$log = explode("\r\n",$file);
|
$log = explode("\r\n",$file);
|
||||||
@@ -3048,6 +3060,9 @@ function History($count, $skin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function MyLog($no, $count, $skin) {
|
function MyLog($no, $count, $skin) {
|
||||||
|
if(!file_exists("logs/gen{$no}.txt")){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
$fp = @fopen("logs/gen{$no}.txt", "r");
|
$fp = @fopen("logs/gen{$no}.txt", "r");
|
||||||
@fseek($fp, -$count*300, SEEK_END);
|
@fseek($fp, -$count*300, SEEK_END);
|
||||||
$file = @fread($fp, $count*300);
|
$file = @fread($fp, $count*300);
|
||||||
@@ -3061,6 +3076,9 @@ function MyLog($no, $count, $skin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function MyBatRes($no, $count, $skin) {
|
function MyBatRes($no, $count, $skin) {
|
||||||
|
if(!file_exists("logs/batres{$no}.txt")){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
$fp = @fopen("logs/batres{$no}.txt", "r");
|
$fp = @fopen("logs/batres{$no}.txt", "r");
|
||||||
@fseek($fp, -$count*300, SEEK_END);
|
@fseek($fp, -$count*300, SEEK_END);
|
||||||
$file = @fread($fp, $count*300);
|
$file = @fread($fp, $count*300);
|
||||||
@@ -3074,6 +3092,9 @@ function MyBatRes($no, $count, $skin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function MyBatLog($no, $count, $skin) {
|
function MyBatLog($no, $count, $skin) {
|
||||||
|
if(!file_exists("logs/batlog{$no}.txt")){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
$fp = @fopen("logs/batlog{$no}.txt", "r");
|
$fp = @fopen("logs/batlog{$no}.txt", "r");
|
||||||
@fseek($fp, -$count*300, SEEK_END);
|
@fseek($fp, -$count*300, SEEK_END);
|
||||||
$file = @fread($fp, $count*300);
|
$file = @fread($fp, $count*300);
|
||||||
|
|||||||
+9
-9
@@ -50,7 +50,7 @@ if(!$token) {
|
|||||||
<head>
|
<head>
|
||||||
<title>장수생성</title>
|
<title>장수생성</title>
|
||||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||||
<link rel=stylesheet href=stylesheet.php type=text/css>
|
<link rel='stylesheet' href='stylesheet.php'>
|
||||||
<script type="text/javascript" src=<?="../e_lib/jquery-3.2.1.min.js";?>></script>
|
<script type="text/javascript" src=<?="../e_lib/jquery-3.2.1.min.js";?>></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
@@ -70,16 +70,16 @@ function updateToken(type) {
|
|||||||
location.replace("index.php");
|
location.replace("index.php");
|
||||||
//echo 'index.php';//TODO:debug all and replace
|
//echo 'index.php';//TODO:debug all and replace
|
||||||
} else {
|
} else {
|
||||||
$("#leader").text(data.leader);
|
$("#leader").val(data.leader);
|
||||||
$("#power").text(data.power);
|
$("#power").val(data.power);
|
||||||
$("#intel").text(data.intel);
|
$("#intel").val(data.intel);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
alert(jqXHR.status+", "+jqXHR.statusText+", "+jqXHR.responseText);
|
alert(jqXHR.status+", "+jqXHR.statusText+", "+jqXHR.responseText);
|
||||||
//location.replace("index.php");
|
location.replace("index.php");
|
||||||
echo 'index.php';//TODO:debug all and replace
|
//echo 'index.php';//TODO:debug all and replace
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -203,15 +203,15 @@ if($admin['img'] >= 1 && $member['grade'] >= 1 && $member['picture'] != "") {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=498 align=right id=bg1>통솔</td>
|
<td width=498 align=right id=bg1>통솔</td>
|
||||||
<td colspan=2><font id=leader><?=$abil['leader'];?></font></td>
|
<td colspan=2><input type="text" name="leader" id="leader" value="<?=$abil['leader'];?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=498 align=right id=bg1>무력</td>
|
<td width=498 align=right id=bg1>무력</td>
|
||||||
<td colspan=2><font id=power><?=$abil['power'];?></font></td>
|
<td colspan=2><input type="text" name="power" id="power" value="<?=$abil['power'];?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=498 align=right id=bg1>지력</td>
|
<td width=498 align=right id=bg1>지력</td>
|
||||||
<td colspan=2><font id=intel><?=$abil['intel'];?></font></td>
|
<td colspan=2><input type="text" name="intel" id="intel" value="<?=$abil['intel'];?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width=498 align=right id=bg1>능력치 조정</td>
|
<td width=498 align=right id=bg1>능력치 조정</td>
|
||||||
|
|||||||
+3
-2
@@ -1,16 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
include "lib.php";
|
include "lib.php";
|
||||||
include "func.php";
|
include "func.php";
|
||||||
|
require "../e_lib/util.php";
|
||||||
|
|
||||||
$id = $_POST['id'];
|
$id = $_POST['id'];
|
||||||
$pw = $_POST['pw'];
|
$pw = $_POST['pw'];
|
||||||
$name = $_POST['name'];
|
$name = $_POST['name'];
|
||||||
$name = _String::NoSpecialCharacter($name);
|
$name = _String::NoSpecialCharacter($name);
|
||||||
$pic = $_POST['pic'];
|
$pic = util::array_get($_POST['pic'],'');
|
||||||
$character = $_POST['character'];
|
$character = $_POST['character'];
|
||||||
|
|
||||||
$pwTemp = substr($pw, 0, 32);
|
$pwTemp = substr($pw, 0, 32);
|
||||||
|
$mylog = [];
|
||||||
$connect = dbConn("sammo");
|
$connect = dbConn("sammo");
|
||||||
|
|
||||||
//회원 테이블에서 정보확인
|
//회원 테이블에서 정보확인
|
||||||
|
|||||||
@@ -8,7 +8,11 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""
|
|||||||
$admin = MYDB_fetch_array($result);
|
$admin = MYDB_fetch_array($result);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$tmp_id = util::array_get($_SESSION['p_id'],0);
|
$tmp_id = util::array_get($_SESSION['p_id'],0);
|
||||||
|
//xxx:와 이게 뭐지
|
||||||
|
//TODO:p_id 관련 스킨 세팅 확인
|
||||||
|
|
||||||
|
|
||||||
$query = "select no,skin,con from general where user_id='$tmp_id'";
|
$query = "select no,skin,con from general where user_id='$tmp_id'";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
@@ -78,6 +82,8 @@ if($me['skin'] == 0) {
|
|||||||
$bg0 = "background-color:#ff88c4;"; $bg1 = "background-color:#cc66ff;"; $bg2 = "background-color:#f5a2ff;";
|
$bg0 = "background-color:#ff88c4;"; $bg1 = "background-color:#cc66ff;"; $bg2 = "background-color:#f5a2ff;";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header("Content-type: text/css");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
body { color:<?=$color;?>; background-color:<?=$backcolor;?>; border-width:1; border-color:gray; <?=$back;?> }
|
body { color:<?=$color;?>; background-color:<?=$backcolor;?>; border-width:1; border-color:gray; <?=$back;?> }
|
||||||
|
|||||||
Reference in New Issue
Block a user