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

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../../FS_Inc/Function.asp" -->
  5. <!--#include file="../lib/strlib.asp" -->
  6. <!--#include file="../lib/UserCheck.asp" -->
  7. <%
  8. Dim str_CurrPath
  9. str_CurrPath = Replace("/"&G_VIRTUAL_ROOT_DIR &"/"&G_USERFILES_DIR&"/"&Session("FS_UserNumber"),"//","/")
  10. '获得留言
  11. dim book_rs,new_count
  12. set book_rs= Server.CreateObject(G_FS_RS)
  13. book_rs.open "Select count(BookID) From FS_ME_Book where M_ReadUserNumber='"&Fs_User.UserNumber&"' and M_ReadTF=0 and M_Type=2",User_Conn,1,3
  14.  if book_rs(0)>0 then
  15.  new_count = "<span class=""tx""><b>您有留言"& book_rs(0) &"</b></span>"
  16.  else
  17.  new_count =  book_rs(0)
  18.  end if
  19. book_rs.close:set book_rs = nothing
  20. %>
  21. <html xmlns="http://www.w3.org/1999/xhtml">
  22. <title>User Manage Center-网站内容管理系统</title>
  23. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  24. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  25. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  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></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.     <tr class="back"> 
  38.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="../Top_navi.asp" -->
  39.     </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">
  46.   <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  47.         <tr class="hback"> 
  48.           <td  valign="top">你的位置:<a href="../../">网站首页</a> &gt;&gt; <a href="../main.asp">会员首页</a> 
  49.             &gt;&gt; <a href="PublicManage.asp">供求系统</a> &gt;&gt;发布供求</td>
  50.         </tr>
  51.         <tr class="hback"> 
  52.           <td  valign="top"><a href="PublicSupply.asp">发布信息</a>┆<a href="PublicManage.asp">管理信息</a>┆<a href="PublicManage.asp#top10">你的信息浏览排行(TOP10)</a>┆<a href="PublicManage.asp#new">最新供求信息</a>┆<a href="PublicManage.asp#rec">供求推荐</a>┆<a href="../Book.asp?M_type=2">我的新留言(<%=new_count%>)</a></td>
  53.         </tr>
  54.       </table>
  55.       <table width="98%"  border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  56.         <form action="PubLic_Save.asp" method="post" name="s_form"  onSubmit="return checkinput();">
  57.           <tr class="hback"> 
  58.             <td width="100"> <div align="right">*信息标题</div></td>
  59.             <td > <input name="PubTitle" type="text" id="title2"  value="" size="40" maxlength="50">
  60.               *类型 
  61.               <select name="PubType" id="PubType">
  62.                 <option value="0" selected>供应</option>
  63.                 <option value="1">求购</option>
  64.                 <option value="2">合作</option>
  65.                 <option value="3">代理</option>
  66.                 <option value="4">其他</option>
  67.               </select>
  68.                *所在地区 
  69.               <select name="AreaID" id="AreaID">
  70.                 <%
  71.   dim obj_zl_rs
  72.   set obj_zl_rs= Server.CreateObject(G_FS_RS)
  73.   obj_zl_rs.open "select ID,PID,ClassName From FS_SD_Address  where PID=0  order by ClassLevel desc,id asc",Conn,1,3
  74.   do while not obj_zl_rs.eof 
  75. Response.Write"<option value="""& obj_zl_rs("ID")&""">├"& obj_zl_rs("ClassName")&"</option>"
  76.   Response.Write childAreaclassList(obj_zl_rs("ID")," ")
  77.   obj_zl_rs.movenext
  78.   Loop
  79.   obj_zl_rs.close:set obj_zl_rs =nothing
  80.   %>
  81.               </select></td>
  82.           </tr>
  83.           <tr class="hback"> 
  84.             <td width="100"> <div align="right">*分类</div></td>
  85.             <td > <select name="ClassID" id="ClassID">
  86.                 <%
  87.   set obj_zl_rs= Server.CreateObject(G_FS_RS)
  88.   obj_zl_rs.open "select ID,PID,GQ_ClassName,PID,classorder From FS_SD_Class  where PID=0  order by classorder desc,id desc",Conn,1,3
  89.   do while not obj_zl_rs.eof 
  90. Response.Write"<option value="""& obj_zl_rs("ID")&""">├"& obj_zl_rs("GQ_ClassName")&"</option>"
  91.   Response.Write childclassList(obj_zl_rs("ID")," ")
  92.   obj_zl_rs.movenext
  93.   Loop
  94.   obj_zl_rs.close:set obj_zl_rs =nothing
  95.   %>
  96.               </select>
  97.                 我的专栏 
  98.               <select name="MyClassID" id="MyClassID">
  99.                 <option value="">选择您的归类</option>
  100.                 <%
  101.   set obj_zl_rs= Server.CreateObject(G_FS_RS)
  102.   obj_zl_rs.open "select ClassID,ClassCName,ClassEName,ParentID,UserNumber,ClassTypes From FS_ME_InfoClass  where ParentID=0 and ClassTypes=4 and UserNumber='"& Fs_User.UserNumber&"' order by ClassID desc",User_Conn,1,3
  103.   do while not obj_zl_rs.eof 
  104.    Response.Write"<option value="""& obj_zl_rs("ClassID")&""">"& obj_zl_rs("ClassCName")&"</option>"
  105.   obj_zl_rs.movenext
  106.   Loop
  107.   obj_zl_rs.close:set obj_zl_rs =nothing
  108.   %>
  109.               </select></td>
  110.           </tr>
  111.           <tr class="hback"> 
  112.             <td><div align="right">关键字</div></td>
  113.             <td ><input name="keyword1" type="text" id="keyword1"  value="" size="17" maxlength="15">
  114.               , 
  115.               <input name="keyword2" type="text" id="keyword2"  value="" size="17" maxlength="15">
  116.               , 
  117.               <input name="keyword3" type="text" id="keyword3"  value="" size="17" maxlength="15"></td>
  118.           </tr>
  119.           <tr class="hback"> 
  120.             <td width="100"> <div align="right">经营方式</div></td>
  121.             <td > <input name="CompType" type="radio" value="0">
  122.               批发 
  123.               <input name="CompType" type="radio" value="1" checked>
  124.               零售 
  125.               <input type="radio" name="CompType" value="2">
  126.               批零兼营</td>
  127.           </tr>
  128.           <tr class="hback"> 
  129.             <td width="100"> <div align="right">数量</div></td>
  130.             <td ><input name="PubNumber" type="text" id="PubNumber" value="0" size="23">
  131.                有效期限 
  132.               <input name="ValidTime" type="text" id="ValidTime" size="24"  value="15">
  133.               天。有效值为1~360</td>
  134.           </tr>
  135.           <tr class="hback"> 
  136.             <td rowspan="2" align="center"><div align="right">产品参数</div></td>
  137.             <td  align="center"><div align="left">包装说明 
  138.                 <input name="PubPack" type="text" id="PubPack" maxlength="100">
  139.                 产品价格 
  140.                 <input name="PubPrice" type="text" id="PubPrice" value="0" maxlength="10">
  141.                 ,0表示面议</div></td>
  142.           </tr>
  143.           <tr class="hback"> 
  144.             <td  align="center"><div align="left">产品规格 
  145.                 <input name="Pubgui" type="text" id="title3"  value="" size="53" maxlength="50">
  146.               </div></td>
  147.           </tr>
  148.           <tr class="hback">
  149.             <td align="center"><div align="right">*产地</div></td>
  150.             <td  align="center"><div align="left">
  151.                 <input name="PubAddress" type="text" id="Pubgui"  value="" size="53" maxlength="50">
  152.               </div></td>
  153.           </tr>
  154.           <tr class="hback"> 
  155.             <td width="100" align="center"> <div align="right">*描述</div></td>
  156.             <td  align="center"> <div align="left"> 
  157.                 <textarea name="PubContent" rows="6" id="PubContent" style="width:100%"></textarea>
  158.               </div></td>
  159.           </tr>
  160.           <tr class="hback"> 
  161.             <td align="center"><div align="right">图片</div></td>
  162.             <td align="center"><table width="100%" border="0" cellspacing="1" cellpadding="5">
  163.                 <tr> 
  164.                   <td width="29%"><div align="center"> 
  165.                       <table width="10" border="0" cellspacing="1" cellpadding="2" class="table">
  166.                         <tr> 
  167.                           <td class="hback"><img src="../Images/nopic_supply.gif" width="90" height="90" id="pic_p_1"></td>
  168.                         </tr>
  169.                       </table>
  170.                       <input name="pic_1" type="hidden" id="pic_1" size="40" >
  171.                     </div></td>
  172.                   <td width="36%"><div align="center"> 
  173.                       <table width="10" border="0" cellspacing="1" cellpadding="2" class="table">
  174.                         <tr> 
  175.                           <td class="hback"><img src="../Images/nopic_supply.gif" width="90" height="90" id="pic_p_2"></td>
  176.                         </tr>
  177.                       </table>
  178.                       <input name="pic_2" type="hidden" id="pic_2" size="40">
  179.                     </div></td>
  180.                   <td width="35%"><div align="center"> 
  181.                       <table width="10" border="0" cellspacing="1" cellpadding="2" class="table">
  182.                         <tr> 
  183.                           <td class="hback"><img src="../Images/nopic_supply.gif" width="90" height="90" id="pic_p_3"></td>
  184.                         </tr>
  185.                       </table>
  186.                       <input name="pic_3" type="hidden" id="pic_3" size="40">
  187.                     </div></td>
  188.                 </tr>
  189.                 <tr> 
  190.                   <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;"> 
  191.                        <img src="../Images/del_supply.gif" width="44" height="22" onClick="dels_1();" style="cursor:hand;"> 
  192.                     </div></td>
  193.                   <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;"> 
  194.                        <img src="../Images/del_supply.gif" width="44" height="22" onClick="dels_2();" style="cursor:hand;"> 
  195.                     </div></td>
  196.                   <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;"> 
  197.                        <img src="../Images/del_supply.gif" width="44" height="22" onClick="dels_3();" style="cursor:hand;"> 
  198.                     </div></td>
  199.                 </tr>
  200.               </table></td>
  201.           </tr>
  202.           <tr class="hback"> 
  203.             <td align="center">&nbsp;</td>
  204.             <td align="center"> <div align="left"> 
  205.                 <input type="submit" name="Submit" value="保存信息">
  206.                 <input type="reset" name="Submit" value="重置">
  207.                 <input name="Action" type="hidden" id="Action" value="add">
  208.               </div></td>
  209.           </tr>
  210.         </form>
  211.       </table>
  212.       </td>
  213.     </tr>
  214.     <tr class="back"> 
  215.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  216.           <!--#include file="../Copyright.asp" -->
  217.         </div></td>
  218.     </tr>
  219. </table>
  220. </body>
  221. </html>
  222. <%
  223. Function childclassList(f_classid,f_tmp)
  224. Dim f_Child_c_Rs,ChildTypeListStr,f_TempStr,f_isUrlStr,lng_GetCount
  225. Set f_Child_c_Rs = Conn.Execute("Select ID,PID,GQ_ClassName,classorder From FS_SD_Class  where PID=" & f_classid & "  order by classorder desc,id desc" )
  226. f_TempStr =f_tmp & "┄"
  227. do while Not f_Child_c_Rs.Eof
  228. childclassList = childclassList & "<option value="""& f_Child_c_Rs("ID") &""">"
  229. childclassList = childclassList & "├" & f_TempStr &  f_Child_c_Rs("GQ_ClassName") 
  230. childclassList = childclassList & "</option>" & Chr(13) & Chr(10)
  231. childclassList = childclassList &childclassList(f_Child_c_Rs("ID"),f_TempStr)
  232. f_Child_c_Rs.MoveNext
  233. loop
  234. f_Child_c_Rs.Close
  235. Set f_Child_c_Rs = Nothing
  236. end function
  237. Function childAreaclassList(f_classid,f_tmp)
  238. dim rs_1,f_TempStr
  239. Set rs_1 = Conn.Execute("Select ID,PID,ClassName From FS_SD_Address  where PID=" & f_classid & "  order by ClassLevel desc,id asc" )
  240. f_TempStr =f_tmp & "┄"
  241. do while Not rs_1.Eof
  242. childAreaclassList = childAreaclassList & "<option value="""& rs_1("ID") &""">"
  243. childAreaclassList = childAreaclassList & "├" & f_TempStr &  rs_1("ClassName") 
  244. childAreaclassList = childAreaclassList & "</option>" & Chr(13) & Chr(10)
  245. childAreaclassList = childAreaclassList &childAreaclassList(rs_1("ID"),f_TempStr)
  246. rs_1.MoveNext
  247. loop
  248. rs_1.Close
  249. Set rs_1 = Nothing
  250. end function
  251. Set Fs_User = Nothing
  252. Set User_Conn = Nothing
  253. Set Conn = Nothing
  254. %>
  255. <script language="JavaScript" type="text/JavaScript">
  256. new Form.Element.Observer($('pic_1'),1,pics_1);
  257. function pics_1()
  258. {
  259. if ($('pic_1').value=='')
  260. {
  261. $('pic_p_1').src='../Images/nopic_supply.gif'
  262. }
  263. else
  264. {
  265. $('pic_p_1').src=$('pic_1').value
  266. }
  267. new Form.Element.Observer($('pic_2'),1,pics_2);
  268. function pics_2()
  269. {
  270. if($('pic_2').value=='')
  271. {
  272. $('pic_p_2').src='../Images/nopic_supply.gif'
  273. }
  274. else
  275. {
  276. $('pic_p_2').src=$('pic_2').value
  277. }
  278. new Form.Element.Observer($('pic_3'),1,pics_3);
  279. function pics_3()
  280. {
  281. if($('pic_3').value=='')
  282. {
  283. $('pic_p_3').src='../Images/nopic_supply.gif'
  284. }
  285. else
  286. {
  287. $('pic_p_3').src=$('pic_3').value
  288. }
  289. }
  290. function dels_1()
  291. {
  292. document.s_form.pic_1.value=''
  293. }
  294. function dels_2()
  295. {
  296. document.s_form.pic_2.value=''
  297. }
  298. function dels_3()
  299. {
  300. document.s_form.pic_3.value=''
  301. }
  302. function checkinput()
  303. {
  304. if(document.s_form.PubTitle.value=='') {
  305. alert("请填写信息标题")
  306. s_form.PubTitle.focus();
  307. return false;
  308. }
  309. if(document.s_form.PubAddress.value=='') {
  310. alert("填写所在地区")
  311. s_form.PubAddress.focus();
  312. return false;
  313. }
  314. if(document.s_form.ClassID.value=='') {
  315. alert("请填写分类")
  316. s_form.ClassID.focus();
  317. return false;
  318. }
  319. if(document.s_form.PubContent.value=='') {
  320. alert("填写信息描述")
  321. s_form.PubContent.focus();
  322. return false;
  323. }
  324. }
  325. </script>
  326. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->