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

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../FS_Inc/Const.asp" -->
  3. <!--#include file="../FS_Inc/Function.asp" -->
  4. <!--#include file="../FS_InterFace/MF_Function.asp" -->
  5. <!--#include file="lib/strlib.asp" -->
  6. <!--#include file="lib/UserCheck.asp" -->
  7. <!--#include file="../FS_Inc/Func_Page.asp" -->
  8. <%
  9. Dim str_CurrPath,rs
  10. str_CurrPath = Replace("/"&G_VIRTUAL_ROOT_DIR &"/"&G_USERFILES_DIR&"/"&Session("FS_UserNumber"),"//","/")
  11. set rs= Server.CreateObject(G_FS_RS)
  12. rs.open "select * From FS_ME_Photo where UserNumber='"&Fs_User.UserNumber&"' and id="&NoSqlHack(Request.QueryString("id")),User_Conn,1,3
  13. if rs.eof then
  14. rs.close:set rs=nothing
  15. strShowErr="<li>错误的参数</li>"
  16. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../PhotoManage.asp")
  17. Response.end
  18. end if
  19. %>
  20. <html xmlns="http://www.w3.org/1999/xhtml">
  21. <title>相册管理-网站内容管理系统</title>
  22. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  23. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  24. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  25. <meta name="Keywords" content="Foosun,FoosunCMS,Foosun Inc.,风讯,风讯网站内容管理系统,风讯系统,风讯新闻系统,风讯商城,风讯b2c,新闻系统,CMS,域名空间,asp,jsp,asp.net,SQL,SQL SERVER" />
  26. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  27. <head>
  28. <body>
  29. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  30.   <tr>
  31.     <td>
  32.       <!--#include file="top.asp" -->
  33.     </td>
  34.   </tr>
  35. </table>
  36. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  37.   
  38.     <tr class="back"> 
  39.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" --> </td>
  40.     </tr>
  41.     <tr class="back"> 
  42.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  43.           <!--#include file="menu.asp" -->
  44.         </div></td>
  45.       <td width="82%" valign="top" class="hback"><table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  46.         <tr class="hback"> 
  47.           <td class="hback"><strong>位置:</strong><a href="../">网站首页</a> &gt;&gt; 
  48.             <a href="main.asp">会员首页</a> &gt;&gt; <a href="PhotoManage.asp">相册管理</a> 
  49.             &gt;&gt;修改图片</td>
  50.         </tr>
  51.       </table> 
  52.   
  53.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  54.         <tr> 
  55.           <td class="hback"><a href="PhotoManage.asp">相册首页</a>┆<a href="Photo_add.asp">增加图片</a>┆<a href="PhotoManage.asp?isRec=1">被推荐的图片</a>┆<a href="Photo_filt.asp">幻灯片播放</a>┆<a href="Photo_Class.asp">相册分类</a></td>
  56.         </tr>
  57.       </table>
  58.       
  59.         
  60.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  61.         <form name="s_form" method="post" action="Photo_save.asp" onSubmit="return checkinput();">
  62.           <tr> 
  63.             <td colspan="2" class="xingmu">增加相册</td>
  64.           </tr>
  65.           <tr> 
  66.             <td width="18%" class="hback"> <div align="right">相片标题:</div></td>
  67.             <td width="82%" class="hback"><input name="title" type="text" id="title" value="<%=rs("title")%>" size="45"></td>
  68.           </tr>
  69.           <tr> 
  70.             <td class="hback"><div align="right">图片:</div></td>
  71.             <td class="hback"><table width="27%" border="0" cellspacing="1" cellpadding="5">
  72.                 <tr> 
  73.                   <td width="33%"><div align="center"> 
  74.                       <table width="10" border="0" cellspacing="1" cellpadding="2" class="table">
  75.                         <tr> 
  76.                           <td class="hback"><img src="<%=rs("PicSavePath")%>" width="90" border="0" id="pic_p_1"></td>
  77.                         </tr>
  78.                       </table>
  79.                       <input name="pic_1" type="hidden" id="pic_1" value="<%=rs("PicSavePath")%>" size="40" >
  80.                     </div></td>
  81.                 </tr>
  82.                 <tr> 
  83.                   <td><div align="center"><img  src="Images/upfile.gif" width="44" height="22" onClick="OpenWindowAndSetValue('CommPages/SelectPic.asp?CurrPath=<% = str_CurrPath %>&f_UserNumber=<% = session("FS_UserNumber")%>',500,320,window,document.s_form.pic_1);" style="cursor:hand;"> 
  84.                        <img src="Images/del_supply.gif" width="44" height="22" onClick="dels_1();" style="cursor:hand;"> 
  85.                     </div></td>
  86.                 </tr>
  87.               </table></td>
  88.           </tr>
  89.           <tr> 
  90.             <td class="hback"><div align="right">类别:</div></td>
  91.             <td class="hback"><select name="Classid">
  92.                 <option value="0">选择相册分类</option>
  93.                 <%
  94. dim srs
  95. set srs=User_Conn.execute("select id,title From FS_ME_PhotoClass where UserNumber='"&session("FS_UserNumber")&"' order by id desc")
  96. do while not srs.eof
  97. if rs("Classid")=srs("id") then
  98. response.Write" <option value="""&srs("id")&""" selected>"&srs("title")&"</option>"&chr(13)
  99. else
  100. response.Write" <option value="""&srs("id")&""">"&srs("title")&"</option>"&chr(13)
  101. end if
  102. srs.movenext
  103. loop
  104. srs.close:set srs=nothing
  105. %>
  106.               </select></td>
  107.           </tr>
  108.           <tr> 
  109.             <td class="hback"><div align="right">图片说明:</div></td>
  110.             <td class="hback"><textarea name="content" rows="8" id="content" style="width:80%"><%=rs("content")%></textarea></td>
  111.           </tr>
  112.           <tr> 
  113.             <td class="hback"><div align="right"></div></td>
  114.             <td class="hback"><input type="submit" name="Submit" value="保存图片到相册">
  115.               <input name="Action" type="hidden" id="Action" value="edit">
  116.               <input name="id" type="hidden" id="id" value="<%=rs("id")%>"></td>
  117.           </tr>
  118.         </form>
  119.       </table>
  120.        </td>
  121.     </tr>
  122.     <tr class="back"> 
  123.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  124.           <!--#include file="Copyright.asp" -->
  125.         </div></td>
  126.     </tr>
  127.  
  128. </table>
  129. </body>
  130. </html>
  131. <%
  132. set rs=nothing
  133. Set Fs_User = Nothing
  134. %>
  135. <script language="JavaScript" type="text/JavaScript">
  136. new Form.Element.Observer($('pic_1'),1,pics_1);
  137. function pics_1()
  138. {
  139. if ($('pic_1').value=='')
  140. {
  141. $('pic_p_1').src='Images/nopic_supply.gif'
  142. }
  143. else
  144. {
  145. $('pic_p_1').src=$('pic_1').value
  146. }
  147. function dels_1()
  148. {
  149. document.s_form.pic_1.value=''
  150. }
  151. function checkinput()
  152. {
  153. if(document.s_form.title.value=='')
  154. {
  155. alert('填写相册标题');
  156. document.s_form.title.focus();
  157. return false;
  158. }
  159. if(document.s_form.pic_1.value=='')
  160. {
  161. alert('填写至少输入一个图片地址');
  162. //document.s_form.pic_1.focus();
  163. return false;
  164. }
  165. if(document.s_form.content.value=='')
  166. {
  167. alert('填写图片描述');
  168. document.s_form.content.focus();
  169. return false;
  170. }
  171. }
  172. </script>
  173. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->