www.gusucode.com > 中网景企业网站源码时尚版 2009.73码程序 > admin/sendway.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!--#include file="opendb.asp" --> <% Call CheckAdmin() Call CnkAdminRight(32) thispage=request("page_code") if thispage="" then thispage=1 else thispage=clng(thispage) end if if thispage<1 then thispage=1 PagePara="?tmp=" dim action action=Trim(Request.Form("Action")) If action="saveadd" Then sql="insert into cnk_sendway (sendname,sendprice,Lang)" sql=sql&" values ('"&Trim(Request.Form("sendname"))&"',"&Trim(Request.Form("sendprice"))&","&Trim(Request.Form("Lang"))&")" conn.execute(sql) Call alertmsg_url("添加成功","sendway.asp") End If If action="modi" Then sql="update cnk_sendway set sendname='"&Trim(Request.Form("sendname"))&"',sendprice="&Trim(Request.Form("sendprice"))&" where id="&Trim(Request.Form("id")) conn.execute(sql) Call alertmsg_url("修改成功","sendway.asp") End If if Request.QueryString("del")<>"" then conn.execute("delete from cnk_sendway where id="&Request.QueryString("del")) Call Head() %> <script language="javascript"> <!-- function mOvr(src,clrOver){ if (!src.contains(event.fromElement)) { //src.style.cursor = 'hand'; src.bgColor = clrOver; } } function mOut(src,clrIn) { if (!src.contains(event.toElement)) { src.style.cursor = 'default'; src.bgColor = clrIn; } } function mClk1(src,id) { window.location .href =src; } //--> </script> <script language="JavaScript"> <!-- function cform(){ if(!confirm("真的删除吗?")) return false; }//--> </script> <body> <div class="cnkbox"> <div class="title">发货方式管理</div> <form name="form1" method="post" action="sendway.asp"> <div id="list"> <ul> <li class="t1">语言版本:</li> <li class="t2"> <input name="Lang" type="radio" id="lang1" value="0" checked> <label for="lang1">中文</label> <input type="radio" name="Lang" value="1" id="lang2"> <label for="lang2">English</label> </li> </ul> <ul> <li class="t1">送货方式:</li> <li class="t2"> <input name="sendname" type="text" class="input" id="sendname" size="50" maxlength="50" /> </li> </ul> <ul> <li class="t1">运 费:</li> <li class="t2"> <input name="sendprice" type="text" class="input" id="sendprice" value="0" size="50" maxlength="8" /> 只填数字 </li> </ul> <br> <ul> <li class="t1"><input name="Action" type="hidden" id="Action" value="saveadd" /></li> <li class="t2"> <input name="submit" type="submit" class="button" value="添加" /> </li> </ul> <div class="clearboth"></div> </div> </form> <div class="content"> <% Dim ipage rs.open "select * from cnk_sendway order by Lang,id",conn,1,1 if rs.recordcount=0 then Response.Write "未有内容" Response.end else rs.pagesize=20 if thispage>rs.pagecount then thispage=rs.pagecount rs.AbsolutePage = thispage %> <table width="96%" border="0" cellpadding="3" cellspacing="1"> <tr bgcolor="#C2E0FE" align="center"> <td width="14%">语言</td> <td width="44%">送货方式</td> <td width="24%"> 运费</td> <td width="18%" align="center">操作</td> </tr> <% for ipage=1 to rs.pagesize%> <form name="form<%= rs("id") %>" method="post" action="sendway.asp"> <tr bgcolor="#F6F6F6" onMouseOut="mOut(this,'#F6F6F6');" onMouseOver="mOvr(this,'#EBFFBB');" align="center"> <td><% If rs("Lang")=0 Then Response.Write("中文") Else Response.Write("English")%></td> <td><input name="sendname" type="text" id="sendname" value="<%= rs("sendname") %>" size="40"></td> <td><input name="sendprice" type="text" id="sendprice" value="<%= rs("sendprice") %>"></td> <td> <input name="action" type="hidden" id="action" value="modi"> <input name="id" type="hidden" id="id" value="<%= rs("id") %>"> <input type="submit" name="Submit" class="button" value="修改"> | <a href="?del=<%=rs("id")%>" onClick="return cform()">删除</a></td> </tr> </form> <%rs.movenext if rs.eof then exit for next%> </table> <table width="96%" height="21" border="0" background="images/bg-xg.gif" bgcolor="#EFEFEF"> <tr> <td width="50%"><% = GetPageList(rs.pagecount,thispage,PagePara,0) %></td> <td width="50%" align="right"> 共<strong><%=rs.recordcount%></strong> 条 <% = GetPage(rs.pagecount,thispage,PagePara,0) %></td> </tr> </table> <% rs.close set rs=nothing End If %> </div> </div> <% Call Foot() Call Closedb() %>