📄 login.php
字号:
<?php
function totrim( $name )
{
if ( isset( $_GET[$name] ) )
{
return trim( $_GET[$name] );
}
if ( isset( $_POST[$name] ) )
{
return trim( $_POST[$name] );
}
return "";
}
@session_start( );
require( "../php/config.php" );
$sAction = strtoupper( totrim( "action" ) );
switch ( $sAction )
{
case "LOGIN" :
$s_Usr = totrim( "usr" );
$s_Pwd = totrim( "pwd" );
if ( !( $s_Usr == $sUsername && $s_Pwd == $sPassword ) )
{
break;
}
$GLOBALS['_SESSION']['eWebEditor_User'] = $s_Usr;
header( "Location:default.php" );
exit( );
break;
case "OUT" :
$GLOBALS['_SESSION']['eWebEditor_User'] = "";
}
echo "\r\n<HTML>\r\n<HEAD>\r\n<TITLE>eWebEditor在线编辑器 - 后台管理</TITLE>\r\n<META http-equiv=Content-Type content=\"text/html; charset=gb2312\">\r\n";
echo "<s";
echo "tyle>\r\nbody,td,a,p,input{font-size:9pt}\r\nbody {margin:0px;background-color:#d9ddf7}\r\n.c92 {FONT-SIZE: 9pt; COLOR: #003366; LINE-HEIGHT: 150%}\r\nA:hover {COLOR: #ff9900}\r\nA:link {COLOR: #003366}\r\n.input {BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid}\r\n</style>\r\n\r\n";
echo "<S";
echo "CRIPT language=JavaScript>\r\nfunction checkForm(){\r\n\tvar frm = document.loginform\r\n\tif(frm.usr.value == \"\"){\r\n\t\talert('用户名不允许为空');\r\n\t\tfrm.usr.focus();\r\n\t\treturn false;\r\n\t}\r\n\tif(frm.pwd.value == \"\"){\r\n\t\talert('用户密码不允许为空');\r\n\t\tfrm.pwd.focus();\r\n\t\treturn false;\r\n\t}\r\n\tfrm.submit()\r\n}\r\n</SCRIPT>\r\n\r\n</head>\r\n<BODY onload=document.loginform.usr.focus()>\r\n<BR><BR>\r\n<TABLE cellSpacing=0 cellPaddi";
echo "ng=0 width=500 align=center border=0>\r\n <TBODY>\r\n <TR>\r\n <TD height=60></TD></TR></TBODY></TABLE>\r\n<TABLE cellSpacing=0 cellPadding=0 width=732 align=center border=0>\r\n <TBODY>\r\n <TR>\r\n <TD colSpan=7><IMG height=1 alt=\"\" src=\"images/spacer.gif\" width=718></TD>\r\n <TD rowSpan=6> </TD>\r\n <TD><IMG height=1 alt=\"\" src=\"images/spacer.gif\" width=1></TD></TR>\r\n <TR>\r\n <TD vAlign=bottom colSpan=3 rowS";
echo "pan=2><IMG height=201 alt=\"\" src=\"images/2_10.gif\" width=341></TD>\r\n <TD vAlign=bottom colSpan=2><IMG height=108 alt=\"\" src=\"images/2_11.gif\" width=295></TD>\r\n <TD colSpan=2> </TD>\r\n <TD><IMG height=110 alt=\"\" src=\"images/spacer.gif\" width=1></TD></TR>\r\n <TR>\r\n <TD background=images/1_12.gif colSpan=4>\r\n <TABLE cellSpacing=0 cellPadding=3 width=\"50%\" border=0>\r\n <FORM onkeydown=\"if";
echo "(event.keyCode==13) return checkForm()\" name=loginform action=\"?action=login\" method=post>\r\n <TBODY>\r\n <TR>\r\n <TD class=c92 width=\"24%\">用户名</TD>\r\n <TD width=\"76%\"><INPUT class=input size=16 name=usr> </TD></TR>\r\n <TR>\r\n <TD class=c92 width=\"24%\">密 码</TD>\r\n <TD width=\"76%\"><INPUT class=input type=password size=16 name=pwd> </TD></TR>\r\n <TR>\r\n ";
echo " <TD width=\"24%\"> </TD>\r\n <TD width=\"76%\">\r\n <DIV align=left> <IMG style=\"CURSOR: hand\" onclick=\"return checkForm()\" src=\"images/login.gif\" border=0> \r\n </DIV></TD></TR></FORM></TBODY></TABLE></TD>\r\n <TD><IMG height=93 alt=\"\" src=\"images/spacer.gif\" width=1></TD></TR>\r\n <TR>\r\n <TD width=254 background=images/1_13.gif colSpan=2 hei";
echo "ght=161><TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0>\r\n <TBODY>\r\n <TR>\r\n <TD height=50></TD></TR>\r\n <TR>\r\n <TD align=right></TD></TR>\r\n <TR>\r\n <TD height=20></TD></TR>\r\n <TR>\r\n <TD align=right></TD></TR></TBODY></TABLE></TD>\r\n <TD width=387 background=images/1_14.gif colSpan=4 height=212 \r\n rowSpan=2></TD>\r\n <TD rowSpan=3><IMG heig";
echo "ht=242 alt=\"\" src=\"images/spacer.gif\" width=77></TD>\r\n <TD><IMG height=161 alt=\"\" src=\"images/spacer.gif\" width=1></TD></TR>\r\n <TR>\r\n <TD colSpan=2 rowSpan=2><IMG height=81 alt=\"\" src=\"images/spacer.gif\" width=254></TD>\r\n <TD><IMG height=51 alt=\"\" src=\"images/spacer.gif\" width=1></TD></TR>\r\n <TR>\r\n <TD colSpan=4><IMG height=30 alt=\"\" src=\"images/spacer.gif\" width=387></TD>\r\n <TD><IMG height=30 alt=\"";
echo "\" src=\"images/spacer.gif\" width=1></TD></TR>\r\n <TR>\r\n <TD><IMG height=1 alt=\"\" src=\"images/spacer.gif\" width=195></TD>\r\n <TD><IMG height=1 alt=\"\" src=\"images/spacer.gif\" width=59></TD>\r\n <TD><IMG height=1 alt=\"\" src=\"images/spacer.gif\" width=87></TD>\r\n <TD><IMG height=1 alt=\"\" src=\"images/spacer.gif\" width=214></TD>\r\n <TD><IMG height=1 alt=\"\" src=\"images/spacer.gif\" width=81></TD>\r\n <TD><IMG height";
echo "=1 alt=\"\" src=\"images/spacer.gif\" width=5></TD>\r\n <TD><IMG height=1 alt=\"\" src=\"images/spacer.gif\" width=77></TD>\r\n <TD><IMG height=1 alt=\"\" src=\"images/spacer.gif\" width=14></TD>\r\n <TD></TD></TR></TBODY></TABLE>\r\n</BODY></HTML>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -