forked from tinyspeck/hammock
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnew.php
More file actions
48 lines (33 loc) · 735 Bytes
/
new.php
File metadata and controls
48 lines (33 loc) · 735 Bytes
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
<?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){
$temp = new $k();
$temp->id = $k;
$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');