📄 gbadmin.php
字号:
<?
$actioname="gbadmin.php";
$filename="guestbook.dbf";
$filemessage=file($filename);
$num_parament=split("&&",$filemessage[0],9);
$parament=split("\|\|",$num_parament[1],999);
$get_userid798y657=$parament[0];
$get_password798y657=$parament[1];
if(($input_userid != $get_userid798y657) || ($input_password != $get_password798y657))
{
print("<html><head><title>页面管理</title><body>");
print("<form name=form1 action=$actioname method=POST >");
print(" <div align=center>姓名<input type=text name=input_userid size=40 maxlength=20><br>");
print("密码<input type=password name=input_password size=40 maxlength=20><br>");
print("<input type=submit name=Submit value=\" 开始修改 \">");
print("<input type=reset name=reset value=\" 错了重添 \">");
print("</div>");
print("</form>");
print("</body></html>");
}
else if($action == "save")
{
$css=ereg_replace("\r\n","<br>",$css);
$bottom=ereg_replace("\r\n","<br>",$bottom);
$tempmsg="$num_parament[0]&&$get_userid798y657||$get_password798y657||$title||$bgcolor||$background||$css||$fileperpage||$ly_between||$top_left||$top_center||$top_right||$ly_bgcolor||$ly_border||$ly_light||$ly_dark||$ly_img||$bottom\r\n";
$tempmsg=ereg_replace(" "," ",$tempmsg);
// $tempmsg=ereg_replace("\\"," ",$tempmsg);
$filehandle=fopen($filename,"w");
fputs($filehandle,$tempmsg);
for($num=1;$num<count($filemessage);$num++)
{
fputs($filehandle,$filemessage[$num]);
}
fclose($filehandle);
print("<html><head><title>成功保存!</title><meta http-equiv=refresh content=5;url=$actioname?input_userid=$input_userid&input_password=$input_password><body>参数保存完毕!!!</body></html>");
}
else{
$title=$parament[2];
$bgcolor=$parament[3];
$background=$parament[4];
$css=$parament[5];
$fileperpage=$parament[6];
$ly_between=$parament[7];
$top_left=$parament[8];
$top_center=$parament[9];
$top_right=$parament[10];
$ly_bgcolor=$parament[11];
$ly_border=$parament[12];
$ly_light=$parament[13];
$ly_dark=$parament[14];
$ly_img=$parament[15];
$bottom=$parament[16];
$lastdata=$parament[17];
print("<html><head><title>留言板管理程序</title>");
print("<meta http-equiv=\"目录类型\" content=\"文本/html; 字符集=gb2312\">");
print("</head>");
print("<style type=\"text/css\">");
print("a:link { color: #ff0000;text-decoration: none }");
print("a:visited { text-decoration: none; color: #ff0000 }");
print("a:active { text-decoration: none; color: #000000 }");
print("a:hover { text-decoration: underline; color: ff0000}");
print("body { font-size: 9pt; color: #ffffff }");
print("th { font-size: 9pt }");
print("td { font-size: 9pt; color: #000080 }");
print("</style>");
print("<body bgcolor=669999 leftmargin=0 topmargin=0>");
print("<div align=\"center\">");
print("<p><font size=5 color=FFFFFF>留言板管理程序</font></p>");
print("</div>");
print("<div>");
print("<div align=\"center\">");
print("<form action=".$actioname."?action=save&input_userid=$input_userid&input_password=$input_password method=POST>");
print(" <table width=700 border=0 cellspacing=0 cellpadding=2 bordercolorlight=FFFFFF bordercolordark=000000 bgcolor=fae2b1>");
print(" <tr bgcolor=ffcc66>");
print(" <td colspan=2><font size=3><font color=0000FF><b>网页整体设置</b></font></font></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>网页标题</div></td>");
print(" <td width=80%><input type=\"text\" name=\"title\" size=\"80\" maxlength=\"80\" value=\"$title\"></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>网页背景颜色</div></td>");
print(" <td width=80%><input type=\"text\" name=\"bgcolor\" size=\"20\" maxlength=\"7\" value=\"$bgcolor\"></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>网页背景图形</div></td>");
print(" <td width=80%><input type=\"text\" name=\"background\" size=\"80\" maxlength=\"100\" value=\"$background\"></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=\"right\">CSS设置</div></td>");
print(" <td width=80%><textarea name=\"css\" cols=\"80\" rows=\"3\">");
$css=ereg_replace("<br>","\r\n",$css);
$css=ereg_replace("<","<",$css);
$css=ereg_replace(">",">",$css);
print($css);
print(" </textarea>");
print(" </td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>每页文章数</div></td>");
print(" <td width=80%><input type=\"text\" name=\"fileperpage\" size=\"20\" maxlength=\"60\" value=\"$fileperpage\"></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>文章间隔代码</div></td>");
$ly_between=ereg_replace("<","<",$ly_between);
$ly_between=ereg_replace(">",">",$ly_between);
print(" <td width=80%><input type=\"text\" name=\"ly_between\" size=\"80\" maxlength=\"500\" value=\"$ly_between\"></td>");
print(" </tr>");
print(" <tr bgcolor=ffcc66>");
print(" <td colspan=2> <font size=3 color=0000FF><b>页面顶部设置</b></font></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>左侧代码</div></td>");
$top_left=ereg_replace("<","<",$top_left);
$top_left=ereg_replace(">",">",$top_left);
$top_left=ereg_replace("\"",""",$top_left);
$top_left=ereg_replace(" "," ",$top_left);
print(" <td width=80%><input type=\"text\" name=\"top_left\" size=\"80\" maxlength=\"500\" value=\"$top_left\"></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>中部代码</div></td>");
$top_center=ereg_replace("<","<",$top_center);
$top_center=ereg_replace(">",">",$top_center);
$top_center=ereg_replace("\"",""",$top_center);
$top_center=ereg_replace(" "," ",$top_center);
print(" <td width=80%><input type=\"text\" name=\"top_center\" size=\"80\" maxlength=\"500\" value=\"$top_center\"></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>右侧代码</div></td>");
$top_right=ereg_replace("<","<",$top_right);
$top_right=ereg_replace(">",">",$top_right);
$top_right=ereg_replace("\"",""",$top_right);
$top_right=ereg_replace(" "," ",$top_right);
print(" <td width=80%><input type=\"text\" name=\"top_right\" size=\"80\" maxlength=\"500\" value=\"$top_right\"></td>");
print(" </tr>");
print(" <tr bgcolor=ffcc66>");
print(" <td colspan=2><font size=3 color=0000FF><b>留言表格设置</b></font></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>表格背景颜色</div></td>");
print(" <td width=80%><input type=\"text\" name=\"ly_bgcolor\" size=\"20\" maxlength=\"7\" value=\"$ly_bgcolor\"></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>表格边框粗细</div></td>");
print(" <td width=80%><input type=\"text\" name=\"ly_border\" size=\"20\" maxlength=\"2\" value=\"$ly_border\"></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>表格边框亮颜色</div></td>");
print(" <td width=80%><input type=\"text\" name=\"ly_light\" value=\"$ly_light\" size=\"20\" maxlength=\"7\"></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>表格边框暗颜色</div></td>");
print(" <td width=80%><input type=\"text\" name=\"ly_dark\" value=\"$ly_dark\" size=\"20\" maxlength=\"7\"></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>表格标题图形</div></td>");
$ly_img=ereg_replace("<","<",$ly_img);
$ly_img=ereg_replace(">",">",$ly_img);
$ly_img=ereg_replace("\"",""",$ly_img);
$ly_img=ereg_replace(" "," ",$ly_img);
print(" <td width=80%><input type=\"text\" name=\"ly_img\" size=\"80\" maxlength=\"500\" value=\"$ly_img\"></td>");
print(" </tr>");
print(" <tr bgcolor=ffcc66>");
print(" <td colspan=2><font size=3><b><font color=0000FF>页面底部设置</font></b></font></td>");
print(" </tr>");
print(" <tr>");
print(" <td width=20%><div align=right>底部代码</div></td>");
$bottom=ereg_replace("<br>","\r\n",$bottom);
$bottom=ereg_replace("<","<",$bottom);
$bottom=ereg_replace(">",">",$bottom);
print(" <td width=80%><textarea name=\"bottom\" cols=\"80\" rows=\"3\">$bottom</textarea></td>");
print(" </tr>");
print(" <tr bgcolor=ffcc66>");
print(" <td colspan=2><div align=center><input type=\"submit\" name=\"Submit\" value=\" 开始修改配置 \"><input type=\"reset\" name=\"Reset\" value=\" 错了清空重添 \"></div></td>");
print(" </tr>");
print(" </table>");
print("<p> </p><p> </p><p> </p>");
print("</form>");
print("</div>");
print("</div>");
print("</body></html>");
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -