1 | <?php |
---|
2 | |
---|
3 | defined('MPS_PATH') or die('Hacking attempt!'); |
---|
4 | |
---|
5 | |
---|
6 | global $template, $page, $conf; |
---|
7 | |
---|
8 | $page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : $page['tab'] = 'home'; |
---|
9 | |
---|
10 | if ($page['tab'] != 'photo') |
---|
11 | { |
---|
12 | // tabsheet |
---|
13 | include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); |
---|
14 | $tabsheet = new tabsheet(); |
---|
15 | $tabsheet->set_id('mps'); |
---|
16 | |
---|
17 | $tabsheet->add('home', l10n('Welcome'), MPS_ADMIN . '-home'); |
---|
18 | $tabsheet->add('config', l10n('Configuration'), MPS_ADMIN . '-config'); |
---|
19 | $tabsheet->add('product', l10n('Products'), MPS_ADMIN . '-product'); |
---|
20 | $tabsheet->add('options', l10n('Options'), MPS_ADMIN . '-options'); |
---|
21 | $tabsheet->select($page['tab']); |
---|
22 | $tabsheet->assign(); |
---|
23 | } |
---|
24 | $query='SELECT * FROM '.MPS_CONF_TABLE.';'; |
---|
25 | $result = pwg_query($query); |
---|
26 | while($row = pwg_db_fetch_assoc($result)){ |
---|
27 | $config = $row ; |
---|
28 | } |
---|
29 | |
---|
30 | // include page |
---|
31 | include(MPS_PATH . 'admin/' . $page['tab'] . '.php'); |
---|
32 | |
---|
33 | // template vars |
---|
34 | $template->assign(array( |
---|
35 | 'MPS_PATH' => MPS_PATH, |
---|
36 | 'MPS_ABS_PATH' => realpath(MPS_PATH), |
---|
37 | 'MPS_ADMIN' => MPS_ADMIN, |
---|
38 | 'mps_conf' => $config |
---|
39 | |
---|
40 | )); |
---|
41 | |
---|
42 | $template->assign_var_from_handle('ADMIN_CONTENT', 'mps_content'); |
---|
43 | |
---|