| version 1.10, 2002/10/17 21:06:46 |
version 1.11, 2002/10/20 22:04:20 |
|
|
| * http://www.platon.sk/projects/phpMyEdit/ |
* http://www.platon.sk/projects/phpMyEdit/ |
| */ |
*/ |
| |
|
| /* $Platon: phpWebFileManager/index.php,v 1.32 2002/10/16 21:19:20 nepto Exp $ */ |
/* $Platon: phpMyEdit/phpMyEditSetup.php,v 1.10 2002/10/17 21:06:46 nepto Exp $ */ |
| |
|
| // setup.php version 3.5 27-Apr-01 |
// setup.php version 3.5 27-Apr-01 |
| // Heavily updated by Ondrej Jombik in 9-Aug-2002. |
// Heavily updated by Ondrej Jombik in 9-Aug-2002. |
|
|
| 'time' => false |
'time' => false |
| ); |
); |
| |
|
| |
// URLs - You can redefine URL for images to store images on different location |
| |
// that phpMyEdit class file. |
| |
\$opts['url'] = array( |
| |
'images' => 'images/' |
| |
); |
| |
|
| /* |
/* |
| Field definitions. Fields will be displayed left to right |
Field definitions. Fields will be displayed left to right |
| on the screen in the order in which they appear in this list. |
on the screen in the order in which they appear in this list. |
|
|
| 'type' should reflect the results of the expression, e.g. 'int' or 'string' |
'type' should reflect the results of the expression, e.g. 'int' or 'string' |
| all other options work as with other, normal columns |
all other options work as with other, normal columns |
| this kind of column is always read-only |
this kind of column is always read-only |
| |
Special note: |
| |
Note, that you can create special options for particular \$fdd array |
| |
elements, that depends on performed action. In example if you can |
| |
change name of column in list and filter action, you can define |
| |
\$fdd['column']['name|FL']. Others options works of course also well. |
| */"); |
*/"); |
| mysql_select_db($db); |
mysql_select_db($db); |
| $tb_desc = mysql_query("describe $tb"); |
$tb_desc = mysql_query("describe $tb"); |
|
|
| $fn = preg_replace('/(^| +)id( +|$)/', '\\1ID\\2', $fn); // uppercase IDs |
$fn = preg_replace('/(^| +)id( +|$)/', '\\1ID\\2', $fn); // uppercase IDs |
| $fn = ucfirst($fn); |
$fn = ucfirst($fn); |
| $row = mysql_fetch_array($tb_desc); |
$row = mysql_fetch_array($tb_desc); |
| echo_buffer('$fdd["'.$fd.'"] = array('); |
echo_buffer('$opts[\'fdd\'][\''.$fd.'\'] = array('); |
| echo_buffer(" 'name'=>'".str_replace('\'','\\\'',$fn)."',"); |
echo_buffer(" 'name'=>'".str_replace('\'','\\\'',$fn)."',"); |
| if (substr($row[1],0,3) == 'set') { |
if (substr($row[1],0,3) == 'set') { |
| echo_buffer(" 'select'=>'M',"); |
echo_buffer(" 'select'=>'M',"); |
|
|
| } |
} |
| |
|
| echo_buffer(" |
echo_buffer(" |
| \$opts['fdd'] = \$fdd; |
|
| |
|
| /* Table-level filter capability (if set, is included in the WHERE clause of any |
/* Table-level filter capability (if set, is included in the WHERE clause of any |
| generated SELECT statement; this gives you ability to wirk only with subset of |
generated SELECT statement; this gives you ability to wirk only with subset of |
| data from table) |
data from table) |