PageRenderTime 28ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 1ms

/Wap/User/User_Photo.asp

https://github.com/joechen2010/health
ASP | 599 lines | 554 code | 28 blank | 17 comment | 9 complexity | 23519d564bba0326792d70fa1a580f00 MD5 | raw file
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
  2. <!--#include file="../Conn.asp"-->
  3. <!--#include file="../KS_Cls/Kesion.CommonCls.asp"-->
  4. <!--#include file="UpFileSave.asp"-->
  5. <%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%><?xml version="1.0" encoding="utf-8"?>
  6. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
  7. <wml>
  8. <head>
  9. <meta http-equiv="Cache-Control" content="no-Cache"/>
  10. <meta http-equiv="Cache-Control" content="max-age=0"/>
  11. </head>
  12. <card id="main" title="我的相册">
  13. <p>
  14. <%
  15. Set KS=New PublicCls
  16. IF Cbool(KSUser.UserLoginChecked)=False Then
  17. Response.redirect KS.GetDomain&"User/Login/"
  18. Response.End
  19. End If
  20. Action=Trim(Request("Action"))
  21. If KS.SSetting(0)=0 Then
  22. Response.write "对不起,本站关闭个人空间功能!<br/>"
  23. ElseIF Conn.Execute("Select Count(BlogID) From KS_Blog Where UserName='"&KSUser.UserName&"'")(0)=0 Then
  24. Response.write "您还没有开通个人空间!<br/>"
  25. ElseIF Conn.Execute("Select status From KS_Blog Where UserName='"&KSUser.UserName&"'")(0)<>1 Then
  26. Response.write "对不起,你的空间还没有通过审核或被锁定!<br/>"
  27. Else
  28. Select Case Action
  29. Case "Gallery"
  30. Call Gallery()'上传须知
  31. Case "Delxc"
  32. Call Delxc()'删除相册
  33. Case "Delzp"
  34. Call Delzp()'删除照片
  35. Case "Editzp"
  36. Call Editzp()'编辑照片
  37. Case "Addzp"
  38. Call Addzp()'上传照片
  39. Case "AddSave"
  40. Call AddSave()'相片保存
  41. Case "EditSave"
  42. Call EditSave()'相片修改成功
  43. Case "ViewZP"
  44. Call ViewZP()'查看照片
  45. Case "Editxc","Createxc"
  46. Call Managexc() '相册,添加/修改
  47. Case "photoxcsave"
  48. Call photoxcsave() '保存相册
  49. Case Else
  50. Call PhotoxcList()'相册列表
  51. End Select
  52. End If
  53. '相册列表============================================
  54. Sub PhotoxcList()
  55. status=KS.S("status")
  56. %>
  57. =我的相册=<br/>
  58. 相册列表|
  59. <a href="User_UpFile.asp?ChannelID=9997&amp;<%=KS.WapValue%>">WAP2.0上传</a><br/>
  60. <a href="User_UpFile.asp?ChannelID=9998&amp;<%=KS.WapValue%>">创建相册</a>|
  61. <a href="User_Photo.asp?action=Gallery&amp;<%=KS.WapValue%>">照片上传须知</a><br/>
  62. <% if instr(Request.ServerVariables("http_accept"),"ucweb")<5 then Response.write GuangGao %>
  63. ---------<br/>
  64. <%Select Case status
  65. Case "1"
  66. %>
  67. 已审[<%=conn.execute("select count(id) from ks_photoxc where username='"&KSUser.UserName&"' and status=1")(0)%>]
  68. <%Case Else%>
  69. <a href="User_Photo.asp?status=1&amp;<%=KS.WapValue%>">已审[<%=conn.execute("select count(id) from ks_photoxc where username='"&KSUser.UserName&"' and status=1")(0)%>]</a>
  70. <%End Select
  71. Select Case status
  72. Case "0"%>
  73. 未审[<%=conn.execute("select count(id) from ks_photoxc where username='"&KSUser.UserName&"' and status=0")(0)%>]
  74. <%Case Else%>
  75. <a href="User_Photo.asp?status=0&amp;<%=KS.WapValue%>">未审[<%=conn.execute("select count(id) from ks_photoxc where username='"&KSUser.UserName&"' and status=0")(0)%>]</a>
  76. <%End Select
  77. Select Case status
  78. Case "2"%>
  79. 锁定[<%=conn.execute("select count(id) from ks_photoxc where username='"&KSUser.UserName&"' and status=2")(0)%>]
  80. <%Case Else%>
  81. <a href="User_Photo.asp?status=2&amp;<%=KS.WapValue%>">锁定[<%=conn.execute("select count(id) from ks_photoxc where username='"&KSUser.UserName&"' and status=2")(0)%>]</a>
  82. <%End Select%>
  83. <br/>---------<br/>
  84. <%
  85. If KS.S("page") <> "" Then
  86. CurrentPage = KS.ChkClng(KS.S("page"))
  87. Else
  88. CurrentPage = 1
  89. End If
  90. set rs=server.createobject("adodb.recordset")
  91. Param=" Where UserName='"&KSUser.UserName&"'"
  92. IF status<>"" Then
  93. Param=""&Param&" And status="&status&""
  94. End if
  95. sql = "select * from KS_Photoxc "&Param&" order by AddDate DESC"
  96. rs.open sql,conn,1,1
  97. if rs.bof and rs.eof then
  98. response.write "您还没有创建相册,马上<a href=""User_UpFile.asp?ChannelID=9998&amp;" & KS.WapValue & """>创建相册</a>!<br/>"
  99. else
  100. MaxPerPage =2
  101. totalPut = RS.RecordCount
  102. If CurrentPage < 1 Then CurrentPage = 1
  103. If (CurrentPage - 1) * MaxPerPage > totalPut Then
  104. If (totalPut Mod MaxPerPage) = 0 Then
  105. CurrentPage = totalPut \ MaxPerPage
  106. Else
  107. CurrentPage = totalPut \ MaxPerPage + 1
  108. End If
  109. End If
  110. If CurrentPage >1 and (CurrentPage - 1) * MaxPerPage < totalPut Then
  111. Rs.Move (CurrentPage - 1) * MaxPerPage
  112. Else
  113. CurrentPage = 1
  114. End If
  115. Do While Not RS.Eof
  116. '*******************************************************
  117. If KS.BusinessVersion = 1 Then
  118. response.write "<img src='../JpegMore.asp?JpegSize=128x0&amp;JpegUrl="&Rs("photourl")&"'/><br/>"
  119. Else
  120. response.write "<img src='" &rs("photourl")& "' /><br/>"
  121. End if
  122. '*******************************************************
  123. response.write "<a href=""User_Photo.asp?action=ViewZP&amp;xcid="&rs("ID")&"&amp;" & KS.WapValue & """>"&rs("xcname")&"</a><br/>"
  124. select case rs("status")
  125. case 1:response.write "(已审/"
  126. case 0:response.write "(未审/"
  127. end select
  128. select case rs("flag")
  129. case 1
  130. response.write "公开"
  131. case 2
  132. response.write "会员"
  133. case 3
  134. response.write "密码"
  135. case 4
  136. response.write "稳私"
  137. end select
  138. response.write "/"&rs("xps")&"张/"&rs("hits")&"次)<br/>"
  139. response.write "<a href=""User_Photo.asp?action=Editxc&amp;id="&rs("ID")&"&amp;" & KS.WapValue & """>修改相册</a> "
  140. response.write "<a href=""User_Photo.asp?action=Delxc&amp;id="&rs("ID")&"&amp;" & KS.WapValue & """>删除</a><br/>"
  141. Rs.Movenext
  142. I = I + 1
  143. If I >= MaxPerPage Then Exit Do
  144. loop
  145. Call KS.ShowPageParamter(totalPut, MaxPerPage, "User_Photo.asp", True, "本相册", CurrentPage, "Status=" & Status &"&amp;" & KS.WapValue & "")
  146. end if
  147. rs.close
  148. Response.Write "<br/>---------<br/>"
  149. End Sub
  150. '删除相册=====================================================
  151. Sub Delxc()
  152. id=KS.S("id")
  153. Dim rs:Set rs=server.createobject("adodb.recordset")
  154. rs.open "select PhotoUrl from KS_Photoxc where ID="&ID&"",conn,1,1
  155. if not rs.eof then
  156. KS.DeleteFile(rs("photourl"))
  157. Conn.Execute("Delete From KS_Photoxc Where ID="&ID&"")
  158. end if
  159. rs.close:set rs=nothing
  160. Set rs=server.createobject("adodb.recordset")
  161. rs.open "select * from ks_photozp where xcid in(" &id & ")",conn,1,1
  162. if not rs.eof then
  163. do while not rs.eof
  164. KS.DeleteFile(rs("photourl"))
  165. rs.movenext
  166. loop
  167. end if
  168. Conn.execute("delete from ks_photozp where xcid in(" & id& ")")
  169. rs.close:set rs=nothing
  170. Response.write "相册删除成功。<br/>"
  171. Response.Write "<a href=""User_Photo.asp?action=PhotoxcList&amp;" & KS.WapValue & """>照片列表</a><br/>"
  172. End Sub
  173. '删除照片=====================================================
  174. Sub Delzp()
  175. id=KS.S("id")
  176. xcid=KS.S("xcid")
  177. Dim RS:Set rs=server.createobject("adodb.recordset")
  178. rs.open "select * from ks_photozp where id="&id&"",conn,1,1
  179. if not rs.eof then
  180. KS.DeleteFile(rs("photourl"))
  181. Conn.execute("update ks_photoxc set xps=xps-1 where id="&rs("xcid"))
  182. end if
  183. Conn.execute("delete from ks_photozp where id="&id&"")
  184. rs.close:set rs=nothing
  185. Response.write "照片删除成功。<br/>"
  186. Response.Write "<a href=""User_Photo.asp?action=ViewZP&amp;xcid="&xcid&"&amp;" & KS.WapValue & """>照片列表</a><br/>"
  187. End Sub
  188. '查看照片=====================================================
  189. Sub ViewZP()
  190. xcid=KS.S("xcid")
  191. %>
  192. =查看照片=<br/>
  193. <a href="User_Photo.asp?action=PhotoxcList&amp;<%=KS.WapValue%>">相册列表</a>|
  194. <a href="User_UpFile.asp?ChannelID=9997&amp;<%=KS.WapValue%>">WAP2.0上传</a><br/>
  195. <a href="User_UpFile.asp?ChannelID=9998&amp;<%=KS.WapValue%>">创建相册</a>|
  196. <a href="User_Photo.asp?action=Gallery&amp;<%=KS.WapValue%>">照片上传须知</a><br/>
  197. ---------<br/>
  198. <%
  199. Set rs=Server.CreateObject("ADODB.RECORDSET")
  200. rs.Open "select xcname from KS_Photoxc WHERE ID="&XCID&" order by AddDate desc",CONN,1,1
  201. if rs.Eof And rs.Bof Then
  202. rs.close:set rs=nothing
  203. response.write "参数传递出错!"
  204. response.end
  205. else
  206. title=rs(0)
  207. rs.close
  208. end if
  209. If KS.S("page") <> "" Then
  210. CurrentPage = KS.ChkClng(KS.S("page"))
  211. Else
  212. CurrentPage = 1
  213. End If
  214. set rs=server.createobject("adodb.recordset")
  215. sql="select * from KS_PhotoZP Where xcid="& xcid&" order by AddDate desc"
  216. rs.open sql,conn,1,1
  217. if rs.eof and rs.bof then
  218. response.write "该相册下没有照片,<a href=""User_UpFile.asp?ChannelID=9997&amp;" & KS.WapValue & """>WAP2.0上传</a><br/>"
  219. else
  220. MaxPerPage =2
  221. totalPut = RS.RecordCount
  222. If CurrentPage < 1 Then CurrentPage = 1
  223. If (CurrentPage - 1) * MaxPerPage > totalPut Then
  224. If (totalPut Mod MaxPerPage) = 0 Then
  225. CurrentPage = totalPut \ MaxPerPage
  226. Else
  227. CurrentPage = totalPut \ MaxPerPage + 1
  228. End If
  229. End If
  230. If CurrentPage >1 and (CurrentPage - 1) * MaxPerPage < totalPut Then
  231. Rs.Move (CurrentPage - 1) * MaxPerPage
  232. Else
  233. CurrentPage = 1
  234. End If
  235. do while not rs.eof
  236. '*******************************************************
  237. If KS.BusinessVersion = 1 Then
  238. response.write "<img src='../JpegMore.asp?JpegSize=128x0&amp;JpegUrl="&rs("photourl")&"'/><br/>"
  239. Else
  240. response.write "<img src='" &rs("photourl")& "' /><br/>"
  241. End if
  242. '*******************************************************
  243. response.write "照片名称:"&rs("title")&"<br/>"
  244. response.write "浏览次数:"&rs("hits")&"<br/>"
  245. response.write "创建日期:"&rs("adddate")&"<br/>"
  246. response.write "图片大小:"&rs("photosize")&"<br/>"
  247. 'response.write "相片地址:"&rs("photourl")&"<br/>"
  248. response.write "相片描述:"&rs("descript")&"<br/>"
  249. response.write "所属相册:"&conn.execute("select xcname from ks_photoxc where id=" & xcid)(0)&"<br/>"
  250. response.write "<a href=""User_Photo.asp?action=Editzp&amp;id="&rs("ID")&"&amp;" & KS.WapValue & """>修改照片</a>|"
  251. response.write "<a href=""User_Photo.asp?action=Delzp&amp;xcid="&xcid&"&amp;id="&rs("ID")&"&amp;" & KS.WapValue & """>删除照片</a><br/>"
  252. rs.movenext
  253. I = I + 1
  254. If I >= MaxPerPage Then Exit Do
  255. loop
  256. Call KS.ShowPageParamter(totalPut, MaxPerPage, "User_Photo.asp", True, "张照片", CurrentPage, "Action=ViewZP&amp;xcid=" & xcid &"&amp;" & KS.WapValue & "")
  257. End If
  258. Rs.Close
  259. response.Write "<br/>---------<br/>"
  260. End Sub
  261. '相册,添加/修改==================================================================
  262. Sub Managexc()
  263. On Error Resume Next
  264. If KS.S("Action")="Createxc" Then
  265. sTemp = Kesion
  266. sTempArr=split(sTemp,"|||")
  267. If Cbool(sTempArr(0))=False Then
  268. Response.Write sTempArr(1)
  269. Else
  270. PhotoUrl = Replace(sTempArr(1),"|","")
  271. End if
  272. End if
  273. If KS.S("ID")<>"" Then
  274. Set Rs=Server.CreateObject("ADODB.RECORDSET")
  275. sql = "select * from KS_Photoxc Where ID="&KS.S("ID")&""
  276. Rs.Open sql,Conn,1,1
  277. If Not RS.EOF Then
  278. xcname=rs("xcname")
  279. ClassID=rs("ClassID")
  280. Descript=rs("Descript")
  281. flag=rs("Flag")
  282. If PhotoUrl<>"" Then
  283. PhotoUrl=PhotoUrl
  284. Else
  285. PhotoUrl=rs("PhotoUrl")
  286. End if
  287. PassWord=rs("PassWord")
  288. OpStr="确定修改"
  289. TipStr="修改我的相册"
  290. rs.Close:Set rs=Nothing
  291. End if
  292. Else
  293. xcname=FormatDatetime(Now,2)
  294. ClassID="0"
  295. flag="1"
  296. password=""
  297. OpStr="立即创建"
  298. TipStr="创建我的相册"
  299. End if
  300. %>
  301. =<%=TipStr%>=<br/>
  302. 相册封面<br/>
  303. <img src="<%=PhotoUrl%>"/><br/>
  304. 相册名称:<input name="xcname<%=minute(now)%><%=second(now)%>" type="text" maxlength="20" size="20" value="<%=xcname%>"/><br/>
  305. 相册分类:<select name="ClassID">
  306. <option value="0">选择类别</option>
  307. <% Set RS=Server.CreateObject("ADODB.RECORDSET")
  308. RS.Open "Select * From KS_PhotoClass order by orderid",conn,1,1
  309. If Not RS.EOF Then
  310. Do While Not RS.Eof
  311. Response.Write "<option value=""" & RS("ClassID") & """>" & RS("ClassName") & "</option>"
  312. RS.MoveNext
  313. Loop
  314. End If
  315. RS.Close
  316. Set RS=Nothing
  317. %>
  318. </select> <br/>
  319. 是否公开:<select name="flag">
  320. <option value="1">完全公开</option>
  321. <option value="2">会员开见</option>
  322. <option value="3">密码共享</option>
  323. <option value="4">隐私相册</option>
  324. </select><br/>
  325. 访问密码:<input name="password<%=minute(now)%><%=second(now)%>" type="text" maxlength="20" size="20" value="<%=password%>"/><br/>
  326. 相册介绍:<input name="Descript<%=minute(now)%><%=second(now)%>" type="text" maxlength="20" size="20" value="<%=Descript%>"/><br/>
  327. <anchor><%=OpStr%><go href="User_Photo.asp?Action=photoxcsave&amp;id=<%=id%>&amp;<%=KS.WapValue%>" method="post" accept-charset="utf-8">
  328. <postfield name="xcname" value="$(xcname<%=minute(now)%><%=second(now)%>)"/>
  329. <postfield name="ClassID" value="$(ClassID)"/>
  330. <postfield name="flag" value="$(flag)"/>
  331. <postfield name="password" value="$(password<%=minute(now)%><%=second(now)%>)"/>
  332. <postfield name="PhotoUrl" value="<%=PhotoUrl%>"/>
  333. <postfield name="Descript" value="$(Descript<%=minute(now)%><%=second(now)%>)"/>
  334. </go></anchor>
  335. <br/>
  336. <%
  337. response.Write "---------<br/>"
  338. End Sub
  339. '保存相册===============================================
  340. Sub photoxcsave()
  341. id=KS.S("id")
  342. xcname=KS.S("xcname")
  343. ClassID=KS.S("ClassID")
  344. flag=KS.S("flag")
  345. password=KS.S("password")
  346. PhotoUrl=KS.S("PhotoUrl")
  347. Descript=KS.S("Descript")
  348. If xcname="" Then
  349. Response.write "出错提示,请输入相册名称!"
  350. Response.Write "<a href=""User_Photo.asp?action=Createxc&amp;id="&id&"&amp;" & KS.WapValue & """>返回重写</a><br/>"
  351. ElseIF ClassID=0 Then
  352. Response.write "出错提示,请选择相册类型!"
  353. Response.Write "<a href=""User_Photo.asp?action=Createxc&amp;id="&id&"&amp;" & KS.WapValue & """>返回重写</a><br/>"
  354. Else
  355. Set rs=Server.CreateObject("ADODB.RECORDSET")
  356. If id<>"" Then
  357. rs.open "select * from KS_Photoxc Where id="&id&"",conn,1,3
  358. If rs.Eof And rs.Bof Then
  359. rs("UserName")=KSUser.UserName
  360. rs("xcname")=xcname
  361. rs("ClassID")=ClassID
  362. rs("Descript")=Descript
  363. rs("Flag")=Flag
  364. rs("Password")=PassWord
  365. rs("PhotoUrl")=PhotoUrl
  366. rs.Update
  367. End If
  368. Else
  369. rs.open "select * from KS_Photoxc",conn,1,3
  370. rs.AddNew
  371. rs("AddDate")=now
  372. If KS.SSetting(4)=1 Then
  373. rs("Status")=0 '设为已审
  374. Else
  375. rs("Status")=1 '设为已审
  376. End If
  377. rs("UserName")=KSUser.UserName
  378. rs("xcname")=xcname
  379. rs("ClassID")=ClassID
  380. rs("Descript")=Descript
  381. rs("Flag")=Flag
  382. rs("Password")=PassWord
  383. rs("PhotoUrl")=PhotoUrl
  384. rs.Update
  385. End If
  386. Response.write "相册创建/修改成功。<br/>"
  387. response.Write "<a href=""User_Photo.asp?action=PhotoxcList&amp;" & KS.WapValue & """>我的相册</a><br/>"
  388. rs.Close:Set rs=Nothing
  389. End If
  390. End Sub
  391. '上传照片==================================
  392. Sub Addzp()
  393. PhotoSize=KS.S("PhotoSize")
  394. PhotoUrl=KS.S("PhotoUrl")
  395. On Error Resume Next
  396. sTemp = Kesion
  397. sTempArr=split(sTemp,"|||")
  398. If Cbool(sTempArr(0))=False Then
  399. Response.Write sTempArr(1)
  400. Else
  401. Response.write "=增加相片=<br/>"
  402. Response.write "恭喜您,照片上传成功!请按发布按钮进行保存.<br/>"
  403. Dim I,TempFileArr
  404. TempFileStr = sTempArr(1)
  405. TempFileStr=Left(TempFileStr,Len(TempFileStr)-1)
  406. TempFileArr=split(TempFileStr,"|")
  407. For I=Lbound(TempFileArr) To Ubound(TempFileArr)
  408. Response.Write "" & TempFileArr(i) & "<br/>"
  409. Next
  410. %>
  411. 选择相册:<select name="XCID" >
  412. <option value="0">选择相册</option>
  413. <%
  414. Set RS=Server.CreateObject("ADODB.RECORDSET")
  415. RS.Open "Select * From KS_Photoxc where username='" & KSUser.UserName & "' order by id desc",Conn,1,1
  416. If Not RS.EOF Then
  417. Do While Not RS.Eof
  418. Response.Write "<option value=""" & RS("ID") & """>" & RS("XCName") & "</option>"
  419. RS.MoveNext
  420. Loop
  421. End If
  422. RS.Close:Set RS=Nothing
  423. %>
  424. </select><br/>
  425. 照片名称:<input name="Title<%=minute(now)%><%=second(now)%>" type="text" maxlength="20" size="20" value="<%=Title%>"/><br/>
  426. 照片介绍:<input name="Descript<%=minute(now)%><%=second(now)%>" type="text" maxlength="20" size="20" value="<%=Descript%>"/><br/>
  427. <anchor>立即发布<go href="User_Photo.asp?Action=AddSave&amp;<%=KS.WapValue%>" method="post" accept-charset="utf-8">
  428. <postfield name="PhotoUrls" value="<%=TempFileStr%>"/>
  429. <postfield name="XCID" value="$(XCID)"/>
  430. <postfield name="Title" value="$(Title<%=minute(now)%><%=second(now)%>)"/>
  431. <postfield name="Descript" value="$(Descript<%=minute(now)%><%=second(now)%>)"/>
  432. </go></anchor>
  433. <br/>
  434. <%
  435. End if
  436. End Sub
  437. '编辑照片==================================
  438. Sub Editzp()
  439. id=KS.S("id")
  440. Set rs=Server.CreateObject("ADODB.RECORDSET")
  441. rs.Open "Select * From KS_PhotoZp Where ID="&id,Conn,1,1
  442. If Not rs.Eof Then
  443. XCID=rs("XCID")
  444. Title=rs("Title")
  445. UserName=rs("UserName")
  446. descript=rs("descript")
  447. PhotoUrl=rs("PhotoUrl")
  448. End If
  449. rs.Close:Set rs=Nothing
  450. %>
  451. =编辑照片=<br/>
  452. <img src="<%=PhotoUrl%>"/><br/>
  453. 选择相册:<select name="XCID" >
  454. <option value="0">选择相册</option>
  455. <%
  456. Set RS=Server.CreateObject("ADODB.RECORDSET")
  457. RS.Open "Select * From KS_Photoxc where username='"&KSUser.UserName&"' order by id desc",conn,1,1
  458. If Not RS.EOF Then
  459. Do While Not RS.Eof
  460. Response.Write "<option value=""" & RS("ID") & """>" & RS("XCName") & "</option>"
  461. RS.MoveNext
  462. Loop
  463. End If
  464. RS.Close:Set RS=Nothing
  465. %>
  466. </select><br/>
  467. 照片名称:<input name="Title<%=minute(now)%><%=second(now)%>" type="text" maxlength="20" size="20" value="<%=Title%>"/><br/>
  468. 照片介绍:<input name="Descript<%=minute(now)%><%=second(now)%>" type="text" maxlength="20" size="20" value="<%=Descript%>"/><br/>
  469. <anchor>编辑照片<go href="User_Photo.asp?Action=EditSave&amp;ID=<%=ID%>&amp;<%=KS.WapValue%>" method="post" accept-charset="utf-8">
  470. <postfield name="PhotoUrl" value="<%=PhotoUrl%>"/>
  471. <postfield name="XCID" value="$(XCID)"/>
  472. <postfield name="Title" value="$(Title<%=minute(now)%><%=second(now)%>)"/>
  473. <postfield name="Descript" value="$(Descript<%=minute(now)%><%=second(now)%>)"/>
  474. </go></anchor>
  475. <br/>
  476. <%
  477. End Sub
  478. '相片修改成功==================================
  479. Sub EditSave()
  480. ID=KS.S("ID")
  481. XCID=KS.S("XCID")
  482. Title=KS.S("Title")
  483. Descript=KS.S("Descript")
  484. PhotoUrl=KS.S("PhotoUrl")
  485. If XCID=0 Then
  486. Response.write "出错提示,你没有选择相册。<br/>"
  487. Response.Write "<a href=""User_Photo.asp?action=Editzp&amp;id="&id&"&amp;" & KS.WapValue & """>返回重写</a><br/>"
  488. ElseIF Title="" Then
  489. Response.write "出错提示,你没有输入相片名称。<br/>"
  490. Response.Write "<a href=""User_Photo.asp?action=Editzp&amp;id="&id&"&amp;" & KS.WapValue & """>返回重写</a><br/>"
  491. Else
  492. Set RSObj=Server.CreateObject("Adodb.Recordset")
  493. RSObj.Open "Select * From KS_PhotoZP Where ID="&ID,Conn,1,3
  494. If Not RSObj.Eof Then
  495. RSObj("Title")=Title
  496. RSObj("XCID")=XCID
  497. RSObj("PhotoUrl")=PhotoUrl
  498. RSObj("Descript")=Descript
  499. 'RSObj("PhotoSize") =KS.GetFieSize(Server.Mappath(PhotoUrls))
  500. RSObj.Update
  501. End If
  502. RSObj.Close:Set RSObj=Nothing
  503. Response.write "相片修改成功。<br/>"
  504. Response.Write "<a href=""User_Photo.asp?action=ViewZP&amp;XCID="&XCID&"&amp;" & KS.WapValue & """>相册分娄</a><br/>"
  505. End If
  506. End Sub
  507. '相片保存==================================
  508. Sub AddSave()
  509. XCID=KS.S("XCID")
  510. Title=KS.S("Title")
  511. Descript=KS.S("Descript")
  512. PhotoUrls=KS.S("PhotoUrls")
  513. If PhotoUrls="" Then
  514. Response.Write "你没有上传相片!<br/>"
  515. Response.Write "<a href=""User_Photo.asp?action=Addzp&amp;PhotoUrl="&PhotoUrl&"&amp;PhotoSize="&PhotoSize&"&amp;" & KS.WapValue & """>返回重写</a><br/>"
  516. ElseIF XCID=0 Then
  517. Response.write "出错提示,你没有选择相册。<br/>"
  518. Response.Write "<a href=""User_Photo.asp?action=Addzp&amp;PhotoUrl="&PhotoUrl&"&amp;PhotoSize="&PhotoSize&"&amp;" & KS.WapValue & """>返回重写</a><br/>"
  519. ElseIF Title="" Then
  520. Response.write "出错提示,你没有输入相片名称。<br/>"
  521. Response.Write "<a href=""User_Photo.asp?action=Addzp&amp;PhotoUrl="&PhotoUrl&"&amp;PhotoSize="&PhotoSize&"&amp;" & KS.WapValue & """>返回重写</a><br/>"
  522. Else
  523. PhotoUrlArr=Split(PhotoUrls,"|")
  524. Set RSObj=Server.CreateObject("Adodb.Recordset")
  525. RSObj.Open "Select * From KS_PhotoZP",Conn,1,3
  526. For I=0 to ubound(PhotoUrlArr)
  527. RSObj.AddNew
  528. RSObj("PhotoSize")=KS.GetFieSize(Server.Mappath(PhotoUrlArr(I)))
  529. RSObj("Title")=Title
  530. RSObj("XCID")=XCID
  531. RSObj("UserName")=KSUser.UserName
  532. RSObj("PhotoUrl")=PhotoUrlArr(I)
  533. RSObj("Adddate")=Now
  534. RSObj("Descript")=Descript
  535. RSObj.Update
  536. Next
  537. RSObj.Close:Set RSObj=Nothing
  538. Conn.Execute("update KS_Photoxc set xps=xps+" & Ubound(PhotoUrlArr)+1 & " where id="&xcid)
  539. Response.write "相片保存成功。<br/>"
  540. Response.Write "<a href=""User_Photo.asp?action=ViewZP&amp;XCID="&XCID&"&amp;" & KS.WapValue & """>我的相册</a><br/>"
  541. End If
  542. End Sub
  543. '上传须知=========================================
  544. Sub Gallery()
  545. %>
  546. =上传须知=<br/>
  547. <a href="User_Photo.asp?action=PhotoxcList&amp;<%=KS.WapValue%>">相册列表</a>|
  548. <a href="User_UpFile.asp?ChannelID=9997&amp;<%=KS.WapValue%>">WAP2.0上传</a><br/>
  549. <a href="User_UpFile.asp?ChannelID=9998&amp;<%=KS.WapValue%>">创建相册</a>|
  550. 照片上传须知<br/>
  551. ---------<br/>
  552. 我们力求打造一个真实的交友环境因此只允许上传照片以下类型的均会被客服删除<br/>
  553. 1.不属于会员照片比如动物风景卡通等图片<br/>
  554. 2.明星照等其他一切此类型的照片<br/>
  555. 3.重复或者模糊不清的照片<br/>
  556. 4.其他我们认为不符合要求的照片<br/>
  557. 5.本站支持照片格式为jpg/gif/png其他格式接收不到<br/>
  558. 6.严禁上传黄色淫秽图片网站留有上传者的IP等个人信息记录以便有问题时配合相关部门做好取证请友友们自重<br/>
  559. 你可以上传你家人,或者朋友的相片,但一定要在主题或简介里注明否则我们会认为不符合规定<br/>
  560. ---------<br/>
  561. <%End Sub%>
  562. <a href="Index.asp?<%=KS.WapValue%>">我的地盘</a>
  563. <a href="<%=KS.GetGoBackIndex%>">返回首页</a><br/>
  564. <%
  565. Set KSUser=Nothing
  566. Set KS=Nothing
  567. Call CloseConn
  568. %>
  569. </p>
  570. </card>
  571. </wml>