Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, October 15, 2026

Diff for phpMyEdit/phpMyEdit.class.php between version 1.138 and 1.139

version 1.138, 2004/04/20 13:30:04 version 1.139, 2004/04/20 14:21:57
Line 19 
Line 19 
  * http://platon.sk/projects/phpMyEdit/   * http://platon.sk/projects/phpMyEdit/
  */   */
   
 /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.137 2004/04/18 17:23:34 nepto Exp $ */  /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.138 2004/04/20 13:30: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.
Line 697  class phpMyEdit
Line 697  class phpMyEdit
                 $page_name = htmlspecialchars($this->page_name);                  $page_name = htmlspecialchars($this->page_name);
                 if ($this->add_operation() || $this->change_operation() || $this->copy_operation()                  if ($this->add_operation() || $this->change_operation() || $this->copy_operation()
                                 || $this->view_operation() || $this->delete_operation()) {                                  || $this->view_operation() || $this->delete_operation()) {
                         $field_to_tab = '';                          $field_to_tab = array();
                         for ($tab = 0, $k = 0; $k < $this->num_fds; $k++) {                          for ($tab = $k = $def_selected = 0; $k < $this->num_fds; $k++) {
                                 if (isset($this->fdd[$k]['tab'])) {                                  if (isset($this->fdd[$k]['tab'])) {
                                         if ($tab == 0 && $k > 0) {                                          if ($tab == 0 && $k > 0) {
                                                 $this->tabs[0] = 'Initial TAB';                                                  $this->tabs[0] = 'PMEtab0';
                                                   $def_selected = 1;
                                                 $tab++;                                                  $tab++;
                                         }                                          }
                                         $this->tabs[$tab] = @$this->fdd[$k]['tab'];                                          $this->tabs[$tab] = @$this->fdd[$k]['tab'];
                                         $tab++;                                          $tab++;
                                 }                                  }
                                 $field_to_tab .= max(0, $tab - 1).', ';                                  $field_to_tab[$k] = max(0, $tab - 1);
                         }                          }
                         if ($this->tabs_enabled()) {                          if ($this->tabs_enabled()) {
                                 // initial TAB styles                                  // initial TAB styles
                                 echo '<style type="text/css" media="screen">',"\n";                                  echo '<style type="text/css" media="screen">',"\n";
                                 echo '  #phpMyEdit_tab0 { display: block; }',"\n";                                  for ($i = 0; $i < count($this->tabs); $i++) {
                                 for ($i = 1; $i < count($this->tabs); $i++) {                                          echo '  #phpMyEdit_tab',$i,' { display: ';
                                         echo '  #phpMyEdit_tab',$i,' { display: none;  }',"\n";                                          echo ($i <= $def_selected ? 'block' : 'none') ,'; }',"\n";
                                 }                                  }
                                 echo '</style>',"\n";                                  echo '</style>',"\n";
                                 // TAB javascripts                                  // TAB javascripts
                                 echo '<script type="text/javascript"><!--',"\n\n";                                  echo '<script type="text/javascript"><!--',"\n\n";
                                 echo 'var phpMyEdit_field_to_tab = [',$field_to_tab,'-1];',"\n";  
                                 $css_class_name1 = $this->getCSSclass('tab', $position);                                  $css_class_name1 = $this->getCSSclass('tab', $position);
                                 $css_class_name2 = $this->getCSSclass('tab-selected', $position);                                  $css_class_name2 = $this->getCSSclass('tab-selected', $position);
                                 echo 'var phpMyEdit_current_tab  = "phpMyEdit_tab0";                                  echo 'var phpMyEdit_current_tab  = "phpMyEdit_tab',$def_selected,'";
   
 function phpMyEdit_show_tab(tab_name)  function phpMyEdit_show_tab(tab_name)
 {';  {';
Line 822  function phpMyEdit_form_control(theForm)
Line 822  function phpMyEdit_form_control(theForm)
                                                 echo $this->labels['Please enter'],' ',$this->fdd[$k]['name'],'.';                                                  echo $this->labels['Please enter'],' ',$this->fdd[$k]['name'],'.';
                                         }                                          }
                                         echo '");';                                          echo '");';
                                         if ($this->tabs_enabled()) {                                          if ($this->tabs_enabled() && $field_to_tab[$k] >= $def_selected) {
                                                 echo '                                                  echo '
                 phpMyEdit_show_tab("phpMyEdit_tab"+phpMyEdit_field_to_tab['.$k.']);';                  phpMyEdit_show_tab("phpMyEdit_tab',$field_to_tab[$k],'");';
                                         }                                          }
                                         echo '                                          echo '
                 theForm.',$this->fds[$k],'.focus();                  theForm.',$this->fds[$k],'.focus();
Line 881  function phpMyEdit_filter_handler(theFor
Line 881  function phpMyEdit_filter_handler(theFor
                 }                  }
                 echo '<table class="',$this->getCSSclass('tab', $position),'">',"\n";                  echo '<table class="',$this->getCSSclass('tab', $position),'">',"\n";
                 echo '<tr class="',$this->getCSSclass('tab', $position),'">',"\n";                  echo '<tr class="',$this->getCSSclass('tab', $position),'">',"\n";
                 for ($i = 0; $i < count($this->tabs); $i++) {                  $def_selected = ($this->tabs[0] == 'PMEtab0') ? 1 : 0;
                         $css_class_name = $this->getCSSclass($i ? 'tab' : 'tab-selected', $position);                  for ($i = $def_selected; $i < count($this->tabs); $i++) {
                           $css_class_name = $this->getCSSclass($i != $def_selected ? 'tab' : 'tab-selected', $position);
                         echo '<td class="',$css_class_name,'" id="phpMyEdit_tab',$i,'_',$position,'_label">';                          echo '<td class="',$css_class_name,'" id="phpMyEdit_tab',$i,'_',$position,'_label">';
                         echo '<a class="',$css_class_name,'" id="phpMyEdit_tab',$i,'_',$position,'_link';                          echo '<a class="',$css_class_name,'" id="phpMyEdit_tab',$i,'_',$position,'_link';
                         echo '" href="javascript:phpMyEdit_show_tab(\'phpMyEdit_tab',$i,'\')">';                          echo '" href="javascript:phpMyEdit_show_tab(\'phpMyEdit_tab',$i,'\')">';

Legend:
Removed from v.1.138  
changed lines
  Added in v.1.139

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