source: extensions/see_photos_by_user/admin.php @ 27422

Revision 27422, 2.0 KB checked in by ddtddt, 5 years ago (diff)

[extensions] - see_photos_by_user - update key lanuage = EN

Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3global $template, $conf, $user;
4include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php');
5load_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// +-----------------------------------------------------------------------+
11check_status(ACCESS_ADMINISTRATOR);
12
13global $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'],
20    )
21  );
22 
23$SPBU3T = array(
24    l10n('users in alphabetical order'),
25    l10n('users by reverse alphabetical order'),
26    l10n('by increasing number of photos'),
27        l10n('by decreasing number of photos'),
28  );
29 
30$SPBU3 = array(
31    'username ASC',
32    'username DESC',
33    'PBU ASC',
34        'PBU DSC',
35  );
36
37$template->assign('spbu', $SPBU3);
38$template->assign('spbuT', $SPBU3T); 
39 
40
41if (isset($_POST['submitspbu']))
42{
43if (is_numeric($_POST['insspbu1'])) 
44{conf_update_param('see_photos_by_user_nbphotos', $_POST['insspbu1']);}
45else
46{array_push( $page['errors'], l10n('Maximal number users is incorrect !'));}
47if (is_numeric($_POST['insspbu2'])) 
48conf_update_param('see_photos_by_user_limit', $_POST['insspbu2']);
49else
50{array_push( $page['errors'], l10n('Minimal number photos for show users is incorrect !'));}
51conf_update_param('see_photos_by_user_order', $_POST['insspbu3']);
52
53if (!$page['errors'])
54{array_push( $page['infos'], l10n('Update Complete') );}
55 
56$template->assign(
57    array(
58      'SPBU1' => stripslashes($_POST['insspbu1']),
59          'SPBU2' => stripslashes($_POST['insspbu2']),
60          'SPBU3' => stripslashes($_POST['insspbu3']),
61      )
62    );
63
64}
65
66$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
67$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
68?>
Note: See TracBrowser for help on using the repository browser.