usercpspaceeditblog.aspx
上传用户:wenllgg125
上传日期:2020-04-09
资源大小:7277k
文件大小:12k
源码类别:
SCSI/ASPI
开发平台:
Others
- <%@ Page language="c#" AutoEventWireup="false" EnableViewState="false" Inherits="Discuz.Space.Pages.usercpspaceeditblog" %>
- <%@ 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:04.
- 本页面代码由Discuz!NT模板引擎生成于 2009-9-22 17:25:04.
- */
- 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("<div class="wrap with_side s_clear" id="wrap">rn");
- templateBuilder.Append(" <div class="cpmain">rn");
- templateBuilder.Append(" <div class="cpcontent">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="postform" name="postpm" method="post" action="">rn");
- templateBuilder.Append(" <table cellspacing="0" cellpadding="0" class="formtable" summary="个人资料">rn");
- templateBuilder.Append(" <tbody>rn");
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="user">日志标题</label></th>rn");
- templateBuilder.Append(" <td><input name="title" type="text" id="title" size="40" value="");
- templateBuilder.Append(spacepostsinfo.Title.ToString().Trim());
- templateBuilder.Append("" maxlength="150" class="txt"/></td>rn");
- templateBuilder.Append(" </tr>rn");
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="category">日志类别</label></th>rn");
- templateBuilder.Append(" <td>rn");
- if (categoryslist.Rows.Count!=0)
- {
- int rows__loop__id=0;
- foreach(DataRow rows in categoryslist.Rows)
- {
- rows__loop__id++;
- templateBuilder.Append(" <input type="checkbox" name="category" value="" + rows["categoryid"].ToString().Trim() + ""rn");
- if (rows["checked"].ToString().Trim()!="-1")
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" >" + rows["title"].ToString().Trim() + " rn");
- } //end loop
- templateBuilder.Append(" <a href="usercpspacecategoryadd.aspx">新建日志类别</a>rn");
- }
- else
- {
- templateBuilder.Append(" 暂无日志类别,<a href="usercpspacecategoryadd.aspx">新建日志类别</a>rn");
- } //end if
- templateBuilder.Append(" </td>rn");
- templateBuilder.Append(" </tr>rn");
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="DataTextarea">内容</label></th>rn");
- templateBuilder.Append(" <td><textarea id="DataTextarea" cols="80" rows="20" name="DataTextarea" class="txtarea">");
- templateBuilder.Append(spacepostsinfo.Content.ToString().Trim());
- templateBuilder.Append("</textarea></td>rn");
- templateBuilder.Append(" </tr>rn");
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="checkveriframe">上传文件</label></th>rn");
- templateBuilder.Append(" <td><iframe width="80%" height="40" id="checkveriframe" allowTransparency="true" style="border-width: 0px; margin: 0px;" frameborder="0" scrolling="no" src="");
- templateBuilder.Append(spaceurl.ToString());
- templateBuilder.Append("space/manage/uploadfile.aspx"></iframe><div id="postattachfile" style="border: 0px; display: block;"></div></td>rn");
- templateBuilder.Append(" </tr>rn");
- if (enabletag)
- {
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="tags">标签(Tags)</label></th>rn");
- templateBuilder.Append(" <td>rn");
- templateBuilder.Append(" <script type="text/javascript" src="javascript/ajax.js"></");
- templateBuilder.Append("script>rn");
- templateBuilder.Append(" <script type="text/javascript" src="javascript/post_editor.js"></");
- templateBuilder.Append("script>rn");
- templateBuilder.Append(" <input type="text" name="tags" id="tags" value="");
- templateBuilder.Append(spaceposttags.ToString());
- templateBuilder.Append("" size="55" class="txt"/><input type="button" onclick="relatekw($('title').value, dntEditor.GetText());" value="可用标签"/>(用空格隔开多个标签,最多可填写 5 个)rn");
- templateBuilder.Append(" </td>rn");
- templateBuilder.Append(" </tr>rn");
- } //end if
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="poststatus">发布类型</label></th>rn");
- templateBuilder.Append(" <td><input type="radio" name="poststatus" value="1"rn");
- if (spacepostsinfo.PostStatus==1)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" />直接发布rn");
- templateBuilder.Append(" <input type="radio" name="poststatus" value="0" rn");
- if (spacepostsinfo.PostStatus==0)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" />放入草稿箱rn");
- templateBuilder.Append(" <input type="radio" name="poststatus" value="2"rn");
- if (spacepostsinfo.PostStatus==2)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" />私有<br />rn");
- templateBuilder.Append(" <label for="user" class="labelshort">评论类型:</label>rn");
- templateBuilder.Append(" <input type="radio" name="commentstatus" value="1"rn");
- if (spacepostsinfo.CommentStatus==1)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" />不允许评论rn");
- templateBuilder.Append(" <input type="radio" name="commentstatus" value="0"rn");
- if (spacepostsinfo.CommentStatus==0)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" />允许匿名评论rn");
- templateBuilder.Append(" <input name="commentstatus" type="radio" value="2"rn");
- if (spacepostsinfo.CommentStatus==2)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" />仅允许注册用户评论rn");
- templateBuilder.Append(" </td>rn");
- templateBuilder.Append(" </tr>rn");
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th></th>rn");
- templateBuilder.Append(" <td>rn");
- templateBuilder.Append(" <input type="submit" name="Submit" id="postsubmit" value="确定" onclick="return checkBlog();" />[完成后可按Ctrl+Enter提交]rn");
- templateBuilder.Append(" </td>rn");
- templateBuilder.Append(" </tr>rn");
- templateBuilder.Append(" </tbody>rn");
- templateBuilder.Append(" </table>rn");
- templateBuilder.Append(" </form>rn");
- templateBuilder.Append(" <script type="text/javascript" src="javascript/dnteditor.js"></");
- templateBuilder.Append("script>rn");
- templateBuilder.Append(" <script type="text/javascript" src="javascript/post.js"></");
- templateBuilder.Append("script>rn");
- templateBuilder.Append(" <script type="text/javascript">rn");
- templateBuilder.Append(" var dntEditor;rn");
- templateBuilder.Append(" function CreateEditor()rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" dntEditor = new DNTeditor('DataTextarea', '90%', '250', $('DataTextarea').value);rn");
- templateBuilder.Append(" dntEditor.Style = "");
- templateBuilder.Append(forumpath.ToString());
- templateBuilder.Append("templates/");
- templateBuilder.Append(templatepath.ToString());
- templateBuilder.Append("/editor.css";rn");
- templateBuilder.Append(" dntEditor.BasePath = '");
- templateBuilder.Append(forumpath.ToString());
- templateBuilder.Append("';rn");
- templateBuilder.Append(" dntEditor.ReplaceTextarea();rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" function PrepareSave()rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" $('DataTextarea').value = dntEditor.GetHtml();rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" function validate(theform)rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" PrepareSave();rn");
- templateBuilder.Append(" return true;rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" CreateEditor();rn");
- templateBuilder.Append(" </");
- templateBuilder.Append("script>rn");
- templateBuilder.Append(" <script type="text/javascript" src="javascript/template_spaceblog.js"></");
- templateBuilder.Append("script>rn");
- } //end if
- templateBuilder.Append(" </div>rn");
- }
- else
- {
- } //end if
- templateBuilder.Append(" </div>rn");
- templateBuilder.Append(" </div>rn");
- templateBuilder.Append("</divrn");
- Response.Write(templateBuilder.ToString());
- }
- </script>