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

Rozdiely pre phpMyEdit/phpMyEdit.class.php medzi verziami 1.131 a 1.132

verzia 1.131, 2004/04/12 12:02:04 verzia 1.132, 2004/04/12 20:38:07
Riadok 19 
Riadok 19 
  * http://platon.sk/projects/phpMyEdit/   * http://platon.sk/projects/phpMyEdit/
  */   */
   
 /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.130 2004/04/04 21:02:57 nepto Exp $ */  /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.131 2004/04/12 12:02:04 nepto Exp $ */
   
 /*  This is a generic table editing program. The table and fields to be  /*  This is a generic table editing program. The table and fields to be
         edited are defined in the calling program.          edited are defined in the calling program.
Riadok 196  class phpMyEdit
Riadok 196  class phpMyEdit
         function view_enabled()   { return stristr($this->options, 'V'); }          function view_enabled()   { return stristr($this->options, 'V'); }
         function copy_enabled()   { return stristr($this->options, 'P') && $this->add_enabled(); }          function copy_enabled()   { return stristr($this->options, 'P') && $this->add_enabled(); }
         function tabs_enabled()   { return $this->display['tabs'] && count($this->tabs) > 0; }          function tabs_enabled()   { return $this->display['tabs'] && count($this->tabs) > 0; }
         function hidden($k)       { return stristr($this->fdd[$k]['input'],'H') || stristr($this->fdd[$k]['options'],'H'); }          function hidden($k)       { return stristr($this->fdd[$k]['input'],'H'); }
         function password($k)     { return stristr($this->fdd[$k]['input'],'W') || stristr($this->fdd[$k]['options'],'W'); }          function password($k)     { return stristr($this->fdd[$k]['input'],'W'); }
         function readonly($k)     { return stristr($this->fdd[$k]['input'],'R') || stristr($this->fdd[$k]['options'],'R') || $this->virtual($k);     }          function readonly($k)     { return stristr($this->fdd[$k]['input'],'R') || $this->virtual($k);     }
         function virtual($k)      { return stristr($this->fdd[$k]['input'],'V') && $this->col_has_sql($k); }          function virtual($k)      { return stristr($this->fdd[$k]['input'],'V') && $this->col_has_sql($k); }
   
         function add_operation()    { return $this->operation == $this->labels['Add']    && $this->add_enabled();    }          function add_operation()    { return $this->operation == $this->labels['Add']    && $this->add_enabled();    }
Riadok 753  function phpMyEdit_show_tab(tab_name)
Riadok 753  function phpMyEdit_show_tab(tab_name)
                         $first_required = true;                          $first_required = true;
                         for ($k = 0; $k < $this->num_fds; $k++) {                          for ($k = 0; $k < $this->num_fds; $k++) {
                                 if ($this->displayed[$k] && ! $this->readonly($k) && ! $this->hidden($k)                                  if ($this->displayed[$k] && ! $this->readonly($k) && ! $this->hidden($k)
                                                 && ($this->fdd[$k]['required'] || isset($this->fdd[$k]['js']['regexp']))) {                                                  && ($this->fdd[$k]['js']['required'] || isset($this->fdd[$k]['js']['regexp']))) {
                                         if ($first_required) {                                          if ($first_required) {
                                                 $first_required = false;                                                  $first_required = false;
                                                 echo '<script type="text/javascript"><!--',"\n";                                                  echo '<script type="text/javascript"><!--',"\n";
Riadok 784  function phpMyEdit_form_control(theForm)
Riadok 784  function phpMyEdit_form_control(theForm)
                                         } else {                                          } else {
                                                 $condition = '';                                                  $condition = '';
                                                 $multiple  = false;                                                  $multiple  = false;
                                                 if ($this->fdd[$k]['required']) {                                                  if ($this->fdd[$k]['js']['required']) {
                                                         $condition = 'phpMyEdit_trim(theForm.'.$this->fds[$k].'.value) == ""';                                                          $condition = 'phpMyEdit_trim(theForm.'.$this->fds[$k].'.value) == ""';
                                                 }                                                  }
                                                 if (isset($this->fdd[$k]['js']['regexp'])) {                                                  if (isset($this->fdd[$k]['js']['regexp'])) {
Riadok 2688  function phpMyEdit_filter_handler(theFor
Riadok 2688  function phpMyEdit_filter_handler(theFor
                 return true;                  return true;
         } /* }}} */          } /* }}} */
   
           function backward_compatibility() /* {{{ */
           {
                   foreach (array_keys($this->fdd) as $column) {
                           // move ['required'] to ['js']['required']
                           if (! isset($this->fdd[$column]['js']['required']) && isset($this->fdd[$column]['required'])) {
                                   $this->fdd[$column]['js']['required'] = $this->fdd[$column]['required'];
                           }
                           // move 'HWR' flags from ['options'] into ['input']
                           if (isset($this->fdd[$column]['options'])) {
                                   stristr($this->fdd[$column]['options'], 'H') && $this->fdd[$column]['input'] .= 'H';
                                   stristr($this->fdd[$column]['options'], 'W') && $this->fdd[$column]['input'] .= 'W';
                                   stristr($this->fdd[$column]['options'], 'R') && $this->fdd[$column]['input'] .= 'R';
                           }
                   }
           } /* }}} */
   
         /*          /*
          * Error handling function           * Error handling function
          */           */
Riadok 2775  function phpMyEdit_filter_handler(theFor
Riadok 2791  function phpMyEdit_filter_handler(theFor
                         $this->operation = $this->labels['Add']; // to force add operation                          $this->operation = $this->labels['Add']; // to force add operation
                         $this->recreate_fdd();                          $this->recreate_fdd();
                         $this->recreate_displayed();                          $this->recreate_displayed();
                           $this->backward_compatibility();
                 }                  }
                 elseif ($this->savechange == $this->labels['Save']) {                  elseif ($this->savechange == $this->labels['Save']) {
                         $this->change_enabled() && $this->do_change_record();                          $this->change_enabled() && $this->do_change_record();
Riadok 2784  function phpMyEdit_filter_handler(theFor
Riadok 2801  function phpMyEdit_filter_handler(theFor
                         $this->operation = $this->labels['Change']; // to force change operation                          $this->operation = $this->labels['Change']; // to force change operation
                         $this->recreate_fdd();                          $this->recreate_fdd();
                         $this->recreate_displayed();                          $this->recreate_displayed();
                           $this->backward_compatibility();
                 }                  }
                 elseif ($this->savedelete == $this->labels['Delete']) {                  elseif ($this->savedelete == $this->labels['Delete']) {
                         $this->delete_enabled() && $this->do_delete_record();                          $this->delete_enabled() && $this->do_delete_record();
Riadok 2946  function phpMyEdit_filter_handler(theFor
Riadok 2964  function phpMyEdit_filter_handler(theFor
                 $this->recreate_fdd();                  $this->recreate_fdd();
                 // Extract SQL Field Names and number of fields                  // Extract SQL Field Names and number of fields
                 $this->recreate_displayed();                  $this->recreate_displayed();
                   // Issue backward compatibility
                   $this->backward_compatibility();
                 // Gathering query options                  // Gathering query options
                 $this->gather_query_opts();                  $this->gather_query_opts();
                 // Call to action                  // Call to action

Legend:
Odstranené z verzie1.131  
zmenené riadky
  Pridané vo verzii1.132

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