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

数据库编程

开发平台:

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,tmp_sFileExtName,tmp_sTemplets
  9. Dim Fs_news,str_ClassID,news_SQL,obj_news_rs,icNum,isUrlStr,str_Href,str_Href_title,obj_news_rs_1,str_action,obj_cnews_rs,news_count,str_CurrPath
  10. MF_Default_Conn
  11. MF_User_Conn
  12. MF_GetUserGroupID
  13. MF_Session_TF 
  14. if not MF_Check_Pop_TF("NS013") then
  15. if not MF_Check_Pop_TF("NS001") then Err_Show
  16. end if
  17. set Fs_news = new Cls_News
  18. Fs_News.GetSysParam()
  19. if Fs_News.isOpen=0 then
  20. Response.Redirect("lib/error.asp?ErrCodes=<li>新闻发布功能关闭!</li>&ErrorURL=")
  21. Response.End()
  22. end if
  23. str_ClassID = NoSqlHack(Request.QueryString("ClassID"))
  24. if str_ClassId<>"" then
  25. if not Get_SubPop_TF(str_ClassID,"NS001","NS","news") then Err_Show
  26. end if
  27. if Trim(str_ClassID)<>"" then
  28. Dim tmp_class_obj,tmp_defineid
  29. set tmp_class_obj = conn.execute("select FileExtName,NewsTemplet,DefineID from FS_NS_NewsClass where classID='"& str_ClassID &"'")
  30. Select Case tmp_class_obj(0)
  31. Case "html"
  32. tmp_sFileExtName = 0
  33. Case "htm"
  34. tmp_sFileExtName =1
  35. Case "shtml"
  36. tmp_sFileExtName = 2
  37. Case "shtm"
  38. tmp_sFileExtName = 3
  39. Case "asp"
  40. tmp_sFileExtName = 4
  41. End Select
  42. tmp_sTemplets = tmp_class_obj(1)
  43. tmp_defineid = tmp_class_obj(2)
  44. set tmp_class_obj = nothing
  45. Else
  46. tmp_defineid = 0
  47. tmp_sFileExtName = fs_news.fileExtName
  48. tmp_sTemplets = Replace("/"& G_TEMPLETS_DIR &"/NewsClass/news.htm","//","/")
  49. End if
  50. if G_VIRTUAL_ROOT_DIR<>"" then sRootDir="/"+G_VIRTUAL_ROOT_DIR else sRootDir=""
  51. if Session("Admin_Is_Super") = 1 then
  52. str_CurrPath = sRootDir &"/"&G_UP_FILES_DIR
  53. Else
  54. str_CurrPath = Replace(sRootDir &"/"&G_UP_FILES_DIR&"/adminfiles/"&Session("Admin_Name"),"//","/")
  55. End if
  56. '获取辅助字段信息,保存到数组CustColumnArr中
  57. '(c)2002-2006 版权所有:Foosun Inc. 不得进行任何性质的程序拷贝、传播。By Foosun__Simpwind.Xie 
  58. if not isnull(trim(tmp_defineid)) or trim(tmp_defineid)>0 then
  59. Dim CustColumnRs,CustSql,CustColumnArr
  60. 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 &""
  61. Set CustColumnRs=CreateObject(G_FS_RS)
  62. CustColumnRs.Open CustSql,Conn,1,3
  63. If Not CustColumnRs.Eof Then
  64. CustColumnArr=CustColumnRs.GetRows()
  65. End If
  66. CustColumnRs.close:Set CustColumnRs = Nothing
  67. end if
  68. '=====================================
  69. %>
  70. <html>
  71. <head>
  72. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  73. <title>管理___Powered by foosun Inc.</title>
  74. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  75. <script language="JavaScript" src="js/Public.js"></script>
  76. <script language="JavaScript" src="../../FS_Inc/PublicJS.js" type="text/JavaScript"></script>
  77. <script language="JavaScript" src="../../FS_Inc/Prototype.js" type="text/JavaScript"></script>
  78. <script language="JavaScript" src="../../FS_Inc/CheckJs.js" type="text/JavaScript"></script>
  79. <script language="JavaScript" type="text/javascript" src="../../FS_Inc/Get_Domain.asp"></script>
  80. <script language="JavaScript" type="text/javascript" src="../../Editor/FS_scripts/editor.js"></script>
  81. </head>
  82. <body>
  83. <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>
  84. <table width="98%" border="0" cellspacing="0" cellpadding="0">
  85. <tr>
  86. <td height="1"></td>
  87. </tr>
  88. </table>
  89. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  90. <tr>
  91. <td class="hback"><a href="News_Manage.asp">栏目管理</a>┆<a href="News_Manage.asp?ClassId=<%=Request.QueryString("ClassId")%>">返回本类栏目管理</a></td>
  92. </tr>
  93. </table>
  94. <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
  95. <form action="News_Save.asp" name="NewsForm" method="post">
  96. <tr class="xingmu">
  97. <td colspan="4" class="xingmu">添加
  98. <% = Fs_news.allInfotitle %>
  99. <a href="../../help?Lable=NS_News_add" target="_blank" style="cursor:help;'" class="sd"><img src="../Images/_help.gif" border="0"></a></td>
  100. </tr>
  101. <tr >
  102. <td class="hback">
  103. <div align="right">
  104. <table width="95" border="0" cellspacing="0" cellpadding="0">
  105. <tr>
  106. <td height="1"></td>
  107. </tr>
  108. </table>
  109. 类型 </div>
  110. </td>
  111. <td colspan="3" class="hback">
  112. <input name=NewsType type=radio onClick="SwitchNewsType('TextNews');" value="TextNews" checked>
  113. 普通
  114. <input name=NewsType type=radio onClick="SwitchNewsType('PicNews');" value="PicNews">
  115. 图片
  116. <input name=NewsType type=radio onClick="SwitchNewsType('TitleNews');" value="TitleNews">
  117. 标题  &nbsp;&nbsp; 
  118. <input name="isdraft" type="checkbox" id="isdraft" value="1">
  119. 存到草稿箱中</td>
  120. </tr>
  121. <tr >
  122. <td width="12%" class="hback">
  123. <div align="right"> 标题</div>
  124. </td>
  125. <td colspan="3" class="hback">
  126. <input name="NewsTitle" type="text" id="NewsTitle" size="40" maxlength="255" onFocus="Do.these('NewsTitle',function(){return isEmpty('NewsTitle','span_NewsTitle')})" onKeyUp="Do.these('NewsTitle',function(){return isEmpty('NewsTitle','span_NewsTitle')})">
  127. <span id="span_NewsTitle"></span>
  128. <input name="TitleColor" id="TitleColor" type="hidden">
  129. <img src="images/rectNoColor.gif" width="18" height="17" border=0 align="absmiddle" id="TitleColorShow" style="cursor:pointer;background-color:;" title="选取颜色!" onClick="GetColor(document.getElementById('TitleColorShow'),'TitleColor');">
  130. <input name="titleBorder" type="checkbox" id="titleBorder" value="1">
  131. 粗体
  132. <input name="TitleItalic" type="checkbox" id="TitleItalic" value="1">
  133. 斜体
  134. <input name="isShowReview" type="checkbox" id="isShowReview" value="1">
  135. 评论连接  权重
  136. <select name="PopID" id="PopID">
  137. <option value="5">总置顶</option>
  138. <option value="4">栏目置顶</option>
  139. <option value="0" selected>一般</option>
  140. </select>
  141. </td>
  142. </tr>
  143. <tr >
  144. <td class="hback">
  145. <div align="right">选择栏目</div>
  146. </td>
  147. <td colspan="3" class="hback">
  148. <input name="ClassName" type="text" id="ClassName" style="width:50%" value="<%=Fs_News.GetAdd_ClassName(str_ClassID)%>" readonly onFocus="Do.these('ClassName',function(){return isEmpty('ClassName','span_ClassName')})" onKeyUp="Do.these('ClassName',function(){return isEmpty('ClassName','span_ClassName')})">
  149. <input name="ClassID" type="hidden" id="ClassID" value="<% = str_ClassID %>">
  150. <input type="button" name="Submit" value="选择栏目"   onClick="SelectClass();">
  151. <input type="button" name="Submit2" value="添加栏目" onClick="window.location.href='Class_add.asp?ClassID=<%=str_ClassID %>&Action=add'">
  152. <span id="span_ClassName"></span> </td>
  153. </tr>
  154. <tr >
  155. <td class="hback">
  156. <div align="right">选择专题</div>
  157. </td>
  158. <td colspan="3" class="hback">
  159. <input name="SpecialID" type="text" id="SpecialID" style="width:50%" readonly>
  160. <input name="SpecialID_EName" type="hidden" id="SpecialID_EName">
  161. <span class="tx"> </span>
  162. <input type="button" name="Submit" value="选择专题"   onClick="SelectSpecial();">
  163. <span class="tx">
  164. <input name="Submit" type="button" id="Submit" onClick="dospclear();" value="清除专题">
  165. </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>
  166. </tr>
  167. <tr  id="str_URLAddress" style="display:none;" >
  168. <td class="hback">
  169. <div align="right">连接地址 </div>
  170. </td>
  171. <td colspan="3" class="hback">
  172. <input name="URLAddress" type="text" id="URLAddress"  style="width:96%" maxlength="255">
  173. </td>
  174. </tr>
  175. <tr  id="str_CurtTitle" style="display:" >
  176. <td class="hback">
  177. <div align="right"> 副标题</div>
  178. </td>
  179. <td width="38%" class="hback">
  180. <input name="CurtTitle" type="text" id="CurtTitle" size="40" maxlength="255">
  181. </td>
  182. <td width="10%" class="hback">
  183. <div align="right">关键字</div>
  184. </td>
  185. <td width="40%" class="hback">
  186. <input name="KeywordText" type="text" id="KeywordText" size="15" maxlength="255">
  187. <input name="KeyWords" type="hidden" id="KeyWords">
  188. <select name="selectKeywords" id="selectKeywords" style="width:120px" onChange=Dokesite(this.options[this.selectedIndex].value)>
  189. <option value="" selected>选择关键字</option>
  190. <option value="Clean" style="color:red">清空</option>
  191. <%=Fs_news.GetKeywordslist("",1)%>
  192. </select>
  193. <input name="KeywordSaveTF" type="checkbox" id="KeywordSaveTF" value="1">
  194. 记忆</td>
  195. </tr>
  196. <tr   id="str_Templet" style="display:" >
  197. <td class="hback">
  198. <div align="right">模板地址</div>
  199. </td>
  200. <td colspan="3" class="hback">
  201. <input name="Templet" type="text" id="Templet" style="width:85%" value="<%=tmp_sTemplets%>" maxlength="255" readonly>
  202. <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();">
  203. </td>
  204. </tr>
  205. <tr   id="str_NewsSmallPicFile" style="display:none">
  206. <td class="hback">
  207. <div align="right">选择图片地址</div>
  208. </td>
  209. <td colspan="3" class="hback">
  210. <table width="417" border="0" cellspacing="1" cellpadding="5">
  211. <tr>
  212. <td width="50%">
  213. <table width="10" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
  214. <tr>
  215. <td class="hback"><img src="../Images/nopic_supply.gif" height="90" id="pic_p_1"></td>
  216. </tr>
  217. </table>
  218. <div align="center">
  219. <div align="center">
  220. <input name="NewsSmallPicFile" type="hidden" id="NewsSmallPicFile" style="width:85%" maxlength="255">
  221. <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>
  222. </td>
  223. <td width="50%">
  224. <table width="10" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
  225. <tr>
  226. <td class="hback"><img src="../Images/nopic_supply.gif" height="90" id="pic_p_2"></td>
  227. </tr>
  228. </table>
  229. <div align="center">
  230. <div align="center">
  231. <input name="NewsPicFile" type="hidden" id="NewsPicFile" style="width:85%" maxlength="255">
  232. <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>
  233. </td>
  234. </tr>
  235. <tr>
  236. <td class="hback">
  237. <div align="center">小图地址</div>
  238. </td>
  239. <td class="hback">
  240. <div align="center">大图地址</div>
  241. </td>
  242. </tr>
  243. </table>
  244. </td>
  245. </tr>
  246. <tr  id="str_Author" style="display:" >
  247. <td class="hback">
  248. <div align="right"> 作者</div>
  249. </td>
  250. <td class="hback">
  251. <input name="Author" type="text" id="Author" size="15" maxlength="255">
  252. <select name="selectAuthor" id="selectAuthor" style="width:120px"  onChange="document.NewsForm.Author.value=this.options[this.selectedIndex].text;">
  253. <option style="color:red"> </option>
  254. <option value="佚名">佚名</option>
  255. <option value="本站">本站</option>
  256. <option value="未知">未知</option>
  257. <%=Fs_news.GetKeywordslist("",3)%>
  258. </select>
  259. <input name="AuthorSaveTF" type="checkbox" id="AuthorSaveTF" value="1">
  260. 记忆</td>
  261. <td class="hback">
  262. <div align="right"> 来源</div>
  263. </td>
  264. <td class="hback">
  265. <input name="Source" type="text" id="Source" size="15" maxlength="255">
  266. <select name="selectSource" id="selectSource" style="width:120px"  onChange="document.NewsForm.Source.value=this.options[this.selectedIndex].text;">
  267. <option value="" selected> </option>
  268. <option value="本站原创">本站原创</option>
  269. <option value="不详">不详</option>
  270. <%=Fs_news.GetKeywordslist("",2)%>
  271. </select>
  272. <input name="SourceSaveTF" type="checkbox" id="SourceSaveTF" value="1">
  273. 记忆</td>
  274. </tr>
  275. <tr >
  276. <td class="hback">
  277. <div align="right"> 导读</div>
  278. </td>
  279. <td colspan="3" class="hback">
  280. <div align="left">
  281. <textarea name="NewsNaviContent" rows="6" id="NewsNaviContent" style="width:96%"></textarea>
  282. </div>
  283. </td>
  284. </tr>
  285. <tr >
  286. <td class="hback">
  287. <div align="right">类型</div>
  288. </td>
  289. <td colspan="3" class="hback">
  290. <div align="left">
  291. <input name="NewsProperty_Rec" type="checkbox" id="NewsProperty" value="1">
  292. 推荐
  293. <input name="NewsProperty_mar" type="checkbox" id="NewsProperty" value="1" checked>
  294. 滚动
  295. <input name="NewsProperty_rev" type="checkbox" id="NewsProperty" value="1" checked>
  296. 允许评论
  297. <input name="NewsProperty_constr" type="checkbox" id="NewsProperty" value="1">
  298. 投稿
  299. <input name="NewsProperty_tt" type="checkbox" id="NewsProperty" value="1"  onClick="ChooseTodayNewsType();">
  300. 头条
  301. <input name="NewsProperty_hots" type="checkbox" id="NewsProperty" value="1">
  302. 热点
  303. <input name="NewsProperty_jc" type="checkbox" id="NewsProperty" value="1">
  304. 精彩
  305. <input name="NewsProperty_unr" type="checkbox" id="NewsProperty" value="1">
  306. 不规则
  307. <input name="NewsProperty_ann" type="checkbox" id="NewsProperty" value="1">
  308. 公告 <span id="str_filt" style="display:none">
  309. <input name="NewsProperty_filt" type="checkbox" id="NewsProperty" value="1">
  310. 幻灯</span></div>
  311. </td>
  312. </tr>
  313. <tr  id="TodayNews" style="display:none;" >
  314. <td colspan="4" class="hback">
  315. <table width="100%" border="0" cellspacing="1" cellpadding="2" class="table">
  316. <tr>
  317. <td height="26" align="center" width="120" class="xingmu">头条类型:</td>
  318. <td height="26" class="hback">
  319. <input name="TodayNewsPicTF" value="" type="radio" checked onClick="if(this.checked){document.getElementById('TodayPicParam').style.display='none';}">
  320. 文字头条
  321. <input name="TodayNewsPicTF" value="FoosunCMS" type="radio" onClick="if(this.checked){document.getElementById('TodayPicParam').style.display='';}">
  322. 图片头条   <a href="../../help?Lable=NS_News_add_tt" target="_blank" style="cursor:help;'" class="sd"><img src="../Images/_help.gif" border="0"></a></td>
  323. </tr>
  324. <tr id="TodayPicParam" style="display:none;" >
  325. <td width="120" height="26" align="center"  class="xingmu">头条参数:</td>
  326. <td height="26" class="hback">&nbsp;&nbsp;字体
  327. <SELECT name="FontFace" id="FontFace">
  328. <option value="宋体">宋体</option>
  329. <option value="楷体_GB2312">楷体</option>
  330. <option value="新宋体">新宋体</option>
  331. <option value="黑体">黑体</option>
  332. <option value="隶书">隶书</option>
  333. <OPTION value="Andale Mono">Andale Mono</OPTION>
  334. <OPTION value="Arial">Arial</OPTION>
  335. <OPTION value="Arial Black">Arial Black</OPTION>
  336. <OPTION value="Book Antiqua" >Book Antiqua</OPTION>
  337. <OPTION value="Century Gothic">Century Gothic</OPTION>
  338. <OPTION value="Comic Sans MS">Comic Sans MS</OPTION>
  339. <OPTION value="Courier New">Courier New</OPTION>
  340. <OPTION value="Georgia">Georgia</OPTION>
  341. <OPTION value="Impact">Impact</OPTION>
  342. <OPTION value="Tahoma">Tahoma</OPTION>
  343. <OPTION value="Times New Roman">Times New Roman</OPTION>
  344. <OPTION value="Trebuchet MS">Trebuchet MS</OPTION>
  345. <OPTION value="Script MT Bold">Script MT Bold</OPTION>
  346. <OPTION value="Stencil">Stencil</OPTION>
  347. <OPTION value="Verdana">Verdana</OPTION>
  348. <OPTION value="Lucida Console">Lucida Console</OPTION>
  349. </SELECT>
  350. <select name="FontSize">
  351. <option value="8">8px</option>
  352. <option value="9">9px</option>
  353. <option value="10">10px</option>
  354. <option value="12">12px</option>
  355. <option value="18">18px</option>
  356. <option value="20">20px</option>
  357. <option value="24">24px</option>
  358. <option value="28">28px</option>
  359. <option value="30">30px</option>
  360. <option value="32">32px</option>
  361. <option value="36">36px</option>
  362. <option value="40">40px</option>
  363. <option value="48">48px</option>
  364. <option value="54">54px</option>
  365. <option value="60">60px</option>
  366. <option value="72">72px</option>
  367. </select>
  368. <input type="text" name="FontColor" maxlength=7 size=7 id="FontColor" value="000000">
  369. <img src="images/rect.gif" width="18" height="17" border=0 align=absmiddle id="FontColorShow" style="cursor:pointer;background-Color:#000000;" title="选取颜色!" onClick="GetColor(this,'FontColor');">    字体间距:
  370. <INPUT TYPE="text" maxlength="3" NAME="FontSpace" size=3 value="12">
  371. px 图片背景色
  372. <input type="text" name="FontBgColor" maxlength=7 size=7 id="FontBgColor" value="FFFFFF">
  373. <img src="images/rect.gif" width="18" height="17" border=0 align=absmiddle id="FontBgColorShow" style="cursor:pointer;background-Color:;" title="选取颜色!" onClick="GetColor(this,'FontBgColor');"> </td>
  374. </tr>
  375. </table>
  376. </td>
  377. </tr>
  378. <tr id="str_Content">
  379. <td class="hback">
  380. <div align="left">
  381. <input name="NewsProperty_Remote" type="checkbox" id="NewsProperty_Remote" value="1">
  382. 远程存图 <br>
  383. <span class="tx">启用此功能后,如果从其它网站上复制到右边的编辑器中,并且中包含有图片,本系统会在保存文章时自动把相关图片复制到本站服务器上。<br>
  384. 系统会因所下载图片的大小而影响速度,建议图片较多时不要使用此功能。</span> </div>
  385. </td>
  386. <td colspan="3" class="hback">
  387. <!--编辑器开始-->
  388. <pre id="idTemporary" name="idTemporary" style="display:none"></pre>
  389. <script language="JavaScript">
  390. <!--
  391. var FS_Edit1 = new InnovaEditor("FS_Edit1");
  392. FS_Edit1.cmdAssetManager="modalDialogShow('../../<% = G_ADMIN_DIR %>/CommPages/SelectManageDir/SelectPic.asp?CurrPath=<% = str_CurrPath %>',670,450)";
  393. FS_Edit1.width="100%";
  394. FS_Edit1.height="360";
  395. FS_Edit1.btnFlash=true;
  396. FS_Edit1.btnMedia=true;        
  397. FS_Edit1.btnCustomTag=true;
  398. FS_Edit1.arrCustomTag=[["Fs:Page","[FS:PAGE]"]];
  399. FS_Edit1.RENDER($("idTemporary").innerHTML);
  400. //-->
  401. </script>
  402. <textarea name="Content" style="display:none" ></textarea>
  403. <!--编辑器结束-->
  404. </td>
  405. </tr>
  406. <!--自定义自段开始-->
  407. <%
  408. '(c)2002-2006 版权所有:Foosun Inc. 不得进行任何性质的程序拷贝、传播。By Foosun__Simpwind.Xie 
  409. If IsArray(CustColumnArr) Then
  410. response.Write"<tr><td colspan=""4"" class=""hback_1""><b>自定义开始</b></td></tr>"
  411. Dim InputModeStr,AuxiInfoList,AuxiListArr,k,tmp_k,i,tmp_nulls_span,tmp_nulls
  412. For i = 0 to Ubound(CustColumnArr,2)
  413. if CustColumnArr(5,i)=0 then
  414. tmp_nulls="onFocus=""Do.these('FS_NS_Define_"&CustColumnArr(3,i)&"',function(){return isEmpty('FS_NS_Define_"&CustColumnArr(3,i)&"','span_FS_NS_Define_"&CustColumnArr(3,i)&"')})"" onKeyUp=""Do.these('FS_NS_Define_"&CustColumnArr(3,i)&"',function(){return isEmpty('FS_NS_Define_"&CustColumnArr(3,i)&"','span_FS_NS_Define_"&CustColumnArr(3,i)&"')})"""
  415. tmp_nulls_span="&nbsp;<span id=""span_FS_NS_Define_"&CustColumnArr(3,i)&"""></span>"
  416. else
  417. tmp_nulls=""
  418. tmp_nulls_span=""
  419. end if
  420. Select Case CStr(CustColumnArr(4,i)) '根据选择的输入类型生成输入方式
  421. Case 0
  422. Response.Write "<tr ><td class=""hback"" align=""right"">"&CustColumnArr(2,i)&"</td><td colspan=""3"" class=""hback""><input name=""FS_NS_Define_"&CustColumnArr(3,i)&""" type=""test"" style=""width:70%""  value="""&CustColumnArr(6,i)&""" "& tmp_nulls &">"& tmp_nulls_span &"&nbsp;<span class=""tx"">"&CustColumnArr(7,i)&"</span></td></tr>"&vbcrlf
  423. case 1
  424. Response.Write "<tr ><td class=""hback"" align=""right"">"&CustColumnArr(2,i)&"</td><td colspan=""3"" class=""hback""><textarea rows=""4"" name=""FS_NS_Define_"&CustColumnArr(3,i)&""" style=""width:70%"" "& tmp_nulls &">"&CustColumnArr(6,i)&"</textarea>"& tmp_nulls_span &"&nbsp;<span class=""tx"">"&CustColumnArr(7,i)&"</span></td></tr>"&vbcrlf
  425. Case 4
  426. Response.Write "<tr ><td class=""hback"" align=""right"">"&CustColumnArr(2,i)&"</td><td colspan=""3"" class=""hback""><Select Name=""FS_NS_Define_"&CustColumnArr(3,i)&""" style=""width:70%"">"&vbcrlf
  427. AuxiListArr=Split(CustColumnArr(6,i),vbcrlf)
  428. For tmp_k = 0 to UBound(AuxiListArr) '读辅助字典的选项信息
  429. If AuxiListArr(tmp_k)<>"" Then 
  430. Response.Write"<Option value="""&AuxiListArr(tmp_k)&""">"&AuxiListArr(tmp_k)&"</option>"&vbcrlf
  431. End if
  432. Next
  433. Response.Write "</Select>&nbsp;<span class=""tx"">"&CustColumnArr(7,i)&"</span></td></tr>"&vbcrlf
  434. Case Else '单行,数字,日期
  435. Response.Write "<tr ><td class=""hback"" align=""right"">"&CustColumnArr(2,i)&"</td><td colspan=""3"" class=""hback""><input name=""FS_NS_Define_"&CustColumnArr(3,i)&""" type=""test"" style=""width:70%""  value="""&CustColumnArr(6,i)&""" "& tmp_nulls &">"& tmp_nulls_span &"&nbsp;<span class=""tx"">"&CustColumnArr(7,i)&"</span></td></tr>"&vbcrlf
  436. End Select
  437. Next
  438. response.Write"<tr><td colspan=""4"" class=""hback_1""><b>自定义结束</b></td></tr>"
  439. End If
  440. %>
  441. <!--自定义自段结束-->
  442. <tr  id="str_GroupID" style="display:" >
  443. <td class="hback">
  444. <div align="right">浏览点数</div>
  445. </td>
  446. <td colspan="3" class="hback">
  447. <input name="PointNumber" type="text" id="PointNumber2" size="16"  onChange="ChooseExeName();">
  448. 金币
  449. <input name="Money" type="text" id="Money2" size="16"  onChange="ChooseExeName();">
  450. 浏览权限
  451. <input name="BrowPop"  id="BrowPop" type="text" onMouseOver="this.title=this.value;" readonly>
  452. <select name="selectPop" id="selectPop" style="overflow:hidden;" onChange="ChooseExeName();">
  453. <option value="" selected>选择会员组</option>
  454. <option value="del" style="color:red;">清空</option>
  455. <% = MF_GetUserGroupID %>
  456. </select>
  457. <a href="../../help?Lable=NS_News_add_pop" target="_blank" style="cursor:help;'" class="sd"><img src="../Images/_help.gif" border="0"></a></td>
  458. </tr>
  459. <tr id="str_FileName" style="display:" >
  460. <td class="hback">
  461. <div align="right">文件名</div>
  462. </td>
  463. <td class="hback">
  464. <%
  465.   Dim RoTF
  466.   if instr(Fs_News.strFileNameRule(Fs_News.fileNameRule,0,0),"自动编号ID")>0 or instr(Fs_News.strFileNameRule(Fs_News.fileNameRule,0,0),"唯一NewsID") then:RoTF="Readonly":End if
  467.   Response.Write"<input name=""FileName"" type=""text"" id=""FileName"" size=""40"" "& RoTF &" maxlength=""255"" value="""&Fs_News.strFileNameRule(Fs_News.fileNameRule,0,0)&""" title=""如果参数设置中设定为自动编号,将不能修改"">"
  468.   %>
  469. </td>
  470. <td class="hback">
  471. <div align="right">扩展名</div>
  472. </td>
  473. <td class="hback">
  474. <select name="FileExtName" id="FileExtName">
  475. <option value="html" <%if tmp_sFileExtName = 0 then response.Write("selected")%>>.html</option>
  476. <option value="htm" <%if tmp_sFileExtName = 1 then response.Write("selected")%>>.htm</option>
  477. <option value="shtml" <%if tmp_sFileExtName = 2 then response.Write("selected")%>>.shtml</option>
  478. <option value="shtm" <%if tmp_sFileExtName = 3 then response.Write("selected")%>>.shtm</option>
  479. <option value="asp" <%if tmp_sFileExtName = 4 then response.Write("selected")%>>.asp</option>
  480. </select>
  481. </td>
  482. </tr>
  483. <tr >
  484. <td class="hback">
  485. <div align="right">添加日期</div>
  486. </td>
  487. <td class="hback">
  488. <input name="addtime" type="text" id="addtime" value="<% = now %>" size="40" maxlength="255">
  489. </td>
  490. <td class="hback">
  491. <div align="right">点击次数</div>
  492. </td>
  493. <td class="hback">
  494. <input name="Hits" type="text" id="Hits" value="0" size="20" onFocus="Do.these('Hits',function(){return isNumber('Hits','span_Hits','请填写正确的格式',true)})" onKeyUp="Do.these('Hits',function(){return isNumber('Hits','span_Hits','请填写正确的格式',true)})">
  495. <span id="span_Hits"></span></td>
  496. </tr>
  497. <tr >
  498. <td class="hback">
  499. <div align="right"></div>
  500. </td>
  501. <td colspan="3" class="hback">
  502. <input type="button" name="Submit" value="确认保存<% = Fs_news.allInfotitle %>"  onClick="SubmitFun(this.form);">
  503. <input type="reset" name="Submit" value="重新设置">
  504. <input name="News_Action" type="hidden" id="News_Action" value="add_Save">
  505. <input name="d_Id" type="hidden" id="d_Id" value="<%=tmp_defineid%>">
  506. </td>
  507. </tr>
  508. </form>
  509. </table>
  510. </body>
  511. </html>
  512. <%
  513. set tmp_class_obj = nothing
  514. set tmp_class_obj = nothing
  515. set Fs_news = nothing
  516. %>
  517. <script language="JavaScript" type="text/JavaScript">
  518. function SubmitFun(FormObj)
  519. {
  520. if(FormObj.NewsTitle.value == "")
  521. {
  522. alert("请填写标题!");
  523. FormObj.NewsTitle.focus();
  524. return false;
  525. }
  526. if(FormObj.ClassName.value=="")
  527. {
  528. alert("请选择栏目!");
  529. FormObj.ClassName.focus();
  530. return false;
  531. }
  532. if(FormObj.ClassID.value=="")
  533. {
  534. alert("栏目参数错误!");
  535. FormObj.ClassName.focus();
  536. return false;
  537. }
  538. FormObj.Content.value=FS_Edit1.getXHTMLBody();
  539. FormObj.submit();
  540. }
  541. function SwitchNewsType(NewsType)
  542. {
  543. switch (NewsType)
  544. {
  545. case "TitleNews":
  546. document.getElementById('str_UrLaddress').style.display='';
  547. document.getElementById('str_CurtTitle').style.display='none';
  548. document.getElementById('str_NewsSmallPicFile').style.display='none';
  549. document.getElementById('str_Templet').style.display='none';
  550. document.getElementById('str_Content').style.display='none';
  551. document.getElementById('str_Author').style.display='none';
  552. document.getElementById('str_GroupID').style.display='none';
  553. document.getElementById('str_FileName').style.display='none';
  554. document.getElementById('str_filt').style.display='none';
  555. break;
  556. case "PicNews":
  557. document.getElementById('str_UrLaddress').style.display='none';
  558. document.getElementById('str_CurtTitle').style.display='';
  559. document.getElementById('str_NewsSmallPicFile').style.display='';
  560. document.getElementById('str_Templet').style.display='';
  561. document.getElementById('str_Content').style.display='';
  562. document.getElementById('str_Author').style.display='';
  563. document.getElementById('str_GroupID').style.display='';
  564. document.getElementById('str_FileName').style.display='';
  565. document.getElementById('str_filt').style.display='';
  566. break;
  567. default :
  568. document.getElementById('str_UrLaddress').style.display='none';
  569. document.getElementById('str_CurtTitle').style.display='';
  570. document.getElementById('str_NewsSmallPicFile').style.display='none';
  571. document.getElementById('str_Templet').style.display='';
  572. document.getElementById('str_Content').style.display='';
  573. document.getElementById('str_Author').style.display='';
  574. document.getElementById('str_GroupID').style.display='';
  575. document.getElementById('str_FileName').style.display='';
  576. document.getElementById('str_filt').style.display='none';
  577. }
  578. }
  579. function getOffsetTop(elm) {
  580. var mOffsetTop = elm.offsetTop;
  581. var mOffsetParent = elm.offsetParent;
  582. while(mOffsetParent){
  583. mOffsetTop += mOffsetParent.offsetTop;
  584. mOffsetParent = mOffsetParent.offsetParent;
  585. }
  586. return mOffsetTop;
  587. }
  588. function getOffsetLeft(elm) {
  589. var mOffsetLeft = elm.offsetLeft;
  590. var mOffsetParent = elm.offsetParent;
  591. while(mOffsetParent) {
  592. mOffsetLeft += mOffsetParent.offsetLeft;
  593. mOffsetParent = mOffsetParent.offsetParent;
  594. }
  595. return mOffsetLeft;
  596. }
  597. function setColor(color)
  598. {
  599. if(ColorImg.id=='FontColorShow' && color=="#") color='#000000';
  600. if(ColorImg.id=='FontBgColorShow' && color=="#") color='#FFFFFF';
  601. if (ColorValue){ColorValue.value = color.substr(1);}
  602. if (ColorImg && color.length>1){
  603. ColorImg.src='Images/Rect.gif';
  604. ColorImg.style.backgroundColor = color;
  605. }else if(color=='#'){ ColorImg.src='Images/rectNoColor.gif';}
  606. document.getElementById("colorPalette").style.visibility="hidden";
  607. }
  608. function SelectClass()
  609. {
  610. var ReturnValue='',TempArray=new Array();
  611. ReturnValue = OpenWindow('lib/SelectClassFrame.asp',400,300,window);
  612. if (ReturnValue.indexOf('***')!=-1)
  613. {
  614. TempArray = ReturnValue.split('***');
  615. document.all.ClassID.value=TempArray[0]
  616. document.all.ClassName.value=TempArray[1]
  617. }
  618. }
  619. function SelectSpecial()
  620. {
  621. var ReturnValue='',TempArray=new Array();
  622. ReturnValue = OpenWindow('lib/SelectspecialFrame.asp',400,300,window);
  623. if (ReturnValue.indexOf('***')!=-1)
  624. {
  625. TempArray = ReturnValue.split('***');
  626. if (document.NewsForm.SpecialID.value.search(TempArray[1])==-1)
  627. {
  628. if(document.all.SpecialID.value=='') document.all.SpecialID.value=TempArray[1];
  629. else document.all.SpecialID.value=document.all.SpecialID.value+','+TempArray[1];
  630. if(document.all.SpecialID_EName.value=='') document.all.SpecialID_EName.value=TempArray[0];
  631. else document.all.SpecialID_EName.value=document.all.SpecialID_EName.value+','+TempArray[0];
  632. }
  633. }
  634. }
  635. function ChooseTodayNewsType()
  636. {
  637. if (document.NewsForm.NewsProperty_tt.checked==true) document.getElementById('TodayNews').style.display='';
  638. else document.getElementById('TodayNews').style.display='none';
  639. }
  640. function GetColor(img_val,input_val)
  641. {
  642. var PaletteLeft,PaletteTop
  643. var obj = document.getElementById("colorPalette");
  644. ColorImg = img_val;
  645. ColorValue = document.getElementById(input_val);
  646. if (obj){
  647. PaletteLeft = getOffsetLeft(ColorImg)
  648. PaletteTop = (getOffsetTop(ColorImg) + ColorImg.offsetHeight)
  649. if (PaletteLeft+150 > parseInt(document.body.clientWidth)) PaletteLeft = parseInt(event.clientX)-260;
  650. if (PaletteTop > parseInt(document.body.clientHeight)) PaletteTop = parseInt(document.body.clientHeight)-165;
  651. obj.style.left = PaletteLeft + "px";
  652. obj.style.top = PaletteTop + "px";
  653. if (obj.style.visibility=="hidden")
  654. {
  655. obj.style.visibility="visible";
  656. }else {
  657. obj.style.visibility="hidden";
  658. }
  659. }
  660. }
  661. </script>
  662. <SCRIPT language="JavaScript">
  663. var DocumentReadyTF=false;
  664. function document.onreadystatechange()
  665. {
  666. ChooseExeName();
  667. }
  668. function ChooseExeName()
  669. {
  670.   var ObjValue = document.NewsForm.selectPop.options[document.NewsForm.selectPop.selectedIndex].value;
  671.   if (ObjValue!='')
  672.   {
  673. if (document.NewsForm.BrowPop.value=='')
  674. document.NewsForm.BrowPop.value = ObjValue;
  675. else if(document.NewsForm.BrowPop.value.indexOf(ObjValue)==-1)
  676. document.NewsForm.BrowPop.value = document.NewsForm.BrowPop.value+","+ObjValue;
  677. if (ObjValue=='del')
  678.    document.NewsForm.BrowPop.value ='';
  679.   }
  680.    CheckNumber(document.NewsForm.PointNumber,"浏览扣点值");
  681.   if (document.NewsForm.PointNumber.value>32767||document.NewsForm.PointNumber.value<-32768||document.NewsForm.PointNumber.value=='0')
  682. {
  683. alert('浏览扣点值超过允许范围!n最大32767,且不能为0');
  684. document.NewsForm.PointNumber.value='';
  685. document.NewsForm.PointNumber.focus();
  686. }
  687.    CheckNumber(document.NewsForm.Money,"浏览金币值");
  688.   if (document.NewsForm.Money.value>32767||document.NewsForm.Money.value<-32768||document.NewsForm.Money.value=='0')
  689. {
  690. alert('浏览金币值超过允许范围!n最大32767,且不能为0');
  691. document.NewsForm.Money.value='';
  692. document.NewsForm.Money.focus();
  693. }
  694.   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;}
  695.   else {document.NewsForm.FileExtName.readonly=false;}
  696. }
  697. function CheckFileExtName(Obj)
  698. {
  699. if (Obj.value!='')
  700. {
  701. for (var i=0;i<document.all.FileExtName.length;i++)
  702. {
  703. if (document.all.FileExtName.options(i).value=='asp') document.all.FileExtName.options(i).selected=true;
  704. }
  705. document.all.FileExtName.readonly=true;
  706. }
  707. else
  708. {
  709. document.all.FileExtName.readonly=false;
  710. }
  711. }
  712. new Form.Element.Observer($('NewsSmallPicFile'),1,pics_1);
  713. function pics_1()
  714. {
  715. if ($('NewsSmallPicFile').value=='')
  716. {
  717. $('pic_p_1').src='../Images/nopic_supply.gif'
  718. }
  719. else
  720. {
  721. $('pic_p_1').src=$('NewsSmallPicFile').value
  722. }
  723. new Form.Element.Observer($('NewsPicFile'),1,pics_2);
  724. function pics_2()
  725. {
  726. if($('NewsPicFile').value=='')
  727. {
  728. $('pic_p_2').src='../Images/nopic_supply.gif'
  729. }
  730. else
  731. {
  732. $('pic_p_2').src=$('NewsPicFile').value
  733. }
  734. function dels_1()
  735. {
  736. document.NewsForm.NewsSmallPicFile.value=''
  737. }
  738. function dels_2()
  739. {
  740. document.NewsForm.NewsPicFile.value=''
  741. }
  742. </SCRIPT>
  743. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->