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.10 and 1.11

version 1.10, 2002/09/25 18:06:20 version 1.11, 2002/09/29 03:36:53
Line 141  class phpMyEdit
Line 141  class phpMyEdit
         var $fds;       // sql field names          var $fds;       // sql field names
         var $num_fds;   // number of fields          var $num_fds;   // number of fields
   
         var $logtable;  // name of optional logtable          var $logtable;   // name of optional logtable
           var $navigation; // navigation style
   
         function myquery($qry, $line = 0) /* {{{ */          function myquery($qry, $line = 0) /* {{{ */
         {          {
Line 629  class phpMyEdit
Line 630  class phpMyEdit
         function col_is_set($k)    { return $this->fdd[$k]['type'] == 'set'; }          function col_is_set($k)    { return $this->fdd[$k]['type'] == 'set'; }
   
         /*          /*
            * functions for indicating whether navigation style is enabled
        */
   
           function nav_buttons()       { return stristr($this->navigation, 'B'); }
           function nav_text_links()    { return stristr($this->navigation, 'T'); }
           function nav_graphic_links() { return stristr($this->navigation, 'G'); }
           function nav_up()            { return stristr($this->navigation, 'U'); }
           function nav_down()          { return stristr($this->navigation, 'D'); }
   
           /*
          * functions for indicating whether operations are enabled           * functions for indicating whether operations are enabled
          */           */
   
Line 1220  return true;
Line 1231  return true;
                         echo '<input type="submit" name="operation" value="'.$this->labels['Add'].'">&nbsp;';                          echo '<input type="submit" name="operation" value="'.$this->labels['Add'].'">&nbsp;';
                 }                  }
   
                 if ($this->actionStyle == 'button') {                  if ($this->nav_buttons()) {
                         if ($this->view_enabled()) {                          if ($this->view_enabled()) {
                                 echo '<input';                                  echo '<input';
                                 if (! $total_recs) { echo ' disabled'; }                                  if (! $total_recs) { echo ' disabled'; }
Line 1391  return true;
Line 1402  return true;
                 $row = mysql_fetch_row($res);                  $row = mysql_fetch_row($res);
                 $total_recs = $row[0];                  $total_recs = $row[0];
   
                 $this->display_list_table_buttons($total_recs);                  if ($this->nav_up()) {
                 echo '<hr>'."\n";                          $this->display_list_table_buttons($total_recs);
                           echo '<hr>'."\n";
                   }
   
                 // if the filter input boxes are not displayed, we need to preserve the filter                  // if the filter input boxes are not displayed, we need to preserve the filter
                 if (!$this->fl) {                  if (!$this->fl) {
Line 1836  return true;
Line 1849  return true;
                 $first    = true;                  $first    = true;
                 $rowCount = 0;                  $rowCount = 0;
   
                 if ($this->actionStyle == 'link' || $this->actionStyle == 'graphic') {                  if ($this->nav_text_links() || $this->nav_graphic_links()) {
                         // gather query & GET options to preserve for Update/Delete links                          // gather query & GET options to preserve for Update/Delete links
                         $qstrparts = array();                          $qstrparts = array();
                         if (count($this->qo) > 0) {                          if (count($this->qo) > 0) {
Line 1888  return true;
Line 1901  return true;
                         echo '    <tr class="'.(($rowCount++%2)?'pme_tr_o':'pme_tr_e')."\">\n";                          echo '    <tr class="'.(($rowCount++%2)?'pme_tr_o':'pme_tr_e')."\">\n";
                         echo '      <td NOWRAP align=center>';                          echo '      <td NOWRAP align=center>';
                         if ($select_recs) {                          if ($select_recs) {
                                 if ($this->actionStyle == 'button') {                                  if ($this->nav_buttons()) {
                                         echo '<input type="radio" name="rec" value="'.$row[$this->key_num].'"';                                          echo '<input type="radio" name="rec" value="'.$row[$this->key_num].'"';
                                         if ($first) {                                          if ($first) {
                                                 echo ' checked';                                                  echo ' checked';
                                                 $first = false;                                                  $first = false;
                                         }                                          }
                                         echo ' />';                                          echo ' />';
                                 } elseif ($this->actionStyle == 'graphic') {                                  }
                                   if ($this->nav_graphic_links()) {
                                         if ($this->view_enabled()) {                                          if ($this->view_enabled()) {
                                                 echo '<a class="pme_a_t" href="';                                                  echo '<a class="pme_a_t" href="';
                                                 echo htmlspecialchars($this->page_name.$qviewStr);                                                  echo htmlspecialchars($this->page_name.$qviewStr);
Line 1920  return true;
Line 1934  return true;
                                                 echo '"><img src="'.$this->url['images'].'pme-delete.png"';                                                  echo '"><img src="'.$this->url['images'].'pme-delete.png"';
                                                 echo ' height=15 width=16 border=none alt="'.htmlspecialchars($this->labels['Delete']).'"></a> ';                                                  echo ' height=15 width=16 border=none alt="'.htmlspecialchars($this->labels['Delete']).'"></a> ';
                                         }                                          }
                                 } else {                                  }
                                   if ($this->nav_text_links()) {
                                           if ($this->nav_graphic_links()) {
                                                   echo '<br>';
                                           }
                                         if ($this->view_enabled())                                          if ($this->view_enabled())
                                                 echo '<a class="pme_a_t" href="'.htmlspecialchars($this->page_name.$qviewStr).'">V</a> ';                                                  echo '<a class="pme_a_t" href="'.htmlspecialchars($this->page_name.$qviewStr).'">V</a> ';
                                         if ($this->change_enabled())                                          if ($this->change_enabled())
Line 2103  return true;
Line 2121  return true;
                 echo '  </table>'."\n"; // end of table rows listing                  echo '  </table>'."\n"; // end of table rows listing
   
   
                 //display buttons at bottom of page - sparky                  if ($this->nav_down()) {
                 echo '<hr>'."\n";                          //display buttons at bottom of page - sparky
                 $this->display_list_table_buttons($total_recs);                          echo '<hr>'."\n";
                           $this->display_list_table_buttons($total_recs);
                   }
   
                 echo '</form>'."\n";                  echo '</form>'."\n";
                 //phpinfo();                  //phpinfo();
Line 2131  return true;
Line 2151  return true;
         {          {
                 $this->create_javascripts();                  $this->create_javascripts();
   
                 //sparky                  if ($this->nav_up()) {
                 //display buttons at top of page - sparky                          //display buttons at top of page - sparky
                 $this->display_record_buttons ();                          $this->display_record_buttons ();
                 echo "  <hr />\n";                          echo "  <hr />\n";
                   }
   
                 echo '<table width="100%" border="1" cellpadding="1" cellspacing="0" summary="'.$this->tb.'">'."\n";                  echo '<table width="100%" border="1" cellpadding="1" cellspacing="0" summary="'.$this->tb.'">'."\n";
                 echo '  <input type="hidden" name="rec" value="'.($this->copy_operation()?'':$this->rec).'" />'."\n";                  echo '  <input type="hidden" name="rec" value="'.($this->copy_operation()?'':$this->rec).'" />'."\n";
Line 2180  return true;
Line 2201  return true;
   
                 echo '</table>'."\n";                  echo '</table>'."\n";
   
                 //display buttons at bottom of page - sparky                  if ($this->nav_down()) {
                 echo "  <hr />\n";                          //display buttons at bottom of page - sparky
                 $this->display_record_buttons ();                          echo "  <hr />\n";
                           $this->display_record_buttons ();
                   }
   
                 echo '</form>'."\n";                  echo '</form>'."\n";
   
Line 2677  echo '<h5>'.mysql_affected_rows ().' '.$
Line 2700  echo '<h5>'.mysql_affected_rows ().' '.$
                         $this->notify = $opts['notify'];                          $this->notify = $opts['notify'];
                 }                  }
   
                 // whether to display 'Add', 'Update', 'Delete' buttons or to put                  // navigation
                 // hyperlinks next to the rows                  $this->navigation = $opts['navigation'];
                 $this->actionStyle = 'button';                  if (! $this->nav_buttons() && ! $this->nav_text_links() && ! $this->nav_graphic_links()) {
                 if (isset($opts['actionStyle']) && $opts['actionStyle'] == 'link') {                          $this->navigation .= 'B'; // buttons are default
                         $this->actionStyle = 'link';                  }
                 } elseif (isset($opts['actionStyle']) && $opts['actionStyle'] == 'graphic') {                  if (! $this->nav_up() && ! $this->nav_down()) {
                         $this->actionStyle = 'graphic';                          $this->navigation .= 'D'; // down position is default
                 }                  }
   
                 /*                  /*
                  *              Find the URL to post forms                   *              Find the URL to post forms
                  */                   */

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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