123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- <?php require_once 'auth.php'; ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <title><?=getTitle(__FILE__);?></title>
- <link rel="stylesheet" href="phpME.css" type="text/css"></link>
- </head>
- <body onLoad='documentOnLoad()'>
- <h3><?=getTitle(__FILE__);?></h3>
- <script language=javascript>
- var arr0, arr1, arr2, arr3;
- arr0 = new Array('add', 'change', 'delete', 'filter', 'list', 'copy');
- arr1 = new Array('viewHistory', 'viewLog', 'viewData', 'testDSN', 'dropTable',
- 'createTable', 'import', 'diff', 'addData', 'editData', 'deleteData',
- 'cleanReport', 'cleanTemp');
- arr2 = new Array('dictionary', 'right');
- arr3 = new Array();
- arr4 = new Array('editData');
- var eAction, sLen;
- function documentOnLoad() {
- if (typeof document.forms[0].module == 'undefined') return false;
- document.forms[0].module.onchange = onChangeModule;
- fElement = document.forms[0].elements;
- for (var i=0, n=fElement.length;i<n;i++) {
- if (fElement[i].name == 'action[]') {
- eAction = fElement[i];
- }
- }
- sLen = arr0.length;
- onChangeModule();
- }
- function onChangeModule() {
- var arrn = new Array();
- t = document.forms[0].module;
- for (var i=eAction.options.length-1; i>=0; i--) {
- if (i>=sLen) {
- arr3[eAction.options[i].value] = 0;
- if (eAction.options[i].selected) arr3[eAction.options[i].value] = 1;
- eAction.options[i] = null;
- }
- }
- if (t.options[t.selectedIndex].value == 'Import.Table Config') {
- arrn = arr1;
- } else if (t.options[t.selectedIndex].value == 'Report.Report Designer') {
- arrn = arr2;
- }
- for (var i=0, n=arrn.length;i<n;i++) {
- sElement = false;
- if (arr3[arrn[i]] == 1) sElement = true;
- eLen = eAction.options.length;
- eAction.options[eLen] = new Option(arrn[i], arrn[i], sElement, sElement);
- }
- eAction.size = eAction.options.length;;
- }
- </script>
- <?php
- require_once 'config.php';
- $opts['hn'] = $adodb_host;
- $opts['un'] = $adodb_user;
- $opts['pw'] = $adodb_pass;
- $opts['db'] = $adodb_db;
- $opts['tb'] = 'qb_right';
- $opts['key'] = 'id';
- $opts['key_type'] = 'int';
- $opts['sort_field'] = array('id');
- $opts['inc'] = 25;
- $opts['options'] = 'ACDF';
- $opts['multiple'] = '5';
- $opts['navigation'] = 'UG';
- $opts['display'] = array(
- 'form' => true,
- 'query' => true,
- 'sort' => true,
- 'time' => true,
- 'tabs' => true
- );
- $opts['logtable'] = isLogTable($opts['tb']);
- $opts['language'] = $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'];
- $opts['fdd']['id'] = array(
- 'name' => 'ID',
- 'select' => 'T',
- 'options' => 'AVCPDR',
- 'maxlen' => 11,
- 'default' => '0',
- 'sort' => true
- );
- $arr = array();
- $rs = $adodb->Execute("SELECT module FROM qb_module ".
- " WHERE module NOT IN ('User.Module', 'View.View Designer', 'View.View') ORDER BY id");
- while (!$rs->EOF) {
- $arr[] = $rs->fields['module'];
- $rs->MoveNext();
- }
- $opts['fdd']['module'] = array(
- 'name' => 'Module',
- 'select' => 'T',
- 'maxlen' => 32,
- 'sort' => true,
- 'values' => $arr
- );
- $arr = array('add', 'change', 'delete', 'filter', 'list', 'copy',
- 'viewLog', 'viewData', 'testDSN', 'dropTable',
- 'createTable', 'import', 'diff',
- 'dictionary', 'cleanReport', 'cleanTemp',
- 'addData', 'editData', 'deleteData');
- $opts['fdd']['action'] = array(
- 'name' => 'Action',
- 'select' => 'M',
-
- 'sort' => true,
- 'values' => $arr
- );
- $opts['fdd']['description'] = array(
- 'name' => 'Description',
- 'select' => 'T',
- 'maxlen' => 255,
- 'sort' => true
- );
- $moduleId = 'User.Right';
- $opts['options'] = getUserOptions($moduleId, $opts['options']);
- $opts['filters'] = getUserFilters($moduleId);
- require_once 'phpMyEdit.class.php';
- new phpMyEdit($opts);
- ?>
- </body>
- </html>
|