代码拉取完成,页面将自动刷新
同步操作将从 夕伽/phaser-games 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
require_once dirname ( __FILE__ ) . '/services/GsStatisticsService.class.php';
if(isset($_GET['game'])) {
$game = $_GET['game'];
if($game != "flappybird" &&
$game != "getogether" &&
$game != "plane" &&
$game != "weiduan") {
exit(0);
} else {
$gameName = $game;
if($gameName == "weiduan") {
if(isset($_GET['id'])) {
$gameName = $gameName . "_" . $_GET['id'];
} else {
$gameName = $gameName . "_1";
}
}
$gsStatisticsService = new GsStatisticsService();
$ip = $_SERVER['REMOTE_ADDR'];
$gs = $gsStatisticsService->selectByGameAndIp($gameName, $ip);
if(count($gs) == 0) {
$gsStatisticsService->add($gameName, $ip, 1);
} else {
$count = $gs[0]['count'] + 1;
$gsStatisticsService->updateCount($count, $gs[0]['id']);
}
}
} else {
exit(0);
}
?>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="renderer" content="webkit">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title><?php echo $game;?></title>
<script src="phaser.min.js"></script>
<script type="text/javascript">
var GAME = "<?php echo $game;?>";
</script>
<?php
include_once 'partials/' . $game . '/script.php';
?>
<style type="text/css">
body {
margin: 0;
padding: 0;
}
canvas {
margin: 0 auto;
}
<?php
include_once 'partials/' . $game . '/css.php';
?>
</style>
</head>
<body>
<?php
include_once 'partials/' . $game . '/body.php';
?>
</body>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。