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

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="lib/cls_main.asp" -->
  4. <!--#include file="../../FS_Inc/Function.asp"-->
  5. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  6. <!--#include file="../../FS_InterFace/NS_Function.asp" -->
  7. <%'Copyright (c) 2006 Foosun Inc. Code by Simpwind.Xie
  8. Dim Conn,User_Conn
  9. Dim CharIndexStr,Fs_news
  10. MF_Default_Conn
  11. MF_Session_TF 
  12. '权限判断
  13. 'Call MF_Check_Pop_TF("NS_Class_000001") 
  14. '得到会员组列表 
  15. set Fs_news = new Cls_News
  16. Fs_News.GetSysParam()
  17. dim sRootDir,str_CurrPath
  18. if G_VIRTUAL_ROOT_DIR<>"" then sRootDir="/"+G_VIRTUAL_ROOT_DIR else sRootDir=""
  19. if Session("Admin_Is_Super") = 1 then
  20. str_CurrPath = sRootDir &"/"&G_UP_FILES_DIR
  21. Else
  22. str_CurrPath = Replace(sRootDir &"/"&G_UP_FILES_DIR&"/adminfiles/"&Session("Admin_Name"),"//","/")
  23. End if
  24. if Request.Form("Action") = "save" then
  25. if Trim(Request.Form("pic"))<>"" then
  26. Conn.execute("Update FS_NS_News set NewsPicFile='"& Request.Form("pic")&"' where NewsID='"& Request.Form("NewsiD")&"'")
  27. End if
  28. if Trim(Request.Form("s_pic"))<>"" then
  29. Conn.execute("Update FS_NS_News set NewsSmallPicFile='"& Request.Form("s_pic")&"' where NewsID='"& Request.Form("NewsiD")&"'")
  30. End if
  31. Response.Write("<script>alert('修改成功');window.close();</script>")
  32. Response.end
  33. End if
  34. %>
  35. <html xmlns="http://www.w3.org/1999/xhtml">
  36. <html>
  37. <head>
  38. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  39. <title>新闻管理___Powered by foosun Inc.</title>
  40. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  41. </head>
  42. <body scrolling=yes>
  43. <%
  44. Dim obj_tmp_rs
  45. set obj_tmp_rs = Conn.execute("select Newsid,NewsPicFile,NewsSmallPicFile From FS_NS_News where Newsid='"& NoSqlHack(Request.QueryString("NewsiD"))&"'")
  46. %>
  47. <table width="530" height="443" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  48.   <form name="form1" method="post" action="">
  49.     <tr> 
  50.       <td width="211" height="13" class="hback">原图片(小) 
  51.         <input name="Action" type="hidden" id="Action" value="save"> <input name="Newsid" type="hidden" id="Newsid" value="<%=Request.QueryString("Newsid")%>"></td>
  52.       <td width="319" rowspan="4" class="hback">选择小图<br> <input name="s_pic" type="text" id="s_pic"> 
  53.         <input type="button" name="PPPChoose"  value="选择图片" onClick="var returnvalue=OpenWindow('../CommPages/SelectManageDir/SelectPic.asp?CurrPath=<%=str_CurrPath %>',500,300,window);document.form1.s_pic.value=returnvalue;SmallPic.src=returnvalue;"> 
  54.         <br> <br>
  55.         选择大图<br> <input name="pic" type="text" id="pic"> <input type="button" name="PPPChoose2"  value="选择图片" onClick="var returnvalue=OpenWindow('../CommPages/SelectManageDir/SelectPic.asp?CurrPath=<%=str_CurrPath %>',500,300,window);document.form1.pic.value=returnvalue;BigPic.src=returnvalue;"> 
  56.         <br> <br> <input type="submit" name="Submit" value="修改图片">
  57.  </td>
  58.     </tr>
  59.     <tr> 
  60.       <td height="169" class="hback"><img id="SmallPic" src="<%=obj_tmp_rs("NewsSmallPicFile")%>" width="280"></img></td>
  61.     </tr>
  62.     <tr> 
  63.       <td height="19" class="hback">原图片(大)</td>
  64.     </tr>
  65.     <tr> 
  66.       <td height="188" class="hback"><img id="BigPic" src="<%=obj_tmp_rs("NewsPicFile")%>" width="280"></img></td>
  67.     </tr>
  68.   </form>
  69. </table>
  70. </body>
  71. </html>
  72. <%
  73. set obj_tmp_rs = nothing
  74. set Fs_news = nothing
  75. %>
  76. <script language="JavaScript" type="text/JavaScript" src="js/Public.js"></script>
  77. <script language="JavaScript" type="text/JavaScript">
  78. function opencat(cat)
  79. {
  80.   if(cat.style.display=="none"){
  81.      cat.style.display="";
  82.   } else {
  83.      cat.style.display="none"; 
  84.   }
  85. }
  86. function imgresize(o){
  87. var parentNode=o.parentNode.parentNode
  88. if (parentNode){
  89. if (o.offsetWidth>=parentNode.offsetWidth) o.style.width='98%';
  90. }else{
  91. var parentNode=o.parentNode
  92. if (parentNode){
  93. if (o.offsetWidth>=parentNode.offsetWidth) o.style.width='98%';
  94. }
  95. }
  96. }
  97. </script>
  98. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->