Last change
on this file since 22789 was
19773,
checked in by plg, 12 years ago
|
new plugin birthdate to calculate age of people on each photo
|
File size:
1.1 KB
|
Line | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * This is the main administration page, if you have only one admin page you can put |
---|
4 | * directly its code here or using the tabsheet system like bellow |
---|
5 | */ |
---|
6 | |
---|
7 | defined('BIRTHDATE_PATH') or die('Hacking attempt!'); |
---|
8 | |
---|
9 | global $template, $page, $conf; |
---|
10 | |
---|
11 | |
---|
12 | // get current tab |
---|
13 | $page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : $page['tab'] = 'birthdates'; |
---|
14 | |
---|
15 | // tabsheet |
---|
16 | include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); |
---|
17 | $tabsheet = new tabsheet(); |
---|
18 | $tabsheet->set_id('birthdate'); |
---|
19 | |
---|
20 | $tabsheet->add('birthdates', l10n('Birthdates'), BIRTHDATE_ADMIN . '-birthdates'); |
---|
21 | $tabsheet->select($page['tab']); |
---|
22 | $tabsheet->assign(); |
---|
23 | |
---|
24 | // include page |
---|
25 | include(BIRTHDATE_PATH . 'admin/' . $page['tab'] . '.php'); |
---|
26 | |
---|
27 | // template vars |
---|
28 | $template->assign(array( |
---|
29 | 'BIRTHDATE_PATH'=> get_root_url() . BIRTHDATE_PATH, // used for images, scripts, ... access |
---|
30 | 'BIRTHDATE_ABS_PATH'=> realpath(BIRTHDATE_PATH), // used for template inclusion (Smarty needs a real path) |
---|
31 | 'BIRTHDATE_ADMIN' => BIRTHDATE_ADMIN, |
---|
32 | )); |
---|
33 | |
---|
34 | // send page content |
---|
35 | $template->assign_var_from_handle('ADMIN_CONTENT', 'birthdate_content'); |
---|
36 | |
---|
37 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.