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.175 and 1.176

version 1.175, 2006/03/19 13:30:01 version 1.176, 2006/03/19 13:34:08
Line 1683  function '.$this->js['prefix'].'filter_h
Line 1683  function '.$this->js['prefix'].'filter_h
         /*          /*
          * Display buttons at top and bottom of page           * Display buttons at top and bottom of page
          */           */
         function display_list_table_buttons($position) /* {{{ */          function display_list_table_buttons($position, $listall = false) /* {{{ */
         {          {
                 if (($but_str = $this->display_buttons($position)) === null)                  if (($but_str = $this->display_buttons($position)) === null)
                         return;                          return;
Line 1702  function '.$this->js['prefix'].'filter_h
Line 1702  function '.$this->js['prefix'].'filter_h
                         if ($listall) {                          if ($listall) {
                                 echo $this->labels['Page'],': 1 ',$this->labels['of'],' 1';                                  echo $this->labels['Page'],': 1 ',$this->labels['of'],' 1';
                         } else {                          } else {
                                 $current_page = intval($this->fm / $this->inc) + 1;                                  $current_page = intval($this->fm / $this->inc) + 1;
                                 $total_pages  = max(1, ceil($this->total_recs / abs($this->inc)));                                  $total_pages  = max(1, ceil($this->total_recs / abs($this->inc)));
                                 echo $this->labels['Page'],': ',$current_page;                                  echo $this->labels['Page'],': ',$current_page;
                                 echo ' ',$this->labels['of'],' ',$total_pages;                                  echo ' ',$this->labels['of'],' ',$total_pages;
                         }                          }
                         }                  }
                 if($this->display['num_records'])                  if($this->display['num_records'])
                         echo '  ',$this->labels['Records'],': ',$this->total_recs;                          echo '  ',$this->labels['Records'],': ',$this->total_recs;
                 if($this->display['num_pages'] || $this->display['num_records']) echo '</td>';                  if($this->display['num_pages'] || $this->display['num_records']) echo '</td>';
Line 1791  function '.$this->js['prefix'].'filter_h
Line 1791  function '.$this->js['prefix'].'filter_h
                         return $this->htmlSubmit($name.$this->page_types[$this->page_type], $value,                          return $this->htmlSubmit($name.$this->page_types[$this->page_type], $value,
                                         $this->getCSSclass($name, $position), $validation);                                          $this->getCSSclass($name, $position), $validation);
                 }                  }
                 $listall      = $this->inc <= 0; // Are we doing a listall?                  $listall = $this->inc <= 0;
                 $disabledprev = !($this->fm > 0 && !$listall);                  if ($listall) {
                           $disabledprev = true;
                           $disablednext = true;
                           $total_pages  = 1;
                           $current_page = 1;
                   } else {
                           $disabledprev = $this->fm <= 0;
                           $disablednext =  $this->fm + $this->inc >= $this->total_recs;
                           $total_pages  = max(1, ceil($this->total_recs / abs($this->inc)));
                           $current_page = ceil($this->fm / abs($this->inc)); // must + 1
                   }
                 $disabledfirst = $disabledprev;                  $disabledfirst = $disabledprev;
                 $disablednext = !($this->fm + $this->inc < $this->total_recs && ! $listall);                  $disabledlast  = $disablednext;
                 $disabledlast = $disablednext;  
                 $total_pages  = max(1, ceil($this->total_recs / abs($this->inc)));  
                 $current_page = ceil($this->fm / abs($this->inc)); // must + 1  
                 // some statistics first                  // some statistics first
                 if ($name == 'total_pages') return $total_pages;                  if ($name == 'total_pages') return $total_pages;
                 if ($name == 'current_page') return ($current_page+1);                  if ($name == 'current_page') return ($current_page+1);
Line 1814  function '.$this->js['prefix'].'filter_h
Line 1821  function '.$this->js['prefix'].'filter_h
                 if ($name == 'goto_combo') {                  if ($name == 'goto_combo') {
                         $disabledgoto = !($listall || ($disablednext && $disabledprev)) ? '' : ' disabled';                          $disabledgoto = !($listall || ($disablednext && $disabledprev)) ? '' : ' disabled';
                         if ($disablegoto != '' && $disabled < 0) return;                          if ($disablegoto != '' && $disabled < 0) return;
                         $ret = '<select'.$disabledgoto.' class="'.$this->getCSSclass('goto', $position);                          $kv_array = array();
                         $ret .= '" name="'.ltrim($disabledgoto).'navfm'.$position.'" onChange="return this.form.submit();">'."\n";  
                         for ($i = 0; $i < $total_pages; $i++) {                          for ($i = 0; $i < $total_pages; $i++) {
                                 $ret .= "\t".'<option';                                  $kv_array[$this->inc * $i] = $i + 1;
                                 $ret .= ($current_page == $i) ? ' selected' : '';  
                                 $ret .= ' value="'.$this->inc * $i.'">'.($i + 1).'</option>'."\n";  
                         }                          }
                         $ret .= '</select>';                          // TODO: add onChange="return this.form.submit();"
                         return $ret;                          return $this->htmlSelect($this->cgi['prefix']['sys'].ltrim($disabledgoto).'navfm'.$position,
                                           $this->getCSSclass('goto', $position), $kv_array, (string)$this->fm, false, $disabledgoto);
                 }                  }
                 if ($name == 'goto') {                  if ($name == 'goto') {
                         return $this->htmlSubmit('navop', 'Go to', $this->getCSSclass('goto', $position),                          return $this->htmlSubmit('navop', 'Go to', $this->getCSSclass('goto', $position),
Line 1904  function '.$this->js['prefix'].'filter_h
Line 1909  function '.$this->js['prefix'].'filter_h
                 echo $this->get_origvars_html($this->get_sfn_cgi_vars());                  echo $this->get_origvars_html($this->get_sfn_cgi_vars());
                 echo $this->htmlHiddenSys('fl', $this->fl);                  echo $this->htmlHiddenSys('fl', $this->fl);
                 // Display buttons at top and/or bottom of page.                  // Display buttons at top and/or bottom of page.
                 $this->display_list_table_buttons('up');                  $this->display_list_table_buttons('up', $listall);
                 if ($this->cgi['persist'] != '') {                  if ($this->cgi['persist'] != '') {
                         echo $this->get_origvars_html($this->cgi['persist']);                          echo $this->get_origvars_html($this->cgi['persist']);
                 }                  }
Line 2338  function '.$this->js['prefix'].'filter_h
Line 2343  function '.$this->js['prefix'].'filter_h
                         echo '</tr>',"\n";                          echo '</tr>',"\n";
                 }                  }
                 echo '</table>',"\n"; // end of table rows listing                  echo '</table>',"\n"; // end of table rows listing
                 $this->display_list_table_buttons('down');                  $this->display_list_table_buttons('down', $listall);
                 $this->form_end();                  $this->form_end();
         } /* }}} */          } /* }}} */
   
Line 3148  function '.$this->js['prefix'].'filter_h
Line 3153  function '.$this->js['prefix'].'filter_h
                 $this->sw    = $this->get_sys_cgi_var('sw');                  $this->sw    = $this->get_sys_cgi_var('sw');
                 $this->rec   = $this->get_sys_cgi_var('rec', '');                  $this->rec   = $this->get_sys_cgi_var('rec', '');
                 $this->navop = $this->get_sys_cgi_var('navop');                  $this->navop = $this->get_sys_cgi_var('navop');
 /*              if (($this->navfm = $this->get_sys_cgi_var('navfmup', $this->fm)) != $this->fm) {                  $navfmup     = intval($this->get_sys_cgi_var('navfmup'));
                         $this->navop = $this->labels['Go to'];                  $navfmdown   = intval($this->get_sys_cgi_var('navfmdown'));
                 } elseif (($this->navfm = $this->get_sys_cgi_var('navfmdown', $this->navfm)) != $this->fm) {                  $this->navfm = $navfmup != $this->fm ? $navfmup : $navfmdown;
                         $this->navop = $this->labels['Go to'];                  $this->operation = $this->get_sys_cgi_var('operation');
                 } elseif (($this->navfm = $this->get_sys_cgi_var('navfmdown', $this->navfm)) != $this->fm) {  
                         $this->navop = $this->labels['Go to'];  
                 } elseif ($this->get_sys_cgi_var('navpnup')>0 && ($this->navfm = (ceil($this->get_sys_cgi_var('navpnup', $old_page))-1)*$this->inc) != $this->fm) {  
                         $this->navop = $this->labels['Go to'];  
                 } elseif ($this->get_sys_cgi_var('navpndown')>0 && ($this->navfm = (ceil($this->get_sys_cgi_var('navpndown', $old_page))-1)*$this->inc) != $this->fm) {  
                 $this->navop = $this->labels['Go to'];  
                 }  
 */              $this->operation = $this->get_sys_cgi_var('operation');  
                 $oper_prefix_len = strlen($this->cgi['prefix']['operation']);                  $oper_prefix_len = strlen($this->cgi['prefix']['operation']);
                 if (! strncmp($this->cgi['prefix']['operation'], $this->operation, $oper_prefix_len)) {                  if (! strncmp($this->cgi['prefix']['operation'], $this->operation, $oper_prefix_len)) {
                         $this->operation = $this->labels[substr($this->operation, $oper_prefix_len)];                          $this->operation = $this->labels[substr($this->operation, $oper_prefix_len)];

Legend:
Removed from v.1.175  
changed lines
  Added in v.1.176

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