forked from tinyspeck/hammock
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnew.php
51 lines (37 loc) · 852 Bytes
/
new.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
<?php
$dir = dirname(__FILE__);
include("$dir/lib/init.php");
verify_auth();
load_plugins();
#
# get list of services and sort them
#
$services = array();
foreach (array_keys($plugins_services) as $k){
$t = makeClass($k);
$temp = new $t();
$temp->id = $k;
$temp->name = $temp::NAME;
$temp->desc = $temp::DESC;
$temp->tt = $temp::TOOLTIP;
$services[] = $temp;
}
usort($services, 'local_sort');
function local_sort($a, $b){
return strcasecmp($a->name, $b->name);
}
$smarty->assign('services', split_sets($services, 3));
#
# load auth services
#
$auth = array();
foreach (array_keys($plugins_auth) as $k){
$temp = new $k();
$temp->id = $k;
$auth[] = $temp;
}
$smarty->assign('auth', $auth);
#
# output
#
$smarty->display('page_new.txt');