📄 modipwd.php
字号:
<?php
function ewebeditor_content( )
{
switch ( $sAction )
{
case "MODI" :
domodi( );
break;
default :
showform( );
break;
}
}
function showform( )
{
echo "\t";
echo "<s";
echo "cript language=javascript>\r\n\tfunction checklogin() {\r\n\t\tvar obj;\r\n\t\tobj=document.myform.newusr;\r\n\t\tobj.value=BaseTrim(obj.value);\r\n\t\tif (obj.value==\"\") {\r\n\t\t\tBaseAlert(obj, \"新用户名不能为空!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tobj=document.myform.newpwd1;\r\n\t\tobj.value=BaseTrim(obj.value);\r\n\t\tif (obj.value==\"\") {\r\n\t\t\tBaseAlert(obj, \"新密码不能为空!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (document.myform.newpw";
echo "d1.value!=document.myform.newpwd2.value){\r\n\t\t\tBaseAlert(document.myform.newpwd1, \"新密码和确认密码不相同!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\t</script>\r\n\r\n\t<table border=0 cellspacing=1 align=center class=navi>\r\n\t<tr><th>";
echo $sPosition;
echo "</th></tr>\r\n\t</table>\r\n\r\n\t<br>\r\n\r\n\t<table border=0 cellspacing=1 align=center class=form>\r\n\t<form action='?action=modi' method=post name=myform onsubmit=\"return checklogin()\">\r\n\t<tr>\r\n\t\t<th>设置名称</th>\r\n\t\t<th>基本参数设置</th>\r\n\t\t<th>设置说明</th>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td width=\"15%\">新用户名:</td>\r\n\t\t<td width=\"55%\"><input type=text class=input size=20 name=newusr value=\"";
echo htmlspecialchars( $_SESSION['eWebEditor_User'] );
echo "\"></td>\r\n\t\t<td width=\"30%\">";
echo "<s";
echo "pan class=red>*</span> 旧用户名:";
echo "<s";
echo "pan class=blue>";
echo htmlspecialchars( $_SESSION['eWebEditor_User'] );
echo "</span></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td width=\"15%\">新 密 码:</td>\r\n\t\t<td width=\"55%\"><input type=password class=input size=20 name=newpwd1 maxlength=30></td>\r\n\t\t<td width=\"30%\">";
echo "<s";
echo "pan class=red>*</span></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td width=\"15%\">确认密码:</td>\r\n\t\t<td width=\"55%\"><input type=password class=input size=20 name=newpwd2 maxlength=30></td>\r\n\t\t<td width=\"30%\">";
echo "<s";
echo "pan class=red>*</span></td>\r\n\t</tr>\r\n\t<tr><td align=center colspan=3><input type=submit name=bSubmit value=\" 提交 \"></a> <input type=reset name=bReset value=\" 重填 \"></td></tr>\r\n\t</form>\r\n\t</table>\r\n\r\n\t";
}
function domodi( )
{
$sNewUsr = totrim( "newusr" );
$sNewPwd1 = totrim( "newpwd1" );
$sNewPwd2 = totrim( "newpwd2" );
if ( $sNewUsr == "" )
{
goerror( "新用户名不能为空!" );
}
if ( $sNewPwd1 == "" )
{
goerror( "新密码不能为空!" );
}
if ( $sNewPwd1 != $sNewPwd2 )
{
goerror( "新密码和确认密码不相同!" );
}
$GLOBALS['sUsername'] = $sNewUsr;
$GLOBALS['sPassword'] = $sNewPwd1;
writeconfig( );
echo "\t<table border=0 cellspacing=1 align=center class=navi>\r\n\t<tr><th>";
echo $sPosition;
echo "</th></tr>\r\n\t</table>\r\n\r\n\t<br>\r\n\r\n\t<table border=0 cellspacing=1 align=center class=list>\r\n\t<tr>\r\n\t\t<td>登录用户名及密码修改成功!</td>\r\n\t</tr>\r\n\t</table>\r\n\t";
}
require( "private.php" );
$sPosition = $sPosition."修改用户名及密码";
ewebeditor_header( );
ewebeditor_content( );
ewebeditor_footer( );
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -