www.gusucode.com > 漂亮的地方旅游景点景观介绍网站源代码 > admin/plane/plane.asp
<!--#include file="../config.asp" --> <!--#include file="../../inc/page.asp" --> <script language="javascript" src="../../Calendar.js"></script> <% call zwtj() '属性///////////////////////////////////////////////////////////////// sub tssx(sx1,sx2) if sx1=1 then Response.Write("<span class=""fontr"">[置顶]<span>") end if if sx2=1 then Response.Write("<span class=""fontr"">[禁用]<span>") end if end sub '/////////////////////////////////////////////////////////////////////////////////////////////// mytit=mytit&"<a href=""?"">机票管理</a> > " select case action case "add" mytit=mytit&"添加机票" call add() case "del" call del() case "show","" mytit=mytit&"机票列表" call show() case "ups" mytit=mytit&"编辑机票" call ups() case "px" mytit=mytit&"机票排序" call cdpx() case "zd" call zd() case "qxzd" call qxzd() case "jy" call jy() case "qy" call qy() case "aadd" call aadd() case "doup" call doup() case "qqzz" call qqzz() case "tj" call tj() case "qxtj" call qxtj() end select '机票列表/////////////////////////////////////////////////////////////////////////////////////// sub show() sql="select * from jw_plane order by zd desc,qz asc" call record(rs,sql,1) call head() %> <link href="../inc/mm.css" rel="stylesheet" type="text/css" /> <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#116BAE"> <tr> <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td id="tit"><strong><%= mytit %> || <a href="?action=add">添加机票 </a>|| <a href="?action=px">机票排序</a> || <a href="roadclass.asp">栏目管理</a></strong></td> </tr> <tr> <td> <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF"> <form name="form1" id="form1" method="post" action=""> <tr> <td width="2%" align="center" bgcolor="#C5E0F3"><strong>ID</strong></td> <td width="33%" bgcolor="#C5E0F3"><strong>航线</strong></td> <td width="15%" align="center" bgcolor="#C5E0F3"><strong>日期</strong></td> <td width="9%" align="center" bgcolor="#C5E0F3"><strong>原价</strong></td> <td width="8%" align="center" bgcolor="#C5E0F3"><strong>优惠价</strong></td> <td width="7%" align="center" bgcolor="#C5E0F3"><strong>折扣</strong></td> <td width="5%" align="center" bgcolor="#C5E0F3"><strong>权重</strong></td> <td width="9%" align="center" bgcolor="#C5E0F3"><strong>操作</strong></td> <td width="3%" align="center" bgcolor="#C5E0F3"><input type="checkbox" name="selectall" onClick="selectit()"/></td> </tr> <% dim i,sz sz=20 i=sz dim bgc %> <div style="display:none"><% call fenpage(sz,rs,10) %></div> <% do while not rs.eof and i>0 if i mod 2=0 then bgc="#D2E9FF" else bgc="#D2E1EE" end if %> <tr id="r<%=rs("id")%>" bgcolor=<%= bgc %> onMouseOver="museing(r<%=rs("id")%>,0,'<%= bgc %>')" onMouseOut="museing(r<%=rs("id")%>,1,'<%= bgc %>')"> <td align="center"><%= rs("id") %></td> <td> <%= rs("hangxian") %><% call tssx(rs("zd"),rs("show")) %> <% If rs("fcrq")<>"" Then %> [往返] <% End If %></td> <td align="center"> <%= rs("cfrq") %> <% If rs("fcrq")<>"" Then %> -- <%= rs("fcrq") %> <% End If %></td> <td align="center"><%= rs("price") %>元</td> <td align="center"><%= rs("price1") %>元</td> <td align="center"><%= rs("zhekou") %>折</td> <td align="center"><%= rs("qz") %></td> <td align="center"><table width="81" border="0" cellpadding="2" cellspacing="0"> <tr> <td valign="bottom"><a href="?action=ups&id=<%= rs("id") %>"><img src="../../images/admin/20050703091537508.gif" alt="编辑信息" width="14" height="15" border="0" align="absbottom" /></a></td> <td valign="bottom"><% If rs("show")=0 Then %> <a href="?action=jy&id=<%= rs("id") %>"><img src="../../images/admin/20050703091539318.gif" alt="锁定" width="13" height="13" border="0" align="absbottom" /></a> <% Else %> <a href="?action=qy&id=<%= rs("id") %>"><img src="../../images/admin/20050703091613193.gif" alt="解锁" width="12" height="13" border="0" align="absbottom" /></a> <% End If %></td> <td valign="bottom"><% If rs("zd")=0 Then %> <a href="?action=zd&id=<%= rs("id") %>"><img src="../../images/admin/qxzd.gif" alt="置顶" width="16" height="16" border="0" align="absbottom" /></a> <% Else %> <a href="?action=qxzd&id=<%= rs("id") %>"><img src="../../images/admin/zd.gif" alt="取消置顶" width="16" height="16" border="0" align="absbottom" /></a> <% End If %></td> <td valign="bottom"><% If rs("tj")=0 Then %> <a href="?action=tj&id=<%= rs("id") %>"><img src="../../images/admin/qxtj.gif" alt="推荐" width="16" height="18" border="0" align="absbottom" /></a> <% Else %> <a href="?action=qxtj&id=<%= rs("id") %>"><img src="../../images/admin/tj.gif" alt="取消推荐" width="16" height="18" border="0" align="absbottom" /></a> <% End If %></td> </tr> </table></td> <td align="center"><input name="idstr" type="checkbox" value="<%= rs("id") %>" onclick="td_bgcolor(r<%=rs("id")%>,1);"></td> </tr> <% i=i-1 rs.movenext loop %> <tr> <td colspan="9" bgcolor="#C5E0F3"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="8%"><input name="del" type="button" class="button_1" id="del" value="删除所选" onmouseup="tjqr('您确定要删除?此操作无法逆转!','?action=del')" onmouseover="this.className='button_2'" onmouseout="this.className='button_1'"/></td> <td width="92%"><% call fenpage(sz,rs,10) %></td> </tr> </table></td> </tr> </form> </table></td> </tr> </table></td> </tr> </table> <% call recordend(rs) call connend() call foot() end sub '添加///////////////////////////////////////////////////////////////////////////////////////////// sub add() call chkqx(9,4) call head() %> <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#116BAE"> <tr> <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td id="tit"><strong><%= mytit %> || <a href="?action=px">机票排序</a> || <a href="roadclass.asp">栏目管理</a></strong></td> </tr> <tr> <td> <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF"> <form action="" name="form1" id="form1" method="post"> <tr> <td width="8%" bgcolor="#C5E0F3">航 线:</td> <td width="92%" bgcolor="#C5E0F3"><input name="hangxian" type="text" class="inp" id="hangxian" size="40" onfocus="this.className='focus'" onblur="this.className='inp'"/></td> </tr> <tr> <td bgcolor="#C5E0F3">出发日期:</td> <td bgcolor="#C5E0F3"><input name="cfrq" type="text" class="inp" id="cfrq" size="40" onfocus="this.className='focus'" onblur="this.className='inp'" onclick="calendar()"/></td> </tr> <tr> <td bgcolor="#C5E0F3">返程日期:</td> <td bgcolor="#C5E0F3"><input name="fcrq" type="text" class="inp" id="fcrq" size="40" onfocus="this.className='focus'" onblur="this.className='inp'" onclick="calendar()"/></td> </tr> <tr> <td bgcolor="#C5E0F3">原 价:</td> <td bgcolor="#C5E0F3"><input name="price" type="text" class="inp" id="price" size="40" onfocus="this.className='focus'" onblur="this.className='inp'"/></td> </tr> <tr> <td bgcolor="#C5E0F3">折 扣:</td> <td bgcolor="#C5E0F3"><input name="price1" type="text" class="inp" id="price1" size="40" onFocus="this.className='focus'" onBlur="this.className='inp'"/></td> </tr> <tr> <td bgcolor="#C5E0F3">优 惠 价:</td> <td bgcolor="#C5E0F3"><input name="zhekou" type="text" class="inp" id="zhekou" size="40" onfocus="this.className='focus'" onblur="this.className='inp'"/></td> </tr> <tr> <td bgcolor="#C5E0F3">属 性:</td> <td bgcolor="#C5E0F3"><table border="0" cellpadding="2" cellspacing="0"> <tr> <td bgcolor="#C5E0F3">审核</td> <td bgcolor="#C5E0F3"><input name="show" type="checkbox" id="show3" value="0" checked="checked" /></td> <td bgcolor="#C5E0F3">置顶</td> <td bgcolor="#C5E0F3"><input name="zd" type="checkbox" id="zd3" value="1" /></td> <td bgcolor="#C5E0F3">推荐</td> <td bgcolor="#C5E0F3"><input name="tj" type="checkbox" id="tj3" value="1" /></td> </tr> </table></td> </tr> <tr> <td colspan="2" bgcolor="#C5E0F3"><div id="msg"></div></td> </tr> <tr> <td colspan="2" bgcolor="#C5E0F3"><input onclick="goo('?action=aadd')" name="go" type="button" class="button_1" id="go" value="提交" onmouseover="this.className='button_2'" onmouseout="this.className='button_1'"> <input name="reset" type="reset" class="button_1" id="reset" value="重置" onmouseover="this.className='button_2'" onmouseout="this.className='button_1'"/></td> </tr> </form> </table> </td> </tr> </table> </td> </tr> </table> <SCRIPT language="javascript" event="onkeydown" for="document"> if(event.keyCode==13&&event.srcElement.type!='button'&&event.srcElement.type!='submit'&&event.srcElement.type!='reset'&&event.srcElement.type!='textarea'&&event.srcElement.type!='') goo('?action=aadd'); </SCRIPT> <% call connend() call foot() end sub '执行添加////////////////////////////////////////////////////////////////////////////////////// sub aadd() dim hangxian,cfrq,fcrq,price,price1,zhekou,show,zd,tj,qz hangxian=getform("hangxian",1,1) cfrq=getform("cfrq",1,1) fcrq=getform("fcrq",1,1) price=getform("price",1,1) price1=getform("price1",1,1) zhekou=getform("zhekou",1,1) qz=scpx1("jw_plane") if show="" then show=0 end if if zd="" then zd=0 end if if tj="" then tj=0 end if if hangxian="" or cfrq="" or price="" or price1="" or zhekou="" then call errs("请将信息填写完整") end if '插入记录//////////////////////////////////////////////////////////////////////////////////// call record(rs,"select top 1 * from jw_plane where 1=1",3) rs.addnew() rs("hangxian")=hangxian rs("cfrq")=cfrq rs("fcrq")=fcrq rs("price")=price rs("price1")=price1 rs("zhekou")=zhekou rs("show")=show rs("zd")=zd rs("tj")=tj rs("qz")=qz rs.update() call recordend(rs) if err.number>0 then call errs("有错误发生") end if call errs(0) end sub '修改//////////////////////////////////////////////////////////////////////////////////////////// sub ups() call chkqx(9,5) set rs=conn.execute("select * from jw_plane where id="&id) if rs.eof then call cc("记录不存在!") end if call head() %> <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#116BAE"> <tr> <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td id="tit"> <strong><%= mytit %> || <a href="?action=add">添加机票 </a>|| <a href="?action=px">机票排序</a> || <a href="roadclass.asp">栏目管理</a></strong></td> </tr> <tr> <td> <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF"> <form action="" name="form1" id="form1" method="post"> <tr> <td width="10%" bgcolor="#C5E0F3">航 线:</td> <td bgcolor="#C5E0F3"><input name="hangxian" type="text" class="inp" id="hangxian" size="40" onfocus="this.className='focus'" onblur="this.className='inp'" value="<%= rs("hangxian") %>"/></td> </tr> <tr style="display:none"> <td bgcolor="#C5E0F3">出发日期:</td> <td bgcolor="#C5E0F3"><input name="cfrq" type="text" class="inp" id="cfrq" size="40" onfocus="this.className='focus'" onblur="this.className='inp'" value="<%= rs("cfrq") %>" onclick="calendar()" /></td> </tr> <tr style="display:none"> <td bgcolor="#C5E0F3">返程日期:</td> <td bgcolor="#C5E0F3"><input value="<%= rs("fcrq") %>" name="fcrq" type="text" class="inp" id="fcrq" size="40" onFocus="this.className='focus'" onBlur="this.className='inp'" onclick="calendar()"/></td> </tr> <tr> <td bgcolor="#C5E0F3">原 价:</td> <td bgcolor="#C5E0F3"><input name="price" type="text" class="inp" id="price" size="40" onfocus="this.className='focus'" onblur="this.className='inp'" value="<%= rs("price") %>"/></td> </tr> <tr> <td bgcolor="#C5E0F3">折 扣:</td> <td bgcolor="#C5E0F3"><input name="zhekou" type="text" class="inp" id="zhekou" size="40" value="<%= rs("zhekou") %>" onfocus="this.className='focus'" onblur="this.className='inp'"/></td> </tr> <tr> <td bgcolor="#C5E0F3">优 惠 价:</td> <td bgcolor="#C5E0F3"><input name="price1" type="text" class="inp" id="price1" size="40" value="<%= rs("price1") %>" onfocus="this.className='focus'" onblur="this.className='inp'"/></td> </tr> <tr> <td bgcolor="#C5E0F3">属 性:</td> <td bgcolor="#C5E0F3"><table border="0" cellpadding="2" cellspacing="0"> <tr> <td bgcolor="#C5E0F3">审核</td> <td bgcolor="#C5E0F3"><input name="show" type="checkbox" id="show" value="0" <% If rs("show")=0 Then Response.Write("checked") end if%>/></td> <td bgcolor="#C5E0F3">置顶</td> <td bgcolor="#C5E0F3"><input name="zd" type="checkbox" id="zd" value="1" <% If rs("zd")=1 Then Response.Write("checked") end if%>/></td> <td bgcolor="#C5E0F3">推荐</td> <td bgcolor="#C5E0F3"><input name="tj" type="checkbox" id="tj" value="1" <% If rs("tj")=1 Then Response.Write("checked") end if%>/></td> </tr> </table></td> </tr> <tr> <td bgcolor="#C5E0F3">最后更新:</td> <td bgcolor="#C5E0F3"><input name="lastm" type="text" class="inp" id="lastm3" size="50" disabled="disabled" value="<%= rs("lastm") %>" onfocus="this.className='focus'" onblur="this.className='inp'"/></td> </tr> <tr> <td colspan="2" bgcolor="#C5E0F3"><div id="msg"></div></td> </tr> <tr> <td colspan="2" bgcolor="#C5E0F3"><input onclick="goo('?action=doup&id=<%= rs("id") %>')" name="go" type="button" class="button_1" id="go" value="提交" onmouseover="this.className='button_2'" onmouseout="this.className='button_1'"> <input name="reset" type="reset" class="button_1" id="reset" value="重置" onmouseover="this.className='button_2'" onmouseout="this.className='button_1'" /></td> </tr> </form> </table> </td> </tr> </table> </td> </tr> </table> <SCRIPT language="javascript" event="onkeydown" for="document"> if(event.keyCode==13&&event.srcElement.type!='button'&&event.srcElement.type!='submit'&&event.srcElement.type!='reset'&&event.srcElement.type!='textarea'&&event.srcElement.type!='') goo('?action=doup&id=<%= id %>'); </SCRIPT> <% call connend() call foot() end sub '执行修改//////////////////////////////////////////////////////////////////////////////////// sub doup() dim hangxian,cfrq,fcrq,price,price1,zhekou,show,zd,tj hangxian=getform("hangxian",1,1) cfrq=getform("cfrq",1,1) fcrq=getform("fcrq",1,1) price=getform("price",1,1) price1=getform("price1",1,1) zhekou=getform("zhekou",1,1) if show="" then show=0 end if if zd="" then zd=0 end if if tj="" then tj=0 end if if hangxian="" or cfrq="" or price="" or price1="" or zhekou="" then call errs("请将信息填写完整") end if '更新记录//////////////////////////////////////////////////////////////////////////////////// call record(rs,"select * from jw_plane where id="&id,3) rs("hangxian")=hangxian rs("cfrq")=cfrq rs("fcrq")=fcrq rs("price")=price rs("price1")=price1 rs("zhekou")=zhekou rs("show")=show rs("zd")=zd rs("tj")=tj rs.update call recordend(rs) call zhgx("jw_plane",id) '结束///////////////////////////////////////////////////////////////////////////////////// if err.number>0 then call errs("有错误发生") end if call errs(0) end sub '删除////////////////////////////////////////////////////////////////////////////////////////// sub del() dim dpic,j dim idstr,iid,i idstr=replace(Trim(Request.Form("idstr"))," ","") iid=split(idstr,",") for i=0 to ubound(iid) '删除机票 conn.execute("delete * from jw_plane where id="&iid(i)) next call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub '机票排序/////////////////////////////////////////////////////////////////////////////// sub cdpx() sql="select * from jw_plane order by zd desc,qz desc" call record(rs,sql,1) call head() %> <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#116BAE"> <tr> <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td id="tit"><strong><%= mytit %> || <a href="?action=add">添加机票 </a>|| <a href="?action=px">机票排序</a> || <a href="roadclass.asp">栏目管理</a></strong></td> </tr> <tr> <td> <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td width="2%" align="center" bgcolor="#D9ECF7"><strong>ID</strong></td> <td width="43%" bgcolor="#D9ECF7"><strong>机票名称</strong></td> <td width="29%" align="center" bgcolor="#D9ECF7"><strong>权重</strong></td> </tr> <% dim i,sz sz=20 i=sz dim bgc %> <div style="display:none"><% call fenpage(sz,rs,10) %></div> <% do while not rs.eof and i>0 if i mod 2=0 then bgc="#D2E9FF" else bgc="#D2E1EE" end if %> <form action="?action=qqzz&id=<%= rs("id") %>" name="form" id="form" method="post"> <tr id="r<%=rs("id")%>" bgcolor=<%= bgc %> onMouseOver="museing(r<%=rs("id")%>,0,'<%= bgc %>')" onMouseOut="museing(r<%=rs("id")%>,1,'<%= bgc %>')"> <td align="center"><%= rs("id") %></td> <td><%= rs("mc") %></td> <td align="center"><input name="qz" type="text" class="btn2" id="qz" size="8" value="<%= rs("qz") %>"><input name="Submit" type="submit" class="btn2" value="更新"></td> </tr> </form> <% i=i+1 rs.movenext loop %> <tr> <td colspan="3" bgcolor="#EAF4FB"><% call fenpage(sz,rs,10) %></td> </tr> </table></td> </tr> </table></td> </tr> </table> <% call recordend(rs) call connend() call foot() end sub '执行排序////////////////////////////////////////////////////////////////////////////// sub qqzz() call dopx1("jw_plane",id,Trim(Request.Form("qz"))) call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub '置顶////////////////////////////////////////////////////////////////////////////////////// sub zd() dim val val=1 if id<>"" then call uptab("jw_plane","zd",val,"id",id) call zhgx("jw_plane",id) end if call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub '取消置顶////////////////////////////////////////////////////////////////////////////////////// sub qxzd() call chkqx(9,5) dim val val=0 if id<>"" then call uptab("jw_plane","zd",val,"id",id) call zhgx("jw_plane",id) end if call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub '禁用////////////////////////////////////////////////////////////////////////////////////// sub jy() call chkqx(9,5) dim val val=1 if id<>"" then call uptab("jw_plane","show",val,"id",id) call zhgx("jw_plane",id) end if call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub '起用////////////////////////////////////////////////////////////////////////////////////// sub qy() call chkqx(9,5) dim val val=0 if id<>"" then call uptab("jw_plane","show",val,"id",id) call zhgx("jw_plane",id) end if call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub '推荐////////////////////////////////////////////////////////////////////////////////////// sub tj() call chkqx(9,5) dim val val=1 if id<>"" then call uptab("jw_plane","tj",val,"id",id) call zhgx("jw_plane",id) end if call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub '取消推荐////////////////////////////////////////////////////////////////////////////////////// sub qxtj() call chkqx(9,5) dim val val=0 if id<>"" then call uptab("jw_plane","tj",val,"id",id) call zhgx("jw_plane",id) end if call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub %> <script language="javascript" src="/<%= hturl %>/inc/chk.js"></script> <script language="javascript"> function goo(act) { GE("go").disabled="disabled"; GE("reset").disabled="disabled"; var hangxian=escape(GE("hangxian").value); var cfrq=escape(GE("cfrq").value); var fcrq=escape(GE("fcrq").value); var price=escape(GE("price").value); var price1=escape(GE("price1").value); var zhekou=escape(GE("zhekou").value); var show; if(GE("show").checked) {show=0;} else{show=1;} var zd; if(GE("zd").checked) {zd=1;} else{zd=0;} var tj; if(GE("tj").checked) {tj=1;} else{tj=0;} var Ajax = new oAjax(act,backs); var arrKey = new Array("hangxian","cfrq","fcrq","price","price1","zhekou","show","zd","tj"); var arrValue =new Array(hangxian,cfrq,fcrq,price,price1,zhekou,show,zd,tj); Ajax.Post(arrKey,arrValue); GE("msg").innerHTML=loading; function backs(str) { if(str=="0") { GE("msg").innerHTML=ok+" 操作成功"; window.location.href="?" } else { GE("msg").className="d_err"; GE("msg").innerHTML=err+" "+unescape(str); GE("go").disabled=""; GE("reset").disabled=""; } } } </script>