source: extensions/PWG_Stuffs/admin/edit_module.php @ 9369

Last change on this file since 9369 was 9369, checked in by patdenice, 13 years ago

Plugins can add their own modules.

File size: 1.0 KB
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5// Retrieve module data
6$q = ('SELECT * FROM ' . STUFFS_TABLE . ' WHERE id = ' . $_GET['edit'] . ';');
7$module = mysql_fetch_array(pwg_query($q));
8
9$module['users'] = explode(',', $module['users']);
10$module['groups'] = explode(',', $module['groups']);
11
12$datas = (!empty($module['datas']) ? unserialize($module['datas']) : false);
13
14$template->assign(array(
15  'STUFFS_TITLE' => l10n('stuffs_edit_mod') . ' <i>' . trigger_event('render_stuffs_name', $module['name']) . '</i>',
16  'MODULE_NAME' => $module['name'],
17  'DESC_VALUE' => (isset($module['descr']) ? $module['descr'] : ''),
18  'show_title_CHECKED' => ($module['show_title'] == 'true' ? 'checked="checked"' : ''),
19  'on_home_CHECKED' => ($module['on_home'] == 'true' ? 'checked="checked"' : ''),
20  'on_cats_CHECKED' => ($module['on_cats'] == 'true' ? 'checked="checked"' : ''),
21  'on_picture_CHECKED' => ($module['on_picture'] == 'true' ? 'checked="checked"' : ''),
22  )
23);
24
25$module_path = $module['path'];
26
27include('add_module.php');
28
29?>
Note: See TracBrowser for help on using the repository browser.