📄 edit.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
if ( $_REQUEST['res_id'] != "" )
{
$sql = "SELECT * FROM user_resource WHERE RES_ID=".$_REQUEST['res_id'];
$rs = exequery( $connection, $sql );
$row = mysql_fetch_array( $rs );
$res_id = $row['RES_ID'];
$res_rss_url = $row['RES_RSS_URL'];
$res_title = $row['RES_TITLE'];
$res_keyword = $row['RES_KEYWORD'];
$res_record_num = $row['RES_RECORD_NUM'];
$res_index = $row['RES_INDEX'];
$res_type = $row['RES_TYPE'] ? 1 : 0;
}
$res_type = $res_type ? 1 : 0;
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";
echo "<s";
echo "cript src=\"../../inc/checkform_function.js\" language=\"javascript\"></script>\r\n";
echo "<s";
echo "cript Language=\"JavaScript\">\r\n\r\n\r\nfunction CheckForm()\r\n{\r\n \r\n\r\n if(Trim(document.form1.RES_TITLE.value)==\"\")\r\n {\r\n alert(\"标题不能为空!\");\r\n\t document.form1.RES_TITLE.focus();\r\n return (false);\r\n }\r\n\r\n\r\n \r\n if (document.form1.RES_TYPE1.checked != \"\")\r\n { \r\n if (Trim(document.form1.RES_RSS_URL.value) == ''){\r\n\t alert(\"RSS地址不能为空!\");\r\n\t document.form1.RES_R";
echo "SS_URL.focus();\r\n\t return (false);\r\n\t }\r\n }\r\n \r\n else\r\n { \r\n if (Trim(document.form1.RES_KEYWORD.value) == ''){\r\n\t alert(\"关键词不能为空!\");\r\n\t\t document.form1.RES_KEYWORD.focus();\r\n\t return (false);\r\n\t }\r\n } \r\n \r\n if (isNaN(document.form1.RES_RECORD_NUM.value) || document.form1.RES_RECORD_NUM.value < 1){\r\n \t alert(\"显示数目,请输入大于0的数字!\");\r\n\t\t ";
echo "document.form1.RES_RECORD_NUM.focus;\r\n\t return (false);\r\n \r\n }\r\n\r\n return (true);\r\n}\r\n\r\nfunction LoadWindow1()\r\n{\r\n URL=\"/module/rss/index.php\";\r\n loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;\r\n loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;\r\n window.showModalDialog(URL,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHe";
echo "ight:280px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n}\r\n\r\nfunction autoTitle(){\r\n var objSubject = document.getElementById('RES_TITLE'); \r\n\tvar objUrl = document.getElementById('RES_KEYWORD'); \r\n if (objSubject.value == ''){\r\n\t objSubject.value = objUrl.value;\r\n\t}\r\n}\r\n\r\nfunction showHelp(){\r\n var objRssHelp = document.getElementById('rssHelp');\r\n\tif (objRssHelp.style.display == ";
echo "\"none\"){\r\n\t\tobjRssHelp.style.display = \"\";\r\n\t}\r\n\telse{\r\n\t\tobjRssHelp.style.display = \"none\";\r\n\t}\r\n\t\r\n\r\n}\r\n\r\n\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\" onLoad=\"document.form1.RES_TITLE.focus();\">\r\n <form enctype=\"multipart/form-data\" action=\"do.php\" method=\"post\" name=\"form1\" onSubmit=\"return CheckForm();\">\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n <tr class=";
echo "\"tablehead1\">\r\n <td ><img src=\"/images/notify_new.gif\" align=\"absmiddle\">编辑资讯订阅</td>\r\n </tr>\r\n <tr>\r\n <td class=\"tablehead2\">\r\n <input type=\"image\" src=\"/images/button/submit.gif\" title=\"确定\">\r\n <a href=\"option.php\"><img src=\"/images/button/return.gif\" border=\"0\"></a>\r\n\t</td>\r\n </tr>\r\n</table>\r\n<hr width=\"95%\" height=\"1\" align=\"left\" color=\"#FFFFFF\">\r\n<table border=\"0\" width=\"100%\" cellpad";
echo "ding=\"5\" cellspacing=\"1\" align=\"center\" class=\"small\">\r\n \r\n <tr>\r\n <td width=\"20%\" nowrap class=\"TableLine2\"> 标 题:</td>\r\n <td class=\"TableLine1\">\r\n <input type=\"text\" name=\"RES_TITLE\" size=\"30\" maxlength=\"100\" class=\"BigInput\" value=\"";
echo $res_title;
echo "\">\r\n <input type=\"hidden\" name=\"f\" value=\"save\"></td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\" valign=\"top\"> 来源类型:</td>\r\n <td class=\"TableLine1\"><input type=\"radio\" name=\"RES_TYPE\" id=\"RES_TYPE0\" value=\"0\" onClick=\"SelectLinkType(0);\" ";
if ( $res_type == 0 )
{
echo "checked";
}
echo "><label for=\"RES_TYPE0\">自动搜索</label>\r\n <input type=\"radio\" name=\"RES_TYPE\" id=\"RES_TYPE1\" value=\"1\" onClick=\"SelectLinkType(1);\" ";
if ( $res_type == 1 )
{
echo "checked";
}
echo ">\r\n <label for=\"RES_TYPE1\">自定义RSS地址 </label> \r\n <a href=\"#\" onclick=\"showHelp();\" id=\"linkRh\" style=\"display:none\"><img src=\"/images/littlegif/que.gif\" border=\"0\" align=\"middle\">什么是RSS地址</a></td>\r\n </tr>\r\n <tr id=\"dkeyword\">\r\n <td nowrap class=\"TableLine2\">关 键 词:</td>\r\n <td nowrap class=\"TableLine1\"><input type=\"text\" name=\"RES_KEYWORD\" size=\"15\" maxlength=\"15\" class=\"B";
echo "igInput\" value=\"";
echo urldecode( $res_keyword );
echo "\" onChange=\"autoTitle();\"></td>\r\n </tr>\r\n <tr id=\"drssurl\">\r\n <td nowrap class=\"TableLine2\">RSS 地址:</td>\r\n <td nowrap class=\"TableLine1\"><input type=\"text\" name=\"RES_RSS_URL\" size=\"60\" maxlength=\"200\" class=\"BigInput\" value=\"";
echo $res_rss_url;
echo "\">\r\n <input type=\"button\" value=\"选择公共RSS地址\" onClick=\"LoadWindow1()\" title=\"选择公共RSS地址\" name=\"button322\"></td>\r\n </tr>\r\n \r\n <tr>\r\n <td nowrap class=\"TableLine2\">显示数目:</td>\r\n <td nowrap class=\"TableLine1\"><input type=\"text\" name=\"RES_RECORD_NUM\" size=\"4\" maxlength=\"2\" class=\"BigInput\" value=\"";
echo $res_record_num ? $res_record_num : 5;
echo "\"></td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\">主页显示:</td>\r\n <td class=\"TableLine1\"><input name=\"RES_INDEX\" type=\"checkbox\" value=\"1\" ";
if ( $res_index == 1 )
{
echo "checked";
}
echo "></td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\">共享RSS:</td>\r\n <td class=\"TableLine1\"><input name=\"IS_PUBLIC\" type=\"checkbox\" value=\"1\"> \r\n 添加公共RSS地址中</td>\r\n </tr>\r\n \r\n <input type=\"hidden\" value=\"";
echo $_REQUEST['res_id'];
echo "\" name=\"res_id\">\r\n </table>\r\n</form>\r\n<div id=\"rssHelp\" style=\"background-color:#f7f7f7;width:100%;height:20px;padding:5px;border:1px solid #CCCCCC;display:none\">当您浏览网站页面的时候,看到 <img src=\"/images/littlegif/xml.gif\"> 这样的标签,用鼠标右键点击图片,选择“复制快捷方式”。<br>\r\n <p><img src=\"/images/littlegif/help_01.gif\" width=\"236\" height=\"68\"></p>\r\n <p>然后将地址粘贴到上面的RSS地址
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -