| 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'); // config 'cleanCrc' 'crc'  
 
- arr2 = new Array('dictionary', 'right'); // view
 
- arr3 = new Array();
 
- arr4 = new Array('editData'); // report
 
- 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
 
- /*
 
-  * IMPORTANT NOTE: This generated file contains only a subset of huge amount
 
-  * of options that can be used with phpMyEdit. To get information about all
 
-  * features offered by phpMyEdit, check official documentation. It is available
 
-  * online and also for download on phpMyEdit project management page:
 
-  *
 
-  * http://www.platon.sk/projects/main_page.php?project_id=5
 
-  */
 
- // MySQL host name, user name, password, database, and table
 
- require_once 'config.php';
 
- $opts['hn'] = $adodb_host;
 
- $opts['un'] = $adodb_user;
 
- $opts['pw'] = $adodb_pass;
 
- $opts['db'] = $adodb_db;
 
- $opts['tb'] = 'qb_right';
 
- // Name of field which is the unique key
 
- $opts['key'] = 'id';
 
- // Type of key field (int/real/string/date etc.)
 
- $opts['key_type'] = 'int';
 
- // Sorting field(s)
 
- $opts['sort_field'] = array('id');
 
- // Number of records to display on the screen
 
- // Value of -1 lists all records in a table
 
- $opts['inc'] = 25;
 
- // Options you wish to give the users
 
- // A - add,  C - change, P - copy, V - view, D - delete,
 
- // F - filter, I - initial sort suppressed
 
- $opts['options'] = 'ACDF'; // DPV
 
- // Number of lines to display on multiple selection filters
 
- $opts['multiple'] = '5';
 
- // Navigation style: B - buttons (default), T - text links, G - graphic links
 
- // Buttons position: U - up, D - down (default)
 
- $opts['navigation'] = 'UG'; //'DB';
 
- // Display special page elements
 
- $opts['display'] = array(
 
- 	'form'  => true,
 
- 	'query' => true,
 
- 	'sort'  => true,
 
- 	'time'  => true,
 
- 	'tabs'  => true
 
- );
 
- $opts['logtable'] =  isLogTable($opts['tb']);
 
- /* Get the user's default language and use it if possible or you can
 
-    specify particular one you want to use. Refer to official documentation
 
-    for list of available languages. */
 
- $opts['language'] = $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'];
 
- /* Table-level filter capability. If set, it is included in the WHERE clause
 
-    of any generated SELECT statement in SQL query. This gives you ability to
 
-    work only with subset of data from table.
 
- $opts['filters'] = "column1 like '%11%' AND column2<17";
 
- $opts['filters'] = "section_id = 9";
 
- $opts['filters'] = "PMEtable0.sessions_count > 200";
 
- */
 
- /* Field definitions
 
-    
 
- Fields will be displayed left to right on the screen in the order in which they
 
- appear in generated list. Here are some most used field options documented.
 
- ['name'] is the title used for column headings, etc.;
 
- ['maxlen'] maximum length to display add/edit/search input boxes
 
- ['trimlen'] maximum length of string content to display in row listing
 
- ['width'] is an optional display width specification for the column
 
-           e.g.  ['width'] = '100px';
 
- ['mask'] a string that is used by sprintf() to format field output
 
- ['sort'] true or false; means the users may sort the display on this column
 
- ['strip_tags'] true or false; whether to strip tags from content
 
- ['nowrap'] true or false; whether this field should get a NOWRAP
 
- ['required'] true or false; if generate javascript to prevent null entries
 
- ['select'] T - text, N - numeric, D - drop-down, M - multiple selection
 
- ['options'] optional parameter to control whether a field is displayed
 
-   L - list, F - filter, A - add, C - change, P - copy, D - delete, V - view
 
-             Another flags are:
 
-             R - indicates that a field is read only
 
-             W - indicates that a field is a password field
 
-             H - indicates that a field is to be hidden and marked as hidden
 
- ['URL'] is used to make a field 'clickable' in the display
 
-         e.g.: 'mailto:$value', 'http://$value' or '$page?stuff';
 
- ['URLtarget']  HTML target link specification (for example: _blank)
 
- ['textarea']['rows'] and/or ['textarea']['cols']
 
-   specifies a textarea is to be used to give multi-line input
 
-   e.g. ['textarea']['rows'] = 5; ['textarea']['cols'] = 10
 
- ['values'] restricts user input to the specified constants,
 
-            e.g. ['values'] = array('A','B','C') or ['values'] = range(1,99)
 
- ['values']['table'] and ['values']['column'] restricts user input
 
-   to the values found in the specified column of another table
 
- ['values']['description'] = 'desc_column'
 
-   The optional ['values']['description'] field allows the value(s) displayed
 
-   to the user to be different to those in the ['values']['column'] field.
 
-   This is useful for giving more meaning to column values. Multiple
 
-   descriptions fields are also possible. Check documentation for this.
 
- */
 
- $opts['fdd']['id'] = array(
 
-   'name'     => 'ID',
 
-   'select'   => 'T',
 
-   'options'  => 'AVCPDR', // auto increment
 
-   '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', /*'crc', */
 
- 'dictionary', 'cleanReport', 'cleanTemp', /*'cleanCrc',*/
 
- 'addData', 'editData', 'deleteData');
 
- $opts['fdd']['action'] = array(
 
-   'name'     => 'Action',
 
-   'select'   => 'M',
 
-   //'maxlen'   => 32,
 
-   'sort'     => true,
 
-   'values'   => $arr
 
- );
 
- $opts['fdd']['description'] = array(
 
-   'name'     => 'Description',
 
-   'select'   => 'T',
 
-   'maxlen'   => 255,
 
-   'sort'     => true
 
- );
 
- // Now important call to phpMyEdit
 
- $moduleId = 'User.Right';
 
- $opts['options'] = getUserOptions($moduleId, $opts['options']);
 
- $opts['filters'] = getUserFilters($moduleId);
 
- require_once 'phpMyEdit.class.php';
 
- new phpMyEdit($opts);
 
- ?>
 
- </body>
 
- </html>
 
 
  |