📄 action.php
字号:
$article=implode("",$txt);
$f = fopen("userdata/xuni/$username.php","w");
fputs($f,$article);
jump_page("facedata.php",'感谢您使用由流星提供的'.$bbs_title.'虚拟形象。形象成功充值,并可以使用!');
}//2
}//0
jump_page("facedata.php",'非常抱歉,你没有这件形象!请核对后再来');
}
if ($action=="deleteface")
{
$txt=file("userdata/xuni/$username.php");
$indext=count($txt);
for($i=0;$i<$indext;$i++)
{//0
$detail=explode("|",$txt[$i]);
if ($detail[3]==$classid && $detail[4]==$id)
{//2
if($detail[8]==1)
jump_page("facedata.php",'非常抱歉,由于种种原因,你暂时不能删除此商品!请核对后再来');
unset($txt[$i]);
$txt=implode("",$txt);
$f=fopen("userdata/xuni/$username.php","w");
fputs($f,$txt);
fclose($f);
jump_page("facedata.php",'感谢您使用由流星提供的'.$bbs_title.'虚拟形象。形象成功永久删除!');
}//2
}//0
jump_page("facedata.php",'非常抱歉,你没有这件形象!请核对后再来');
}
if($adminfacepic==adminface)
{
set_time_limit(0);
$username=$HTTP_COOKIE_VARS['ftbadminid'];
$password=$HTTP_COOKIE_VARS['ftbadminpwd'];
if (file_exists("bbsdata/manager.php")) include("bbsdata/manager.php");
else die("超级用户设置错误,请重新运行安装程式");
if ($username!=$manager || $password!=$manager_pwd) {
header("Location: admin.php");
exit;
}
$xunilist=file("userdata/xuni/yifu.dat");
if($ofstarstep==del)
{
unset($xunilist[$id]);
$xunilist=implode("",$xunilist);
writetofile("userdata/xuni/yifu.dat",$xunilist);
jump_page("action.php?adminfacepic=adminface",'成功删除一条虚拟形象信息');
}
require("userdata/style.php");
require("header.php");echo"$headertp";
headguide("您现在正处在 $bbs_title<br>虚拟形象管理中心","<a href='action.php?adminfacepic=adminface'>虚拟形象管理</a>","<a href='facepic.php'>购买虚拟形象</a>");
?>
<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
<TR>
<TD bgColor=<?=$titlecolor?> height=27><B class=title>-=>
</B><FONT color=<?=$titlefontcolor?>>欢迎您,<?=$username?>,切记您上传的图片文件名和你要修改/添加的文件名一致!</FONT></TD></TR></table>
<table width=<?=$tablewidth?> border=0 cellspacing=1 cellpadding=5 bgcolor=F0F0F0 align=center>
<tr bgcolor=FFFFFF><td>
现有形象列表:<a href="action.php?adminfacepic=adminface&ofstarstep=add"><font color="red">添加虚拟形象</font></a><br>
在你管理之前请先看说明:(1)各个商品数字代号都不一样(2)类别必须与你图片文件的目录同名(3)名称简介不要太长(4)耐用度100代表可以10天(5)适用人群t代表任意m代表男f代表女(6)图片分两种,一种是拿来卖的,一种是拿来穿的(7)删除后要避免数字代号重复!
<table width=100% border=0 cellspacing=1 cellpadding=5>
<?
if(!$ofstarstep)
{
echo "<tr bgcolor=$article_color2><td> 数字代号</td><td> 所属类别</td><td> 名称</td><td> 简介</td><td> 价格</td><td> 耐用度</td>
<td> 适用人群</td><td> 图片文件名(穿)</td><td> 图片文件名(卖)</td><td width=60>编辑区</td></tr>";
for ($i=0; $i<count($xunilist); $i++) {
$detail=explode("|", trim($xunilist[$i]));
$no=$i+1;
$color=$article_color1;
if ($no%2==0) $color=$article_color2;
echo "<tr bgcolor=$color><td>$detail[0]</td><td>$detail[1] </td><td>$detail[2] </td><td> $detail[4] </td><td>$detail[3] </td><td>$detail[5] </td>
<td>$detail[6] </td><td>$detail[7] </td><td>$detail[8] </td><td width=60><a href=action.php?adminfacepic=adminface&ofstarstep=modiy&lineid={$i}>编辑</a>==<a href=action.php?adminfacepic=adminface&ofstarstep=del&id=$i>删除</a></td></tr>";
}
}
if($ofstarstep==modiy)
{
$detail=explode("|",$xunilist[$lineid]);
if(!$step)
{
print <<<EOT
<form action="action.php?adminfacepic=adminface&ofstarstep=modiy&lineid=$lineid" method="post">
<tr bgcolor=$article_color2><td>数字代号<input type=text size=4 maxlength=4 name="daihao" value="$detail[0]" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>所属类别<input type=text size=4 maxlength=20 name="leibie" value="$detail[1]" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>名称 <input type=text size=15 maxlength=20 name="name" value="$detail[2]" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>简介 <input type=text size=15 maxlength=20 name="jianjie" value="$detail[4]" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>价格 <input type=text size=4 maxlength=20 name="jiage" value="$detail[3]" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>耐用度 <input type=text size=4 maxlength=20 name="naiyong" value="$detail[5]" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>适用人群 <input type=text size=4 maxlength=20 name="shiyong" value="$detail[6]" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>图片文件名(穿) <input type=text size=8 maxlength=20 name="filename" value="$detail[7]" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>图片文件名(卖) <input type=text size=8 maxlength=20 name="xfilename" value="$detail[8]" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td><input type=hidden value=2 name=step><input type=submit value="修改" style="height:20px;background-color:#f3f3f3;border:1 solid black" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'"></td>
</form>
EOT;
}
else
{
$xunilist[$lineid]="$daihao|$leibie|$name|$jiage|$jianjie|$naiyong|$shiyong|$filename|$xfilename||\n";
$xunilist=implode("",$xunilist);
$f=fopen("userdata/xuni/yifu.dat","w");
fputs($f,$xunilist);
jump_page("action.php?adminfacepic=adminface",'成功修改虚拟形象信息');
}
}
if($ofstarstep==add)
{
if(!$step)
{
print <<<EOT
<form action="action.php?adminfacepic=adminface&ofstarstep=add" method="post">
<tr bgcolor=$article_color2><td>数字代号<input type=text size=4 maxlength=4 name="daihao" value="" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>所属类别<input type=text size=4 maxlength=20 name="leibie" value="" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>名称 <input type=text size=15 maxlength=20 name="name" value="" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>简介 <input type=text size=15 maxlength=20 name="jianjie" value="" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>价格 <input type=text size=4 maxlength=20 name="jiage" value="" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>耐用度 <input type=text size=4 maxlength=20 name="naiyong" value="" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>适用人群 <input type=text size=4 maxlength=20 name="shiyong" value="" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>图片文件名(穿) <input type=text size=8 maxlength=20 name="filename" value="" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td>图片文件名(卖) <input type=text size=8 maxlength=20 name="xfilename" value="" style="background-color:#FEFEFF; color:#FF90CD; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
<td><input type=hidden value=2 name=step><input type=submit value="添加" style="height:20px;background-color:#f3f3f3;border:1 solid black" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'"></td>
</form>
EOT;
}
else
{
//$xunilist=explode("\n",$xunilist);
$count=count($xunilist);
for($i=0;$i<$count;$i++)
{
$detail=explode("|",$xunilist[$i]);
echo $leibie;
if($leibie==$detail[1])
{
$midyifu.=$xunilist[$i];
}
else
$headyifu.=$xunilist[$i];
}
$writexiu="$daihao|$leibie|$name|$jiage|$jianjie|$naiyong|$shiyong|$filename|$xfilename||\n";
$xunilistall=$headyifu.$midyifu.$writexiu;
writetofile("userdata/xuni/yifu.dat",$xunilistall);
jump_page("action.php?adminfacepic=adminface",'成功添加虚拟形象信息');
}
}
?>
</table>
</td></tr></table>
<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
<TR>
<TD bgColor=<?=$titlecolor?> height=27></TD></TR></table>
<?
require("footer.php");echo"$footertp";
exit;
}
if($votejob==vote)
{
if (empty($forumid) || empty($filename) || !file_exists("{$idpath}forum$forumid/$filename.sta")) exit;
get_forum_info();
$add_title=" > 投票程式";
$sta_data=explode("\n",readfromfile("{$idpath}forum$forumid/$filename.sta"));
if (strpos($sta_data[0],"|$username|")!==false) exit;
$oldlist=explode("\n",readfromfile("{$idpath}forum$forumid/list.php"));
$count=count($oldlist);
for ($i=0; $i<$count; $i++ ) {
$detail = explode("|", $oldlist[$i]);
if ($detail[5]==$filename) {
if ($detail[9]==1) { include("header.php");echo"$headertp"; print_bar_vote("投票失败"); print_error(); require("footer.php");echo"$footertp"; exit;}
$new=$detail;
unset($oldlist[$i]);
break;
}
}
$oldlist=implode("\n",$oldlist);
$t_now=$timestamp;
$details=explode(",",$detail[8]);
$new[8]=$details[0].",".$details[1].",".$t_now;
$new=implode("|",$new)."\n";
writetofile("{$idpath}forum$forumid/list.php",push_heldtopics($new.$oldlist));
//$sta_data[0]=str_replace("\n","",str_replace("\r","",$sta_data[0]));
//$sta_data[1]=str_replace("\n","",str_replace("\r","",$sta_data[1]));
$sta_data[0].="$username|";
$detail=explode("|",$sta_data[1]);
if (!empty($detail[$mychoice])) {
list($name,$value)=explode(",",$detail[$mychoice]);
$value++;
$detail[$mychoice]="$name,$value";
}
$sta_data[1]=implode("|",$detail);
writetofile("{$idpath}forum$forumid/$filename.sta",$sta_data[0]."\n".$sta_data[1]);
jump_page("read.php?forumid=$forumid&filename=$filename","投票成功");
function print_error() {
msg_box('发生错误','<br>
投票程式发生了错误,情况:<br>
<br>
这个主题已经被管理员锁住,所以您不可以再回复或者投票<br>
<ul>
<li><a href="javascript:history.back(1)">返回前一页</a></li>
</ul><br>');
}
function print_bar_vote($reason) {
global $forumname;
headguide("您现在正处在<br>$forum_name<br>的投票程式中",
"<a href='thread.php?forumid=$forumid'>$forum_name</a>",
"$reason");
}
}
if($buyjob==buy)
{
get_forum_info();
if (!file_exists("$userpath/$buyer.php")||!file_exists("{$idpath}forum$forumid/$filename")||$buyer!=$username||$buyer==$seller||$sellmoney>100||$sellmoney<0) {
msg_box('购买贴子','<br>状态:发生错误,不要黑我啊<br><ul><li><a href="javascript:history.go(-1)">返回前页</a></li><br><li><a href="login.php">现在登录</li></ul>');
exit;
}
if (!file_exists("$userpath/$seller.php")) {
msg_box('购买贴子','<br>状态:发生错误,出售贴子的人已经注销了~<br><ul><li><a href="javascript:history.go(-1)">返回前页</a></li><br><li><a href="login.php">现在登录</li></ul>');
exit;
}
$useri=get_user_info($buyer);
$userii=get_user_info($seller);
if($useri[24]<$sellmoney) {
msg_box('购买贴子','<br>状态:有没有搞错,你的哪来那么多钱???多灌点水吧,要不就去赌馆碰碰运气~<br><ul><li><a href="javascript:history.go(-1)">返回前页</a></li><br><li><a href="login.php">重新登录</li></ul>');
exit;
}
$useri[24]=$useri[24]-$sellmoney;
$uu=implode('|',$useri);
writetofile("$userpath/$buyer.php",$uu);
$userii[24]=$userii[24]+$sellmoney;
$uuu=implode('|',$userii);
writetofile("$userpath/$seller.php",$uuu);
$articlelist=file("{$idpath}forum$forumid/$filename");
$article=0;
list($articletitle,$author,$articlecontent,$time,$area,$usericon,$p,$rvrc,$pfuser,$buyers)=explode("|",$articlelist[$article]);
$file_line=array($articletitle,$author,$articlecontent,$time,$area,$usericon,$p,$rvrc,$pfuser,$buyers);
$file_line[9]=$buyers.",".$buyer;
$articlelist[$article]=implode("|",$file_line)."|\n";
$articlelist=implode("",$articlelist);
writetofile("{$idpath}forum$forumid/$filename",$articlelist);
jump_page("read.php?forumid=$forumid&filename=$filename","购买帖子成功");
}
if($starwwjob==starww)
{
require("globalpost.php");
get_forum_info();
$check_user=0;
if ($login_status==1 && $username==$manager) $check_user=1;
if ($login_status==1 && $check_user==0 && file_exists("bbsdata/admin.php")) {
$adminlist=file("bbsdata/admin.php");
$admincount=count($adminlist);
for ($i=0; $i<$admincount; $i++) {
$detail=explode("|", str_replace("\n","", $adminlist[$i]));
if ($detail[0]==$forumid && $detail[1]==$username) $check_user=1;
}
}
//check
if (file_exists("bbsdata/superadmin.php")) {
include("bbsdata/superadmin.php");
if ($login_status==1 && $superadmin && in_array($username,$superadmin)) {
$check_user=1;
}
}
//----让增加的管理员有权管理!
if ($check_user==0) {
$status="您没有权利进行操作,请您以合适的身份登录(管理员,斑竹)";
include("header.php");echo"$headertp";
print_bar();
print_err();
require("footer.php");echo"$footertp";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -