hpdl
|
1125
|
1
|
<?php
|
|
2
|
/*
|
|
3
|
$Id: batch_edit.php 1851 2009-02-28 03:08:07Z hpdl $
|
|
4
|
|
|
5
|
osCommerce, Open Source E-Commerce Solutions
|
|
6
|
http://www.oscommerce.com
|
|
7
|
|
hpdl
|
1851
|
8
|
Copyright (c) 2009 osCommerce
|
hpdl
|
1125
|
9
|
|
hpdl
|
1497
|
10
|
This program is free software; you can redistribute it and/or modify
|
|
11
|
it under the terms of the GNU General Public License v2 (1991)
|
|
12
|
as published by the Free Software Foundation.
|
hpdl
|
1125
|
13
|
*/
|
|
14
|
?>
|
|
15
|
|
hpdl
|
1405
|
16
|
<h1><?php echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()), $osC_Template->getPageTitle()); ?></h1>
|
hpdl
|
1125
|
17
|
|
|
18
|
<?php
|
hpdl
|
1851
|
19
|
if ( $osC_MessageStack->exists($osC_Template->getModule()) ) {
|
hpdl
|
1845
|
20
|
echo $osC_MessageStack->get($osC_Template->getModule());
|
hpdl
|
1125
|
21
|
}
|
|
22
|
?>
|
|
23
|
|
hpdl
|
1475
|
24
|
<div class="infoBoxHeading"><?php echo osc_icon('edit.png') . ' ' . $osC_Language->get('action_heading_batch_edit_administrators'); ?></div>
|
hpdl
|
1125
|
25
|
<div class="infoBoxContent">
|
hpdl
|
1851
|
26
|
<form name="aEditBatch" class="dataForm" action="<?php echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&action=batch_save'); ?>" method="post">
|
hpdl
|
1125
|
27
|
|
hpdl
|
1446
|
28
|
<p><?php echo $osC_Language->get('introduction_batch_edit_administrators'); ?></p>
|
hpdl
|
1125
|
29
|
|
|
30
|
<?php
|
|
31
|
$Qadmins = $osC_Database->query('select id, user_name from :table_administrators where id in (":id") order by user_name');
|
|
32
|
$Qadmins->bindTable(':table_administrators', TABLE_ADMINISTRATORS);
|
|
33
|
$Qadmins->bindRaw(':id', implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))));
|
|
34
|
$Qadmins->execute();
|
|
35
|
|
|
36
|
$names_string = '';
|
|
37
|
|
hpdl
|
1851
|
38
|
while ( $Qadmins->next() ) {
|
|
39
|
$names_string .= osc_draw_hidden_field('batch[]', $Qadmins->valueInt('id')) . '<b>' . $Qadmins->valueProtected('user_name') . '</b>, ';
|
hpdl
|
1125
|
40
|
}
|
|
41
|
|
|
42
|
if ( !empty($names_string) ) {
|
hpdl
|
1200
|
43
|
$names_string = substr($names_string, 0, -2);
|
hpdl
|
1125
|
44
|
}
|
|
45
|
|
|
46
|
echo '<p>' . $names_string . '</p>';
|
hpdl
|
1851
|
47
|
?>
|
hpdl
|
1125
|
48
|
|
hpdl
|
1851
|
49
|
<fieldset>
|
|
50
|
<div><?php echo osc_draw_radio_field('mode', array(array('id' => osC_Administrators_Admin::ACCESS_MODE_ADD, 'text' => $osC_Language->get('add_to')), array('id' => osC_Administrators_Admin::ACCESS_MODE_REMOVE, 'text' => $osC_Language->get('remove_from')), array('id' => osC_Administrators_Admin::ACCESS_MODE_SET, 'text' => $osC_Language->get('set_to'))), osC_Administrators_Admin::ACCESS_MODE_ADD); ?></div>
|
hpdl
|
1125
|
51
|
|
hpdl
|
1851
|
52
|
<div><select name="accessModules" id="modulesList"><option value="-1" disabled="disabled">-- Access Modules --</option><option value="0"><?php echo $osC_Language->get('global_access'); ?></option></select></div>
|
hpdl
|
1125
|
53
|
|
hpdl
|
1851
|
54
|
<ul id="accessToModules" class="modulesListing"></ul>
|
|
55
|
</fieldset>
|
hpdl
|
1125
|
56
|
|
hpdl
|
1851
|
57
|
<p align="center"><?php echo osc_draw_hidden_field('subaction', 'confirm') . '<input type="submit" value="' . $osC_Language->get('button_save') . '" class="operationButton" /> <input type="button" value="' . $osC_Language->get('button_cancel') . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()) . '\';" class="operationButton" />'; ?></p>
|
hpdl
|
1125
|
58
|
|
hpdl
|
1851
|
59
|
</form>
|
|
60
|
</div>
|
hpdl
|
1125
|
61
|
|
hpdl
|
1851
|
62
|
<script type="text/javascript">
|
|
63
|
|
|
64
|
|
hpdl
|
1125
|
65
|
|
hpdl
|
1851
|
66
|
|
hpdl
|
1125
|
67
|
|
hpdl
|
1851
|
68
|
|
|
69
|
|
|
70
|
|
|
71
|
|
|
72
|
|
|
73
|
|
|
74
|
|
|
75
|
|
|
76
|
|
|
77
|
|
|
78
|
|
|
79
|
|
|
80
|
|
|
81
|
|
|
82
|
|
|
83
|
|
|
84
|
|
|
85
|
|
|
86
|
|
|
87
|
|
|
88
|
|
|
89
|
|
|
90
|
|
|
91
|
|
|
92
|
|
|
93
|
|
|
94
|
|
|
95
|
|
|
96
|
|
|
97
|
|
|
98
|
|
|
99
|
|
|
100
|
|
|
101
|
|
|
102
|
|
|
103
|
|
|
104
|
|
|
105
|
|
|
106
|
|
|
107
|
|
|
108
|
|
|
109
|
|
|
110
|
|
|
111
|
|
|
112
|
</script>
|