⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_addxl.asp

📁 一个有用的东西 希望大家喜欢 谢谢大家对本站的支持
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--===============================================================-->
<!--Mfkiqpl旅行社旅游线路预订程序源代码仅供学习或部分旅行社网站用---->
<!--任何单位或个人不得随意修改、截取其中代码或做不法用途------------->
<!--版权归属:mfkiqpl   http://www.zjjnet.com 所有-------------------->
<!--请务必保留以下版权信息------------------------------------------->
<!--作者:mfkiqpl----------------------------------------------------->
<!--QQ:31827726 mail:mfkiqpl@126.com--------------------------------->
<!--主页地址:http://www.zjjnet.com----------------------------------->
<!----------------欢迎各位站长与本人小站进行友情链接----------------->
<!--===============================================================-->
<!--#include file="conn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
managemode
dim action
action=trim(request("action"))
select case action
case "add"
add
case "addok"
addok
case "del"
del
case "delok"
delok
case "edit"
edit
case "editok"
editok
case "editok1"
editok1
case else
response.write("<script>alert('错误的传递参数!');history.back(1);</script>")
end select
sub add
%>
<script>
function check(){
if(form1.ta.value=='' || form1.tb.value=='' || form1.tc.value=='' || form1.td.value=='' || form1.te.value=='' || form1.tf.value=='' || form1.tg.value=='' || form1.th.value==''){
alert("请认真填写上面所有项!");
return false;
}
}
</script>
<table width="618" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<form action="?action=addok" method="post" enctype="multipart/form-data" name="form1" onSubmit="return check();">
  <tr bgcolor="#FFFFFF">
    <td width="135" height="24" align="center" bgcolor="#f5f5f5">线路名称:</td>
    <td width="480">   
    <input name="ta" type="text" id="ta" size="50"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="24" align="center" bgcolor="#f5f5f5">线路报价:</td>
    <td> 
    <input name="tb" type="text" id="tb" size="15">
    请用统一简结格式:XXXRMB/人、XXX人民币/人</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="24" align="center" bgcolor="#f5f5f5">线路类型:</td>
    <td> 
    <input name="tc" type="text" id="tc" size="15">
    如:常规线、精品线 等 </td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="24" align="center" bgcolor="#f5f5f5">线路类别:</td>
    <td> 
      <select name="td" id="td">
        <%
