Files
core/hwe/map_history.php
T
2018-04-05 02:24:46 +09:00

38 lines
702 B
PHP

<?php
namespace sammo;
$year = $_GET['year'];
$month = $_GET['month'];
$url = '/a_history.php';
if(!strpos($_SERVER['HTTP_REFERER'], $url)) {
exit(1);
}
if(!$year || !$month) {
exit(1);
}
include "lib.php";
include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$db = DB::db();
$connect=$db->get();
$query = "select map from history where year='$year' and month='$month'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$history = MYDB_fetch_array($result);
if(!$history['map']) {
exit(1);
}
$map = $history['map'];
$map = str_replace('<_quot_>', "'", $map);
$map = str_replace('<_dquot_>', '"', $map);
echo $map;