Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
<?php
2
/*************************
3
  Coppermine Photo Gallery
4
  ************************
5
  Copyright (c) 2003-2005 Coppermine Dev Team
6
  v1.1 originaly written by Gregory DEMAR
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; either version 2 of the License, or
11
  (at your option) any later version.
12
  ********************************************
13
  Coppermine version: 1.3.3
14
  $Source: /cvsroot/coppermine/stable/faq.php,v $
15
  $Revision: 1.4 $
16
  $Author: gaugau $
17
  $Date: 2005/04/19 03:17:10 $
18
**********************************************/
19
 
20
define('IN_COPPERMINE', true);
21
define('FAQ_PHP', true);
22
global $CONFIG;
23
 
24
require('include/init.inc.php');
25
 
26
// build the ouput
27
$faqHeading = '';
28
$faqContent = '';
29
$anchorName = '';
30
 
31
foreach($lang_faq_data as $element) {
32
  if ((is_array($element))) {
33
     if ($CONFIG[$element[2]] == $element[3]) {
34
       $anchorName = createAnchorName($element[0]);
35
       $faqHeading .= '<ul style="margin-top:0px;margin-bottom:0px"><li><a href="#'.$anchorName.'">'.$element[0].'</a></li></ul>';
36
       $faqContent .= '<tr><td class="tablef"><i>'.$lang_faq_php['question'].'</i><a name="'.$anchorName.'"></a><b>'.$element[0].'</b></td></tr><tr><td class="tableb"><i>'.$lang_faq_php['answer'].'</i>'.$element[1].'<br />&nbsp;<br />&nbsp;<br /></td></tr>';
37
     }
38
  }
39
  else {
40
      $anchorName = createAnchorName($element);
41
      $faqHeading .=  '<h2><a href="#'.$anchorName.'">'.$element.'</a></h2>';
42
      $faqContent .=  '<tr><td class="tableh1"><a name="'.$anchorName.'"></a><h2>'.$element.'</h2></td></tr>';
43
  }
44
}
45
$faqHeading .= '';
46
 
47
//print $faqHeading;
48
//print '<hr>';
49
//print $faqContent;
50
 
51
 
52
 
53
 
54
pageheader($lang_faq_php['faq']);
55
print '<h1>'.$lang_faq_php['faq'].'</h1>';
56
 
57
starttable('100%',$lang_faq_php['toc']);
58
print '<tr>';
59
print '<td class="tableb">';
60
print $faqHeading;
61
print '</td>';
62
print '</tr>';
63
endtable();
64
 
65
print '<br />&nbsp;<br />';
66
 
67
starttable('100%');
68
print $faqContent;
69
endtable();
70
print '<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />';
71
pagefooter();
72
 
73
ob_end_flush();
74
 
75
function createAnchorName($anchor)
76
{
77
$anchor = trim(str_replace(' ','_',str_replace('?','',$anchor)));
78
return $anchor;
79
}
80
 
81
 
82
 
83
?>