Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 24. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Multiple select and report extension problem

phpMyEdit Configuration     Multiple select and report extension problem
Odoslať novú tému   Odpovedať na tému    
 
lemmi     Založený: 23.06.2004   Príspevky: 9  
Príspevok Zaslal: 2004-07-12 17:29
Návrat hore  Odpovedať s citátom     

Using phpMyEdit.class version 1.43 (CVS) and the latest report extensions I run in some problems if I have drop-down and multiple select boxes. Both are causing a MySQL error.
After some hours debugging effort I found the possible reason for the errors in line 228 of the report class:

Kód:
282   $value      = $this->set_values($key, array('*' => '*'), null, $from_table);


must be changed in:

Kód:
282    $value      = $this->set_values($i, array('*' => '*'), null, $from_table);


Now it works perfect with drop-down but still garbage if I uses multiple select boxes. So I changed the function execute_redirect as follows:
Kód:

   function execute_redirect() /* {{{ */
   {
      global $HTTP_SERVER_VARS;
      global $HTTP_GET_VARS;
      global $HTTP_POST_VARS;
      $redirect_url = 'http://'.$HTTP_SERVER_VARS['HTTP_HOST'].$HTTP_SERVER_VARS['SCRIPT_NAME'];
      $delim = '?';
      $get_string = '';
      foreach ($HTTP_POST_VARS + $HTTP_GET_VARS as $cgi_var_name => $cgi_var_value) {  // added: 12/07/04 GL
            if (is_array($cgi_var_value)) {
               foreach ($cgi_var_value as $akey => $aval) {
                  $cgi_var_names = $cgi_var_name.'['.$akey.']='.$aval;
                  $get_string   .= $delim;
                  $get_string   .= $cgi_var_names;         
               }
            }
            else {
               $cgi_var_name == 'prepare_filter' && $cgi_var_name = 'filter';
               $get_string   .= $delim;
               $get_string   .= rawurlencode($cgi_var_name).'='.rawurlencode($cgi_var_value);
            }
         $delim == '?' && $delim = '&';
      }
      $redirect_url .= $get_string.$this->cgi['persist'];
      header('Location: '.$redirect_url);
      exit;
   } /* }}} */


Now, multiple select boxes are working fine if only one page is to display. In case of more than one page, the filter settings are lost during page transition. I have tried to make the settings persistent, but without success.

I need help !! I think it is worth to improve the script because it is really a powerful tool.

Thank you very much in advance.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov