www.gusucode.com > 艺帆全站DIV+CSS体育用品公司网站源码 1.7.5源码程序 > i5808/admin_xinxisz.asp

    <!--#include file="../Conn.asp" -->
<!--#include file="seeion.asp"-->
<% 
set config=server.createobject("adodb.recordset") 
exec="select * from  config  " 
config.open exec,conn,1,1 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" id="css" href="images/style.css">
<title>信息显示设置</title>
<SCRIPT language=JavaScript src="../js/digital.js" type=text/javascript ></SCRIPT>
</head>
<body>
<form  name="add" method="post" action="admin_xinxisz.asp?xinxi=ok">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" >
  <tr>
    <td height="30" background="images/bg_list.gif"><div  style="padding-left:10px; font-weight:bold; color:#0075a9">信息显示设置</div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><%if session("qx")=2 then%><table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" >
      <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
        <td width="34%" height="30" class="td">新闻栏目每页显示条数</td>
        <td width="66%" class="td"><input name="newsclass" type="text" value="<%=config("newsclass")%>" size="30" onKeyPress="event.returnValue=IsDigit();" /></td>
      </tr>
    <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
        <td height="30" class="td">产品栏目每页显示个数</td>
        <td class="td"><input name="productsclass" type="text" value="<%=config("productsclass")%>" size="30" onKeyPress="event.returnValue=IsDigit();" />
          <input name="id" type="hidden" value="<%=config("id")%>" size="50" onkeypress="event.returnValue=IsDigit();" /></td>
    </tr>
    <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
      <td height="30" class="td">下载栏目每页显示条数</td>
      <td class="td"><input name="downclass" type="text" value="<%=config("downclass")%>" size="30" onKeyPress="event.returnValue=IsDigit();" /></td>
    </tr>
    <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
      <td height="30" class="td">人力资源栏目显示条数</td>
      <td class="td"><input name="jobclass" type="text" value="<%=config("jobclass")%>" size="30" onKeyPress="event.returnValue=IsDigit();" /></td>
    </tr>
    <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
      <td height="30" class="td">留言每页显示条数</td>
      <td class="td"><input name="lyclass" type="text" value="<%=config("lyclass")%>" size="30" onKeyPress="event.returnValue=IsDigit();" /></td>
    </tr>
    <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
      <td height="30" class="td">&nbsp;</td>
      <td class="td"><label>
        <input type="submit" name="button" id="button" value="保存设置" class="btn" />
      </label></td>
    </tr>
    </table>
    <%else%>
<div style=" padding:20px;font-size:14px; color:#990000; font-weight:bold; text-align:center">您没有权限操作!</div>
	<%response.end
	end if%></td>
  </tr>
</table></form>
</body>
</html>
<% 
if Request.QueryString("xinxi")="ok" then
id=request("id") 
IF not isNumeric(request("synews")) or not isNumeric(request("synewsproducts")) or not isNumeric(request("sytuijianproducts")) or not isNumeric(request("syabout"))  or not isNumeric(request("newsclass")) or not isNumeric(request("productsclass")) or not isNumeric(request("downclass")) or not isNumeric(request("jobclass")) or not isNumeric(request("lyclass")) then
response.write("<script>alert("" 错误!所有项要求必须为数字!""); history.go(-1);</script>")
response.end
end if
sql="select * from config where id="&id 
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
rs("synews")=request.form("synews") 
rs("synewsproducts")=request.form("synewsproducts") 
rs("sytuijianproducts")=request.form("sytuijianproducts") 
rs("syabout")=request.form("syabout") 
rs("newsclass")=request.form("newsclass") 
rs("productsclass")=request.form("productsclass") 
rs("downclass")=request.form("downclass") 
rs("jobclass")=request.form("jobclass") 
rs("lyclass")=request.form("lyclass") 
rs.update 
rs.close 
response.write "<script>alert('保存成功!');window.location.href='admin_xinxisz.asp';</script>"  
end if
%>