forked from cevio/PJBlog4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.asp
71 lines (58 loc) · 1.98 KB
/
plugin.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
<!--#include file="config.asp" -->
<%
var mark = http.get("mark");
// '加载用户登入状态
require("status");
// '加载全局变量模块
pageCustomParams.tempCaches.globalCache = require("cache_global");
pageCustomParams.page = http.get("page");
if ( pageCustomParams.page.length === 0 ){
pageCustomParams.page = 1;
}else{
pageCustomParams.page = Number(pageCustomParams.page);
if ( pageCustomParams.page < 1 ){
pageCustomParams.page = 1;
}
}
var cache = require("cache"),
categoryCacheData = cache.load("category"),
categoryJSON = categoryCacheData.list,
categoryArray = categoryCacheData.arrays;
// '排序
categoryArray = categoryArray.sort(function( A, B ){
return A.order > B.order;
});
pageCustomParams.categorys = categoryArray;
var assetsPluginCustom = require("pluginCustom"),
AllPluginLists = assetsPluginCustom.pluginCache(),
thisPluginInfo = {};
if ( AllPluginLists[mark] === undefined ){
console.log("未找到该插件");
}else{
thisPluginInfo = AllPluginLists[mark];
if ( thisPluginInfo.pluginstatus === true ){
var fso = require("FSO"),
pluginWebPath = "profile/themes/" + pageCustomParams.global.theme + "/" + thisPluginInfo.pluginwebpage,
pluginProcyPath = "profile/plugins/" + thisPluginInfo.pluginfolder + "/proxy.asp";
if ( fso.exsit(pluginProcyPath) === true ){
// '重要参数
pageCustomParams.webData = require(pluginProcyPath);
pageCustomParams.configData = assetsPluginCustom.configCache(thisPluginInfo.id);
pageCustomParams.pluginFolder = "profile/plugins/" + thisPluginInfo.pluginfolder;
if ( fso.exsit(pluginWebPath) ){
include(pluginWebPath);
}else{
console.log("插件页面文件不存在");
}
}else{
console.log("插件数据接口文件不存在");
}
}else{
console.log("插件已被停用");
}
}
delete pageCustomParams.tempCaches;
delete pageCustomParams.tempModules;
delete pageCustomParams.tempParams;
CloseConnect();
%>