📄 index.php
字号:
<?php
include_once( "inc/auth.php" );
echo "\r\n<html>\r\n<head>\r\n<title>公共网址设置</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n\r\n";
echo "<s";
echo "cript Language=\"JavaScript\">\r\nfunction CheckForm()\r\n{\r\n if(document.form1.URL_DESC.value==\"\")\r\n { alert(\"说明不能为空!\");\r\n return (false);\r\n }\r\n if(document.form1.URL.value==\"\")\r\n { alert(\"网址不能为空!\");\r\n return (false);\r\n }\r\n}\r\n\r\nfunction delete_url(URL_ID)\r\n{\r\n msg='确认要删除该项网址么?';\r\n if(window.confirm(msg))\r\n {\r\n URL=\"delete.php?URL_ID=\" + URL_ID;\r\n window.lo";
echo "cation=URL;\r\n }\r\n}\r\n\r\n\r\nfunction delete_all()\r\n{\r\n msg='确认要删除所有网址么?';\r\n if(window.confirm(msg))\r\n {\r\n URL=\"delete_all.php\";\r\n window.location=URL;\r\n }\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\" onload=\"document.form1.URL_NO.focus();\">\r\n <form action=\"add.php\" method=\"post\" name=\"form1\" onsubmit=\"return CheckForm();\"> \r\n <table border=\"0\" width=\"100%\" cellspacing=";
echo "\"1\" cellpadding=\"0\">\r\n <tr class=\"tablehead1\">\r\n <td><img src=\"/images/manage/systemmanage.gif\" align=\"absmiddle\">添加公共网址</td>\r\n </tr>\r\n <tr class=\"tablehead2\">\r\n <td><input name=\"image\" type=\"image\" src=\"../../../../images/button/add.gif\" width=\"105\" height=\"20\" border=\"0\"></td>\r\n </tr>\r\n </table>\r\n <br>\r\n<table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small";
echo "\" cellpadding=\"3\" align=\"center\" >\r\n\r\n <tr>\r\n <td width=\"18%\" nowrap class=\"tableline2\">序号:</td>\r\n <td width=\"82%\" nowrap class=\"tableline1\">\r\n <input type=\"text\" name=\"URL_NO\" class=\"BigInput\" size=\"10\" maxlength=\"25\">\r\n </td>\r\n <tr>\r\n <td nowrap class=\"tableline2\">说明:</td>\r\n <td nowrap class=\"tableline1\">\r\n <input type=\"text\" name=\"URL_DESC\" class=\"BigInput\" size=\"25\"";
echo " maxlength=\"200\">\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"tableline2\">网址:</td>\r\n <td nowrap class=\"tableline1\">\r\n <input type=\"text\" name=\"URL\" class=\"BigInput\" size=\"25\" maxlength=\"200\" value=\"http://\">\r\n </td>\r\n </tr>\r\n <tr>\r\n \r\n <input type=\"hidden\" name=\"USER\" value=\"\">\r\n \r\n \r\n</table>\r\n\r\n<br>\r\n\r\n<table width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" ";
echo "height=\"3\">\r\n <tr>\r\n <td background=\"/images/dian1.gif\" width=\"100%\"></td>\r\n </tr>\r\n</table>\r\n\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\">\r\n <tr>\r\n <td>管理公共网址\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr class=\"tablehead2\">\r\n <td height=\"30\"><a href=\"#\" OnClick=\"javascript:delete_all();\"><img src=\"../../../images/butto";
echo "n/alldel.gif\" width=\"105\" height=\"20\" border=\"0\"></a>\r\n\r\n </td>\r\n </tr>\r\n</table>\r\n<br>\r\n<div align=\"center\">\r\n\r\n";
$query = "SELECT * from URL where USER='' order by URL_NO";
$connection = openconnection( );
$cursor = exequery( $connection, $query );
$URL_COUNT = 0;
$LINE_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
++$URL_COUNT;
++$LINE_COUNT;
$URL_ID = $ROW['URL_ID'];
$URL_NO = $ROW['URL_NO'];
$URL_DESC = $ROW['URL_DESC'];
$URL = $ROW['URL'];
if ( $URL_COUNT == 1 )
{
echo "\r\n <table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\" cellpadding=\"3\">\r\n\r\n";
}
echo " ";
if ( $LINE_COUNT % 2 == 1 )
{
$TableLine = "TableLine1";
}
else
{
$TableLine = "TableLine2";
}
echo " <tr class=\"";
echo $TableLine;
echo "\">\r\n <td nowrap align=\"center\">";
echo $URL_NO;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $URL_DESC;
echo "</td>\r\n <td nowrap align=\"center\"><A href=\"";
echo $URL;
echo "\" target=\"_blank\">";
echo $URL;
echo "</A></td>\r\n <td nowrap align=\"center\" width=\"80\">\r\n <a href=\"edit.php?URL_ID=";
echo $URL_ID;
echo "\"> 编辑</a>\r\n <a href=\"javascript:delete_url('";
echo $URL_ID;
echo "');\"> 删除</a>\r\n </td>\r\n </tr>\r\n";
}
if ( 0 < $URL_COUNT )
{
echo " <thead class=\"TableHeader\">\r\n <td nowrap align=\"center\">序号</td>\r\n <td nowrap align=\"center\">说明</td>\r\n <td nowrap align=\"center\">网址</td>\r\n <td nowrap align=\"center\">操作</td>\r\n </thead>\r\n <thead class=\"TableControl\">\r\n </table>\r\n";
}
else
{
message( "", "尚未添加网址" );
}
echo "</div>\r\n </form>\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -