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

数据库编程

开发平台:

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
  10. str_CurrPath = Replace("/"&G_VIRTUAL_ROOT_DIR &"/"&G_USERFILES_DIR&"/"&Session("FS_UserNumber"),"//","/")
  11. %>
  12. <html xmlns="http://www.w3.org/1999/xhtml">
  13. <title>相册管理-网站内容管理系统</title>
  14. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  15. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  16. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  17. <meta name="Keywords" content="Foosun,FoosunCMS,Foosun Inc.,风讯,风讯网站内容管理系统,风讯系统,风讯新闻系统,风讯商城,风讯b2c,新闻系统,CMS,域名空间,asp,jsp,asp.net,SQL,SQL SERVER" />
  18. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  19. <head>
  20. <body>
  21. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  22.   <tr>
  23.     <td>
  24.       <!--#include file="top.asp" -->
  25.     </td>
  26.   </tr>
  27. </table>
  28. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  29.   
  30.     <tr class="back"> 
  31.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" --> </td>
  32.     </tr>
  33.     <tr class="back"> 
  34.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  35.           <!--#include file="menu.asp" -->
  36.         </div></td>
  37.       <td width="82%" valign="top" class="hback"><table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  38.         <tr class="hback"> 
  39.           <td class="hback"><strong>位置:</strong><a href="../">网站首页</a> &gt;&gt; 
  40.             <a href="main.asp">会员首页</a> &gt;&gt; <a href="PhotoManage.asp">相册管理</a> 
  41.             &gt;&gt;增加相册</td>
  42.         </tr>
  43.       </table> 
  44.   
  45.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  46.         <tr> 
  47.           <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>
  48.         </tr>
  49.       </table>
  50.       
  51.         
  52.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  53.         <form name="s_form" method="post" action="Photo_save.asp" onSubmit="return checkinput();">
  54.           <tr> 
  55.             <td colspan="2" class="xingmu">增加相册</td>
  56.           </tr>
  57.           <tr> 
  58.             <td width="18%" class="hback"> <div align="right">相片标题:</div></td>
  59.             <td width="82%" class="hback"><input name="title" type="text" id="title" size="45"></td>
  60.           </tr>
  61.           <tr> 
  62.             <td class="hback"><div align="right">图片:</div></td>
  63.             <td class="hback"><table width="81%" border="0" cellspacing="1" cellpadding="5">
  64.                 <tr> 
  65.                   <td width="33%"><div align="center"> 
  66.                       <table width="10" border="0" cellspacing="1" cellpadding="2" class="table">
  67.                         <tr> 
  68.                           <td class="hback"><img src="Images/nopic_supply.gif" width="90" height="90" id="pic_p_1"></td>
  69.                         </tr>
  70.                       </table>
  71.                       <input name="pic_1" type="hidden" id="pic_1" size="40" >
  72.                     </div></td>
  73.                   <td width="34%"><div align="center"> 
  74.                       <table width="10" border="0" cellspacing="1" cellpadding="2" class="table">
  75.                         <tr> 
  76.                           <td class="hback"><img src="Images/nopic_supply.gif" width="90" height="90" id="pic_p_2"></td>
  77.                         </tr>
  78.                       </table>
  79.                       <input name="pic_2" type="hidden" id="pic_2" size="40">
  80.                     </div></td>
  81.                   <td width="33%"><div align="center"> 
  82.                       <table width="10" border="0" cellspacing="1" cellpadding="2" class="table">
  83.                         <tr> 
  84.                           <td class="hback"><img src="Images/nopic_supply.gif" width="90" height="90" id="pic_p_3"></td>
  85.                         </tr>
  86.                       </table>
  87.                       <input name="pic_3" type="hidden" id="pic_3" size="40">
  88.                     </div></td>
  89.                 </tr>
  90.                 <tr> 
  91.                   <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;"> 
  92.                        <img src="Images/del_supply.gif" width="44" height="22" onClick="dels_1();" style="cursor:hand;"> 
  93.                     </div></td>
  94.                   <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_2);" style="cursor:hand;"> 
  95.                        <img src="Images/del_supply.gif" width="44" height="22" onClick="dels_2();" style="cursor:hand;"> 
  96.                     </div></td>
  97.                   <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_3);" style="cursor:hand;"> 
  98.                        <img src="Images/del_supply.gif" width="44" height="22" onClick="dels_3();" style="cursor:hand;"> 
  99.                     </div></td>
  100.                 </tr>
  101.               </table></td>
  102.           </tr>
  103.           <tr> 
  104.             <td class="hback"><div align="right">类别:</div></td>
  105.             <td class="hback"><select name="Classid">
  106.                 <option value="0">选择相册分类</option>
  107.                 <%
  108. dim rs
  109. set rs=User_Conn.execute("select id,title From FS_ME_PhotoClass where UserNumber='"&session("FS_UserNumber")&"' order by id desc")
  110. do while not rs.eof
  111. response.Write" <option value="""&rs("id")&""">"&rs("title")&"</option>"&chr(13)
  112. rs.movenext
  113. loop
  114. rs.close:set rs=nothing
  115. %>
  116.               </select></td>
  117.           </tr>
  118.           <tr> 
  119.             <td class="hback"><div align="right">图片说明:</div></td>
  120.             <td class="hback"><textarea name="content" rows="8" id="content" style="width:80%"></textarea></td>
  121.           </tr>
  122.           <tr> 
  123.             <td class="hback"><div align="right"></div></td>
  124.             <td class="hback"><input type="submit" name="Submit" value="保存图片到相册">
  125.               <input name="Action" type="hidden" id="Action" value="add"></td>
  126.           </tr>
  127.         </form>
  128.       </table>
  129.        </td>
  130.     </tr>
  131.     <tr class="back"> 
  132.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  133.           <!--#include file="Copyright.asp" -->
  134.         </div></td>
  135.     </tr>
  136.  
  137. </table>
  138. </body>
  139. </html>
  140. <%
  141. Set Fs_User = Nothing
  142. %>
  143. <script language="JavaScript" type="text/JavaScript">
  144. new Form.Element.Observer($('pic_1'),1,pics_1);
  145. function pics_1()
  146. {
  147. if ($('pic_1').value=='')
  148. {
  149. $('pic_p_1').src='Images/nopic_supply.gif'
  150. }
  151. else
  152. {
  153. $('pic_p_1').src=$('pic_1').value
  154. }
  155. new Form.Element.Observer($('pic_2'),1,pics_2);
  156. function pics_2()
  157. {
  158. if($('pic_2').value=='')
  159. {
  160. $('pic_p_2').src='Images/nopic_supply.gif'
  161. }
  162. else
  163. {
  164. $('pic_p_2').src=$('pic_2').value
  165. }
  166. new Form.Element.Observer($('pic_3'),1,pics_3);
  167. function pics_3()
  168. {
  169. if($('pic_3').value=='')
  170. {
  171. $('pic_p_3').src='Images/nopic_supply.gif'
  172. }
  173. else
  174. {
  175. $('pic_p_3').src=$('pic_3').value
  176. }
  177. }
  178. function dels_1()
  179. {
  180. document.s_form.pic_1.value=''
  181. }
  182. function dels_2()
  183. {
  184. document.s_form.pic_2.value=''
  185. }
  186. function dels_3()
  187. {
  188. document.s_form.pic_3.value=''
  189. }
  190. function checkinput()
  191. {
  192. if(document.s_form.title.value=='')
  193. {
  194. alert('填写相册标题');
  195. document.s_form.title.focus();
  196. return false;
  197. }
  198. if(document.s_form.pic_1.value=='')
  199. {
  200. alert('填写至少输入一个图片地址');
  201. //document.s_form.pic_1.focus();
  202. return false;
  203. }
  204. if(document.s_form.content.value=='')
  205. {
  206. alert('填写图片描述');
  207. document.s_form.content.focus();
  208. return false;
  209. }
  210. }
  211. </script>
  212. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->