usercpspacemanageattachment.aspx
上传用户:wenllgg125
上传日期:2020-04-09
资源大小:7277k
文件大小:8k
源码类别:
SCSI/ASPI
开发平台:
Others
- <%@ Page language="c#" AutoEventWireup="false" EnableViewState="false" Inherits="Discuz.Space.Pages.usercpspacemanageattachment" %>
- <%@ Import namespace="System.Data" %>
- <%@ Import namespace="Discuz.Common" %>
- <%@ Import namespace="Discuz.Forum" %>
- <%@ Import namespace="Discuz.Entity" %>
- <script runat="server">
- override protected void OnInit(EventArgs e)
- {
- /*
- This page was created by Discuz!NT Template Engine at 2009-9-22 17:25:05.
- 本页面代码由Discuz!NT模板引擎生成于 2009-9-22 17:25:05.
- */
- base.OnInit(e);
- templateBuilder.Capacity = 220000;
- templateBuilder.Append("<div id="nav">rn");
- templateBuilder.Append(" <div class="wrap s_clear">rn");
- templateBuilder.Append(" <a href="");
- templateBuilder.Append(config.Forumurl.ToString().Trim());
- templateBuilder.Append("" class="title">");
- templateBuilder.Append(config.Forumtitle.ToString().Trim());
- templateBuilder.Append("</a> » <a href="usercp.aspx">用户中心</a> » <strong>管理附件</strong>rn");
- templateBuilder.Append(" </div>rn");
- templateBuilder.Append("</div>rn");
- templateBuilder.Append("<script type="text/javascript">rn");
- templateBuilder.Append(" function checkCheckBox(form,objtag)rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" for(var i = 0; i < form.elements.length; i++) rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" var e = form.elements[i];rn");
- templateBuilder.Append(" if(e.name == "aid") rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" e.checked = objtag.checked;rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" objtag.checked = !objtag.checked;rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append("</");
- templateBuilder.Append("script>rn");
- templateBuilder.Append("<div class="wrap with_side s_clear" id="wrap">rn");
- templateBuilder.Append(" <div class="cpmain">rn");
- templateBuilder.Append(" <div class="cpcontent datalist">rn");
- templateBuilder.Append(" <h1>管理附件</h1>rn");
- if (config.Enablespace==1)
- {
- templateBuilder.Append("<div class="cm_header itemtitle s_clear">rn");
- if (userid>0 && user.Spaceid>0)
- {
- templateBuilder.Append(" <ul>rn");
- templateBuilder.Append(" <li rn");
- if (pagename=="usercpspacepostblog.aspx"||pagename=="usercpspacemanageblog.aspx"||pagename=="usercpspaceeditblog.aspx")
- {
- templateBuilder.Append("class="current"rn");
- } //end if
- templateBuilder.Append("><a href="usercpspacemanageblog.aspx"><span>管理日志</span></a></li>rn");
- templateBuilder.Append(" <li rn");
- if (pagename=="usercpspacelinklist.aspx"||pagename=="usercpspacelinkadd.aspx"||pagename=="usercpspacelinkedit.aspx")
- {
- templateBuilder.Append("class="current"rn");
- } //end if
- templateBuilder.Append("><a href="usercpspacelinklist.aspx"><span>友情链接</span></a></li>rn");
- templateBuilder.Append(" <li rn");
- if (pagename=="usercpspacecomment.aspx")
- {
- templateBuilder.Append("class="current"rn");
- } //end if
- templateBuilder.Append("><a href="usercpspacecomment.aspx"><span>管理评论</span></a></li>rn");
- templateBuilder.Append(" <li rn");
- if (pagename=="usercpspacemanagecategory.aspx"||pagename=="usercpspacecategoryadd.aspx"||pagename=="usercpspacecategoryedit.aspx")
- {
- templateBuilder.Append("class="current"rn");
- } //end if
- templateBuilder.Append("><a href="usercpspacemanagecategory.aspx"><span>管理分类</span></a></li>rn");
- templateBuilder.Append(" <li rn");
- if (pagename=="usercpspacemanageattachment.aspx")
- {
- templateBuilder.Append("class="current"rn");
- } //end if
- templateBuilder.Append("><a href="usercpspacemanageattachment.aspx"><span>管理附件</span></a></li>rn");
- templateBuilder.Append(" <li rn");
- if (pagename=="usercpspaceset.aspx")
- {
- templateBuilder.Append("class="current"rn");
- } //end if
- templateBuilder.Append("><a href="usercpspaceset.aspx"><span>基本设置</span></a></li>rn");
- templateBuilder.Append(" </ul>rn");
- } //end if
- templateBuilder.Append("</div> rn");
- } //end if
- if (page_err==0)
- {
- if (ispost)
- {
- }
- else
- {
- templateBuilder.Append(" <form id="attachlist" name="attachlist" method="post" action="">rn");
- templateBuilder.Append(" <table width="100%" border="0" cellspacing="0" cellpadding="0" class="datatable">rn");
- templateBuilder.Append(" <tbody>rn");
- templateBuilder.Append(" <tr class="colplural">rn");
- templateBuilder.Append(" <th width="50%">附件名</th>rn");
- templateBuilder.Append(" <th width="14%">大小(单位:KB)</th>rn");
- templateBuilder.Append(" <th width="10%">下载次数</th>rn");
- templateBuilder.Append(" <th width="20%">上传时间</th>rn");
- templateBuilder.Append(" <th> </th>rn");
- templateBuilder.Append(" </tr>rn");
- int currentattachment__loop__id=0;
- foreach(DataRow currentattachment in attachmentlist.Rows)
- {
- currentattachment__loop__id++;
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <td class="datatitle">rn");
- templateBuilder.Append(" <input name="aid" type="checkbox" id="aid" + currentattachment["aid"].ToString().Trim() + "" value="" + currentattachment["aid"].ToString().Trim() + ""/>rn");
- templateBuilder.Append(" <span id="layer" + currentattachment["aid"].ToString().Trim() + "" onmouseover="showMenu(this.id, 0, 0, 1, 0);"><a href="" + currentattachment["filename"].ToString().Trim() + "">" + currentattachment["attachment"].ToString().Trim() + "</a></span>rn");
- if (currentattachment["isimg"].ToString().Trim()=="True")
- {
- templateBuilder.Append(" <div id="layer" + currentattachment["aid"].ToString().Trim() + "_menu" style="position: absolute;display:none"><img src="" + currentattachment["filename"].ToString().Trim() + "" onerror="this.onerror=null;this.src='';" width="100"/></div>rn");
- } //end if
- templateBuilder.Append(" </td>rn");
- templateBuilder.Append(" <td>rn");
- templateBuilder.Append(" <script language="javascript" type="text/javascript">rn");
- templateBuilder.Append(" ShowFormatBytesStr(" + currentattachment["filesize"].ToString().Trim() + ");rn");
- templateBuilder.Append(" </");
- templateBuilder.Append("script>rn");
- templateBuilder.Append(" </td>rn");
- templateBuilder.Append(" <td>" + currentattachment["downloads"].ToString().Trim() + "</td>rn");
- templateBuilder.Append(" <td>" + currentattachment["postdatetime"].ToString().Trim() + "</td>rn");
- templateBuilder.Append(" <td><a href="###" onclick="$('aid" + currentattachment["aid"].ToString().Trim() + "').checked=true;$('attachlist').submit();">删除</a></td>rn");
- templateBuilder.Append(" </tr>rn");
- } //end loop
- templateBuilder.Append(" </tbody>rn");
- templateBuilder.Append(" </table>rn");
- templateBuilder.Append(" </form>rn");
- templateBuilder.Append(" <div class="cpbox s_clear">rn");
- templateBuilder.Append(" <div class="pages_btns">rn");
- templateBuilder.Append(" <div class="pages">rn");
- templateBuilder.Append(" ");
- templateBuilder.Append(pagenumbers.ToString());
- templateBuilder.Append(" <em>");
- templateBuilder.Append(pageid.ToString());
- templateBuilder.Append("/");
- templateBuilder.Append(pagecount.ToString());
- templateBuilder.Append("页</em> rn");
- templateBuilder.Append(" </div>rn");
- templateBuilder.Append(" <a href="javascript:;" onclick="checkCheckBox($('attachlist'),this)">全选</a>rn");
- templateBuilder.Append(" <span class="pipe">|</span>rn");
- templateBuilder.Append(" <a href="###" onclick="$('attachlist').submit()">删除</a>rn");
- templateBuilder.Append(" </div>rn");
- templateBuilder.Append(" </div>rn");
- templateBuilder.Append(" <div class="zerothreads">暂无附件</div>rn");
- } //end if
- }
- else
- {
- } //end if
- templateBuilder.Append(" </div>rn");
- templateBuilder.Append(" </div>rn");
- templateBuilder.Append("</div>rn");
- Response.Write(templateBuilder.ToString());
- }
- </script>