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

« back to all changes in this revision

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

  • Committer: chadnickbok
  • Date: 2009-01-22 02:14:14 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1173
Fixes Issue #14

When uploading files, students will now be shown an
error message if there upload would replace already existing
files.

This upload will not be performed until it will not clobber
any old files.

Note that there is currently a way to change this behaviour in
the code in action.py, to allow files to be overwritten. However
there is no way this flag can be set through the browser interface
(yet).

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'