set rs=conn.execute("select id,board from board order by id desc")
while not rs.eof
response.write("<option value="""&trim(rs("id"))&""">"&rs("board")&"</option>")
rs.movenext
wend
closers(rs)
%>
      </select>
    请先择。如没有类型,请先建立类别后再添加线路</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="24" align="center" bgcolor="#f5f5f5">是否置顶:</td>
    <td>   
      <select name="x_top" id="x_top">
        <option value="0" selected>不置顶</option>
        <option value="1">置 顶</option>
      </select>
      置顶后,此线路总是显示在最前面</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="24" align="center" bgcolor="#f5f5f5">线路时间:</td>
    <td> 
    <input name="te" type="text" id="te" size="20">
    请用统一简结格式:三天二晚游、四日五晚游 等 </td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="110" align="center" bgcolor="#f5f5f5">行程安排:</td>
    <td height="110"> 
    <textarea name="tf" cols="60" rows="6" id="tf">无</textarea></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="110" align="center" bgcolor="#f5f5f5">线路途经景点:</td>
    <td height="110"> 
    <textarea name="tg" cols="60" rows="6" id="tg">无</textarea></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="110" align="center" bgcolor="#f5f5f5">线路、行程说明:</td>
    <td height="110"> 
    <textarea name="th" cols="60" rows="6" id="th">无</textarea></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="110" align="center" bgcolor="#f5f5f5">备   注:</td>
    <td height="110"> 
      <textarea name="tk" cols="60" rows="6" id="tk">无</textarea></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="24" align="center" bgcolor="#f5f5f5">线路景点图片:</td>
    <td>     
	<input name="ttt" type="file" id="ttt" size="40">    </td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="24" colspan="2">  *上传文件类型为:gif,jpg,bmp,大小<2M。除图片外所有项均为必填写项。</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="24" colspan="2" align="center"><input type="submit" name="Submit" value="确 定 添 加"></td>
    </tr>
</form>
</table>
<%
end sub

sub addok
%>
<!--#include file="system/upload.inc"-->
<%
set upload=new upload_5xsoft
dim ta,tb,tc,td,te,tf,tg,tj,tk,x_top
ta=replace(trim(upload.Form("ta")),"'","’")
tb=replace(trim(upload.Form("tb")),"'","’")
tc=replace(trim(upload.Form("tc")),"'","’")
td=replace(trim(upload.Form("td")),"'","’")
te=replace(trim(upload.Form("te")),"'","’")
tf=replace(trim(upload.Form("tf")),"'","’")
tg=replace(trim(upload.Form("tg")),"'","’")
th=replace(trim(upload.Form("th")),"'","’")
tk=replace(trim(upload.Form("tk")),"'","’")
x_top=trim(upload.Form("x_top"))
IDstring="mfkiqpl"&date & time
IDstring=Replace(IDstring,"-","")
IDstring=Replace(IDstring,":","")
pthString="system/uploadimages/"
set file=upload.file("ttt")
if file.filesize>0 then
if file.filesize>2097152 then
set file=nothing
response.write("<script>alert('上传图片的大小不能大于2M,即:2097152字节!');history.back(1);</script>")
else
FileTpe=Mid(file.filename,Len(file.filename)-2)
if not (ucase(fileTpe)="JPG" or ucase(fileTpe)="BMP" or ucase(fileTpe)="GIF") then
response.write("<script>alert('上传图片格式只能为:JPG,BMP,GIF。');history.back(1);</script>")
else
file.saveAs Server.mappath(pthString & IDstring & "." & FileTpe)
filepath=pthString & IDstring & "." & FileTpe
end if
end if
else
filepath=""
end if
set file=nothing
sql="insert into xianlu (x_name,x_baojia,x_leixun,x_shijian,x_shuoming,x_jingdian,x_anpai,x_zhushi,x_jingdiantupian,x_leiid,x_top) values ('"&ta&"','"&tb&"','"&tc&"','"&te&"','"&th&"','"&tg&"','"&tf&"','"&tk&"','"&filepath&"','"&td&"',"&x_top&")"
conn.execute(sql)
closeconn
response.write("<script>alert('添加线路成功!按确定重新载入!');location='admin_addxl.asp?action=add';</script>")
end sub
sub del
%>
<table width="618" border="0" cellspacing="0" cellpadding="0">
  <tr>
<%
set rs1=conn.execute("select id,board from board")
while not rs1.eof
response.write("<td height=24 bgcolor=#f5f5f5 align=center><a href=""admin_addxl.asp?action=del&id="&rs1("id")&""">"&mfkiqpl(rs1("board"))&"</a></td>")
rs1.movenext
wend
response.write("</tr></table>")
closers(rs1)
%>
<table width="618" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="4"></td>
  </tr>
</table>
<table width="618" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
  <tr bgcolor="#f5f5f5">
    <td width="516" height="24" align="center">前20条线路名称,更多请点击上面分类(点击查看详细信息)</td>
    <td width="59" align="center">图片</td>
    <td width="39" align="center">删除</td>
  </tr>
<%
dim id
id=trim(request("id"))
if id="" or not isnumeric(id) then
sql="select top 20 id,x_name,x_leiid,x_jingdiantupian,x_top from xianlu order by x_top desc"
else
sql="select id,x_name,x_leiid,x_jingdiantupian,x_top from xianlu where x_leiid="&id&" order by x_top desc"
end if
set rs2=conn.execute(sql)
while not rs2.eof
response.write("<tr bgcolor=#FFFFFF><td height=24>")
if trim(rs2("x_top"))=1 then
response.write ("<img src=images/mfk_top.gif width=16 height=16 alt=""置顶线路"">")
else
response.write ("<img src=images/mfk5.gif width=16 height=16 alt=""普通线路"">")
end if
response.write(" <a href=""listxianlu.asp?id="&rs2("id")&""" target=""_blank"">"&mfkiqpl(rs2("x_name"))&"</a></td>")
response.write("<td align=center>")
if instr(rs2("x_jingdiantupian"),"system/uploadimages")>0 then
response.Write("<font color=#ff0000><a title='有图,删除线路后图片也将被删除'>有图</a></font>")
else
response.write("<a title='无图片或图片是外部图片'>无图</a>")
end if
response.write("</td><td align=center><a href=""admin_addxl.asp?action=delok&img="&rs2("x_jingdiantupian")&"&id="&rs2("id")&"""><img src=""images/mfk26.gif"" border=0></a></td></tr>")
rs2.movenext
wend
closers(rs2)
%>
</table>
  <tr>
    <%
end sub
sub delok
dim id,img
id=trim(request("id"))
if not isnumeric(id) then
response.write("<script>alert('错误的传递参数!');history.back(1);</script>")

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -