forked from zblogapp/duoshuo-zblog
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.asp
187 lines (186 loc) · 9 KB
/
main.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<%@ LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Option Explicit %>
<% 'On Error Resume Next %>
<% Response.Charset="UTF-8" %>
<!-- #include file="..\..\c_option.asp" -->
<!-- #include file="..\..\..\zb_system\function\c_function.asp" -->
<!-- #include file="..\..\..\zb_system\function\c_system_lib.asp" -->
<!-- #include file="..\..\..\zb_system\function\c_system_base.asp" -->
<!-- #include file="..\..\..\zb_system\function\c_system_event.asp" -->
<!-- #include file="..\..\..\zb_system\function\c_system_manage.asp" -->
<!-- #include file="..\..\..\zb_system\function\c_system_plugin.asp" -->
<!-- #include file="..\p_config.asp" -->
<%
Call System_Initialize()
'检查非法链接
Call CheckReference("")
'检查权限
If BlogUser.Level>1 Then Call ShowError(6)
If CheckPluginState("duoshuo")=False Then Call ShowError(48)
BlogTitle="多说社会化评论"
Call DuoShuo_Initialize
%>
<!--#include file="..\..\..\zb_system\admin\admin_header.asp"-->
<style type="text/css">
tr {
height: 32px
}
#divMain2 ul li {
margin-top: 6px;
margin-bottom: 6px
}
.bold {
font-weight: bold;
}
.note {
margin-left: 10px
}
</style>
<!--#include file="..\..\..\zb_system\admin\admin_top.asp"-->
<div id="divMain">
<div id="ShowBlogHint">
<%Call GetBlogHint()%>
</div>
<div class="divHeader"><%=BlogTitle%></div>
<div class="SubMenu"><%=duoshuo_SubMenu(duoshuo.get("act"))%></div>
<div id="divMain2">
<script type="text/javascript">ActiveTopMenu("aPlugInMng");</script>
<%
If duoshuo.config.Read("short_name")="" Then
%>
<iframe id="duoshuo-remote-window" src="http://duoshuo.com/connect-site/?name=<%=Server.URLEncode(ZC_BLOG_TITLE)%>&description=<%=Server.URLEncode(ZC_BLOG_SUBTITLE)%>&url=<%=Server.URLEncode(ZC_BLOG_HOST)%>&siteurl=<%=Server.URLEncode(ZC_BLOG_HOST)%>&system_version=<%=BlogVersion%>&plugin_version=<%=Server.URLEncode(duoshuo.config.Read("ver"))%>&system=zblog&callback=<%=Server.URLEncode(BlogHost &"zb_users/plugin/duoshuo/noresponse.asp?act=callback")%>&user_key=<%=BlogUser.ID%>&user_name=<%=Server.URLEncode(BlogUser.Name)%>&admin_email=<%=Server.URLEncode(BlogUser.EMail)%>&local_api_url=<%=Server.URLEncode(BlogHost & "zb_users/plugin/duoshuo/noresponse.asp?act=api")%>" style="border:0; width:100%; height:580px;"></iframe>
<%
Else
Select Case duoshuo.get("act")
Case "personal"
%>
<iframe id="duoshuo-remote-window" src="http://<%=duoshuo.config.Read("short_name")%>.duoshuo.com/admin/settings/" style="border:0; width:100%; height:580px;"></iframe>
<%
Case "statistics"
%>
<iframe id="duoshuo-remote-window" src="http://<%=duoshuo.config.Read("short_name")%>.duoshuo.com/admin/statistics/" style="border:0; width:100%; height:580px;"></iframe>
<%
Case "setting"
%>
<form action="noresponse.asp?act=save" method="post">
<table width="100%">
<thead>
<tr>
<th width="30%">配置项 </th>
<th>选择 </th>
</tr>
</thead>
<tbody>
<tr>
<td><p><span class="bold"> · 多说API服务器</span><br/>
<span class="note">选择一个速度更快的服务器</span></p></td>
<td><ul>
<li>
<label>
<input type="radio" name="duoshuo_api_hostname" value="api.duoshuo.com"<%=GetChecked("duoshuo_api_hostname","api.duoshuo.com")%>>
api.duoshuo.com(国内主机使用)</label>
</li>
<li>
<label>
<input type="radio" name="duoshuo_api_hostname" value="api.duoshuo.org"<%=GetChecked("duoshuo_api_hostname","api.duoshuo.org")%>>
api.duoshuo.org(国外主机使用)</label>
</li>
<li>
<label>
<input type="radio" name="duoshuo_api_hostname" value="118.144.80.201"<%=GetChecked("duoshuo_api_hostname","118.144.80.201")%>>
118.144.80.201(DNS故障主机使用)</label>
</li>
</ul></td>
</tr>
<tr>
<td><p><span class="bold"> · 本地数据备份</span><br/>
<span class="note">评论同时写入本地数据库</span></p></td>
<td><ul>
<li>
<label>
<input type="radio" name="duoshuo_cron_sync_enabled" value="async"<%=GetChecked("duoshuo_cron_sync_enabled","async")%>>
定时写入</label>
</li>
<!--<li>
<label>
<input type="radio" name="duoshuo_cron_sync_enabled" value="sync"<%=GetChecked("duoshuo_cron_sync_enabled","sync")%>>
实时写入</label>
</li>-->
<li>
<label>
<input type="radio" name="duoshuo_cron_sync_enabled" value="off"<%=GetChecked("duoshuo_cron_sync_enabled","off")%>>
不写入</label>
</li>
</ul>
</tr>
<tr>
<td><p><span class="bold"> · 评论数修正</span><br/>
<span class="note">AJAX加载文章的评论数</span></p></td>
<td><input type="text" class="checkbox" name="duoshuo_cc_fix" value="<%=duoshuo.config.Read("duoshuo_cc_fix")%>" checked="checked"></td>
</tr>
<tr>
<td><p><span class="bold"> · 评论框前缀</span><br/>
<span class="note">仅在主题和评论框的div嵌套不正确的情况下使用 </span></p></td>
<td><input type="text" name="duoshuo_comments_wrapper_intro" value="<%=duoshuo.config.Read("duoshuo_comments_wrapper_intro")%>" style="width:50%"/></td>
</tr>
<tr>
<td><p><span class="bold"> · 评论框后缀</span><br/>
<span class="note">仅在主题和评论框的div嵌套不正确的情况下使用 </span></p></td>
<td><input type="text" name="duoshuo_comments_wrapper_outro" value="<%=duoshuo.config.Read("duoshuo_comments_wrapper_outro")%>" style="width:50%"/></td>
</tr>
<tr>
<td><p><span class="bold"> · SEO优化</span><br/>
<span class="note">搜索引擎爬虫访问网页时,显示静态HTML评论</span></p></td>
<td><input type="text" class="checkbox" name="duoshuo_seo_enabled" value="<%=duoshuo.config.Read("duoshuo_seo_enabled")%>"/></td>
</tr>
<tr>
<td><p><span class="bold"> · 启用多说登录</span><br/><span class="note">如果想停用,请打开侧栏管理,编辑控制面板,删除<div class="ds-login"></div>即可<br/></p></td>
<td><p> </p>
<p>
<input name="" type="button" class="button" onClick="location.href='noresponse.asp?act=specfg&t=login'" value="立即往侧栏写入多说登录" />
</p></td>
</tr>
<tr>
<td><p><span class="bold"> · 其它</span></p></td>
<td><p> </p>
<p>
<input name="" type="button" class="button" onClick="if(confirm('你确定要继续吗?')){location.href='noresponse.asp?act=fac'}" value="插件配置初始化" />
</p></td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
<p>
<input type="submit" class="button" value="提交" />
</p>
</form>
<%
Case Else
%>
<iframe id="duoshuo-remote-window" src="http://<%=duoshuo.config.Read("short_name")%>.duoshuo.com/admin" style="width:100%; border:0;"></iframe>
<%
End Select
End If
%>
</div>
</div>
<!--#include file="..\..\..\zb_system\admin\admin_footer.asp"-->
<script type="text/javascript">
ActiveLeftMenu("aCommentMng");
$(document).ready(function(){
var iframe = $('#duoshuo-remote-window');
resetIframeHeight = function(){
iframe.height($(window).height() - iframe.offset().top);
};
resetIframeHeight();
$(window).resize(resetIframeHeight);
});
$('#duoshuo_manage').addClass('sidebarsubmenu1');
</script>
<%Call System_Terminate()%>
<%
Function GetChecked(name,value)
If duoshuo.config.Read(name)=value Then GetChecked=" checked=""checked"" "
End Function
%>