- <%@ Page language="c#" AutoEventWireup="false" EnableViewState="false" Inherits="Discuz.Space.Pages.usercpspaceset" %>
- <%@ 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:06.
- 本页面代码由Discuz!NT模板引擎生成于 2009-9-22 17:25:06.
- */
- 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="postspaceconfig" name="postspaceconfig" 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="spacetitle">个人空间标题</label></th>rn");
- templateBuilder.Append(" <td><input name="spacetitle" type="text" id="spacetitle" value="");
- templateBuilder.Append(spaceconfiginfo.Spacetitle.ToString().Trim());
- templateBuilder.Append("" size="40" maxlength="100" class="txt"/></td>rn");
- templateBuilder.Append(" </tr>rn");
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="_description">描述</label></th>rn");
- templateBuilder.Append(" <td><textarea name="_description" cols="50" rows="6" id="_description" maxlength="200" class="txtarea">");
- templateBuilder.Append(spaceconfiginfo.Description.ToString().Trim());
- templateBuilder.Append("</textarea></td>rn");
- templateBuilder.Append(" </tr>rn");
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="blogdispmode">日志显示模式</label></th>rn");
- templateBuilder.Append(" <td><input type="radio" name="blogdispmode" value="0"rn");
- if (spaceconfiginfo.BlogDispMode==0)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" ID="Radio1"/>rn");
- templateBuilder.Append(" 摘要rn");
- templateBuilder.Append(" <input type="radio" name="blogdispmode" value="1"rn");
- if (spaceconfiginfo.BlogDispMode==1)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" ID="Radio2"/>rn");
- templateBuilder.Append(" 全文rn");
- templateBuilder.Append(" <input name="blogdispmode" type="radio" value="2"rn");
- if (spaceconfiginfo.BlogDispMode==2)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" ID="Radio3"/>rn");
- templateBuilder.Append(" 只显示标题rn");
- templateBuilder.Append(" </td>rn");
- templateBuilder.Append(" </tr>rn");
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="bpp">显示日志篇数</label></th>rn");
- templateBuilder.Append(" <td><input name="bpp" type="text" id="bpp" value="");
- templateBuilder.Append(spaceconfiginfo.Bpp.ToString().Trim());
- templateBuilder.Append("" size="4" maxlength="3" class="txt"/></td>rn");
- templateBuilder.Append(" </tr>rn");
- if (spaceactiveconfig.Enablespacerewrite==1)
- {
- if (spaceconfiginfo.Rewritename=="")
- {
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="rewritename">个性域名</label></th>rn");
- templateBuilder.Append(" <td><input name="rewritename" type="text" id="rewritename" onblur="checkrewritename(this.value);" value="" size="30" class="txt" /><span id="checkresult"></span>rn");
- templateBuilder.Append(" <p>设置此项后您将可以用 http://论坛地址/space/个性域名形式的地址访问您的空间,设置之后将不可更改</p>rn");
- templateBuilder.Append(" <script type="text/javascript">rn");
- templateBuilder.Append(" function checkrewritename(rewritename)rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" if (rewritename.length > 0)rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" ajaxRead("tools/ajax.aspx?t=checkrewritename&rewritename=" + escape(rewritename), "showcheckresult(obj,'" + rewritename + "');");rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" elsern");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" $("checkresult").innerHTML = "";rn");
- templateBuilder.Append(" $('submitspaceconfig').disabled = false;rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" function showcheckresult(obj, rewritename)rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" var res = obj.getElementsByTagName('result');rn");
- templateBuilder.Append(" var resContainer = $("checkresult");rn");
- templateBuilder.Append(" var result = "";rn");
- templateBuilder.Append(" if (res[0] != null && res[0] != undefined)rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" if (res[0].childNodes.length > 1) {rn");
- templateBuilder.Append(" result = res[0].childNodes[1].nodeValue;rn");
- templateBuilder.Append(" } else {rn");
- templateBuilder.Append(" result = res[0].firstChild.nodeValue; rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" if (result == "1")rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" $('submitspaceconfig').disabled = true;rn");
- templateBuilder.Append(" resContainer.innerHTML = "<font color='#009900'>对不起,您输入的个性化名称 \"" + rewritename + "\" 中含有非法字符或被禁用,请选择其他名字后再试。</font>";rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" else if (result == "2")rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" $('submitspaceconfig').disabled = true;rn");
- templateBuilder.Append(" resContainer.innerHTML = "<font color='#009900'>个性化名称只能为字母、数字、下划线、减号的组合";rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" else if (result == "3")rn");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" $('submitspaceconfig').disabled = true;rn");
- templateBuilder.Append(" resContainer.innerHTML = "<font color='#009900'>对不起,您输入的个性化名称 \"" + rewritename + "\" 已经被其他会员使用,请选择其他名字后再试。";rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" elsern");
- templateBuilder.Append(" {rn");
- templateBuilder.Append(" $('submitspaceconfig').disabled = false;rn");
- templateBuilder.Append(" resContainer.innerHTML = "可用";rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" }rn");
- templateBuilder.Append(" </");
- templateBuilder.Append("script>rn");
- templateBuilder.Append(" <script type="text/javascript" src="javascript/ajax.js"></");
- templateBuilder.Append("script>rn");
- templateBuilder.Append(" </td>rn");
- templateBuilder.Append(" </tr>rn");
- }
- else
- {
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="bpp">个性域名</label></th>rn");
- templateBuilder.Append(" <td><a href="");
- templateBuilder.Append(spaceurl.ToString());
- templateBuilder.Append("space/");
- templateBuilder.Append(spaceconfiginfo.Rewritename.ToString().Trim());
- templateBuilder.Append("" target="_blank"><script type="text/javascript">document.write(window.location.toString().replace('usercpspaceset.aspx',''))</");
- templateBuilder.Append("script>space/");
- templateBuilder.Append(spaceconfiginfo.Rewritename.ToString().Trim());
- templateBuilder.Append("</a></td>rn");
- templateBuilder.Append(" </tr>rn");
- } //end if
- } //end if
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="commentpref">默认评论权限</label></th>rn");
- templateBuilder.Append(" <td>rn");
- templateBuilder.Append(" <input type="radio" name="commentpref" value="0"rn");
- if (spaceconfiginfo.Commentpref==0)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" />rn");
- templateBuilder.Append(" 允许匿名评论rn");
- templateBuilder.Append(" <input type="radio" name="commentpref" value="1"rn");
- if (spaceconfiginfo.Commentpref==1)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" ID="Radio4"/>rn");
- templateBuilder.Append(" 不允许评论rn");
- templateBuilder.Append(" <input name="commentpref" type="radio" value="2"rn");
- if (spaceconfiginfo.Commentpref==2)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" ID="Radio5"/>rn");
- templateBuilder.Append(" 仅允许注册用户评论rn");
- templateBuilder.Append(" </td>rn");
- templateBuilder.Append(" </tr>rn");
- templateBuilder.Append(" <tr>rn");
- templateBuilder.Append(" <th><label for="messagepref">留言设置</label></th>rn");
- templateBuilder.Append(" <td><input type="radio" name="messagepref" value="0"rn");
- if (spaceconfiginfo.MessagePref==0)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" />rn");
- templateBuilder.Append(" 全部允许rn");
- templateBuilder.Append(" <input type="radio" name="messagepref" value="1"rn");
- if (spaceconfiginfo.MessagePref==1)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" ID="Radio6"/>rn");
- templateBuilder.Append(" 全部禁止rn");
- templateBuilder.Append(" <input name="messagepref" type="radio" value="2"rn");
- if (spaceconfiginfo.MessagePref==2)
- {
- templateBuilder.Append(" checked="checked"rn");
- } //end if
- templateBuilder.Append(" ID="Radio7"/>rn");
- 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 id="submitspaceconfig" name="submitspaceconfig" onclick="if ($('_description').value.length > 200) {alert('个人空间描述长度最大为200字'); return false;}" type="submit" value="确定" />rn");
- templateBuilder.Append(" </td>rn");
- templateBuilder.Append(" </tr>rn");
- templateBuilder.Append(" </tbody>rn");
- templateBuilder.Append(" </table>rn");
- templateBuilder.Append(" </form>rn");
- } //end if
- }
- else
- {
- } //end if
- templateBuilder.Append(" </div>rn");
- templateBuilder.Append(" </div>rn");
- templateBuilder.Append("</div>rn");
- Response.Write(templateBuilder.ToString());
- }
- </script>