📄 mode.aspx
字号:
OleDbDataAdapter odAdapt = new OleDbDataAdapter(StrSql, MyConn);
DataSet DS = new DataSet();
odAdapt.Fill(DS);
DataTable DT = DS.Tables[0];
startValue = DT.Rows[0]["head"].ToString().Trim();
MyConn.Close();
}
catch
{
Response.Write(clsFct.errorMsg("数据库连接失败,请重试!"));
Response.End();
}
HeadEditHtml = HeadEditHtml + "<input name='msgHead" + id + "' type='text' size='30' maxlength='28' onblur=if(checkSpace('msgHead" + id + "')){showHint('hintHead" + id + "','R')}else{showHint('hintHead" + id + "','W')} style='white-space:pre;' value=\"";
HeadEditHtml = HeadEditHtml + clsFct.Keep(startValue,1);
HeadEditHtml = HeadEditHtml + "\" />";
HeadEditHtml = HeadEditHtml + "<span class='font_12'> <b id='hintHead" + id + "' style='font-size:14px; color:Red;'></b></span>";
return HeadEditHtml;
}
//**********************
//** 获取内容修改表单 **
//**********************
public string GetContentEdit()
{
string ContentEditHtml = "";
string startValue = "";
string id = Request.QueryString["id"];
if (!clsFct.IsNumber(id) || id.CompareTo("") == 0)
{
return clsFct.errorMsg("警告!禁止输入非法数据。");
}
string StrSql = "Select * From book where id=" + id;
OleDbConnection MyConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath(g_StrConn));
try
{
MyConn.Open();
OleDbDataAdapter odAdapt = new OleDbDataAdapter(StrSql, MyConn);
DataSet DS = new DataSet();
odAdapt.Fill(DS);
DataTable DT = DS.Tables[0];
startValue = DT.Rows[0]["content"].ToString().Trim();
MyConn.Close();
}
catch
{
Response.Write(clsFct.errorMsg("数据库连接失败,请重试!"));
Response.End();
}
ContentEditHtml = ContentEditHtml + "<textarea id='msgContent" + id + "' cols='33' rows='7' onblur=if(checkSpace('msgContent" + id + "')){showHint('hintContent" + id + "','R')}else{showHint('hintContent" + id + "','W')} >";
ContentEditHtml = ContentEditHtml + startValue;
ContentEditHtml = ContentEditHtml + "</textarea>";
ContentEditHtml = ContentEditHtml + " <b id='hintContent" + id + "' style='font-size:14px; color:Red;'></b>";
ContentEditHtml = ContentEditHtml + " <div align='center'><input type='button' value=' ok ' onclick=postEditMsg('" + id + "'); > <input type='reset' value=' no '></div>";
return ContentEditHtml;
}
//**********************
//** 获取留言回复表单 **
//**********************
public string GetReply()
{
string ReplyHtml = "";
string startValue = "";
string id = Request.QueryString["id"];
if (!clsFct.IsNumber(id) || id.CompareTo("") == 0)
{
return clsFct.errorMsg("警告!禁止输入非法数据。");
}
string StrSql = "Select * From book where id=" + id;
OleDbConnection MyConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath(g_StrConn));
try
{
MyConn.Open();
OleDbDataAdapter odAdapt = new OleDbDataAdapter(StrSql, MyConn);
DataSet DS = new DataSet();
odAdapt.Fill(DS);
DataTable DT = DS.Tables[0];
startValue = DT.Rows[0]["reply"].ToString().Trim();
MyConn.Close();
}
catch
{
Response.Write(clsFct.errorMsg("数据库连接失败,请重试!"));
Response.End();
}
ReplyHtml = ReplyHtml + "<input name='msgReply" + id + "' type='text' size='24' value=\"";
ReplyHtml = ReplyHtml + clsFct.Keep(startValue,1);
ReplyHtml = ReplyHtml + "\" />";
ReplyHtml = ReplyHtml + " <input type='button' value='ok' onclick=postReply('" + id + "');> <input type='reset' value='no'>";
return ReplyHtml;
}
//**********************
//** 获取密码管理表单 **
//**********************
public string GetEditPSW()
{
string AdminLoginHtml = "";
AdminLoginHtml = AdminLoginHtml + " <table width='470' height='150' border='0' cellpadding='0' cellspacing='0'>";
AdminLoginHtml = AdminLoginHtml + " <form name='form'>";
AdminLoginHtml = AdminLoginHtml + " <tr><td colspan='2' height='50' align='center' valign='middle'><span class='font_14'>密 码 管 理 </span></td></tr>";
AdminLoginHtml = AdminLoginHtml + " <tr><td width='161' height='30' align='right' valign='middle'><span class='font_12'>旧 密 码:</span></td><td align='left'><input name='oldPSW' type='password' size='18' maxlength='20' onblur=if(checkSpace('oldPSW')){showHint('hintOldPSW','R')}else{showHint('hintOldPSW','W')} /> <b id='hintOldPSW' style=' font-size:14px; color:Red;'></b></td></tr>";
AdminLoginHtml = AdminLoginHtml + " <tr><td width='161' height='30' align='right' valign='middle'><span class='font_12'>新 密 码:</span></td><td align='left'><input name='newPSW' type='password' size='18' maxlength='20' onblur=if(checkSpace('newPSW')){showHint('hintNewPSW','R')}else{showHint('hintNewPSW','W')} /> <b id='hintNewPSW' style=' font-size:14px; color:Red;'></b></td></tr>";
AdminLoginHtml = AdminLoginHtml + " <tr><td width='161' height='30' align='right' valign='middle'><span class='font_12'>确认密码:</span></td><td align='left'><input name='newPSW2' type='password' size='18' maxlength='20' onblur=if(checkSpace('newPSW2')){if(getFormValues('newPSW2')==getFormValues('newPSW')){showHint('hintNewPSW2','R')}else{showHint('hintNewPSW2','W')}}else{showHint('hintNewPSW2','W')} /> <b id='hintNewPSW2' style=' font-size:14px; color:Red;'></b></td></tr>";
AdminLoginHtml = AdminLoginHtml + " <tr><td width='161' height='30' align='right' valign='middle'><span class='font_12'>验 证 码:</span></td><td align='left'><input name='validate' type='text' size='4' maxlength='20' onblur=if(checkSpace('validate')){showHint('hintValidate','R')}else{showHint('hintValidate','W')} /> <img id='validateImg' src='validate.aspx' width='60' height='20' /> <b id='hintValidate' style=' font-size:14px; color:Red;'></b></td></tr>";
AdminLoginHtml = AdminLoginHtml + " <tr><td colspan='2' height='50' align='center' valign='bottom'><input type='button' onclick='postEditPSW()' value='修改' /> <input type='reset' value='重置' /> </td></tr>";
AdminLoginHtml = AdminLoginHtml + " </form></table>";
return AdminLoginHtml;
}
//**********************
//** 获取系统设置表单 **
//**********************
public string GetSysConfig()
{
string SysConfigHtml = "";
string Announce = "";
string StrSql = "Select * From config";
OleDbConnection MyConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath(g_StrConn));
try
{
MyConn.Open();
OleDbDataAdapter odAdapt = new OleDbDataAdapter(StrSql, MyConn);
DataSet DS = new DataSet();
odAdapt.Fill(DS);
DataTable DT = DS.Tables[0];
Announce = DT.Rows[0]["announce"].ToString().Trim();
MyConn.Close();
}
catch
{
Response.Write(clsFct.errorMsg("数据库连接失败,请重试!"));
Response.End();
}
SysConfigHtml = SysConfigHtml + "<table width='400' border='0' cellspacing='0' cellpadding='0'><form name='form'>";
SysConfigHtml = SysConfigHtml + "<tr><td height='50' align='center' colspan='2'><br/><span class='font_14'>留 言 本 设 置</span></td></tr>";
SysConfigHtml = SysConfigHtml + "<tr><td height='30' align='left' width='100'><span class='font_12'>初始风格:</span></td><td align='left'>";
SysConfigHtml = SysConfigHtml + "<input name='skin' type='radio' ";
if (g_Skin.CompareTo("1") == 0)
{
SysConfigHtml = SysConfigHtml + "checked='checked' ";
}
SysConfigHtml = SysConfigHtml + "value='1'> <span class='font_12'>春</span> ";
SysConfigHtml = SysConfigHtml + "<input name='skin' type='radio' ";
if (g_Skin.CompareTo("2") == 0)
{
SysConfigHtml = SysConfigHtml + "checked='checked' ";
}
SysConfigHtml = SysConfigHtml + "value='2'> <span class='font_12'>夏</span> ";
SysConfigHtml = SysConfigHtml + "<input name='skin' type='radio' ";
if (g_Skin.CompareTo("3") == 0)
{
SysConfigHtml = SysConfigHtml + "checked='checked' ";
}
SysConfigHtml = SysConfigHtml + "value='3'> <span class='font_12'>秋</span> ";
SysConfigHtml = SysConfigHtml + "<input name='skin' type='radio' ";
if (g_Skin.CompareTo("4") == 0)
{
SysConfigHtml = SysConfigHtml + "checked='checked' ";
}
SysConfigHtml = SysConfigHtml + "value='4'> <span class='font_12'>冬</span> ";
SysConfigHtml = SysConfigHtml + "</td></tr>";
SysConfigHtml = SysConfigHtml + "<tr><td height='30' align='left' width='100'><span class='font_12'>初始头像:</span></td><td align='left'><select name='face'>";
SysConfigHtml = SysConfigHtml + "<option value='1' ";
if (g_Face.CompareTo("1") == 0)
{
SysConfigHtml = SysConfigHtml + "selected='selected'";
}
SysConfigHtml = SysConfigHtml + ">face1</option>";
SysConfigHtml = SysConfigHtml + "<option value='2' ";
if (g_Face.CompareTo("2") == 0)
{
SysConfigHtml = SysConfigHtml + "selected='selected'";
}
SysConfigHtml = SysConfigHtml + ">face2</option>";
SysConfigHtml = SysConfigHtml + "<option value='3' ";
if (g_Face.CompareTo("3") == 0)
{
SysConfigHtml = SysConfigHtml + "selected='selected'";
}
SysConfigHtml = SysConfigHtml + ">face3</option></select></tr>";
SysConfigHtml = SysConfigHtml + "<tr><td height='30' align='left' width='100'><span class='font_12'>初始表情:</span></td><td align='left'><select name='emote'>";
SysConfigHtml = SysConfigHtml + "<option value='1' ";
if (g_Emote.CompareTo("1") == 0)
{
SysConfigHtml = SysConfigHtml + "selected='selected'";
}
SysConfigHtml = SysConfigHtml + ">emote1</option>";
SysConfigHtml = SysConfigHtml + "<option value='2' ";
if (g_Emote.CompareTo("2") == 0)
{
SysConfigHtml = SysConfigHtml + "selected='selected'";
}
SysConfigHtml = SysConfigHtml + ">emote2</option>";
SysConfigHtml = SysConfigHtml + "</select></tr>";
SysConfigHtml = SysConfigHtml + "<tr><td height='30' align='left' width='100'><span class='font_12'>每页显示条数:</span></td><td align='left'><input type='text' value='" + g_rPerPage + "' name='rPerPage' size='2' maxlength='2' onblur=if(checkSpace('rPerPage')){if(checkNum('rPerPage')){showHint('hintRPerPage','R')}else{showHint('hintRPerPage','W')}}else{showHint('hintRPerPage','W')} > <span class='font_12'>条</span> <b id='hintRPerPage' style=' font-size:14px; color:Red;'></b></tr>";
SysConfigHtml = SysConfigHtml + "<tr><td height='30' align='left' width='100'><span class='font_12'>最大留言字数:</span></td><td align='left'><input type='text' value='" + g_contentMaxLen + "' name='contentMaxLen' size='5' maxlength='5' onblur=if(checkSpace('contentMaxLen')){if(checkNum('contentMaxLen')){showHint('hintContentMaxLen','R')}else{showHint('hintContentMaxLen','W')}}else{showHint('hintContentMaxLen','W')} > <span class='font_12'>字</span> <b id='hintContentMaxLen' style=' font-size:14px; color:Red;'></b></tr>";
SysConfigHtml = SysConfigHtml + "<tr><td height='30' align='left' width='100'><span class='font_12'>脏话过滤:</span></td><td align='left'><input type='text' value='" + g_leachGutterLag + "' name='leachGutterLag' size='26' > <span class='font_12'>过滤词用|隔开</span></tr>";
SysConfigHtml = SysConfigHtml + "<tr><td height='30' align='left' width='100'><span class='font_12'>禁止留言:</span></td><td align='left'>";
SysConfigHtml = SysConfigHtml + "<input name='stop' type='radio' ";
if (g_stop == 0)
{
SysConfigHtml = SysConfigHtml + "checked='checked'";
}
SysConfigHtml = SysConfigHtml + " value='0'> <span class='font_12'>允许</span> ";
SysConfigHtml = SysConfigHtml + "<input name='stop' type='radio' ";
if (g_stop == 1)
{
SysConfigHtml = SysConfigHtml + "checked='checked'";
}
SysConfigHtml = SysConfigHtml + " value='1'> <span class='font_12'>禁止</span> </tr>";
SysConfigHtml = SysConfigHtml + "<tr><td height='30' align='left' width='100'><span class='font_12'>系统公告:</span></td><td align='left'><textarea id='announce' cols='36' rows='5'>" + Announce + "</textarea></tr>";
SysConfigHtml = SysConfigHtml + "<tr><td height='50' align='center' valign='bottom' colspan='2'><input type='button' onclick='postSysConfig();' value='设置'> <input type='reset' value='重置'> </td></tr>";
SysConfigHtml = SysConfigHtml + "</from></table>";
return SysConfigHtml;
}
//******************
//** 获取皮肤列表 **
//******************
public string getSkinList()
{
string SkinListHtml = "";
SkinListHtml = SkinListHtml + "<table style='border-width:5px; border-style:outset; border-color:#D7D7D7;' width='640px' cellspacing='2' cellpadding='4'>";
SkinListHtml = SkinListHtml + "<tr><td style='width:640px; height:5px;' align='right'colspan='4'><b style=' cursor:hand;' class='font_13' onclick=showSkinList();>×</b></td></tr>";
SkinListHtml = SkinListHtml + "<tr><td style='width:160px;' align='center'><img style=' cursor:hand;' onclick=postdata('正在加载皮肤,请稍等....','Mode.aspx?Mode=changeSkin','mainForm','skin=1');showSkinList(); alt='' src='skins/1/skinView.gif' /></td>";
SkinListHtml = SkinListHtml + "<td style='width:160px;' align='center'><img style=' cursor:hand;' onclick=postdata('正在加载皮肤,请稍等....','Mode.aspx?Mode=changeSkin','mainForm','skin=2');showSkinList(); alt='' src='skins/2/skinView.gif' /></td>";
SkinListHtml = SkinListHtml + "<td style='width:160px;' align='center'><img style=' cursor:hand;' onclick=postdata('正在加载皮肤,请稍等....','Mode.aspx?Mode=changeSkin','mainForm','skin=3');showSkinList(); alt='' src='skins/3/skinView.gif' /></td>";
SkinListHtml = SkinListHtml + "<td style='width:160px;' align='center'><img style=' cursor:hand;' onclick=postdata('正在加载皮肤,请稍等....','Mode.aspx?Mode=changeSkin','mainForm','skin=4');showSkinList(); alt='' src='skins/4/skinView.gif' /></td></tr>";
SkinListHtml = SkinListHtml + "<tr><td style='width:160px;height:5px;' align='center' class='font_12'>春</td>";
SkinListHtml = SkinListHtml + "<td style='width:160px;height:5px;' align='center' class='font_12'>夏</td>";
SkinListHtml = SkinListHtml + "<td style='width:160px;height:5px;' align='center' class='font_12'>秋</td>";
SkinListHtml = SkinListHtml + "<td style='width:160px;height:5px;' align='center' class='font_12'>冬</td></tr>";
SkinListHtml = SkinListHtml + "</table>";
return SkinListHtml;
}
//********************
//** 检测管理员登陆 **
//********************
public string CheckAdminLogin()
{
string adminID = Request["ID"];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -