Súbor: [Platon] / Metafox / admin / inc-db / roles.inc.php (stiahnutie)
Revízia 1.9, Tue Nov 7 08:43:24 2017 UTC (6 years, 5 months ago) by nepto
Zmeny od 1.8: +1 -1 [lines]
Reuse existing DB handle in $ezin_db_handle variable instead of creating
a new one. Not only this needs more resources, but also newly created
handle does not have proper encoding initialized via SET NAMES query
(for example default UTF-8 vs required LATIN2)
|
<?php
// Authentification
if (@file_exists('inc/auth.inc.php') && @include_once 'inc/auth.inc.php');
else exit;
// General options
$ezin_opts['dbh'] = $ezin_db_handle;
$ezin_opts['tb'] = $ezin_sys['db']['tables']['roles'];
$ezin_opts['key'] = 'id';
$ezin_opts['key_type'] = 'int';
$ezin_opts['inc'] = -1;
$ezin_opts['options'] = $ezin_user['role_roles'];
$ezin_opts['multiple'] = '4';
$ezin_opts['navigation'] = $ezin_cfg['admin_navigation'].$ezin_cfg['admin_buttons_pos'];
$ezin_opts['display'] = array('query' => false, 'sort' => false, 'time' => false);
$ezin_opts['url'] = array('images' => 'icons/');
$ezin_opts['sort_field'] = array('name', '-id');
$ezin_opts['language'] = 'EN';
$ezin_opts['encoding'] = $ezin_cfg['encoding'];
$ezin_opts['ext_hsc'] = false;
// Field definitions
$ezin_opts['fdd']['id'] = array(
'name'=>'ID',
'select'=>'T',
'maxlen'=>3,
'sort'=>true,
'options'=>'LDVFPCR',
'colattrs|LF' => 'align="center"',
);
$ezin_opts['fdd']['name'] = array(
'name'=>'Name',
'select'=>'T',
'maxlen'=>60,
'sort'=>true,
'required'=>true,
'nowrap'=>true
);
$ezin_opts['fdd']['login'] = array(
'name'=>'Login',
'name|LF'=>'<small>L<br><small>01</small></small>',
'select'=>'D',
'sort'=>true,
'values2' => array('0' => 'forbidden', '1' => 'allowed'),
'values2|LF' => array('0' => '0', '1' => '1')
);
$ezin_opts['fdd']['sessions'] = array(
'name'=>'Sessions',
'name|LF'=>'<small>S<br><small>lL</small></small>',
'select'=>'D',
'sort'=>true,
'values2' => array(
'' => 'no listing',
'l' => 'restricted listing',
'L' => 'full listing'),
'values2|LF' => array(
'' => '-',
'l' => 'l',
'L' => 'L')
);
$ezin_opts['fdd']['config'] = array(
'name'=>'Config',
'name|LF'=>'<small>C<br><small>LC</small></small>',
'select'=>'D',
'sort'=>true,
'values2' => array(
'' => 'no listing',
'L' => 'listing',
'LC' => 'listing & change'),
'values2|LF' => array(
'' => '-',
'L' => 'L',
'LC' => 'LC')
);
$ezin_opts['fdd']['feedbacks'] = array(
'name'=>'Feedbacks',
'name|LF'=>'<small>F<br><small>LC</small></small>',
'select'=>'D',
'sort'=>true,
'values2' => array(
'' => 'no listing',
'L' => 'listing',
'LC' => 'listing & change'),
'values2|LF' => array(
'' => '-',
'L' => 'L',
'LC' => 'LC')
);
$ezin_opts['fdd']['articles'] = array(
'name'=>'<small>Articles<br><small>LFACPDV</small></small>',
'select'=>'T',
'sort'=>true
);
$ezin_opts['fdd']['authors'] = array(
'name'=>'<small>Authors<br><small>LFACPDV</small></small>',
'select'=>'T',
'sort'=>true
);
$ezin_opts['fdd']['sections'] = array(
'name'=>'<small>Sections<br><small>LFACPDV</small></small>',
'select'=>'T',
'sort'=>true
);
$ezin_opts['fdd']['editorials'] = array(
'name'=>'<small>Editorials<br><small>LFACPDV</small></small>',
'select'=>'T',
'sort'=>true
);
$ezin_opts['fdd']['messages'] = array(
'name'=>'<small>Msgs<br><small>LFACDV</small></small>',
'select'=>'T',
'sort'=>true
);
$ezin_opts['fdd']['polls'] = array(
'name'=>'<small>Polls<br><small>LFACDV</small></small>',
'select'=>'T',
'sort'=>true
);
$ezin_opts['fdd']['newsletters'] = array(
'name'=>'<small>Newsletters<br><small>LFACDV</small></small>',
'select'=>'T',
'sort'=>true
);
$ezin_opts['fdd']['users'] = array(
'name'=>'<small>Users<br><small>LlFACPDV</small></small>',
'select'=>'T',
'sort'=>true
);
$ezin_opts['fdd']['roles'] = array(
'name'=>'<small>Roles<br><small>LFACPDV</small></small>',
'select'=>'T',
'sort'=>true
);
$ezin_opts['fdd']['file_management'] = array(
'name'=>'<small>File Mng<br><small>LRDCErdcuves</small></small>',
'select'=>'T',
'sort'=>true
);
include dirname(__FILE__).'/_credentials.inc.php';
// Execution code
if (! ezin_admin_check_list_privileges($ezin_opts['options'])) {
require 'inc-html/permdenied.html';
} else {
require_once 'phpMyEdit/phpMyEdit.class.php';
new phpMyEdit($ezin_opts);
?>
<!-- classify this <hr> according to phpMyEdit -->
<hr>
<table>
<tr>
<td><small><b>Login</b></small></td>
<td><small>1 - allowed<br>0 - forbidden</small></td>
<td width="1" rowspan="2" bgcolor=<?php echo $ezin_cfg['color_highlight']; ?>></td>
<td rowspan="2" align="center">
<small><b>
Articles<br>
Authors<br>
Sections<br>
Editorials<br>
Messages<br>
Polls<br>
Newsletters<br>
Users<br>
Roles
</b></small>
</td>
<td rowspan=2><small>
L - full listing<br>
l - restricted listing<br>
F - filter<br>
A - add<br>
C - change<br>
P - copy<br>
D - delete<br>
V - view
</small></td>
<td width=1 rowspan=2 bgcolor=<?php echo $ezin_cfg['color_highlight']; ?>></td>
<td rowspan=2><small><b>File Mng</b></small></td>
<td rowspan=2><small>
L - listing<br>
R - directory rename<br>
D - directory remove<br>
C - directory create<br>
E - directory enter<br>
r - file rename<br>
d - file delete<br>
c - file create<br>
u - file upload<br>
v - file view<br>
e - file edit<br>
s - file save
</small></td>
</tr>
<tr>
<td><small><b>Sessions<br>Config<br>Feedbacks</b></small></td>
<td><small>C - change<br>L - full listing<br>l - restricted listing</small></td>
</tr>
</table>
<?php } ?>
Platon Group <platon@platon.sk> http://platon.sk/
|