-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathplugin.asp
More file actions
84 lines (73 loc) · 2.89 KB
/
plugin.asp
File metadata and controls
84 lines (73 loc) · 2.89 KB
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
<!--#include file="config.asp" -->
<%
try{
pageCustomParams.tempModules.cache = require("cache");
pageCustomParams.tempModules.dbo = require("DBO");
pageCustomParams.tempModules.connect = require("openDataBase");
pageCustomParams.tempModules.fns = require("fn");
pageCustomParams.tempModules.sap = require("sap");
pageCustomParams.tempCaches.globalCache = require("cache_global");
pageCustomParams.tempCaches.fso = require("FSO");
if ( !pageCustomParams.tempCaches.globalCache.webstatus ){
ConsoleClose("抱歉,网站暂时被关闭。");
}
if ( pageCustomParams.tempModules.connect !== true ){
ConsoleClose("连接数据库失败");
}
require("status")();
pageCustomParams.mark = http.get("mark");
if ( !pageCustomParams.mark || pageCustomParams.mark.length === 0 ){
ConsoleClose("参数不正确");
};
pageCustomParams.page = http.get("page");
if ( pageCustomParams.page.length === 0 ){
pageCustomParams.page = 1;
}else{
if ( !isNaN( pageCustomParams.page ) ){
pageCustomParams.page = Number(pageCustomParams.page);
if ( pageCustomParams.page < 1 ){
pageCustomParams.page = 1;
}
}else{
ConsoleClose("page params error.");
}
};
pageCustomParams.tempParams.category = require("cache_category");
pageCustomParams.plugin = {};
pageCustomParams.tempParams.pluginWebPath = "";
pageCustomParams.tempParams.pluginProxyPath = "";
(function(mark, cache, global, fso){
var assetsPluginCustom = require("pluginCustom"),
AllPluginLists = assetsPluginCustom.pluginCache(),
thisPluginInfo = {};
if ( AllPluginLists[mark] === undefined ){
ConsoleClose("未找到插件,请确认该插件是否已经被安装。");
return;
}else{
thisPluginInfo = AllPluginLists[mark];
if ( thisPluginInfo.pluginstatus === true ){
pageCustomParams.tempParams.pluginWebPath = "profile/themes/" + global.theme + "/" + thisPluginInfo.pluginwebpage,
pageCustomParams.tempParams.pluginProxyPath = "profile/plugins/" + thisPluginInfo.pluginfolder + "/proxy.asp";
pageCustomParams.plugin.configData = assetsPluginCustom.configCache(thisPluginInfo.id);
pageCustomParams.plugin.folder = "profile/plugins/" + thisPluginInfo.pluginfolder;
if ( fso.exsit(pageCustomParams.tempParams.pluginProxyPath) ){
pageCustomParams.plugin.webData = require(pageCustomParams.tempParams.pluginProxyPath);
}
}else{
ConsoleClose("插件已被停用");
}
}
})(pageCustomParams.mark, pageCustomParams.tempModules.cache, pageCustomParams.tempCaches.globalCache, pageCustomParams.tempCaches.fso);
if ( pageCustomParams.tempCaches.fso.exsit(pageCustomParams.tempParams.pluginWebPath) ){
include(pageCustomParams.tempParams.pluginWebPath);
}else{
ConsoleClose("插件页面文件不存在");
}
delete pageCustomParams.tempCaches;
delete pageCustomParams.tempModules;
delete pageCustomParams.tempParams;
CloseConnect();
}catch(e){
ConsoleClose(e.message);
}
%>