📄 vip.php
字号:
<?
//程序:快乐的流星QQ 75598993 http://www.ofstar.com/bbs 欢迎光临我的网站,有什么来我论坛提问,高手常在
require("userdata/style.php");
require("global.php");
include("bbsdata/level.php");
$minatc=10;
$minww=10;
$minaverage=1;
if (empty($action)) $action="new";
//****************************
if ($action=="pass")
{//0
if ($login_status!=1 || (($superadmin && !in_array($username,$superadmin)) && $username!=$manager)) {
include("header.php");echo"$headertp";
headguide("你正处在<br>{$site_name}<br>的{$rztitle}申请程式中","{$rztitle}申请表");
msg_box('对不起!!','<center>此操作是非法操作!!或是你不是总坛主,请你不要乱来!!<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="login.php">现在登录</li></ul></center>');
require("footer.php");echo"$footertp";
exit;}
global $userid;
$tbuserfile="bbsdata/tbuser.php";
include($tbuserfile);
$count=count($tbuser);
$tbuser[$count]=$userid;
for ($i=0; $i<=$count; $i++) {
$tbuser2.="\$tbuser[$i]='$tbuser[$i]';\n";
}
$tbuser1="<?\n";
$tbuser3="$tbuser1"."$tbuser2";
writetofile("$tbuserfile","$tbuser3");
if (file_exists("userdata/lxvip/$filename"))
{//2
$p_admin==0;
if($login_status==1 && $username==$manager) { $p_admin=1;}
if (file_exists("bbsdata/superadmin.php"))
{//3
include("bbsdata/superadmin.php");
if ($login_status==1 && $superadmin && in_array($username,$superadmin)) {$p_admin=1;}
}//3
$useri=explode("|",readfromfile("userdata/lxvip/$filename"));
$useri[11]="$username";
$lx=implode("|",$useri);
writetofile("userdata/lxvip/$filename",$lx);
}//2
postmsg($useri[0],"$username 同意你的申请","感谢你对流星论坛的支持。<br>希望您能介绍更多的人来到我们论坛!!请记住超过15天不来的将去除您{$rztitle}的头衔,不过可以请假^_^");
jump_page("vip.php?action=list","成功添加了 1 名{$rztitle},现在返回申请表列表");exit;
}//0
//******************************
if ($action=="del") {
require("header.php");echo"$headertp";
list($user,$work,$useremail,$qq,$times,$formlove,$jianyi,$huiyuan,$asktime,$yes,$no,$ok)
= explode("|",readfromfile("userdata/lxvip/$filename"));
$check=0;
if ($username==$manager) $check=1;
if ($check!=1|| empty($filename)) {
headguide("你正处在<br>{$site_name}<br>的{$rztitle}申请程式中","{$rztitle}申请表");
msg_box('对不起!!','<center>此操作是非法操作!!或是你不是总坛主,请你不要乱来!!<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="login.php">现在登录</li></ul></center>');
require("footer.php");echo"$footertp";
exit;}
if(file_exists("userdata/lxvip/list.php")){
$form_list=file("userdata/lxvip/list.php");
$form_count=count($form_list);
$form_file=fopen("userdata/lxvip/list.php","w");
for($i=0;$i<$form_count;$i++){
if($i!=$fid) fputs($form_file,$form_list[$i]);}
fclose($form_file);
if (file_exists("userdata/lxvip/$filename")) unlink("userdata/lxvip/$filename");
jump_page("vip.php?action=list","申请表删除成功",
"<b>成功删除了{$rztitle}申请表</b><br><br>
你现在可以选择:<br><ul><li><a href='vip.php'>返回申请表列表</a></li>
<br><br><li><a href='index.php'>返回论坛首页</a></li></ul>");
require("footer.php");echo"$footertp";
exit;}}
//****************************************
if ($action==agree) flouer();
//投票啊
if ($action==object) egg();
if (file_exists("bbsdata/admin.php")) {
$adminlist=file("bbsdata/admin.php");
$count=count($adminlist);
for ($i=0; $i<$count; $i++) {
$detail=explode("|", trim($adminlist[$i]));
$forum_admin[]=$detail[1];}}
if ($login_status !=1) {
require("header.php");echo"$headertp";
headguide("你正处在<br>{$bbs_title}的{$rztitle}申请程式中","{$rztitle}申请表");
msg_box('对不起!!','<center>你还没有登陆,暂时不能使用本功能!!<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="login.php">现在登录</li></ul></center>');
require("footer.php");echo"$footertp";
exit;}
//*************************************************************************************
if ($action=="show") {
global $userpath,$filename;
require("header.php");echo"$headertp";
headguide("你正处在<br>{$bbs_title}的{$rztitle}申请表中","<a href=vip.php>申请表列表</a>","申请表资料");
show_form();
require("footer.php");echo"$footertp";
exit;
}
//*************************************************************************************
if ($action=="new") {
require("header.php");echo"$headertp";
headguide("你正处在<br>{$bbs_title}的{$rztitle}申请表中","<a href=vip.php?action=list>申请表列表</a>","{$site_name}{$rztitle}申请资料");
if (file_exists("bbsdata/tbuser.php")) {
include("bbsdata/tbuser.php");
if ($tbuser && in_array($username,$tbuser)){
msg_box(非常抱歉!!,'<center>您已经是{$rztitle}了。请不要重复申请!,<br><br><a href="javascript:history.back(1)">返回前页</a><br><br><a href="index.php">返回首页<br><br><a href="vip.php?action=list">点击查看会员申请列表<br><br></center>');
require("footer.php");echo"$footertp";
exit;}}
global $username,$userpath;
if (empty($step)) {
write_form();
require("footer.php");echo"$footertp";
exit;
}
elseif($step==2) {
if(empty($times) ||empty($work) ||empty($qq) ||empty($jianyi)||empty($huiyuan)){
msg_box('对不起!!','<center>要填的资料你还没有填好,<font color=red>*</font>为必填项目!!<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="index.php">返回首页</li></ul></center>');
require("footer.php");echo"$footertp";
exit;}
$work=safe_convert($work);
$useremail=safe_convert($useremail);
$qq=safe_convert($qq);
$times=safe_convert($times);
$formlove=safe_convert($formlove);
$jianyi=safe_convert($jianyi);
$huiyuan=safe_convert($huiyuan);
global $username;
if (file_exists("userdata/lxvip/list.php")) {
$filelx=readfromfile("userdata/lxvip/list.php");
$filename=nextfilename($filelx);}
else $filename="f_1";
$newlist="$username|$timestamp|$filename|$ip|\n";
if (isset($filelx)) $newlist.=$filecc;
$newlist=push_heldtopic($newlist);
writetofile("userdata/lxvip/list.php",$newlist);
$newline="$username|$work|$useremail|$qq|$times|$formlove|$jianyi|$huiyuan|$timestamp|$username,|||\n";
writetofile("userdata/lxvip/$filename",$newline,"a");
jump_page("vip.php?action=list","申请表递交成功",
"<b>状态:操作成功,您已经成功填写了您的申请信息</b><br><br>
你现在可以选择:<br><ul><li><a href='vip.php?action=list'>返回查看申请表列表</a></li>
<br><br><li><a href='index.php'>返回论坛首页</a></li></ul>");
require("footer.php");echo"$footertp";
exit;
}}
//--------------------------------------------函数开始--------------------------------
//------填写{$rztitle}申请信息---------
function write_form() {
global $site_name,$minaverage,$username,$minatc,$minww,$userpath,$mtablewidth,$tablewidth,$useremail,$qq,$times,$formlove,$jianyi,$huiyuan,$manager,$forumcolorone,$forumcolortwo,$titlecolor,$bordercolor;
require("bbsdata/newinfo.php");
if(file_exists("$userpath/$username.php"))
$user_info=explode("|",readfromfile("$userpath/$username.php"));
if($user_info[13]>$minatc){$ifatc=满足;$check1=1;}else {$ifatc=不满足;$check1=0;}
if($user_info[16]>$minww){$ifww=满足;$check2=1;}else {$ifww=不满足;$check2=0;}
$regdate=date("Y-m-d",$user_info[6]);
$nowdate=date("Y-m-d");
$regstep=explode("-",$regdate);
$nowstep=explode("-",$nowdate);
if((int)$regstep[2]>(int)$nowstep[2])
{(int)$nowstep[2]=(int)$nowstep[2]+30;
(int)$nowstep[1]--;}
if((int)$nowstep[1]==0)
{(int)$nowstep[1]=12;
(int)$nowstep[0]--;}
if((int)$regstep[1]>(int)$nowstep[1])
{(int)$nowstep[1]=(int)$nowstep[1]+12;
(int)$nowstep[0]--;}
$timereg=(int)$nowstep[2]-(int)$regstep[2]+((int)$nowstep[1]-(int)$regstep[1])*30+((int)$nowstep[0]-(int)$regstep[0])*365;
if($timereg==0)
$averagepost=0;
else
$averagepost=ceil(($user_info[13]/$timereg)*1000)/1000;
if ($check1==0 || $check2==0 || $averagepost<$minaverage )
{
msg_box(非常抱歉!!,'<center>申请的条件:您必须在此论坛发贴超过'.$minatc.'贴,威望超过'.$minww.',日发贴量超过'.$minaverage.'感谢您的支持!!请继续努力,<br><br><a href="javascript:history.back(1)">返回前页</a><br><br><a href="index.php">返回首页<br><br><a href="vip.php?action=list">点击查看会员申请列表<br><br></center>');
exit;}
print <<<EOT
<table width=$tablewidth border=0 cellspacing=0 cellpadding=0 align=center bgcolor=$bordercolor>
<tr> <td>
<form action=vip.php?action=new method=post >
<table width=100% border=0 cellpadding=3 cellspacing=1>
<tr>
<td colspan=2 class=title bgcolor=$titlecolor width="100%" align=center>{$rztitle}申请程式</td>
</tr>
<tr>
<td colspan=2 class=title width="100%" bgcolor=$forumcolorone align=center><font color=red>感谢您对{$sint_name}的支持,先申明虽然您的条件满足了基本要求,不过管理员有权利根据您的信息撤消您的申请,所以下面的信息才是至关重要的!</font></td>
</tr>
<tr bgcolor=$forumcolortwo>
<td align=center colspan=2><b>登记申请信息 </b> (带<font color=red> * </font>为必填的项目)</td>
</tr>
<tr bgcolor=$forumcolorone>
<td width="40%"> 您的ID:</td>
<td width="60%">$username(<font color=green>日发贴量为:$averagepost</font>)</td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 您的威望:</td>
<td><input type="text" size="30" maxlength="75" name="atc" value="$user_info[16]" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" disabled=true>$ifww</td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 发表文章:</td>
<td><input type="text" size="30" maxlength="75" name="atc" value="$user_info[13]" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" disabled=true>$ifatc</td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> OICQ/ICQ <font color=red>*</font></td>
<td><input type="text" size="30" maxlength="30" name="qq" value="$qq" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 您的职业与专长:(用于大家一起交流):<font color=red> * </font></td>
<td><input type="text" size="30" maxlength="75" name="work" value="$work" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 平均上网时间和时段(小时/天):<font color=red> * </font></td>
<td><input type="text" size="30" maxlength="75" name="times" value="$times" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 您平时喜欢的版面有:(可选)</td>
<td><input type="text" size="30" maxlength="30" name="formlove" value="$formlove" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 电子邮件:(可选)</td>
<td><input type="text" size="30" maxlength="30" name="useremail" value="$useremail" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 对繁荣本网站的建议与看法!?(申请vip会员必答):<font color=red> * </font></td>
<td><textarea cols=75 name="jianyi" onMouseOver="this.style.backgroundColor = '#E5F0FF'" onMouseOut="this.style.backgroundColor = ''" rows="4">$jianyi</textarea></td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 您介绍了哪些人成为{$site_name}的会员?<font color=red> * </font></td>
<td><textarea cols=75 name="huiyuan" onMouseOver="this.style.backgroundColor = '#E5F0FF'" onMouseOut="this.style.backgroundColor = ''" rows="5">$huiyuan</textarea></td>
</tr>
<tr bgcolor=$titlecolor>
<td align="center" bgcolor=$titlecolor colspan=2>
<input type=submit value="确认申请" style="height:20px;background-color:#f3f3f3;border:1 solid black" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
<input type="button" value="查看申请" onClick="location.href='vip.php?action=list'" style="height:20px; background-color:#f3f3f3; border:1 solid black;" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
<input type=reset value="清除重写" style="height:20px;background-color:#f3f3f3;border:1 solid black" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'" name="reset">
<input type=hidden value="2" name="step">
</td></tr></table>
</td></tr></form>
</table>
EOT;
}
//------显示VIP会员申请信息--------
function show_form() {
global $bordercolor,$tablewidth,$userpath,$site_name,$username,$filename,$user,$work,$useremail,$qq,$times,$jianyi,$huiyuan,$forumcolorone,$forumcolortwo,$titlecolor;
if (file_exists("userdata/lxvip/$filename")) {
list($user,$work,$useremail,$qq,$times,$formlove,$jianyi,$huiyuan,$asktime,$yes,$no,$ok)
= explode("|",readfromfile("userdata/lxvip/$filename"));}
if (file_exists("$userpath/$user.php")) {
list($fb,$user,$pwd,$usericon,$email,$oicq,$regdate,
$sign[$author],$homepage,$from,$com,$honor,
$lp,$postamount,$publicemail,$none,$rvrc,$time1,$time2,$icq,$gender,$birth,$flag,$tuijian,$money,$lastfiletitle,$lastfilelink,$group,$yanzheng,$tdpost,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6)
= explode("|",readfromfile("$userpath/$user.php"));}
$useri=get_user_info($user);
$postamount=$useri[13];
$rvrc=$useri[16]/10;
$money=$useri[24];
$yeslist=explode(",",$yes);
$yescount=count($yeslist)-2;
$nolist=explode(",",$no);
$nocount=count($nolist)-1;
if($yes=="") $yescount=0;
if($no=="") $nocount=0;
$asktime=date("Y-m-d h:m:s",$asktime);
$regdate=date("Y-m-d",$regdate);
$nowdate=date("Y-m-d");
$regstep=explode("-",$regdate);
$nowstep=explode("-",$nowdate);
if((int)$regstep[2]>(int)$nowstep[2])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -