[27391] | 1 | <?php |
---|
| 2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 3 | global $template, $conf, $user; |
---|
| 4 | include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php'); |
---|
| 5 | load_language('plugin.lang', SPBA_PATH); |
---|
| 6 | $my_base_url = get_admin_plugin_menu_link(__FILE__); |
---|
| 7 | |
---|
| 8 | // +-----------------------------------------------------------------------+ |
---|
| 9 | // | Check Access and exit when user status is not ok | |
---|
| 10 | // +-----------------------------------------------------------------------+ |
---|
| 11 | check_status(ACCESS_ADMINISTRATOR); |
---|
| 12 | |
---|
| 13 | global $conf, $page; |
---|
| 14 | |
---|
| 15 | $template->assign( |
---|
| 16 | array( |
---|
| 17 | 'SPBU1' => $conf['see_photos_by_user_nbphotos'], |
---|
| 18 | 'SPBU2' => $conf['see_photos_by_user_limit'], |
---|
| 19 | 'SPBU3' => $conf['see_photos_by_user_order'], |
---|
[27428] | 20 | 'SPBU4' => $conf['see_photos_by_user_show'], |
---|
[27391] | 21 | ) |
---|
| 22 | ); |
---|
| 23 | |
---|
| 24 | $SPBU3T = array( |
---|
| 25 | l10n('users in alphabetical order'), |
---|
| 26 | l10n('users by reverse alphabetical order'), |
---|
| 27 | l10n('by increasing number of photos'), |
---|
| 28 | l10n('by decreasing number of photos'), |
---|
| 29 | ); |
---|
| 30 | |
---|
| 31 | $SPBU3 = array( |
---|
| 32 | 'username ASC', |
---|
| 33 | 'username DESC', |
---|
| 34 | 'PBU ASC', |
---|
| 35 | 'PBU DSC', |
---|
| 36 | ); |
---|
| 37 | |
---|
| 38 | $template->assign('spbu', $SPBU3); |
---|
| 39 | $template->assign('spbuT', $SPBU3T); |
---|
| 40 | |
---|
[27428] | 41 | $SPBU3T2 = array( |
---|
| 42 | l10n('link Specials menu')." - ".l10n('select users box'), |
---|
| 43 | l10n('bloc menu users')." - ".l10n('select users box'), |
---|
| 44 | l10n('link Specials menu')." - ".l10n('select users box')." - ".l10n('bloc menu users'), |
---|
| 45 | l10n('bloc menu users'), |
---|
[27459] | 46 | l10n('select users box'), |
---|
| 47 | l10n('nothing'), |
---|
[27428] | 48 | ); |
---|
| 49 | |
---|
| 50 | $SPBU32 = array( |
---|
| 51 | '1', |
---|
| 52 | '2', |
---|
| 53 | '3', |
---|
| 54 | '4', |
---|
[27459] | 55 | '5', |
---|
| 56 | '6', |
---|
[27428] | 57 | ); |
---|
| 58 | |
---|
| 59 | $template->assign('spbu2', $SPBU32); |
---|
| 60 | $template->assign('spbuT2', $SPBU3T2); |
---|
| 61 | |
---|
[27391] | 62 | if (isset($_POST['submitspbu'])) |
---|
| 63 | { |
---|
| 64 | if (is_numeric($_POST['insspbu1'])) |
---|
| 65 | {conf_update_param('see_photos_by_user_nbphotos', $_POST['insspbu1']);} |
---|
| 66 | else |
---|
[27422] | 67 | {array_push( $page['errors'], l10n('Maximal number users is incorrect !'));} |
---|
[27391] | 68 | if (is_numeric($_POST['insspbu2'])) |
---|
| 69 | conf_update_param('see_photos_by_user_limit', $_POST['insspbu2']); |
---|
| 70 | else |
---|
[27422] | 71 | {array_push( $page['errors'], l10n('Minimal number photos for show users is incorrect !'));} |
---|
[27391] | 72 | conf_update_param('see_photos_by_user_order', $_POST['insspbu3']); |
---|
[27428] | 73 | conf_update_param('see_photos_by_user_show', $_POST['insspbu4']); |
---|
[27391] | 74 | |
---|
[27394] | 75 | if (!$page['errors']) |
---|
| 76 | {array_push( $page['infos'], l10n('Update Complete') );} |
---|
[27391] | 77 | |
---|
| 78 | $template->assign( |
---|
| 79 | array( |
---|
| 80 | 'SPBU1' => stripslashes($_POST['insspbu1']), |
---|
| 81 | 'SPBU2' => stripslashes($_POST['insspbu2']), |
---|
| 82 | 'SPBU3' => stripslashes($_POST['insspbu3']), |
---|
[27428] | 83 | 'SPBU4' => stripslashes($_POST['insspbu4']), |
---|
[27391] | 84 | ) |
---|
| 85 | ); |
---|
| 86 | |
---|
| 87 | } |
---|
| 88 | |
---|
| 89 | $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); |
---|
| 90 | $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); |
---|
| 91 | ?> |
---|