DownloadList.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:63k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../../FS_InterFace/HS_Function.asp" -->
  5. <!--#include file="../../FS_Inc/Function.asp" -->
  6. <!--#include file="../../FS_Inc/Func_Page.asp" -->
  7. <%'Copyright (c) 2006 Foosun Inc. Code by awen ueuo.cn
  8. Response.Buffer = True
  9. Response.Expires = -1
  10. Response.ExpiresAbsolute = Now() - 1
  11. Response.Expires = 0
  12. Response.CacheControl = "no-cache"
  13. Dim Conn,User_Conn,DS_Rs,DS_Sql ,DS_Rs1,DS_Sql1 ,sRootDir,str_CurrPath,fileDirRule,fileNameRule,sys_FileExtName
  14. Dim AutoDelete,Months
  15. MF_Default_Conn 
  16. MF_User_Conn        
  17. MF_Session_TF
  18. if not MF_Check_Pop_TF("Down_List") then Err_Show
  19. if G_VIRTUAL_ROOT_DIR<>"" then sRootDir="/"+G_VIRTUAL_ROOT_DIR else sRootDir=""
  20. if Session("Admin_Is_Super") = 1 then
  21. str_CurrPath = sRootDir &"/"&G_UP_FILES_DIR 
  22. Else
  23. str_CurrPath = Replace(sRootDir &"/"&G_UP_FILES_DIR&"/adminfiles/"&Session("Admin_Name"),"//","/")
  24. End if
  25. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo
  26. int_RPP=15 '设置每页显示数目
  27. int_showNumberLink_=10 '数字导航显示数目
  28. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  29. str_nonLinkColor_="#999999" '非热链接颜色
  30. toF_="<font face=webdings>9</font>"    '首页 
  31. toP10_=" <font face=webdings>7</font>" '上十 
  32. toP1_=" <font face=webdings>3</font>" '上一
  33. toN1_=" <font face=webdings>4</font>" '下一
  34. toN10_=" <font face=webdings>8</font>" '下十
  35. toL_="<font face=webdings>:</font>" '尾页
  36. set DS_Rs = Conn.execute("select top 1 FileDirRule,fileNameRule from FS_NS_SysParam")
  37. if not DS_Rs.eof then 
  38. fileDirRule = DS_Rs("FileDirRule")
  39. fileNameRule = DS_Rs("fileNameRule")
  40. if fileDirRule = "" or fileDirRule = "" then response.Redirect("../error.asp?ErrCodes=<li>目录和文件名规则未设置.请先进行系统参数设置.</li>") : response.End()
  41. else
  42. response.Redirect("../error.asp?ErrCodes=<li>目录和文件名规则未设置.请先进行系统参数设置.</li>") : response.End()
  43. end if
  44. DS_Rs.close
  45. '得到新闻保存路径
  46. Function SavePath(f_num)
  47. SavePath = ""
  48. Select Case f_num
  49. Case 0
  50. SavePath = "/" & year(now)&"-"&month(now)&"-"&day(now)
  51. Case 1
  52. SavePath = "/" & year(now)&"/"&month(now)&"/"&day(now)
  53. Case 2
  54. SavePath = "/" & year(now)&"/"&month(now)&"-"&day(now)
  55. Case 3
  56. SavePath = "/" & year(now)&"-"&month(now)&"/"&day(now)
  57. Case 4
  58. SavePath = "/"
  59. Case 5
  60. SavePath = "/" & year(now)&"/"&month(now)
  61. Case 6
  62. SavePath = "/" & year(now)&"/"&month(now)&day(now)
  63. Case 7
  64. SavePath = "/" & year(now)&month(now)&day(now)
  65. End Select
  66. End Function
  67. '获得用户文件名
  68. Function strFileNameRule(str,f_idTF,f_id)
  69. strFileNameRule = ""
  70. Dim f_strFileNamearr,f_str0,f_str1,f_str2,f_str3,f_str4,Getstr,f_str5,f_str6
  71. f_strFileNamearr = split(str,"$")
  72. f_str0 = f_strFileNamearr(0)
  73. f_str1 = f_strFileNamearr(1)
  74. f_str2 = f_strFileNamearr(2)
  75. f_str3 = f_strFileNamearr(3)
  76. f_str4 = f_strFileNamearr(4)
  77. f_str5 = f_strFileNamearr(5)
  78. f_str6 = f_strFileNamearr(6)
  79. strFileNameRule = strFileNameRule & f_strFileNamearr(0)
  80. If Instr(1,f_strFileNamearr(1),"Y",1)<>0 then
  81. if Len(Trim(Cstr(f_strFileNamearr(4))))<>0 then
  82. strFileNameRule = strFileNameRule & right(year(now),2)&f_strFileNamearr(4)
  83. Else
  84. strFileNameRule = strFileNameRule & right(year(now),2)
  85. End if
  86. End if
  87. If Instr(1,f_strFileNamearr(1),"M",1)<>0 then
  88. if Len(Trim(Cstr(f_strFileNamearr(4))))<>0 then
  89. strFileNameRule = strFileNameRule & month(now)&f_strFileNamearr(4)
  90. Else
  91. strFileNameRule = strFileNameRule& month(now)
  92. End if
  93. End if
  94. If Instr(1,f_strFileNamearr(1),"D",1)<>0 then
  95. if Len(Trim(Cstr(f_strFileNamearr(4))))<>0 then
  96. strFileNameRule = strFileNameRule & day(now)&f_strFileNamearr(4)
  97. Else
  98. strFileNameRule = strFileNameRule& day(now)
  99. End if
  100. End if
  101. If Instr(1,f_strFileNamearr(1),"H",1)<>0 then
  102. if Len(Trim(Cstr(f_strFileNamearr(4))))<>0 then
  103. strFileNameRule = strFileNameRule & hour(now)&f_strFileNamearr(4)
  104. Else
  105. strFileNameRule = strFileNameRule& hour(now)
  106. End if
  107. End if
  108. If Instr(1,f_strFileNamearr(1),"I",1)<>0 then
  109. if Len(Trim(Cstr(f_strFileNamearr(4))))<>0 then
  110. strFileNameRule = strFileNameRule & minute(now)&f_strFileNamearr(4)
  111. Else
  112. strFileNameRule = strFileNameRule& minute(now)
  113. End if
  114. End if
  115. If Instr(1,f_strFileNamearr(1),"S",1)<>0 then
  116. if Len(Trim(Cstr(f_strFileNamearr(4))))<>0 then
  117. strFileNameRule = strFileNameRule & second(now)&f_strFileNamearr(4)
  118. Else
  119. strFileNameRule = strFileNameRule& second(now)
  120. End if
  121. End if
  122. Randomize
  123. Dim f_Randchar,f_Randchararr,f_RandLen,f_iR,f_Randomizecode
  124. f_Randchar="0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"
  125. f_Randchararr=split(f_Randchar,",") 
  126. If f_strFileNamearr(2)="2" then
  127. if f_strFileNamearr(3)="1" then
  128. f_RandLen=2 
  129. for f_iR=1 to f_RandLen
  130. f_Randomizecode=f_Randomizecode&f_Randchararr(Int((21*Rnd)))
  131. next 
  132. strFileNameRule = strFileNameRule &  f_Randomizecode
  133. Else
  134. strFileNameRule = strFileNameRule &  CStr(Int((99 * Rnd) + 1))
  135. End if
  136. Elseif f_strFileNamearr(2)="3" then
  137. if f_strFileNamearr(3)="1" then
  138. f_RandLen=3 
  139. for f_iR=1 to f_RandLen
  140. f_Randomizecode=f_Randomizecode&f_Randchararr(Int((21*Rnd)))
  141. next 
  142. strFileNameRule = strFileNameRule &  f_Randomizecode
  143. Else
  144. strFileNameRule = strFileNameRule &  CStr(Int((999* Rnd) + 1))
  145. End if
  146. Elseif f_strFileNamearr(2)="4" then
  147. if f_strFileNamearr(3)="1" then
  148. f_RandLen=4 
  149. for f_iR=1 to f_RandLen
  150. f_Randomizecode=f_Randomizecode&f_Randchararr(Int((21*Rnd)))
  151. next 
  152. strFileNameRule = strFileNameRule &  f_Randomizecode
  153. Else
  154. strFileNameRule = strFileNameRule &  CStr(Int((9999* Rnd) + 1))
  155. End if
  156. Elseif f_strFileNamearr(2)="5" then
  157. if f_strFileNamearr(3)="1" then
  158. f_RandLen=5 
  159. for f_iR=1 to f_RandLen
  160. f_Randomizecode=f_Randomizecode&f_Randchararr(Int((21*Rnd)))
  161. next 
  162. strFileNameRule = strFileNameRule &  f_Randomizecode
  163. Else
  164. strFileNameRule = strFileNameRule &  CStr(Int((99999* Rnd) + 1))
  165. End if
  166.    End if
  167.  if f_strFileNamearr(5) = "1" then
  168.  strFileNameRule = strFileNameRule&f_strFileNamearr(4)&"自动编号ID"
  169.  End if
  170.  if f_strFileNamearr(6) = "1" then
  171.  strFileNameRule = strFileNameRule&f_strFileNamearr(4)&"唯一DownID"
  172.  End if
  173.  strFileNameRule = strFileNameRule
  174. End Function
  175. ''得到相关表的值。
  176. Function Get_OtherTable_Value(This_Fun_Sql)
  177. Dim This_Fun_Rs
  178. if instr(This_Fun_Sql," FS_ME_")>0 then 
  179. set This_Fun_Rs = User_Conn.execute(This_Fun_Sql)
  180. else
  181. set This_Fun_Rs = Conn.execute(This_Fun_Sql)
  182. end if
  183. if instr(lcase(This_Fun_Sql)," in ")>0 then 
  184. do while not This_Fun_Rs.eof
  185. Get_OtherTable_Value = Get_OtherTable_Value & This_Fun_Rs(0) &"&nbsp;"
  186. This_Fun_Rs.movenext
  187. loop
  188. else
  189. if not This_Fun_Rs.eof then 
  190. Get_OtherTable_Value = This_Fun_Rs(0)
  191. else
  192. Get_OtherTable_Value = ""
  193. end if
  194. end if
  195. set This_Fun_Rs=nothing 
  196. End Function
  197. Function Get_FildValue_List(This_Fun_Sql,EquValue,Get_Type)
  198. '''This_Fun_Sql 传入sql语句,EquValue与数据库相同的值如果是<option>则加上selected,Get_Type=1为<option>
  199. Dim Get_Html,This_Fun_Rs,Text
  200. On Error Resume Next
  201. if instr(This_Fun_Sql," FS_ME_")>0 then 
  202. set This_Fun_Rs = User_Conn.execute(This_Fun_Sql)
  203. else
  204. set This_Fun_Rs = Conn.execute(This_Fun_Sql)
  205. end if
  206. If Err<>0 then Err.clear : response.Redirect("../error.asp?ErrCodes=<li>"&Err.Number&"描述:"&Err.Description&"抱歉,传入的Sql语句"&This_Fun_Sql&"有问题.或表和字段不存在.</li>")
  207. if isnull(EquValue) then EquValue = ""
  208. do while not This_Fun_Rs.eof 
  209. select case Get_Type
  210.   case 1
  211. ''<option>
  212. if instr(This_Fun_Sql,",") >0 then 
  213. Text = This_Fun_Rs(1)
  214. else
  215. Text = This_Fun_Rs(0)
  216. end if
  217. if cstr(EquValue) = cstr(This_Fun_Rs(0)) then 
  218. Get_Html = Get_Html & "<option value="""&This_Fun_Rs(0)&"""  style=""color:#0000FF"" selected>"&Text&"</option>"&vbNewLine
  219. else
  220. Get_Html = Get_Html & "<option value="""&This_Fun_Rs(0)&""">"&Text&"</option>"&vbNewLine
  221. end if
  222.   case else
  223. exit do : Get_FildValue_List = "Get_Type值传入错误" : exit Function
  224. end select
  225. This_Fun_Rs.movenext
  226. loop
  227. This_Fun_Rs.close
  228. Get_FildValue_List = Get_Html
  229. End Function
  230. Function Get_While_Info(Add_Sql,orderby)
  231. Dim Get_Html,This_Fun_Sql,ii,db_ii,Str_Tmp,Arr_Tmp,New_Search_Str,Req_Str,regxp
  232. Str_Tmp = "ID,DownLoadID,ClassID,Description,Accredit,AddTime,Appraise,AuditTF,BrowPop,ClickNum,EditTime,EMail,FileExtName,FileName," _
  233. &"FileSize,Language,Name,NewsTemplet,PassWord,Pic,Property,Provider,ProviderUrl,RecTF,ReviewTF,ShowReviewTF,SystemType,Types,Version,OverDue,ConsumeNum"
  234. This_Fun_Sql = "select "&Str_Tmp&" from FS_DS_List"
  235. if request.QueryString("Act")="SearchGo" then 
  236. Arr_Tmp = split(Str_Tmp,",")
  237. for each Str_Tmp in Arr_Tmp
  238. Req_Str = NoSqlHack(Trim(request(Str_Tmp)))
  239. if Req_Str<>"" then 
  240. select case Str_Tmp
  241. case "ID","Accredit","AddTime","Appraise","AuditTF","ClickNum","EditTime","Property","RecTF","ReviewTF","ShowReviewTF","Types","OverDue","ConsumeNum"
  242. ''数字,日期
  243. regxp = "|<|>|=|<=|>=|<>|"
  244. if instr(regxp,"|"&left(Req_Str,1)&"|")>0 or instr(regxp,"|"&left(Req_Str,2)&"|")>0 then 
  245. New_Search_Str = and_where( New_Search_Str ) & Str_Tmp &" "& Req_Str
  246. elseif instr(Req_Str,"*")>0 then 
  247. if left(Req_Str,1)="*" then Req_Str = "%"&mid(Req_Str,2)
  248. if right(Req_Str,1)="*" then Req_Str = mid(Req_Str,1,len(Req_Str) - 1) & "%"
  249. New_Search_Str = and_where( New_Search_Str ) & Str_Tmp &" like '"& Req_Str &"'"
  250. else
  251. New_Search_Str = and_where( New_Search_Str ) & Str_Tmp &" = "& Req_Str
  252. end if
  253. case else
  254. ''字符
  255. New_Search_Str = and_where(New_Search_Str) & Search_TextArr(Req_Str,Str_Tmp,"")
  256. end select 
  257. end if
  258. next
  259. if New_Search_Str<>"" then This_Fun_Sql = and_where(This_Fun_Sql) & replace(New_Search_Str," where ","")
  260. end if
  261. if Add_Sql<>"" then This_Fun_Sql = and_where(This_Fun_Sql) &" "& Decrypt(Add_Sql)
  262. if orderby<>"" then 
  263. This_Fun_Sql = This_Fun_Sql &"  Order By "& replace(orderby,"csed"," Desc")
  264. else
  265. This_Fun_Sql = This_Fun_Sql &"  Order By AddTime Desc"
  266. end if
  267. Str_Tmp = "" : ii = 0
  268. 'response.Write(This_Fun_Sql)
  269. On Error Resume Next
  270. Set DS_Rs = CreateObject(G_FS_RS)
  271. DS_Rs.Open This_Fun_Sql,Conn,1,3
  272. if Err<>0 then 
  273. Err.Clear
  274. response.Redirect("../error.asp?ErrCodes=<li>查询出错:错误号:"&Error.number&"错误描述:"&Error.Description&"</li><li>请检查字段类型是否匹配.</li>")
  275. response.End()
  276. end if
  277. IF DS_Rs.eof THEN
  278.   response.Write("<tr class=""hback""><td colspan=15>暂无数据.</td></tr>") 
  279. else
  280. DS_Rs.PageSize=int_RPP
  281. cPageNo=NoSqlHack(Request.QueryString("Page"))
  282. If cPageNo="" Then cPageNo = 1
  283. If not isnumeric(cPageNo) Then cPageNo = 1
  284. cPageNo = Clng(cPageNo)
  285. If cPageNo<=0 Then cPageNo=1
  286. If cPageNo>DS_Rs.PageCount Then cPageNo=DS_Rs.PageCount 
  287. DS_Rs.AbsolutePage=cPageNo
  288.   FOR int_Start=1 TO int_RPP 
  289. Get_Html = Get_Html & "<tr class=""hback"">" & vbcrlf
  290. Get_Html = Get_Html & "<td align=""center"" style=""cursor:hand"" onclick=""javascript:if(TD_U_"&DS_Rs("ID")&".style.display=='') TD_U_"&DS_Rs("ID")&".style.display='none'; else {TD_U_"&DS_Rs("ID")&".style.display='';ReImgSize('TD_Img_"&DS_Rs("ID")&"');}"" title='点击查看详细情况'>"&DS_Rs("ID")&"</td>" & vbcrlf
  291. Get_Html = Get_Html & "<td align=""center""><a href=""DownloadList.asp?Act=Edit&ID="&DS_Rs("ID")&""" title=""点击修改或查看详细"">"&DS_Rs("Name")&"</a></td>" & vbcrlf
  292. Get_Html = Get_Html & "<td align=""center"">"&Get_OtherTable_Value("select ClassName+' ['+ClassEName+']' as filda from FS_DS_Class where ClassID='"&DS_Rs("ClassID")&"'")&"</td>" & vbcrlf
  293. Get_Html = Get_Html & "<td align=""center"">"&DS_Rs("AddTime")&"</td>" & vbcrlf
  294. Get_Html = Get_Html & "<td align=""center"">"&DS_Rs("EditTime")&"</td>" & vbcrlf
  295. if DS_Rs("OverDue")=0 then 
  296. Str_Tmp = "永不过期"
  297. elseif datediff("d",DS_Rs("AddTime"),date())>DS_Rs("OverDue") then 
  298. Str_Tmp = DS_Rs("OverDue")&"天/已过期"&datediff("d",DS_Rs("AddTime"),date())&"天"
  299. else 
  300. Str_Tmp = DS_Rs("OverDue")&"天/"&datediff("d",DS_Rs("AddTime"),date())&"天后将过期"
  301. end if
  302. Get_Html = Get_Html & "<td align=""center"">"&Str_Tmp&"</td>" & vbcrlf 
  303. if DS_Rs("AuditTF") = 1 then 
  304. Get_Html = Get_Html & "<td align=""center""><input type=button name=Audited value=""已通过"" onclick=""location='DownloadList.asp?Act=OtherSet&Sql="&server.URLEncode(Encrypt("Update FS_DS_List set AuditTF=0 where ID="&DS_Rs("ID")))&"';""></td>" & vbcrlf
  305. else
  306. Get_Html = Get_Html & "<td align=""center""><input type=button name=Audited value=""待审中"" style=""color:blue"" onclick=""location='DownloadList.asp?Act=OtherSet&Sql="&server.URLEncode(Encrypt("Update FS_DS_List set AuditTF=1 where ID="&DS_Rs("ID")))&"';""></td>" & vbcrlf
  307. end if
  308. Get_Html = Get_Html & "<td align=""center"" class=""ischeck""><input type=""checkbox"" name=""DownLoadID"" id=""DownLoadID"" value="""&DS_Rs("DownLoadID")&""" /></td>" & vbcrlf
  309. Get_Html = Get_Html & "</tr>" & vbcrlf
  310. ''++++++++++++++++++++++++++++++++++++++点开时显示详细信息。
  311. Get_Html = Get_Html & "<tr class=""hback"" id=""TD_U_"& DS_Rs("ID") &""" style=""display:'none'""><td colspan=20>" & vbcrlf
  312. db_ii = DS_Rs("Appraise")
  313. if db_ii = "" or isnull(db_ii) then  db_ii = 0
  314. if db_ii>6 then db_ii=6
  315. Str_Tmp = ""
  316. for ii = 1 to db_ii
  317. Str_Tmp = Str_Tmp & "<img border=0 src=""../Images/icon_star_2.gif"" title="""&DS_Rs("Appraise")&"星"">"
  318. next 
  319. for ii = 1 to 6 - db_ii
  320. Str_Tmp = Str_Tmp & "<img border=0 src=""../Images/icon_star_1.gif"" title="""&DS_Rs("Appraise")&"星"">"
  321. next 
  322. Get_Html = Get_Html & "<table width=""100%"" height=""30"" border=""0"" cellspacing=""1"" cellpadding=""2"" class=""table"">" & vbcrlf 
  323. Get_Html = Get_Html & "<tr class=""hback"">" & vbcrlf &"<td>下载授权:"&Replacestr(DS_Rs("Accredit"),"1:免费,2:共享,3:试用,4:演示,5:注册,6:破解,7:零售,8:其它") & "</td><td>星级评价:"&Str_Tmp&"</td>"
  324. Str_Tmp = DS_Rs("BrowPop")
  325. if isnull(Str_Tmp) or Str_Tmp="" then 
  326. Str_Tmp = "无限制"
  327. else
  328. Str_Tmp = Get_OtherTable_Value("select GroupName from FS_ME_Group where GroupID in ("&DS_Rs("BrowPop")&")")
  329. end if
  330. Get_Html = Get_Html &"<td>下载权限(用户组):"&Str_Tmp&"</td>" & vbcrlf & "<td>联系人EMAIL:"&DS_Rs("EMail")& "</td></tr>" & vbcrlf
  331. Get_Html = Get_Html & "<tr class=""hback"">" & vbcrlf &"<td>开发商:"&DS_Rs("Provider")& "</td><td>提供者(演示):<a href="""&DS_Rs("ProviderUrl")&""" target=_blank>"&DS_Rs("ProviderUrl")&"</a></td><td>文件名:"&DS_Rs("FileName")&"</td><td>文件扩展名:"&Replacestr(DS_Rs("FileExtName"),"else:"&DS_Rs("FileExtName"))&"</td></tr>" & vbcrlf
  332. Get_Html = Get_Html & "<tr class=""hback"">" & vbcrlf &"<td>文件大小:"&DS_Rs("FileSize")&"</td><td>语言:"&DS_Rs("Language")& "</td><td>模板文件名:"&DS_Rs("NewsTemplet")&"</td><td>解压密码:"&DS_Rs("PassWord")&"</td></tr>" & vbcrlf
  333. Str_Tmp = DS_Rs("Pic")
  334. if Str_Tmp<>"" then 
  335. Str_Tmp = "<img id=""TD_Img_"&DS_Rs("ID")&""" src="""&DS_Rs("Pic")&""" border=0>"
  336. else
  337. Str_Tmp = "无图片"
  338. end if  
  339. Get_Html = Get_Html & "<tr class=""hback"">" & vbcrlf &"<td>显示图片[<span style=""cursor:hand"" onClick=""if(!$('TD_Img_"&DS_Rs("ID")&"')) alert('没有图片'); else { if(TD_Img_"&DS_Rs("ID")&".width<=100) {TD_Img_"&DS_Rs("ID")&".width*=5;this.innerHTML='小图'} else {TD_Img_"&DS_Rs("ID")&".width/=5;this.innerHTML='大图'} }"" class=tx>大图</span>] :<br />"&Str_Tmp&"</td><td>下载性质:"&DS_Rs("Property")&"</td><td>推荐:"&Replacestr(DS_Rs("RecTF"),"1:<span class=tx>是</span>,0:否")& "</td><td>评论:"&Replacestr(DS_Rs("ReviewTF"),"1:<span class=tx>允许</span>,0:不允许")& "</td></tr>"&vbNewLine
  340. Get_Html = Get_Html & "<tr class=""hback"">" & vbcrlf &"<td>评论是否需审核:"&Replacestr(DS_Rs("ShowReviewTF"),"1:<span class=tx>是</span>,0:否")& "</td><td>系统平台:"&DS_Rs("SystemType")&"</td><td>下载类型:"&Replacestr(DS_Rs("Types"),"1:图片,2:文件,3:程序,4:Flash,5:音乐,6:影视,7:其它,else:"&DS_Rs("Types")&"")&"</td><td>版本:"&DS_Rs("Version")& "</td></tr>" & vbcrlf
  341. Get_Html = Get_Html & "<tr class=""hback"">" & vbcrlf &"<td>过期天数:"&Replacestr(DS_Rs("OverDue"),"0:永不过期,"&DS_Rs("OverDue")&":"&DS_Rs("OverDue")&"天")&"</td><td>消费点数:"&DS_Rs("ConsumeNum")& "</td><td colspan=3>下载ID:<span class=tx>"&DS_Rs("DownLoadID")& "</span></td></tr>" & vbcrlf
  342. set DS_Rs1=Conn.execute("Select AddressName,Url from FS_DS_Address where DownLoadID='"&DS_Rs("DownLoadID")&"'  order by Number")
  343. if DS_Rs1.eof then 
  344. Get_Html = Get_Html & "<tr class=""hback"">" & vbcrlf &"<td colspan=4 class=tx>没有下载地址数据!!</td>" & vbcrlf & "</tr>"& vbcrlf
  345. else
  346. Get_Html = Get_Html & "<tr class=""hback"">" & vbcrlf &"<td class=xingmu colspan=2>下载名称</td><td  class=xingmu colspan=2>下载地址</td></tr>" & vbcrlf
  347. do while not DS_Rs1.eof
  348. Get_Html = Get_Html & "<tr class=""hback"">" & vbcrlf &"<td  colspan=2>"&DS_Rs1("AddressName")&"</td><td colspan=2><a href="""&DS_Rs1("Url")&""" title=""点击测试下载"" target=_blank>"&DS_Rs1("Url")&"</a></td></tr>" & vbcrlf
  349. DS_Rs1.movenext
  350. loop
  351. end if
  352. DS_Rs1.close
  353. Get_Html = Get_Html & "<tr class=""hback"">" & vbcrlf &"<td  colspan=10>简介:<br />"&DS_Rs("Description")& "</td></tr>" & vbcrlf
  354. Get_Html = Get_Html & "</table>" & vbcrlf
  355. Get_Html = Get_Html &"</td></tr>" & vbcrlf
  356. ''+++++++++++++++++++++++++++++++++++++++
  357. DS_Rs.MoveNext
  358.   if DS_Rs.eof or DS_Rs.bof then exit for
  359.       NEXT
  360. END IF
  361. Get_Html = Get_Html & "<tr class=""hback""><td colspan=20 align=""center"" class=""ischeck"">"& vbcrlf &"<table width=""100%"" border=0><tr><td height=30>" & vbcrlf
  362. Get_Html = Get_Html & fPageCount(DS_Rs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)  & vbcrlf
  363. Get_Html = Get_Html & "</td><td align=right><input type=""button"" value="" 批量待审 "" onclick=""javascript:if (confirm('确定要取消所选项目的审核吗?')) {document.viewform.action='?Act=NoAuditedAll';document.viewform.submit();}""></td>"
  364. Get_Html = Get_Html & "<td align=right><input type=""button"" value="" 批量审核 "" onclick=""javascript:if (confirm('确定要通过所选项目的审核吗?')) {document.viewform.action='?Act=AuditedAll';document.viewform.submit();}""></td>"
  365. Get_Html = Get_Html & "<td align=right><input type=""button"" value="" 批量删除 "" onclick=""javascript:if (confirm('确定要删除所选项目吗?')) {document.viewform.action='?Act=Del';document.viewform.submit();}""></td>"
  366. Get_Html = Get_Html &"</tr></table>"&vbNewLine&"</td></tr>"
  367. Get_Html = Get_Html &"</td></tr>"
  368. DS_Rs.close
  369. Get_While_Info = Get_Html
  370. End Function
  371. Sub OtherSet(Sql)
  372. Conn.execute(Decrypt(Sql))
  373. response.Redirect("DownloadList.asp")
  374. end Sub
  375. Sub AuditedAll()
  376. if not MF_Check_Pop_TF("DS005") then Err_Show
  377. Dim Str_Tmp
  378. Str_Tmp = request.form("ID")
  379. if Str_Tmp="" then response.Redirect("../error.asp?ErrCodes=<li>你必须至少选择一个进行审核。</li>")
  380. Str_Tmp = replace(Str_Tmp," ","")
  381. Conn.execute("update FS_DS_List set AuditTF=1 where ID in ("&Str_Tmp&")")
  382. response.Redirect("../Success.asp?ErrorUrl="&server.URLEncode( "Down/DownloadList.asp?Act=View" )&"&ErrCodes=<li>恭喜,审核成功。</li>")
  383. End Sub
  384. Sub NoAuditedAll()
  385. if not MF_Check_Pop_TF("DS005") then Err_Show
  386. Dim Str_Tmp
  387. Str_Tmp = request.form("ID")
  388. if Str_Tmp="" then response.Redirect("../error.asp?ErrCodes=<li>你必须至少选择一个进行取消审核。</li>")
  389. Str_Tmp = replace(Str_Tmp," ","")
  390. Conn.execute("update FS_DS_List set AuditTF=0 where ID in ("&Str_Tmp&")")
  391. response.Redirect("../Success.asp?ErrorUrl="&server.URLEncode( "Down/DownloadList.asp?Act=View" )&"&ErrCodes=<li>恭喜,取消审核成功。</li>")
  392. End Sub
  393. Sub Del()
  394. if not MF_Check_Pop_TF("DS003") then Err_Show
  395. Dim Str_Tmp
  396. if request.QueryString("sType") = "All_Over" then 
  397. Conn.execute("Delete from FS_DS_Address where DownLoadID in (select DownLoadID from FS_DS_List where OverDue>0 and datediff('d',AddTime,'"&date()&"') > OverDue)")
  398. Conn.execute("Delete from FS_DS_List where OverDue>0 and datediff('d',AddTime,'"&date()&"') > OverDue")
  399. response.Redirect("../Success.asp?ErrorUrl="&server.URLEncode( "Down/DownloadList.asp?Act=View" )&"&ErrCodes=<li>恭喜,删除成功。</li>")
  400. end if
  401. if request.QueryString("DownLoadID")<>"" then 
  402. Conn.execute("Delete from FS_DS_Address where DownLoadID = '"&request.QueryString("DownLoadID")&"'")
  403. Conn.execute("Delete from FS_DS_List where DownLoadID = '"&request.QueryString("DownLoadID")&"'")
  404. else
  405. Str_Tmp = request.form("DownLoadID")
  406. if Str_Tmp="" then response.Redirect("../error.asp?ErrCodes=<li>你必须至少选择一个进行删除。</li>")
  407. Str_Tmp = replace(Str_Tmp," ","")
  408. Str_Tmp = replace(Str_Tmp,",","','")
  409. Conn.execute("Delete from FS_DS_Address where DownLoadID in ('"&Str_Tmp&"')")
  410. Conn.execute("Delete from FS_DS_List where DownLoadID in ('"&Str_Tmp&"')")
  411. end if
  412. response.Redirect("../Success.asp?ErrorUrl="&server.URLEncode( "Down/DownloadList.asp?Act=View" )&"&ErrCodes=<li>恭喜,删除成功。</li>")
  413. End Sub
  414. ''================================================================
  415. Sub Save()
  416. Dim Str_Tmp,Arr_Tmp,ID,Req_Other_Set,Errstr,Url,DownLoadID,AddressName,Number,form_ii,SuccessID,FileName
  417. form_ii = 0 : SuccessID = 0
  418. ID = NoSqlHack(request.Form("ID"))
  419. if not isnumeric(ID) or ID = "" then ID = 0 
  420. DownLoadID = NoSqlHack(request.Form("DownLoadID"))
  421. FileName  = NoSqlHack(request.Form("FileName"))
  422. if DownLoadID = "" then DownLoadID = GetRamCode(8)
  423. On Error Resume Next
  424. for form_ii = 1 to request.Form("Url").Count
  425. AddressName = NoSqlHack(request.Form("AddressName")(form_ii))
  426. Url = NoSqlHack(request.Form("Url")(form_ii))
  427. Number = NoSqlHack(request.Form("Number")(form_ii))
  428. if Number = "" or not isnumeric(Number) then Number = form_ii
  429. if Url<>"" and AddressName<>"" then
  430. if form_ii = 1 then Conn.execute("delete from FS_DS_Address where  DownLoadID='"&DownLoadID&"'")
  431. Conn.execute("insert into FS_DS_Address (DownLoadID,AddressName,Url,[Number]) values ('"&DownLoadID&"','"&AddressName&"','"&Url&"',"&Number&")")
  432. end if
  433. If Err.Number <> 0 then 
  434. Err.clear
  435. else
  436. SuccessID = SuccessID + 1
  437. end if
  438. next
  439. if SuccessID=0 then  response.Redirect("../error.asp?ErrCodes=<li>没有下载地址被添加,不能继续。</li>") : response.End()
  440. ''==============================
  441. if ID=0 then
  442. Req_Other_Set = "&Accredit="&server.URLEncode(NoSqlHack(request.Form("Accredit")))&"&Appraise="&server.URLEncode(NoSqlHack(request.Form("Appraise")))&"&AuditTF="&server.URLEncode(NoSqlHack(request.Form("AuditTF"))) _
  443. &"&BrowPop="&server.URLEncode(NoSqlHack(request.Form("BrowPop")))&"&FileExtName="&server.URLEncode(NoSqlHack(request.Form("FileExtName")))&"&FileSize="&server.URLEncode(NoSqlHack(request.Form("FileSize"))) _
  444. &"&NewsTemplet="&server.URLEncode(NoSqlHack(request.Form("NewsTemplet")))&"&Language="&server.URLEncode(NoSqlHack(request.Form("Language"))) _
  445. &"&Pic="&server.URLEncode(NoSqlHack(request.Form("Pic")))&"&PassWord="&server.URLEncode(NoSqlHack(request.Form("PassWord")))&"&Provider="&server.URLEncode(NoSqlHack(request.Form("Provider")))&"&ProviderUrl=" _
  446. &server.URLEncode(NoSqlHack(request.Form("ProviderUrl")))&"&RecTF="&server.URLEncode(NoSqlHack(request.Form("RecTF")))&"&ReviewTF="&server.URLEncode(NoSqlHack(request.Form("ReviewTF")))&"&ShowReviewTF=" _
  447. &server.URLEncode(NoSqlHack(request.Form("ShowReviewTF")))&"&SystemType="&server.URLEncode(NoSqlHack(request.Form("SystemType")))&"&Types="&server.URLEncode(NoSqlHack(request.Form("Types")))&"&Version=" _
  448. &server.URLEncode(NoSqlHack(request.Form("Version")))&"&OverDue="&server.URLEncode(NoSqlHack(request.Form("OverDue")))&"&ConsumeNum="&server.URLEncode(NoSqlHack(request.Form("ConsumeNum")))&"&Hits="&server.URLEncode(NoSqlHack(request.Form("Hits")))
  449. end if
  450. Str_Tmp = "ClassID,Description,Accredit,AddTime,Appraise,AuditTF,BrowPop,ClickNum,EditTime,EMail," _
  451. &"FileSize,Language,Name,NewsTemplet,PassWord,Pic,Property,Provider,ProviderUrl,RecTF,ReviewTF," _
  452. &"ShowReviewTF,SystemType,Types,Version,OverDue,ConsumeNum,Hits,FileName" 
  453. Arr_Tmp = split(Str_Tmp,",")
  454. DS_Sql = "select DownLoadID,SavePath,FileName,FileExtName,"&Str_Tmp&" from FS_DS_List where ID="&ID
  455. Set DS_Rs = CreateObject(G_FS_RS)
  456. DS_Rs.Open DS_Sql,Conn,3,3
  457. if ID > 0 then 
  458. if not MF_Check_Pop_TF("DS002") then Err_Show
  459. ''修改
  460. DS_Rs("DownLoadID") = DownLoadID
  461. DS_Rs("SavePath") = SavePath(fileDirRule)
  462. DS_Rs("FileExtName") = NoSqlHack(request.Form("FileExtName"))
  463. if instr(FileName,"自动编号ID")>0 then 
  464. FileName = replace(FileName,"自动编号ID",ID)
  465. end if
  466. if instr(FileName,"唯一DownID")>0 then 
  467. FileName = replace(FileName,"唯一DownID",DownLoadID)
  468. end if
  469. DS_Rs("FileName") = FileName
  470. for each Str_Tmp in Arr_Tmp
  471. DS_Rs(Str_Tmp) = NoSqlHack(request.Form(Str_Tmp))
  472. next
  473. DS_Rs.update
  474. DS_Rs.close
  475. response.Redirect("../Success.asp?ErrorUrl="&server.URLEncode( "Down/DownloadList.asp?Act=Edit&ID="&ID )&"&ErrCodes=<li>恭喜,修改成功。</li>")
  476. else
  477. if not MF_Check_Pop_TF("DS001") then Err_Show
  478. ''新增
  479. if Get_OtherTable_Value("select ID from FS_DS_List where DownLoadID='"&NoSqlHack(request.Form("DownLoadID"))&"'")<>"" then 
  480. Errstr = "<li>下载ID重复!!</li>"
  481. end if
  482. if Get_OtherTable_Value("select ID from FS_DS_List where ClassID='"&NoSqlHack(request.Form("ClassID"))&"' and Name='"&NoSqlHack(request.Form("Name"))&"'")<>"" then 
  483. Errstr = Errstr & "<li>下载名称重复!!</li>"
  484. end if
  485. if Errstr<>"" then response.Redirect("../error.asp?ErrCodes="&Errstr) : response.End()
  486. ''--------------------------
  487. DS_Rs.addnew
  488. DS_Rs("DownLoadID") = DownLoadID
  489. DS_Rs("SavePath") = SavePath(fileDirRule)
  490. DS_Rs("FileExtName") = NoSqlHack(request.Form("FileExtName"))
  491. for each Str_Tmp in Arr_Tmp
  492. 'response.Write(Str_Tmp&":"&NoSqlHack(request.Form(Str_Tmp))&"<br>")
  493. if request.Form(Str_Tmp)<>"" then DS_Rs(Str_Tmp) = NoSqlHack(request.Form(Str_Tmp))
  494. next
  495. 'response.Write(Req_Other_Set)
  496. 'response.End()
  497. DS_Rs.update
  498. DS_Rs.close
  499. if instr(FileName,"自动编号ID")>0 then 
  500. FileName = replace(FileName,"自动编号ID",Conn.execute("select ID from FS_DS_List where DownLoadID='"&DownLoadID&"'")(0))
  501. Conn.execute("update FS_DS_List set FileName='"&FileName&"' where DownLoadID='"&DownLoadID&"'")
  502. end if
  503. if instr(FileName,"唯一DownID")>0 then 
  504. FileName = replace(FileName,"唯一DownID",DownLoadID)
  505. Conn.execute("update FS_DS_List set FileName='"&FileName&"' where DownLoadID='"&DownLoadID&"'")
  506. end if
  507. response.Redirect("../Success.asp?ErrorUrl="&server.URLEncode( "Down/DownloadList.asp?Act=Add"&Req_Other_Set ) &"&ErrCodes=<li>恭喜,新增成功。</li>")
  508. end if
  509. End Sub
  510. ''=========================================================
  511. %>
  512. <html xmlns="http://www.w3.org/1999/xhtml">
  513. <HEAD>
  514. <TITLE>FoosunCMS</TITLE>
  515. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
  516. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  517. <script language="JavaScript" src="../../FS_Inc/PublicJS.js"></script>
  518. <script language="JavaScript" src="../../FS_Inc/CheckJs.js"></script>
  519. <script language="JavaScript" src="../../FS_Inc/coolWindowsCalendar.js"></script>
  520. <script language="JavaScript" src="../../FS_Inc/Prototype.js"></script>
  521. <script language="JavaScript">
  522. <!--
  523. //点击标题排序
  524. /////////////////////////////////////////////////////////
  525. var Old_Sql = document.URL;
  526. function OrderByName(FildName)
  527. {
  528. var New_Sql='';
  529. var oldFildName="";
  530. if (Old_Sql.indexOf("&filterorderby=")==-1&&Old_Sql.indexOf("?filterorderby=")==-1)
  531. {
  532. if (Old_Sql.indexOf("=")>-1)
  533. New_Sql = Old_Sql+"&filterorderby=" + FildName + "csed";
  534. else
  535. New_Sql = Old_Sql+"?filterorderby=" + FildName + "csed";
  536. }
  537. else
  538. {
  539. var tmp_arr_ = Old_Sql.split('?')[1].split('&');
  540. for(var ii=0;ii<tmp_arr_.length;ii++)
  541. {
  542. if (tmp_arr_[ii].indexOf("filterorderby=")>-1)
  543. {
  544. oldFildName = tmp_arr_[ii].substring(tmp_arr_[ii].indexOf("filterorderby=") + "filterorderby=".length , tmp_arr_[ii].length);
  545. break;
  546. }
  547. }
  548. oldFildName.indexOf("csed")>-1?New_Sql = Old_Sql.replace('='+oldFildName,'='+FildName):New_Sql = Old_Sql.replace('='+oldFildName,'='+FildName+"csed");
  549. }
  550. //alert(New_Sql);
  551. location = New_Sql;
  552. }
  553. /////////////////////////////////////////////////////////
  554. -->
  555. </script>
  556. <head>
  557. <body>
  558. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  559.      <tr  class="hback"> 
  560.             <td colspan="10" align="left" class="xingmu" ><a href="#" onMouseOver="this.T_BGCOLOR='#404040';this.T_FONTCOLOR='#FFFFFF';return escape('<div align='center'>FoosunCMS4.0<br> Code by 张文 <BR>Copyright (c) 2006 Foosun Inc</div>')" class="sd"><strong>下载列表管理</strong></a></td>
  561. </tr>
  562.   <tr  class="hback"> 
  563.     <td colspan="10" height="25"> <a href="DownloadList.asp">管理首页</a> <%if MF_Check_Pop_TF("DS001") then %>| <a href="DownloadList.asp?Act=Add">新增</a><%end if%> 
  564.       | <a href="DownloadList.asp?Act=Search">查询</a> | 发布(<a href="DownloadList.asp?Act=View&Add_Sql=<%=server.URLEncode(Encrypt("DateDiff('d',AddTime,'"&date()&"')<7"))%>">一周内</a> 
  565.       | <a href="DownloadList.asp?Act=View&Add_Sql=<%=server.URLEncode(Encrypt("DateDiff('d',AddTime,'"&date()&"')<1*30"))%>">一月内</a> 
  566.       | <a href="DownloadList.asp?Act=View&Add_Sql=<%=server.URLEncode(Encrypt("DateDiff('d',AddTime,'"&date()&"')<3*30"))%>">三月内</a>) 
  567.   | 过期(<a href="DownloadList.asp?Act=View&Add_Sql=<%=server.URLEncode(Encrypt("OverDue>0 and datediff('d',AddTime,'"&date()&"') > OverDue"))%>">所有过期下载</a> 
  568.       <%if not MF_Check_Pop_TF("DS003") then%>| <a href="DownloadList.asp?Act=Del&sType=All_Over" onClick="return confirm('这将删除所有相关信息,确定继续?');">删除所有过期</a><%end if%>) 
  569.     </td>
  570.   </tr>
  571. </table>
  572. <%
  573. '******************************************************************
  574. select case request.QueryString("Act")
  575. case "Add","Edit","Search"
  576. Add_Edit_Search
  577. case "SearchGo","","View"
  578. View
  579. case "Save"
  580. Save
  581. case "Del"
  582. Del
  583. case "NoAuditedAll"
  584. NoAuditedAll
  585. case "AuditedAll"
  586. AuditedAll
  587. case "OtherSet"
  588. Call OtherSet(request.QueryString("Sql"))
  589. case else
  590. response.Redirect("../error.asp?ErrorUrl=&ErrCodes=<li>错误的参数传递。</li>") : response.End()
  591. end select
  592. '******************************************************************
  593. Sub View()%>
  594. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  595. <form name="viewform" id="viewform" method="post" action="?Act=Del">
  596.    <tr  class="hback"> 
  597.       <td align="center" class="xingmu" ><a href="javascript:OrderByName('ID')" class="sd"><b>〖ID〗</b></a> 
  598.         <span id="Show_Oder_ID"></span></td>
  599.       <td align="center" class="xingmu" ><a href="javascript:OrderByName('Name')" class="sd"><b>下载名称</b></a> 
  600.         <span id="Show_Oder_Name"></span></td>
  601.       <td align="center" class="xingmu" ><a href="javascript:OrderByName('ClassID')" class="sd"><b>所属栏目</b></a> 
  602.         <span id="Show_Oder_ClassID"></span></td>
  603.       <td align="center" class="xingmu"><a href="javascript:OrderByName('AddTime')" class="sd"><b>添加时间</b></a> 
  604.         <span id="Show_Oder_AddTime"></span></td>
  605.       <td align="center" class="xingmu"><a href="javascript:OrderByName('EditTime')" class="sd"><b>修改时间</b></a> 
  606.         <span id="Show_Oder_EditTime"></span></td>
  607.       <td align="center" class="xingmu"><a href="javascript:OrderByName('OverDue')" class="sd"><b>过期天数</b></a> 
  608.         <span id="Show_Oder_OverDue"></span></td>
  609.       <td align="center" class="xingmu"><a href="javascript:OrderByName('AuditTF')" class="sd"><b>审核</b></a> 
  610.         <span id="Show_Oder_AuditTF"></span></td>
  611.       <td width="2%" align="center" class="xingmu"><input name="ischeck" type="checkbox" value="checkbox" onClick="selectAll(this.form)" /></td>
  612.     </tr>
  613.     <%
  614. response.Write( Get_While_Info( request.QueryString("Add_Sql"),request.QueryString("filterorderby") ) )
  615. %>
  616.    </form>  
  617. </table>
  618. <%End Sub
  619. Sub Add_Edit_Search()
  620. Dim Bol_IsEdit,ID,TmpStr
  621. Dim Accredit,Appraise,AuditTF,BrowPop,FileExtName,FileSize,NewsTemplet,Pic,PassWord,Provider,ProviderUrl,RecTF,ReviewTF,FileName
  622. Dim ShowReviewTF,SystemType,Types,Version,OverDue,ConsumeNum  ,Language,Hits
  623. Bol_IsEdit = false
  624. TmpStr = ""
  625. if request.QueryString("Act")="Edit" then
  626. ID = request.QueryString("ID")
  627. if ID="" then response.Redirect("../error.asp?ErrorUrl=&ErrCodes=<li>必要的ID没有提供。</li>") : response.End()
  628. DS_Sql = "select ID,DownLoadID,ClassID,Description,Accredit,AddTime,Appraise,AuditTF,BrowPop,ClickNum,EditTime,EMail,FileExtName,FileName," _
  629. &"FileSize,Language,Name,NewsTemplet,PassWord,Pic,Property,Provider,ProviderUrl,RecTF,ReviewTF,ShowReviewTF,SystemType,Types,Version,OverDue,ConsumeNum,Hits" _
  630. &" from FS_DS_List where ID = "&ID
  631. Set DS_Rs = CreateObject(G_FS_RS)
  632. DS_Rs.Open DS_Sql,Conn,1,1
  633. if not DS_Rs.eof then 
  634. Bol_IsEdit = True
  635. Accredit = DS_Rs("Accredit")
  636. Appraise = DS_Rs("Appraise")
  637. AuditTF = DS_Rs("AuditTF")
  638. BrowPop = DS_Rs("BrowPop")
  639. FileSize = Ucase( DS_Rs("FileSize") )
  640. FileName = DS_Rs("FileName")
  641. NewsTemplet = DS_Rs("NewsTemplet")
  642. PassWord = DS_Rs("PassWord")
  643. Pic = DS_Rs("Pic")
  644. Provider = DS_Rs("Provider")
  645. ProviderUrl = DS_Rs("ProviderUrl")
  646. RecTF = DS_Rs("RecTF")
  647. ReviewTF = DS_Rs("ReviewTF")
  648. ShowReviewTF = DS_Rs("ShowReviewTF")
  649. SystemType = DS_Rs("SystemType")
  650. Types = DS_Rs("Types")
  651. Version = DS_Rs("Version")
  652. OverDue = DS_Rs("OverDue")
  653. ConsumeNum = DS_Rs("ConsumeNum")
  654. if ConsumeNum=0 then ConsumeNum = ""
  655. Language = DS_Rs("Language")
  656. NewsTemplet = DS_Rs("NewsTemplet") ''路径
  657. FileExtName = DS_Rs("FileExtName")''扩展名
  658. if isnull(FileExtName) or FileExtName="" then FileExtName = "html"
  659. Hits = DS_Rs("Hits")
  660. if isnull(Hits) or Hits="" then Hits = 0
  661. end if
  662. elseif request.QueryString("Act") = "Add" then
  663. Accredit = NoSqlHack(request.QueryString("Accredit"))
  664. if Accredit="" then Accredit = 1
  665. Appraise = NoSqlHack(request.QueryString("Appraise"))
  666. if Appraise="" then Appraise = 6
  667. AuditTF = NoSqlHack(request.QueryString("AuditTF"))
  668. if AuditTF="" then AuditTF = 1
  669. BrowPop = NoSqlHack(request.QueryString("BrowPop"))
  670. FileExtName = NoSqlHack(request.QueryString("FileExtName"))
  671. if FileExtName="" then 
  672. if sys_FileExtName="" then FileExtName = "html"
  673. end if
  674. FileSize = NoSqlHack(request.QueryString("FileSize"))
  675. if FileSize="" then FileSize = "1024K"
  676. FileName = strFileNameRule(fileNameRule,0,0)
  677. NewsTemplet = Replace("/"& G_TEMPLETS_DIR &"/Down/Down.htm","//","/") 
  678. PassWord = NoSqlHack(request.QueryString("PassWord"))
  679. Pic = NoSqlHack(request.QueryString("Pic"))
  680. Provider = NoSqlHack(request.QueryString("Provider"))
  681. ProviderUrl = NoSqlHack(request.QueryString("ProviderUrl"))
  682. RecTF = NoSqlHack(request.QueryString("RecTF"))
  683. if RecTF="" then RecTF = 1
  684. ReviewTF = NoSqlHack(request.QueryString("ReviewTF"))
  685. if ReviewTF="" then ReviewTF = 1
  686. ShowReviewTF = NoSqlHack(request.QueryString("ShowReviewTF"))
  687. if ShowReviewTF="" then ShowReviewTF = 0
  688. SystemType = NoSqlHack(request.QueryString("SystemType"))
  689. if SystemType="" then SystemType = "WIN9X/WIN2000/WINXP/2003"
  690. Types = NoSqlHack(request.QueryString("Types"))
  691. if Types="" then Types = 3
  692. Version = NoSqlHack(request.QueryString("Version"))
  693. OverDue = NoSqlHack(request.QueryString("OverDue"))
  694. if OverDue="" then OverDue = 0
  695. ConsumeNum = NoSqlHack(request.QueryString("ConsumeNum"))
  696. If IsNumeric(ConsumeNum) Then
  697. ConsumeNum=CInt(ConsumeNum)
  698. Else
  699. ConsumeNum=0
  700. End If
  701. if ConsumeNum=0 then ConsumeNum = ""
  702. Language  = NoSqlHack(request.QueryString("Language"))
  703. if Language = "" then Language = "简体中文"
  704. Hits = request.QueryString("Hits")
  705. if Hits = "" then 
  706. randomize
  707. Hits = CStr(Int((9999* Rnd) + 1))
  708. end if
  709. end if
  710. %>
  711. <table id=secTable width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="table">
  712.   <tr align=center height=30 class="hback">
  713. <td id="secTableTd0" class="xingmu" onClick="secBoard(0)" style="cursor:hand">
  714. 基本信息
  715. </td>
  716. <td id="secTableTd1" onClick="secBoard(1)" style="cursor:hand">
  717. 下载地址
  718. </td>
  719. </tr>
  720. <tr><td colspan="4">
  721. <!--主表开始-->
  722.   <form name="form1" id="form1" method="post"<%
  723.   select case request.QueryString("Act")
  724.    case "Search"
  725.   response.Write(" action=""?Act=SearchGo""") 
  726. case "Edit","Add",""
  727.   response.Write(" onsubmit=""return chkinput();"" action=""?Act=Save""") 
  728.   end select%>>
  729.         <table id=mainTable width="99%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  730.           <tbody style="display:block;">
  731.     <tr  class="hback"> 
  732.       <td colspan="3" class="xingmu"><%if Bol_IsEdit then 
  733.   response.Write("修改下载列表信息<input type=""hidden"" name=""ID"" id=""ID"" value="""&DS_Rs("ID")&""">") 
  734.   elseif request.QueryString("Act") = "Add" then 
  735.   response.Write("新增下载列表信息<span class=""tx"" style=""cursor:help"" onclick=""if (help1.style.display='none') help1.style.display=''; else help1.style.display='none';"">帮助?</span>") 
  736.   else
  737.   response.Write("查询下载列表信息<span class=""tx"" style=""cursor:help"" onclick=""help2.style.display=''?help2.style.display='none':help2.style.display='';"">帮助?</span>") 
  738.   end if%>   
  739.   </td>
  740. </tr>
  741.     <tr class="hback" id="help1" style="display:none"> 
  742.       <td width="15%" align="right">添加帮助</td>
  743.       <td width="85%">
  744.     当您新添加数据时,系统会提供给你默认的数据.当你添加一条数据以后,并且继续添加时,系统会自动引用上一条数据部分信息.这在批量添加时很有用。并且你可以选择下拉框中已经添加过的数据.
  745.       </td>
  746.     </tr>
  747.     <tr class="hback" id="help2" style="display:none"> 
  748.       <td align="right">查询帮助</td>
  749.       <td>
  750.     查询:数字和日期型的字段,支持<=<>=><>等等运算符号如:查过期天数>2 ; 其它类型支持 A B ,A* *B ,*A* *B* ,AB等模式.
  751.       </td>
  752.     </tr>
  753. <%if request.QueryString("Act")="Search" then %>
  754.     <tr class="hback"> 
  755.       <td align="right">自编号ID</td>
  756.       <td>
  757.    <input type="text" name="ID" id="ID" size="40" maxlength="11">
  758.       </td>
  759.     </tr>
  760. <%end if%>
  761.     <tr  class="hback"> 
  762.       <td align="right">下载ID</td>
  763.       <td>
  764.    <%if request.QueryString("Act")<>"Search" then%><input type="hidden" name="Property" value="0"><%end if%>
  765. <input type="text" size="40" maxlength="15" name="DownLoadID" id="DownLoadID" value="<%if Bol_IsEdit then response.Write(DS_Rs("DownLoadID")) else if request.QueryString("Act")<>"Search" then  response.Write(GetRamCode(8)) end if end if%>" 
  766.     onFocus="Do.these('DownLoadID',function(){return isEmpty('DownLoadID','DownLoadID_Alt')})" onKeyUp="Do.these('DownLoadID',function(){return isEmpty('DownLoadID','DownLoadID_Alt')});"
  767.     <%if request.QueryString("Act")="Add" then%> onBlur="if(this.value!='') new Ajax.Updater('DownLoadID_Chk','DownloadList_Ajax.asp?no-cache='+Math.random() , {method: 'get', parameters: 'Act=Check&stype=DownLoadID&value='+this.value });"<%end if%>>
  768.     <span id="DownLoadID_Alt"></span>&nbsp;<span id="DownLoadID_Chk"></span>&nbsp;
  769.         <%if request.QueryString("Act")<>"Search" then %><span class="tx">不填则自动生成</span><%end if%>
  770.   </td>
  771.     </tr>
  772.     <tr>
  773.       <td class="hback" align="right">选择栏目</td>
  774.       <td class="hback"> <input name="ClassName" type="text" id="ClassName" style="width:50%" value="<%if Bol_IsEdit then response.Write(Get_OtherTable_Value("select ClassName from FS_DS_Class where ClassID='"&DS_Rs("ClassID")&"'")) end if%>" readonly 
  775.   onFocus="Do.these('ClassName',function(){return isEmpty('ClassName','ClassName_Alt')});if(this.value!='') new Ajax.Updater('Class_ExtName','DownloadList_Ajax.asp?no-cache='+Math.random() , {method: 'get', parameters: 'Act=GetExtName&ClassID='+ClassID.value });" 
  776.   onKeyUp="Do.these('ClassName',function(){return isEmpty('ClassName','ClassName_Alt')})" onBlur="if(Class_ExtName.innerHTML!='') FileExtName.value=$('Class_ExtName').innerHTML;"> 
  777.         <input name="ClassID" type="hidden" id="ClassID" value="<%if Bol_IsEdit then response.Write(DS_Rs("ClassID")) end if%>"> 
  778.         <input type="button" name="Submit" value="选择栏目"   onClick="SelectClass();ClassName.focus();"> 
  779.         <input type="button" name="Submit2" value="添加栏目" onClick="window.location.href='Class_add.asp?ClassID=<%if Bol_IsEdit then response.Write(DS_Rs("ClassID")) end if%>&Action=add'"> <span id="span_ClassName"></span>
  780.        <span id="ClassName_Alt"></span><span id="Class_ExtName" style="display:none"></span>
  781.   </td>
  782.     </tr>
  783.     <tr  class="hback"> 
  784.       <td align="right">下载名称</td>
  785.       <td>
  786.   <input type="text" name="Name" id="Name" size="40" maxlength="100" value="<%if Bol_IsEdit then response.Write(DS_Rs("Name")) end if%>" 
  787.   onFocus="Do.these('Name',function(){return isEmpty('Name','Name_Alt')})" onKeyUp="Do.these('Name',function(){return isEmpty('Name','Name_Alt')});"
  788.   <%if request.QueryString("Act")="Add" then%> onBlur="if(ClassID.value!='' && this.value!='') new Ajax.Updater('Name_Chk','DownloadList_Ajax.asp?no-cache='+Math.random() , {method: 'get', parameters: 'Act=Check&stype=downname&classid='+ClassID.value+'&name='+this.value });"<%end if%>>
  789.   <span id="Name_Alt"></span><span id="Name_Chk"></span>
  790.       </td>
  791.     </tr>
  792.     <tr  class="hback"> 
  793.       <td align="right">简介</td>
  794.       <td>
  795.   <textarea name="Description" cols="75" rows="6" id="Description"  onFocus="Do.these('Description',function(){return isEmpty('Description','Description_Alt')})" onKeyUp="Do.these('Description',function(){return isEmpty('Description','Description_Alt')})"><%if Bol_IsEdit then response.Write(DS_Rs("Description")) end if%></textarea>
  796.       <span id="Description_Alt"></span>
  797.       </td>
  798.     </tr>
  799.     <tr  class="hback"> 
  800.               <td colspan="2" class="xingmu" height="5"></td>
  801.     </tr>
  802.     <tr  class="hback"> 
  803.       <td align="right">下载授权</td>
  804.       <td>
  805. <select name="Accredit" id="Accredit">
  806.  <%=PrintOption(Accredit,":请选择,1:免费,2:共享,3:试用,4:演示,5:注册,6:破解,7:零售,8:其它")%>
  807. </select>
  808.         <span id="Accredit_Alt"></span> </td>
  809.     </tr>
  810.     <tr class="hback"> 
  811.       <td align="right">星级评价</td>
  812.       <td>
  813. <select name="Appraise" id="Appraise">
  814.  <%=PrintOption(Appraise,":请选择,1:一星,2:二星,3:三星,4:四星,5:五星,6:六星")%>
  815. </select>
  816.         <span id="Appraise_Alt"></span> </td>
  817.     </tr>
  818.     <tr  class="hback"> 
  819.       <td align="right">联系人EMAIL</td>
  820.       <td>
  821.   <input type="text" name="EMail" id="EMail" size="40" maxlength="25" value="<%if Bol_IsEdit then response.Write(DS_Rs("EMail")) end if%>">
  822.         <span id="EMail_Alt"></span> </td>
  823.     </tr>
  824.     <tr  class="hback"> 
  825.       <td align="right">文件大小</td>
  826.       <td>
  827.   <input type="text" name="FileSize" id="FileSize" size="15" maxlength="50" value="<%=FileSize%>"><span id="FileSize_Alt"></span>
  828. <select onChange="FileSize.value=this.options[this.selectedIndex].value">
  829. <option value="">请选择</option>
  830. <%=Get_FildValue_List("select distinct FileSize from FS_DS_List where FileSize<>''",FileSize,1)%>
  831. </select>
  832.       </td>
  833.     </tr>
  834.     <tr  class="hback"> 
  835.       <td align="right">语言</td>
  836.       <td>
  837.   <input type="text" name="Language" id="Language" size="15" maxlength="50" value="<%=Language%>"><span id="Language_Alt"></span>
  838. <select onChange="Language.value=this.options[this.selectedIndex].value">
  839. <option value="">请选择</option>
  840. <%if Language<>"" then response.Write PrintOption(Language,Language&":"&Language)%>
  841. </select>
  842.       </td>
  843.     </tr>
  844.     <tr  class="hback"> 
  845.       <td align="right">解压密码</td>
  846.       <td>
  847.   <input type="text" name="PassWord" id="PassWord" size="40" maxlength="50" value="<%=PassWord%>">
  848. <select onChange="PassWord.value=this.options[this.selectedIndex].value">
  849. <option value="">请选择</option>
  850. <%=Get_FildValue_List("select distinct PassWord from FS_DS_List where PassWord<>'' ",PassWord,1)%>
  851. </select>
  852.       </td>
  853.     </tr>
  854.     <tr  class="hback"> 
  855.       <td align="right">选择模板</td>
  856.       <td>
  857. <input name="NewsTemplet" type="text" id="NewsTemplet" style="width:60%" value="<%=NewsTemplet%>" maxlength="200" readonly> 
  858.         <input name="Submit5" type="button" id="selNewsTemplet" value="选择模板"  onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectTemplet.asp?CurrPath=<%=sRootDir %>/<% = G_TEMPLETS_DIR %>',400,300,window,document.form1.NewsTemplet);document.form1.NewsTemplet.focus();">      </td>
  859.     </tr>
  860.     <tr  class="hback"> 
  861.       <td align="right">显示图片</td>
  862.       <td>
  863.     <input type="text" name="Pic" id="Pic" style="width:60%" maxlength="100" value="<%=Pic%>" readonly="">
  864.         <input type="button" name="bnt_ChoosePic_rowBettween"  value="选择图片" onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectPic.asp?CurrPath=<%=str_CurrPath %>',500,300,window,document.form1.Pic);"> 
  865.   </td>
  866.     </tr>
  867.     <tr  class="hback"> 
  868.       <td align="right">开发商</td>
  869.       <td>
  870.   <input type="text" name="Provider" id="Provider" size="40" maxlength="50" value="<%=Provider%>">
  871. <select onChange="Provider.value=this.options[this.selectedIndex].value">
  872. <option value="">请选择</option>
  873. <%=Get_FildValue_List("select distinct Provider from FS_DS_List where Provider<>''",Provider,1)%>
  874. </select>
  875.       </td>
  876.     </tr>
  877.     <tr  class="hback"> 
  878.       <td align="right">提供者Url地址(演示地址)</td>
  879.       <td>
  880.   <input type="text" name="ProviderUrl" id="ProviderUrl" size="40" maxlength="100" value="<%=ProviderUrl%>">
  881. <select onChange="ProviderUrl.value=this.options[this.selectedIndex].value">
  882. <option value="">请选择</option>
  883. <%=Get_FildValue_List("select distinct ProviderUrl from FS_DS_List where ProviderUrl<>''",ProviderUrl,1)%>
  884. </select>
  885.       </td>
  886.     </tr>
  887.     <tr  class="hback"> 
  888.       <td align="right">系统平台</td>
  889.       <td>
  890.   <input type="text" name="SystemType" id="SystemType" size="40" maxlength="100" value="<%=SystemType%>">
  891. <select onChange="SystemType.value=this.options[this.selectedIndex].value">
  892. <option value="">请选择</option>
  893. <%=Get_FildValue_List("select distinct SystemType from FS_DS_List where SystemType<>''",SystemType,1)%>
  894. </select>
  895.       </td>
  896.     </tr>
  897.     <tr  class="hback"> 
  898.       <td align="right">下载类型</td>
  899.       <td>
  900. <select name="Types" id="Types">
  901. <%=PrintOption(Types,":请选择,1:图片,2:文件,3:程序,4:Flash,5:音乐,6:影视,7:其它")%>
  902. </select>
  903.       </td>
  904.     </tr>
  905.     <tr  class="hback"> 
  906.       <td align="right">版本</td>
  907.       <td>
  908.   <input type="text" name="Version" id="Version" size="40" maxlength="50" value="<%=Version%>">
  909. <select onChange="Version.value=this.options[this.selectedIndex].value">
  910. <option value="">请选择</option>
  911. <%=Get_FildValue_List("select distinct Version from FS_DS_List where Version<>''",Version,1)%>
  912. </select>
  913.       </td>
  914.     </tr>
  915.     <tr  class="hback"> 
  916.         <td colspan="2" class="xingmu" height="5"></td>
  917.     </tr>
  918.     <tr class="hback"> 
  919.       <td align="right">是否审核</td>
  920.       <td>
  921. <select name="AuditTF" id="AuditTF">
  922.  <%=PrintOption(AuditTF,":请选择,1:通过,0:待审")%>
  923. </select>
  924.         <span id="AuditTF_Alt"></span> </td>
  925.     </tr>
  926. <tr class="hback"> 
  927.       <td align="right">推荐</td>
  928.       <td>
  929. <select name="RecTF" id="RecTF">
  930.  <%=PrintOption(RecTF,":请选择,1:是,0:否")%>
  931. </select>
  932.         <span id="RecTF_Alt"></span> </td>
  933.     </tr>
  934.     <tr class="hback"> 
  935.       <td align="right">评论</td>
  936.       <td>
  937. <select name="ReviewTF" id="ReviewTF">
  938.  <%=PrintOption(ReviewTF,":请选择,1:允许,0:不允许")%>
  939. </select>
  940.         <span id="ReviewTF_Alt"></span> </td>
  941.     </tr>
  942.     <tr class="hback"> 
  943.       <td align="right">评论是否需审核</td>
  944.       <td>
  945. <select name="ShowReviewTF" id="ShowReviewTF">
  946.  <%=PrintOption(ShowReviewTF,":请选择,1:是,0:否")%>
  947. </select>
  948.         <span id="ShowReviewTF_Alt"></span> </td>
  949.     </tr>
  950.     <tr  class="hback"> 
  951.         <td colspan="2" class="xingmu" height="5"></td>
  952. </tr>
  953.     <!--生成开始-->
  954. <tr class="hback"> 
  955.       <td align="right">下载权限</td>
  956.       <td>
  957.     <input name="BrowPop"  id="BrowPop" value="<%=BrowPop%>" type="text" onMouseOver="this.title=this.value;" readonly> 
  958.         <select name="selectPop" id="selectPop" style="overflow:hidden;" onChange="ChooseExeName();">
  959.           <option value="" selected>选择会员组</option>
  960.           <option value="del" style="color:red;">清空</option>
  961.   <%=Get_FildValue_List("select distinct GroupID,GroupName from FS_ME_Group",BrowPop,1)%>
  962.         </select> </td>
  963.     </tr>
  964.     <tr  class="hback"> 
  965.       <td align="right">文件扩展名</td>
  966.       <td class="hback"> 
  967.     <select name="FileExtName" id="FileExtName">
  968.   <%=PrintOption(FileExtName,":请选择,html:html,htm:htm,shtml:shtml,shtm:shtm,asp:asp")%>
  969.         </select><span id="FileExtName_Alt"></span>
  970. </td>
  971.     </tr>
  972.     <tr  class="hback"> 
  973.       <td align="right">文件名</td>
  974.       <td>
  975.   <%
  976.   if request.QueryString("Act")="Search" then 
  977.    Response.Write("<input name=""FileName"" type=""text"" id=""FileName"" size=""40"" maxlength=""255"">")
  978.   else
  979.   Dim RoTF
  980.   if instr(strFileNameRule(fileNameRule,0,0),"自动编号ID")>0 or instr(strFileNameRule(fileNameRule,0,0),"唯一DownID") then:RoTF="Readonly":End if
  981.   Response.Write("<input name=""FileName"" type=""text"" id=""FileName"" size=""40"" "& RoTF &" maxlength=""255"" value="""&FileName&""" title=""如果参数设置中设定为自动编号,将不能修改"">")
  982.   end if
  983.   %><span id="FileName_Alt"></span>     
  984.   </td>
  985.     </tr>
  986.     <tr  class="hback"> 
  987.       <td align="right">消费点数</td>
  988.       <td>
  989.   <input type="text" name="ConsumeNum" id="ConsumeNum" size="10" maxlength="6" value="<%=ConsumeNum%>"  onChange="ChooseExeName();">
  990. <select onChange="ConsumeNum.value=this.options[this.selectedIndex].value;ChooseExeName();">
  991. <option value="">请选择</option>
  992. <%=Get_FildValue_List("select distinct ConsumeNum from FS_DS_List where ConsumeNum<>0",ConsumeNum,1)%>
  993. </select>
  994.       </td>
  995.     </tr>
  996.     <tr  class="hback"> 
  997.       <td align="right">过期天数</td>
  998.       <td>
  999.   <input type="text" name="OverDue" id="OverDue" size="10" maxlength="6" value="<%=OverDue%>" onChange="ChooseExeName();">
  1000. <select onChange="OverDue.value=this.options[this.selectedIndex].value;ChooseExeName();">
  1001. <option value="">请选择</option>
  1002. <%if OverDue = "0" then 
  1003. response.Write("<option value=""0"" selected style=""color:blue"">永不过期</option>")
  1004. else
  1005. response.Write(Get_FildValue_List("select distinct OverDue from FS_DS_List",OverDue,1))
  1006. end if
  1007. %>
  1008. </select>
  1009.       </td>
  1010.     </tr>
  1011.     <!--生成结束-->
  1012.     <tr  class="hback"> 
  1013.       <td align="right">点击数</td>
  1014.       <td>
  1015.   <input type="text" name="Hits" id="Hits" size="10" maxlength="6" value="<%=Hits%>">
  1016.       </td>
  1017.     </tr>
  1018.     <tr  class="hback"> 
  1019.       <td align="right">下载次数</td>
  1020.       <td>
  1021.   <input type="text" name="ClickNum" id="ClickNum" size="10" maxlength="6" value="<%if Bol_IsEdit then response.Write(DS_Rs("ClickNum")) else if request.QueryString("Act")<>"Search" then response.Write("0") end if end if%>">
  1022.       </td>
  1023.     </tr>
  1024.     <tr class="hback"> 
  1025.       <td align="right">添加时间</td>
  1026.       <td>
  1027.   <input type="text" name="AddTime" id="AddTime" onFocus="setday(this)" style="WIDTH: 100px; HEIGHT: 22px" maskType="shortDate" value="<%if Bol_IsEdit then response.Write(DS_Rs("AddTime")) else if request.QueryString("Act")<>"Search" then response.Write(date()) end if end if%>">
  1028.   <IMG onClick="AddTime.focus()" src="../../FS_Inc/calendar.bmp" align="absBottom"><span id="AddTime_Alt"></span>
  1029.       </td>
  1030.     </tr>
  1031.     <tr class="hback"> 
  1032.       <td align="right">修改时间</td>
  1033.       <td>
  1034.   <input type="text" name="EditTime" id="EditTime" onFocus="setday(this)" style="WIDTH: 100px; HEIGHT: 22px" maskType="shortDate" value="<%if Bol_IsEdit then response.Write(DS_Rs("EditTime")) else if request.QueryString("Act")<>"Search" then response.Write(date()) end if end if%>">
  1035.   <IMG onClick="EditTime.focus()" src="../../FS_Inc/calendar.bmp" align="absBottom"><span id="EditTime_Alt"></span>
  1036.       </td>
  1037.     </tr>
  1038.    <tr  class="hback"> 
  1039.       <td align="center" colspan="4">
  1040.           <input type="submit" value=" 确定提交 "/> 
  1041.               &nbsp; <input type="reset" value=" 重置 " />
  1042.      &nbsp; <input type="button" name="btn_todel" value=" 删除 " onClick="if(confirm('确定删除该项目吗?')) location='<%=server.URLEncode("DownloadList.asp?Act=Del&ID="&ID)%>'">
  1043.       </td>
  1044.     </tr>
  1045. </tbody>
  1046. <!--分界-->
  1047. <tbody style="display:none;">
  1048.     <tr  class="hback"> 
  1049.       <td colspan="3" class="xingmu"><%if Bol_IsEdit then 
  1050.   response.Write("修改下载列表信息") 
  1051.   elseif request.QueryString("Act") = "Add" then 
  1052.   response.Write("新增下载列表信息<span class=""tx"" style=""cursor:help"" onclick=""if (help3.style.display='none') help3.style.display=''; else help3.style.display='none';"">帮助?</span>") 
  1053.   else
  1054.   response.Write("查询下载列表信息<span class=""tx"" style=""cursor:help"" onclick=""help4.style.display=''?help4.style.display='none':help4.style.display='';"">帮助?</span>") 
  1055.   end if%>   
  1056.   </td>
  1057. </tr>
  1058.     <tr class="hback" id="help3" style="display:none"> 
  1059.       <td align="right">添加帮助</td>
  1060.       <td>
  1061.     当您新添加数据时,系统会提供给你默认的数据.当你添加一条数据以后,并且继续添加时,系统会自动引用上一条数据部分信息.这在批量添加时很有用。并且你可以选择下拉框中已经添加过的数据.
  1062.       </td>
  1063.     </tr>
  1064.     <tr class="hback" id="help4" style="display:none"> 
  1065.       <td align="right">查询帮助</td>
  1066.       <td>
  1067.     查询:数字和日期型的字段,支持<=<>=><>等等运算符号如:查过期天数>2 ; 其它类型支持 A B ,A* *B ,*A* *B* ,AB等模式.
  1068.       </td>
  1069.     </tr>
  1070. <%if request.QueryString("Act")="Search" then %>
  1071.     <tr class="hback"> 
  1072.       <td align="right">自编号ID</td>
  1073.       <td>
  1074.    <input type="text" name="AddrID" id="AddrID" size="40" maxlength="11">
  1075.       </td>
  1076.     </tr>
  1077. <%end if%>
  1078. <tr  class="hback">
  1079. <td id="Ajax_AddrInfo" colspan="4">
  1080. <%if Bol_IsEdit then Call Edit_AddrList(DS_Rs("DownLoadID")) end if%>
  1081. </td>
  1082. </tr>
  1083.     <tr  class="hback"> 
  1084.               <td align="right">添加下载</td>
  1085.       <td>
  1086. <input name="FilesNum" type="text" value="2" size="10" maxlength="2" onBlur="Do.these('FilesNum',function(){return isNumber('FilesNum','FilesNum_Alt','必须正整数!',true)})" onKeyUp="Do.these('FilesNum',function(){return isNumber('FilesNum','FilesNum_Alt','必须正整数!',true)})"> 
  1087.         <input type="button" name="button42" value="设定" onClick="ChooseOption();">
  1088.                 <span id="FilesNum_Alt"></span> <span class="tx">请点击设定添加下载地址</span></td>
  1089.     </tr>
  1090. <tr  class="hback"><td colspan="4" id="OtherInput">
  1091. </td></tr>
  1092.    <tr  class="hback"> 
  1093.       <td align="center" colspan="4">
  1094.           <input type="submit" value=" 确定提交 "/> 
  1095.               &nbsp; <input type="reset" value=" 重置 " />
  1096.      &nbsp; <input type="button" name="btn_todel" value=" 删除 " onClick="if(confirm('确定删除该项目吗?')) location='<%=server.URLEncode("DownloadList.asp?Act=Del&DownLoadID=")%>'+DownLoadID.value">
  1097.       </td>
  1098.     </tr>
  1099. </tbody>
  1100. </table>
  1101. </form>
  1102. <!--主表结束-->
  1103. </td></tr></table>
  1104. <%
  1105. End Sub
  1106. Sub Edit_AddrList(DownID)
  1107. Dim rowii
  1108. rowii = 0
  1109. if DownID<>"" then
  1110. DS_Sql1 = "select ID,AddressName,Url,Number from FS_DS_Address where DownLoadID = '"&DownID&"' order by Number desc"
  1111. set DS_Rs1 = Conn.execute(DS_Sql1)
  1112. response.Write("<table border=""0"" width=""100%"" cellpadding=""3"" cellspacing=""1"" class=""table"">"&vbcrlf)
  1113. do while not DS_Rs1.eof 
  1114. rowii = rowii + 1%>
  1115.     <tr  class="hback"> 
  1116.       <td align="right">下载地址名称</td>
  1117.       <td>
  1118. <input type="text" size="40" maxlength="50" name="AddressName" id="AddressName" value="<%=DS_Rs1("AddressName")%>"
  1119.     onFocus="Do.these('AddressName',function(){return isEmpty('AddressName','AddressName_Alt<%=rowii%>')})" onKeyUp="Do.these('AddressName',function(){return isEmpty('AddressName','AddressName_Alt<%=rowii%>')})"> 
  1120.   <span id="AddressName_Alt<%=rowii%>"></span>
  1121.   </td>   
  1122.     </tr>
  1123.     <tr>
  1124.       <td class="hback" align="right">下载地址</td>
  1125.       <td colspan="3" class="hback">
  1126.   <input name="Url" type="text" id="Url" maxlength="100" style="width:50%" value="<%=DS_Rs1("Url")%>"> 
  1127.      <input type="button" name="bnt_ChoosePic_rowBettween"  value="选择文件" onClick="SelectFile();">
  1128.   <span id="Url_Alt"></span>
  1129.   </td>
  1130.     </tr>
  1131.     <tr  class="hback"> 
  1132.       <td align="right">下载地址排序</td>
  1133.       <td>
  1134.   <input type="text" name="Number" id="Number" size="10" maxlength="1" value="<%=DS_Rs1("Number")%>">
  1135.   <%if rowii>1 then%>
  1136.   <input type="button" class="tx" value="删除这条下载" onClick="if(confirm('确定删除这条下载吗?')) {new Ajax.Updater('Ajax_AddrInfo','DownloadList_Ajax.asp?no-cache='+Math.random() , {method: 'get', parameters: 'Act=DelAddr&DownLoadID=<%=DownID%>&AddrID=<%=DS_Rs1("ID")%>' });disabled=true;}">
  1137.   <%end if%>
  1138.       <span class=tx>默认排序请留空!</span></td>
  1139.     </tr>
  1140. <%
  1141. DS_Rs1.movenext
  1142. loop
  1143. response.Write("</table>")
  1144. DS_Rs1.close
  1145. end if
  1146. end Sub
  1147. set DS_Rs = Nothing
  1148. User_Conn.close
  1149. Conn.close
  1150. %>
  1151. <script language="javascript" type="text/javascript" src="../../FS_Inc/wz_tooltip.js"></script>
  1152. <script language="JavaScript">
  1153. <!--//判断后将排序完善.字段名后面显示指示
  1154. //打开后根据规则显示箭头
  1155. var Req_FildName;
  1156. if (Old_Sql.indexOf("filterorderby=")>-1)
  1157. {
  1158. var tmp_arr_ = Old_Sql.split('?')[1].split('&');
  1159. for(var ii=0;ii<tmp_arr_.length;ii++)
  1160. {
  1161. if (tmp_arr_[ii].indexOf("filterorderby=")>-1)
  1162. {
  1163. if(Old_Sql.indexOf("csed")>-1)
  1164. {Req_FildName = tmp_arr_[ii].substring(tmp_arr_[ii].indexOf("filterorderby=") + "filterorderby=".length , tmp_arr_[ii].indexOf("csed"));break;}
  1165. else
  1166. {Req_FildName = tmp_arr_[ii].substring(tmp_arr_[ii].indexOf("filterorderby=") + "filterorderby=".length , tmp_arr_[ii].length);break;}
  1167. }
  1168. }
  1169. if (document.getElementById('Show_Oder_'+Req_FildName)!=null)  
  1170. {
  1171. if(Old_Sql.indexOf(Req_FildName + "csed")>-1)
  1172. {
  1173. eval('Show_Oder_'+Req_FildName).innerText = '↓';
  1174. }
  1175. else
  1176. {
  1177. eval('Show_Oder_'+Req_FildName).innerText = '↑';
  1178. }
  1179. }
  1180. }
  1181. /////////////////////////////////////////////////////////
  1182. function chkinput()
  1183. {
  1184. var mainb=isEmpty('Name','Name_Alt') &&  isEmpty('ClassID','ClassName_Alt') && isEmpty('Description','Description_Alt') && isEmpty('FileExtName','FileExtName_Alt') ;
  1185. if (mainb==true)
  1186. {
  1187. if (document.getElementById('AddressName')==null)
  1188. {
  1189. mainTable.tBodies[0].style.display="none";
  1190. mainTable.tBodies[1].style.display="";
  1191. alert('别忘了添加下载地址!');
  1192. ChooseOption();
  1193. return false;
  1194. }
  1195. else if (document.getElementById('AddressName').value=='')
  1196. {
  1197. mainTable.tBodies[0].style.display="none";
  1198. mainTable.tBodies[1].style.display="";
  1199. alert('请添加下载地址!');
  1200. document.getElementById('AddressName').focus();
  1201. return false;
  1202. }
  1203. else         
  1204. return mainb;
  1205. }
  1206. return mainb;
  1207. }
  1208. function secBoard(n)
  1209. {  
  1210.   for(i=0;i<mainTable.tBodies.length;i++)
  1211.   {
  1212.    mainTable.tBodies[i].style.display="none"; 
  1213. document.getElementById('secTableTd'+i).className = ''; 
  1214.   }
  1215.   event.srcElement.className='xingmu';
  1216.   mainTable.tBodies[n].style.display="block";
  1217. }
  1218. function SelectClass()
  1219. {
  1220. var ReturnValue='',TempArray=new Array();
  1221. ReturnValue = OpenWindow('lib/SelectClassFrame.asp',400,300,window);
  1222. if (ReturnValue.indexOf('***')!=-1)
  1223. {
  1224. TempArray = ReturnValue.split('***');
  1225. document.form1.ClassID.value=TempArray[0]
  1226. document.form1.ClassName.value=TempArray[1]
  1227. }
  1228. }
  1229. <%if request.QueryString("Act")="Add" or request.QueryString("Act")="Edit" then%>
  1230. function document.onreadystatechange()
  1231. {
  1232. ChooseExeName();
  1233. }
  1234. <%end if%>
  1235. function ChooseExeName()
  1236. {
  1237.   var ObjValue = document.form1.selectPop.options[document.form1.selectPop.selectedIndex].value;
  1238.   if (ObjValue!='')
  1239.   {
  1240. if (document.form1.BrowPop.value=='')
  1241. document.form1.BrowPop.value = ObjValue;
  1242. else if(document.form1.BrowPop.value.indexOf(ObjValue)==-1)
  1243. document.form1.BrowPop.value = document.form1.BrowPop.value+","+ObjValue;
  1244. if (ObjValue=='del')
  1245.    document.form1.BrowPop.value ='';
  1246.   }
  1247.    CheckNumber(document.form1.ConsumeNum,"浏览扣点值");
  1248.   if (document.form1.ConsumeNum.value>32767||document.form1.ConsumeNum.value<-32768||document.form1.ConsumeNum.value=='0')
  1249. {
  1250. alert('浏览扣点值超过允许范围!n最大32767,且不能为0');
  1251. document.form1.ConsumeNum.value='';
  1252. document.form1.ConsumeNum.focus();
  1253. }
  1254.   if (isNaN(document.form1.OverDue.value)||document.form1.OverDue.value>32767||document.form1.OverDue.value<0)
  1255. {
  1256. alert('过期天数必须大于等于0');
  1257. document.form1.OverDue.value='';
  1258. document.form1.OverDue.focus();
  1259. }
  1260.   if (document.form1.BrowPop.value!=''||document.form1.ConsumeNum.value!=''||(document.form1.OverDue.value!=''&&document.form1.OverDue.value!='0')){document.form1.FileExtName.options[5].selected=true;document.form1.FileExtName.readonly=true;}
  1261.   else {document.form1.FileExtName.readonly=false;}
  1262. }
  1263. function CheckFileExtName(Obj)
  1264. {
  1265. if (Obj.value!='')
  1266. {
  1267. for (var i=0;i<document.all.FileExtName.length;i++)
  1268. {
  1269. if (document.all.FileExtName.options(i).value=='asp') document.all.FileExtName.options(i).selected=true;
  1270. }
  1271. document.all.FileExtName.readonly=true;
  1272. }
  1273. else
  1274. {
  1275. document.all.FileExtName.readonly=false;
  1276. }
  1277. }
  1278. function ChooseOption()
  1279.  {
  1280.   var FilesNum = document.all.FilesNum.value;
  1281.   if (FilesNum=='')
  1282.    FilesNum=2;
  1283.   if (!isNumber('FilesNum','FilesNum_Alt','必须正整数!',true)) {document.all.FilesNum.value='2';FilesNum=2;}
  1284.   var i,Optionstr;
  1285.   Optionstr = '<table border="0" width="100%" cellpadding="3" cellspacing="1" class="table">';
  1286.   for (i=1;i<=FilesNum;i++)
  1287.       {
  1288.    Optionstr += '    <tr  class="hback">n' 
  1289.        Optionstr += '<td align="right">下载地址名称</td>n'
  1290.        Optionstr += '<td>n'
  1291.    Optionstr += '<input type="text" size="40" maxlength="50" name="AddressName" id="AddressName" value="" '
  1292.   //Optionstr += "onFocus="Do.these('AddressName',function(){return isEmpty('AddressName','AddressName_Alt"+i+"')})" onKeyUp="Do.these('AddressName',function(){return isEmpty('AddressName','AddressName_Alt"+i+"')})" "
  1293.    Optionstr += "onBlur="if(this.value!='') new Ajax.Updater('Name_Chk"+i+"','DownloadList_Ajax.asp?no-cache='+Math.random() , {method: 'get', parameters: 'Act=Check&stype=addrname&value='+this.value });">n"
  1294.    Optionstr += '<span id="Name_Chk'+i+'"></span>n'
  1295.    Optionstr += '</td>n'
  1296.        Optionstr += '</tr>n'
  1297.        Optionstr += '<tr>n'
  1298.        Optionstr += '<td class="hback" align="right">下载地址</td>n'
  1299.        Optionstr += '<td colspan="3" class="hback" id="td_Url"+i>n'
  1300.    Optionstr += '<input name="Url" type="text" id="Url" style="width:50%"  maxlength="100" value="">n' 
  1301.    Optionstr += '<input type="button" name="bnt_ChoosePic_rowBettween"  value="选择文件" onClick="SelectFile();">n' 
  1302.    Optionstr += '</td>n'
  1303.        Optionstr += '</tr>n'
  1304.        Optionstr += '<tr  class="hback"> n'
  1305.        Optionstr += '<td align="right">下载地址排序</td>n'
  1306.        Optionstr += '<td>n'
  1307.    Optionstr += '<input type="text" name="Number" id="Number" size="10" maxlength="1" value=""><span class=tx>默认排序请留空!</span>n'
  1308.        Optionstr += '</td>n'
  1309.        Optionstr += '</tr>n' ;
  1310.    }
  1311.   Optionstr += '</table>n' ;
  1312.   //alert(Optionstr);
  1313.   document.all.OtherInput.innerHTML = Optionstr;
  1314.   }
  1315. function SelectFile()     
  1316. {
  1317.  var returnvalue = OpenWindow('../CommPages/SelectManageDir/SelectPic.asp?CurrPath=<%=str_CurrPath %>',500,300,window);
  1318.  if (returnvalue!='')
  1319.  {
  1320.   event.srcElement.parentNode.firstChild.value=returnvalue;
  1321.  }
  1322. }
  1323. function ReImgSize(objstr)
  1324. {
  1325. if ($(objstr).tagName=='IMG')
  1326. if ($(objstr).src.indexOf("Files/")>-1)
  1327. {
  1328. if ($(objstr).offsetWidth>100)  $(objstr).width="100";
  1329. }
  1330. }  
  1331. -->
  1332. </script>
  1333. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->