-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinclude.php
58 lines (57 loc) · 1.29 KB
/
include.php
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
<?php
#注册插件
RegisterPlugin("kumo", "ActivePlugin_kumo");
function ActivePlugin_kumo()
{
}
function kumo_Path($file, $t = 'path')
{
global $zbp;
$result = $zbp->$t . 'zb_users/plugin/kumo/';
switch ($file) {
case "cache":
$subCache = date("Ymd", time() - time() % (86400 * 13));
return $result . "cache/{$subCache}/";
case "img":
// return $result . "img/";
return $zbp->$t . "zb_users/upload/";
break;
case 'proj':
case 'usr':
return $result . 'usr/';
break;
case 'run':
return $result . 'run.php';
break;
case 'main':
return $result . 'main.php';
break;
default:
return $result . $file;
}
};
function InstallPlugin_kumo()
{
global $zbp;
if (!$zbp->HasConfig('kumo')) {
$zbp->Config('kumo')->version = 1;
$zbp->Config('kumo')->debug = 1;
$zbp->SaveConfig('kumo');
}
$dir = kumo_Path("usr");
if (!is_dir($dir)) {
@mkdir($dir, 0755);
#code
}
// composer require jaeger/querylist
// require __DIR__ . '/vendor/autoload.php';
// require __DIR__ . '/class/core.php';
require __DIR__ . '/class/db.php';
require __DIR__ . '/class/json.php';
require __DIR__ . '/function.php';
kumo_Initialization();
kumo_Risuto::CreateTable();
}
function UninstallPlugin_kumo()
{
}