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

数据库编程

开发平台:

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 by Foosun Inc. Code by Simpwind.Xie
  8. Dim Conn,User_Conn,sRootDir,strShowErr
  9. MF_Default_Conn
  10. MF_User_Conn
  11. MF_GetUserGroupID
  12. MF_Session_TF 
  13. Dim Fs_news,obj_newsedit_rs,str_CurrPath,str_display
  14. Dim str_PopId,str_ClassID,str_NewsID,str_SpecialEName,str_NewsTitle,str_CurtTitle,str_NewsNaviContent,str_isShowReview,str_TitleColor,str_titleBorder,str_TitleItalic,str_IsURL,str_URLAddress
  15. Dim str_Content,str_isPicNews,str_NewsPicFile,str_NewsSmallPicFile,str_PicborderCss,str_Templet,str_GroupID,str_PointNumber,str_Money,str_Source,str_Editor,str_Keywords,str_Author
  16. Dim str_Hits,str_FileName,str_FileExtName,str_NewsProperty,str_DefineID,str_TodayNewsPic,str_isLock,str_isRecyle,str_addtime,str_NewsType,str_isdraft
  17. Dim str_UrLaddress_1,str_CurtTitle_1,str_NewsPicFile_1,str_NewsSmallPicFile_1,str_Templet_1,str_Content_1,str_PicborderCss_1,str_Author_1,str_GroupID_1,str_FileName_1,str_filt_1
  18. set Fs_news = new Cls_News
  19. Fs_News.GetSysParam()
  20. If Not Fs_news.IsSelfRefer Then response.write "非法提交数据":Response.end
  21. if G_VIRTUAL_ROOT_DIR<>"" then sRootDir="/"+G_VIRTUAL_ROOT_DIR else sRootDir=""
  22. if Session("Admin_Is_Super") = 1 then
  23. str_CurrPath = sRootDir &"/"&G_UP_FILES_DIR
  24. Else
  25. str_CurrPath = Replace(sRootDir &"/"&G_UP_FILES_DIR&"/adminfiles/"&Session("Admin_Name"),"//","/")
  26. End if
  27. Set obj_newsedit_rs = server.CreateObject(G_FS_RS)
  28. obj_newsedit_rs.Open "Select NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,Hits,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime,isdraft from FS_NS_News where ClassID='"& NoSqlHack(Request.QueryString("ClassID")) &"' and NewsID='"& NoSqlHack(Request.QueryString("NewsID")) &"'",Conn,1,3
  29. If obj_newsedit_rs.eof then 
  30. strShowErr = "<li>非法参数,找不到数据库记录</li>"
  31. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  32. Response.end
  33. Else
  34. str_NewsID = obj_newsedit_rs("NewsID")
  35. Dim obj_tmppop_rs
  36. set obj_tmppop_rs = Conn.execute("select GroupName,PointNumber,FS_Money,InfoID,PopType,isClass From FS_MF_POP where InfoID='"& str_NewsID &"' and isClass=0 and PopType='NS'")
  37. if obj_tmppop_rs.eof then
  38. str_GroupID = ""
  39. str_PointNumber=""
  40. str_Money = ""
  41. obj_tmppop_rs.close:set obj_tmppop_rs = nothing
  42. Else
  43. str_GroupID = obj_tmppop_rs("GroupName")
  44. if obj_tmppop_rs("PointNumber") = 0 or isnull(trim(obj_tmppop_rs("PointNumber"))) then:str_PointNumber="" else:str_PointNumber=obj_tmppop_rs("PointNumber"):end if
  45. if obj_tmppop_rs("FS_Money") = 0 or isnull(trim(obj_tmppop_rs("FS_Money"))) then:str_Money="" else:str_Money=obj_tmppop_rs("FS_Money"):end if
  46. obj_tmppop_rs.close:set obj_tmppop_rs = nothing
  47. End if
  48. str_PopId = obj_newsedit_rs("PopId")
  49. str_ClassID = obj_newsedit_rs("ClassID")
  50. if not Get_SubPop_TF(str_ClassID,"NS002","NS","news") then Err_Show
  51. str_SpecialEName = obj_newsedit_rs("SpecialEName")
  52. str_NewsTitle = obj_newsedit_rs("NewsTitle")
  53. str_isdraft = obj_newsedit_rs("isdraft")
  54. str_CurtTitle = obj_newsedit_rs("CurtTitle")
  55. str_NewsNaviContent = obj_newsedit_rs("NewsNaviContent")
  56. if obj_newsedit_rs("isShowReview") = 1 then:str_isShowReview = 1:Else:str_isShowReview = 0:End if
  57. str_TitleColor = obj_newsedit_rs("TitleColor")
  58. str_titleBorder = obj_newsedit_rs("titleBorder")
  59. str_TitleItalic = obj_newsedit_rs("TitleItalic")
  60. if obj_newsedit_rs("IsURL") = 1 then:str_IsURL = 1:else:str_IsURL = 0:end if
  61. str_URLAddress = obj_newsedit_rs("URLAddress")
  62. str_Content = obj_newsedit_rs("Content")
  63. if obj_newsedit_rs("isPicNews") then:str_isPicNews =1:else:str_isPicNews = 0:end if
  64. str_NewsPicFile = obj_newsedit_rs("NewsPicFile")
  65. str_NewsSmallPicFile = obj_newsedit_rs("NewsSmallPicFile")
  66. str_PicborderCss = obj_newsedit_rs("PicborderCss")
  67. str_Templet =  obj_newsedit_rs("Templet")
  68. str_Source = obj_newsedit_rs("Source")
  69. str_Editor = obj_newsedit_rs("Editor")
  70. str_Keywords = obj_newsedit_rs("Keywords")
  71. str_Author = obj_newsedit_rs("Author")
  72. if obj_newsedit_rs("Hits") ="" then:str_Hits=0:else:str_Hits = obj_newsedit_rs("Hits"):end if
  73. str_FileName = obj_newsedit_rs("FileName")
  74. str_FileExtName = obj_newsedit_rs("FileExtName")
  75. str_NewsProperty = obj_newsedit_rs("NewsProperty")
  76. str_TodayNewsPic = obj_newsedit_rs("TodayNewsPic")
  77. if obj_newsedit_rs("isLock") = 1 then:str_islock=1:else:str_isLock = obj_newsedit_rs("isLock"):end if
  78. if obj_newsedit_rs("isRecyle") = 1 then:str_isRecyle=1:else:str_isRecyle = obj_newsedit_rs("isRecyle"):end if
  79. if trim(obj_newsedit_rs("addtime"))="" then:str_addtime=now:else:str_addtime = obj_newsedit_rs("addtime"):end if
  80. if obj_newsedit_rs("isRecyle") = 1 then
  81. strShowErr = "<li>在回收站中的"& Fs_news.allInfotitle&"不能编辑</li>"
  82. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  83. Response.end
  84. End if
  85. End if
  86. '获得显示层参数
  87. if str_IsURL = 1 then
  88. str_NewsType = "TitleNews"
  89. str_UrLaddress_1 = ""
  90. str_CurtTitle_1="none"
  91. str_NewsPicFile_1="none"
  92. str_NewsSmallPicFile_1="none"
  93. str_Templet_1="none"
  94. str_Content_1 ="none"
  95. str_PicborderCss_1="none"
  96. str_Author_1="none"
  97. str_GroupID_1="none"
  98. str_FileName_1="none"
  99. str_filt_1="none"
  100. Elseif str_isPicNews = 1 then
  101. str_NewsType = "PicNews"
  102. str_UrLaddress_1 = "none"
  103. str_CurtTitle_1=""
  104. str_NewsPicFile_1=""
  105. str_NewsSmallPicFile_1=""
  106. str_Templet_1=""
  107. str_Content_1 =""
  108. str_PicborderCss_1=""
  109. str_Author_1=""
  110. str_GroupID_1=""
  111. str_FileName_1=""
  112. str_filt_1=""
  113. Else
  114. str_NewsType = "TextNews"
  115. str_UrLaddress_1 = "none"
  116. str_CurtTitle_1=""
  117. str_NewsPicFile_1="none"
  118. str_NewsSmallPicFile_1="none"
  119. str_Templet_1=""
  120. str_Content_1 =""
  121. str_PicborderCss_1=""
  122. str_Author_1=""
  123. str_GroupID_1=""
  124. str_FileName_1=""
  125. str_filt_1=""
  126. End if
  127. 'On Error Resume Next
  128. '获取辅助字段信息,保存到数组CustColumnArr中
  129. '(c)2002-2006 版权所有:Foosun Inc. 不得进行任何性质的程序拷贝、传播。By Foosun__Simpwind.Xie 
  130. dim c_rs,tmp_defineid,i
  131. Set c_rs = Conn.execute("select DefineID from FS_NS_NewsClass where Classid='"& str_ClassID &"'")
  132. tmp_defineid = c_rs(0)
  133. c_rs.close:set c_rs=nothing
  134. if not isnull(trim(tmp_defineid)) or trim(tmp_defineid)>0 then
  135. Dim CustColumnRs,CustSql,CustColumnArr
  136. CustSql="select DefineID,ClassID,D_Name,D_Coul,D_Type,D_isNull,D_Value,D_Content,D_SubType from [FS_MF_DefineTable] Where D_SubType='NS' and  Classid="& tmp_defineid &""
  137. Set CustColumnRs=CreateObject(G_FS_RS)
  138. CustColumnRs.Open CustSql,Conn,1,3
  139. If Not CustColumnRs.Eof Then
  140. CustColumnArr=CustColumnRs.GetRows()
  141. End If
  142. CustColumnRs.close:Set CustColumnRs = Nothing
  143. end if
  144. '=====================================
  145. %>
  146. <html>
  147. <head>
  148. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  149. <title>管理___Powered by foosun Inc.</title>
  150. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  151. </head>
  152. <body>
  153. <script language="JavaScript" src="js/Public.js"></script>
  154. <script language="JavaScript" src="../../FS_Inc/CheckJs.js"></script>
  155. <script language="JavaScript" src="../../FS_Inc/Prototype.js"></script>
  156. <script language="JavaScript" src="../../FS_Inc/PublicJS.js"></script>
  157. <script language="JavaScript" type="text/javascript" src="../../FS_Inc/Get_Domain.asp"></script>
  158. <script language="JavaScript" type="text/javascript" src="../../Editor/FS_scripts/editor.js"></script>
  159. <iframe width="260" height="165" id="colorPalette" src="lib/selcolor.htm" style="visibility:hidden; position: absolute;border:1px gray solid" frameborder="0" scrolling="no" ></iframe>
  160. <table width="98%" border="0" cellspacing="0" cellpadding="0">
  161. <tr>
  162. <td height="1"></td>
  163. </tr>
  164. </table>
  165. <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
  166. <form action="News_Save.asp" name="NewsForm" method="post" onsubmit="return CheckForm(this);">
  167. <tr class="xingmu">
  168. <td colspan="4" class="xingmu">编辑/修改
  169. <% = Fs_news.allInfotitle %>
  170. <a href="../../help?Lable=NS_News_add" target="_blank" style="cursor:help;'" class="sd"><img src="../Images/_help.gif" border="0"></a></td>
  171. </tr>
  172. <tr >
  173. <td class="hback">
  174. <div align="right">
  175. <table width="95" border="0" cellspacing="0" cellpadding="0">
  176. <tr>
  177. <td height="1"></td>
  178. </tr>
  179. </table>
  180. <% = Fs_news.allInfotitle %>
  181. 类型 </div>
  182. </td>
  183. <td colspan="3" class="hback">
  184. <input name=NewsType type=radio id="NewsType" onClick="SwitchNewsType('TextNews');" value="TextNews" <%If str_NewsType = "TextNews" then Response.Write("checked")%>>
  185. 普通
  186. <input name=NewsType type=radio id="NewsType" onClick="SwitchNewsType('PicNews');" value="PicNews" <%If str_NewsType = "PicNews" then Response.Write("checked")%>>
  187. 图片
  188. <input name=NewsType type=radio id="NewsType" onClick="SwitchNewsType('TitleNews');" value="TitleNews" <%If str_NewsType = "TitleNews" then Response.Write("checked")%>>
  189. 标题  &nbsp;&nbsp;
  190. <%if  str_isdraft = 1 then%>
  191. <input name="isdraft" type="checkbox" id="isdraft" value="1" <%if str_isdraft = 1 then response.Write("checked")%>>
  192. 存到草稿箱中
  193. <%end if%>
  194. </td>
  195. </tr>
  196. <tr >
  197. <td width="12%" class="hback">
  198. <div align="right">
  199. <% = Fs_news.allInfotitle %>
  200. 标题</div>
  201. </td>
  202. <td colspan="3" class="hback">
  203. <input name="NewsTitle" type="text" id="NewsTitle" size="40"  value="<%=str_NewsTitle%>" maxlength="255" onFocus="Do.these('NewsTitle',function(){return isEmpty('NewsTitle','span_NewsTitle')})" onKeyUp="Do.these('NewsTitle',function(){return isEmpty('NewsTitle','span_NewsTitle')})">
  204. <span id="span_NewsTitle"></span>
  205. <input name="TitleColor" id="TitleColor" type="hidden">
  206. <img src="images/rect<%if str_TitleColor="" Then Response.write("NoColor")%>.gif" id="TitleColorShow" style="cursor:pointer;background-color:<%=str_TitleColor%>;" title="选取颜色!" onClick="GetColor(document.getElementById('TitleColorShow'),'TitleColor');">
  207. <input name="titleBorder" type="checkbox" id="titleBorder" value="1"  <%if str_titleBorder=1 then response.Write("checked") %>>
  208. 粗体
  209. <input name="TitleItalic" type="checkbox" id="TitleItalic" value="1"  <%if str_TitleItalic=1 then response.Write("checked") %>>
  210. 斜体
  211. <input name="isShowReview" type="checkbox" id="isShowReview" value="1"<%if str_isShowReview=1 then response.Write("checked") %>>
  212. 评论连接  权重
  213. <select name="PopID" id="PopID">
  214. <option value="5" <%if str_PopID=5 then response.Write("selected") %>>总置顶</option>
  215. <option value="4" <%if str_PopID=4 then response.Write("selected") %>>栏目置顶</option>
  216. <option value="0" <%if str_PopID=0 then response.Write("selected") %>>一般</option>
  217. </select>
  218. </td>
  219. </tr>
  220. <tr >
  221. <td class="hback">
  222. <div align="right">选择栏目</div>
  223. </td>
  224. <td colspan="3" class="hback">
  225. <input name="ClassName" type="text" id="ClassName5" style="width:45%" value="<%=Fs_News.GetAdd_ClassName(str_ClassID)%>" readonly>
  226. <input name="ClassID" type="hidden" id="ClassID" value="<% = str_ClassID %>">
  227. <input type="button" name="Submit" value="选择栏目"   onClick="SelectClass();">
  228. <input type="button" name="Submit2" value="添加栏目" onClick="window.location.href='Class_add.asp?ClassID=<%=str_ClassID %>&Action=add'">
  229. </td>
  230. </tr>
  231. <tr >
  232. <td class="hback">
  233. <div align="right">选择专题</div>
  234. </td>
  235. <%
  236.   if str_SpecialEName<>"" then
  237.   dim sp_rs,sp_array,sp_i,sp_char
  238.   sp_char=""
  239.   sp_array = split(str_SpecialEName,",")
  240.   for sp_i = 0 to ubound(sp_array)
  241.   set sp_rs=Conn.execute("select SpecialCName From FS_NS_Special where SpecialEName='"& sp_array(sp_i) &"' ")
  242.    if not sp_rs.eof then
  243. if sp_i = ubound(sp_array) then
  244. sp_char = sp_char&sp_rs("SpecialCName")
  245. else
  246. sp_char = sp_char&sp_rs("SpecialCName")&","
  247. end if
  248.    end if
  249.    sp_rs.close:set sp_rs = nothing
  250.   next
  251.   sp_char = sp_char
  252.   end if
  253.   %>
  254. <td colspan="3" class="hback">
  255. <input name="SpecialID" type="text" id="SpecialID" style="width:45%" readonly value="<% = sp_char%>">
  256. <input name="SpecialID_EName" type="hidden" id="SpecialID_EName" value="<%=str_SpecialEName%>">
  257. <span class="tx"> </span>
  258. <input type="button" name="Submit" value="选择专题"   onClick="SelectSpecial();">
  259. <span class="tx">
  260. <input name="Submit" type="button" id="Submit" onClick="dospclear();" value="清除专题">
  261. </span> <span class="tx"> 不修改请保持为空,可多选</span> &nbsp;&nbsp;<a href="../../help?Lable=NS_News_add_special" target="_blank" style="cursor:help;'" class="sd"><img src="../Images/_help.gif" border="0"></a></td>
  262. </tr>
  263. <tr  id="str_URLAddress" style="display:<%=str_URLAddress_1%>;" >
  264. <td class="hback">
  265. <div align="right">连接地址 </div>
  266. </td>
  267. <td colspan="3" class="hback">
  268. <input name="URLAddress" type="text" id="URLAddress"  style="width:96%" maxlength="255" value="<%=str_URLAddress%>">
  269. </td>
  270. </tr>
  271. <tr  id="str_CurtTitle" style="display:<%=str_CurtTitle_1%>" >
  272. <td class="hback">
  273. <div align="right"> 副标题</div>
  274. </td>
  275. <td width="38%" class="hback">
  276. <input name="CurtTitle" type="text" id="CurtTitle" size="40" maxlength="255" value="<%=str_CurtTitle%>">
  277. </td>
  278. <td width="10%" class="hback">
  279. <div align="right">关键字</div>
  280. </td>
  281. <td width="40%" class="hback">
  282. <input name="KeywordText" type="text" id="KeywordText" size="15" maxlength="255" value="<%=str_Keywords%>">
  283. <input name="KeyWords" type="hidden" id="KeyWords" value="<%=str_Keywords%>">
  284. <select name="selectKeywords" id="selectKeywords" style="width:120px" onChange=Dokesite(this.options[this.selectedIndex].value)>
  285. <option value="" selected>选择关键字</option>
  286. <option value="Clean" style="color:red">清空</option>
  287. <%=Fs_news.GetKeywordslist("",1)%>
  288. </select>
  289. <input name="KeywordSaveTF" type="checkbox" id="KeywordSaveTF" value="1">
  290. 记忆</td>
  291. </tr>
  292. <tr  id="str_Templet" style="display:<%=str_Templet_1%>" >
  293. <td class="hback">
  294. <div align="right">模板地址</div>
  295. </td>
  296. <td colspan="3" class="hback">
  297. <input name="Templet" type="text" id="Templet" style="width:85%"  value="<%=str_Templet%>"  maxlength="255" readonly>
  298. <input name="Submit5" type="button" id="selNewsTemplet" value="选择模板"  onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectTemplet.asp?CurrPath=<%=sRootDir %>/<% = G_TEMPLETS_DIR %>',400,300,window,document.NewsForm.Templet);document.NewsForm.Templet.focus();">
  299. </td>
  300. </tr>
  301. <tr   id="str_NewsSmallPicFile" style="display:<%=str_NewsSmallPicFile_1%>">
  302. <td class="hback">
  303. <div align="right">图片(小)</div>
  304. <div align="right">图片(大)</div>
  305. </td>
  306. <td colspan="3" class="hback">
  307. <table width="417" border="0" cellspacing="1" cellpadding="5">
  308. <tr>
  309. <td width="50%">
  310. <table width="10" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
  311. <tr>
  312. <%if isnull(trim(str_NewsSmallPicFile)) or str_NewsSmallPicFile="" then%>
  313. <td class="hback"><img src="../Images/nopic_supply.gif" height="90" id="pic_p_1"></td>
  314. <%else%>
  315. <td class="hback"><img src="<%=str_NewsSmallPicFile%>" height="90" id="pic_p_1"></td>
  316. <%end if%>
  317. </tr>
  318. </table>
  319. <div align="center">
  320. <div align="center">
  321. <input name="NewsSmallPicFile" type="hidden" id="NewsSmallPicFile" style="width:85%" maxlength="255" value="<%=str_NewsSmallPicFile%>">
  322. <img  src="../Images/upfile.gif" width="44" height="22" onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectPic.asp?CurrPath=<% = str_CurrPath %>',500,320,window,document.NewsForm.NewsSmallPicFile);" style="cursor:hand;">  <img src="../Images/del_supply.gif" width="44" height="22" onClick="dels_1();" style="cursor:hand;"> </div>
  323. </div>
  324. </td>
  325. <td width="50%">
  326. <table width="10" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
  327. <tr>
  328. <%if isnull(trim(str_NewsPicFile)) or str_NewsPicFile="" then%>
  329. <td class="hback"><img src="../Images/nopic_supply.gif" height="90" id="pic_p_2"></td>
  330. <%else%>
  331. <td class="hback"><img src="<%=str_NewsPicFile%>" height="90" id="pic_p_2"></td>
  332. <%end if%>
  333. </tr>
  334. </table>
  335. <div align="center">
  336. <div align="center">
  337. <input name="NewsPicFile" type="hidden" id="NewsPicFile" style="width:85%" maxlength="255" value="<%=str_NewsPicFile%>">
  338. <img  src="../Images/upfile.gif" width="44" height="22" onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectPic.asp?CurrPath=<% = str_CurrPath %>',500,320,window,document.NewsForm.NewsPicFile);" style="cursor:hand;">  <img src="../Images/del_supply.gif" width="44" height="22" onClick="dels_2();" style="cursor:hand;"> </div>
  339. </div>
  340. </td>
  341. </tr>
  342. <tr>
  343. <td class="hback">
  344. <div align="center">小图地址</div>
  345. </td>
  346. <td class="hback">
  347. <div align="center">大图地址</div>
  348. </td>
  349. </tr>
  350. </table>
  351. </td>
  352. </tr>
  353. <tr  id="str_Author" style="display:<%=str_Author_1%>" >
  354. <td class="hback">
  355. <div align="right">
  356. <% = Fs_news.allInfotitle %>
  357. 作者</div>
  358. </td>
  359. <td class="hback">
  360. <input name="Author" type="text" id="Author" size="15" maxlength="255"  value="<%=str_Author%>" >
  361. <select name="selectAuthor" id="selectAuthor" style="width:120px"  onChange="document.NewsForm.Author.value=this.options[this.selectedIndex].text;">
  362. <option style="color:red"> </option>
  363. <option value="佚名">佚名</option>
  364. <option value="本站">本站</option>
  365. <option value="未知">未知</option>
  366. <%=Fs_news.GetKeywordslist("",3)%>
  367. </select>
  368. <input name="AuthorSaveTF" type="checkbox" id="AuthorSaveTF" value="1">
  369. 记忆</td>
  370. <td class="hback">
  371. <div align="right">
  372. <% = Fs_news.allInfotitle %>
  373. 来源</div>
  374. </td>
  375. <td class="hback">
  376. <input name="Source" type="text" id="Source" size="15" maxlength="255" value="<%=str_Source%>">
  377. <select name="selectSource" id="selectSource" style="width:120px"  onChange="document.NewsForm.Source.value=this.options[this.selectedIndex].text;">
  378. <option value="" selected> </option>
  379. <option value="本站原创">本站原创</option>
  380. <option value="不详">不详</option>
  381. <%=Fs_news.GetKeywordslist("",2)%>
  382. </select>
  383. <input name="SourceSaveTF" type="checkbox" id="SourceSaveTF" value="1">
  384. 记忆</td>
  385. </tr>
  386. <tr >
  387. <td class="hback">
  388. <div align="right">类型</div>
  389. </td>
  390. <td colspan="3" class="hback">
  391. <div align="left">
  392. <input name="NewsProperty_Rec" type="checkbox" id="NewsProperty" value="1" <%if split(str_NewsProperty,",")(0)="1" then Response.Write("checked")%>>
  393. 推荐
  394. <input name="NewsProperty_mar" type="checkbox" id="NewsProperty" value="1"  <%if split(str_NewsProperty,",")(1)="1" then Response.Write("checked")%>>
  395. 滚动
  396. <input name="NewsProperty_rev" type="checkbox" id="NewsProperty" value="1"  <%if split(str_NewsProperty,",")(2)="1" then Response.Write("checked")%>>
  397. 允许评论
  398. <input name="NewsProperty_constr" type="checkbox" id="NewsProperty" value="1" <%if split(str_NewsProperty,",")(3)="1" then Response.Write("checked")%>>
  399. 投稿
  400. <input name="NewsProperty_tt" type="checkbox" id="NewsProperty" value="1"  onClick="ChooseTodayNewsType();" <%if split(str_NewsProperty,",")(5)="1" then Response.Write("checked")%>>
  401. 头条
  402. <input name="NewsProperty_hots" type="checkbox" id="NewsProperty" value="1" <%if split(str_NewsProperty,",")(6)="1" then Response.Write("checked")%>>
  403. 热点
  404. <input name="NewsProperty_jc" type="checkbox" id="NewsProperty" value="1" <%if split(str_NewsProperty,",")(7)="1" then Response.Write("checked")%>>
  405. 精彩
  406. <input name="NewsProperty_unr" type="checkbox" id="NewsProperty" value="1" <%if split(str_NewsProperty,",")(8)="1" then Response.Write("checked")%>>
  407. 不规则
  408. <input name="NewsProperty_ann" type="checkbox" id="NewsProperty" value="1" <%if split(str_NewsProperty,",")(9)="1" then Response.Write("checked")%>>
  409. 公告 <span id="str_filt" style="display:<%=str_filt_1%>">
  410. <input name="NewsProperty_filt" type="checkbox" id="NewsProperty" value="1" <%if split(str_NewsProperty,",")(10)="1" then Response.Write("checked")%>>
  411. 幻灯</span></div>
  412. </td>
  413. </tr>
  414. <tr  id="TodayNews" style="display:<%if split(str_NewsProperty,",")(5) =1 then:response.Write(";"):else:Response.Write("none;"):end if%>" >
  415. <td colspan="4" class="hback">
  416. <table width="100%" border="0" cellspacing="1" cellpadding="2" class="table">
  417. <tr>
  418. <td height="26" align="center" width="120" class="xingmu">头条
  419. <% = Fs_news.allInfotitle %>
  420. 类型:</td>
  421. <td height="26" class="hback">
  422. <input name="TodayNewsPicTF" value="" type="radio" checked onClick="if(this.checked){document.getElementById('TodayPicParam').style.display='none';}">
  423. 文字头条
  424. <input name="TodayNewsPicTF" value="FoosunCMS" type="radio" onClick="if(this.checked){document.getElementById('TodayPicParam').style.display='';}" <%if str_TodayNewsPic=1 then Response.Write("checked")%>>
  425. 图片头条   <a href="../../help?Lable=NS_News_add_tt" target="_blank" style="cursor:help;'" class="sd"><img src="../Images/_help.gif" border="0"></a></td>
  426. </tr>
  427. <tr id="TodayPicParam" style="display:<%if str_TodayNewsPic =1 then:response.Write(";"):else:Response.Write("none;"):end if%>;" >
  428. <td width="120" height="26" align="center"  class="xingmu">头条
  429. <% = Fs_news.allInfotitle %>
  430. 参数:</td>
  431. <td height="26" class="hback">&nbsp;&nbsp;字体
  432. <%
  433. Dim Get_TodayPic,FontFace,FontSize,FontColor,FontSpace,FontBgColor
  434. set Get_TodayPic = Conn.execute("select TodayPic_font,TodayPic_size,TodayPic_color,TodayPic_space,TodayPic_PicColor From  FS_NS_TodayPic where NewsID='"& str_NewsID &"'")
  435. if not Get_TodayPic.eof  then
  436. FontFace = Get_TodayPic("TodayPic_font")
  437. FontSize =  Get_TodayPic("TodayPic_size")
  438. FontColor =  Get_TodayPic("TodayPic_color")
  439. FontSpace =  Get_TodayPic("TodayPic_space")
  440. FontBgColor =  Get_TodayPic("TodayPic_PicColor")
  441. Get_TodayPic.close:set Get_TodayPic = nothing
  442. else
  443. FontFace = "黑体"
  444. FontSize = "12"
  445. FontColor = "000000"
  446. FontSpace = "12"
  447. FontBgColor ="FFFFFF"
  448. Get_TodayPic.close:set Get_TodayPic = nothing
  449. end if
  450. %>
  451. <SELECT name="FontFace" id="FontFace">
  452. <option value="宋体" <%if FontFace = "宋体" then response.Write("selected")%>>宋体</option>
  453. <option value="楷体_GB2312" <%if FontFace = "楷体_GB2312" then response.Write("selected")%>>楷体</option>
  454. <option value="新宋体" <%if FontFace = "新宋体" then response.Write("selected")%>>新宋体</option>
  455. <option value="黑体" <%if FontFace = "黑体" then response.Write("selected")%>>黑体</option>
  456. <option value="隶书" <%if FontFace = "黑体" then response.Write("selected")%>>隶书</option>
  457. <OPTION value="Andale Mono" <%if FontFace = "Andale Mono" then response.Write("selected")%>>Andale 
  458. Mono</OPTION>
  459. <OPTION value="Arial" <%if FontFace = "Arial" then response.Write("selected")%>>Arial</OPTION>
  460. <OPTION value="Arial Black" <%if FontFace = "Arial Black" then response.Write("selected")%>>Arial 
  461. Black</OPTION>
  462. <OPTION value="Book Antiqua"  <%if FontFace = "Book Antiqua" then response.Write("selected")%>>Book 
  463. Antiqua</OPTION>
  464. <OPTION value="Century Gothic" <%if FontFace = "Century Gothic" then response.Write("selected")%>>Century 
  465. Gothic</OPTION>
  466. <OPTION value="Comic Sans MS" <%if FontFace = "Comic Sans MS" then response.Write("selected")%>>Comic 
  467. Sans MS</OPTION>
  468. <OPTION value="Courier New" <%if FontFace = "Courier New" then response.Write("selected")%>>Courier 
  469. New</OPTION>
  470. <OPTION value="Georgia" <%if FontFace = "Georgia" then response.Write("selected")%>>Georgia</OPTION>
  471. <OPTION value="Impact" <%if FontFace = "Impact" then response.Write("selected")%>>Impact</OPTION>
  472. <OPTION value="Tahoma" <%if FontFace = "Tahoma" then response.Write("selected")%>>Tahoma</OPTION>
  473. <OPTION value="Times New Roman" <%if FontFace = "Times New Roman" then response.Write("selected")%>>Times 
  474. New Roman</OPTION>
  475. <OPTION value="Trebuchet MS" <%if FontFace = "Trebuchet MS" then response.Write("selected")%>>Trebuchet 
  476. MS</OPTION>
  477. <OPTION value="Script MT Bold" <%if FontFace = "Script MT Bold" then response.Write("selected")%>>Script 
  478. MT Bold</OPTION>
  479. <OPTION value="Stencil" <%if FontFace = "Stencil" then response.Write("selected")%>>Stencil</OPTION>
  480. <OPTION value="Verdana" <%if FontFace = "Verdana" then response.Write("selected")%>>Verdana</OPTION>
  481. <OPTION value="Lucida Console" <%if FontFace = "Lucida Console" then response.Write("selected")%>>Lucida 
  482. Console</OPTION>
  483. </SELECT>
  484. <select name="FontSize">
  485. <option value="8" <%if FontSize = "8" then response.Write("selected")%>>8px</option>
  486. <option value="9" <%if FontSize = "9" then response.Write("selected")%>>9px</option>
  487. <option value="10" <%if FontSize = "10" then response.Write("selected")%>>10px</option>
  488. <option value="12" <%if FontSize = "12" then response.Write("selected")%>>12px</option>
  489. <option value="18" <%if FontSize = "18" then response.Write("selected")%>>18px</option>
  490. <option value="20" <%if FontSize = "20" then response.Write("selected")%>>20px</option>
  491. <option value="24" <%if FontSize = "24" then response.Write("selected")%>>24px</option>
  492. <option value="28" <%if FontSize = "28" then response.Write("selected")%>>28px</option>
  493. <option value="30" <%if FontSize = "30" then response.Write("selected")%>>30px</option>
  494. <option value="32" <%if FontSize = "32" then response.Write("selected")%>>32px</option>
  495. <option value="36" <%if FontSize = "36" then response.Write("selected")%>>36px</option>
  496. <option value="40" <%if FontSize = "40" then response.Write("selected")%>>40px</option>
  497. <option value="48" <%if FontSize = "48" then response.Write("selected")%>>48px</option>
  498. <option value="54" <%if FontSize = "54" then response.Write("selected")%>>54px</option>
  499. <option value="60" <%if FontSize = "60" then response.Write("selected")%>>60px</option>
  500. <option value="72" <%if FontSize = "72" then response.Write("selected")%>>72px</option>
  501. </select>
  502. <input type="text" name="FontColor" maxlength=7 size=7 id="FontColor" value="<% = FontColor %>">
  503. <img src="images/rect.gif" width="18" height="17" border=0 align=absmiddle id="FontColorShow" style="cursor:pointer;background-Color:#<% = FontColor %>;" title="选取颜色!" onClick="GetColor(this,'FontColor');">    字体间距:
  504. <INPUT TYPE="text" maxlength="3" NAME="FontSpace" size=3 value="<% = FontSpace %>">
  505. px 图片背景色
  506. <input type="text" name="FontBgColor" maxlength=7 size=7 id="FontBgColor" value="<% = FontBgColor %>">
  507. <img src="images/rect.gif" width="18" height="17" border=0 align=absmiddle id="FontBgColorShow" style="cursor:pointer;background-Color:<% = FontBgColor %>;" title="选取颜色!" onClick="GetColor(this,'FontBgColor');"> </td>
  508. </tr>
  509. </table>
  510. </td>
  511. </tr>
  512. <tr >
  513. <td class="hback">
  514. <div align="right">
  515. <% = Fs_news.allInfotitle %>
  516. 导读</div>
  517. </td>
  518. <td colspan="3" class="hback">
  519. <div align="left">
  520. <textarea name="NewsNaviContent" rows="6" id="NewsNaviContent" style="width:96%"><%=str_NewsNaviContent%></textarea>
  521. </div>
  522. </td>
  523. </tr>
  524. <tr id="str_Content" style="display:<%=str_Content_1%>" >
  525. <td class="hback">
  526. <div align="left">
  527. <input name="NewsProperty_Remote" type="checkbox" id="NewsProperty_Remote" value="1" <%if split(str_NewsProperty,",")(4)="1" then Response.Write("checked")%>>
  528. 下载内容中的图片到本地<br>
  529.           <span class="tx">启用此功能后,如果从其它网站上复制内容到右边的编辑器中,并且内容中包含有图片,本系统会在保存文章时自动把相关图片复制到本站服务器上。<br>
  530.           系统会因所下载图片的大小而影响速度,建议图片较多时不要使用此功能。</span><br>
  531.           <input name="ClearAllPage" type="checkbox" id="ClearAllPage" value="1">从新计算自动分页(<%=G_FS_Page_Txtlength&"字节/页"%>)</div>
  532. </td>
  533. <td colspan="3" class="hback">
  534. <!--编辑器开始-->
  535. <pre id="idTemporary" name="idTemporary" style="display:none"><%If str_Content<>"" Or Not IsNull(str_Content) Then Response.Write Server.HTMLEncode(str_Content)%></pre>
  536. <script language="JavaScript">
  537. <!--
  538. var FS_Edit1 = new InnovaEditor("FS_Edit1");
  539. FS_Edit1.cmdAssetManager="modalDialogShow('../../<% = G_ADMIN_DIR %>/CommPages/SelectManageDir/SelectPic.asp?CurrPath=<% = str_CurrPath %>',670,450)";
  540. FS_Edit1.width="100%";
  541. FS_Edit1.height="380";
  542. FS_Edit1.btnFlash=true;
  543. FS_Edit1.btnMedia=true;        
  544. FS_Edit1.btnCustomTag=true;
  545. FS_Edit1.arrCustomTag=[["Fs:Page","[FS:PAGE]"]];
  546. FS_Edit1.RENDER($("idTemporary").innerHTML);
  547. //-->
  548. </script>
  549. <textarea name="Content" style="display:none" ></textarea>
  550. <!--编辑器结束-->
  551. </td>
  552. </tr>
  553. <!--自定义自段开始-->
  554. <%
  555. If IsArray(CustColumnArr) Then
  556. response.Write"<tr><td colspan=""4"" class=""hback_1"">自定义开始</td></tr>"
  557. Dim NewsAuxiInfoRs,NewsAuxiInfoSql
  558. Dim InputModeStr,AuxiInfoList,AuxiListArr,k
  559. For i = 0 to Ubound(CustColumnArr,2)
  560. NewsAuxiInfoSql="select ColumnValue From FS_MF_DefineData Where InfoID='"&str_NewsID&"' and TableEName='" & CustColumnArr(3,i) & "' And InfoType='NS'"
  561. Set NewsAuxiInfoRs=Conn.Execute(NewsAuxiInfoSql)
  562. Select Case CStr(CustColumnArr(4,i)) '根据选择的输入类型生成输入方式
  563. Case 1 '多行输入
  564. If Not NewsAuxiInfoRs.Eof Then  '如果为以前添加的新闻则回出现读不到数据的情况,避免出错
  565.  InputModeStr="<Textarea Name=""FS_NS_Define_"&CustColumnArr(3,i)&""" style=""width:70%;height:80;"">"&NewsAuxiInfoRs(0)&"</Textarea>"
  566. Else
  567. InputModeStr="<Textarea Name=""FS_NS_Define_"&CustColumnArr(3,i)&""" style=""width:70%;height:80;""></Textarea>"
  568. End If
  569. Case 4 '列表选择
  570. Dim AuxiDictRs
  571. InputModeStr="<Select Name=""FS_NS_Define_"&CustColumnArr(3,i)&""" style=""width:70%"">"&vbcrlf
  572. AuxiListArr=Split(CustColumnArr(6,i),vbcrlf)
  573. For k = 0 to UBound(AuxiListArr)
  574. If AuxiListArr(k)<>"" Then
  575. If Not NewsAuxiInfoRs.eof  Then
  576. If trim(AuxiListArr(k))=trim(NewsAuxiInfoRs(0)) Then
  577. InputModeStr=InputModeStr&"<Option value="""&AuxiListArr(k)&""" selected>"&AuxiListArr(k)&"</option>"&vbcrlf
  578. Else
  579. InputModeStr=InputModeStr&"<Option value="""&AuxiListArr(k)&""">"&AuxiListArr(k)&"</option>"&vbcrlf
  580. End IF
  581. Else
  582. If k=0 Then InputModeStr=InputModeStr&"<Option value="""" selected> </option>"&vbcrlf 
  583. InputModeStr=InputModeStr&"<Option value="""&AuxiListArr(k)&""">"&AuxiListArr(k)&"</option>"&vbcrlf
  584. End If
  585. End If
  586. Next
  587. InputModeStr=InputModeStr&"</select>"
  588. Case Else '单行,数字,日期
  589. If Not NewsAuxiInfoRs.Eof Then
  590. InputModeStr="<Input Type=""text"" Name=""FS_NS_Define_"&CustColumnArr(3,i)&""" value="""&NewsAuxiInfoRs(0)&""" style=""width:70%"">"
  591. Else
  592. InputModeStr="<Input Type=""text"" Name=""FS_NS_Define_"&CustColumnArr(3,i)&""" value="""" style=""width:70%"">"
  593. End If
  594. End Select
  595. If CStr(CustColumnArr(7,i))<>"" Then
  596. InputModeStr=InputModeStr&"<span class=""tx"">说明:"&CustColumnArr(3,i)&"</span>"
  597. End If
  598. Response.Write "<tr >"&vbcrlf
  599. Response.Write "<td width=""10%"" align=""right""  class=""hback"">"&CustColumnArr(2,i)&"</td>"&vbcrlf
  600. Response.Write "<td width=""90%"" colspan=""3"" align=""left""    class=""hback"">"&vbcrlf&InputModeStr&"</td>"&vbcrlf
  601. Response.Write "</tr>"&vbcrlf
  602. NewsAuxiInfoRs.Close
  603. Next
  604. response.Write"<tr><td colspan=""4"" class=""hback_1"">自定义结束</td></tr>"
  605. End If
  606. Set NewsAuxiInfoRs=Nothing
  607. %>
  608. <!--自定义自段结束-->
  609. <tr  id="str_GroupID" style="display:<%=str_GroupID_1%>" >
  610. <td class="hback">
  611. <div align="right">浏览点数</div>
  612. </td>
  613. <td colspan="3" class="hback">
  614. <input name="PointNumber" type="text" id="PointNumber2" size="16"  onChange="ChooseExeName();" value="<% = str_PointNumber%>">
  615. 金币
  616. <input name="Money" type="text" id="Money2" size="16"  onChange="ChooseExeName();" value="<% = str_Money%>">
  617. 浏览权限
  618. <input name="BrowPop"  id="BrowPop" type="text" onMouseOver="this.title=this.value;" readonly value="<% = str_GroupID%>">
  619. <select name="selectPop" id="selectPop" style="overflow:hidden;" onChange="ChooseExeName();">
  620. <option value="" selected>选择会员组</option>
  621. <option value="del" style="color:red;">清空</option>
  622. <% = MF_GetUserGroupID %>
  623. </select>
  624. <a href="../../help?Lable=NS_News_add_pop" target="_blank" style="cursor:help;'" class="sd"><img src="../Images/_help.gif" border="0"></a></td>
  625. </tr>
  626. <tr  id="str_FileName" style="display:<%=str_FileName_1%>" >
  627. <td class="hback">
  628. <div align="right">文件名</div>
  629. </td>
  630. <td class="hback">
  631. <input name="FileName" type="text" value="<% = str_FileName %>" readonly>
  632. <span class="tx">不能修改</span> </td>
  633. <td class="hback">
  634. <div align="right">扩展名</div>
  635. </td>
  636. <td class="hback">
  637. <select name="FileExtName" id="FileExtName">
  638. <option value="html" <%if str_FileExtName = "html" then response.Write("selected")%>>.html</option>
  639. <option value="htm" <%if str_FileExtName = "htm" then response.Write("selected")%>>.htm</option>
  640. <option value="shtml" <%if str_FileExtName = "shtml" then response.Write("selected")%>>.shtml</option>
  641. <option value="shtm" <%if str_FileExtName = "shtm" then response.Write("selected")%>>.shtm</option>
  642. <option value="asp" <%if str_FileExtName = "asp" then response.Write("selected")%>>.asp</option>
  643. </select>
  644. </td>
  645. </tr>
  646. <tr >
  647. <td class="hback">
  648. <div align="right">添加日期</div>
  649. </td>
  650. <td class="hback">
  651. <input name="addtime" type="text" id="addtime" value="<% = str_addtime %>" size="40" maxlength="255">
  652. </td>
  653. <td class="hback">
  654. <div align="right">点击次数</div>
  655. </td>
  656. <td class="hback">
  657. <input name="Hits" type="text" id="Hits"  value="<% = str_hits %>" size="20" onFocus="Do.these('Hits',function(){return isNumber('Hits','span_Hits','请填写正确的格式',true)})" onKeyUp="Do.these('Hits',function(){return isNumber('Hits','span_Hits','请填写正确的格式',true)})">
  658. <span id="span_Hits"></span></td>
  659. </tr>
  660. <tr >
  661. <td class="hback">
  662. <div align="right"></div>
  663. </td>
  664. <td colspan="3" class="hback">
  665. <input type="submit" name="Submit" value="确认保存<% = Fs_news.allInfotitle %>">
  666. <input type="reset" name="Submit" value="重新设置">
  667. <input name="News_Action" type="hidden" id="News_Action2" value="Edit_Save">
  668. <input name="NewsID" type="hidden" id="NewsID" value="<% = str_NewsID %>">
  669. <input name="d_Id" type="hidden" id="d_Id" value="<%=tmp_defineid%>">
  670. </td>
  671. </tr>
  672. </form>
  673. </table>
  674. </body>
  675. </html>
  676. <%
  677. set Fs_news = nothing
  678. %>
  679. <script language="JavaScript" type="text/JavaScript">
  680. function CheckForm(FormObj)
  681. {
  682. if(FormObj.ClassName.value=="")
  683. {
  684. alert("请选择栏目!");
  685. FormObj.ClassName.focus();
  686. return false;
  687. }
  688. if(FormObj.ClassID.value=="")
  689. {
  690. alert("栏目参数错误!");
  691. FormObj.ClassName.focus();
  692. return false;
  693. }
  694. if(document.NewsForm.NewsTitle.value == "")
  695. {
  696. alert("请填写标题!");
  697. FormObj.NewsTitle.focus();
  698. return false;
  699. }
  700. FormObj.Content.value=FS_Edit1.getXHTMLBody();
  701. return true;
  702. }
  703. function SwitchNewsType(NewsType)
  704. {
  705. switch (NewsType)
  706. {
  707. case "TitleNews":
  708. document.getElementById('str_UrLaddress').style.display='';
  709. document.getElementById('str_CurtTitle').style.display='none';
  710. document.getElementById('str_NewsSmallPicFile').style.display='none';
  711. document.getElementById('str_Templet').style.display='none';
  712. document.getElementById('str_Content').style.display='none';
  713. document.getElementById('str_Author').style.display='none';
  714. document.getElementById('str_GroupID').style.display='none';
  715. document.getElementById('str_FileName').style.display='none';
  716. document.getElementById('str_filt').style.display='none';
  717. break;
  718. case "PicNews":
  719. document.getElementById('str_UrLaddress').style.display='none';
  720. document.getElementById('str_CurtTitle').style.display='';
  721. document.getElementById('str_NewsSmallPicFile').style.display='';
  722. document.getElementById('str_Templet').style.display='';
  723. document.getElementById('str_Content').style.display='';
  724. document.getElementById('str_Author').style.display='';
  725. document.getElementById('str_GroupID').style.display='';
  726. document.getElementById('str_FileName').style.display='';
  727. document.getElementById('str_filt').style.display='';
  728. break;
  729. default :
  730. document.getElementById('str_UrLaddress').style.display='none';
  731. document.getElementById('str_CurtTitle').style.display='';
  732. document.getElementById('str_NewsSmallPicFile').style.display='none';
  733. document.getElementById('str_Templet').style.display='';
  734. document.getElementById('str_Content').style.display='';
  735. document.getElementById('str_Author').style.display='';
  736. document.getElementById('str_GroupID').style.display='';
  737. document.getElementById('str_FileName').style.display='';
  738. document.getElementById('str_filt').style.display='none';
  739. }
  740. }
  741. function getOffsetTop(elm) {
  742. var mOffsetTop = elm.offsetTop;
  743. var mOffsetParent = elm.offsetParent;
  744. while(mOffsetParent){
  745. mOffsetTop += mOffsetParent.offsetTop;
  746. mOffsetParent = mOffsetParent.offsetParent;
  747. }
  748. return mOffsetTop;
  749. }
  750. function getOffsetLeft(elm) {
  751. var mOffsetLeft = elm.offsetLeft;
  752. var mOffsetParent = elm.offsetParent;
  753. while(mOffsetParent) {
  754. mOffsetLeft += mOffsetParent.offsetLeft;
  755. mOffsetParent = mOffsetParent.offsetParent;
  756. }
  757. return mOffsetLeft;
  758. }
  759. function setColor(color)
  760. {
  761. if(ColorImg.id=='FontColorShow' && color=="#") color='#000000';
  762. if(ColorImg.id=='FontBgColorShow' && color=="#") color='#FFFFFF';
  763. if (ColorValue){ColorValue.value = color.substr(1);}
  764. if (ColorImg && color.length>1){
  765. ColorImg.src='Images/Rect.gif';
  766. ColorImg.style.backgroundColor = color;
  767. }else if(color=='#'){ ColorImg.src='Images/rectNoColor.gif';}
  768. document.getElementById("colorPalette").style.visibility="hidden";
  769. }
  770. function SelectClass()
  771. {
  772. var ReturnValue='',TempArray=new Array();
  773. ReturnValue = OpenWindow('lib/SelectClassFrame.asp',400,300,window);
  774. if (ReturnValue.indexOf('***')!=-1)
  775. {
  776. TempArray = ReturnValue.split('***');
  777. document.all.ClassID.value=TempArray[0]
  778. document.all.ClassName.value=TempArray[1]
  779. }
  780. }
  781. function SelectSpecial()
  782. {
  783. var ReturnValue='',TempArray=new Array();
  784. ReturnValue = OpenWindow('lib/SelectspecialFrame.asp',400,300,window);
  785. if (ReturnValue.indexOf('***')!=-1)
  786. {
  787. TempArray = ReturnValue.split('***');
  788. if (document.NewsForm.SpecialID.value.search(TempArray[1])==-1)
  789. {
  790. if(document.all.SpecialID.value=='') document.all.SpecialID.value=TempArray[1];
  791. else document.all.SpecialID.value=document.all.SpecialID.value+','+TempArray[1];
  792. if(document.all.SpecialID_EName.value=='') document.all.SpecialID_EName.value=TempArray[0];
  793. else document.all.SpecialID_EName.value=document.all.SpecialID_EName.value+','+TempArray[0];
  794. }
  795. }
  796. }
  797. function ChooseTodayNewsType()
  798. {
  799. if (document.NewsForm.NewsProperty_tt.checked==true) document.getElementById('TodayNews').style.display='';
  800. else document.getElementById('TodayNews').style.display='none';
  801. }
  802. function GetColor(img_val,input_val)
  803. {
  804. var PaletteLeft,PaletteTop
  805. var obj = document.getElementById("colorPalette");
  806. ColorImg = img_val;
  807. ColorValue = document.getElementById(input_val);
  808. if (obj){
  809. PaletteLeft = getOffsetLeft(ColorImg)
  810. PaletteTop = (getOffsetTop(ColorImg) + ColorImg.offsetHeight)
  811. if (PaletteLeft+150 > parseInt(document.body.clientWidth)) PaletteLeft = parseInt(event.clientX)-260;
  812. if (PaletteTop > parseInt(document.body.clientHeight)) PaletteTop = parseInt(document.body.clientHeight)-165;
  813. obj.style.left = PaletteLeft + "px";
  814. obj.style.top = PaletteTop + "px";
  815. if (obj.style.visibility=="hidden")
  816. {
  817. obj.style.visibility="visible";
  818. }else {
  819. obj.style.visibility="hidden";
  820. }
  821. }
  822. }
  823. </script>
  824. <SCRIPT language="JavaScript">
  825. var DocumentReadyTF=false;
  826. function document.onreadystatechange()
  827. {
  828. ChooseExeName();
  829. }
  830. function ChooseExeName()
  831. {
  832.   var ObjValue = document.NewsForm.selectPop.options[document.NewsForm.selectPop.selectedIndex].value;
  833.   if (ObjValue!='')
  834.   {
  835. if (document.NewsForm.BrowPop.value=='')
  836. document.NewsForm.BrowPop.value = ObjValue;
  837. else if(document.NewsForm.BrowPop.value.indexOf(ObjValue)==-1)
  838. document.NewsForm.BrowPop.value = document.NewsForm.BrowPop.value+","+ObjValue;
  839. if (ObjValue=='del')
  840.    document.NewsForm.BrowPop.value ='';
  841.   }
  842.    CheckNumber(document.NewsForm.PointNumber,"浏览扣点值");
  843.   if (document.NewsForm.PointNumber.value>32767||document.NewsForm.PointNumber.value<-32768||document.NewsForm.PointNumber.value=='0')
  844. {
  845. alert('浏览扣点值超过允许范围!n最大32767,且不能为0');
  846. document.NewsForm.PointNumber.value='';
  847. document.NewsForm.PointNumber.focus();
  848. }
  849.    CheckNumber(document.NewsForm.Money,"浏览金币值");
  850.   if (document.NewsForm.Money.value>32767||document.NewsForm.Money.value<-32768||document.NewsForm.Money.value=='0')
  851. {
  852. alert('浏览金币值超过允许范围!n最大32767,且不能为0');
  853. document.NewsForm.Money.value='';
  854. document.NewsForm.Money.focus();
  855. }
  856.   if (document.NewsForm.BrowPop.value!=''||document.NewsForm.PointNumber.value!=''||document.NewsForm.Money.value!=''){document.NewsForm.FileExtName.options[4].selected=true;document.NewsForm.FileExtName.readonly=true;}
  857.   else {document.NewsForm.FileExtName.readonly=false;}
  858. }
  859. function CheckFileExtName(Obj)
  860. {
  861. if (Obj.value!='')
  862. {
  863. for (var i=0;i<document.all.FileExtName.length;i++)
  864. {
  865. if (document.all.FileExtName.options(i).value=='asp') document.all.FileExtName.options(i).selected=true;
  866. }
  867. document.all.FileExtName.readonly=true;
  868. }
  869. else
  870. {
  871. document.all.FileExtName.readonly=false;
  872. }
  873. }
  874. new Form.Element.Observer($('NewsSmallPicFile'),1,pics_1);
  875. function pics_1()
  876. {
  877. if ($('NewsSmallPicFile').value=='')
  878. {
  879. $('pic_p_1').src='../Images/nopic_supply.gif'
  880. }
  881. else
  882. {
  883. $('pic_p_1').src=$('NewsSmallPicFile').value
  884. }
  885. new Form.Element.Observer($('NewsPicFile'),1,pics_2);
  886. function pics_2()
  887. {
  888. if($('NewsPicFile').value=='')
  889. {
  890. $('pic_p_2').src='../Images/nopic_supply.gif'
  891. }
  892. else
  893. {
  894. $('pic_p_2').src=$('NewsPicFile').value
  895. }
  896. function dels_1()
  897. {
  898. document.NewsForm.NewsSmallPicFile.value=''
  899. }
  900. function dels_2()
  901. {
  902. document.NewsForm.NewsPicFile.value=''
  903. }
  904. </SCRIPT>
  905. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->