source: trunk/admin/configuration.php @ 383

Last change on this file since 383 was 383, checked in by z0rglub, 20 years ago

use new format of config table

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