Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, April 20, 2024

Diff for phpMyEdit/phpMyEdit.class.php between version 1.87 and 1.88

version 1.87, 2003/07/24 12:45:28 version 1.88, 2003/07/25 20:18:08
Line 19 
Line 19 
  * http://www.platon.sk/projects/phpMyEdit/   * http://www.platon.sk/projects/phpMyEdit/
  */   */
   
 /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.86 2003/07/24 10:49:00 nepto Exp $ */  /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.87 2003/07/24 12:45:28 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.
Line 869  function phpMyEdit_form_control(theForm)
Line 869  function phpMyEdit_form_control(theForm)
                                 echo '<div id="phpMyEdit_tab',$tab,'">',"\n";                                  echo '<div id="phpMyEdit_tab',$tab,'">',"\n";
                                 echo '<table class="',$this->getCSSclass('main'),'" summary="',$this->tb,'">',"\n";                                  echo '<table class="',$this->getCSSclass('main'),'" summary="',$this->tb,'">',"\n";
                         }                          }
                         if ($this->hidden($k)) {                          if (! $this->displayed[$k]) {
                                 echo $this->htmlHidden($this->fds[$k], $row["qf$k"]);  
                                 continue;                                  continue;
                         }                          }
                         if (! $this->displayed[$k]) {                          if ($this->hidden($k)) {
                                   echo $this->htmlHidden($this->fds[$k], $row["qf$k"]);
                                 continue;                                  continue;
                         }                          }
                         $css_postfix    = @$this->fdd[$k]['css']['postfix'];                          $css_postfix    = @$this->fdd[$k]['css']['postfix'];
Line 953  function phpMyEdit_form_control(theForm)
Line 953  function phpMyEdit_form_control(theForm)
                                 echo '<div id="phpMyEdit_tab',$tab,'">',"\n";                                  echo '<div id="phpMyEdit_tab',$tab,'">',"\n";
                                 echo '<table class="',$this->getCSSclass('main'),'" summary="',$this->tb,'">',"\n";                                  echo '<table class="',$this->getCSSclass('main'),'" summary="',$this->tb,'">',"\n";
                         }                          }
                           if (! $this->displayed[$k]) {
                                   continue;
                           }
                         if ($this->copy_operation() || $this->change_operation()) {                          if ($this->copy_operation() || $this->change_operation()) {
                                 if ($this->hidden($k)) {                                  if ($this->hidden($k)) {
                                         if ($k != $this->key_num) {                                          if ($k != $this->key_num) {
Line 960  function phpMyEdit_form_control(theForm)
Line 963  function phpMyEdit_form_control(theForm)
                                         }                                          }
                                         continue;                                          continue;
                                 }                                  }
                                 if (! $this->displayed[$k]) {  
                                         continue;  
                                 }  
                                 $css_postfix = @$this->fdd[$k]['css']['postfix'];                                  $css_postfix = @$this->fdd[$k]['css']['postfix'];
                                 echo '<tr class="',$this->getCSSclass('row', null, 'next', $css_postfix),'">',"\n";                                  echo '<tr class="',$this->getCSSclass('row', null, 'next', $css_postfix),'">',"\n";
                                 echo '<td class="',$this->getCSSclass('key', null, true, $css_postfix),'">',$this->fdd[$k]['name'],'</td>',"\n";                                  echo '<td class="',$this->getCSSclass('key', null, true, $css_postfix),'">',$this->fdd[$k]['name'],'</td>',"\n";
Line 984  function phpMyEdit_form_control(theForm)
Line 984  function phpMyEdit_form_control(theForm)
                                 }                                  }
                                 echo '</tr>',"\n";                                  echo '</tr>',"\n";
                         } elseif ($this->delete_operation() || $this->view_operation()) {                          } elseif ($this->delete_operation() || $this->view_operation()) {
                                 if (! $this->displayed[$k]) {  
                                         continue;  
                                 }  
                                 $css_postfix = @$this->fdd[$k]['css']['postfix'];                                  $css_postfix = @$this->fdd[$k]['css']['postfix'];
                                 echo '<tr class="',$this->getCSSclass('row', null, 'next', $css_postfix),'">',"\n";                                  echo '<tr class="',$this->getCSSclass('row', null, 'next', $css_postfix),'">',"\n";
                                 echo '<td class="',$this->getCSSclass('key', null, true, $css_postfix),'">',$this->fdd[$k]['name'],'</td>',"\n";                                  echo '<td class="',$this->getCSSclass('key', null, true, $css_postfix),'">',$this->fdd[$k]['name'],'</td>',"\n";
Line 1722  function phpMyEdit_form_control(theForm)
Line 1719  function phpMyEdit_form_control(theForm)
                                 $css_class_name = $this->getCSSclass('header', null, null, $css_postfix);                                  $css_class_name = $this->getCSSclass('header', null, null, $css_postfix);
                                 $fdn = $this->fdd[$fd]['name'];                                  $fdn = $this->fdd[$fd]['name'];
                                 $w   = isset($this->fdd[$fd]['width']) ? ' width="'.$this->fdd[$fd]['width'].'"' : '';                                  $w   = isset($this->fdd[$fd]['width']) ? ' width="'.$this->fdd[$fd]['width'].'"' : '';
                                 if (! $this->fdd[$fd]['sort'] || $this->hidden($fd) || $this->password($fd)) {                                  if (! $this->fdd[$fd]['sort'] || $this->password($fd)) {
                                         echo '<th',$w,' class="',$css_class_name,'">',$fdn,'</th>',"\n";                                          echo '<th',$w,' class="',$css_class_name,'">',$fdn,'</th>',"\n";
                                 } else {                                  } else {
                                         // Clicking on the current sort field reverses the sort order                                          // Clicking on the current sort field reverses the sort order
Line 1862  function phpMyEdit_form_control(theForm)
Line 1859  function phpMyEdit_form_control(theForm)
                                         $widthStyle = isset($this->fdd[$fd]['width'])                                          $widthStyle = isset($this->fdd[$fd]['width'])
                                                 ? ' STYLE=\'width: "'.(6*$this->fdd[$fd]['width']).'px"\'' : '';                                                  ? ' STYLE=\'width: "'.(6*$this->fdd[$fd]['width']).'px"\'' : '';
                                         echo '<td',$widthStyle,' class="',$css_class_name,'">';                                          echo '<td',$widthStyle,' class="',$css_class_name,'">';
                                         if ($this->password($k) || $this->hidden($k)) {                                          if ($this->password($k)) {
                                                 echo '&nbsp;';                                                  echo '&nbsp;';
                                         } else if ($this->fdd[$fd]['select'] == 'D' || $this->fdd[$fd]['select'] == 'M') {                                          } else if ($this->fdd[$fd]['select'] == 'D' || $this->fdd[$fd]['select'] == 'M') {
                                                 // Multiple fields processing                                                  // Multiple fields processing
Line 2062  function phpMyEdit_form_control(theForm)
Line 2059  function phpMyEdit_form_control(theForm)
                                 }                                  }
                                 $css_postfix    = @$this->fdd[$k]['css']['postfix'];                                  $css_postfix    = @$this->fdd[$k]['css']['postfix'];
                                 $css_class_name = $this->getCSSclass('cell', null, true, $css_postfix);                                  $css_class_name = $this->getCSSclass('cell', null, true, $css_postfix);
                                 if ($this->hidden($k) || $this->password($k)) {                                  if ($this->password($k)) {
                                         echo '<td class="',$css_class_name,'">',$this->labels['hidden'],'</td>',"\n";                                          echo '<td class="',$css_class_name,'">',$this->labels['hidden'],'</td>',"\n";
                                         continue;                                          continue;
                                 }                                  }
Line 2532  function phpMyEdit_form_control(theForm)
Line 2529  function phpMyEdit_form_control(theForm)
                 foreach ($this->sfn as $key => $val) {                  foreach ($this->sfn as $key => $val) {
                         if (preg_match('/^[-]?\d*$/', $val)) { // skipping numeric keys                          if (preg_match('/^[-]?\d*$/', $val)) { // skipping numeric keys
                                 $val = abs($val);                                  $val = abs($val);
                                 if (in_array($val, $check_ar) || $this->hidden($val) || $this->password($val)) {                                  if (in_array($val, $check_ar) || $this->password($val)) {
                                         unset($this->sfn[$key]);                                          unset($this->sfn[$key]);
                                 } else {                                  } else {
                                         $check_ar[] = $val;                                          $check_ar[] = $val;
Line 2545  function phpMyEdit_form_control(theForm)
Line 2542  function phpMyEdit_form_control(theForm)
                         } else {                          } else {
                                 $minus = '';                                  $minus = '';
                         }                          }
                         if (($val = array_search($val, $this->fds)) === false                          if (($val = array_search($val, $this->fds)) === false || $this->password($val)) {
                                         || $this->hidden($val) || $this->password($val)) {  
                                 unset($this->sfn[$key]);                                  unset($this->sfn[$key]);
                         } else {                          } else {
                                 $val = intval($val);                                  $val = intval($val);

Legend:
Removed from v.1.87  
changed lines
  Added in v.1.88

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top