📄 getmg.php
字号:
<?
//程序修改完善 流星论坛 快乐的流星 http://www.ofstar.com/bbs 欢迎光临我的网站
//里面有很多属于你自己论坛的东西,希望你自己修改 有什么来我论坛提问,我可以帮你
require("userdata/style.php");
require("global.php");
include("bbsdata/level.php");
if (empty($job)) { $job="list"; }
if ($job==agree) makeyes();
if ($job==object) makeno();
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}的版主申请程式中","版主申请表");
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 ($job=="show") {
if ($filename=="") {
require("header.php");echo"$headertp";
headguide("你正处在<br>{$bbs_title}的版主申请表中","<a href=getmg.php>申请表列表</a>","申请表资料");
msg_box('对不起!!','<center>你还没有选择要浏览的申请表!请返回检查!!<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;}
global $userpath,$filename;
require("header.php");echo"$headertp";
headguide("你正处在<br>{$bbs_title}的版主申请表中","<a href=getmg.php>申请表列表</a>","申请表资料");
show_form();
require("footer.php");echo"$footertp";
exit;
}
if ($job=="new") {
get_forum_info();
require("header.php");echo"$headertp";
headguide("你正处在<br>{$bbs_title}的版主申请表中","<a href=getmg.php>申请表列表</a>","<b>$forum_name </b>版主申请资料");
if (file_exists("$userpath/$username.php")) {
list($fb,$username,$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/$username.php"));
global $ofstarid,$username,$postamount,$userpath,$mpostmark;
if ($postamount<20) {//此处你可编辑
msg_box('对不起!!','<center>申请的条件:您必须在此论坛发贴超过20贴,感谢您的支持!!<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;}}
if ($forumid=="") {
msg_box('对不起!!','<center>你还没有选择要申请版主的版块!请返回检查!!<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;}
if (empty($step)) {
write_form();
require("footer.php");echo"$footertp";
exit;
}
elseif($step==2) {
if(empty($city) ||empty($useremail) ||empty($times) ||empty($activeforum) ||empty($reason) ||empty($forumtopic) ||empty($howtodo) ||empty($forumbest)){
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;}
$city=safe_convert($city);
$work=safe_convert($work);
$useremail=safe_convert($$useremail);
$qq=safe_convert($qq);
$times=safe_convert($times);
$ismod=safe_convert($ismod);
$activeforum=safe_convert($activeforum);
$reason=safe_convert($reason);
$forumtopic=safe_convert($forumtopic);
$howtodo=safe_convert($howtodo);
$forumbest=safe_convert($forumbest);
$suggest=safe_convert($suggest);
if(empty($ismod)) $ismod="没有";
global $forumid,$username,$forum_name;
get_forum_info();
if (file_exists("userdata/getmg/list.php")) {
$filecc=readfromfile("userdata/getmg/list.php");
//-----Let's get the Filename ( f_xxx )
$filename=get_nextfilename($filecc);}
else $filename="f_1";
$newlist="$forumid|$username|$timestamp|$filename|$ip|\n";
if (isset($filecc)) $newlist.=$filecc;
$newlist=push_heldtopic($newlist); //----push the Held Topics to the beginning of the list
writetofile("userdata/getmg/list.php",$newlist);//------OK, write to the list-----
$newline="$username|$forum_name|$city|$work|$useremail|$qq|$times|$ismod|$activeforum|$reason|$forumtopic|$howtodo|$forumbest|$suggest|$timestamp|$username,|||\n";
writetofile("userdata/getmg/$filename",$newline,"a");//OK, write to the f_xxx
msg_box("申请表递交成功","<b>状态:操作成功,您已经成功填写了您的申请信息</b><br><br>
你现在可以选择:<br><ul><li><a href='getmg.php'>返回申请表列表</a></li>
<br><br><li><a href='index.php'>返回论坛首页</a></li></ul>");
require("footer.php");echo"$footertp";
exit;
}}
//+------填写版主申请信息---------
function write_form() {
global $ftbConfig,$tablewidth,$forumid,$action,$username,$forum,$forum_name,$city,$work,$useremail,$qq,$times,$ismod,$activeforum,$reason,$forumtopic,$howtodo,$forumbest,$suggest,$manager,$forumcolorone,$forumcolortwo,$titlecolor,$bordercolor;
get_forum_info();
print <<<EOT
<table width=$tablewidth border=0 cellspacing=0 cellpadding=0 align=center bgcolor=$bordercolor>
<tr> <td>
<form action=getmg.php?job=new method=post >
<table width=100% border=0 cellpadding=3 cellspacing=1>
<tr>
<td colspan=2 class=title bgcolor=$titlecolor>版主申请程式</td>
</tr>
<tr bgcolor=$forumcolorone>
<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</td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 申请讨论版块名称:</td>
<td><input type=text size=30 maxlength=30 name=forum_name value=$forum_name onMouseOver = this.style.backgroundColor = '#E5F0FF' onMouseOut = this.style.backgroundColor = '' disabled></td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 目前居住城市:<font color=red> * </font></td>
<td><input type="text" size="30" maxlength="75" name="city" value="$city" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 职业与专长:</td>
<td><input name="work" value="$work" type="text" size="30" maxlength="50" 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="30" name="useremail" value="$useremail" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> OICQ/ICQ:</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="times" value="$times" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 您是否做过版主(副)?(如果是,请说明哪个版):</td>
<td><input name="ismod" value="$ismod" type="text" size="30" maxlength="30" 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="30" name="activeforum" value="$activeforum" 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="75" maxlength="80" name="reason" value="$reason" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 您觉得该版块有什么不足:<font color=red> * </font></td>
<td><input name="forumtopic" value="$forumtopic" type="text" size="75" maxlength="80" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 您觉得如何能更好的行使版主权利:<font color=red> * </font></td>
<td><textarea cols=75 name="howtodo" onMouseOver="this.style.backgroundColor = '#E5F0FF'" onMouseOut="this.style.backgroundColor = ''" rows="3">$howtodo</textarea></td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 对繁荣本社区的建议与看法!?(申请版主必答):<font color=red> * </font></td>
<td><textarea cols=75 name="forumbest" onMouseOver="this.style.backgroundColor = '#E5F0FF'" onMouseOut="this.style.backgroundColor = ''" rows="4">$forumbest</textarea></td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 您认为该论坛需面向什么,怎样提高会员的热情?(可选):</td>
<td><textarea cols=75 name="suggest" onMouseOver="this.style.backgroundColor = '#E5F0FF'" onMouseOut="this.style.backgroundColor = ''" rows="5">$suggest</textarea></td>
</tr>
<tr bgcolor=$forumcolorone>
<td colspan="2" align="center"><font color=red><b>另请注意,您所申请的版面有版主者,请先与版主联系,得到版主的同意。</b></td>
</tr>
<tr >
<td align="center" bgcolor=$titlecolor colspan=2>
<input type="button" value="论坛首页" onClick="location.href='index.php'" style="height:20px; background-color:#f3f3f3; border:1 solid black;" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
<input onClick="javascript:history.back(1)" type="button" value="返回前页" style="height:20px;background-color:#f3f3f3; border:1 solid black" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
<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=hidden value="2" name="step">
<input type=hidden value="$forumid" name="forumid">
<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">
</td></tr></table>
</td></tr></form>
</table>
EOT;
}
//+------显示版主申请信息--------
function show_form() {
global $ftbConfig,$bordercolor,$username,$filename,$user,$forum,$city,$work,$useremail,$qq,$times,$ismod,$activeforum,$reason,$forumtopic,$howtodo,$forumbest,$suggest,$forumcolorone,$forumcolortwo,$titlecolor;
if (file_exists("userdata/getmg/$filename")) {
list($user,$forum,$city,$work,$useremail,$qq,$times,$ismod,$activeforum,$reason,$forumtopic,$howtodo,$forumbest,$suggest,$asktime,$yes,$no,$ok)
= explode("|",readfromfile("userdata/getmg/$filename"));}
$useri=get_user_info($user);
$postamount=$useri[13];
$rvrc=floor($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);
$useri=explode("|",readfromfile("userdata/getmg/$filename"));
$do="<a href=getmg.php?job=agree&filename=$filename><b>[支持]</b></a> <a href=getmg.php?job=object&filename=$filename><b>[反对]</b></a>";
if($ok !="") {$do=""; $gongxi="<b><font color=red>恭喜{$user}成功上任!希望以后能加倍努力!!</font></b>";}
$vote="<font color=red>同意:<b>$yescount</b></font> <font color=blue>反对:<b>$nocount</b></font>
$do $gongxi";
print <<<EOT
<table width=$tablewidth border=0 cellspacing=0 cellpadding=0 align=center bgcolor=$bordercolor>
<tr> <td>
<table width=100% border=0 cellspacing=1 cellpadding=4>
<tr>
<td colspan=2 class=title bgcolor=$titlecolor>版主申请程式</td>
</tr>
<tr align=center>
<td colspan=2 bgcolor=$forumcolortwo><b>查看版主申请资料</b></td>
</tr>
<tr bgcolor=$forumcolorone>
<td width=30%> 申请人:</td>
<td width=70%> <font color=red><B>$user</B></font></td>
</tr>
<tr bgcolor=$forumcolortwo>
<td width=35%> 申请人资料:</td>
<td width=65%> <font color=blue>发贴:</font> <b>$postamount</b> <font color=blue>威望:</font> <b>$rvrc</b> <font color=blue>金钱:</font> <b>$money</b> </td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 申请讨论版块名称:</td>
<td><b>$forum</b></td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 申请时间:</td>
<td>$asktime</td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 目前居住城市:</td>
<td>$city</td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 职业与专长:</td>
<td>$work</td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 电子邮件:</td>
<td>$useremail</td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> OICQ/ICQ:</td>
<td>$qq</td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 平均上网时间和时段(小时/天):</td>
<td>$times</td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 您是否做过版主(副)?(如果是,请说明哪个版):</td>
<td>$ismod</td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 您平时常活动的版面有:</td>
<td>$activeforum</td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 您申请当该版版主(副)的详细理由:</td>
<td>$reason</td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 您认为该版所包括的话题:</td>
<td>$forumtopic</td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 您觉得如何能更好的行使版主权利:</td>
<td>$howtodo</td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 您认为该版目录(包括精华区)的框架设立情况如何?如有更完整的设想请简要列出。</td>
<td>$forumbest</td>
</tr>
<tr bgcolor=$forumcolortwo>
<td> 对繁荣本社区的建议与看法:</td>
<td>$suggest</td>
</tr>
<tr bgcolor=$forumcolorone>
<td> 会员投票:</td>
<td>$vote</td>
</tr>
<tr>
<td align=center colspan=2 bgcolor=$titlecolor>
<input type="button" value="论坛首页" onClick="location.href='index.php'" style="height:20px; background-color:#f3f3f3; border:1 solid black;" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
<input onClick="javascript:history.back(1)" type="button" value="返回前页" style="height:20px;background-color:#f3f3f3; border:1 solid black" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
</td></tr></table>
</td></tr></table>
EOT;
}
//----find out the next available post file name------
function get_nextfilename($list) {
global $idpath;
$list=explode("\n",$list);
$count=count($list);
$filecount=0;
for ($i=0; $i<$count; $i++) {
$temp=explode("|",$list[$i]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -