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
|
<?php
/**
* Admin page
*
* @author Cash Costello
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
*/
$tab = get_input('tab', 'settings');
echo elgg_view('navigation/tabs', array(
'tabs' => array(
array(
'text' => elgg_echo('settings'),
'href' => '/admin/settings/tidypics',
'selected' => ($tab == 'settings'),
),
array(
'text' => elgg_echo('tidypics:server_info'),
'href' => '/admin/settings/tidypics?tab=server_info',
'selected' => ($tab == 'server_info'),
),
array(
'text' => elgg_echo('tidypics:server_config'),
'href' => '/admin/settings/tidypics?tab=server_config',
'selected' => ($tab == 'server_config'),
),
array(
'text' => 'ImageMagick',
'href' => '/admin/settings/tidypics?tab=image_lib',
'selected' => ($tab == 'image_lib'),
),
array(
'text' => elgg_echo('tidypics:settings:thumbnail'),
'href' => '/admin/settings/tidypics?tab=thumbnail',
'selected' => ($tab == 'thumbnail'),
),
array(
'text' => elgg_echo('tidypics:settings:help'),
'href' => '/admin/settings/tidypics?tab=help',
'selected' => ($tab == 'help'),
),
)
));
switch ($tab) {
case 'server_info':
echo elgg_view('admin/settings/tidypics/server_info');
break;
case 'server_config':
echo elgg_view('admin/settings/tidypics/server_config');
break;
case 'image_lib':
echo elgg_view('admin/settings/tidypics/image_lib');
break;
case 'thumbnail':
echo elgg_view('admin/settings/tidypics/thumbnail');
break;
case 'help':
echo elgg_view('admin/settings/tidypics/help');
break;
default:
case 'settings':
echo elgg_view('admin/settings/tidypics/settings');
break;
}
|