📄 game.php
字号:
<?php
$forumid=120;
//不得修改下面信息,谴责修改版权!
// writeby 快乐的流星 所有 http://www.ofstar.com/bbs 你可以使用或修改本程序,请不要去掉版权标志 我的QQ 是 75598993
//注意由于考虑到程序效率很简单方面,游戏的管理员就是DJ管理员和总坛主
require("global.php");
require("userdata/style.php");
require("header.php");
echo"$headertp";
headguide("您现在正处在 <?=$bbs_title?><br>娱乐园中心","<a href='club.php'>娱乐园</a>","<a href='game.php?action=pay'>游戏殿堂</a>");
if ($login_status==0) {
msg_box('登陆游戏','<br>状态:发生错误,您还没有登录<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="login.php">现在登录</li></ul>');
require("footer.php");
echo"$footertp";
exit;
}
include("bbsdata/dj_user.php");
if (($dj_user && in_array($username,$dj_user)) || $username==$manager) {$manage="<a href=game.php?action=mgame><font color=red>付费游戏管理入口</font></a>";
$managefree="<a href=game.php?action=mgamefree><font color=red>免费游戏管理入口</font></a>";
$delname=删除;}
?>
<script>
function popwin2(id)
{ window.open("games.php?gamenub="+id,"","height=550,width=600,resizable=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no");
}
function op(s)
{ window.open(""+s,'','resizable=1,scrollbars=1,status=no,menubar=no,toolbar=no,location=no,width=666,height=500,menu=no','fullscreen,scrollbars' );
};
</script>
<?php
$ofstarwidth=$tablewidth/4;
$userin=explode("|",readfromfile("$userpath/$username.php"));
$usericon=get_user_portait($userin[3]);
if($userin[24]>50)$say="银子这么多,不玩游戏拿来做啥?";
elseif($userin[24]>0 && $userin[24]<=50 )$say="银子不是很多啊,省点花啊^_^";
else
$say="搞没搞错,欠债了还来这干嘛,给我去打工去!灌水!";
if(!$action)$action=pay;
if($action==free){?>
<div align="center"><center>
<table border="1" cellspacing="1" width=<?=$tablewidth?> height="11" bordercolorlight="#FFFFFF"
bgcolor=<?=$titlecolor1?> bordercolor="#FFFFFF" bordercolordark="#FFFFFF">
<tr>
<td width="273" height="11" align="center"><a href="game.php?action=free"><b>免费专区</b></a></td>
<td width="274" height="11" align="center"><b><a href="game.php?action=pay"><font color="red"><b>付费专区</b></font></a></td>
</tr>
</table>
</center></div><div align="center"><center>
<table align="center" border="0" cellPadding="0" cellSpacing="0" width=<?=$tablewidth?>>
<tr>
<td vAlign="top" width="672"><table bordercolor=<?=$background_color?> border="0" cellPadding="0"
cellSpacing="0" width="100%">
<TBODY>
<tr>
<td height="507" vAlign="top" width="85%"><table border="0" cellPadding="0"
cellSpacing="4" width="100%">
<TBODY>
<tr>
<td height="17" align=center><b><?=$username?> 你还有<?=$userin[24]?><?=$bbs_money?>,<?=$say?> 这里是免费版块尽情玩吧 </b> <?=$managefree?></td>
</tr>
</TBODY>
</table>
<table border="0" cellPadding="0" cellSpacing="0" width="100%">
<TBODY>
<tr>
<td height="339" vAlign="top"><div align="center"><center><table border="0"
cellPadding="0" cellSpacing="4" width=<?=$tablewidth?>>
<?php
$ofstar=file("userdata/game/gamefree.dat");
$count=count($ofstar);
for($j=0;$j<$count;$j=$j+4){
echo"<tr>";
for($i=$j;$i<$j+4;$i++){
$detail=explode("|", trim($ofstar[$i]));
if(!$ofstar[$i])
break;
echo"<td height=11 width=$ofstarwidth align=center><a href=javascript:op(\"$detail[0]\");>
<img border=0 height=106 src=$detail[1] width=139></a></td>";
}
echo"</tr><tr>";
for($i=$j;$i<$j+4;$i++){
$detail1=explode("|", trim($ofstar[$i]));
if(!$ofstar[$i])
break;
echo"<td height=11 width=$ofstarwidth align=center><p align=center><a href=javascript:op(\"$detail1[0]\");>$detail1[2]</a> <a href=game.php?action=mgamefree&job=del&id=$i><font color=red>$delname</font></a></p></td>";
}
echo"</tr>";}
?>
</table>
</center></div></td>
</tr>
</TBODY>
</table>
</td>
</tr>
</TBODY>
</table>
</td>
</tr>
</table>
</center></div>
<?}
if($action==pay){
?>
<div align="center"><center>
<table border="1" cellspacing="1" width=<?=$tablewidth?> height="11" bordercolorlight="#FFFFFF"
bgcolor=<?=$titlecolor1?> bordercolor="#FFFFFF" bordercolordark="#FFFFFF">
<tr>
<td width="273" height="11" align="center"><a href="game.php?action=free"><font color="red"><b>免费专区</b></font></a></td>
<td width="274" height="11" align="center"><b><a href="game.php?action=pay"><b>付费专区</b></a></td>
</tr>
</table>
</center></div><div align="center"><center>
<table align="center" border="0" cellPadding="0" cellSpacing="0" width=<?=$tablewidth?>>
<tr>
<td vAlign="top" width="672"><table bordercolor=<?=$background_color?> border="0" cellPadding="0"
cellSpacing="0" width="100%">
<TBODY>
<tr>
<td height="507" vAlign="top" width="85%"><table border="0" cellPadding="0"
cellSpacing="4" width="100%">
<TBODY>
<tr>
<td height="17" align=center><b><?=$username?> 你还有<?=$userin[24]?><?=$bbs_money?>,<?=$say?></b> <?=$manage?></td>
</tr>
</TBODY>
</table>
<table border="0" cellPadding="0" cellSpacing="0" width="100%">
<TBODY>
<tr>
<td height="339" vAlign="top"><div align="center"><center><table border="0"
cellPadding="0" cellSpacing="4" width=<?=$tablewidth?>>
<?php
$ofstar=file("userdata/game/game.dat");
$count=count($ofstar);
for($j=0;$j<$count;$j=$j+4){
echo"<tr>";
for($i=$j;$i<$j+4;$i++){
$detail=explode("|", trim($ofstar[$i]));
if(!$ofstar[$i])
break;
echo"<td height=11 width=$ofstarwidth align=center><a href=javascript:popwin2($detail[3]);>
<img border=0 height=106 src=$detail[1] width=139></a></td>";
}
echo"</tr><tr>";
for($i=$j;$i<$j+4;$i++){
$detail1=explode("|", trim($ofstar[$i]));
if(!$ofstar[$i])
break;
echo"<td height=11 width=$ofstarwidth align=center><p align=center><a href=javascript:popwin2($detail1[3]);>$detail1[2]</a> <a href=game.php?action=mgame&job=del&id=$i><font color=red>$delname</font></a></p></td>";
}
echo"</tr>";}
?>
</table>
</center></div></td>
</tr>
</TBODY>
</table>
</td>
</tr>
</TBODY>
</table>
</td>
</tr>
</table>
</center></div>
<?}
if($action==mgame){
$check_user=0;
if (($dj_user && in_array($username,$dj_user)) || $username==$manager)
$check_user=1;
if ($check_user==0) {
$title="您没有权利进行操作,请您以合适的身份登录";
$content="<ul><br><br><li><a href=\"javascript:history.back(1)\">返回前页</a></li><br><br><li><a href=game.php?action=pay>回到游戏</a></li><br><br></ul>";
msg_box($title,$content);
require("footer.php");echo"$footertp";
exit;
}
if ($job=="del"){
if(!$flag){
$title="确认继续吗?";
$content="<ul><br><br><li><a href=\"javascript:history.back(1)\">返回前页</a></li><br><br><li><a href=game.php?action=mgame&job=del&flag=2&id=$id>确认删除</a></li><br><br></ul>";
msg_box($title,$content);
require("footer.php");echo"$footertp";
}else{
$notelist=file("userdata/game/game.dat");
unset($notelist[$id]);
$notelist=implode("",$notelist);
$f=fopen("userdata/game/game.dat","w");
fputs($f,$notelist);
jump_page("game.php?action=pay","删除成功","游戏已经成功删除! <br><br>程式已经为您自动登录<br><br>如果程式无法登陆首页请点击这<br><ul><li><a href=game.php>点击这里进入管理</a></li></ul>");
}
exit;
}
if ($job=="add"){
?>
<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
<TR>
<TD bgColor=<?=$titlecolor?> height=27><B class=title>◆
</B><FONT color=<?=$titlefontcolor?>>这是<?=$bbs_title?>游戏管理程式,管理员<?=$username?>(ofstar程式)</FONT></TD></TR></table>
<table width=<?=$tablewidth?> border=0 cellspacing=1 cellpadding=5 bgcolor=F0F0F0 align=center>
<tr bgcolor=FFFFFF><td width="30%">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -