aboutsummaryrefslogtreecommitdiffstats
path: root/admin/help.php
blob: 085a3f017122b7ee4e7a0735e51f41d3a84099da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/***************************************************************************
 *                                  help.php                               *
 *                            -------------------                          *
 *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
 *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
 *                                                                         *
 *   $Id$
 *                                                                         *
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation;                                         *
 *                                                                         *
 ***************************************************************************/
include_once( './admin/include/isadmin.inc.php' );
//----------------------------------------------------- template initialization
$sub = $vtp->Open( './template/'.$user['template'].'/admin/help.vtp' );
$tpl = array( );
templatize_array( $tpl, 'lang', $sub );
//----------------------------------------------------- help categories display
$categories = array( 'images','thumbnails','database','remote','upload',
                     'virtual','groups','access','infos' );
foreach ( $categories as $category ) {
  $vtp->addSession( $sub, 'cat' );
  if ( $category == 'images' )
  {
    $vtp->addSession( $sub, 'illustration' );
    $vtp->setVar( $sub, 'illustration.pic_src', './admin/images/admin.png' );
    $vtp->setVar( $sub, 'illustration.pic_alt', '' );
    $vtp->setVar( $sub, 'illustration.caption', $lang['help_images_intro'] );
    $vtp->closeSession( $sub, 'illustration' );
  }
  $vtp->setVar( $sub, 'cat.name', $lang['help_'.$category.'_title'] );
  foreach ( $lang['help_'.$category] as $item ) {
    $vtp->addSession( $sub, 'item' );
    $vtp->setVar( $sub, 'item.content', $item );
    $vtp->closeSession( $sub, 'item' );
  }

  $vtp->closeSession( $sub, 'cat' );
}
//----------------------------------------------------------- sending html code
$vtp->Parse( $handle , 'sub', $sub );
?>