aggregation_recommendtopic.aspx
上传用户:wenllgg125
上传日期:2020-04-09
资源大小:7277k
文件大小:4k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. <%@ Page language="c#" Inherits="Discuz.Web.Admin.aggregation_recommendtopic" Codebehind="aggregation_recommendtopic.aspx.cs" %>
  2. <%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  3. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  4. <html>
  5. <head>
  6. <title>推荐版块选择</title>
  7. <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet" /> 
  8. <link href="../styles/datagrid.css" type="text/css" rel="stylesheet" />
  9. <script type="text/javascript">
  10. function getTextBoxName(obj)
  11. {
  12. return obj.substring(obj.lastIndexOf("_") + 1,obj.length);
  13. }
  14. function resetPage()
  15. {
  16. document.getElementById('success').style.display = 'none'
  17. document.getElementById("Btn_SaveInfo").disabled = false;
  18. }
  19. function validate(form)
  20. {
  21. for (var i=0;i<form.elements.length;i++)
  22. {
  23. var e = form.elements[i];
  24. if (e.type == "text")
  25. {
  26. var name = getTextBoxName(e.id);
  27. if(e.value == "" && name != "img")   //如果信息未输入
  28. {
  29. resetPage();
  30. switch(name)
  31. {
  32. case "tid":
  33. alert("帖子ID不能为空");
  34. break;
  35. case "title":
  36. alert("帖子标题不能为空");
  37. break;
  38. }
  39. e.focus();
  40. return false;
  41. }
  42. else
  43. {
  44. switch(name)
  45. {
  46. case "tid":
  47. if(!/^d+$/.test(e.value))  //验证帖子ID是否是数字
  48. {
  49. resetPage();
  50. alert("帖子ID必须是数字");
  51. e.value = "";
  52. e.focus();
  53. return false;
  54. }
  55. break;
  56. }
  57. }
  58. }
  59. }
  60. return true;
  61. </script>
  62. <meta http-equiv="X-UA-Compatible" content="IE=7" />
  63. </head>
  64. <body>
  65. <form id="Form1" method="post" runat="server">
  66. <div class="ManagerForm">
  67. <fieldset>
  68. <legend style="background:url(../images/legendimg.jpg) no-repeat 6px 50%;">推荐版块图片选择</legend> 
  69. <cc1:datagrid id="DataGrid1" runat="server" IsFixConlumnControls="true" OnItemDataBound="DataGrid_ItemDataBound">
  70. <Columns>
  71. <asp:TemplateColumn HeaderText="版块名称">
  72. <ItemTemplate>
  73. <%# DataBinder.Eval(Container, "DataItem.name").ToString() %>
  74. <%# DataGrid1.LoadSelectedCheckBox(DataBinder.Eval(Container, "DataItem.fid").ToString())%>
  75. </ItemTemplate>
  76. </asp:TemplateColumn>
  77. <asp:BoundColumn DataField="tid"  HeaderText="帖子ID"></asp:BoundColumn>
  78. <asp:BoundColumn DataField="title" HeaderText="帖子标题"></asp:BoundColumn>
  79. <asp:BoundColumn DataField="img"  HeaderText="图片地址"></asp:BoundColumn>
  80. <asp:TemplateColumn HeaderText="图片"><HeaderStyle Width="10%" />
  81. <ItemTemplate>
  82. <a href="<%# DataBinder.Eval(Container, "DataItem.img").ToString() %>" target="_blank" title="查看原图">
  83. <img src ="<%# DataBinder.Eval(Container, "DataItem.img").ToString() %>" height="25" width="25"  border="0px" />
  84. </a>
  85. </ItemTemplate>
  86. </asp:TemplateColumn>
  87. <asp:TemplateColumn HeaderText="推荐本版主题"><HeaderStyle Width="10%" />
  88.     <ItemTemplate>
  89.         <a href="aggregation_forumaggsetbyfid.aspx?fid=<%# DataBinder.Eval(Container, "DataItem.fid").ToString() %>" title="进入推荐本版主题">进入推荐</a>
  90.     </ItemTemplate>
  91. </asp:TemplateColumn>
  92. </Columns>
  93. </cc1:datagrid>
  94. <div style="float: right"><a target="_blank" href="../global/thumbnailremoteimage.aspx?w=300&h=170">缩略图生成工具</a></div>
  95. </fieldset>
  96. <br />
  97. <div align="center">
  98. <cc1:Button id="Btn_SaveInfo" runat="server" Text="  保存  " ButtonImgUrl="../images/submit.gif" ValidateForm="true"></cc1:Button>
  99. <button class="ManagerButton" type="button" onclick="javascript:window.location.href='aggregation_recommendforums.aspx';"><img src="../images/submit.gif" />推荐版块</button>
  100. </div>
  101. </div>
  102. </form>
  103. <%=footer%>
  104. </body>
  105. </html>