source: extensions/Autosize/autosize.inc.php @ 12527

Last change on this file since 12527 was 12527, checked in by cljosse, 12 years ago

[extensions] Autosize fix buggs

File size: 20.3 KB
RevLine 
[7375]1<?php
2// +-----------------------------------------------------------------------+
3// | Piwigo - a PHP based picture gallery                                  |
4// | Autosize                                                              |
5// +-----------------------------------------------------------------------+
6// | Copyright(C) 2010      cljosse                                        |
7// +-----------------------------------------------------------------------+
8// | This program is free software; you can redistribute it and/or modify  |
9// | it under the terms of the GNU General Public License as published by  |
10// | the Free Software Foundation                                          |
11// |                                                                       |
12// | This program is distributed in the hope that it will be useful, but   |
13// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
14// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
15// | General Public License for more details.                              |
16// |                                                                       |
17// | You should have received a copy of the GNU General Public License     |
18// | along with this program; if not, write to the Free Software           |
19// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
20// | USA.                                                                  |
21// +-----------------------------------------------------------------------+
22class autosize_controler {
[8627]23 //============================================================
24 /*
25  *  cl_autosize_script_1
26 */
27 static public function cl_autosize_script_1()
28        {
29                global  $template,$user,$conf,$picture ,$page, $cl_plugin ;
[11429]30 
[12527]31 // header ('X-UA-Compatible: n=7')  ;
32 // header ('X-UA-Compatible: IE=Edge')  ;
[11429]33  if(isset($page['body_id']) && $page['body_id'] == 'theAdminPage' ) return ;
34
[10280]35    if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
36     
[10347]37    $ma_page=isset($page['body_id'])?$page['body_id']:"" ;
38    if ($ma_page=='thePiwiShackControllerPage') return ;
[8911]39
[8957]40
[10347]41    if (PHPWG_VERSION < 2.2 ) 
42      $file =AUTOSIZE_PATH_ABS.'template/header_2_1.tpl' ;
43    else 
44      $file =AUTOSIZE_PATH_ABS.'template/header_2_2.tpl' ;
45    $template->set_filenames(array('autosize_init_header'=> $file ));
[10845]46    $template->set_filenames(array('autosize_init'=>AUTOSIZE_PATH_ABS. "template/conflit.tpl" ) );
47//=================================================================================================
48$DEBUG_autosize = isset($_POST['cl_debug_conflit']) ? $_POST['cl_debug_conflit'] : "false" ;
49$DEBUG_autosize = isset($_GET['cl_debug_conflit']) ? $_GET['cl_debug_conflit'] : $DEBUG_autosize ;
50$DEBUG_autosize = isset($conf['cl_debug_conflit']) ? $conf['cl_debug_conflit'] : $DEBUG_autosize ; 
51//=================================================================================================
[10347]52    $autosize_parametres =       cl_autosize_Get_Options() ;                   
53    $theme=$user['theme'];
54    $template->assign(
55      array(   
56        'autosize_parametres' => $autosize_parametres ,
57        'cl_plugins' => $cl_plugin ,
58        'cl_version' => $cl_plugin['version'] ,
59        'name' => $cl_plugin['name'] ,
[10913]60        'pamoorama' =>  isset($PAMOORAMICS_PATH)?"true":"false",                                                                 
[10347]61        'theme' => $theme  ,
[10845]62        'DEBUG_autosize' =>  $DEBUG_autosize ,
[10347]63        'AUTOSIZE_PATH' => str_replace("../","",AUTOSIZE_PATH)  ,
64        'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS,
[12527]65        'Version_pwg' => PHPWG_VERSION       
[10347]66         )
67    );
[8957]68                $template->concat('cl_conflit_init', $template->parse('autosize_init_header', true));
[8627]69                return $template->parse( 'autosize_init', false);
70        }// function cl_autosize_script_1
71 //===========================================================
72 /*
[12527]73  * cl_autosize_script_2()
[8627]74 */
75 static public function cl_autosize_script_2()
76 {
[8911]77           global  $template,$user,$conf,$picture ,$page, $cl_plugin,$known_script ;
[11429]78   if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
[10280]79
[11429]80                        $AUTOSIZE_PATH = dirname(__FILE__).'/';
[10845]81//=================================================================================================
82$DEBUG_autosize = isset($_POST['cl_debug_conflit']) ? $_POST['cl_debug_conflit'] : "false" ;
83$DEBUG_autosize = isset($_GET['cl_debug_conflit']) ? $_GET['cl_debug_conflit'] : $DEBUG_autosize ;
84$DEBUG_autosize = isset($conf['cl_debug_conflit']) ? $conf['cl_debug_conflit'] : $DEBUG_autosize ; 
85//=================================================================================================
86
87
[8627]88                        $ma_page=isset($page['body_id'])?$page['body_id']:"" ;
89                        $theme=$user['theme'];
90                        if ($ma_page=='thePiwiShackControllerPage') return ;
[12527]91
92
[11961]93$img_width=isset($picture['current']['width'])?$picture['current']['width']:480;
94$img_height=isset($picture['current']['height'])?$picture['current']['height']:320;
95
96$img_scaled_width=isset($picture['current']['scaled_width'])?$picture['current']['scaled_width']:480;
97$img_scaled_height=isset($picture['current']['scaled_height'])?$picture['current']['scaled_height']:320;
[12527]98
99
100
101
[11961]102$src_img_h=isset($_POST['src_img_h'])?$_POST['src_img_h']: $img_width               ;
103$src_img_w= isset($_POST['src_img_w'])?$_POST['src_img_w']:$img_height              ;
[12527]104if(isset($_COOKIE['img_w'])){
105$src_img_w=$_COOKIE['img_w'];
106$src_img_h=$_COOKIE['img_h'];
107}
108
[11961]109$window_height= isset($_POST['window_height'])?$_POST['window_height']: $img_scaled_height ;
110$window_width= isset($_POST['window_width'])?$_POST['window_width']: $img_scaled_width    ;
111
112
113$size=array(
114            'src_img_h' => $src_img_h,
115            'src_img_w' => $src_img_w,
116            'window_height' =>$window_height,
117            'window_width' => $window_width
[12527]118
[11961]119          );
120
[8627]121                        $template->assign(
122                                        array(
123                                        'cl_version' => $cl_plugin['version'] ,
124                                        'name' => $cl_plugin['name'] ,
125                                        'ma_page' =>    $ma_page,
126                                       
127                                        'theme' => $theme  ,
[10845]128                                        'DEBUG_autosize' => $DEBUG_autosize   ,
[11961]129                                        'AUTOSIZE_PATH' => AUTOSIZE_PATH,
130          'Size' => $size
131
[8627]132                                        )
133                                                );
[12527]134
[8627]135                        $autoscript="<script type='text/javascript'>
136                        /* cl_autosize_script_2 */
137                        if (typeof (save_framework) == 'function')
[12527]138                           save_framework('".$ma_page."');     
[8627]139                        </script>";
[8957]140         
[11961]141
[8627]142                $template->append('footer_elements',$autoscript); 
143                return ; 
144 }// function cl_autosize_script_2
145
146        //================================================================
[7375]147        /*
[8627]148        * cl_autosize_admin
149        */
150        static public function cl_autosize_admin($menu)
151                {
152                global  $lang ;
153                array_push($menu, array('NAME' => 'Autosize',
154                'URL' => get_admin_plugin_menu_link(AUTOSIZE_PATH . 'admin/admin_autosize.php')));
155                return $menu;
156        } //function cl_autosize_admin
157
158    //===============================================================
159        /*
[7375]160        *
[8627]161        */     
[7375]162        static public function cl_autosize_affiche()
[7193]163        {
[8911]164                global $user, $picture, $template,$page,$known_script;
[7193]165                global $content, $element_info;   
166                global $infos_message,$erreur_message;
167                global  $conf,$lang ,$user,$userdata;
[11429]168 if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
[10845]169                load_language('plugin.lang', AUTOSIZE_PATH);
[11429]170                $AUTOSIZE_PATH = dirname(__FILE__).'/';
[8070]171                 if (isset( $page['body_id']) && $page['body_id']=='thePicturePage'  ) {
172                        if ( isset($picture['current'])){       
[7193]173                                $autosize_parametres = cl_autosize_Get_Options();
[8911]174                                include (AUTOSIZE_PATH."include/affiche.php"); 
[8957]175
176       if (PHPWG_VERSION < 2.2 ) 
177                $file =AUTOSIZE_PATH_ABS.'template/picture_2_1.tpl' ;
178        else 
179                $file =AUTOSIZE_PATH_ABS.'template/picture_2_2.tpl' ;
180
[8959]181
182
183        $template->set_filenames(array('autosize_content_header'=> $file )); 
[10913]184        $template->concat('autosize_content', $template->parse('autosize_content_header', true));   
[8959]185                       
186        $template->set_filenames(array('autosize_init_header'=> $file ));
187                                       
[8057]188                                if($autosize_parametres->check_icon_v == 'on'){                         
189                                                $template->assign('cl_autosize_button', 
190                                                array(  'cl_autosize_info' => 'cl_autosize_info' ,
[12527]191            'cl_autosize_info_1' => 'cl_autosize_info_' , 
[10845]192                                                                    'cl_autosize_info_2' => 'cl_autosize_info_2' ,   
193                                                                    'URL' => $_SERVER['REQUEST_URI'] ,
194                                                                    'ICON2' => AUTOSIZE_PATH . 'icons/button-maximize.png',
195                                                                    'ICON' => AUTOSIZE_PATH . 'icons/button-minimize.png'
[8057]196                                                                )
[7536]197
[8627]198                                                        ); 
[11429]199                                        $template->set_filenames(array('cl_bp' => $AUTOSIZE_PATH. 'template/picture.tpl'));
[8057]200                                        $template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true));
[7229]201                                }
[8057]202                                 $template->set_filenames(
[11429]203                                                array('autosize_content'=> $AUTOSIZE_PATH.'template/autosize.tpl')
[7193]204                                        );
[11442]205                        $template->concat('autosize_content', $template->parse('autosize_content_header', true));               
206      if(isset($conf['go_up_down']) && ($conf['go_up_down']==true) ){
207        $template->set_filenames(array('mes_script' => realpath(AUTOSIZE_PATH).'/template/mes_scripts.tpl') );
208        $template->func_combine_script(array('id'=>'my_script_2',
209        'path'=> AUTOSIZE_PATH.'/js/JScript.js',
210        'require' => 'jquery'),
211        $template->smarty);
212        $template->assign(array( 
213                          'MY_FOOTER_PATH' =>AUTOSIZE_PATH
214                          ));
215                                       
216        $template->parse('mes_script');
217      }     
218       
219       
220       
221        return $template->parse( 'autosize_content', false);
[8070]222                                  }
[7375]223                }
[8070]224
[7375]225        } //public function cl_autosize_affiche
[8627]226        //===============================================================
227                /*
[7375]228        *
229        */
[7193]230        static public function cl_autosize_aff_infos_plus()
231                {
232                 global $template,$infos_message,$erreur_message, $user ;
[8627]233                 global  $conf,$lang ;
[7669]234       
[7193]235                 //==============================================================
236                  if (isset($erreur_message))
237                                {       
238                                if ($erreur_message <> "")
239                                        {
240                                                $erreur_message=str_replace("\n",'<br />',$erreur_message) ;
241                                                $template->assign('errors',$erreur_message);
242                                                $erreur_message="";
243                                        }
244                                }
245                  if (isset($infos_message))
246                                {       
247               
248                                if ($infos_message <> "")
249                                        {
250                                                $infos_message=str_replace("\n",'<br />',$infos_message) ;
251                                                $template->assign('infos',$infos_message);
252                                                $infos_message="";
253                                        }
254                                }
255                                //=============================================================
256                return;         
257               
[7375]258                } // function cl_autosize_aff_infos_plus
[8627]259        //===============================================================
260        /*
261         *
262        */
263        static public function cl_ajuste_data($content){
264                global  $template,$user,$conf,$picture ;
[11961]265      global $size;
[11429]266                $AUTOSIZE_PATH = realpath(AUTOSIZE_PATH .'/');
[8627]267                $userdata=$user;
268                $fields = array( 'maxwidth', 'maxheight' );
[8070]269         
[8627]270                $ThePicture = $template->get_template_vars('current'); 
271                $data = array();
272         return $content;
[7816]273
[11961]274                $data['maxwidth'] = $size['src_img_w'];
275                $data['maxheight'] =$size['src_img_h'];
[8627]276                $data['user_id'] = $userdata['id'];
277                foreach ($fields as $field)
[7943]278                {
[8627]279                        if (isset($_POST[$field]))
280                        {
281                                $data[$field] = $_POST[$field];
282                        }
[7943]283                }
[7193]284       
[8627]285                if($data['maxwidth'] != "" )
286                        {
287                        $picture['current']['scaled_width']=$data['maxwidth'];
288                        $picture['current']['scaled_height']=$data['maxheight'];
289                        mass_updates(USER_INFOS_TABLE,
290                                        array('primary' => array('user_id'), 'update' => $fields),
291                                        array($data)); 
292                        }
[7943]293                 
[8627]294                        return $content;                                                                                 
295                 }
[7375]296
[11961]297
298/****************************************
299*
300****************************************/
301function Get_Options(&$parametres,$str_index){
302    global $conf ;
303    $m_options=  $conf[$str_index];
304     if(isset($m_options))
305       if ( preg_match("|s:(.*)|", $m_options, $val) )
306        $parametres =  unserialize($conf[$str_index]);
307       else{
308         $parametres=explode(",",$_options);
309        }     
310        //====== par defaut =======================
311         $new_val=false;
312         $def_para=Array();
313
314    $def_para['query'] = 'Qt'  ;
315    $def_para['type'] = 'Ty' ;
316    $def_para['webmaster_height'] = '100%' ;
317    $def_para['webmaster_width'] = '100%' ;
318    $def_para['admin_height'] = '100%'  ;
319    $def_para['admin_width'] =  '100%' ;
320    $def_para['generic_height'] = '100%'  ;
321    $def_para['generic_width'] =  '100%' ;
322
323    $def_para['guest_height'] = '100%'  ;
324    $def_para['guest_width'] =  '100%' ;
325
326    $def_para['normal_height']  =  '100%'  ;
327    $def_para['normal_width'] =  '100%' ;
328
329
330    $def_para['mini_height'] =  '150' ;
331    $def_para['mini_width'] = '300' ;
332
333    $def_para['mini_height2'] =  '150' ;
334    $def_para['mini_width2'] =   '300' ;
335
336    $def_para['echelle_max'] =  '1.0'; 
337    $def_para['marge_basse'] =  '0';
338    $def_para['fade_in'] =   '0';
339    //==================================================
340    $def_para['check_desc_v'] =  "off" ;
341    $def_para['check_icon_v'] =  "off" ;
342    $def_para['check_auto_w'] =   "off" ;
343    $def_para['webmaster_enabled'] =   "off" ;
344    $def_para['admin_enabled'] =   "off" ;
345    $def_para['generic_enabled'] =   "off" ;
346    $def_para['guest_enabled'] =   "off" ;
347    $def_para['normal_enabled'] =   "off" ;
348    //===================================================
349   $para=$def_para;   
350    foreach ($para as $key => $value) {   
351      if( isset($parametres->$key) ){
352         $value=$parametres->$key;         
353      } 
354    if($def_para[$key] =="on" ||$def_para[$key] =="off" ){
355       $val_pg=(isset($_POST[$key]))? ($_POST[$key]=="off"||$_POST[$key]=="on")?$_POST[$key]:"on" : "off" ;
356       $value =(isset($_POST[$key]))? $val_pg : $value ; 
357       $val_pg=(isset($_GET[$key]))? ($_GET[$key]=="off"||$_GET[$key]=="on")?$_GET[$key]:"on" : "off" ;
358       $value =(isset($_GET[$key]))? $val_pg  : $value ; 
359     }else{
360        $value =(isset($_POST[$key]))? $_POST[$key] : $value ; 
361        $value =(isset($_GET[$key]))? $_GET[$key] : $value ; 
362      }
363        unset( $parametres->$key) ;
364        $parametres->$key = $value ;           
365     }   
366    return $parametres ;
367  }
[7375]368} // class
369
[11961]370/*************************************
[7375]371        *
[11961]372 *************************************/
[7193]373 function cl_autosize_Get_Options()
374  {
[7394]375                global $conf,$autosize_parametres; 
376                $autosize_parametres =  unserialize($conf['cl_autosize']);
[11961]377      // $autosize_parametres = autosize_controler::Get_Options($autosize_parametres,'cl_autosize');
[7394]378                $autosize_parametres =  cl_autosize_Set_Options();
379                return $autosize_parametres;
[7375]380  }
381        /*
382        *
[7193]383        */
[11961]384function cl_autosize_Set_Options() {
[7193]385  global $autosize_parametres;
386//=============================================================================
[7962]387$my_para=$autosize_parametres;
[7193]388
[11961]389
[7962]390$my_para->query =(isset($_POST['query'])) ? $_POST['query'] : ((isset($my_para->query )) ? $my_para->query : 'Qt' ) ;
391$my_para->type=(isset($_POST['type']))? $_POST['type']: ((isset($my_para->type)) ? $my_para->type:  'Ty') ;
[7193]392
[7962]393$my_para->webmaster_height =(isset($_POST['webmaster_height'])) ? $_POST['webmaster_height'] : ((isset($my_para->webmaster_height )) ? $my_para->webmaster_height : '100%' ) ;
[9225]394$my_para->webmaster_width=(isset($_POST['webmaster_width']))? $_POST['webmaster_width']: ((isset($my_para->webmaster_width)) ? $my_para->webmaster_width:  '100%') ;
[7193]395
[9225]396$my_para->admin_height =(isset($_POST['admin_height'])) ? $_POST['admin_height'] : ((isset($my_para->admin_height )) ? $my_para->admin_height : '100%' ) ;
397$my_para->admin_width=(isset($_POST['admin_width']))? $_POST['admin_width']: ((isset($my_para->admin_width)) ? $my_para->admin_width:  '100%') ;
[7193]398
[7962]399$my_para->generic_height =(isset($_POST['generic_height'])) ? $_POST['generic_height'] : ((isset($my_para->generic_height )) ? $my_para->generic_height : '100%' ) ;
[9225]400$my_para->generic_width=(isset($_POST['generic_width']))? $_POST['generic_width']: ((isset($my_para->generic_width)) ? $my_para->generic_width:  '100%') ;
[7193]401
[7962]402$my_para->guest_height =(isset($_POST['guest_height'])) ? $_POST['guest_height'] : ((isset($my_para->guest_height )) ? $my_para->guest_height : '100%' ) ;
[9225]403$my_para->guest_width=(isset($_POST['guest_width']))? $_POST['guest_width']: ((isset($my_para->guest_width)) ? $my_para->guest_width:  '100%') ;
[7193]404
[7962]405$my_para->normal_height =(isset($_POST['normal_height'])) ? $_POST['normal_height'] : ((isset($my_para->normal_height )) ? $my_para->normal_height : '100%' ) ;
[9225]406$my_para->normal_width=(isset($_POST['normal_width']))? $_POST['normal_width']: ((isset($my_para->normal_width)) ? $my_para->normal_width:  '100%') ;
[7193]407
[7725]408
[7962]409$my_para->mini_height =(isset($_POST['mini_height'])) ? $_POST['mini_height'] : ((isset($my_para->mini_height )) ? $my_para->mini_height : '150' ) ;
410$my_para->mini_width=(isset($_POST['mini_width']))? $_POST['mini_width']: ((isset($my_para->mini_width)) ? $my_para->mini_width:  '300') ;
411
412$my_para->mini_height2 =(isset($_POST['mini_height2'])) ? $_POST['mini_height2'] : ((isset($my_para->mini_height2 )) ? $my_para->mini_height2 : '150' ) ;
413$my_para->mini_width2=(isset($_POST['mini_width2']))? $_POST['mini_width2']: ((isset($my_para->mini_width2)) ? $my_para->mini_width2:  '300') ;
414
[9473]415$my_para->echelle_max=(isset($_POST['echelle_max']))? $_POST['echelle_max'] : ((isset($my_para->echelle_max)) ? $my_para->echelle_max :  '1.0'); 
[9225]416$my_para->marge_basse=(isset($_POST['marge_basse']))? $_POST['marge_basse']: ((isset($my_para->marge_basse)) ? $my_para->marge_basse :  '0');
[9473]417$my_para->fade_in=(isset($_POST['fade_in']))? $_POST['fade_in']: ((isset($my_para->fade_in)) ? $my_para->fade_in :  '0');
[7962]418
[7193]419//===============================================================================       
420
421if ( isset($_POST['submit'] ) && $_POST['submit'] == l10n('cl_autosize_save') )  { 
[7962]422                $my_para->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_desc_v'] : "off" ;
423                $my_para->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : "off" ;
424                $my_para->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : "off" ;
[7394]425
[7962]426                $my_para->webmaster_enabled = isset($_POST['webmaster_enabled']) ? $_POST['webmaster_enabled'] : "off" ;
427                $my_para->admin_enabled = isset($_POST['admin_enabled']) ? $_POST['admin_enabled'] : "off" ;
428                $my_para->generic_enabled = isset($_POST['generic_enabled']) ? $_POST['generic_enabled'] : "off" ;
429                $my_para->guest_enabled = isset($_POST['guest_enabled']) ? $_POST['guest_enabled'] : "off" ;
430                $my_para->normal_enabled = isset($_POST['normal_enabled']) ? $_POST['normal_enabled'] : "off" ;
[7394]431
[7193]432         }else{
[7962]433                $my_para->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_desc_v'] : ( ( isset($my_para->check_desc_v) ) ? $my_para->check_desc_v :   'off') ; 
434                $my_para->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : ( ( isset($my_para->check_icon_v) ) ? $my_para->check_icon_v :   'off') ; 
435                $my_para->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : ( ( isset($my_para->check_auto_w) ) ? $my_para->check_auto_w :   'off') ; 
[7394]436
437
[7962]438$my_para->webmaster_enabled = isset($_POST['webmaster_enabled']) ? $_POST['webmaster_enabled'] : ( ( isset($my_para->webmaster_enabled) ) ? $my_para->webmaster_enabled :   'on') ; 
439$my_para->admin_enabled  = isset($_POST['admin_enabled ']) ? $_POST['admin_enabled '] : ( ( isset($my_para->admin_enabled ) ) ? $my_para->admin_enabled :   'on') ; 
440$my_para->generic_enabled = isset($_POST['generic_enabled']) ? $_POST['generic_enabled'] : ( ( isset($my_para->generic_enabled) ) ? $my_para->generic_enabled :   'on') ; 
441$my_para->guest_enabled = isset($_POST['guest_enabled']) ? $_POST['guest_enabled'] : ( ( isset($my_para->guest_enabled) ) ? $my_para->guest_enabled :   'on') ;
442$my_para->normal_enabled = isset($_POST['normal_enabled']) ? $_POST['normal_enabled'] : ( ( isset($my_para->normal_enabled) ) ? $my_para->normal_enabled :   'on') ; 
[7394]443
444
[7193]445   }
[7316]446
[7962]447return $my_para;
[7193]448}
[7375]449        /*
450        *
[7193]451        */
452function cl_autosize_sauve_options_inf()
453{
454global $options,$infos_message,$conf,$autosize_parametres  ;
455$infos_message .=l10n("cl_autosize_save_config")."<br>";
456 $autosize_parametres=cl_autosize_Set_Options();
457
458 if ( isset($autosize_parametres) )
459        {
460 
461                $query = '
462                UPDATE '.CONFIG_TABLE.'
463                SET value="'.addslashes(serialize($autosize_parametres)).'"
464                WHERE param = "cl_autosize"
465                LIMIT 1';
466                        pwg_query($query);
467          }
468         
469 }
[7375]470
[8729]471 function auto_memo_var($variables)
472{
473  ob_start();
474  echo '<pre>';
475  print_r($variables);
476  echo '</pre>';
477  $m= ob_get_contents();
478  ob_end_clean();
479  return $m;           
480}
481   
[7375]482
[7193]483?>
Note: See TracBrowser for help on using the repository browser.