source: trunk/admin/configuration.php @ 140

Last change on this file since 140 was 140, checked in by z0rglub, 21 years ago

Header modify to comply with the other

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 38.1 KB
Line 
1<?
2/***************************************************************************
3 *                             configuration.php                           *
4 *                            -------------------                          *
5 *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
6 *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
7 *                                                                         *
8 *   $Id: configuration.php 140 2003-09-20 11:06:08Z z0rglub $
9 *                                                                         *
10 ***************************************************************************/
11
12/***************************************************************************
13 *                                                                         *
14 *   This program is free software; you can redistribute it and/or modify  *
15 *   it under the terms of the GNU General Public License as published by  *
16 *   the Free Software Foundation;                                         *
17 *                                                                         *
18 ***************************************************************************/
19
20include_once( './include/isadmin.inc.php' );
21       
22$Caracs = array("¥" => "Y", "µ" => "u", "À" => "A", "Á" => "A", 
23                "Â" => "A", "Ã" => "A", "Ä" => "A", "Å" => "A", 
24                "Æ" => "A", "Ç" => "C", "È" => "E", "É" => "E", 
25                "Ê" => "E", "Ë" => "E", "Ì" => "I", "Í" => "I", 
26                "Î" => "I", "Ï" => "I", "Ð" => "D", "Ñ" => "N", 
27                "Ò" => "O", "Ó" => "O", "Ô" => "O", "Õ" => "O", 
28                "Ö" => "O", "Ø" => "O", "Ù" => "U", "Ú" => "U", 
29                "Û" => "U", "Ü" => "U", "Ý" => "Y", "ß" => "s", 
30                "à" => "a", "á" => "a", "â" => "a", "ã" => "a", 
31                "ä" => "a", "å" => "a", "æ" => "a", "ç" => "c", 
32                "è" => "e", "é" => "e", "ê" => "e", "ë" => "e", 
33                "ì" => "i", "í" => "i", "î" => "i", "ï" => "i", 
34                "ð" => "o", "ñ" => "n", "ò" => "o", "ó" => "o", 
35                "ô" => "o", "õ" => "o", "ö" => "o", "ø" => "o", 
36                "ù" => "u", "ú" => "u", "û" => "u", "ü" => "u", 
37                "ý" => "y", "ÿ" => "y");
38//------------------------------ verification and registration of modifications
39$conf_infos =
40array( 'prefix_thumbnail','webmaster','mail_webmaster','access',
41       'session_id_size','session_time','session_keyword','max_user_listbox',
42       'show_comments','nb_comment_page','upload_available',
43       'upload_maxfilesize', 'upload_maxwidth','upload_maxheight',
44       'upload_maxwidth_thumbnail','upload_maxheight_thumbnail','log',
45       'comments_validation','comments_forall','authorize_cookies',
46       'mail_notification' );
47$default_user_infos =
48array( 'nb_image_line','nb_line_page','language','maxwidth',
49       'maxheight','expand','show_nb_comments','short_period','long_period',
50       'template' );
51$error = array();
52if ( isset( $_POST['submit'] ) )
53{
54  $int_pattern = '/^\d+$/';
55  // empty session table if asked
56  if ( $_POST['empty_session_table'] == 1 )
57  {
58    $query = 'DELETE FROM '.PREFIX_TABLE.'sessions';
59    $query.= ' WHERE expiration < '.time().';';
60    mysql_query( $query );
61  }
62  // deletion of site as asked
63  $query = 'SELECT id';
64  $query.= ' FROM '.PREFIX_TABLE.'sites';
65  $query.= " WHERE galleries_url <> './galleries/';";
66  $result = mysql_query( $query );
67  while ( $row = mysql_fetch_array( $result ) )
68  {
69    $site = 'delete_site_'.$row['id'];
70    if ( $_POST[$site] == 1 )
71    {
72      delete_site( $row['id'] );
73      // if any picture of this site were linked to another categories, we
74      // have to update the informations of those categories. To make it
75      // simple, we just update all the categories
76      update_category( 'all' );
77    }
78  }
79  // thumbnail prefix must not contain accentuated characters
80  $old_prefix = $_POST['prefix_thumbnail'];
81  $prefix = strtr( $_POST['prefix_thumbnail'], $Caracs );
82  if ( $old_prefix != $prefix )
83  {
84    array_push( $error, $lang['conf_err_prefixe'] );
85  }
86  // mail must be formatted as follows : name@server.com
87  $pattern = '/^[\w-]+(\.[\w-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/';
88  if ( !preg_match( $pattern, $_POST['mail_webmaster'] ) )
89  {
90    array_push( $error, $lang['conf_err_mail'] );
91  }
92  // periods must be integer values, they represents number of days
93  if ( !preg_match( $int_pattern, $_POST['short_period'] )
94       or !preg_match( $int_pattern, $_POST['long_period'] ) )
95  {
96    array_push( $error, $lang['err_periods'] );
97  }
98  else
99  {
100    // long period must be longer than short period
101    if ( $_POST['long_period'] <= $_POST['short_period']
102         or $_POST['short_period'] <= 0 )
103    {
104      array_push( $error, $lang['err_periods_2'] );
105    }
106  }
107  // session_id size must be an integer between 4 and 50
108  if ( !preg_match( $int_pattern, $_POST['session_id_size'] )
109       or $_POST['session_id_size'] < 4
110       or $_POST['session_id_size'] > 50 )
111  {
112    array_push( $error, $lang['conf_err_sid_size'] );
113  }
114  // session_time must be an integer between 5 and 60, in minutes
115  if ( !preg_match( $int_pattern, $_POST['session_time'] )
116       or $_POST['session_time'] < 5
117       or $_POST['session_time'] > 60 )
118  {
119    array_push( $error, $lang['conf_err_sid_time'] );
120  }
121  // max_user_listbox must be an integer between 0 and 255 included
122  if ( !preg_match( $int_pattern, $_POST['max_user_listbox'] )
123       or $_POST['max_user_listbox'] < 0
124       or $_POST['max_user_listbox'] > 255 )
125  {
126    array_push( $error, $lang['conf_err_max_user_listbox'] );
127  }
128  // the number of comments per page must be an integer between 5 and 50
129  // included
130  if ( !preg_match( $int_pattern, $_POST['nb_comment_page'] )
131       or $_POST['nb_comment_page'] < 5
132       or $_POST['nb_comment_page'] > 50 )
133  {
134    array_push( $error, $lang['conf_err_comment_number'] );
135  }
136  // the maximum upload filesize must be an integer between 10 and 1000
137  if ( !preg_match( $int_pattern, $_POST['upload_maxfilesize'] )
138       or $_POST['upload_maxfilesize'] < 10
139       or $_POST['upload_maxfilesize'] > 1000 )
140  {
141    array_push( $error, $lang['conf_err_upload_maxfilesize'] );
142  }
143  // the maximum width of uploaded pictures must be an integer superior to
144  // 10
145  if ( !preg_match( $int_pattern, $_POST['upload_maxwidth'] )
146       or $_POST['upload_maxwidth'] < 10 )
147  {
148    array_push( $error, $lang['conf_err_upload_maxwidth'] );
149  }
150  // the maximum height  of uploaded pictures must be an integer superior to
151  // 10
152  if ( !preg_match( $int_pattern, $_POST['upload_maxheight'] )
153       or $_POST['upload_maxheight'] < 10 )
154  {
155    array_push( $error, $lang['conf_err_upload_maxheight'] );
156  }
157  // the maximum width of uploaded thumbnails must be an integer superior to
158  // 10
159  if ( !preg_match( $int_pattern, $_POST['upload_maxwidth_thumbnail'] )
160       or $_POST['upload_maxwidth_thumbnail'] < 10 )
161  {
162    array_push( $error, $lang['conf_err_upload_maxwidth_thumbnail'] );
163  }
164  // the maximum width of uploaded thumbnails must be an integer superior to
165  // 10
166  if ( !preg_match( $int_pattern, $_POST['upload_maxheight_thumbnail'] )
167       or $_POST['upload_maxheight_thumbnail'] < 10 )
168  {
169    array_push( $error, $lang['conf_err_upload_maxheight_thumbnail'] );
170  }
171
172  if ( $_POST['maxwidth'] != ''
173       and ( !preg_match( $int_pattern, $_POST['maxwidth'] )
174             or $_POST['maxwidth'] < 50 ) )
175  {
176    array_push( $error, $lang['err_maxwidth'] );
177  }
178  if ( $_POST['maxheight']
179       and ( !preg_match( $int_pattern, $_POST['maxheight'] )
180             or $_POST['maxheight'] < 50 ) )
181  {
182    array_push( $error, $lang['err_maxheight'] );
183  }
184  // updating configuraiton if no error found
185  if ( count( $error ) == 0 )
186  {
187    mysql_query( 'DELETE FROM '.PREFIX_TABLE.'config;' );
188    $query = 'INSERT INTO '.PREFIX_TABLE.'config';
189    $query.= ' (';
190    foreach ( $conf_infos as $i => $conf_info ) {
191      if ( $i > 0 ) $query.= ',';
192      $query.= $conf_info;
193    }
194    $query.= ')';
195    $query.= ' VALUES';
196    $query.= ' (';
197    foreach ( $conf_infos as $i => $conf_info ) {
198      if ( $i > 0 ) $query.= ',';
199      if ( $_POST[$conf_info] == '' ) $query.= 'NULL';
200      else                            $query.= "'".$_POST[$conf_info]."'";
201    }
202    $query.= ')';
203    $query.= ';';
204    mysql_query( $query );
205
206    $query = 'UPDATE '.PREFIX_TABLE.'users';
207    $query.= ' SET';
208    foreach ( $default_user_infos as $i => $default_user_info ) {
209      if ( $i > 0 ) $query.= ',';
210      else          $query.= ' ';
211      $query.= $default_user_info;
212      $query.= ' = ';
213      if ( $_POST[$default_user_info] == '' )
214      {
215        $query.= 'NULL';
216      }
217      else
218      {
219        $query.= "'".$_POST[$default_user_info]."'";
220      }
221    }
222    $query.= " WHERE username = 'guest'";
223    $query.= ';';
224    mysql_query( $query );
225  }
226//--------------------------------------------------------- data initialization
227  foreach ( $conf_infos as $conf_info ) {
228    $$conf_info = $_POST[$conf_info];
229  }
230  foreach ( $default_user_infos as $default_user_info ) {
231    $$default_user_info = $_POST[$default_user_info];
232  }
233}
234else
235{
236//--------------------------------------------------------- data initialization
237  $query  = 'SELECT';
238  foreach ( $conf_infos as $i => $conf_info ) {
239    if ( $i > 0 ) $query.= ',';
240    else          $query.= ' ';
241    $query.= $conf_info;
242  }
243  $query .= ' FROM '.PREFIX_TABLE.'config;';
244  $row = mysql_fetch_array( mysql_query( $query ) );
245  foreach ( $conf_infos as $conf_info ) {
246    $$conf_info = $row[$conf_info];
247  }
248
249  $query  = 'SELECT';
250  foreach ( $default_user_infos as $i => $default_user_info ) {
251    if ( $i > 0 ) $query.= ',';
252    else          $query.= ' ';
253    $query.= $default_user_info;
254  }
255  $query.= ' FROM '.PREFIX_TABLE.'users';
256  $query.= " WHERE username = 'guest'";
257  $query.= ';';
258  $row = mysql_fetch_array( mysql_query( $query ) );
259  foreach ( $default_user_infos as $default_user_info ) {
260    $$default_user_info = $row[$default_user_info];
261  }
262}
263//----------------------------------------------------- template initialization
264$sub = $vtp->Open(
265  '../template/'.$user['template'].'/admin/configuration.vtp' );
266
267$tpl = array( 'conf_confirmation','remote_site','delete',
268              'conf_remote_site_delete_info','submit','errors_title' );
269templatize_array( $tpl, 'lang', $sub );
270//-------------------------------------------------------------- errors display
271if ( sizeof( $error ) != 0 )
272{
273  $vtp->addSession( $sub, 'errors' );
274  for ( $i = 0; $i < sizeof( $error ); $i++ )
275  {
276    $vtp->addSession( $sub, 'li' );
277    $vtp->setVar( $sub, 'li.li', $error[$i] );
278    $vtp->closeSession( $sub, 'li' );
279  }
280  $vtp->closeSession( $sub, 'errors' );
281}
282//-------------------------------------------------------- confirmation display
283if ( count( $error ) == 0 and isset( $_POST['submit'] ) )
284{
285  $vtp->addSession( $sub, 'confirmation' );
286  $vtp->closeSession( $sub, 'confirmation' );
287}
288//----------------------------------------------------------------- form action
289$form_action = add_session_id( './admin.php?page=configuration' );
290$vtp->setVar( $sub, 'form_action', $form_action );
291//------------------------------------------------------- general configuration
292$vtp->addSession( $sub, 'line' );
293$vtp->addSession( $sub, 'title_line' );
294$vtp->setVar( $sub, 'title_line.title', $lang['conf_general_title'] );
295$vtp->closeSession( $sub, 'title_line' );
296$vtp->closeSession( $sub, 'line' );
297
298$vtp->addSession( $sub, 'line' );
299$vtp->addSession( $sub, 'space_line' );
300$vtp->closeSession( $sub, 'space_line' );
301$vtp->closeSession( $sub, 'line' );
302// webmaster name
303$vtp->addSession( $sub, 'line' );
304$vtp->addSession( $sub, 'param_line' );
305$vtp->setVar( $sub, 'param_line.name', $lang['conf_general_webmaster'] );
306$vtp->addSession( $sub, 'hidden' );
307$vtp->setVar( $sub, 'hidden.text', $webmaster );
308$vtp->setVar( $sub, 'hidden.name', 'webmaster' );
309$vtp->setVar( $sub, 'hidden.value', $webmaster );
310$vtp->closeSession( $sub, 'hidden' );
311$vtp->setVar( $sub, 'param_line.def', $lang['conf_general_webmaster_info'] );
312$vtp->closeSession( $sub, 'param_line' );
313$vtp->closeSession( $sub, 'line' );
314// webmaster mail address
315$vtp->addSession( $sub, 'line' );
316$vtp->addSession( $sub, 'param_line' );
317$vtp->setVar( $sub, 'param_line.name', $lang['conf_general_mail'] );
318$vtp->addSession( $sub, 'text' );
319$vtp->setVar( $sub, 'text.name', 'mail_webmaster' );
320$vtp->setVar( $sub, 'text.value', $mail_webmaster );
321$vtp->closeSession( $sub, 'text' );
322$vtp->setVar( $sub, 'param_line.def', $lang['conf_general_mail_info'] );
323$vtp->closeSession( $sub, 'param_line' );
324$vtp->closeSession( $sub, 'line' );
325// prefix for thumbnails
326$vtp->addSession( $sub, 'line' );
327$vtp->addSession( $sub, 'param_line' );
328$vtp->setVar( $sub, 'param_line.name', $lang['conf_general_prefix'] );
329$vtp->addSession( $sub, 'text' );
330$vtp->setVar( $sub, 'text.name', 'prefix_thumbnail' );
331$vtp->setVar( $sub, 'text.value', $prefix_thumbnail );
332$vtp->closeSession( $sub, 'text' );
333$vtp->setVar( $sub, 'param_line.def', $lang['conf_general_prefix_info'] );
334$vtp->closeSession( $sub, 'param_line' );
335$vtp->closeSession( $sub, 'line' );
336// access type
337$vtp->addSession( $sub, 'line' );
338$vtp->addSession( $sub, 'param_line' );
339$vtp->setVar( $sub, 'param_line.name', $lang['conf_general_access'] );
340$vtp->addSession( $sub, 'group' );
341$vtp->addSession( $sub, 'radio' );
342$vtp->setVar( $sub, 'radio.name', 'access' );
343$vtp->setVar( $sub, 'radio.value', 'free' );
344$vtp->setVar( $sub, 'radio.option', $lang['conf_general_access_1'] );
345$checked = '';
346if ( $access == 'free' )
347{
348  $checked = ' checked="checked"';
349}
350$vtp->setVar( $sub, 'radio.checked', $checked );
351$vtp->closeSession( $sub, 'radio' );
352$vtp->addSession( $sub, 'radio' );
353$vtp->setVar( $sub, 'radio.name', 'access' );
354$vtp->setVar( $sub, 'radio.value', 'restricted' );
355$vtp->setVar( $sub, 'radio.option', $lang['conf_general_access_2'] );
356$checked = '';
357if ( $access == 'restricted' )
358{
359  $checked = ' checked="checked"';
360}
361$vtp->setVar( $sub, 'radio.checked', $checked );
362$vtp->closeSession( $sub, 'radio' );
363$vtp->closeSession( $sub, 'group' );
364$vtp->setVar( $sub, 'param_line.def', $lang['conf_general_access_info'] );
365$vtp->closeSession( $sub, 'param_line' );
366$vtp->closeSession( $sub, 'line' );
367// maximum user number to display in the listbox of identification page
368$vtp->addSession( $sub, 'line' );
369$vtp->addSession( $sub, 'param_line' );
370$vtp->setVar( $sub, 'param_line.name',
371              $lang['conf_general_max_user_listbox'] );
372$vtp->addSession( $sub, 'text' );
373$vtp->setVar( $sub, 'text.name', 'max_user_listbox' );
374$vtp->setVar( $sub, 'text.value', $max_user_listbox );
375$vtp->closeSession( $sub, 'text' );
376$vtp->setVar( $sub, 'param_line.def',
377              $lang['conf_general_max_user_listbox_info'] );
378$vtp->closeSession( $sub, 'param_line' );
379$vtp->closeSession( $sub, 'line' );
380// activate log
381$vtp->addSession( $sub, 'line' );
382$vtp->addSession( $sub, 'param_line' );
383$vtp->setVar( $sub, 'param_line.name', $lang['conf_general_log'] );
384$vtp->addSession( $sub, 'group' );
385$vtp->addSession( $sub, 'radio' );
386$vtp->setVar( $sub, 'radio.name', 'log' );
387$vtp->setVar( $sub, 'radio.value', 'true' );
388$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
389$checked = '';
390if ( $log == 'true' )
391{
392  $checked = ' checked="checked"';
393}
394$vtp->setVar( $sub, 'radio.checked', $checked );
395$vtp->closeSession( $sub, 'radio' );
396$vtp->addSession( $sub, 'radio' );
397$vtp->setVar( $sub, 'radio.name', 'log' );
398$vtp->setVar( $sub, 'radio.value', 'false' );
399$vtp->setVar( $sub, 'radio.option', $lang['no'] );
400$checked = '';
401if ( $log == 'false' )
402{
403  $checked = ' checked="checked"';
404}
405$vtp->setVar( $sub, 'radio.checked', $checked );
406$vtp->closeSession( $sub, 'radio' );
407$vtp->closeSession( $sub, 'group' );
408$vtp->setVar( $sub, 'param_line.def',
409              $lang['conf_general_log_info'] );
410$vtp->closeSession( $sub, 'param_line' );
411$vtp->closeSession( $sub, 'line' );
412// mail notification for admins
413$vtp->addSession( $sub, 'line' );
414$vtp->addSession( $sub, 'param_line' );
415$vtp->setVar( $sub, 'param_line.name',
416              $lang['conf_general_mail_notification'] );
417$vtp->addSession( $sub, 'group' );
418$vtp->addSession( $sub, 'radio' );
419$vtp->setVar( $sub, 'radio.name', 'mail_notification' );
420$vtp->setVar( $sub, 'radio.value', 'true' );
421$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
422$checked = '';
423if ( $mail_notification == 'true' )
424{
425  $checked = ' checked="checked"';
426}
427$vtp->setVar( $sub, 'radio.checked', $checked );
428$vtp->closeSession( $sub, 'radio' );
429$vtp->addSession( $sub, 'radio' );
430$vtp->setVar( $sub, 'radio.name', 'mail_notification' );
431$vtp->setVar( $sub, 'radio.value', 'false' );
432$vtp->setVar( $sub, 'radio.option', $lang['no'] );
433$checked = '';
434if ( $mail_notification == 'false' )
435{
436  $checked = ' checked="checked"';
437}
438$vtp->setVar( $sub, 'radio.checked', $checked );
439$vtp->closeSession( $sub, 'radio' );
440$vtp->closeSession( $sub, 'group' );
441$vtp->setVar( $sub, 'param_line.def',
442              $lang['conf_general_mail_notification_info'] );
443$vtp->closeSession( $sub, 'param_line' );
444$vtp->closeSession( $sub, 'line' );
445
446$vtp->addSession( $sub, 'line' );
447$vtp->addSession( $sub, 'space_line' );
448$vtp->closeSession( $sub, 'space_line' );
449$vtp->closeSession( $sub, 'line' );
450//------------------------------------------------------ comments configuration
451$vtp->addSession( $sub, 'line' );
452$vtp->addSession( $sub, 'title_line' );
453$vtp->setVar( $sub, 'title_line.title', $lang['conf_comments_title'] );
454$vtp->closeSession( $sub, 'title_line' );
455$vtp->closeSession( $sub, 'line' );
456
457$vtp->addSession( $sub, 'line' );
458$vtp->addSession( $sub, 'space_line' );
459$vtp->closeSession( $sub, 'space_line' );
460$vtp->closeSession( $sub, 'line' );
461// show comments ?
462$vtp->addSession( $sub, 'line' );
463$vtp->addSession( $sub, 'param_line' );
464$vtp->setVar( $sub, 'param_line.name', $lang['conf_comments_show_comments'] );
465$vtp->addSession( $sub, 'group' );
466$vtp->addSession( $sub, 'radio' );
467$vtp->setVar( $sub, 'radio.name', 'show_comments' );
468$vtp->setVar( $sub, 'radio.value', 'true' );
469$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
470$checked = '';
471if ( $show_comments == 'true' )
472{
473  $checked = ' checked="checked"';
474}
475$vtp->setVar( $sub, 'radio.checked', $checked );
476$vtp->closeSession( $sub, 'radio' );
477$vtp->addSession( $sub, 'radio' );
478$vtp->setVar( $sub, 'radio.name', 'show_comments' );
479$vtp->setVar( $sub, 'radio.value', 'false' );
480$vtp->setVar( $sub, 'radio.option', $lang['no'] );
481$checked = '';
482if ( $show_comments == 'false' )
483{
484  $checked = ' checked="checked"';
485}
486$vtp->setVar( $sub, 'radio.checked', $checked );
487$vtp->closeSession( $sub, 'radio' );
488$vtp->closeSession( $sub, 'group' );
489$vtp->setVar( $sub, 'param_line.def',
490              $lang['conf_comments_show_comments_info'] );
491$vtp->closeSession( $sub, 'param_line' );
492$vtp->closeSession( $sub, 'line' );
493// coments for all ? true -> guests can post messages
494$vtp->addSession( $sub, 'line' );
495$vtp->addSession( $sub, 'param_line' );
496$vtp->setVar( $sub, 'param_line.name', $lang['conf_comments_forall'] );
497$vtp->addSession( $sub, 'group' );
498$vtp->addSession( $sub, 'radio' );
499$vtp->setVar( $sub, 'radio.name', 'comments_forall' );
500$vtp->setVar( $sub, 'radio.value', 'true' );
501$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
502$checked = '';
503if ( $comments_forall == 'true' )
504{
505  $checked = ' checked="checked"';
506}
507$vtp->setVar( $sub, 'radio.checked', $checked );
508$vtp->closeSession( $sub, 'radio' );
509$vtp->addSession( $sub, 'radio' );
510$vtp->setVar( $sub, 'radio.name', 'comments_forall' );
511$vtp->setVar( $sub, 'radio.value', 'false' );
512$vtp->setVar( $sub, 'radio.option', $lang['no'] );
513$checked = '';
514if ( $comments_forall == 'false' )
515{
516  $checked = ' checked="checked"';
517}
518$vtp->setVar( $sub, 'radio.checked', $checked );
519$vtp->closeSession( $sub, 'radio' );
520$vtp->closeSession( $sub, 'group' );
521$vtp->setVar( $sub, 'param_line.def',
522              $lang['conf_comments_forall_info'] );
523$vtp->closeSession( $sub, 'param_line' );
524$vtp->closeSession( $sub, 'line' );
525// number of comments per page
526$vtp->addSession( $sub, 'line' );
527$vtp->addSession( $sub, 'param_line' );
528$vtp->setVar( $sub, 'param_line.name',
529              $lang['conf_comments_comments_number'] );
530$vtp->addSession( $sub, 'text' );
531$vtp->setVar( $sub, 'text.name', 'nb_comment_page' );
532$vtp->setVar( $sub, 'text.value', $nb_comment_page );
533$vtp->closeSession( $sub, 'text' );
534$vtp->setVar( $sub, 'param_line.def',
535              $lang['conf_comments_comments_number_info'] );
536$vtp->closeSession( $sub, 'param_line' );
537$vtp->closeSession( $sub, 'line' );
538// coments validation
539$vtp->addSession( $sub, 'line' );
540$vtp->addSession( $sub, 'param_line' );
541$vtp->setVar( $sub, 'param_line.name', $lang['conf_comments_validation'] );
542$vtp->addSession( $sub, 'group' );
543$vtp->addSession( $sub, 'radio' );
544$vtp->setVar( $sub, 'radio.name', 'comments_validation' );
545$vtp->setVar( $sub, 'radio.value', 'true' );
546$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
547$checked = '';
548if ( $comments_validation == 'true' )
549{
550  $checked = ' checked="checked"';
551}
552$vtp->setVar( $sub, 'radio.checked', $checked );
553$vtp->closeSession( $sub, 'radio' );
554$vtp->addSession( $sub, 'radio' );
555$vtp->setVar( $sub, 'radio.name', 'comments_validation' );
556$vtp->setVar( $sub, 'radio.value', 'false' );
557$vtp->setVar( $sub, 'radio.option', $lang['no'] );
558$checked = '';
559if ( $comments_validation == 'false' )
560{
561  $checked = ' checked="checked"';
562}
563$vtp->setVar( $sub, 'radio.checked', $checked );
564$vtp->closeSession( $sub, 'radio' );
565$vtp->closeSession( $sub, 'group' );
566$vtp->setVar( $sub, 'param_line.def',
567              $lang['conf_comments_validation_info'] );
568$vtp->closeSession( $sub, 'param_line' );
569$vtp->closeSession( $sub, 'line' );
570
571$vtp->addSession( $sub, 'line' );
572$vtp->addSession( $sub, 'space_line' );
573$vtp->closeSession( $sub, 'space_line' );
574$vtp->closeSession( $sub, 'line' );
575//-------------------------------------------------- default user configuration
576$vtp->addSession( $sub, 'line' );
577$vtp->addSession( $sub, 'title_line' );
578$vtp->setVar( $sub, 'title_line.title', $lang['conf_default_title'] );
579$vtp->closeSession( $sub, 'title_line' );
580$vtp->closeSession( $sub, 'line' );
581
582$vtp->addSession( $sub, 'line' );
583$vtp->addSession( $sub, 'space_line' );
584$vtp->closeSession( $sub, 'space_line' );
585$vtp->closeSession( $sub, 'line' );
586// default language
587$vtp->addSession( $sub, 'line' );
588$vtp->addSession( $sub, 'param_line' );
589$vtp->setVar( $sub, 'param_line.name', $lang['customize_language'] );
590$vtp->addSession( $sub, 'select' );
591$vtp->setVar( $sub, 'select.name', 'language' );
592$option = get_languages( '../language/' );
593for ( $i = 0; $i < sizeof( $option ); $i++ )
594{
595  $vtp->addSession( $sub, 'option' );
596  $vtp->setVar( $sub, 'option.option', $option[$i] );
597  if ( $option[$i] == $language )
598  {
599    $vtp->setVar( $sub, 'option.selected', ' selected="selected"' );
600  }
601  $vtp->closeSession( $sub, 'option' );
602}
603$vtp->closeSession( $sub, 'select' );
604$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_language_info'] );
605$vtp->closeSession( $sub, 'param_line' );
606$vtp->closeSession( $sub, 'line' );
607// number of image per row
608$vtp->addSession( $sub, 'line' );
609$vtp->addSession( $sub, 'param_line' );
610$vtp->setVar( $sub, 'param_line.name', $lang['customize_nb_image_per_row'] );
611$vtp->addSession( $sub, 'select' );
612$vtp->setVar( $sub, 'select.name', 'nb_image_line' );
613for ( $i = 0; $i < sizeof( $conf['nb_image_row'] ); $i++ )
614{
615  $vtp->addSession( $sub, 'option' );
616  $vtp->setVar( $sub, 'option.option', $conf['nb_image_row'][$i] );
617  if ( $conf['nb_image_row'][$i] == $nb_image_line )
618  {
619    $vtp->setVar( $sub, 'option.selected', ' selected="selected"' );
620  }
621  $vtp->closeSession( $sub, 'option' );
622}
623$vtp->closeSession( $sub, 'select' );
624$vtp->setVar( $sub, 'param_line.def',
625              $lang['conf_default_nb_image_per_row_info'] );
626$vtp->closeSession( $sub, 'param_line' );
627$vtp->closeSession( $sub, 'line' );
628// number of row per page
629$vtp->addSession( $sub, 'line' );
630$vtp->addSession( $sub, 'param_line' );
631$vtp->setVar( $sub, 'param_line.name', $lang['customize_nb_row_per_page'] );
632$vtp->addSession( $sub, 'select' );
633$vtp->setVar( $sub, 'select.name', 'nb_line_page' );
634for ( $i = 0; $i < sizeof( $conf['nb_row_page'] ); $i++ )
635{
636  $vtp->addSession( $sub, 'option' );
637  $vtp->setVar( $sub, 'option.option', $conf['nb_row_page'][$i] );
638  if ( $conf['nb_row_page'][$i] == $nb_line_page )
639  {
640    $vtp->setVar( $sub, 'option.selected', ' selected="selected"' );
641  }
642  $vtp->closeSession( $sub, 'option' );
643}
644$vtp->closeSession( $sub, 'select' );
645$vtp->setVar( $sub, 'param_line.def',
646              $lang['conf_default_nb_row_per_page_info'] );
647$vtp->closeSession( $sub, 'param_line' );
648$vtp->closeSession( $sub, 'line' );
649// template
650$vtp->addSession( $sub, 'line' );
651$vtp->addSession( $sub, 'param_line' );
652$vtp->setVar( $sub, 'param_line.name', $lang['customize_theme'] );
653$vtp->addSession( $sub, 'select' );
654$vtp->setVar( $sub, 'select.name', 'template' );
655$option = get_dirs( '../template/' );
656for ( $i = 0; $i < sizeof( $option ); $i++ )
657{
658  $vtp->addSession( $sub, 'option' );
659  $vtp->setVar( $sub, 'option.option', $option[$i] );
660  if ( $option[$i] == $template )
661  {
662    $vtp->setVar( $sub, 'option.selected', ' selected="selected"' );
663  }
664  $vtp->closeSession( $sub, 'option' );
665}
666$vtp->closeSession( $sub, 'select' );
667$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_theme_info'] );
668$vtp->closeSession( $sub, 'param_line' );
669$vtp->closeSession( $sub, 'line' );
670// short period time
671$vtp->addSession( $sub, 'line' );
672$vtp->addSession( $sub, 'param_line' );
673$vtp->setVar( $sub, 'param_line.name', $lang['customize_short_period'] );
674$vtp->addSession( $sub, 'text' );
675$vtp->setVar( $sub, 'text.name', 'short_period' );
676$vtp->setVar( $sub, 'text.value', $short_period );
677$vtp->closeSession( $sub, 'text' );
678$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_short_period_info']);
679$vtp->closeSession( $sub, 'param_line' );
680$vtp->closeSession( $sub, 'line' );
681// long period time
682$vtp->addSession( $sub, 'line' );
683$vtp->addSession( $sub, 'param_line' );
684$vtp->setVar( $sub, 'param_line.name', $lang['customize_long_period'] );
685$vtp->addSession( $sub, 'text' );
686$vtp->setVar( $sub, 'text.name', 'long_period' );
687$vtp->setVar( $sub, 'text.value', $long_period );
688$vtp->closeSession( $sub, 'text' );
689$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_long_period_info'] );
690$vtp->closeSession( $sub, 'param_line' );
691$vtp->closeSession( $sub, 'line' );
692// max displayed width
693$vtp->addSession( $sub, 'line' );
694$vtp->addSession( $sub, 'param_line' );
695$vtp->setVar( $sub, 'param_line.name', $lang['maxwidth'] );
696$vtp->addSession( $sub, 'text' );
697$vtp->setVar( $sub, 'text.name', 'maxwidth' );
698$vtp->setVar( $sub, 'text.value', $maxwidth );
699$vtp->closeSession( $sub, 'text' );
700$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_maxwidth_info'] );
701$vtp->closeSession( $sub, 'param_line' );
702$vtp->closeSession( $sub, 'line' );
703// max displayed height
704$vtp->addSession( $sub, 'line' );
705$vtp->addSession( $sub, 'param_line' );
706$vtp->setVar( $sub, 'param_line.name', $lang['maxheight'] );
707$vtp->addSession( $sub, 'text' );
708$vtp->setVar( $sub, 'text.name', 'maxheight' );
709$vtp->setVar( $sub, 'text.value', $maxheight );
710$vtp->closeSession( $sub, 'text' );
711$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_maxheight_info'] );
712$vtp->closeSession( $sub, 'param_line' );
713$vtp->closeSession( $sub, 'line' );
714// expand all categories ?
715$vtp->addSession( $sub, 'line' );
716$vtp->addSession( $sub, 'param_line' );
717$vtp->setVar( $sub, 'param_line.name', $lang['customize_expand'] );
718$vtp->addSession( $sub, 'group' );
719$vtp->addSession( $sub, 'radio' );
720$vtp->setVar( $sub, 'radio.name', 'expand' );
721
722$vtp->setVar( $sub, 'radio.value', 'true' );
723$checked = '';
724if ( $expand == 'true' )
725{
726  $checked = ' checked="checked"';
727}
728$vtp->setVar( $sub, 'radio.checked', $checked );
729$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
730$vtp->closeSession( $sub, 'radio' );
731$vtp->addSession( $sub, 'radio' );
732$vtp->setVar( $sub, 'radio.name', 'expand' );
733$vtp->setVar( $sub, 'radio.value', 'false' );
734$checked = '';
735if ( $expand == 'false' )
736{
737  $checked = ' checked="checked"';
738}
739$vtp->setVar( $sub, 'radio.checked', $checked );
740$vtp->setVar( $sub, 'radio.option', $lang['no'] );
741$vtp->closeSession( $sub, 'radio' );
742$vtp->closeSession( $sub, 'group' );
743$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_expand_info'] );
744$vtp->closeSession( $sub, 'param_line' );
745$vtp->closeSession( $sub, 'line' );
746// show number of comments on thumbnails page
747$vtp->addSession( $sub, 'line' );
748$vtp->addSession( $sub, 'param_line' );
749$vtp->setVar( $sub, 'param_line.name', $lang['customize_show_nb_comments'] );
750$vtp->addSession( $sub, 'group' );
751$vtp->addSession( $sub, 'radio' );
752$vtp->setVar( $sub, 'radio.name', 'show_nb_comments' );
753$vtp->setVar( $sub, 'radio.value', 'true' );
754$checked = '';
755if ( $show_nb_comments == 'true' )
756{
757  $checked = ' checked="checked"';
758}
759$vtp->setVar( $sub, 'radio.checked', $checked );
760$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
761$vtp->closeSession( $sub, 'radio' );
762$vtp->addSession( $sub, 'radio' );
763$vtp->setVar( $sub, 'radio.name', 'show_nb_comments' );
764$vtp->setVar( $sub, 'radio.value', 'false' );
765$checked = '';
766if ( $show_nb_comments == 'false' )
767{
768  $checked = ' checked="checked"';
769}
770$vtp->setVar( $sub, 'radio.checked', $checked );
771$vtp->setVar( $sub, 'radio.option', $lang['no'] );
772$vtp->closeSession( $sub, 'radio' );
773$vtp->closeSession( $sub, 'group' );
774$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_show_nb_comments_info'] );
775$vtp->closeSession( $sub, 'param_line' );
776$vtp->closeSession( $sub, 'line' );
777
778$vtp->addSession( $sub, 'line' );
779$vtp->addSession( $sub, 'space_line' );
780$vtp->closeSession( $sub, 'space_line' );
781$vtp->closeSession( $sub, 'line' );
782//-------------------------------------------------------- upload configuration
783$vtp->addSession( $sub, 'line' );
784$vtp->addSession( $sub, 'title_line' );
785$vtp->setVar( $sub, 'title_line.title', $lang['conf_upload_title'] );
786$vtp->closeSession( $sub, 'title_line' );
787$vtp->closeSession( $sub, 'line' );
788
789$vtp->addSession( $sub, 'line' );
790$vtp->addSession( $sub, 'space_line' );
791$vtp->closeSession( $sub, 'space_line' );
792$vtp->closeSession( $sub, 'line' );
793// is upload available ?
794$vtp->addSession( $sub, 'line' );
795$vtp->addSession( $sub, 'param_line' );
796$vtp->setVar( $sub, 'param_line.name', $lang['conf_upload_available'] );
797$vtp->addSession( $sub, 'group' );
798$vtp->addSession( $sub, 'radio' );
799$vtp->setVar( $sub, 'radio.name', 'upload_available' );
800$vtp->setVar( $sub, 'radio.value', 'true' );
801$checked = '';
802if ( $upload_available == 'true' )
803{
804  $checked = ' checked="checked"';
805}
806$vtp->setVar( $sub, 'radio.checked', $checked );
807$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
808$vtp->closeSession( $sub, 'radio' );
809$vtp->addSession( $sub, 'radio' );
810$vtp->setVar( $sub, 'radio.name', 'upload_available' );
811$vtp->setVar( $sub, 'radio.value', 'false' );
812$checked = '';
813if ( $upload_available == 'false' )
814{
815  $checked = ' checked="checked"';
816}
817$vtp->setVar( $sub, 'radio.checked', $checked );
818$vtp->setVar( $sub, 'radio.option', $lang['no'] );
819$vtp->closeSession( $sub, 'radio' );
820$vtp->closeSession( $sub, 'group' );
821$vtp->setVar( $sub, 'param_line.def', $lang['conf_upload_available_info'] );
822$vtp->closeSession( $sub, 'param_line' );
823$vtp->closeSession( $sub, 'line' );
824// max filesize uploadable
825$vtp->addSession( $sub, 'line' );
826$vtp->addSession( $sub, 'param_line' );
827$vtp->setVar( $sub, 'param_line.name', $lang['conf_upload_maxfilesize'] );
828$vtp->addSession( $sub, 'text' );
829$vtp->setVar( $sub, 'text.name', 'upload_maxfilesize' );
830$vtp->setVar( $sub, 'text.value', $upload_maxfilesize );
831$vtp->closeSession( $sub, 'text' );
832$vtp->setVar( $sub, 'param_line.def', $lang['conf_upload_maxfilesize_info'] );
833$vtp->closeSession( $sub, 'param_line' );
834$vtp->closeSession( $sub, 'line' );
835// maxwidth uploadable
836$vtp->addSession( $sub, 'line' );
837$vtp->addSession( $sub, 'param_line' );
838$vtp->setVar( $sub, 'param_line.name', $lang['conf_upload_maxwidth'] );
839$vtp->addSession( $sub, 'text' );
840$vtp->setVar( $sub, 'text.name', 'upload_maxwidth' );
841$vtp->setVar( $sub, 'text.value', $upload_maxwidth );
842$vtp->closeSession( $sub, 'text' );
843$vtp->setVar( $sub, 'param_line.def', $lang['conf_upload_maxwidth_info'] );
844$vtp->closeSession( $sub, 'param_line' );
845$vtp->closeSession( $sub, 'line' );
846// maxheight uploadable
847$vtp->addSession( $sub, 'line' );
848$vtp->addSession( $sub, 'param_line' );
849$vtp->setVar( $sub, 'param_line.name', $lang['conf_upload_maxheight'] );
850$vtp->addSession( $sub, 'text' );
851$vtp->setVar( $sub, 'text.name', 'upload_maxheight' );
852$vtp->setVar( $sub, 'text.value', $upload_maxheight );
853$vtp->closeSession( $sub, 'text' );
854$vtp->setVar( $sub, 'param_line.def', $lang['conf_upload_maxheight_info'] );
855$vtp->closeSession( $sub, 'param_line' );
856$vtp->closeSession( $sub, 'line' );
857// maxwidth for thumbnail
858$vtp->addSession( $sub, 'line' );
859$vtp->addSession( $sub, 'param_line' );
860$vtp->setVar( $sub, 'param_line.name',$lang['conf_upload_maxwidth_thumbnail']);
861$vtp->addSession( $sub, 'text' );
862$vtp->setVar( $sub, 'text.name', 'upload_maxwidth_thumbnail' );
863$vtp->setVar( $sub, 'text.value', $upload_maxwidth_thumbnail );
864$vtp->closeSession( $sub, 'text' );
865$vtp->setVar($sub,'param_line.def',$lang['conf_upload_maxwidth_thumbnail_info']);
866$vtp->closeSession( $sub, 'param_line' );
867$vtp->closeSession( $sub, 'line' );
868// maxheight for thumbnail
869$vtp->addSession( $sub, 'line' );
870$vtp->addSession( $sub, 'param_line' );
871$vtp->setVar( $sub,'param_line.name',$lang['conf_upload_maxheight_thumbnail']);
872$vtp->addSession( $sub, 'text' );
873$vtp->setVar( $sub, 'text.name', 'upload_maxheight_thumbnail' );
874$vtp->setVar( $sub, 'text.value', $upload_maxheight_thumbnail );
875$vtp->closeSession( $sub, 'text' );
876$vtp->setVar( $sub, 'param_line.def', $lang['conf_upload_maxheight_thumbnail_info']);
877$vtp->closeSession( $sub, 'param_line' );
878$vtp->closeSession( $sub, 'line' );
879
880$vtp->addSession( $sub, 'line' );
881$vtp->addSession( $sub, 'space_line' );
882$vtp->closeSession( $sub, 'space_line' );
883$vtp->closeSession( $sub, 'line' );
884//------------------------------------------------------ sessions configuration
885$vtp->addSession( $sub, 'line' );
886$vtp->addSession( $sub, 'title_line' );
887$vtp->setVar( $sub, 'title_line.title', $lang['conf_session_title'] );
888$vtp->closeSession( $sub, 'title_line' );
889$vtp->closeSession( $sub, 'line' );
890
891$vtp->addSession( $sub, 'line' );
892$vtp->addSession( $sub, 'space_line' );
893$vtp->closeSession( $sub, 'space_line' );
894$vtp->closeSession( $sub, 'line' );
895// authorize cookies ?
896$vtp->addSession( $sub, 'line' );
897$vtp->addSession( $sub, 'param_line' );
898$vtp->setVar( $sub, 'param_line.name', $lang['conf_session_cookie'] );
899$vtp->addSession( $sub, 'group' );
900$vtp->addSession( $sub, 'radio' );
901$vtp->setVar( $sub, 'radio.name', 'authorize_cookies' );
902$vtp->setVar( $sub, 'radio.value', 'true' );
903$checked = '';
904if ( $authorize_cookies == 'true' )
905{
906  $checked = ' checked="checked"';
907}
908$vtp->setVar( $sub, 'radio.checked', $checked );
909$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
910$vtp->closeSession( $sub, 'radio' );
911$vtp->addSession( $sub, 'radio' );
912$vtp->setVar( $sub, 'radio.name', 'authorize_cookies' );
913$vtp->setVar( $sub, 'radio.value', 'false' );
914$checked = '';
915if ( $authorize_cookies == 'false' )
916{
917  $checked = ' checked="checked"';
918}
919$vtp->setVar( $sub, 'radio.checked', $checked );
920$vtp->setVar( $sub, 'radio.option', $lang['no'] );
921$vtp->closeSession( $sub, 'radio' );
922$vtp->closeSession( $sub, 'group' );
923$vtp->setVar( $sub, 'param_line.def', $lang['conf_session_cookie_info'] );
924$vtp->closeSession( $sub, 'param_line' );
925$vtp->closeSession( $sub, 'line' );
926// session size
927$vtp->addSession( $sub, 'line' );
928$vtp->addSession( $sub, 'param_line' );
929$vtp->setVar( $sub, 'param_line.name', $lang['conf_session_size'] );
930$vtp->addSession( $sub, 'text' );
931$vtp->setVar( $sub, 'text.name', 'session_id_size' );
932$vtp->setVar( $sub, 'text.value', $session_id_size );
933$vtp->closeSession( $sub, 'text' );
934$vtp->setVar( $sub, 'param_line.def', $lang['conf_session_size_info']);
935$vtp->closeSession( $sub, 'param_line' );
936$vtp->closeSession( $sub, 'line' );
937// session length
938$vtp->addSession( $sub, 'line' );
939$vtp->addSession( $sub, 'param_line' );
940$vtp->setVar( $sub, 'param_line.name', $lang['conf_session_time'] );
941$vtp->addSession( $sub, 'text' );
942$vtp->setVar( $sub, 'text.name', 'session_time' );
943$vtp->setVar( $sub, 'text.value', $session_time );
944$vtp->closeSession( $sub, 'text' );
945$vtp->setVar( $sub, 'param_line.def', $lang['conf_session_time_info']);
946$vtp->closeSession( $sub, 'param_line' );
947$vtp->closeSession( $sub, 'line' );
948// session keyword
949$vtp->addSession( $sub, 'line' );
950$vtp->addSession( $sub, 'param_line' );
951$vtp->setVar( $sub, 'param_line.name', $lang['conf_session_key'] );
952$vtp->addSession( $sub, 'text' );
953$vtp->setVar( $sub, 'text.name', 'session_keyword' );
954$vtp->setVar( $sub, 'text.value', $session_keyword );
955$vtp->closeSession( $sub, 'text' );
956$vtp->setVar( $sub, 'param_line.def', $lang['conf_session_key_info']);
957$vtp->closeSession( $sub, 'param_line' );
958$vtp->closeSession( $sub, 'line' );
959// session deletion
960$vtp->addSession( $sub, 'line' );
961$vtp->addSession( $sub, 'param_line' );
962$vtp->setVar( $sub, 'param_line.name', $lang['conf_session_delete'] );
963$vtp->addSession( $sub, 'check' );
964$vtp->addSession( $sub, 'box' );
965$vtp->setVar( $sub, 'box.name', 'empty_session_table' );
966$vtp->setVar( $sub, 'box.value', '1' );
967$vtp->setVar( $sub, 'box.checked', ' checked="checked"' );
968$vtp->closeSession( $sub, 'box' );
969$vtp->closeSession( $sub, 'check' );
970$vtp->setVar( $sub, 'param_line.def', $lang['conf_session_delete_info'] );
971$vtp->closeSession( $sub, 'param_line' );
972$vtp->closeSession( $sub, 'line' );
973
974$vtp->addSession( $sub, 'line' );
975$vtp->addSession( $sub, 'space_line' );
976$vtp->closeSession( $sub, 'space_line' );
977$vtp->closeSession( $sub, 'line' );
978//------------------------------------------------ remote sites administration
979$query = 'select id,galleries_url';
980$query.= ' from '.PREFIX_TABLE.'sites';
981$query.= " where galleries_url <> './galleries/';";
982$result = mysql_query( $query );
983if ( mysql_num_rows( $result ) > 0 )
984{
985  $vtp->addSession( $sub, 'remote_sites' );
986  $i = 0;
987  while ( $row = mysql_fetch_array( $result ) )
988  {
989    $vtp->addSession( $sub, 'site' );
990    $vtp->setVar( $sub, 'site.url', $row['galleries_url'] );
991    $vtp->setVar( $sub, 'site.id', $row['id'] );
992    if ( $i == 0 )
993    {
994      $vtp->addSession( $sub, 'rowspan' );
995      $vtp->setVar( $sub, 'rowspan.nb_sites', mysql_num_rows( $result ) );
996      $vtp->closeSession( $sub, 'rowspan' );
997    }
998    $vtp->closeSession( $sub, 'site' );
999    $i++;
1000  }
1001  $vtp->closeSession( $sub, 'remote_sites' );
1002}
1003//----------------------------------------------------------- sending html code
1004$vtp->Parse( $handle , 'sub', $sub );
1005?>
Note: See TracBrowser for help on using the repository browser.