Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 14. október 2026

Rozdiely pre phpMyEdit/comprehensive/comprehensive.php medzi verziami 1.2 a 1.3

verzia 1.2, 2002/08/27 23:59:33 verzia 1.3, 2003/11/20 11:48:13
Riadok 1 
Riadok 1 
 <?php  <style type="text/css">
   table { border: #004d9c 1px solid; border-collapse: collapse; border-spacing: 0px; width: 100%; }
   th    { border: #004d9c 1px solid; padding: 4px; background: #add8e6; }
   td    { border: #004d9c 1px solid; padding: 3px; }
   hr    { border: 0px solid; padding: 0px; margin: 0px; border-top-width: 1px; height: 1px; }
   </style><?php
   
   ini_set('include_path', '../:'.ini_get('include_path'));
   
 /* Modify this array to get only particular subset from testing fields. */  /* Modify this array to get only particular subset from testing fields. */
 $used_cols = array(  $used_cols = array(
Riadok 9  $used_cols = array(
Riadok 16  $used_cols = array(
                 'bigint'    => 0,                  'bigint'    => 0,
                 'float'     => 0,                  'float'     => 0,
                 'decimal'   => 0,                  'decimal'   => 0,
                 'datetime'  => 1,                  'datetime'  => 0,
                 'timestamp' => 0,                  'timestamp' => 0,
                 'char'      => 0,                  'char'      => 0,
                 'text'      => 0,                  'text'      => 0,
                 'enum'      => 1                  'enum'      => 1
                 );                  );
   
 //   MySQL host name, user name, password, database, and table to edit  /*
 $opts["hn"]="localhost";   * IMPORTANT NOTE: This generated file contains only a subset of huge amount
 $opts["un"]="test";   * of options that can be used with phpMyEdit. To get information about all
 $opts["pw"]="test";   * features offered by phpMyEdit, check official documentation. It is available
 $opts["db"]="test";   * online and also for download on phpMyEdit project management page:
 $opts["tb"]="comprehensive";   *
    * http://www.platon.sk/projects/main_page.php?project_id=5
 //  Name of field which is the unique key   */
 $opts["key"]="xint";  
   // MySQL host name, user name, password, database, and table
 //  Type of key field (int/real/string/date etc)  $opts['hn'] = 'localhost';
 $opts["key_type"]="int";  $opts['un'] = 'test';
 // Initial field to sort on  $opts['pw'] = 'test';
 $opts["sort_field"]="";  $opts['db'] = 'test';
   $opts['tb'] = 'comprehensive';
 //   Number of records to display on the screen  
 // note that $inc = -1 lists _all_ records in a table  // Name of field which is the unique key
 $opts['inc']= 15;  $opts['key'] = 'xtinyint';
   
   // Type of key field (int/real/string/date etc.)
   $opts['key_type'] = 'int';
   
   // Sorting field(s)
   $opts['sort_field'] = array('xtinyint');
   
   // Number of records to display on the screen
   // Value of -1 lists all records in a table
   $opts['inc'] = 15;
   
 // Options you wish to give the users  // Options you wish to give the users
 // A(dd) C(hange) (co)P(y) V(iew) D(elete) F(ilter) I(nitial sort suppressed)  // A - add,  C - change, P - copy, V - view, D - delete,
 $opts['options']='ACPVDF';  // F - filter, I - initial sort suppressed
   $opts['options'] = 'ACPVDF';
   
 // Number of lines to display on multiple selection filters  // Number of lines to display on multiple selection filters
 $opts['multiple']='4';  $opts['multiple'] = '4';
   
 // Number of lines to display on multiple selection filters  // Navigation style: B - buttons (default), T - text links, G - graphic links
 #$opts['default_sort_columns'] = array('pushId','due','priority','task');  // Buttons position: U - up, D - down (default)
   $opts['navigation'] = 'DB';
   
   // Display special page elements
   $opts['display'] = array(
                   'query' => true,
                   'sort'  => true,
                   'time'  => true
                   );
   
   /* 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";
    */
   
 // action hyper'link's, 'button's, or 'graphic's  /* Field definitions
 $opts['actionStyle']='button';  
 #$opts['actionStyle']='link';  
 #$opts['actionStyle']='graphic';  
   
 $opts['display_query']=true;     Fields will be displayed left to right on the screen in the order in which they
 $opts['display_sort']=true;     appear in generated list. Here are some most used field options documented.
   
 /*  
    Field definitions. Fields will be displayed left to right  
    on the screen in the order in which they appear in this list.  
    ['name'] is the title used for column headings, etc.;     ['name'] is the title used for column headings, etc.;
    ['sort'] = true means the users may sort the display on this column;  
    ['type'] is generated by SETUP.php and indicates the mysql field type  
    best not edited  
    ['maxlen'] maximum length to display add/edit/search input boxes     ['maxlen'] maximum length to display add/edit/search input boxes
    ['trimlen'] maximum length of string content to display in row listing     ['trimlen'] maximum length of string content to display in row listing
    if strlen(value) > trimlen, display substr(,0,trimlen-3).'...'     ['width'] is an optional display width specification for the column
    ['width'] is an optional display width specification for the column,  
    e.g.  ['width'] = '100px';     e.g.  ['width'] = '100px';
    or $fdd['colname']['width'] = ($fdd['colname']['trimlen'] * 8).'px';  
    ['nowrap'] true or false.  whether this field should get a NOWRAP  
    ['mask'] a string that is used by sprintf() to format field output     ['mask'] a string that is used by sprintf() to format field output
    ['datemask'] a string that is used by date() to format date fields     ['sort'] true or false; means the users may sort the display on this column
    see PHP's date() for valid formatting characters     ['strip_tags'] true or false; whether to strip tags from content
    ['daterange'] a  of numbers     ['nowrap'] true or false; whether this field should get a NOWRAP
    ['daterange']['start'] = 1996;     ['required'] true or false; if generate javascript to prevent null entries
    ['daterange']['end']   = $fdd['colname']['daterange']['start']+20;     ['select'] T - text, N - numeric, D - drop-down, M - multiple selection
    ['URL'] is used to make a field 'clickable' in the display, e.g.:     ['options'] optional parameter to control whether a field is displayed
    ['URL'] = 'mailto:' or ['URL'] = 'http://';     L - list, F - filter, A - add, C - change, P - copy, D - delete, V - view
    ['URL'] = '$page?stuff';     Another flags are:
    Note that the following are available as variables:     R - indicates that a field is read only
    $key   key field for record     W - indicates that a field is a password field
    $name  name of the field     H - indicates that a field is to be hidden and marked as hidden
    $value value of the field     ['URL'] is used to make a field 'clickable' in the display
    $page  this HTML page     e.g.: 'mailto:$value', 'http://$value' or '$page?stuff';
    $row   mysql_fetch_assoc() for this row     ['URLtarget']  HTML target link specification (for example: _blank)
    ['required'] = true will generate javascript to prevent null entries by users     ['textarea']['rows'] and/or ['textarea']['cols']
    ['options'] is an optional parameter to control whether a field is     specifies a textarea is to be used to give multi-line input
    displayed in the A(dd), C(hange), D(elete), view, or L(ist) views  
    ['options']='R' indicates that a field is read only  
    ['options']='P' indicates that a field is a password field  
    ['options']='H' indicates that a field is to be hidden  
    and marked as hidden  
    ['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     e.g. ['textarea']['rows'] = 5; ['textarea']['cols'] = 10
    ['values'] restricts user input to the specified constants,     ['values'] restricts user input to the specified constants,
    e.g. ['values'] = array('A','B','C')     e.g. ['values'] = array('A','B','C') or ['values'] = range(1,99)
    or   ['values'] = range(1,99);     ['values']['table'] and ['values']['column'] restricts user input
    ['values']['table'] and ['values']['column'] restricts user     to the values found in the specified column of another table
    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     The optional ['values']['description'] field allows the value(s) displayed
    to the user to be different to those in the ['values']['column'] field.     to the user to be different to those in the ['values']['column'] field.
    This is useful for giving more meaning to column values.  There are two main     This is useful for giving more meaning to column values. Multiple
    options when using the ['values']['description'] field. These are whether you     descriptions fields are also possible. Check documentation for this.
    want to use a single, or multiple field in your description.  To apply single,   */
    you need to use:  
    ['values']['description'] = 'desc_column'  
    This may be used, with no other options, and will simply display the description  
    for the corresponding value.  
    For Multiple, use:  
    ['values']['description']['columns']['1'] = 'desc_column_1'  
    ['values']['description']['divs']['1']    = ' '  
    ['values']['description']['columns']['2'] = 'desc_column_2'  
    The 'div' component is what will be used as a divider between the columns  
    in the display.  You don't need to define the last 'div' field if it isn't  
    required.  So, for example...if you have a series of people in a  
    table, with a separate column for id, first name, and last name, you could  
 use:  
 ['values']['db']='mydb' *optional if table is in another database*  
 ['values']['table']='mytable'  
 ['values']['column']='id'  
 ['values']['description']['columns']['1']='last_name'  
 ['values']['description']['divs']['1']   =', '  
 ['values']['description']['columns']['2']='first_name'  
 ['values']['filters']='idcolumn in (1,2,3)' *optional WHERE clause*  
 ['values']['orderby']='last_name' *optional ORDER BY clause*  
 if a column is either SET or ENUM type, then the values are put in  
 by PME Setup.  
 ['select'] = 'T/D/M' (text, drop-down, or multiple selection for filters)  
 if a column is a SET type, then this is automatically 'M'  
 Calculated Expressions  
 example:  
 $fdd['other']['name']='Col Header';  
 $fdd['other']['expression']='onHand-ordered';  
 $fdd['other']['sort']='T:!';  
 $fdd['other']['select']='T';  
 $fdd['other']['type']='int';  
 'other' can be anything, but needs to be unique within the list of $fdd keys  
 'expression' can be any valid MySQL expression  
 'type' should reflect the results of the expression, e.g. 'int' or 'string'  
 all other options work as with other, normal columns  
 this kind of column is always read-only  
 */  
   
 /* This should be always enabled, cause it is primary key */  
 $fdd["xint"] = array(  
                 'name'=>'Xint',  
                 'select'=>'T',  
                 'type'=>'int',  
                 'maxlen'=>11,  
                 'nowrap'=>false,  
                 'required'=>true,  
                 'default'=>'0',  
                 'sort'=>true  
                 );  
   
   $opts['fdd']['xtinyint'] = array(
                   'name'     => 'Xtinyint',
                   'select'   => 'T',
                   'maxlen'   => 4,
                   'default'  => '0',
                   'sort'     => true
                   );
 if ($used_cols['tinyint']) {  if ($used_cols['tinyint']) {
           $opts['fdd']['xtinyint_u'] = array(
         $fdd["xtinyint"] = array(                          'name'     => 'Xtinyint u',
                         'name'=>'Xtinyint',                          'select'   => 'T',
                         'select'=>'T',                          'maxlen'   => 3,
                         'type'=>'int',                          'default'  => '0',
                         'maxlen'=>4,                          'sort'     => true
                         'nowrap'=>false,                          );
                         'default'=>'0',          $opts['fdd']['xtinyint_z'] = array(
                         'sort'=>true                          'name'     => 'Xtinyint z',
                         );                          'select'   => 'T',
                           'maxlen'   => 3,
         $fdd["xtinyint_u"] = array(                          'default'  => '000',
                         'name'=>'Xtinyint U',                          'sort'     => true
                         'select'=>'T',                          );
                         'type'=>'int',          $opts['fdd']['xtinyint_u_z'] = array(
                         'maxlen'=>3,                          'name'     => 'Xtinyint u z',
                         'nowrap'=>false,                          'select'   => 'T',
                         'default'=>'0',                          'maxlen'   => 3,
                         'sort'=>true                          'default'  => '000',
                         );                          'sort'     => true
   
         $fdd["xtinyint_z"] = array(  
                         'name'=>'Xtinyint Z',  
                         'select'=>'T',  
                         'type'=>'int',  
                         'maxlen'=>3,  
                         'nowrap'=>false,  
                         'default'=>'000',  
                         'sort'=>true  
                         );  
   
         $fdd["xtinyint_u_z"] = array(  
                         'name'=>'Xtinyint U Z',  
                         'select'=>'T',  
                         'type'=>'int',  
                         'maxlen'=>3,  
                         'nowrap'=>false,  
                         'default'=>'000',  
                         'sort'=>true  
                         );                          );
 }  }
   
 if ($used_cols['smallint']) {  if ($used_cols['smallint']) {
           $opts['fdd']['xsmallint'] = array(
         $fdd["xsmallint"] = array(                          'name'     => 'Xsmallint',
                         'name'=>'Xsmallint',                          'select'   => 'T',
                         'select'=>'T',                          'maxlen'   => 6,
                         'type'=>'int',                          'default'  => '0',
                         'maxlen'=>6,                          'sort'     => true
                         'nowrap'=>false,                          );
                         'default'=>'0',          $opts['fdd']['xsmallint_u'] = array(
                         'sort'=>true                          'name'     => 'Xsmallint u',
                         );                          'select'   => 'T',
                           'maxlen'   => 5,
         $fdd["xsmallint_u"] = array(                          'default'  => '0',
                         'name'=>'Xsmallint U',                          'sort'     => true
                         'select'=>'T',                          );
                         'type'=>'int',          $opts['fdd']['xsmallint_z'] = array(
                         'maxlen'=>5,                          'name'     => 'Xsmallint z',
                         'nowrap'=>false,                          'select'   => 'T',
                         'default'=>'0',                          'maxlen'   => 5,
                         'sort'=>true                          'default'  => '00000',
                         );                          'sort'     => true
                           );
         $fdd["xsmallint_z"] = array(          $opts['fdd']['xsmallint_u_z'] = array(
                         'name'=>'Xsmallint Z',                          'name'     => 'Xsmallint u z',
                         'select'=>'T',                          'select'   => 'T',
                         'type'=>'int',                          'maxlen'   => 5,
                         'maxlen'=>5,                          'default'  => '00000',
                         'nowrap'=>false,                          'sort'     => true
                         'default'=>'00000',  
                         'sort'=>true  
                         );  
   
         $fdd["xsmallint_u_z"] = array(  
                         'name'=>'Xsmallint U Z',  
                         'select'=>'T',  
                         'type'=>'int',  
                         'maxlen'=>5,  
                         'nowrap'=>false,  
                         'default'=>'00000',  
                         'sort'=>true  
                         );                          );
 }  }
   
 if ($used_cols['mediumint']) {  if ($used_cols['mediumint']) {
           $opts['fdd']['xmediumint'] = array(
         $fdd["xmediumint"] = array(                          'name'     => 'Xmediumint',
                         'name'=>'Xmediumint',                          'select'   => 'T',
                         'select'=>'T',                          'maxlen'   => 9,
                         'type'=>'int',                          'default'  => '0',
                         'maxlen'=>9,                          'sort'     => true
                         'nowrap'=>false,                          );
                         'default'=>'0',          $opts['fdd']['xmediumint_u'] = array(
                         'sort'=>true                          'name'     => 'Xmediumint u',
                         );                          'select'   => 'T',
                           'maxlen'   => 8,
         $fdd["xmediumint_u"] = array(                          'default'  => '0',
                         'name'=>'Xmediumint U',                          'sort'     => true
                         'select'=>'T',                          );
                         'type'=>'int',          $opts['fdd']['xmediumint_z'] = array(
                         'maxlen'=>8,                          'name'     => 'Xmediumint z',
                         'nowrap'=>false,                          'select'   => 'T',
                         'default'=>'0',                          'maxlen'   => 8,
                         'sort'=>true                          'default'  => '00000000',
                         );                          'sort'     => true
                           );
         $fdd["xmediumint_z"] = array(          $opts['fdd']['xmediumint_u_z'] = array(
                         'name'=>'Xmediumint Z',                          'name'     => 'Xmediumint u z',
                         'select'=>'T',                          'select'   => 'T',
                         'type'=>'int',                          'maxlen'   => 8,
                         'maxlen'=>8,                          'default'  => '00000000',
                         'nowrap'=>false,                          'sort'     => true
                         'default'=>'00000000',  
                         'sort'=>true  
                         );  
   
         $fdd["xmediumint_u_z"] = array(  
                         'name'=>'Xmediumint U Z',  
                         'select'=>'T',  
                         'type'=>'int',  
                         'maxlen'=>8,  
                         'nowrap'=>false,  
                         'default'=>'00000000',  
                         'sort'=>true  
                         );                          );
 }  }
   
 if ($used_cols['int']) {  if ($used_cols['int']) {
           $opts['fdd']['xint'] = array(
         $fdd["xint_u"] = array(                          'name'     => 'Xint',
                         'name'=>'Xint U',                          'select'   => 'T',
                         'select'=>'T',                          'maxlen'   => 11,
                         'type'=>'int',                          'default'  => '0',
                         'maxlen'=>10,                          'required' => true,
                         'nowrap'=>false,                          'sort'     => true
                         'default'=>'0',                          );
                         'sort'=>true          $opts['fdd']['xint_u'] = array(
                         );                          'name'     => 'Xint u',
                           'select'   => 'T',
         $fdd["xint_z"] = array(                          'maxlen'   => 10,
                         'name'=>'Xint Z',                          'default'  => '0',
                         'select'=>'T',                          'sort'     => true
                         'type'=>'int',                          );
                         'maxlen'=>10,          $opts['fdd']['xint_z'] = array(
                         'nowrap'=>false,                          'name'     => 'Xint z',
                         'default'=>'0000000000',                          'select'   => 'T',
                         'sort'=>true                          'maxlen'   => 10,
                         );                          'default'  => '0000000000',
                           'sort'     => true
         $fdd["xint_u_z"] = array(                          );
                         'name'=>'Xint U Z',          $opts['fdd']['xint_u_z'] = array(
                         'select'=>'T',                          'name'     => 'Xint u z',
                         'type'=>'int',                          'select'   => 'T',
                         'maxlen'=>10,                          'maxlen'   => 10,
                         'nowrap'=>false,                          'default'  => '0000000000',
                         'default'=>'0000000000',                          'sort'     => true
                         'sort'=>true                          );
                         );          $opts['fdd']['xinteger'] = array(
                           'name'     => 'Xinteger',
         $fdd["xinteger"] = array(                          'select'   => 'T',
                         'name'=>'Xinteger',                          'maxlen'   => 11,
                         'select'=>'T',                          'default'  => '0',
                         'type'=>'int',                          'sort'     => true
                         'maxlen'=>11,                          );
                         'nowrap'=>false,          $opts['fdd']['xinteger_u'] = array(
                         'default'=>'0',                          'name'     => 'Xinteger u',
                         'sort'=>true                          'select'   => 'T',
                         );                          'maxlen'   => 10,
                           'default'  => '0',
         $fdd["xinteger_u"] = array(                          'sort'     => true
                         'name'=>'Xinteger U',                          );
                         'select'=>'T',          $opts['fdd']['xinteger_z'] = array(
                         'type'=>'int',                          'name'     => 'Xinteger z',
                         'maxlen'=>10,                          'select'   => 'T',
                         'nowrap'=>false,                          'maxlen'   => 10,
                         'default'=>'0',                          'default'  => '0000000000',
                         'sort'=>true                          'sort'     => true
                         );                          );
           $opts['fdd']['xinteger_u_z'] = array(
         $fdd["xinteger_z"] = array(                          'name'     => 'Xinteger u z',
                         'name'=>'Xinteger Z',                          'select'   => 'T',
                         'select'=>'T',                          'maxlen'   => 10,
                         'type'=>'int',                          'default'  => '0000000000',
                         'maxlen'=>10,                          'sort'     => true
                         'nowrap'=>false,                          );
                         'default'=>'0000000000',  }
                         'sort'=>true  if ($used_cols['bigint']) {
                         );          $opts['fdd']['xbigint'] = array(
                           'name'     => 'Xbigint',
         $fdd["xinteger_u_z"] = array(                          'select'   => 'T',
                         'name'=>'Xinteger U Z',                          'maxlen'   => 20,
                         'select'=>'T',                          'default'  => '0',
                         'type'=>'int',                          'sort'     => true
                         'maxlen'=>10,                          );
                         'nowrap'=>false,          $opts['fdd']['xbigint_u'] = array(
                         'default'=>'0000000000',                          'name'     => 'Xbigint u',
                         'sort'=>true                          'select'   => 'T',
                           'maxlen'   => 20,
                           'default'  => '0',
                           'sort'     => true
                           );
           $opts['fdd']['xbigint_z'] = array(
                           'name'     => 'Xbigint z',
                           'select'   => 'T',
                           'maxlen'   => 20,
                           'default'  => '00000000000000000000',
                           'sort'     => true
                           );
           $opts['fdd']['xbigint_u_z'] = array(
                           'name'     => 'Xbigint u z',
                           'select'   => 'T',
                           'maxlen'   => 20,
                           'default'  => '00000000000000000000',
                           'sort'     => true
                         );                          );
 }  }
   
 if ($used_cols['int']) {  
   
         $fdd["xbigint"] = array(  
                         'name'=>'Xbigint',  
                         'select'=>'T',  
                         'type'=>'int',  
                         'maxlen'=>20,  
                         'nowrap'=>false,  
                         'default'=>'0',  
                         'sort'=>true  
                         );  
   
         $fdd["xbigint_u"] = array(  
                         'name'=>'Xbigint U',  
                         'select'=>'T',  
                         'type'=>'int',  
                         'maxlen'=>20,  
                         'nowrap'=>false,  
                         'default'=>'0',  
                         'sort'=>true  
                         );  
   
         $fdd["xbigint_z"] = array(  
                         'name'=>'Xbigint Z',  
                         'select'=>'T',  
                         'type'=>'int',  
                         'maxlen'=>20,  
                         'nowrap'=>false,  
                         'default'=>'00000000000000000000',  
                         'sort'=>true  
                         );  
   
         $fdd["xbigint_u_z"] = array(  
                         'name'=>'Xbigint U Z',  
                         'select'=>'T',  
                         'type'=>'int',  
                         'maxlen'=>20,  
                         'nowrap'=>false,  
                         'default'=>'00000000000000000000',  
                         'sort'=>true  
                         );  
 }  
   
 if ($used_cols['float']) {  if ($used_cols['float']) {
           $opts['fdd']['xfloat1'] = array(
         $fdd["xfloat1"] = array(                          'name'     => 'Xfloat1',
                         'name'=>'Xfloat1',                          'select'   => 'T',
                         'select'=>'T',                          'maxlen'   => 12,
                         'type'=>'real',                          'default'  => '0',
                         'maxlen'=>12,                          'sort'     => true
                         'nowrap'=>false,                          );
                         'default'=>'0',          $opts['fdd']['xfloat1_z'] = array(
                         'sort'=>true                          'name'     => 'Xfloat1 z',
                         );                          'select'   => 'T',
                           'maxlen'   => 12,
         $fdd["xfloat1_z"] = array(                          'default'  => '000000000000',
                         'name'=>'Xfloat1 Z',                          'sort'     => true
                         'select'=>'T',                          );
                         'type'=>'real',          $opts['fdd']['xfloat2'] = array(
                         'maxlen'=>12,                          'name'     => 'Xfloat2',
                         'nowrap'=>false,                          'select'   => 'T',
                         'default'=>'000000000000',                          'maxlen'   => 25,
                         'sort'=>true                          'default'  => '0.000000000000000000000000',
                         );                          'sort'     => true
                           );
         $fdd["xfloat2"] = array(          $opts['fdd']['xfloat2_z'] = array(
                         'name'=>'Xfloat2',                          'name'     => 'Xfloat2 z',
                         'select'=>'T',                          'select'   => 'T',
                         'type'=>'real',                          'maxlen'   => 25,
                         'maxlen'=>26,                          'default'  => '0.000000000000000000000000',
                         'nowrap'=>false,                          'sort'     => true
                         'default'=>'0.000000000000000000000000',                          );
                         'sort'=>true          $opts['fdd']['xdouble2'] = array(
                         );                          'name'     => 'Xdouble2',
                           'select'   => 'T',
         $fdd["xfloat2_z"] = array(                          'maxlen'   => 25,
                         'name'=>'Xfloat2 Z',                          'default'  => '0.000000000000000000000000',
                         'select'=>'T',                          'sort'     => true
                         'type'=>'real',                          );
                         'maxlen'=>26,          $opts['fdd']['xdouble2_z'] = array(
                         'nowrap'=>false,                          'name'     => 'Xdouble2 z',
                         'default'=>'0.000000000000000000000000',                          'select'   => 'T',
                         'sort'=>true                          'maxlen'   => 25,
                         );                          'default'  => '0.000000000000000000000000',
                           'sort'     => true
         $fdd["xdouble2"] = array(                          );
                         'name'=>'Xdouble2',          $opts['fdd']['xreal2'] = array(
                         'select'=>'T',                          'name'     => 'Xreal2',
                         'type'=>'real',                          'select'   => 'T',
                         'maxlen'=>26,                          'maxlen'   => 25,
                         'nowrap'=>false,                          'default'  => '0.000000000000000000000000',
                         'default'=>'0.000000000000000000000000',                          'sort'     => true
                         'sort'=>true                          );
                         );          $opts['fdd']['xreal2_z'] = array(
                           'name'     => 'Xreal2 z',
         $fdd["xdouble2_z"] = array(                          'select'   => 'T',
                         'name'=>'Xdouble2 Z',                          'maxlen'   => 25,
                         'select'=>'T',                          'default'  => '0.000000000000000000000000',
                         'type'=>'real',                          'sort'     => true
                         'maxlen'=>26,  
                         'nowrap'=>false,  
                         'default'=>'0.000000000000000000000000',  
                         'sort'=>true  
                         );  
   
         $fdd["xreal2"] = array(  
                         'name'=>'Xreal2',  
                         'select'=>'T',  
                         'type'=>'real',  
                         'maxlen'=>26,  
                         'nowrap'=>false,  
                         'default'=>'0.000000000000000000000000',  
                         'sort'=>true  
                         );  
   
         $fdd["xreal2_z"] = array(  
                         'name'=>'Xreal2 Z',  
                         'select'=>'T',  
                         'type'=>'real',  
                         'maxlen'=>26,  
                         'nowrap'=>false,  
                         'default'=>'0.000000000000000000000000',  
                         'sort'=>true  
                         );                          );
 }  }
   
 if ($used_cols['decimal']) {  if ($used_cols['decimal']) {
           $opts['fdd']['xdecimal2'] = array(
         $fdd["xdecimal2"] = array(                          'name'     => 'Xdecimal2',
                         'name'=>'Xdecimal2',                          'select'   => 'T',
                         'select'=>'T',                          'maxlen'   => 27,
                         'type'=>'real',                          'default'  => '0.000000000000000000000000',
                         'maxlen'=>28,                          'sort'     => true
                         'nowrap'=>false,                          );
                         'default'=>'0.000000000000000000000000',          $opts['fdd']['xdecimal2_z'] = array(
                         'sort'=>true                          'name'     => 'Xdecimal2 z',
                         );                          'select'   => 'T',
                           'maxlen'   => 26,
         $fdd["xdecimal2_z"] = array(                          'default'  => '0.000000000000000000000000',
                         'name'=>'Xdecimal2 Z',                          'sort'     => true
                         'select'=>'T',                          );
                         'type'=>'real',          $opts['fdd']['xnumeric2'] = array(
                         'maxlen'=>27,                          'name'     => 'Xnumeric2',
                         'nowrap'=>false,                          'select'   => 'T',
                         'default'=>'00.000000000000000000000000',                          'maxlen'   => 27,
                         'sort'=>true                          'default'  => '0.000000000000000000000000',
                         );                          'sort'     => true
                           );
         $fdd["xnumeric2"] = array(          $opts['fdd']['xnumeric2_z'] = array(
                         'name'=>'Xnumeric2',                          'name'     => 'Xnumeric2 z',
                         'select'=>'T',                          'select'   => 'T',
                         'type'=>'real',                          'maxlen'   => 26,
                         'maxlen'=>28,                          'default'  => '0.000000000000000000000000',
                         'nowrap'=>false,                          'sort'     => true
                         'default'=>'0.000000000000000000000000',  
                         'sort'=>true  
                         );  
   
         $fdd["xnumeric2_z"] = array(  
                         'name'=>'Xnumeric2 Z',  
                         'select'=>'T',  
                         'type'=>'real',  
                         'maxlen'=>27,  
                         'nowrap'=>false,  
                         'default'=>'00.000000000000000000000000',  
                         'sort'=>true,  
                         'mask'=>'[[ %s ]]',  
                         );                          );
 }  }
   
 if ($used_cols['datetime']) {  if ($used_cols['datetime']) {
           $opts['fdd']['xdate'] = array(
         $fdd["xdate"] = array(                          'name'     => 'Xdate',
                         'name'=>'Xdate',                          'select'   => 'T',
                         'select'=>'T',                          'maxlen'   => 10,
                         'type'=>'date',                          'sort'     => true
                         'maxlen'=>10,                          );
                         'nowrap'=>false,          $opts['fdd']['xdatetime'] = array(
                         'sort'=>true                          'name'     => 'Xdatetime',
                         );                          'select'   => 'T',
                           'maxlen'   => 19,
         $fdd["xdatetime"] = array(                          'sort'     => true
                         'name'=>'Xdatetime',                          );
                         'select'=>'T',          $opts['fdd']['xtime'] = array(
                         'type'=>'datetime',                          'name'     => 'Xtime',
                         'maxlen'=>19,                          'select'   => 'T',
                         'nowrap'=>false,                          'maxlen'   => 8,
                         'sort'=>true,                          'sort'     => true
                         //'datemask'=>'dmY',                          );
                         //'daterange'=>array('start'=>1996,'end'=>2002)          $opts['fdd']['xyear'] = array(
                         'date'=>array(                          'name'     => 'Xyear',
                                 'sequence' => 'DMY',                          'select'   => 'T',
                                 'label'=>array('month'=>'Month:'),                          'maxlen'   => 4,
                                 'format'=>'H',                          'sort'     => true
                                 'labeldivs'=>true,  
                                 'skip'=>true,  
                                 )  
                         );  
   
         $fdd["xtime"] = array(  
                         'name'=>'Xtime',  
                         'select'=>'T',  
                         'type'=>'time',  
                         'maxlen'=>8,  
                         'nowrap'=>false,  
                         'sort'=>true  
                         );  
   
         $fdd["xyear"] = array(  
                         'name'=>'Xyear',  
                         'select'=>'T',  
                         'type'=>'year',  
                         'maxlen'=>4,  
                         'nowrap'=>false,  
                         'sort'=>true  
                         );                          );
 }  }
   
 if ($used_cols['timestamp']) {  if ($used_cols['timestamp']) {
           $opts['fdd']['xtimestamp2'] = array(
         $fdd["xtimestamp2"] = array(                          'name'     => 'Xtimestamp2',
                         'name'=>'Xtimestamp2',                          'select'   => 'T',
                         'select'=>'T',                          'options'  => 'AVCPDR', // updated automatically (MySQL feature)
                         'type'=>'timestamp',                          'maxlen'   => 2,
                         'maxlen'=>2,                          'required' => true,
                         'nowrap'=>false,                          'sort'     => true
                         'required'=>true,                          );
                         'options'=>'R',          $opts['fdd']['xtimestamp4'] = array(
                         'sort'=>true                          'name'     => 'Xtimestamp4',
                         );                          'select'   => 'T',
                           'options'  => 'AVCPD',
         $fdd["xtimestamp4"] = array(                          'maxlen'   => 4,
                         'name'=>'Xtimestamp4',                          'required' => true,
                         'select'=>'T',                          'sort'     => true
                         'type'=>'timestamp',                          );
                         'maxlen'=>4,          $opts['fdd']['xtimestamp6'] = array(
                         'nowrap'=>false,                          'name'     => 'Xtimestamp6',
                         'required'=>true,                          'select'   => 'T',
                         'options'=>'R',                          'options'  => 'AVCPD',
                         'sort'=>true                          'maxlen'   => 6,
                         );                          'required' => true,
                           'sort'     => true
         $fdd["xtimestamp6"] = array(                          );
                         'name'=>'Xtimestamp6',          $opts['fdd']['xtimestamp8'] = array(
                         'select'=>'T',                          'name'     => 'Xtimestamp8',
                         'type'=>'timestamp',                          'select'   => 'T',
                         'maxlen'=>6,                          'options'  => 'AVCPD',
                         'nowrap'=>false,                          'maxlen'   => 8,
                         'required'=>true,                          'required' => true,
                         'options'=>'R',                          'sort'     => true
                         'sort'=>true                          );
                         );          $opts['fdd']['xtimestamp10'] = array(
                           'name'     => 'Xtimestamp10',
         $fdd["xtimestamp8"] = array(                          'select'   => 'T',
                         'name'=>'Xtimestamp8',                          'options'  => 'AVCPD',
                         'select'=>'T',                          'maxlen'   => 10,
                         'type'=>'timestamp',                          'required' => true,
                         'maxlen'=>8,                          'sort'     => true
                         'nowrap'=>false,                          );
                         'required'=>true,          $opts['fdd']['xtimestamp12'] = array(
                         'options'=>'R',                          'name'     => 'Xtimestamp12',
                         'sort'=>true                          'select'   => 'T',
                         );                          'options'  => 'AVCPD',
                           'maxlen'   => 12,
         $fdd["xtimestamp10"] = array(                          'required' => true,
                         'name'=>'Xtimestamp10',                          'sort'     => true
                         'select'=>'T',                          );
                         'type'=>'timestamp',          $opts['fdd']['xtimestamp14'] = array(
                         'maxlen'=>10,                          'name'     => 'Xtimestamp14',
                         'nowrap'=>false,                          'select'   => 'T',
                         'required'=>true,                          'options'  => 'AVCPD',
                         'options'=>'R',                          'maxlen'   => 14,
                         'sort'=>true                          'required' => true,
                         );                          'sort'     => true
   
         $fdd["xtimestamp12"] = array(  
                         'name'=>'Xtimestamp12',  
                         'select'=>'T',  
                         'type'=>'timestamp',  
                         'maxlen'=>12,  
                         'nowrap'=>false,  
                         'required'=>true,  
                         'options'=>'R',  
                         'sort'=>true  
                         );  
   
         $fdd["xtimestamp14"] = array(  
                         'name'=>'Xtimestamp14',  
                         'select'=>'T',  
                         'type'=>'timestamp',  
                         'maxlen'=>14,  
                         'nowrap'=>false,  
                         'required'=>true,  
                         'options'=>'R',  
                         'sort'=>true  
                         );                          );
 }  }
   
 if ($used_cols['char']) {  if ($used_cols['char']) {
           $opts['fdd']['xchar1'] = array(
         $fdd["xchar1"] = array(                          'name'     => 'Xchar1',
                         'name'=>'Xchar1',                          'select'   => 'T',
                         'select'=>'T',                          'maxlen'   => 1,
                         'type'=>'string',                          'sort'     => true
                         'maxlen'=>1,                          );
                         'nowrap'=>false,          $opts['fdd']['xchar255'] = array(
                         'sort'=>true                          'name'     => 'Xchar255',
                         );                          'select'   => 'T',
                           'maxlen'   => 255,
         $fdd["xchar255"] = array(                          'sort'     => true
                         'name'=>'Xchar255',                          );
                         'select'=>'T',          $opts['fdd']['xbit'] = array(
                         'type'=>'string',                          'name'     => 'Xbit',
                         'maxlen'=>255,                          'select'   => 'T',
                         'nowrap'=>false,                          'maxlen'   => 1,
                         'sort'=>true                          'sort'     => true
                         );                          );
           $opts['fdd']['xbool'] = array(
         $fdd["xchar"] = array(                          'name'     => 'Xbool',
                         'name'=>'Xchar',                          'select'   => 'T',
                         'select'=>'T',                          'maxlen'   => 1,
                         'type'=>'string',                          'sort'     => true
                         'maxlen'=>1,                          );
                         'nowrap'=>false,          $opts['fdd']['xchar'] = array(
                         'sort'=>true                          'name'     => 'Xchar',
                         );                          'select'   => 'T',
                           'maxlen'   => 1,
         $fdd["xvarchar1"] = array(                          'sort'     => true
                         'name'=>'Xvarchar1',                          );
                         'select'=>'T',          $opts['fdd']['xvarchar1'] = array(
                         'type'=>'string',                          'name'     => 'Xvarchar1',
                         'maxlen'=>1,                          'select'   => 'T',
                         'nowrap'=>false,                          'maxlen'   => 1,
                         'sort'=>true                          'sort'     => true
                         );                          );
           $opts['fdd']['xvarchar255'] = array(
         $fdd["xvarchar255"] = array(                          'name'     => 'Xvarchar255',
                         'name'=>'Xvarchar255',                          'select'   => 'T',
                         'select'=>'T',                          'maxlen'   => 255,
                         'type'=>'string',                          'sort'     => true
                         'maxlen'=>255,  
                         'nowrap'=>false,  
                         'sort'=>true  
                         );                          );
 }  }
   
 if ($used_cols['text']) {  if ($used_cols['text']) {
         $fdd["xtinytext"] = array(          $opts['fdd']['xtinytext'] = array(
                         'name'=>'Xtinytext',                          'name'     => 'Xtinytext',
                         'select'=>'T',                          'select'   => 'T',
                         'type'=>'blob',                          'maxlen'   => 255,
                         'maxlen'=>255,                          'textarea' => array(
                         'nowrap'=>false,                                  'rows' => 5,
                         'textarea'=>array(                                  'cols' => 50),
                                 'rows'=>5,                          'sort'     => true
                                 'cols'=>50,                          );
                                 'wrap'=>'virtual'          $opts['fdd']['xblob'] = array(
                                 ),                          'name'     => 'Xblob',
                         'sort'=>true                          'select'   => 'T',
                         );                          'maxlen'   => 65535,
                           'textarea' => array(
         $fdd["xblob"] = array(                                  'rows' => 5,
                         'name'=>'Xblob',                                  'cols' => 50),
                         'select'=>'T',                          'sort'     => true
                         'type'=>'blob',                          );
                         'maxlen'=>65535,          $opts['fdd']['xtext'] = array(
                         'nowrap'=>false,                          'name'     => 'Xtext',
                         'textarea'=>array(                          'select'   => 'T',
                                 'rows'=>5,                          'maxlen'   => 65535,
                                 'cols'=>50,                          'textarea' => array(
                                 'wrap'=>'virtual'                                  'rows' => 5,
                                 ),                                  'cols' => 50),
                         'sort'=>true                          'sort'     => true
                         );                          );
           $opts['fdd']['xmediumblob'] = array(
         $fdd["xtext"] = array(                          'name'     => 'Xmediumblob',
                         'name'=>'Xtext',                          'select'   => 'T',
                         'select'=>'T',                          'maxlen'   => 16777215,
                         'type'=>'blob',                          'textarea' => array(
                         'maxlen'=>65535,                                  'rows' => 5,
                         'nowrap'=>false,                                  'cols' => 50),
                         'textarea'=>array(                          'sort'     => true
                                 'rows'=>5,                          );
                                 'cols'=>50,          $opts['fdd']['xmediumtext'] = array(
                                 'wrap'=>'virtual'                          'name'     => 'Xmediumtext',
                                 ),                          'select'   => 'T',
                         'sort'=>true                          'maxlen'   => 16777215,
                         );                          'textarea' => array(
                                   'rows' => 5,
         $fdd["xmediumblob"] = array(                                  'cols' => 50),
                         'name'=>'Xmediumblob',                          'sort'     => true
                         'select'=>'T',                          );
                         'type'=>'blob',          $opts['fdd']['xlongblob'] = array(
                         'maxlen'=>16777215,                          'name'     => 'Xlongblob',
                         'nowrap'=>false,                          'select'   => 'T',
                         'textarea'=>array(                          'maxlen'   => 16777215,
                                 'rows'=>5,                          'textarea' => array(
                                 'cols'=>50,                                  'rows' => 5,
                                 'wrap'=>'virtual'                                  'cols' => 50),
                                 ),                          'sort'     => true
                         'sort'=>true                          );
                         );          $opts['fdd']['xlongtext'] = array(
                           'name'     => 'Xlongtext',
         $fdd["xmediumtext"] = array(                          'select'   => 'T',
                         'name'=>'Xmediumtext',                          'maxlen'   => 16777215,
                         'select'=>'T',                          'textarea' => array(
                         'type'=>'blob',                                  'rows' => 5,
                         'maxlen'=>16777215,                                  'cols' => 50),
                         'nowrap'=>false,                          'sort'     => true
                         'textarea'=>array(  
                                 'rows'=>5,  
                                 'cols'=>50,  
                                 'wrap'=>'virtual'  
                                 ),  
                         'sort'=>true  
                         );  
   
         $fdd["xlongblob"] = array(  
                         'name'=>'Xlongblob',  
                         'select'=>'T',  
                         'type'=>'blob',  
                         'maxlen'=>16777215,  
                         'nowrap'=>false,  
                         'textarea'=>array(  
                                 'rows'=>5,  
                                 'cols'=>50,  
                                 'wrap'=>'virtual'  
                                 ),  
                         'sort'=>true  
                         );  
   
         $fdd["xlongtext"] = array(  
                         'name'=>'Xlongtext',  
                         'select'=>'T',  
                         'type'=>'blob',  
                         'maxlen'=>16777215,  
                         'nowrap'=>false,  
                         'textarea'=>array(  
                                 'rows'=>5,  
                                 'cols'=>50,  
                                 'wrap'=>'virtual'  
                                 ),  
                         'sort'=>true  
                         );                          );
 }  }
   
 if ($used_cols['enum']) {  if ($used_cols['enum']) {
         $fdd["xbit"] = array(          $opts['fdd']['xenum'] = array(
                         'name'=>'Xbit',                          'name'     => 'Xenum',
                         'select'=>'T',                          'select'   => 'T',
                         'type'=>'int',                          'maxlen'   => 5,
                         'maxlen'=>1,                          'values'   => array('enum1','enum2','enum3'),
                         'nowrap'=>false,                          'sort'     => true
                         'sort'=>true                          );
                         );          $opts['fdd']['xset'] = array(
                           'name'     => 'Xset',
         $fdd["xbool"] = array(                          'select'   => 'M',
                         'name'=>'Xbool',                          'maxlen'   => 14,
                         'select'=>'T',                          'values'   => array('set0','set1','set2'),
                         'type'=>'int',                          'sort'     => true
                         'maxlen'=>1,  
                         'nowrap'=>false,  
                         'sort'=>true  
                         );  
   
   
         $fdd["xenum"] = array(  
                         'name'=>'Xenum',  
                         'select'=>'T',  
                         'type'=>'string',  
                         'maxlen'=>5,  
                         'nowrap'=>false,  
                         'values'=>array('enum1','enum2','enum3'),  
                         'sort'=>true  
                         );  
   
         $fdd["xset"] = array(  
                         'name'=>'Xset',  
                         'select'=>'M',  
                         'type'=>'set',  
                         'maxlen'=>14,  
                         'nowrap'=>false,  
                         'values'=>array('set0','set1','set2'),  
                         'sort'=>true  
                         );                          );
 }  }
   
   // Now important call to phpMyEdit
 $opts['fdd'] = $fdd;  require_once 'phpMyEdit.class.php';
   new phpMyEdit($opts);
 /*  
    table-level filter capability  
   
    if set, is included in the WHERE clause of any generated SELECT statement  
   
 example:  
 $opts['filters'] = "column1 like '%11%' AND column2<17";  
 );  
  */  
   
 /*  
    Triggers are files that are included (via require) that perform  
    actions (before or after) X (inserts, updates, or deletes).  
   
    'before' triggers are usually used to verify conditions prior to  
    executing the main operation.  
   
    'after' triggers are usually used to perform follow-on operations  
    after the main operation.  For example, to update secondary tables  
    to enforce referential integrity or to update aggregate tables.  
   
    The operation sequence is this:  before, main, after.  If any  
    operation fails, not only should the next operation(s) not be  
    executed, but the previous ones are 'rolled back' as if they  
    never happened.  If a database is not able to do this, it is  
    not 'transaction-safe'.  
   
    Triggers are risky in basic MySQL as there is no native transaction  
    support--it is not transaction-safe by default.  There are  
    transaction-safe table types in MySQL that can be conditionally built  
    (see MySQL-Max), but phpMyEdit is currently not set up to support real  
    transactions.  What that means is that if an operation fails, the  
    database may be left in an intermediate and invalid state.  
   
    The programmer must understand and accept these risks prior to using  
    the phpMyEdit triggers mechanism.  
   
    If the triggers are used, they execute within the namespace or scope  
    of the phpMyEdit class.  
   
    They _must_ return true or false to indicate success or failure.  
  */  
   
 /*  
    $opts['triggers']['insert']['before']='comprehensiveTIB.inc';  
    $opts['triggers']['insert']['after'] ='comprehensiveTIA.inc';  
    $opts['triggers']['update']['before']='comprehensiveTUB.inc';  
    $opts['triggers']['update']['after'] ='comprehensiveTUA.inc';  
    $opts['triggers']['delete']['before']='comprehensiveTDB.inc';  
    $opts['triggers']['delete']['after'] ='comprehensiveTDA.inc';  
  */  
   
 /*  
    logtable schema  
   
    CREATE TABLE changelog (  
    updated timestamp(14) NOT NULL,  
    user varchar(50) default NULL,  
    host varchar(255) NOT NULL default '',  
    operation varchar(50) default NULL,  
    tab varchar(50) default NULL,  
    rowkey varchar(255) default NULL,  
    col varchar(255) default NULL,  
    oldval blob,  
    newval blob  
    );  
   
    $opts['logtable']= 'changelog';  
  */  
   
   
 # get the user's default language and use it if possible  
 $opts['language']= $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'];  
   
 //  and now the all-important call to phpMyEdit  
 //  warning - beware of case-sensitive operating systems!  
 require_once '../phpMyEdit.class.php';  
   
 $MyForm = new phpMyEdit($opts);  
   
 ?>  ?>

Legend:
Odstranené z verzie1.2  
zmenené riadky
  Pridané vo verzii1.3

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok