<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<p align=center><font color=red>您没有此项目管理权限！</font></p>"
response.End
end if
end if
%><!--#include file="ljconn.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from zsxx where id="&request("id")&" order by id desc",conn,1,1
%>
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="img/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	font-size: 12px;
	font-weight: bold;
}
.style3 {font-size: 12px}
.style5 {font-size: 12px; color: #FF0000; }
-->
</style>
</head>
<body>
<table class="tableBorder" width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr bgcolor="#E8F1FF">
<td height="25" align="center" background="img/admin_bg_1.gif"><span class="style1"><font color="#ffffff"><span class="style3">修改链接</span></font> </span></td>
</tr>
<tr bgcolor="#E8F1FF"> 
<form name="myform" method="post" action="savezsxx.asp?action=edit" OnSubmit="return checkkk()">
<td> 
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#ffffff">
		 <tr bgcolor="#E8F1FF" style="display:none;"> 
            <td width="20%" align="right" class="style3"><span class="style3">推荐:</span></td>
            <td class="style3"><label>
              <input type="radio" name="anclassid" value="1" <%if rs("anclassid")=1 then%>checked<%end if %>>
             是  
             <input name="anclassid" type="radio" value="0" <%if rs("anclassid")=0 then%>checked<%end if %>>
             否
            </label></td>
		  </tr>
          
          
          <tr bgcolor="#E8F1FF"> 
            <td width="20%" align="right"><span class="style3">分类:</span></td>
            <td><label><select name="lbid" id="lbid">
              <option value="1" <%if rs("lbid")=1 then%>selected<%end if%>>国内食品安全相关网站</option>
              <option value="2" <%if rs("lbid")=2 then%>selected<%end if%>>国际食品安全相关网站</option>
              <option value="3" <%if rs("lbid")=3 then%>selected<%end if%>>食品安全相关政府机构网站</option>
              </select></label></td>
		  </tr>
          
          
          
          
          <tr bgcolor="#E8F1FF"> 
            <td width="20%" align="right"><span class="style3">标题:</span></td>
            <td><input name="title" type="text" id="title" value="<%=rs("title")%>" size="30" maxlength="100">
              <span class="style5">*</span></td>
		  </tr>
		  
		  
		  
		  		  <tr bgcolor="#E8F1FF"> 
            <td width="12%" align="right" class="style3">排序:</td>
            <td colspan="3"><span class="style1"><span class="style1">
              <label>              </label>
            </span><span class="style3">
            <label>
            <input name="px" type="text" id="px" onKeyUp="this.value=this.value.replace(/\D/g,'')" value="<%=rs("px")%>" size="5" maxlength="4" onpaste = "return false">
            </label>
            </span>
            <label>              </label>
              </span>
              <label><span class="style5">*(说明：请填写数字。)</span></label>
              <span class="style5">
              <label></label>
              </span> </td>
          </tr>
		  
		  <tr bgcolor="#E8F1FF"> 
            <td width="20%" align="right"><span class="style3">网址:</span></td>
            <td><input name="url" type="text" id="url" value="<%=rs("url")%>" size="30" maxlength="255">
              <span class="style5">*</span> </td>
		  </tr>
		  
		  <tr bgcolor="#E8F1FF" style="display:;"> 
            <td width="20%" align="right"><span class="style3">图片:</span></td>
            <td>
              <input name="img" type="text" id="img" value="<%=rs("img")%>" size="30" maxlength="150">
              <input class="button" type="button" name="Submit2" value="上传图片" onClick="window.open('../klsdtc.asp?formname=myform&editname=img&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> 
              <span class="style5">图片为空则为&quot;文字链接&quot;,否则为&quot;图片文字&quot;</span></td>
		  </tr>
          <tr bgcolor="#E8F1FF"> 
            <td></td>
            <td height="30"> <span class="style3">
              <input type="submit" name="Submit" value=" 修改保存 "> 
              <input onClick="ClearReset()" type=reset name="Clear" value=" 重新填写 ">
              <input name="id" type="hidden" id="id" value="<%=rs("id")%>">
            </span></td>
          </tr>
        </table>
</td>
</form>
</tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkkk()
{
     if(checkspace(document.myform.title.value)) {
	document.myform.title.focus();
    alert("请输入标题！");
	return false;
  }
     
     if(checkspace(document.myform.px.value)) {
	document.myform.px.focus();
    alert("请输入排序！");
	return false;
  }
	 
	   if(checkspace(document.myform.url.value)) {
	document.myform.url.focus();
    alert("网址不能为空！");
	return false;
  }

}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
//-->
</script>

<script>
	function regInput(obj, reg, inputStr)
	{
		var docSel	= document.selection.createRange()
		if (docSel.parentElement().tagName != "INPUT")	return false
		oSel = docSel.duplicate()
		oSel.text = ""
		var srcRange	= obj.createTextRange()
		oSel.setEndPoint("StartToStart", srcRange)
		var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
		return reg.test(str)
	}
</script>
<%
rs.close
Set rs=Nothing
conn.close
Set conn=Nothing
%>