~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/php/phpBB3/faq.php

  • Committer: mattgiuca
  • Date: 2008-02-15 04:45:12 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:472
db.py: No longer exceptions if password is not supplied.
makeuser: Converted explicit args into kwargs which are simply forwarded along
    to db. Makeuser db NO LONGER accepts "force" argument (which used to
    delete and replace login rows). This is dangerous, and we have removed the
    delete user functionality altogether - because we never delete users.
makeuser.py (script): Major change. Replaced the command-line interface so it
    now only takes 3 required arguments, and a bunch of optional arguments
    getopts style.
    All the arguments are specified at the top; the rest of the code works
    with these data structures so they are only specified in one place
    (including all the work of putting them into a dict and passing it to the
    database).
    Note that makeuser.py is a *second* point of control for the list of the
    login fields (the other is in db.DB.login_fields_list). This is by design,
    because there is a semantic difference between "what fields are in the db"
    and "what arguments should we accept on the command line".

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
*
 
4
* @package phpBB3
 
5
* @version $Id: faq.php,v 1.37 2007/10/05 14:30:06 acydburn Exp $
 
6
* @copyright (c) 2005 phpBB Group
 
7
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
 
8
*
 
9
*/
 
10
 
 
11
/**
 
12
* @ignore
 
13
*/
 
14
define('IN_PHPBB', true);
 
15
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
 
16
$phpEx = substr(strrchr(__FILE__, '.'), 1);
 
17
include($phpbb_root_path . 'common.' . $phpEx);
 
18
 
 
19
// Start session management
 
20
$user->session_begin();
 
21
$auth->acl($user->data);
 
22
$user->setup();
 
23
 
 
24
$mode = request_var('mode', '');
 
25
 
 
26
// Load the appropriate faq file
 
27
switch ($mode)
 
28
{
 
29
        case 'bbcode':
 
30
                $l_title = $user->lang['BBCODE_GUIDE'];
 
31
                $user->add_lang('bbcode', false, true);
 
32
        break;
 
33
 
 
34
        default:
 
35
                $l_title = $user->lang['FAQ_EXPLAIN'];
 
36
                $user->add_lang('faq', false, true);
 
37
        break;
 
38
}
 
39
 
 
40
// Pull the array data from the lang pack
 
41
$help_blocks = array();
 
42
foreach ($user->help as $help_ary)
 
43
{
 
44
        if ($help_ary[0] == '--')
 
45
        {
 
46
                $template->assign_block_vars('faq_block', array(
 
47
                        'BLOCK_TITLE'           => $help_ary[1])
 
48
                );
 
49
 
 
50
                continue;
 
51
        }
 
52
 
 
53
        $template->assign_block_vars('faq_block.faq_row', array(
 
54
                'FAQ_QUESTION'          => $help_ary[0],
 
55
                'FAQ_ANSWER'            => $help_ary[1])
 
56
        );
 
57
}
 
58
 
 
59
// Lets build a page ...
 
60
$template->assign_vars(array(
 
61
        'L_FAQ_TITLE'   => $l_title,
 
62
        'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'])
 
63
);
 
64
 
 
65
page_header($l_title);
 
66
 
 
67
$template->set_filenames(array(
 
68
        'body' => 'faq_body.html')
 
69
);
 
70
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
 
71
 
 
72
page_footer();
 
73
 
 
74
?>
 
 
b'\\ No newline at end of file'