[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 | // +-----------------------------------------------------------------------+ |
---|
[7536] | 22 | if (!defined('AUTOSIZE_PATH')) |
---|
| 23 | define( |
---|
| 24 | 'AUTOSIZE_PATH', |
---|
| 25 | PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' |
---|
| 26 | ); |
---|
[8911] | 27 | if (!defined('ROOT_URL')) |
---|
| 28 | define( 'ROOT_URL', get_root_url().'/' ); |
---|
[8940] | 29 | |
---|
| 30 | $AUTOSIZE_PATH_ABS=str_replace('\\','/',dirname(__FILE__) ); |
---|
[8911] | 31 | if (!defined('AUTOSIZE_PATH_ABS')) |
---|
| 32 | define( |
---|
[8940] | 33 | 'AUTOSIZE_PATH_ABS', $AUTOSIZE_PATH_ABS."/" |
---|
[8911] | 34 | ); |
---|
[7375] | 35 | |
---|
[8911] | 36 | |
---|
| 37 | |
---|
[7375] | 38 | class autosize_controler { |
---|
[8627] | 39 | //============================================================ |
---|
| 40 | /* |
---|
| 41 | * cl_autosize_script_1 |
---|
| 42 | */ |
---|
| 43 | static public function cl_autosize_script_1() |
---|
| 44 | { |
---|
| 45 | global $template,$user,$conf,$picture ,$page, $cl_plugin ; |
---|
| 46 | if(isset($page['body_id']) && $page['body_id'] == 'theAdminPage' ) return ; |
---|
| 47 | $ma_page=isset($page['body_id'])?$page['body_id']:"" ; |
---|
| 48 | if ($ma_page=='thePiwiShackControllerPage') return ; |
---|
[8911] | 49 | |
---|
[8957] | 50 | if (PHPWG_VERSION < 2.2 ) |
---|
| 51 | $file =AUTOSIZE_PATH_ABS.'template/header_2_1.tpl' ; |
---|
| 52 | else |
---|
| 53 | $file =AUTOSIZE_PATH_ABS.'template/header_2_2.tpl' ; |
---|
| 54 | |
---|
| 55 | $template->set_filenames(array('autosize_init_header'=> $file )); |
---|
| 56 | $template->set_filenames(array('autosize_init'=>AUTOSIZE_PATH_ABS. "template/conflit.tpl" ) ); |
---|
[8627] | 57 | $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; |
---|
| 58 | $autosize_parametres = cl_autosize_Get_Options() ; |
---|
| 59 | $theme=$user['theme']; |
---|
| 60 | $template->assign( |
---|
| 61 | array( |
---|
| 62 | 'autosize_parametres' => $autosize_parametres , |
---|
| 63 | 'cl_plugins' => $cl_plugin , |
---|
| 64 | 'cl_version' => $cl_plugin['version'] , |
---|
[8957] | 65 | 'name' => $cl_plugin['name'] , |
---|
| 66 | |
---|
[8627] | 67 | 'theme' => $theme , |
---|
| 68 | 'DEBUG' => $DEBUG , |
---|
[8911] | 69 | 'AUTOSIZE_PATH' => AUTOSIZE_PATH , |
---|
| 70 | 'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS, |
---|
[8957] | 71 | ) |
---|
[8627] | 72 | ); |
---|
[8957] | 73 | $template->concat('cl_conflit_init', $template->parse('autosize_init_header', true)); |
---|
[8627] | 74 | return $template->parse( 'autosize_init', false); |
---|
| 75 | }// function cl_autosize_script_1 |
---|
| 76 | //=========================================================== |
---|
| 77 | /* |
---|
| 78 | * cl_autosize_script_2 |
---|
| 79 | */ |
---|
| 80 | static public function cl_autosize_script_2() |
---|
| 81 | { |
---|
[8911] | 82 | global $template,$user,$conf,$picture ,$page, $cl_plugin,$known_script ; |
---|
[8627] | 83 | $my_path = dirname(__FILE__).'/'; |
---|
| 84 | $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; |
---|
| 85 | $ma_page=isset($page['body_id'])?$page['body_id']:"" ; |
---|
| 86 | $theme=$user['theme']; |
---|
| 87 | if ($ma_page=='thePiwiShackControllerPage') return ; |
---|
| 88 | |
---|
| 89 | $template->assign( |
---|
| 90 | array( |
---|
| 91 | 'cl_version' => $cl_plugin['version'] , |
---|
| 92 | 'name' => $cl_plugin['name'] , |
---|
| 93 | 'ma_page' => $ma_page, |
---|
| 94 | |
---|
| 95 | 'theme' => $theme , |
---|
| 96 | 'DEBUG' => $DEBUG , |
---|
| 97 | 'AUTOSIZE_PATH' => AUTOSIZE_PATH |
---|
| 98 | ) |
---|
| 99 | ); |
---|
| 100 | |
---|
| 101 | $autoscript="<script type='text/javascript'> |
---|
| 102 | /* cl_autosize_script_2 */ |
---|
| 103 | if (typeof (save_framework) == 'function') |
---|
| 104 | save_framework('".$ma_page."'); |
---|
| 105 | </script>"; |
---|
[8957] | 106 | |
---|
[8940] | 107 | $autoscript .="<input id='ret_autosize' type='hidden' value='' />"; |
---|
| 108 | $autoscript .="<input id='src_img_h' type='hidden' value='' />"; |
---|
| 109 | $autoscript .="<input id='src_img_w' type='hidden' value='' />"; |
---|
[9007] | 110 | $autoscript .="<input id='window_height' type='hidden' value='' />"; |
---|
| 111 | $autoscript .="<input id='window_width' type='hidden' value='' />"; |
---|
| 112 | $autoscript .='<div id="Debug6" align=center style="display:none"></div>'; |
---|
[8627] | 113 | $template->append('footer_elements',$autoscript); |
---|
| 114 | return ; |
---|
| 115 | }// function cl_autosize_script_2 |
---|
| 116 | |
---|
| 117 | //================================================================ |
---|
[7375] | 118 | /* |
---|
[8627] | 119 | * cl_autosize_admin |
---|
| 120 | */ |
---|
| 121 | static public function cl_autosize_admin($menu) |
---|
| 122 | { |
---|
| 123 | global $lang ; |
---|
| 124 | array_push($menu, array('NAME' => 'Autosize', |
---|
| 125 | 'URL' => get_admin_plugin_menu_link(AUTOSIZE_PATH . 'admin/admin_autosize.php'))); |
---|
| 126 | return $menu; |
---|
| 127 | } //function cl_autosize_admin |
---|
| 128 | |
---|
| 129 | //=============================================================== |
---|
| 130 | /* |
---|
[7375] | 131 | * |
---|
[8627] | 132 | */ |
---|
[7375] | 133 | static public function cl_autosize_affiche() |
---|
[7193] | 134 | { |
---|
[8911] | 135 | global $user, $picture, $template,$page,$known_script; |
---|
[7193] | 136 | global $content, $element_info; |
---|
| 137 | global $infos_message,$erreur_message; |
---|
| 138 | global $conf,$lang ,$user,$userdata; |
---|
| 139 | |
---|
| 140 | load_language('lang', AUTOSIZE_PATH); |
---|
| 141 | $my_path = dirname(__FILE__).'/'; |
---|
[8070] | 142 | if (isset( $page['body_id']) && $page['body_id']=='thePicturePage' ) { |
---|
| 143 | if ( isset($picture['current'])){ |
---|
[7193] | 144 | $autosize_parametres = cl_autosize_Get_Options(); |
---|
[8911] | 145 | include (AUTOSIZE_PATH."include/affiche.php"); |
---|
[8957] | 146 | |
---|
| 147 | if (PHPWG_VERSION < 2.2 ) |
---|
| 148 | $file =AUTOSIZE_PATH_ABS.'template/picture_2_1.tpl' ; |
---|
| 149 | else |
---|
| 150 | $file =AUTOSIZE_PATH_ABS.'template/picture_2_2.tpl' ; |
---|
| 151 | |
---|
[8959] | 152 | |
---|
| 153 | |
---|
| 154 | $template->set_filenames(array('autosize_content_header'=> $file )); |
---|
| 155 | |
---|
| 156 | |
---|
| 157 | if (PHPWG_VERSION < 2.2 ) |
---|
| 158 | $file =AUTOSIZE_PATH_ABS.'template/header_2_1.tpl' ; |
---|
| 159 | else |
---|
| 160 | $file =AUTOSIZE_PATH_ABS.'template/header_2_2.tpl' ; |
---|
| 161 | |
---|
| 162 | $template->set_filenames(array('autosize_content_header2'=> $file )); |
---|
| 163 | $template->concat('autosize_content', $template->parse('autosize_content_header2', true)); |
---|
| 164 | |
---|
| 165 | $template->set_filenames(array('autosize_init_header'=> $file )); |
---|
| 166 | |
---|
[8057] | 167 | if($autosize_parametres->check_icon_v == 'on'){ |
---|
| 168 | $template->assign('cl_autosize_button', |
---|
| 169 | array( 'cl_autosize_info' => 'cl_autosize_info' , |
---|
| 170 | 'cl_autosize_info_2' => 'cl_autosize_info_2' , |
---|
| 171 | 'URL' => $_SERVER['REQUEST_URI'] , |
---|
| 172 | 'ICON2' => AUTOSIZE_PATH . 'icons/button-maximize.png', |
---|
| 173 | 'ICON' => AUTOSIZE_PATH . 'icons/button-minimize.png' |
---|
| 174 | ) |
---|
[7536] | 175 | |
---|
[8627] | 176 | ); |
---|
[8057] | 177 | $template->set_filenames(array('cl_bp' => $my_path. 'template/picture.tpl')); |
---|
| 178 | $template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true)); |
---|
[7229] | 179 | } |
---|
[8057] | 180 | $template->set_filenames( |
---|
[7193] | 181 | array('autosize_content'=> $my_path.'template/autosize.tpl') |
---|
| 182 | ); |
---|
[8957] | 183 | $template->concat('autosize_content', $template->parse('autosize_content_header', true)); |
---|
[7193] | 184 | return $template->parse( 'autosize_content', false); |
---|
[8070] | 185 | } |
---|
[7375] | 186 | } |
---|
[8070] | 187 | |
---|
[7375] | 188 | } //public function cl_autosize_affiche |
---|
[8627] | 189 | //=============================================================== |
---|
| 190 | /* |
---|
[7375] | 191 | * |
---|
| 192 | */ |
---|
[7193] | 193 | static public function cl_autosize_aff_infos_plus() |
---|
| 194 | { |
---|
| 195 | global $template,$infos_message,$erreur_message, $user ; |
---|
[8627] | 196 | global $conf,$lang ; |
---|
[7669] | 197 | |
---|
[7193] | 198 | //============================================================== |
---|
| 199 | if (isset($erreur_message)) |
---|
| 200 | { |
---|
| 201 | if ($erreur_message <> "") |
---|
| 202 | { |
---|
| 203 | $erreur_message=str_replace("\n",'<br />',$erreur_message) ; |
---|
| 204 | $template->assign('errors',$erreur_message); |
---|
| 205 | $erreur_message=""; |
---|
| 206 | } |
---|
| 207 | } |
---|
| 208 | if (isset($infos_message)) |
---|
| 209 | { |
---|
| 210 | |
---|
| 211 | if ($infos_message <> "") |
---|
| 212 | { |
---|
| 213 | $infos_message=str_replace("\n",'<br />',$infos_message) ; |
---|
| 214 | $template->assign('infos',$infos_message); |
---|
| 215 | $infos_message=""; |
---|
| 216 | } |
---|
| 217 | } |
---|
| 218 | //============================================================= |
---|
| 219 | return; |
---|
| 220 | |
---|
[7375] | 221 | } // function cl_autosize_aff_infos_plus |
---|
[8627] | 222 | //=============================================================== |
---|
| 223 | /* |
---|
| 224 | * |
---|
| 225 | */ |
---|
| 226 | static public function cl_ajuste_data($content){ |
---|
| 227 | global $template,$user,$conf,$picture ; |
---|
| 228 | $my_path = realpath(AUTOSIZE_PATH .'/'); |
---|
| 229 | $userdata=$user; |
---|
| 230 | $fields = array( 'maxwidth', 'maxheight' ); |
---|
[8070] | 231 | |
---|
[8627] | 232 | $ThePicture = $template->get_template_vars('current'); |
---|
| 233 | $data = array(); |
---|
| 234 | return $content; |
---|
[7816] | 235 | |
---|
[8627] | 236 | $data['maxwidth'] = '1200'; |
---|
| 237 | $data['maxheight'] ='250'; |
---|
| 238 | $data['user_id'] = $userdata['id']; |
---|
| 239 | foreach ($fields as $field) |
---|
[7943] | 240 | { |
---|
[8627] | 241 | if (isset($_POST[$field])) |
---|
| 242 | { |
---|
| 243 | $data[$field] = $_POST[$field]; |
---|
| 244 | } |
---|
[7943] | 245 | } |
---|
[7193] | 246 | |
---|
[8627] | 247 | if($data['maxwidth'] != "" ) |
---|
| 248 | { |
---|
| 249 | $picture['current']['scaled_width']=$data['maxwidth']; |
---|
| 250 | $picture['current']['scaled_height']=$data['maxheight']; |
---|
| 251 | mass_updates(USER_INFOS_TABLE, |
---|
| 252 | array('primary' => array('user_id'), 'update' => $fields), |
---|
| 253 | array($data)); |
---|
| 254 | } |
---|
[7943] | 255 | |
---|
[8627] | 256 | return $content; |
---|
| 257 | } |
---|
[7375] | 258 | |
---|
| 259 | } // class |
---|
| 260 | |
---|
| 261 | |
---|
| 262 | /* |
---|
| 263 | * |
---|
| 264 | */ |
---|
[7193] | 265 | function cl_autosize_Get_Options() |
---|
| 266 | { |
---|
[7394] | 267 | global $conf,$autosize_parametres; |
---|
| 268 | $autosize_parametres = unserialize($conf['cl_autosize']); |
---|
| 269 | $autosize_parametres = cl_autosize_Set_Options(); |
---|
| 270 | return $autosize_parametres; |
---|
[7375] | 271 | } |
---|
| 272 | /* |
---|
| 273 | * |
---|
[7193] | 274 | */ |
---|
| 275 | function cl_autosize_Set_Options() |
---|
| 276 | { |
---|
[7394] | 277 | |
---|
[7193] | 278 | global $autosize_parametres; |
---|
| 279 | //============================================================================= |
---|
[7962] | 280 | $my_para=$autosize_parametres; |
---|
[7193] | 281 | |
---|
[7962] | 282 | $my_para->query =(isset($_POST['query'])) ? $_POST['query'] : ((isset($my_para->query )) ? $my_para->query : 'Qt' ) ; |
---|
| 283 | $my_para->type=(isset($_POST['type']))? $_POST['type']: ((isset($my_para->type)) ? $my_para->type: 'Ty') ; |
---|
[7193] | 284 | |
---|
[7962] | 285 | $my_para->webmaster_height =(isset($_POST['webmaster_height'])) ? $_POST['webmaster_height'] : ((isset($my_para->webmaster_height )) ? $my_para->webmaster_height : '100%' ) ; |
---|
[9225] | 286 | $my_para->webmaster_width=(isset($_POST['webmaster_width']))? $_POST['webmaster_width']: ((isset($my_para->webmaster_width)) ? $my_para->webmaster_width: '100%') ; |
---|
[7193] | 287 | |
---|
[9225] | 288 | $my_para->admin_height =(isset($_POST['admin_height'])) ? $_POST['admin_height'] : ((isset($my_para->admin_height )) ? $my_para->admin_height : '100%' ) ; |
---|
| 289 | $my_para->admin_width=(isset($_POST['admin_width']))? $_POST['admin_width']: ((isset($my_para->admin_width)) ? $my_para->admin_width: '100%') ; |
---|
[7193] | 290 | |
---|
[7962] | 291 | $my_para->generic_height =(isset($_POST['generic_height'])) ? $_POST['generic_height'] : ((isset($my_para->generic_height )) ? $my_para->generic_height : '100%' ) ; |
---|
[9225] | 292 | $my_para->generic_width=(isset($_POST['generic_width']))? $_POST['generic_width']: ((isset($my_para->generic_width)) ? $my_para->generic_width: '100%') ; |
---|
[7193] | 293 | |
---|
[7962] | 294 | $my_para->guest_height =(isset($_POST['guest_height'])) ? $_POST['guest_height'] : ((isset($my_para->guest_height )) ? $my_para->guest_height : '100%' ) ; |
---|
[9225] | 295 | $my_para->guest_width=(isset($_POST['guest_width']))? $_POST['guest_width']: ((isset($my_para->guest_width)) ? $my_para->guest_width: '100%') ; |
---|
[7193] | 296 | |
---|
[7962] | 297 | $my_para->normal_height =(isset($_POST['normal_height'])) ? $_POST['normal_height'] : ((isset($my_para->normal_height )) ? $my_para->normal_height : '100%' ) ; |
---|
[9225] | 298 | $my_para->normal_width=(isset($_POST['normal_width']))? $_POST['normal_width']: ((isset($my_para->normal_width)) ? $my_para->normal_width: '100%') ; |
---|
[7193] | 299 | |
---|
[7725] | 300 | |
---|
[7962] | 301 | $my_para->mini_height =(isset($_POST['mini_height'])) ? $_POST['mini_height'] : ((isset($my_para->mini_height )) ? $my_para->mini_height : '150' ) ; |
---|
| 302 | $my_para->mini_width=(isset($_POST['mini_width']))? $_POST['mini_width']: ((isset($my_para->mini_width)) ? $my_para->mini_width: '300') ; |
---|
| 303 | |
---|
| 304 | $my_para->mini_height2 =(isset($_POST['mini_height2'])) ? $_POST['mini_height2'] : ((isset($my_para->mini_height2 )) ? $my_para->mini_height2 : '150' ) ; |
---|
| 305 | $my_para->mini_width2=(isset($_POST['mini_width2']))? $_POST['mini_width2']: ((isset($my_para->mini_width2)) ? $my_para->mini_width2: '300') ; |
---|
| 306 | |
---|
| 307 | $my_para->echelle_max=(isset($_POST['echelle_max']))? $_POST['echelle_max'] : ((isset($my_para->echelle_max)) ? $my_para->echelle_max : '1.2'); |
---|
[9225] | 308 | $my_para->marge_basse=(isset($_POST['marge_basse']))? $_POST['marge_basse']: ((isset($my_para->marge_basse)) ? $my_para->marge_basse : '0'); |
---|
[7962] | 309 | $my_para->fade_in=(isset($_POST['fade_in']))? $_POST['fade_in']: ((isset($my_para->fade_in)) ? $my_para->fade_in : '200'); |
---|
| 310 | |
---|
[7193] | 311 | //=============================================================================== |
---|
| 312 | |
---|
| 313 | if ( isset($_POST['submit'] ) && $_POST['submit'] == l10n('cl_autosize_save') ) { |
---|
[7962] | 314 | $my_para->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_desc_v'] : "off" ; |
---|
| 315 | $my_para->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : "off" ; |
---|
| 316 | $my_para->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : "off" ; |
---|
[7394] | 317 | |
---|
[7962] | 318 | $my_para->webmaster_enabled = isset($_POST['webmaster_enabled']) ? $_POST['webmaster_enabled'] : "off" ; |
---|
| 319 | $my_para->admin_enabled = isset($_POST['admin_enabled']) ? $_POST['admin_enabled'] : "off" ; |
---|
| 320 | $my_para->generic_enabled = isset($_POST['generic_enabled']) ? $_POST['generic_enabled'] : "off" ; |
---|
| 321 | $my_para->guest_enabled = isset($_POST['guest_enabled']) ? $_POST['guest_enabled'] : "off" ; |
---|
| 322 | $my_para->normal_enabled = isset($_POST['normal_enabled']) ? $_POST['normal_enabled'] : "off" ; |
---|
[7394] | 323 | |
---|
[7193] | 324 | }else{ |
---|
[7962] | 325 | $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') ; |
---|
| 326 | $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') ; |
---|
| 327 | $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] | 328 | |
---|
| 329 | |
---|
[7962] | 330 | $my_para->webmaster_enabled = isset($_POST['webmaster_enabled']) ? $_POST['webmaster_enabled'] : ( ( isset($my_para->webmaster_enabled) ) ? $my_para->webmaster_enabled : 'on') ; |
---|
| 331 | $my_para->admin_enabled = isset($_POST['admin_enabled ']) ? $_POST['admin_enabled '] : ( ( isset($my_para->admin_enabled ) ) ? $my_para->admin_enabled : 'on') ; |
---|
| 332 | $my_para->generic_enabled = isset($_POST['generic_enabled']) ? $_POST['generic_enabled'] : ( ( isset($my_para->generic_enabled) ) ? $my_para->generic_enabled : 'on') ; |
---|
| 333 | $my_para->guest_enabled = isset($_POST['guest_enabled']) ? $_POST['guest_enabled'] : ( ( isset($my_para->guest_enabled) ) ? $my_para->guest_enabled : 'on') ; |
---|
| 334 | $my_para->normal_enabled = isset($_POST['normal_enabled']) ? $_POST['normal_enabled'] : ( ( isset($my_para->normal_enabled) ) ? $my_para->normal_enabled : 'on') ; |
---|
[7394] | 335 | |
---|
| 336 | |
---|
[7193] | 337 | } |
---|
[7316] | 338 | |
---|
[7962] | 339 | return $my_para; |
---|
[7193] | 340 | } |
---|
[7375] | 341 | /* |
---|
| 342 | * |
---|
[7193] | 343 | */ |
---|
| 344 | function cl_autosize_sauve_options_inf() |
---|
| 345 | { |
---|
| 346 | global $options,$infos_message,$conf,$autosize_parametres ; |
---|
| 347 | $infos_message .=l10n("cl_autosize_save_config")."<br>"; |
---|
| 348 | $autosize_parametres=cl_autosize_Set_Options(); |
---|
| 349 | |
---|
| 350 | if ( isset($autosize_parametres) ) |
---|
| 351 | { |
---|
| 352 | |
---|
| 353 | $query = ' |
---|
| 354 | UPDATE '.CONFIG_TABLE.' |
---|
| 355 | SET value="'.addslashes(serialize($autosize_parametres)).'" |
---|
| 356 | WHERE param = "cl_autosize" |
---|
| 357 | LIMIT 1'; |
---|
| 358 | pwg_query($query); |
---|
| 359 | } |
---|
| 360 | |
---|
| 361 | } |
---|
[7375] | 362 | |
---|
[8729] | 363 | function auto_memo_var($variables) |
---|
| 364 | { |
---|
| 365 | ob_start(); |
---|
| 366 | echo '<pre>'; |
---|
| 367 | print_r($variables); |
---|
| 368 | echo '</pre>'; |
---|
| 369 | $m= ob_get_contents(); |
---|
| 370 | ob_end_clean(); |
---|
| 371 | return $m; |
---|
| 372 | } |
---|
| 373 | |
---|
[7375] | 374 | |
---|
[7193] | 375 | ?> |
---|