| [ PHPXref.com ] | [ Generated: Sun Jul 20 20:51:45 2008 ] | [ UseBB 0.8a ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 3 /* 4 Copyright (C) 2003-2006 UseBB Team 5 http://www.usebb.net 6 7 $Header: /cvsroot/usebb/UseBB/faq.php,v 1.16 2006/01/07 14:02:26 pc_freak Exp $ 8 9 This file is part of UseBB. 10 11 UseBB is free software; you can redistribute it and/or modify 12 it under the terms of the GNU General Public License as published by 13 the Free Software Foundation; either version 2 of the License, or 14 (at your option) any later version. 15 16 UseBB is distributed in the hope that it will be useful, 17 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 GNU General Public License for more details. 20 21 You should have received a copy of the GNU General Public License 22 along with UseBB; if not, write to the Free Software 23 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 */ 25 26 /** 27 * Frequently Asked Questions 28 * 29 * Parses a list of frequently asked questions. 30 * 31 * @author UseBB Team 32 * @link http://www.usebb.net 33 * @license GPL-2 34 * @version $Revision: 1.16 $ 35 * @copyright Copyright (C) 2003-2006 UseBB Team 36 * @package UseBB 37 */ 38 39 define('INCLUDED', true); 40 define('ROOT_PATH', './'); 41 42 // 43 // Include usebb engine 44 // 45 require (ROOT_PATH.'sources/common.php'); 46 47 // 48 // Update and get the session information 49 // 50 $session->update('faq'); 51 52 // 53 // Include the page header 54 // 55 require (ROOT_PATH.'sources/page_head.php'); 56 57 $template->set_page_title($lang['FAQ']); 58 59 // 60 // Get FAQ variables 61 // 62 $faq_file = ROOT_PATH.'languages/faq_'.$functions->get_config('language').'.php'; 63 if ( !file_exists($faq_file) || !is_readable($faq_file) ) 64 trigger_error('Unable to get "'.$functions->get_config('language').'" FAQ!'); 65 else 66 require($faq_file); 67 68 if ( !empty($_GET['q']) ) { 69 70 $questions = array(); 71 foreach ( $faq as $item ) { 72 73 if ( $item[0] != '--' ) 74 $questions[] = $item; 75 76 } 77 78 reset($questions); 79 80 foreach ( $questions as $question ) { 81 82 if ( substr(md5($question[0]), 0, 5) != $_GET['q'] ) 83 continue; 84 85 $template->parse('question', 'faq', array( 86 'question_title' => $question[0], 87 'question_answer' => $question[1] 88 )); 89 90 } 91 92 } 93 94 $template->parse('contents_header', 'faq'); 95 96 $hi = $qi = 0; 97 98 foreach ( $faq as $item ) { 99 100 if ( $item[0] == '--' ) { 101 102 if ( $hi ) 103 $template->parse('contents_cat_footer', 'faq'); 104 105 $hi++; 106 107 $template->parse('contents_cat_header', 'faq', array( 108 'cat_name' => $item[1] 109 )); 110 111 } else { 112 113 $qi++; 114 115 $template->parse('contents_question', 'faq', array( 116 'question_link' => $functions->make_url('faq.php', array('q' => substr(md5($item[0]), 0, 5))), 117 'question_title' => $item[0], 118 )); 119 120 } 121 122 } 123 124 $template->parse('contents_cat_footer', 'faq'); 125 $template->parse('contents_footer', 'faq'); 126 127 // 128 // Include the page footer 129 // 130 require (ROOT_PATH.'sources/page_foot.php'); 131 132 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |