mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
- Documentation related changes
- added resend activation email dialog - fixed issue in session code - log failed/successful admin re-authentication/login - fixed simple forum dropdown box (used in mcp and posting) git-svn-id: file:///svn/phpbb/trunk@5114 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
0ba3f620d4
commit
fc32df0358
110 changed files with 2212 additions and 1877 deletions
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_attachments.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sun Apr 20, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
$filename = basename(__FILE__);
|
$filename = basename(__FILE__);
|
||||||
|
@ -120,7 +119,7 @@ if ($mode == 'attach')
|
||||||
add_log('admin', 'LOG_' . strtoupper($mode) . '_CONFIG');
|
add_log('admin', 'LOG_' . strtoupper($mode) . '_CONFIG');
|
||||||
|
|
||||||
// Check Settings
|
// Check Settings
|
||||||
test_upload($error, $new['upload_dir'], false);
|
test_upload($error, $new['upload_path'], false);
|
||||||
|
|
||||||
if (!sizeof($error))
|
if (!sizeof($error))
|
||||||
{
|
{
|
||||||
|
@ -420,7 +419,7 @@ if ($submit && $mode == 'orphan')
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
upload_file($row['post_id'], $row['topic_id'], $row['forum_id'], $config['upload_dir'], $upload_list[$row['post_id']]);
|
upload_file($row['post_id'], $row['topic_id'], $row['forum_id'], $config['upload_path'], $upload_list[$row['post_id']]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($message_parser);
|
unset($message_parser);
|
||||||
|
@ -528,7 +527,7 @@ if ($mode == 'attach')
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" width="40%"><b><?php echo $user->lang['UPLOAD_DIR']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['UPLOAD_DIR_EXPLAIN']; ?></span></td>
|
<td class="row1" width="40%"><b><?php echo $user->lang['UPLOAD_DIR']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['UPLOAD_DIR_EXPLAIN']; ?></span></td>
|
||||||
<td class="row2"><input type="text" size="25" maxlength="100" name="upload_dir" class="post" value="<?php echo $new['upload_dir'] ?>" /></td>
|
<td class="row2"><input type="text" size="25" maxlength="100" name="upload_path" class="post" value="<?php echo $new['upload_path'] ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1"><b><?php echo $user->lang['DISPLAY_ORDER']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DISPLAY_ORDER_EXPLAIN']; ?></span></td>
|
<td class="row1"><b><?php echo $user->lang['DISPLAY_ORDER']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DISPLAY_ORDER_EXPLAIN']; ?></span></td>
|
||||||
|
@ -1188,10 +1187,10 @@ if ($mode == 'orphan')
|
||||||
{
|
{
|
||||||
$attach_filelist = array();
|
$attach_filelist = array();
|
||||||
|
|
||||||
$dir = @opendir($phpbb_root_path . $config['upload_dir']);
|
$dir = @opendir($phpbb_root_path . $config['upload_path']);
|
||||||
while ($file = @readdir($dir))
|
while ($file = @readdir($dir))
|
||||||
{
|
{
|
||||||
if (is_file($phpbb_root_path . $config['upload_dir'] . '/' . $file) && filesize($phpbb_root_path . $config['upload_dir'] . '/' . $file) && $file{0} != '.' && $file != 'index.htm' && !preg_match('#^thumb\_#', $file))
|
if (is_file($phpbb_root_path . $config['upload_path'] . '/' . $file) && filesize($phpbb_root_path . $config['upload_path'] . '/' . $file) && $file{0} != '.' && $file != 'index.htm' && !preg_match('#^thumb\_#', $file))
|
||||||
{
|
{
|
||||||
$attach_filelist[$file] = $file;
|
$attach_filelist[$file] = $file;
|
||||||
}
|
}
|
||||||
|
@ -1243,12 +1242,12 @@ function marklist(match, name, status)
|
||||||
foreach ($attach_filelist as $file)
|
foreach ($attach_filelist as $file)
|
||||||
{
|
{
|
||||||
$row_class = (++$i % 2 == 0) ? 'row2' : 'row1';
|
$row_class = (++$i % 2 == 0) ? 'row2' : 'row1';
|
||||||
$filesize = @filesize($phpbb_root_path . $config['upload_dir'] . '/' . $file);
|
$filesize = @filesize($phpbb_root_path . $config['upload_path'] . '/' . $file);
|
||||||
$size_lang = ($filesize >= 1048576) ? $user->lang['MB'] : ( ($filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] );
|
$size_lang = ($filesize >= 1048576) ? $user->lang['MB'] : ( ($filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] );
|
||||||
$filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize);
|
$filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="<?php echo $row_class; ?>"><a href="<?php echo $phpbb_root_path . $config['upload_dir'] . '/' . $file; ?>" class="gen" target="file"><?php echo $file; ?></a></td>
|
<td class="<?php echo $row_class; ?>"><a href="<?php echo $phpbb_root_path . $config['upload_path'] . '/' . $file; ?>" class="gen" target="file"><?php echo $file; ?></a></td>
|
||||||
<td class="<?php echo $row_class; ?>"><?php echo $filesize . ' ' . $size_lang; ?></td>
|
<td class="<?php echo $row_class; ?>"><?php echo $filesize . ' ' . $size_lang; ?></td>
|
||||||
<td class="<?php echo $row_class; ?>"><b class="gen">ID: </b><input type="text" name="post_id[<?php echo $file; ?>]" class="post" size="7" maxlength="10" value="<?php echo (!empty($post_ids[$file])) ? $post_ids[$file] : ''; ?>" /></td>
|
<td class="<?php echo $row_class; ?>"><b class="gen">ID: </b><input type="text" name="post_id[<?php echo $file; ?>]" class="post" size="7" maxlength="10" value="<?php echo (!empty($post_ids[$file])) ? $post_ids[$file] : ''; ?>" /></td>
|
||||||
<td class="<?php echo $row_class; ?>"><input type="checkbox" name="add[<?php echo $file; ?>]" /></td>
|
<td class="<?php echo $row_class; ?>"><input type="checkbox" name="add[<?php echo $file; ?>]" /></td>
|
||||||
|
@ -1399,7 +1398,7 @@ function download_select($select_name, $group_id = false)
|
||||||
return $group_select;
|
return $group_select;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Upload already uploaded file... huh? are you kidding?
|
/* Upload already uploaded file... huh? are you kidding?
|
||||||
function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename)
|
function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename)
|
||||||
{
|
{
|
||||||
global $message_parser, $db, $user, $phpbb_root_path;
|
global $message_parser, $db, $user, $phpbb_root_path;
|
||||||
|
@ -1418,8 +1417,8 @@ function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename)
|
||||||
'poster_id' => $user->data['user_id'],
|
'poster_id' => $user->data['user_id'],
|
||||||
'topic_id' => $topic_id,
|
'topic_id' => $topic_id,
|
||||||
'in_message' => 0,
|
'in_message' => 0,
|
||||||
'physical_filename' => $filedata['destination_filename'],
|
'physical_filename' => $filedata['physical_filename'],
|
||||||
'real_filename' => $filedata['filename'],
|
'real_filename' => $filedata['real_filename'],
|
||||||
'comment' => $message_parser->filename_data['filecomment'],
|
'comment' => $message_parser->filename_data['filecomment'],
|
||||||
'extension' => $filedata['extension'],
|
'extension' => $filedata['extension'],
|
||||||
'mimetype' => $filedata['mimetype'],
|
'mimetype' => $filedata['mimetype'],
|
||||||
|
@ -1459,6 +1458,7 @@ function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename)
|
||||||
echo '<span style="color:red">' . sprintf($user->lang['ADMIN_UPLOAD_ERROR'], implode("<br />\t", $filedata['error'])) . '</span><br /><br />';
|
echo '<span style="color:red">' . sprintf($user->lang['ADMIN_UPLOAD_ERROR'], implode("<br />\t", $filedata['error'])) . '</span><br /><br />';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Search Imagick
|
// Search Imagick
|
||||||
function search_imagemagick()
|
function search_imagemagick()
|
||||||
|
@ -1551,7 +1551,7 @@ function perform_site_list()
|
||||||
$ip_2_counter = ($ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[2] : 0;
|
$ip_2_counter = ($ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[2] : 0;
|
||||||
$ip_2_end = ($ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[6];
|
$ip_2_end = ($ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[6];
|
||||||
|
|
||||||
if($ip_2_counter == 0 && $ip_2_end == 254)
|
if ($ip_2_counter == 0 && $ip_2_end == 254)
|
||||||
{
|
{
|
||||||
$ip_2_counter = 256;
|
$ip_2_counter = 256;
|
||||||
$ip_2_fragment = 256;
|
$ip_2_fragment = 256;
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_ban.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Tue Jul 31, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001,2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_ban'))
|
if (!$auth->acl_get('a_ban'))
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_bbcodes.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Wed Aug 20, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_bbcode'))
|
if (!$auth->acl_get('a_bbcode'))
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_board.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu Jul 12, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
$filename = basename(__FILE__);
|
$filename = basename(__FILE__);
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_bots.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Tue Oct 15, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_server'))
|
if (!$auth->acl_get('a_server'))
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_database.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu May 31, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
$filename = basename(__FILE__);
|
$filename = basename(__FILE__);
|
||||||
|
|
|
@ -1,24 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/**
|
||||||
* admin_disallow.php
|
*
|
||||||
* -------------------
|
* @package acp
|
||||||
* begin : Tuesday, Oct 05, 2001
|
* @version $Id$
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* email : support@phpbb.com
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
* $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; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_names'))
|
if (!$auth->acl_get('a_names'))
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_email.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu May 31, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
$file = basename(__FILE__);
|
$file = basename(__FILE__);
|
||||||
|
@ -161,10 +160,7 @@ if (isset($_POST['submit']))
|
||||||
}
|
}
|
||||||
unset($email_list);
|
unset($email_list);
|
||||||
|
|
||||||
if ($messenger->queue)
|
$messenger->save_queue();
|
||||||
{
|
|
||||||
$messenger->queue->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($group_id)
|
if ($group_id)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_forums.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu Jul 12, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
/*
|
|
||||||
TODO:
|
|
||||||
|
|
||||||
- make a function to verify and/or fix the tree?
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_gets('a_forum', 'a_forumadd', 'a_forumdel'))
|
if (!$auth->acl_gets('a_forum', 'a_forumadd', 'a_forumdel'))
|
||||||
|
|
|
@ -1,20 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_groups.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001,2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
* @todo Avatar gallery ...
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
* @todo Mass user pref setting via group membership
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
// Avatar gallery ...
|
|
||||||
// Mass user pref setting via group membership
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_group'))
|
if (!$auth->acl_get('a_group'))
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_icons.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu Mar 13, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_icons'))
|
if (!$auth->acl_get('a_icons'))
|
||||||
|
|
|
@ -1,19 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_jabber.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
* @todo Check/enter/update transport info
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
*/
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
// Check/enter/update transport info
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_server'))
|
if (!$auth->acl_get('a_server'))
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_language.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Jan 23, 2005
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001,2005 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
/**
|
||||||
// -------------------------------------------------------------
|
*/
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// * new auth?
|
// * new auth?
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_permissions.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
$filename = basename(__FILE__);
|
$filename = basename(__FILE__);
|
||||||
|
|
|
@ -1,24 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/**
|
||||||
* admin_board.php
|
*
|
||||||
* -------------------
|
* @package acp
|
||||||
* begin : Thursday, Jul 12, 2001
|
* @version $Id$
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* email : support@phpbb.com
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
* $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; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
$module['GENERAL']['PHP_INFO'] = ($auth->acl_get('a_server')) ? basename(__FILE__) . $SID : '';
|
$module['GENERAL']['PHP_INFO'] = ($auth->acl_get('a_server')) ? basename(__FILE__) . $SID : '';
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_profile.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sun Apr 20, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
/**
|
||||||
// -------------------------------------------------------------
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Remind if...
|
Remind if...
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_prune.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon Jul 31, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_prune'))
|
if (!$auth->acl_get('a_prune'))
|
||||||
|
|
|
@ -1,24 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/**
|
||||||
* admin_prune_users.php
|
*
|
||||||
* -------------------
|
* @package acp
|
||||||
* begin : Saturday, Feb 13, 2001
|
* @version $Id$
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* email : support@phpbb.com
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
* $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; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_userdel'))
|
if (!$auth->acl_get('a_userdel'))
|
||||||
|
|
|
@ -1,24 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/**
|
||||||
* admin_ranks.php
|
*
|
||||||
* -------------------
|
* @package acp
|
||||||
* begin : Thursday, Jul 12, 2001
|
* @version $Id$
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* email : support@phpbb.com
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
* $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; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_ranks'))
|
if (!$auth->acl_get('a_ranks'))
|
||||||
|
|
|
@ -1,24 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/**
|
||||||
* admin_search.php
|
*
|
||||||
* -------------------
|
* @package acp
|
||||||
* begin : Saturday, Feb 13, 2001
|
* @version $Id$
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* email : support@phpbb.com
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
* $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; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_search'))
|
if (!$auth->acl_get('a_search'))
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_styles.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu Aug 7 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
/**
|
||||||
// -------------------------------------------------------------
|
*/
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// For M-3
|
// For M-3
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_users.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001,2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_gets('a_user', 'a_useradd', 'a_userdel'))
|
if (!$auth->acl_gets('a_user', 'a_useradd', 'a_userdel'))
|
||||||
|
@ -321,7 +320,7 @@ e_help = "<?php echo $user->lang['BBCODE_E_HELP']; ?>";
|
||||||
);
|
);
|
||||||
|
|
||||||
$messenger->send(NOTIFY_EMAIL);
|
$messenger->send(NOTIFY_EMAIL);
|
||||||
$messenger->queue->save();
|
$messenger->save_queue();
|
||||||
|
|
||||||
add_log('admin', 'LOG_USER_REACTIVATE', $username);
|
add_log('admin', 'LOG_USER_REACTIVATE', $username);
|
||||||
add_log('user', $user_id, 'LOG_USER_REACTIVATE_USER');
|
add_log('user', $user_id, 'LOG_USER_REACTIVATE_USER');
|
||||||
|
@ -2020,7 +2019,7 @@ if (!$auth->acl_get('a_user'))
|
||||||
adm_page_footer();
|
adm_page_footer();
|
||||||
|
|
||||||
|
|
||||||
// Module class
|
/* Module class
|
||||||
class acp_admin_users extends module
|
class acp_admin_users extends module
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2028,5 +2027,6 @@ class acp_admin_users extends module
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_viewlogs.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_'))
|
if (!$auth->acl_get('a_'))
|
||||||
|
@ -54,10 +53,7 @@ $sort_dir = request_var('sd', 'd');
|
||||||
// Define some vars depending on which logs we're looking at
|
// Define some vars depending on which logs we're looking at
|
||||||
$log_type = ($mode == 'admin') ? LOG_ADMIN : (($mode == 'mod') ? LOG_MOD : LOG_CRITICAL);
|
$log_type = ($mode == 'admin') ? LOG_ADMIN : (($mode == 'mod') ? LOG_MOD : LOG_CRITICAL);
|
||||||
|
|
||||||
if ($log_type == LOG_MOD)
|
$user->add_lang('mcp');
|
||||||
{
|
|
||||||
$user->add_lang('mcp');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete entries if requested and able
|
// Delete entries if requested and able
|
||||||
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
|
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
|
||||||
|
@ -125,8 +121,24 @@ if ($mode == 'mod')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Grab log data
|
||||||
|
//
|
||||||
|
$log_data = array();
|
||||||
|
$log_count = 0;
|
||||||
|
view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="left" valign="top"> <span class="nav"><?php echo on_page($log_count, $config['topics_per_page'], $start); ?></span></td>
|
||||||
|
<td align="right" valign="top" nowrap="nowrap">
|
||||||
|
<span class="nav"><?php echo generate_pagination("admin_viewlogs.$phpEx$SID&mode=$mode&$u_sort_param", $log_count, $config['topics_per_page'], $start, true); ?></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0">
|
<table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cat" colspan="5" height="28" align="center"><?php echo $user->lang['DISPLAY_LOG']; ?>: <?php echo $s_limit_days; ?> <?php echo $user->lang['SORT_BY']; ?>: <?php echo $s_sort_key; ?> <?php echo $s_sort_dir; ?> <input class="btnlite" type="submit" value="<?php echo $user->lang['GO']; ?>" name="sort" /></td>
|
<td class="cat" colspan="5" height="28" align="center"><?php echo $user->lang['DISPLAY_LOG']; ?>: <?php echo $s_limit_days; ?> <?php echo $user->lang['SORT_BY']; ?>: <?php echo $s_sort_key; ?> <?php echo $s_sort_dir; ?> <input class="btnlite" type="submit" value="<?php echo $user->lang['GO']; ?>" name="sort" /></td>
|
||||||
|
@ -140,13 +152,6 @@ if ($mode == 'mod')
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
//
|
|
||||||
// Grab log data
|
|
||||||
//
|
|
||||||
$log_data = array();
|
|
||||||
$log_count = 0;
|
|
||||||
view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort);
|
|
||||||
|
|
||||||
$row_class = '';
|
$row_class = '';
|
||||||
|
|
||||||
if ($log_count)
|
if ($log_count)
|
||||||
|
@ -222,7 +227,7 @@ else
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo generate_pagination("admin_viewlogs.$phpEx$SID&mode=$mode&$u_sort_param", $log_count, $config['topics_per_page'], $start);
|
echo generate_pagination("admin_viewlogs.$phpEx$SID&mode=$mode&$u_sort_param", $log_count, $config['topics_per_page'], $start, true);
|
||||||
|
|
||||||
?></span></td>
|
?></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : admin_words.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu Jul 12, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
if (!$auth->acl_get('a_words'))
|
if (!$auth->acl_get('a_words'))
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : adm/index.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
define('IN_PHPBB', 1);
|
define('IN_PHPBB', 1);
|
||||||
// Include files
|
// Include files
|
||||||
$phpbb_root_path = './../';
|
$phpbb_root_path = './../';
|
||||||
|
@ -205,10 +204,7 @@ elseif ($pane == 'right')
|
||||||
}
|
}
|
||||||
while ($row = $db->sql_fetchrow($result));
|
while ($row = $db->sql_fetchrow($result));
|
||||||
|
|
||||||
if ($messenger->queue)
|
$messenger->save_queue();
|
||||||
{
|
|
||||||
$messenger->queue->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($email_list);
|
unset($email_list);
|
||||||
|
|
||||||
|
@ -283,7 +279,6 @@ elseif ($pane == 'right')
|
||||||
add_log('admin', 'LOG_RESYNC_STATS');
|
add_log('admin', 'LOG_RESYNC_STATS');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// TODO: Temporary or a useful function?
|
|
||||||
case 'user':
|
case 'user':
|
||||||
if (!$auth->acl_get('a_defaults'))
|
if (!$auth->acl_get('a_defaults'))
|
||||||
{
|
{
|
||||||
|
@ -295,36 +290,33 @@ elseif ($pane == 'right')
|
||||||
$forum_ary = array();
|
$forum_ary = array();
|
||||||
foreach ($post_count_ary as $forum_id => $allowed)
|
foreach ($post_count_ary as $forum_id => $allowed)
|
||||||
{
|
{
|
||||||
if ($allowed['f_read'] && $allowed['f_postcount'])
|
if ($allowed['f_postcount'])
|
||||||
{
|
{
|
||||||
$forum_ary[] = $forum_id;
|
$forum_ary[] = $forum_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$post_count_sql = (sizeof($forum_ary)) ? 'AND f.forum_id IN (' . implode(', ', $forum_ary) . ')' : '';
|
|
||||||
unset($forum_ary, $post_count_ary);
|
|
||||||
|
|
||||||
$sql = 'SELECT user_id FROM ' . USERS_TABLE . '
|
if (!sizeof($forum_ary))
|
||||||
WHERE user_type NOT IN (' . USER_INACTIVE . ')';
|
{
|
||||||
|
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_posts = 0');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
|
||||||
|
FROM ' . POSTS_TABLE . '
|
||||||
|
WHERE poster_id <> ' . ANONYMOUS . '
|
||||||
|
AND forum_id IN (' . implode(', ', $forum_ary) . ')
|
||||||
|
GROUP BY poster_id';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
while ($user_row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$user_id = (int) $user_row['user_id'];
|
$db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['poster_id']}");
|
||||||
|
|
||||||
$sql = 'SELECT COUNT(p.post_id) AS num_posts
|
|
||||||
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
|
|
||||||
WHERE p.poster_id = ' . $user_id . "
|
|
||||||
AND f.forum_id = p.forum_id
|
|
||||||
$post_count_sql";
|
|
||||||
$result2 = $db->sql_query($sql);
|
|
||||||
$num_real_posts = (int) $db->sql_fetchfield('num_posts', 0, $result2);
|
|
||||||
$db->sql_freeresult($result2);
|
|
||||||
|
|
||||||
$db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = $num_real_posts WHERE user_id = $user_id");
|
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
|
||||||
add_log('admin', 'LOG_RESYNC_USER');
|
add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'date':
|
case 'date':
|
||||||
|
@ -333,7 +325,7 @@ elseif ($pane == 'right')
|
||||||
trigger_error($user->lang['NO_ADMIN']);
|
trigger_error($user->lang['NO_ADMIN']);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_config('board_startdate', time() - 1, true);
|
set_config('board_startdate', time() - 1);
|
||||||
add_log('admin', 'LOG_RESET_DATE');
|
add_log('admin', 'LOG_RESET_DATE');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -537,8 +529,7 @@ elseif ($pane == 'right')
|
||||||
<td class="row2"> </td>
|
<td class="row2"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cat" colspan="4" align="right"><select name="action"><option value="online"><?php echo $user->lang['RESET_ONLINE']; ?></option><option value="date"><?php echo $user->lang['RESET_DATE']; ?></option><option value="stats"><?php echo $user->lang['RESYNC_STATS']; ?></option>
|
<td class="cat" colspan="4" align="right"><select name="action"><option value="online"><?php echo $user->lang['RESET_ONLINE']; ?></option><option value="date"><?php echo $user->lang['RESET_DATE']; ?></option><option value="stats"><?php echo $user->lang['RESYNC_STATS']; ?></option><option value="user"><?php echo $user->lang['RESYNC_POSTCOUNTS']; ?></option>
|
||||||
<!-- option value="user"><?php echo $user->lang['RESYNC_USER_POSTS']; ?></option -->
|
|
||||||
</select> <input class="btnlite" type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" /> </td>
|
</select> <input class="btnlite" type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" /> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></form>
|
</table></form>
|
||||||
|
|
|
@ -1,21 +1,20 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : pagestart.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu Aug 2, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
if (!defined('IN_PHPBB'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
define('NEED_SID', true);
|
define('NEED_SID', true);
|
||||||
define('IN_ADMIN', true);
|
define('IN_ADMIN', true);
|
||||||
require($phpbb_root_path . 'common.'.$phpEx);
|
require($phpbb_root_path . 'common.'.$phpEx);
|
||||||
|
@ -324,7 +323,10 @@ function build_cfg_template($tpl_type, $config_key, $options = '')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// General ACP module class
|
/**
|
||||||
|
* @package acp
|
||||||
|
* General ACP module class
|
||||||
|
*/
|
||||||
class module
|
class module
|
||||||
{
|
{
|
||||||
var $id = 0;
|
var $id = 0;
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : common.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 17, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
/**
|
||||||
// -------------------------------------------------------------
|
*/
|
||||||
|
|
||||||
// Remove the following line to enable this software, be sure you note what it
|
// Remove the following line to enable this software, be sure you note what it
|
||||||
// says before continuing
|
// says before continuing
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : download.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu Apr 10, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
$phpbb_root_path = './';
|
$phpbb_root_path = './';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
|
@ -144,10 +143,9 @@ else
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ---------
|
/**
|
||||||
// FUNCTIONS
|
* Send file to browser
|
||||||
//
|
*/
|
||||||
|
|
||||||
function send_file_to_browser($attachment, $upload_dir, $category)
|
function send_file_to_browser($attachment, $upload_dir, $category)
|
||||||
{
|
{
|
||||||
global $user, $db, $config, $phpbb_root_path;
|
global $user, $db, $config, $phpbb_root_path;
|
||||||
|
@ -236,6 +234,9 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if downloading item is allowed
|
||||||
|
*/
|
||||||
function download_allowed()
|
function download_allowed()
|
||||||
{
|
{
|
||||||
global $config, $user, $db;
|
global $config, $user, $db;
|
||||||
|
@ -330,8 +331,4 @@ function download_allowed()
|
||||||
return $allowed;
|
return $allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// FUNCTIONS
|
|
||||||
// ---------
|
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : faq.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon Jul 8, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
$phpbb_root_path = './';
|
$phpbb_root_path = './';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acm_db
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : acm_db.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package acm_db
|
||||||
|
* ACM Database Caching
|
||||||
|
*/
|
||||||
class acm
|
class acm
|
||||||
{
|
{
|
||||||
// Contains all loaded variables
|
// Contains all loaded variables
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package acm_file
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : acm_file.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package acm_file
|
||||||
|
* ACM File Based Caching
|
||||||
|
*/
|
||||||
class acm
|
class acm
|
||||||
{
|
{
|
||||||
var $vars = array();
|
var $vars = array();
|
||||||
|
|
|
@ -1,16 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* Apache auth plug-in for phpBB3
|
||||||
|
*
|
||||||
|
* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
|
||||||
|
*
|
||||||
|
* This is for initial authentication via Apaches basic realm authentication methods,
|
||||||
|
* user data is then obtained from the integrated user table
|
||||||
|
*
|
||||||
|
* You can do any kind of checking you like here ... the return data format is
|
||||||
|
* either the resulting row of user information, an integer zero (indicating an
|
||||||
|
* inactive user) or some error string
|
||||||
|
*
|
||||||
|
* @package login
|
||||||
|
* @version $Id$
|
||||||
|
* @copyright (c) 2005 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
// Apache auth plug-in for phpBB 2.2
|
/**
|
||||||
// $Id$
|
* Login function
|
||||||
//
|
*/
|
||||||
// Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
|
|
||||||
//
|
|
||||||
// This is for initial authentication via Apaches basic realm authentication methods,
|
|
||||||
// user data is then obtained from the integrated user table
|
|
||||||
//
|
|
||||||
// You can do any kind of checking you like here ... the return data format is
|
|
||||||
// either the resulting row of user information, an integer zero (indicating an
|
|
||||||
// inactive user) or some error string
|
|
||||||
function login_apache(&$username, &$password)
|
function login_apache(&$username, &$password)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
|
@ -1,15 +1,25 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* Database auth plug-in for phpBB3
|
||||||
|
*
|
||||||
|
* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
|
||||||
|
*
|
||||||
|
* This is for authentication via the integrated user table
|
||||||
|
*
|
||||||
|
* You can do any kind of checking you like here ... the return data format is
|
||||||
|
* either the resulting row of user information, an integer zero (indicating an
|
||||||
|
* inactive user) or some error string
|
||||||
|
*
|
||||||
|
* @package login
|
||||||
|
* @version $Id$
|
||||||
|
* @copyright (c) 2005 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
// Database auth plug-in for phpBB 2.2
|
/**
|
||||||
// $Id$
|
* Login function
|
||||||
//
|
*/
|
||||||
// Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
|
|
||||||
//
|
|
||||||
// This is for authentication via the integrated user table
|
|
||||||
//
|
|
||||||
// You can do any kind of checking you like here ... the return data format is
|
|
||||||
// either the resulting row of user information, an integer zero (indicating an
|
|
||||||
// inactive user) or some error string
|
|
||||||
function login_db(&$username, &$password)
|
function login_db(&$username, &$password)
|
||||||
{
|
{
|
||||||
global $db, $config;
|
global $db, $config;
|
||||||
|
|
|
@ -1,16 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* LDAP auth plug-in for phpBB3
|
||||||
|
*
|
||||||
|
* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
|
||||||
|
*
|
||||||
|
* This is for initial authentication via an LDAP server, user information is then
|
||||||
|
* obtained from the integrated user table
|
||||||
|
*
|
||||||
|
* You can do any kind of checking you like here ... the return data format is
|
||||||
|
* either the resulting row of user information, an integer zero (indicating an
|
||||||
|
* inactive user) or some error string
|
||||||
|
*
|
||||||
|
* @package login
|
||||||
|
* @version $Id$
|
||||||
|
* @copyright (c) 2005 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
// LDAP auth plug-in for phpBB 2.2
|
/**
|
||||||
// $Id$
|
* Login function
|
||||||
//
|
*/
|
||||||
// Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
|
|
||||||
//
|
|
||||||
// This is for initial authentication via an LDAP server, user information is then
|
|
||||||
// obtained from the integrated user table
|
|
||||||
//
|
|
||||||
// You can do any kind of checking you like here ... the return data format is
|
|
||||||
// either the resulting row of user information, an integer zero (indicating an
|
|
||||||
// inactive user) or some error string
|
|
||||||
function login_ldap(&$username, &$password)
|
function login_ldap(&$username, &$password)
|
||||||
{
|
{
|
||||||
global $db, $config;
|
global $db, $config;
|
||||||
|
@ -52,8 +63,10 @@ function login_ldap(&$username, &$password)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function is used to output any required fields in the authentication
|
/**
|
||||||
// admin panel. It also defines any required configuration table fields.
|
* This function is used to output any required fields in the authentication
|
||||||
|
* admin panel. It also defines any required configuration table fields.
|
||||||
|
*/
|
||||||
function admin_ldap(&$new)
|
function admin_ldap(&$new)
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
@ -78,11 +91,13 @@ function admin_ldap(&$new)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Would be nice to allow syncing of 'appropriate' data when user updates
|
/**
|
||||||
// their username, password, etc. ... should be up to the plugin what data
|
* Would be nice to allow syncing of 'appropriate' data when user updates
|
||||||
// is updated.
|
* their username, password, etc. ... should be up to the plugin what data
|
||||||
//
|
* is updated.
|
||||||
// $mode perhaps being one of NEW, UPDATE, DELETE
|
*
|
||||||
|
* @param new|update|delete $mode defining the action to take on user updates
|
||||||
|
*/
|
||||||
function usercp_ldap($mode)
|
function usercp_ldap($mode)
|
||||||
{
|
{
|
||||||
global $db, $config;
|
global $db, $config;
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : bbcode.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// BBCODE - able to be used standalone
|
|
||||||
//
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* BBCode class
|
||||||
|
*/
|
||||||
class bbcode
|
class bbcode
|
||||||
{
|
{
|
||||||
var $bbcode_uid = '';
|
var $bbcode_uid = '';
|
||||||
|
|
|
@ -1,29 +1,25 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/**
|
||||||
* db2.php
|
*
|
||||||
* -------------------
|
* @package dbal_db2
|
||||||
* begin : Saturday, Feb 13, 2001
|
* @version $Id$
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* email : support@phpbb.com
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
* $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; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
if(!defined("SQL_LAYER"))
|
if(!defined("SQL_LAYER"))
|
||||||
{
|
{
|
||||||
|
|
||||||
define("SQL_LAYER","db2");
|
define("SQL_LAYER","db2");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package dbal_db2
|
||||||
|
* DB2 Database Abstraction Layer
|
||||||
|
*/
|
||||||
class sql_db
|
class sql_db
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package dbal_firebird
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : firebird.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
if (!defined('SQL_LAYER'))
|
if (!defined('SQL_LAYER'))
|
||||||
{
|
{
|
||||||
|
|
||||||
define('SQL_LAYER', 'firebird');
|
define('SQL_LAYER', 'firebird');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package dbal_firebird
|
||||||
|
* Firebird/Interbase Database Abstraction Layer
|
||||||
|
* Minimum Requirement is Firebird 1.5+/Interbase 7.1+
|
||||||
|
*/
|
||||||
class sql_db
|
class sql_db
|
||||||
{
|
{
|
||||||
var $db_connect_id;
|
var $db_connect_id;
|
||||||
|
|
|
@ -1,21 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package dbal_odbc_mssql
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : mssql-odbc.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
if (!defined('SQL_LAYER'))
|
if (!defined('SQL_LAYER'))
|
||||||
{
|
{
|
||||||
|
|
||||||
define('SQL_LAYER', 'mssql-odbc');
|
define('SQL_LAYER', 'mssql-odbc');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package dbal_odbc_mssql
|
||||||
|
* MSSQL ODBC Database Abstraction Layer for MSSQL
|
||||||
|
* Minimum Requirement is Version 2000+
|
||||||
|
*/
|
||||||
class sql_db
|
class sql_db
|
||||||
{
|
{
|
||||||
var $db_connect_id;
|
var $db_connect_id;
|
||||||
|
|
|
@ -1,29 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/**
|
||||||
* mssql.php
|
*
|
||||||
* -------------------
|
* @package dbal_mssql
|
||||||
* begin : Saturday, Feb 13, 2001
|
* @version $Id$
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* email : supportphpbb.com
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
* $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; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
if (!defined("SQL_LAYER"))
|
if (!defined("SQL_LAYER"))
|
||||||
{
|
{
|
||||||
|
|
||||||
define("SQL_LAYER","mssql");
|
define("SQL_LAYER","mssql");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package dbal_mssql
|
||||||
|
* MSSQL Database Abstraction Layer
|
||||||
|
* Minimum Requirement is MSSQL 2000+
|
||||||
|
*/
|
||||||
class sql_db
|
class sql_db
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package dbal_mysql
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : mysql.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
if (!defined('SQL_LAYER'))
|
if (!defined('SQL_LAYER'))
|
||||||
{
|
{
|
||||||
|
|
||||||
define('SQL_LAYER', 'mysql');
|
define('SQL_LAYER', 'mysql');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package dbal_mysql
|
||||||
|
* MySQL Database Abstraction Layer
|
||||||
|
* Minimum Requirement is 3.23+/4.0+/4.1+
|
||||||
|
*/
|
||||||
class sql_db
|
class sql_db
|
||||||
{
|
{
|
||||||
var $db_connect_id;
|
var $db_connect_id;
|
||||||
|
|
|
@ -1,21 +1,28 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package dbal_mysql4
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : mysql4.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
if (!defined('SQL_LAYER'))
|
if (!defined('SQL_LAYER'))
|
||||||
{
|
{
|
||||||
|
|
||||||
define('SQL_LAYER', 'mysql4');
|
define('SQL_LAYER', 'mysql4');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package dbal_mysql4
|
||||||
|
* MySQL4 Database Abstraction Layer
|
||||||
|
* Minimum Requirement is MySQL 4.1+
|
||||||
|
*
|
||||||
|
* @todo Rename mysql4.php to mysqli.php to reflect the used module
|
||||||
|
*/
|
||||||
class sql_db
|
class sql_db
|
||||||
{
|
{
|
||||||
var $db_connect_id;
|
var $db_connect_id;
|
||||||
|
|
|
@ -1,29 +1,25 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/**
|
||||||
* oracle.php
|
*
|
||||||
* -------------------
|
* @package dbal_oracle
|
||||||
* begin : Thrusday Feb 15, 2001
|
* @version $Id$
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* email : support@phpbb.com
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
* $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; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
if(!defined("SQL_LAYER"))
|
if(!defined("SQL_LAYER"))
|
||||||
{
|
{
|
||||||
|
|
||||||
define("SQL_LAYER","oracle");
|
define("SQL_LAYER","oracle");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package dbal_oracle
|
||||||
|
* Oracle Database Abstraction Layer
|
||||||
|
*/
|
||||||
class sql_db
|
class sql_db
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/**
|
||||||
* postgres7.php
|
*
|
||||||
* -------------------
|
* @package dbal_postgres
|
||||||
* begin : Saturday, Feb 13, 2001
|
* @version $Id$
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* email : supportphpbb.com
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
* $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; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
if (!defined("SQL_LAYER"))
|
if (!defined("SQL_LAYER"))
|
||||||
{
|
{
|
||||||
|
|
||||||
define("SQL_LAYER","postgresql");
|
define("SQL_LAYER","postgresql");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package dbal_postgres
|
||||||
|
* PostgreSQL Database Abstraction Layer
|
||||||
|
* Minimum Requirement is Version 7.3+
|
||||||
|
*/
|
||||||
class sql_db
|
class sql_db
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,25 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/**
|
||||||
* mysql.php
|
*
|
||||||
* -------------------
|
* @package dbal_sqlite
|
||||||
* begin : Saturday, Feb 13, 2001
|
* @version $Id$
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* email : support@phpbb.com
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
* $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; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
if (!defined('SQL_LAYER'))
|
if (!defined('SQL_LAYER'))
|
||||||
{
|
{
|
||||||
|
|
||||||
define('SQL_LAYER', 'sqlite');
|
define('SQL_LAYER', 'sqlite');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package dbal_sqlite
|
||||||
|
* Sqlite Database Abstraction Layer
|
||||||
|
*/
|
||||||
class sql_db
|
class sql_db
|
||||||
{
|
{
|
||||||
var $db_connect_id;
|
var $db_connect_id;
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : functions.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001,2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set variable, used by {@link request_var the request_var function}
|
||||||
|
*/
|
||||||
function set_var(&$result, $var, $type, $multibyte = false)
|
function set_var(&$result, $var, $type, $multibyte = false)
|
||||||
{
|
{
|
||||||
settype($var, $type);
|
settype($var, $type);
|
||||||
|
@ -29,6 +28,11 @@ function set_var(&$result, $var, $type, $multibyte = false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* request_var
|
||||||
|
*
|
||||||
|
* Used to get passed variable
|
||||||
|
*/
|
||||||
function request_var($var_name, $default, $multibyte = false)
|
function request_var($var_name, $default, $multibyte = false)
|
||||||
{
|
{
|
||||||
if (!isset($_REQUEST[$var_name]))
|
if (!isset($_REQUEST[$var_name]))
|
||||||
|
@ -66,6 +70,9 @@ function request_var($var_name, $default, $multibyte = false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set config value. Creates missing config entry.
|
||||||
|
*/
|
||||||
function set_config($config_name, $config_value, $is_dynamic = false)
|
function set_config($config_name, $config_value, $is_dynamic = false)
|
||||||
{
|
{
|
||||||
global $db, $cache, $config;
|
global $db, $cache, $config;
|
||||||
|
@ -92,7 +99,9 @@ function set_config($config_name, $config_value, $is_dynamic = false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generates an alphanumeric random string of given length
|
/**
|
||||||
|
* Generates an alphanumeric random string of given length
|
||||||
|
*/
|
||||||
function gen_rand_string($num_chars)
|
function gen_rand_string($num_chars)
|
||||||
{
|
{
|
||||||
$chars = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
$chars = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||||
|
@ -110,6 +119,10 @@ function gen_rand_string($num_chars)
|
||||||
return $rand_str;
|
return $rand_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get userdata
|
||||||
|
* @param mixed $user user id or username
|
||||||
|
*/
|
||||||
function get_userdata($user)
|
function get_userdata($user)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -123,7 +136,9 @@ function get_userdata($user)
|
||||||
return ($row = $db->sql_fetchrow($result)) ? $row : false;
|
return ($row = $db->sql_fetchrow($result)) ? $row : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create forum rules for given forum
|
/**
|
||||||
|
* Create forum rules for given forum
|
||||||
|
*/
|
||||||
function generate_forum_rules(&$forum_data)
|
function generate_forum_rules(&$forum_data)
|
||||||
{
|
{
|
||||||
if (!$forum_data['forum_rules'] && !$forum_data['forum_rules_link'])
|
if (!$forum_data['forum_rules'] && !$forum_data['forum_rules_link'])
|
||||||
|
@ -152,8 +167,10 @@ function generate_forum_rules(&$forum_data)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create forum navigation links for given forum, create parent
|
/**
|
||||||
// list if currently null, assign basic forum info to template
|
* Create forum navigation links for given forum, create parent
|
||||||
|
* list if currently null, assign basic forum info to template
|
||||||
|
*/
|
||||||
function generate_forum_nav(&$forum_data)
|
function generate_forum_nav(&$forum_data)
|
||||||
{
|
{
|
||||||
global $db, $user, $template, $phpEx, $SID, $phpbb_root_path;
|
global $db, $user, $template, $phpEx, $SID, $phpbb_root_path;
|
||||||
|
@ -194,7 +211,9 @@ function generate_forum_nav(&$forum_data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns forum parents as an array. Get them from forum_data if available, or update the database otherwise
|
/**
|
||||||
|
* Returns forum parents as an array. Get them from forum_data if available, or update the database otherwise
|
||||||
|
*/
|
||||||
function get_forum_parents(&$forum_data)
|
function get_forum_parents(&$forum_data)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -234,7 +253,9 @@ function get_forum_parents(&$forum_data)
|
||||||
return $forum_parents;
|
return $forum_parents;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obtain list of moderators of each forum
|
/**
|
||||||
|
* Obtain list of moderators of each forum
|
||||||
|
*/
|
||||||
function get_moderators(&$forum_moderators, $forum_id = false)
|
function get_moderators(&$forum_moderators, $forum_id = false)
|
||||||
{
|
{
|
||||||
global $config, $template, $db, $phpEx, $SID;
|
global $config, $template, $db, $phpEx, $SID;
|
||||||
|
@ -270,7 +291,9 @@ function get_moderators(&$forum_moderators, $forum_id = false)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// User authorisation levels output
|
/**
|
||||||
|
* User authorisation levels output
|
||||||
|
*/
|
||||||
function gen_forum_auth_level($mode, $forum_id)
|
function gen_forum_auth_level($mode, $forum_id)
|
||||||
{
|
{
|
||||||
global $SID, $template, $auth, $user;
|
global $SID, $template, $auth, $user;
|
||||||
|
@ -291,6 +314,9 @@ function gen_forum_auth_level($mode, $forum_id)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate sort selection fields
|
||||||
|
*/
|
||||||
function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key, &$sort_dir, &$s_limit_days, &$s_sort_key, &$s_sort_dir, &$u_sort_param)
|
function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key, &$sort_dir, &$s_limit_days, &$s_sort_key, &$s_sort_dir, &$u_sort_param)
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
@ -326,6 +352,9 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate Jumpbox
|
||||||
|
*/
|
||||||
function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list = false)
|
function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list = false)
|
||||||
{
|
{
|
||||||
global $config, $auth, $template, $user, $db, $phpEx, $SID;
|
global $config, $auth, $template, $user, $db, $phpEx, $SID;
|
||||||
|
@ -419,7 +448,9 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pick a language, any language ...
|
/**
|
||||||
|
* Pick a language, any language ...
|
||||||
|
*/
|
||||||
function language_select($default = '')
|
function language_select($default = '')
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -440,7 +471,9 @@ function language_select($default = '')
|
||||||
return $lang_options;
|
return $lang_options;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pick a template/theme combo,
|
/**
|
||||||
|
* Pick a template/theme combo,
|
||||||
|
*/
|
||||||
function style_select($default = '', $all = false)
|
function style_select($default = '', $all = false)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -463,7 +496,9 @@ function style_select($default = '', $all = false)
|
||||||
return $style_options;
|
return $style_options;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pick a timezone
|
/**
|
||||||
|
* Pick a timezone
|
||||||
|
*/
|
||||||
function tz_select($default = '')
|
function tz_select($default = '')
|
||||||
{
|
{
|
||||||
global $sys_timezone, $user;
|
global $sys_timezone, $user;
|
||||||
|
@ -481,7 +516,9 @@ function tz_select($default = '')
|
||||||
return $tz_select;
|
return $tz_select;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Topic and forum watching common code
|
/**
|
||||||
|
* Topic and forum watching common code
|
||||||
|
*/
|
||||||
function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $match_id, $notify_status = 'unset', $start = 0)
|
function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $match_id, $notify_status = 'unset', $start = 0)
|
||||||
{
|
{
|
||||||
global $template, $db, $user, $phpEx, $SID, $start, $phpbb_root_path;
|
global $template, $db, $user, $phpEx, $SID, $start, $phpbb_root_path;
|
||||||
|
@ -586,7 +623,9 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Marks a topic or form as read
|
/**
|
||||||
|
* Marks a topic or form as read
|
||||||
|
*/
|
||||||
function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false)
|
function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false)
|
||||||
{
|
{
|
||||||
global $config, $db, $user;
|
global $config, $db, $user;
|
||||||
|
@ -759,10 +798,11 @@ function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
// Pagination routine, generates page number sequence
|
* Pagination routine, generates page number sequence
|
||||||
// tpl_prefix is for using different pagination blocks at one page
|
* tpl_prefix is for using different pagination blocks at one page
|
||||||
function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = true, $tpl_prefix = '')
|
*/
|
||||||
|
function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = false, $tpl_prefix = '')
|
||||||
{
|
{
|
||||||
global $template, $user;
|
global $template, $user;
|
||||||
|
|
||||||
|
@ -813,6 +853,19 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
|
||||||
|
|
||||||
$page_string .= ($on_page == $total_pages) ? '<strong>' . $total_pages . '</strong>' : '<a href="' . $base_url . '&start=' . (($total_pages - 1) * $per_page) . '">' . $total_pages . '</a>';
|
$page_string .= ($on_page == $total_pages) ? '<strong>' . $total_pages . '</strong>' : '<a href="' . $base_url . '&start=' . (($total_pages - 1) * $per_page) . '">' . $total_pages . '</a>';
|
||||||
|
|
||||||
|
if ($add_prevnext_text)
|
||||||
|
{
|
||||||
|
if ($on_page != 1)
|
||||||
|
{
|
||||||
|
$page_string = '<a href="' . $base_url . '&start=' . (($on_page - 2) * $per_page) . '">' . $user->lang['PREVIOUS'] . '</a> ' . $page_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($on_page != $total_pages)
|
||||||
|
{
|
||||||
|
$page_string .= ' <a href="' . $base_url . '&start=' . ($on_page * $per_page) . '">' . $user->lang['NEXT'] . '</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
$tpl_prefix . 'BASE_URL' => $base_url,
|
$tpl_prefix . 'BASE_URL' => $base_url,
|
||||||
$tpl_prefix . 'PER_PAGE' => $per_page,
|
$tpl_prefix . 'PER_PAGE' => $per_page,
|
||||||
|
@ -824,6 +877,9 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
|
||||||
return $page_string;
|
return $page_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return current page (pagination)
|
||||||
|
*/
|
||||||
function on_page($num_items, $per_page, $start)
|
function on_page($num_items, $per_page, $start)
|
||||||
{
|
{
|
||||||
global $template, $user;
|
global $template, $user;
|
||||||
|
@ -835,9 +891,10 @@ function on_page($num_items, $per_page, $start)
|
||||||
return sprintf($user->lang['PAGE_OF'], $on_page, max(ceil($num_items / $per_page), 1));
|
return sprintf($user->lang['PAGE_OF'], $on_page, max(ceil($num_items / $per_page), 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obtain list of naughty words and build preg style replacement arrays for use by the
|
/**
|
||||||
// calling script, note that the vars are passed as references this just makes it easier
|
* Obtain list of naughty words and build preg style replacement arrays for use by the
|
||||||
// to return both sets of arrays
|
* calling script
|
||||||
|
*/
|
||||||
function obtain_word_list(&$censors)
|
function obtain_word_list(&$censors)
|
||||||
{
|
{
|
||||||
global $db, $cache, $user;
|
global $db, $cache, $user;
|
||||||
|
@ -871,7 +928,9 @@ function obtain_word_list(&$censors)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obtain currently listed icons, re-caching if necessary
|
/**
|
||||||
|
* Obtain currently listed icons
|
||||||
|
*/
|
||||||
function obtain_icons(&$icons)
|
function obtain_icons(&$icons)
|
||||||
{
|
{
|
||||||
global $db, $cache;
|
global $db, $cache;
|
||||||
|
@ -904,7 +963,9 @@ function obtain_icons(&$icons)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obtain ranks
|
/**
|
||||||
|
* Obtain ranks
|
||||||
|
*/
|
||||||
function obtain_ranks(&$ranks)
|
function obtain_ranks(&$ranks)
|
||||||
{
|
{
|
||||||
global $db, $cache;
|
global $db, $cache;
|
||||||
|
@ -945,7 +1006,9 @@ function obtain_ranks(&$ranks)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obtain allowed extensions
|
/**
|
||||||
|
* Obtain allowed extensions
|
||||||
|
*/
|
||||||
function obtain_attach_extensions(&$extensions, $forum_id = false)
|
function obtain_attach_extensions(&$extensions, $forum_id = false)
|
||||||
{
|
{
|
||||||
global $db, $cache;
|
global $db, $cache;
|
||||||
|
@ -1025,6 +1088,9 @@ function obtain_attach_extensions(&$extensions, $forum_id = false)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate board url
|
||||||
|
*/
|
||||||
function generate_board_url()
|
function generate_board_url()
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
@ -1034,7 +1100,9 @@ function generate_board_url()
|
||||||
return (($config['cookie_secure']) ? 'https://' : 'http://') . preg_replace('#^/?(.*?)/?$#', '\1', trim($config['server_name'])) . (($config['server_port'] <> 80) ? ':' . trim($config['server_port']) : '') . (($path) ? '/' . $path : '');
|
return (($config['cookie_secure']) ? 'https://' : 'http://') . preg_replace('#^/?(.*?)/?$#', '\1', trim($config['server_name'])) . (($config['server_port'] <> 80) ? ':' . trim($config['server_port']) : '') . (($path) ? '/' . $path : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redirects the user to another page then exits the script nicely
|
/**
|
||||||
|
* Redirects the user to another page then exits the script nicely
|
||||||
|
*/
|
||||||
function redirect($url)
|
function redirect($url)
|
||||||
{
|
{
|
||||||
global $db, $cache, $config, $user;
|
global $db, $cache, $config, $user;
|
||||||
|
@ -1072,7 +1140,9 @@ function redirect($url)
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Meta refresh assignment
|
/**
|
||||||
|
* Meta refresh assignment
|
||||||
|
*/
|
||||||
function meta_refresh($time, $url)
|
function meta_refresh($time, $url)
|
||||||
{
|
{
|
||||||
global $template;
|
global $template;
|
||||||
|
@ -1082,7 +1152,9 @@ function meta_refresh($time, $url)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build Confirm box
|
/**
|
||||||
|
* Build Confirm box
|
||||||
|
*/
|
||||||
function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html')
|
function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html')
|
||||||
{
|
{
|
||||||
global $user, $template, $db;
|
global $user, $template, $db;
|
||||||
|
@ -1159,10 +1231,12 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
||||||
page_footer();
|
page_footer();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate login box or verify password
|
/**
|
||||||
|
* Generate login box or verify password
|
||||||
|
*/
|
||||||
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
|
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
|
||||||
{
|
{
|
||||||
global $SID, $db, $user, $template, $auth, $phpEx, $phpbb_root_path;
|
global $SID, $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
|
||||||
|
|
||||||
$err = '';
|
$err = '';
|
||||||
|
|
||||||
|
@ -1177,6 +1251,12 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||||
// If authentication is successful we redirect user to previous page
|
// If authentication is successful we redirect user to previous page
|
||||||
if (($result = $auth->login($username, $password, $autologin, $viewonline, $admin)) === true)
|
if (($result = $auth->login($username, $password, $autologin, $viewonline, $admin)) === true)
|
||||||
{
|
{
|
||||||
|
// If admin authentication
|
||||||
|
if ($admin)
|
||||||
|
{
|
||||||
|
add_log('admin', 'LOG_ADMIN_AUTH_SUCCESS');
|
||||||
|
}
|
||||||
|
|
||||||
$redirect = request_var('redirect', "index.$phpEx$SID");
|
$redirect = request_var('redirect', "index.$phpEx$SID");
|
||||||
meta_refresh(3, $redirect);
|
meta_refresh(3, $redirect);
|
||||||
|
|
||||||
|
@ -1184,6 +1264,11 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||||
trigger_error($message);
|
trigger_error($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($admin)
|
||||||
|
{
|
||||||
|
add_log('admin', 'LOG_ADMIN_AUTH_FAIL');
|
||||||
|
}
|
||||||
|
|
||||||
// If we get a non-numeric (e.g. string) value we output an error
|
// If we get a non-numeric (e.g. string) value we output an error
|
||||||
if (is_string($result))
|
if (is_string($result))
|
||||||
{
|
{
|
||||||
|
@ -1216,7 +1301,8 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||||
'LOGIN_ERROR' => $err,
|
'LOGIN_ERROR' => $err,
|
||||||
'LOGIN_EXPLAIN' => $l_explain,
|
'LOGIN_EXPLAIN' => $l_explain,
|
||||||
|
|
||||||
'U_SEND_PASSWORD' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=sendpassword",
|
'U_SEND_PASSWORD' => ($config['email_enable']) ? "{$phpbb_root_path}ucp.$phpEx$SID&mode=sendpassword" : '',
|
||||||
|
'U_RESEND_ACTIVATION' => ($config['require_activation'] != USER_ACTIVATION_NONE && $config['email_enable']) ? "{$phpbb_root_path}ucp.$phpEx$SID&mode=resend_act" : '',
|
||||||
'U_TERMS_USE' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=terms",
|
'U_TERMS_USE' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=terms",
|
||||||
'U_PRIVACY' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=privacy",
|
'U_PRIVACY' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=privacy",
|
||||||
|
|
||||||
|
@ -1235,7 +1321,9 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||||
page_footer();
|
page_footer();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate forum login box
|
/**
|
||||||
|
* Generate forum login box
|
||||||
|
*/
|
||||||
function login_forum_box(&$forum_data)
|
function login_forum_box(&$forum_data)
|
||||||
{
|
{
|
||||||
global $db, $config, $user, $template, $phpEx;
|
global $db, $config, $user, $template, $phpEx;
|
||||||
|
@ -1297,7 +1385,9 @@ function login_forum_box(&$forum_data)
|
||||||
page_footer();
|
page_footer();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bump Topic Check - used by posting and viewtopic
|
/**
|
||||||
|
* Bump Topic Check - used by posting and viewtopic
|
||||||
|
*/
|
||||||
function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_poster, $last_topic_poster)
|
function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_poster, $last_topic_poster)
|
||||||
{
|
{
|
||||||
global $config, $auth, $user;
|
global $config, $auth, $user;
|
||||||
|
@ -1327,7 +1417,9 @@ function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_po
|
||||||
return $bump_time;
|
return $bump_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Censoring
|
/**
|
||||||
|
* Censoring
|
||||||
|
*/
|
||||||
function censor_text($text)
|
function censor_text($text)
|
||||||
{
|
{
|
||||||
global $censors, $user;
|
global $censors, $user;
|
||||||
|
@ -1336,7 +1428,7 @@ function censor_text($text)
|
||||||
{
|
{
|
||||||
$censors = array();
|
$censors = array();
|
||||||
|
|
||||||
// For ANONYMOUS, this option should be enabled by default
|
// TODO: For ANONYMOUS, this option should be enabled by default
|
||||||
if ($user->optionget('viewcensors'))
|
if ($user->optionget('viewcensors'))
|
||||||
{
|
{
|
||||||
obtain_word_list($censors);
|
obtain_word_list($censors);
|
||||||
|
@ -1351,7 +1443,9 @@ function censor_text($text)
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Smiley processing
|
/**
|
||||||
|
* Smiley processing
|
||||||
|
*/
|
||||||
function smiley_text($text, $force_option = false)
|
function smiley_text($text, $force_option = false)
|
||||||
{
|
{
|
||||||
global $config, $user, $phpbb_root_path;
|
global $config, $user, $phpbb_root_path;
|
||||||
|
@ -1359,7 +1453,9 @@ function smiley_text($text, $force_option = false)
|
||||||
return ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies')) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $text) : str_replace('<img src="{SMILIES_PATH}', '<img src="' . $phpbb_root_path . $config['smilies_path'], $text);
|
return ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies')) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $text) : str_replace('<img src="{SMILIES_PATH}', '<img src="' . $phpbb_root_path . $config['smilies_path'], $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inline Attachment processing
|
/**
|
||||||
|
* Inline Attachment processing
|
||||||
|
*/
|
||||||
function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_id = 0, $preview = false)
|
function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_id = 0, $preview = false)
|
||||||
{
|
{
|
||||||
global $config, $user;
|
global $config, $user;
|
||||||
|
@ -1391,7 +1487,9 @@ function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_
|
||||||
return array_unique($unset_tpl);
|
return array_unique($unset_tpl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if extension is allowed to be posted within forum X (forum_id 0 == private messaging)
|
/**
|
||||||
|
* Check if extension is allowed to be posted within forum X (forum_id 0 == private messaging)
|
||||||
|
*/
|
||||||
function extension_allowed($forum_id, $extension, &$extensions)
|
function extension_allowed($forum_id, $extension, &$extensions)
|
||||||
{
|
{
|
||||||
if (!sizeof($extensions))
|
if (!sizeof($extensions))
|
||||||
|
@ -1425,7 +1523,9 @@ function extension_allowed($forum_id, $extension, &$extensions)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error and message handler, call with trigger_error if reqd
|
/**
|
||||||
|
* Error and message handler, call with trigger_error if reqd
|
||||||
|
*/
|
||||||
function msg_handler($errno, $msg_text, $errfile, $errline)
|
function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||||
{
|
{
|
||||||
global $cache, $db, $auth, $template, $config, $user;
|
global $cache, $db, $auth, $template, $config, $user;
|
||||||
|
@ -1515,21 +1615,12 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* remove me
|
|
||||||
default:
|
|
||||||
if (defined('DEBUG_EXTRA'))
|
|
||||||
{
|
|
||||||
if (!strstr($errfile, '/cache/'))
|
|
||||||
{
|
|
||||||
echo "<b>Another Error</b>: in file <b>$errfile</b> on line <b>$errline</b>: <b>$msg_text</b><br>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
/**
|
||||||
|
* Generate page header
|
||||||
|
*/
|
||||||
function page_header($page_title = '')
|
function page_header($page_title = '')
|
||||||
{
|
{
|
||||||
global $db, $config, $template, $SID, $user, $auth, $phpEx, $phpbb_root_path;
|
global $db, $config, $template, $SID, $user, $auth, $phpEx, $phpbb_root_path;
|
||||||
|
@ -1823,6 +1914,9 @@ function page_header($page_title = '')
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate page footer
|
||||||
|
*/
|
||||||
function page_footer()
|
function page_footer()
|
||||||
{
|
{
|
||||||
global $db, $config, $template, $SID, $user, $auth, $cache, $messenger, $starttime, $phpbb_root_path, $phpEx;
|
global $db, $config, $template, $SID, $user, $auth, $cache, $messenger, $starttime, $phpbb_root_path, $phpEx;
|
||||||
|
|
|
@ -1,39 +1,41 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : functions_admin.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001,2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// Simple version of jumpbox, just lists authed forums
|
/**
|
||||||
|
* Simple version of jumpbox, just lists authed forums
|
||||||
|
*/
|
||||||
function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true)
|
function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth;
|
global $db, $user, $auth;
|
||||||
|
|
||||||
$acl = ($ignore_acl) ? '' : array('f_list', 'a_forum', 'a_forumadd', 'a_forumdel');
|
$acl = ($ignore_acl) ? '' : array('f_list', 'a_forum', 'a_forumadd', 'a_forumdel');
|
||||||
$rowset = get_forum_list($acl, false, $ignore_nonpost, true);
|
|
||||||
|
|
||||||
$right = $cat_right = 0;
|
// This query is identical to the jumpbox one
|
||||||
$forum_list = $padding = $holding = '';
|
$sql = 'SELECT forum_id, parent_id, forum_name, forum_type, left_id, right_id
|
||||||
|
FROM ' . FORUMS_TABLE . '
|
||||||
|
ORDER BY left_id ASC';
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$right = $iteration = 0;
|
||||||
$padding_store = array('0' => '');
|
$padding_store = array('0' => '');
|
||||||
|
$forum_list = $padding = '';
|
||||||
|
|
||||||
foreach ($rowset as $row)
|
// Sometimes it could happen that forums will be displayed here not be displayed within the index page
|
||||||
{
|
// This is the result of forums not displayed at index, having list permissions and a parent of a forum with no permissions.
|
||||||
if ((is_array($ignore_id) && in_array($row['forum_id'], $ignore_id)) ||
|
// If this happens, the padding could be "broken"
|
||||||
$row['forum_id'] == $ignore_id)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
if ($row['left_id'] < $right)
|
if ($row['left_id'] < $right)
|
||||||
{
|
{
|
||||||
$padding .= ' ';
|
$padding .= ' ';
|
||||||
$padding_store[$row['parent_id']] = $padding;
|
$padding_store[$row['parent_id']] = $padding;
|
||||||
}
|
}
|
||||||
else if ($row['left_id'] > $right + 1)
|
else if ($row['left_id'] > $right + 1)
|
||||||
|
@ -43,35 +45,41 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
|
||||||
|
|
||||||
$right = $row['right_id'];
|
$right = $row['right_id'];
|
||||||
|
|
||||||
|
if ($acl && !$auth->acl_gets($acl, $row['forum_id']))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((is_array($ignore_id) && in_array($row['forum_id'], $ignore_id)) || $row['forum_id'] == $ignore_id)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id']) && $ignore_emptycat)
|
||||||
|
{
|
||||||
|
// Non-postable forum with no subforums, don't display
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($row['forum_type'] != FORUM_POST && $ignore_nonpost)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? ' selected="selected"' : '') : (($row['forum_id'] == $select_id) ? ' selected="selected"' : '');
|
$selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? ' selected="selected"' : '') : (($row['forum_id'] == $select_id) ? ' selected="selected"' : '');
|
||||||
|
|
||||||
if ($row['left_id'] > $cat_right)
|
$forum_list .= '<option value="' . $row['forum_id'] . '"' . $selected . '>' . $padding . $row['forum_name'] . '</option>';
|
||||||
{
|
|
||||||
$holding = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($row['right_id'] - $row['left_id'] > 1 && $ignore_emptycat)
|
$iteration++;
|
||||||
{
|
|
||||||
$cat_right = max($cat_right, $row['right_id']);
|
|
||||||
|
|
||||||
$holding .= '<option value="' . $row['forum_id'] . '"' . $selected . '>' . $padding . $row['forum_name'] . '</option>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$forum_list .= $holding . '<option value="' . $row['forum_id'] . '"' . $selected . '>' . $padding . $row['forum_name'] . '</option>';
|
|
||||||
$holding = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$right)
|
|
||||||
{
|
|
||||||
$forum_list .= '<option value="-1">' . $user->lang['NO_FORUMS'] . '</option>';
|
|
||||||
}
|
}
|
||||||
|
unset($padding_store);
|
||||||
|
|
||||||
return $forum_list;
|
return $forum_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate size select form
|
/**
|
||||||
|
* Generate size select form
|
||||||
|
*/
|
||||||
function size_select($select_name, $size_compare)
|
function size_select($select_name, $size_compare)
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
@ -92,7 +100,9 @@ function size_select($select_name, $size_compare)
|
||||||
return ($select_field);
|
return ($select_field);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obtain authed forums list
|
/**
|
||||||
|
* Obtain authed forums list
|
||||||
|
*/
|
||||||
function get_forum_list($acl_list = 'f_list', $id_only = TRUE, $postable_only = FALSE, $no_cache = FALSE)
|
function get_forum_list($acl_list = 'f_list', $id_only = TRUE, $postable_only = FALSE, $no_cache = FALSE)
|
||||||
{
|
{
|
||||||
global $db, $auth;
|
global $db, $auth;
|
||||||
|
@ -131,6 +141,9 @@ function get_forum_list($acl_list = 'f_list', $id_only = TRUE, $postable_only =
|
||||||
return $rowset;
|
return $rowset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get forum branch
|
||||||
|
*/
|
||||||
function get_forum_branch($forum_id, $type = 'all', $order = 'descending', $include_forum = TRUE)
|
function get_forum_branch($forum_id, $type = 'all', $order = 'descending', $include_forum = TRUE)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -172,6 +185,9 @@ function get_forum_branch($forum_id, $type = 'all', $order = 'descending', $incl
|
||||||
return $rows;
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get physical file listing
|
||||||
|
*/
|
||||||
function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
|
function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
|
||||||
{
|
{
|
||||||
$matches = array();
|
$matches = array();
|
||||||
|
@ -206,7 +222,9 @@ function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
|
||||||
return $matches;
|
return $matches;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Posts and topics manipulation
|
/*
|
||||||
|
* Move topic(s)
|
||||||
|
*/
|
||||||
function move_topics($topic_ids, $forum_id, $auto_sync = true)
|
function move_topics($topic_ids, $forum_id, $auto_sync = true)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -250,6 +268,9 @@ function move_topics($topic_ids, $forum_id, $auto_sync = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move post(s)
|
||||||
|
*/
|
||||||
function move_posts($post_ids, $topic_id, $auto_sync = true)
|
function move_posts($post_ids, $topic_id, $auto_sync = true)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -309,6 +330,9 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove topic(s)
|
||||||
|
*/
|
||||||
function delete_topics($where_type, $where_ids, $auto_sync = TRUE)
|
function delete_topics($where_type, $where_ids, $auto_sync = TRUE)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -377,6 +401,9 @@ function delete_topics($where_type, $where_ids, $auto_sync = TRUE)
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove post(s)
|
||||||
|
*/
|
||||||
function delete_posts($where_type, $where_ids, $auto_sync = TRUE)
|
function delete_posts($where_type, $where_ids, $auto_sync = TRUE)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -436,10 +463,12 @@ function delete_posts($where_type, $where_ids, $auto_sync = TRUE)
|
||||||
return sizeof($post_ids);
|
return sizeof($post_ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete Attachments
|
/**
|
||||||
// mode => (post, topic, attach, user)
|
* Delete Attachments
|
||||||
// ids => (post_ids, topic_ids, attach_ids, user_ids)
|
* mode => (post, topic, attach, user)
|
||||||
// resync => set this to false if you are deleting posts or topics...
|
* ids => (post_ids, topic_ids, attach_ids, user_ids)
|
||||||
|
* resync => set this to false if you are deleting posts or topics...
|
||||||
|
*/
|
||||||
function delete_attachments($mode, $ids, $resync = TRUE)
|
function delete_attachments($mode, $ids, $resync = TRUE)
|
||||||
{
|
{
|
||||||
global $db, $config;
|
global $db, $config;
|
||||||
|
@ -628,6 +657,9 @@ function delete_attachments($mode, $ids, $resync = TRUE)
|
||||||
return $num_deleted;
|
return $num_deleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove topic shadows
|
||||||
|
*/
|
||||||
function delete_topic_shadows($max_age, $forum_id = '', $auto_sync = TRUE)
|
function delete_topic_shadows($max_age, $forum_id = '', $auto_sync = TRUE)
|
||||||
{
|
{
|
||||||
$where = (is_array($forum_id)) ? 'AND t.forum_id IN (' . implode(', ', $forum_id) . ')' : (($forum_id) ? "AND t.forum_id = $forum_id" : '');
|
$where = (is_array($forum_id)) ? 'AND t.forum_id IN (' . implode(', ', $forum_id) . ')' : (($forum_id) ? "AND t.forum_id = $forum_id" : '');
|
||||||
|
@ -672,7 +704,9 @@ function delete_topic_shadows($max_age, $forum_id = '', $auto_sync = TRUE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete File
|
/**
|
||||||
|
* Delete File
|
||||||
|
*/
|
||||||
function phpbb_unlink($filename, $mode = 'file')
|
function phpbb_unlink($filename, $mode = 'file')
|
||||||
{
|
{
|
||||||
global $config, $user, $phpbb_root_path;
|
global $config, $user, $phpbb_root_path;
|
||||||
|
@ -681,22 +715,23 @@ function phpbb_unlink($filename, $mode = 'file')
|
||||||
return @unlink($filename);
|
return @unlink($filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
// All-encompasing sync function
|
/**
|
||||||
//
|
* All-encompasing sync function
|
||||||
// Usage:
|
*
|
||||||
// sync('topic', 'topic_id', 123); <= resync topic #123
|
* Usage:
|
||||||
// sync('topic', 'forum_id', array(2, 3)); <= resync topics from forum #2 and #3
|
* sync('topic', 'topic_id', 123); <= resync topic #123
|
||||||
// sync('topic'); <= resync all topics
|
* sync('topic', 'forum_id', array(2, 3)); <= resync topics from forum #2 and #3
|
||||||
// sync('topic', 'range', 'topic_id BETWEEN 1 AND 60'); <= resync a range of topics/forums (only available for 'topic' and 'forum' modes)
|
* sync('topic'); <= resync all topics
|
||||||
//
|
* sync('topic', 'range', 'topic_id BETWEEN 1 AND 60'); <= resync a range of topics/forums (only available for 'topic' and 'forum' modes)
|
||||||
// Modes:
|
*
|
||||||
// - topic_moved Removes topic shadows that would be in the same forum as the topic they link to
|
* Modes:
|
||||||
// - topic_approved Resyncs the topic_approved flag according to the status of the first post
|
* - topic_moved Removes topic shadows that would be in the same forum as the topic they link to
|
||||||
// - post_reported Resyncs the post_reported flag, relying on actual reports
|
* - topic_approved Resyncs the topic_approved flag according to the status of the first post
|
||||||
// - topic_reported Resyncs the topic_reported flag, relying on post_reported flags
|
* - post_reported Resyncs the post_reported flag, relying on actual reports
|
||||||
// - post_attachement Same as post_reported, thanks to a quick Search/Replace
|
* - topic_reported Resyncs the topic_reported flag, relying on post_reported flags
|
||||||
// - topic_attachement Same as topic_reported, thanks to a quick Search/Replace
|
* - post_attachement Same as post_reported, thanks to a quick Search/Replace
|
||||||
//
|
* - topic_attachement Same as topic_reported, thanks to a quick Search/Replace
|
||||||
|
*/
|
||||||
function sync($mode, $where_type = '', $where_ids = '', $resync_parents = FALSE, $sync_extra = FALSE)
|
function sync($mode, $where_type = '', $where_ids = '', $resync_parents = FALSE, $sync_extra = FALSE)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -1346,7 +1381,9 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = FALSE,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prune function
|
||||||
|
*/
|
||||||
function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true)
|
function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -1408,7 +1445,9 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
|
||||||
return delete_topics('topic_id', $topic_list, $auto_sync);
|
return delete_topics('topic_id', $topic_list, $auto_sync);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function auto_prune(), this function now relies on passed vars
|
/**
|
||||||
|
* Function auto_prune(), this function now relies on passed vars
|
||||||
|
*/
|
||||||
function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_freq)
|
function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_freq)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -1437,8 +1476,10 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove_comments will strip the sql comment lines out of an uploaded sql file
|
/**
|
||||||
// specifically for mssql and postgres type files in the install....
|
* remove_comments will strip the sql comment lines out of an uploaded sql file
|
||||||
|
* specifically for mssql and postgres type files in the install....
|
||||||
|
*/
|
||||||
function remove_comments(&$output)
|
function remove_comments(&$output)
|
||||||
{
|
{
|
||||||
$lines = explode("\n", $output);
|
$lines = explode("\n", $output);
|
||||||
|
@ -1470,14 +1511,18 @@ function remove_comments(&$output)
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove_remarks will strip the sql comment lines out of an uploaded sql file
|
/**
|
||||||
|
* remove_remarks will strip the sql comment lines out of an uploaded sql file
|
||||||
|
*/
|
||||||
function remove_remarks(&$sql)
|
function remove_remarks(&$sql)
|
||||||
{
|
{
|
||||||
$sql = preg_replace('/(\n){2,}/', "\n", preg_replace('/^#.*/m', "\n", $sql));
|
$sql = preg_replace('/(\n){2,}/', "\n", preg_replace('/^#.*/m', "\n", $sql));
|
||||||
}
|
}
|
||||||
|
|
||||||
// split_sql_file will split an uploaded sql file into single sql statements.
|
/**
|
||||||
// Note: expects trim() to have already been run on $sql.
|
* split_sql_file will split an uploaded sql file into single sql statements.
|
||||||
|
* Note: expects trim() to have already been run on $sql.
|
||||||
|
*/
|
||||||
function split_sql_file($sql, $delimiter)
|
function split_sql_file($sql, $delimiter)
|
||||||
{
|
{
|
||||||
// Split up our string into "possible" SQL statements.
|
// Split up our string into "possible" SQL statements.
|
||||||
|
@ -1565,8 +1610,10 @@ function split_sql_file($sql, $delimiter)
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username
|
/**
|
||||||
// and group names must be carried through for the moderators table
|
* Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username
|
||||||
|
* and group names must be carried through for the moderators table
|
||||||
|
*/
|
||||||
function cache_moderators()
|
function cache_moderators()
|
||||||
{
|
{
|
||||||
global $db, $cache;
|
global $db, $cache;
|
||||||
|
@ -1657,7 +1704,9 @@ function cache_moderators()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging functions
|
/**
|
||||||
|
* Add log event
|
||||||
|
*/
|
||||||
function add_log()
|
function add_log()
|
||||||
{
|
{
|
||||||
global $db, $user;
|
global $db, $user;
|
||||||
|
@ -1701,6 +1750,9 @@ function add_log()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View log
|
||||||
|
*/
|
||||||
function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $limit_days = 0, $sort_by = 'l.log_time DESC')
|
function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $limit_days = 0, $sort_by = 'l.log_time DESC')
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $phpEx, $SID;
|
global $db, $user, $auth, $phpEx, $SID;
|
||||||
|
@ -1773,13 +1825,13 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
||||||
$log[$i]['topic_id'] = $row['topic_id'];
|
$log[$i]['topic_id'] = $row['topic_id'];
|
||||||
$log[$i]['viewforum'] = ($row['forum_id'] && $auth->acl_get('f_read', $row['forum_id'])) ? ((defined('IN_ADMIN')) ? '../' : '') . "viewforum.$phpEx$SID&f=" . $row['forum_id'] : '';
|
$log[$i]['viewforum'] = ($row['forum_id'] && $auth->acl_get('f_read', $row['forum_id'])) ? ((defined('IN_ADMIN')) ? '../' : '') . "viewforum.$phpEx$SID&f=" . $row['forum_id'] : '';
|
||||||
|
|
||||||
$log[$i]['action'] = (!empty($user->lang[$row['log_operation']])) ? $user->lang[$row['log_operation']] : ucfirst(str_replace('_', ' ', $row['log_operation']));
|
$log[$i]['action'] = (isset($user->lang[$row['log_operation']])) ? $user->lang[$row['log_operation']] : '{' . ucfirst(str_replace('_', ' ', $row['log_operation'])) . '}';
|
||||||
|
|
||||||
if (!empty($row['log_data']))
|
if (!empty($row['log_data']))
|
||||||
{
|
{
|
||||||
$log_data_ary = unserialize(stripslashes($row['log_data']));
|
$log_data_ary = unserialize(stripslashes($row['log_data']));
|
||||||
|
|
||||||
if (!empty($user->lang[$row['log_operation']]))
|
if (isset($user->lang[$row['log_operation']]))
|
||||||
{
|
{
|
||||||
foreach ($log_data_ary as $log_data)
|
foreach ($log_data_ary as $log_data)
|
||||||
{
|
{
|
||||||
|
@ -1790,7 +1842,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$log[$i]['action'] = implode('', $log_data_ary);
|
$log[$i]['action'] .= '<br />' . implode('', $log_data_ary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1846,9 +1898,12 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extension of auth class for changing permissions
|
|
||||||
if (class_exists('auth'))
|
if (class_exists('auth'))
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* Extension of auth class for changing permissions
|
||||||
|
*/
|
||||||
class auth_admin extends auth
|
class auth_admin extends auth
|
||||||
{
|
{
|
||||||
// Set a user or group ACL record
|
// Set a user or group ACL record
|
||||||
|
@ -2115,8 +2170,10 @@ if (class_exists('auth'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Post Informations (First/Last Post in topic/forum)
|
/**
|
||||||
// Should be used instead of sync() if only the last post informations are out of sync... faster
|
* Update Post Informations (First/Last Post in topic/forum)
|
||||||
|
* Should be used instead of sync() if only the last post informations are out of sync... faster
|
||||||
|
*/
|
||||||
function update_post_information($type, $ids)
|
function update_post_information($type, $ids)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
<?
|
<?php
|
||||||
// -------------------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : functions_compress.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Jul 19 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* Class for handling archives (compression/decompression)
|
||||||
|
*/
|
||||||
class compress
|
class compress
|
||||||
{
|
{
|
||||||
var $fp = 0;
|
var $fp = 0;
|
||||||
|
@ -104,13 +105,17 @@ class compress
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Zip creation class from phpMyAdmin 2.3.0 © Tobias Ratschiller, Olivier Müller, Loïc Chapeaux,
|
/**
|
||||||
// Marc Delisle, http://www.phpmyadmin.net/
|
* @package phpBB3
|
||||||
//
|
*
|
||||||
// Modified extensively by psoTFX, © phpBB Group, 2003
|
* Zip creation class from phpMyAdmin 2.3.0 © Tobias Ratschiller, Olivier Müller, Loïc Chapeaux,
|
||||||
//
|
* Marc Delisle, http://www.phpmyadmin.net/
|
||||||
// Based on work by Eric Mueller and Denis125
|
*
|
||||||
// Official ZIP file format: http://www.pkware.com/appnote.txt
|
* Modified extensively by psoTFX, © phpBB Group, 2003
|
||||||
|
*
|
||||||
|
* Based on work by Eric Mueller and Denis125
|
||||||
|
* Official ZIP file format: http://www.pkware.com/appnote.txt
|
||||||
|
*/
|
||||||
class compress_zip extends compress
|
class compress_zip extends compress
|
||||||
{
|
{
|
||||||
var $datasec = array();
|
var $datasec = array();
|
||||||
|
@ -394,8 +399,12 @@ class compress_zip extends compress
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tar/tar.gz compression routine
|
/**
|
||||||
// Header/checksum creation derived from tarfile.pl, © Tom Horsley, 1994
|
* @package phpBB3
|
||||||
|
*
|
||||||
|
* Tar/tar.gz compression routine
|
||||||
|
* Header/checksum creation derived from tarfile.pl, © Tom Horsley, 1994
|
||||||
|
*/
|
||||||
class compress_tar extends compress
|
class compress_tar extends compress
|
||||||
{
|
{
|
||||||
var $isgz = false;
|
var $isgz = false;
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : functions_display.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu Nov 07, 2002
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display Forums
|
||||||
|
*/
|
||||||
function display_forums($root_data = '', $display_moderators = TRUE)
|
function display_forums($root_data = '', $display_moderators = TRUE)
|
||||||
{
|
{
|
||||||
global $config, $db, $template, $auth, $user, $phpEx, $SID, $forum_moderators, $phpbb_root_path;
|
global $config, $db, $template, $auth, $user, $phpEx, $SID, $forum_moderators, $phpbb_root_path;
|
||||||
|
@ -335,6 +335,9 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
||||||
return $active_forum_ary;
|
return $active_forum_ary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get topic author
|
||||||
|
*/
|
||||||
function topic_topic_author(&$topic_row)
|
function topic_topic_author(&$topic_row)
|
||||||
{
|
{
|
||||||
global $phpEx, $SID, $phpbb_root_path, $user;
|
global $phpEx, $SID, $phpbb_root_path, $user;
|
||||||
|
@ -346,6 +349,9 @@ function topic_topic_author(&$topic_row)
|
||||||
return $topic_author;
|
return $topic_author;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate topic pagination
|
||||||
|
*/
|
||||||
function topic_generate_pagination($replies, $url)
|
function topic_generate_pagination($replies, $url)
|
||||||
{
|
{
|
||||||
global $config, $user;
|
global $config, $user;
|
||||||
|
@ -380,6 +386,9 @@ function topic_generate_pagination($replies, $url)
|
||||||
return $pagination;
|
return $pagination;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate topic status
|
||||||
|
*/
|
||||||
function topic_status(&$topic_row, $replies, $mark_time_topic, $mark_time_forum, &$folder_img, &$folder_alt, &$topic_type)
|
function topic_status(&$topic_row, $replies, $mark_time_topic, $mark_time_forum, &$folder_img, &$folder_alt, &$topic_type)
|
||||||
{
|
{
|
||||||
global $user, $config;
|
global $user, $config;
|
||||||
|
@ -472,7 +481,9 @@ function topic_status(&$topic_row, $replies, $mark_time_topic, $mark_time_forum,
|
||||||
return $unread_topic;
|
return $unread_topic;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display Attachments
|
/**
|
||||||
|
* Display Attachments
|
||||||
|
*/
|
||||||
function display_attachments($forum_id, $blockname, &$attachment_data, &$update_count, $force_physical = false, $return = false)
|
function display_attachments($forum_id, $blockname, &$attachment_data, &$update_count, $force_physical = false, $return = false)
|
||||||
{
|
{
|
||||||
global $extensions, $template, $cache, $attachment_tpl;
|
global $extensions, $template, $cache, $attachment_tpl;
|
||||||
|
|
|
@ -1,33 +1,30 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/**
|
||||||
|
*
|
||||||
Class.Jabber.PHP v0.4
|
* @package phpBB3
|
||||||
(c) 2002 Carlo "Gossip" Zottmann
|
* @version $Id$
|
||||||
http://phpjabber.g-blog.net *** gossip@jabber.g-blog.net
|
* @copyright (c) 2005 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
The FULL documentation and examples for this software can be found at
|
*
|
||||||
http://phpjabber.g-blog.net (not many doc comments in here, sorry)
|
|
||||||
|
|
||||||
last modified: 27.04.2003 13:01:53 CET
|
|
||||||
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
/*
|
|
||||||
Modified by psoTFX, phpBB Group, 2003.
|
|
||||||
Removed functions/support not critical to integration with phpBB
|
|
||||||
|
|
||||||
$Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/***************************************************************************
|
/**
|
||||||
*
|
* @package phpBB3
|
||||||
* 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
|
* Class.Jabber.PHP v0.4
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* (c) 2002 Carlo "Gossip" Zottmann
|
||||||
* (at your option) any later version.
|
* http://phpjabber.g-blog.net *** gossip@jabber.g-blog.net
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
* The FULL documentation and examples for this software can be found at
|
||||||
|
* http://phpjabber.g-blog.net (not many doc comments in here, sorry)
|
||||||
|
*
|
||||||
|
* last modified: 27.04.2003 13:01:53 CET
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Modified by psoTFX, phpBB Group, 2003.
|
||||||
|
* Removed functions/support not critical to integration with phpBB
|
||||||
|
*
|
||||||
|
*/
|
||||||
class Jabber
|
class Jabber
|
||||||
{
|
{
|
||||||
var $server;
|
var $server;
|
||||||
|
@ -938,7 +935,10 @@ class Jabber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* MakeXML
|
||||||
|
*/
|
||||||
class MakeXML extends Jabber
|
class MakeXML extends Jabber
|
||||||
{
|
{
|
||||||
var $nodes;
|
var $nodes;
|
||||||
|
@ -1038,7 +1038,10 @@ class MakeXML extends Jabber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* Connector
|
||||||
|
*/
|
||||||
class CJP_StandardConnector
|
class CJP_StandardConnector
|
||||||
{
|
{
|
||||||
var $active_socket;
|
var $active_socket;
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : functions_messenger.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* Messenger
|
||||||
|
*/
|
||||||
class messenger
|
class messenger
|
||||||
{
|
{
|
||||||
var $vars, $msg, $extra_headers, $replyto, $from, $subject, $necoding;
|
var $vars, $msg, $extra_headers, $replyto, $from, $subject, $necoding;
|
||||||
|
@ -230,12 +231,19 @@ class messenger
|
||||||
$user->start();
|
$user->start();
|
||||||
|
|
||||||
include_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
include_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
||||||
add_log('critical', $type . '_ERROR', $msg);
|
add_log('critical', 'LOG_' . $type . '_ERROR', $msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Messenger methods
|
// Messenger methods
|
||||||
//
|
//
|
||||||
|
function save_queue()
|
||||||
|
{
|
||||||
|
if ($this->use_queue)
|
||||||
|
{
|
||||||
|
$this->queue->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function msg_email()
|
function msg_email()
|
||||||
{
|
{
|
||||||
|
@ -404,7 +412,11 @@ class messenger
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// At the moment it is only handling the email queue
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* Queue
|
||||||
|
* At the moment it is only handling the email queue
|
||||||
|
*/
|
||||||
class queue
|
class queue
|
||||||
{
|
{
|
||||||
var $data = array();
|
var $data = array();
|
||||||
|
@ -636,7 +648,9 @@ class queue
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replacement or substitute for PHP's mail command
|
/**
|
||||||
|
* Replacement or substitute for PHP's mail command
|
||||||
|
*/
|
||||||
function smtpmail($addresses, $subject, $message, &$err_msg, $encoding, $headers = '')
|
function smtpmail($addresses, $subject, $message, &$err_msg, $encoding, $headers = '')
|
||||||
{
|
{
|
||||||
global $config, $user;
|
global $config, $user;
|
||||||
|
@ -828,9 +842,12 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $encoding, $headers
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SMTP Class
|
/**
|
||||||
// Auth Mechanisms originally taken from the AUTH Modules found within the PHP Extension and Application Repository (PEAR)
|
* @package phpBB3
|
||||||
// See docs/AUTHORS for more details
|
* SMTP Class
|
||||||
|
* Auth Mechanisms originally taken from the AUTH Modules found within the PHP Extension and Application Repository (PEAR)
|
||||||
|
* See docs/AUTHORS for more details
|
||||||
|
*/
|
||||||
class smtp_class
|
class smtp_class
|
||||||
{
|
{
|
||||||
var $server_response = '';
|
var $server_response = '';
|
||||||
|
@ -1171,10 +1188,12 @@ class smtp_class
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Encodes the given string for proper display for this encoding ... nabbed
|
/**
|
||||||
// from php.net and modified. There is an alternative encoding method which
|
* Encodes the given string for proper display for this encoding ... nabbed
|
||||||
// may produce less output but it's questionable as to its worth in this
|
* from php.net and modified. There is an alternative encoding method which
|
||||||
// scenario IMO
|
* may produce less output but it's questionable as to its worth in this
|
||||||
|
* scenario IMO
|
||||||
|
*/
|
||||||
function mail_encode($str, $encoding)
|
function mail_encode($str, $encoding)
|
||||||
{
|
{
|
||||||
if ($encoding == '')
|
if ($encoding == '')
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
<?
|
<?php
|
||||||
// -------------------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : functions_module.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Oct 30 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* Module Class handling all types of modules
|
||||||
|
*/
|
||||||
class module
|
class module
|
||||||
{
|
{
|
||||||
var $id = 0;
|
var $id = 0;
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : functions_posting.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sun Jul 14, 2002
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// Fill smiley templates (or just the variables) with smileys, either in a window or inline
|
/**
|
||||||
|
* Fill smiley templates (or just the variables) with smileys, either in a window or inline
|
||||||
|
*/
|
||||||
function generate_smilies($mode, $forum_id)
|
function generate_smilies($mode, $forum_id)
|
||||||
{
|
{
|
||||||
global $SID, $auth, $db, $user, $config, $template;
|
global $SID, $auth, $db, $user, $config, $template;
|
||||||
|
@ -90,7 +89,9 @@ function generate_smilies($mode, $forum_id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Last Post Informations
|
/**
|
||||||
|
* Update Last Post Informations
|
||||||
|
*/
|
||||||
function update_last_post_information($type, $id)
|
function update_last_post_information($type, $id)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -133,7 +134,10 @@ function update_last_post_information($type, $id)
|
||||||
return $update_sql;
|
return $update_sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Upload Attachment - filedata is generated here
|
/**
|
||||||
|
* Upload Attachment - filedata is generated here
|
||||||
|
* Uses upload class
|
||||||
|
*/
|
||||||
function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false)
|
function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false)
|
||||||
{
|
{
|
||||||
global $auth, $user, $config, $db, $phpbb_root_path;
|
global $auth, $user, $config, $db, $phpbb_root_path;
|
||||||
|
@ -221,8 +225,8 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO - Check Free Disk Space - need testing under windows
|
// Check free disk space
|
||||||
if ($free_space = disk_free_space($phpbb_root_path . $config['upload_path']))
|
if ($free_space = @disk_free_space($phpbb_root_path . $config['upload_path']))
|
||||||
{
|
{
|
||||||
if ($free_space <= $file->get('filesize'))
|
if ($free_space <= $file->get('filesize'))
|
||||||
{
|
{
|
||||||
|
@ -250,7 +254,9 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
|
||||||
return $filedata;
|
return $filedata;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate the needed size for Thumbnail
|
/**
|
||||||
|
* Calculate the needed size for Thumbnail
|
||||||
|
*/
|
||||||
function get_img_size_format($width, $height)
|
function get_img_size_format($width, $height)
|
||||||
{
|
{
|
||||||
// Maximum Width the Image can take
|
// Maximum Width the Image can take
|
||||||
|
@ -272,7 +278,9 @@ function get_img_size_format($width, $height)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return supported image types
|
/**
|
||||||
|
* Return supported image types
|
||||||
|
*/
|
||||||
function get_supported_image_types($type = false)
|
function get_supported_image_types($type = false)
|
||||||
{
|
{
|
||||||
if (@extension_loaded('gd'))
|
if (@extension_loaded('gd'))
|
||||||
|
@ -327,7 +335,9 @@ function get_supported_image_types($type = false)
|
||||||
return array('gd' => false);
|
return array('gd' => false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create Thumbnail
|
/**
|
||||||
|
* Create Thumbnail
|
||||||
|
*/
|
||||||
function create_thumbnail($source, $destination, $mimetype)
|
function create_thumbnail($source, $destination, $mimetype)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
@ -423,7 +433,9 @@ function create_thumbnail($source, $destination, $mimetype)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DECODE TEXT -> This will/should be handled by bbcode.php eventually
|
/**
|
||||||
|
* DECODE TEXT -> This will/should be handled by bbcode.php eventually
|
||||||
|
*/
|
||||||
function decode_message(&$message, $bbcode_uid = '')
|
function decode_message(&$message, $bbcode_uid = '')
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
@ -450,7 +462,9 @@ function decode_message(&$message, $bbcode_uid = '')
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate Topic Icons for display
|
/**
|
||||||
|
* Generate Topic Icons for display
|
||||||
|
*/
|
||||||
function posting_gen_topic_icons($mode, $icon_id)
|
function posting_gen_topic_icons($mode, $icon_id)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $config, $template;
|
global $phpbb_root_path, $config, $template;
|
||||||
|
@ -488,7 +502,9 @@ function posting_gen_topic_icons($mode, $icon_id)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assign Inline attachments (build option fields)
|
/**
|
||||||
|
* Assign Inline attachments (build option fields)
|
||||||
|
*/
|
||||||
function posting_gen_inline_attachments(&$attachment_data)
|
function posting_gen_inline_attachments(&$attachment_data)
|
||||||
{
|
{
|
||||||
global $template;
|
global $template;
|
||||||
|
@ -510,7 +526,9 @@ function posting_gen_inline_attachments(&$attachment_data)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build topic types able to be selected
|
/**
|
||||||
|
* Build topic types able to be selected
|
||||||
|
*/
|
||||||
function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
|
function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
|
||||||
{
|
{
|
||||||
global $auth, $user, $template, $topic_type;
|
global $auth, $user, $template, $topic_type;
|
||||||
|
@ -566,6 +584,9 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
|
||||||
return $toggle;
|
return $toggle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate inline attachment entry
|
||||||
|
*/
|
||||||
function posting_gen_attachment_entry(&$attachment_data, &$filename_data)
|
function posting_gen_attachment_entry(&$attachment_data, &$filename_data)
|
||||||
{
|
{
|
||||||
global $template, $config, $phpbb_root_path, $SID, $phpEx;
|
global $template, $config, $phpbb_root_path, $SID, $phpEx;
|
||||||
|
@ -616,7 +637,9 @@ function posting_gen_attachment_entry(&$attachment_data, &$filename_data)
|
||||||
return sizeof($attachment_data);
|
return sizeof($attachment_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load Drafts
|
/**
|
||||||
|
* Load Drafts
|
||||||
|
*/
|
||||||
function load_drafts($topic_id = 0, $forum_id = 0, $id = 0)
|
function load_drafts($topic_id = 0, $forum_id = 0, $id = 0)
|
||||||
{
|
{
|
||||||
global $user, $db, $template, $phpEx, $SID, $auth;
|
global $user, $db, $template, $phpEx, $SID, $auth;
|
||||||
|
@ -717,7 +740,9 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Topic Review
|
/**
|
||||||
|
* Topic Review
|
||||||
|
*/
|
||||||
function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true)
|
function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true)
|
||||||
{
|
{
|
||||||
global $user, $auth, $db, $template, $bbcode, $template;
|
global $user, $auth, $db, $template, $bbcode, $template;
|
||||||
|
@ -802,7 +827,9 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// User Notification
|
/**
|
||||||
|
* User Notification
|
||||||
|
*/
|
||||||
function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id, $topic_id, $post_id)
|
function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id, $topic_id, $post_id)
|
||||||
{
|
{
|
||||||
global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
|
global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
|
||||||
|
@ -977,10 +1004,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
||||||
}
|
}
|
||||||
unset($msg_list_ary);
|
unset($msg_list_ary);
|
||||||
|
|
||||||
if ($messenger->queue)
|
$messenger->save_queue();
|
||||||
{
|
|
||||||
$messenger->queue->save();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle the DB updates
|
// Handle the DB updates
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : functions_privmsgs.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sun Apr 18, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
/**
|
||||||
// -------------------------------------------------------------
|
*/
|
||||||
|
|
||||||
// Define Rule processing schema
|
// Define Rule processing schema
|
||||||
// NOTE: might change
|
// NOTE: might change
|
||||||
|
@ -100,7 +100,9 @@ $global_rule_conditions = array(
|
||||||
RULE_IS_GROUP => 'group'
|
RULE_IS_GROUP => 'group'
|
||||||
);
|
);
|
||||||
|
|
||||||
// Get all folder
|
/**
|
||||||
|
* Get all folder
|
||||||
|
*/
|
||||||
function get_folder($user_id, &$folder, $folder_id = false)
|
function get_folder($user_id, &$folder, $folder_id = false)
|
||||||
{
|
{
|
||||||
global $db, $user, $template;
|
global $db, $user, $template;
|
||||||
|
@ -178,7 +180,9 @@ function get_folder($user_id, &$folder, $folder_id = false)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete Messages From Sentbox - we are doing this here because this saves us a bunch of checks and queries
|
/**
|
||||||
|
* Delete Messages From Sentbox - we are doing this here because this saves us a bunch of checks and queries
|
||||||
|
*/
|
||||||
function clean_sentbox($num_sentbox_messages)
|
function clean_sentbox($num_sentbox_messages)
|
||||||
{
|
{
|
||||||
global $db, $user, $config;
|
global $db, $user, $config;
|
||||||
|
@ -207,7 +211,9 @@ function clean_sentbox($num_sentbox_messages)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Rule against Message Informations
|
/**
|
||||||
|
* Check Rule against Message Informations
|
||||||
|
*/
|
||||||
function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
|
function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
|
||||||
{
|
{
|
||||||
global $user, $config;
|
global $user, $config;
|
||||||
|
@ -252,7 +258,9 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Place new messages into appropiate folder
|
/**
|
||||||
|
* Place new messages into appropiate folder
|
||||||
|
*/
|
||||||
function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||||
{
|
{
|
||||||
global $db, $user, $config;
|
global $db, $user, $config;
|
||||||
|
@ -569,7 +577,9 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||||
return $num_not_moved;
|
return $num_not_moved;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move PM from one to another folder
|
/**
|
||||||
|
* Move PM from one to another folder
|
||||||
|
*/
|
||||||
function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_folder_id)
|
function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_folder_id)
|
||||||
{
|
{
|
||||||
global $db, $user;
|
global $db, $user;
|
||||||
|
@ -656,7 +666,9 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
|
||||||
return $num_moved;
|
return $num_moved;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update unread message status
|
/**
|
||||||
|
* Update unread message status
|
||||||
|
*/
|
||||||
function update_unread_status($unread, $msg_id, $user_id, $folder_id)
|
function update_unread_status($unread, $msg_id, $user_id, $folder_id)
|
||||||
{
|
{
|
||||||
if (!$unread)
|
if (!$unread)
|
||||||
|
@ -753,7 +765,9 @@ function handle_mark_actions($user_id, $mark_action)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete PM(s)
|
/**
|
||||||
|
* Delete PM(s)
|
||||||
|
*/
|
||||||
function delete_pm($user_id, $msg_ids, $folder_id)
|
function delete_pm($user_id, $msg_ids, $folder_id)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -884,7 +898,9 @@ function delete_pm($user_id, $msg_ids, $folder_id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rebuild message header
|
/**
|
||||||
|
* Rebuild message header
|
||||||
|
*/
|
||||||
function rebuild_header($check_ary)
|
function rebuild_header($check_ary)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -917,7 +933,9 @@ function rebuild_header($check_ary)
|
||||||
return $address;
|
return $address;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print out/Assign recipient informations
|
/**
|
||||||
|
* Print out/Assign recipient informations
|
||||||
|
*/
|
||||||
function write_pm_addresses($check_ary, $author_id, $plaintext = false)
|
function write_pm_addresses($check_ary, $author_id, $plaintext = false)
|
||||||
{
|
{
|
||||||
global $db, $user, $template, $phpbb_root_path, $SID, $phpEx;
|
global $db, $user, $template, $phpbb_root_path, $SID, $phpEx;
|
||||||
|
@ -1033,7 +1051,9 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false)
|
||||||
return $addresses;
|
return $addresses;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get folder status
|
/**
|
||||||
|
* Get folder status
|
||||||
|
*/
|
||||||
function get_folder_status($folder_id, $folder)
|
function get_folder_status($folder_id, $folder)
|
||||||
{
|
{
|
||||||
global $db, $user, $config;
|
global $db, $user, $config;
|
||||||
|
@ -1067,7 +1087,9 @@ function get_folder_status($folder_id, $folder)
|
||||||
// COMPOSE MESSAGES
|
// COMPOSE MESSAGES
|
||||||
//
|
//
|
||||||
|
|
||||||
// Submit PM
|
/**
|
||||||
|
* Submit PM
|
||||||
|
*/
|
||||||
function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = true)
|
function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = true)
|
||||||
{
|
{
|
||||||
global $db, $auth, $user, $config, $phpEx, $SID, $template;
|
global $db, $auth, $user, $config, $phpEx, $SID, $template;
|
||||||
|
@ -1338,7 +1360,9 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr
|
||||||
return $data['msg_id'];
|
return $data['msg_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// PM Notification
|
/**
|
||||||
|
* PM Notification
|
||||||
|
*/
|
||||||
function pm_notification($mode, $author, $recipients, $subject, $message)
|
function pm_notification($mode, $author, $recipients, $subject, $message)
|
||||||
{
|
{
|
||||||
global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
|
global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
|
||||||
|
@ -1422,10 +1446,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
|
||||||
}
|
}
|
||||||
unset($msg_list_ary);
|
unset($msg_list_ary);
|
||||||
|
|
||||||
if ($messenger->queue)
|
$messenger->save_queue();
|
||||||
{
|
|
||||||
$messenger->queue->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($messenger);
|
unset($messenger);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : functions_profile_fields.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Tue Oct 21, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* Custom Profile Fields
|
||||||
|
*/
|
||||||
class custom_profile
|
class custom_profile
|
||||||
{
|
{
|
||||||
var $profile_types = array(1 => 'int', 2 => 'string', 3 => 'text', 4 => 'bool', 5 => 'dropdown', 6 => 'date');
|
var $profile_types = array(1 => 'int', 2 => 'string', 3 => 'text', 4 => 'bool', 5 => 'dropdown', 6 => 'date');
|
||||||
|
@ -714,6 +715,10 @@ class custom_profile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* Custom Profile Fields ACP
|
||||||
|
*/
|
||||||
class custom_profile_admin extends custom_profile
|
class custom_profile_admin extends custom_profile
|
||||||
{
|
{
|
||||||
var $vars = array();
|
var $vars = array();
|
||||||
|
|
|
@ -1,21 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : functions_upload.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sun Mar 6, 2005
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2005 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
//
|
/**
|
||||||
// Upload Class responsible for handling all file uploads
|
* @package phpBB3
|
||||||
//
|
* Responsible for holding all file relevant informations, as well as doing file-specific operations.
|
||||||
|
* The {@link fileupload fileupload class} can be used to upload several files, each of them being this object to operate further on.
|
||||||
// Single File
|
*/
|
||||||
class filespec
|
class filespec
|
||||||
{
|
{
|
||||||
var $filename = '';
|
var $filename = '';
|
||||||
|
@ -41,9 +38,6 @@ class filespec
|
||||||
/**
|
/**
|
||||||
* File Class
|
* File Class
|
||||||
*
|
*
|
||||||
* Responsible for holding all file relevant informations, as well as doing file-specific operations.
|
|
||||||
* The {@link fileupload fileupload class} can be used to upload several files, each of them being this object to operate further on.
|
|
||||||
*
|
|
||||||
* @access private
|
* @access private
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -80,7 +74,6 @@ class filespec
|
||||||
* @access public
|
* @access public
|
||||||
* @param real|unique $mode real creates a realname, filtering some characters, lowering every character. Unique creates an unique filename
|
* @param real|unique $mode real creates a realname, filtering some characters, lowering every character. Unique creates an unique filename
|
||||||
* @param string $prefix Prefix applied to filename
|
* @param string $prefix Prefix applied to filename
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function clean_filename($mode = 'unique', $prefix = '')
|
function clean_filename($mode = 'unique', $prefix = '')
|
||||||
{
|
{
|
||||||
|
@ -144,7 +137,6 @@ class filespec
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $destination_path Destination path, for example $config['avatar_path']
|
* @param string $destination_path Destination path, for example $config['avatar_path']
|
||||||
* @param octal $chmod Permission mask for chmodding the file after a successful move
|
* @param octal $chmod Permission mask for chmodding the file after a successful move
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function move_file($destination, $chmod = 0666)
|
function move_file($destination, $chmod = 0666)
|
||||||
{
|
{
|
||||||
|
@ -256,7 +248,10 @@ class filespec
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Class for assigning error messages before a real filespec class can be assigned
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* Class for assigning error messages before a real filespec class can be assigned
|
||||||
|
*/
|
||||||
class fileerror extends filespec
|
class fileerror extends filespec
|
||||||
{
|
{
|
||||||
function fileerror($error_msg)
|
function fileerror($error_msg)
|
||||||
|
@ -265,6 +260,12 @@ class fileerror extends filespec
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* File upload class
|
||||||
|
*
|
||||||
|
* Init class (all parameters optional and able to be set/overwritten seperatly) - scope is global and valid for all uploads
|
||||||
|
*/
|
||||||
class fileupload
|
class fileupload
|
||||||
{
|
{
|
||||||
var $allowed_extensions = array();
|
var $allowed_extensions = array();
|
||||||
|
@ -276,9 +277,6 @@ class fileupload
|
||||||
var $error_prefix = '';
|
var $error_prefix = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File upload class
|
|
||||||
*
|
|
||||||
* Init class (all parameters optional and able to be set/overwritten seperatly) - scope is global and valid for all uploads
|
|
||||||
*
|
*
|
||||||
* @param string $error_prefix Used error messages will get prefixed by this string
|
* @param string $error_prefix Used error messages will get prefixed by this string
|
||||||
* @param array $allowed_extensions Array of allowed extensions, for example array('jpg', 'jpeg', 'gif', 'png')
|
* @param array $allowed_extensions Array of allowed extensions, for example array('jpg', 'jpeg', 'gif', 'png')
|
||||||
|
@ -347,7 +345,6 @@ class fileupload
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $form_name Form name assigned to the file input field (if it is an array, the key has to be specified)
|
* @param string $form_name Form name assigned to the file input field (if it is an array, the key has to be specified)
|
||||||
* @return object $file Object "filespec" is returned, all further operations can be done with this object
|
* @return object $file Object "filespec" is returned, all further operations can be done with this object
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function form_upload($form_name)
|
function form_upload($form_name)
|
||||||
{
|
{
|
||||||
|
@ -405,7 +402,6 @@ class fileupload
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $upload_url URL pointing to file to upload, for example http://www.foobar.com/example.gif
|
* @param string $upload_url URL pointing to file to upload, for example http://www.foobar.com/example.gif
|
||||||
* @return object $file Object "filespec" is returned, all further operations can be done with this object
|
* @return object $file Object "filespec" is returned, all further operations can be done with this object
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function remote_upload($upload_url)
|
function remote_upload($upload_url)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,22 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : functions_user.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
//
|
/**
|
||||||
// User functions
|
* Obtain user_ids from usernames or vice versa. Returns false on
|
||||||
//
|
* success else the error string
|
||||||
|
*/
|
||||||
// Obtain user_ids from usernames or vice versa. Returns false on
|
|
||||||
// success else the error string
|
|
||||||
function user_get_id_name(&$user_id_ary, &$username_ary)
|
function user_get_id_name(&$user_id_ary, &$username_ary)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -66,7 +61,9 @@ function user_get_id_name(&$user_id_ary, &$username_ary)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Updates a username across all relevant tables/fields
|
/**
|
||||||
|
* Updates a username across all relevant tables/fields
|
||||||
|
*/
|
||||||
function user_update_name($old_name, $new_name)
|
function user_update_name($old_name, $new_name)
|
||||||
{
|
{
|
||||||
global $config, $db;
|
global $config, $db;
|
||||||
|
@ -95,6 +92,9 @@ function user_update_name($old_name, $new_name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove User
|
||||||
|
*/
|
||||||
function user_delete($mode, $user_id)
|
function user_delete($mode, $user_id)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth;
|
global $config, $db, $user, $auth;
|
||||||
|
@ -207,8 +207,10 @@ function user_delete($mode, $user_id)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flips user_type from active to inactive and vice versa, handles
|
/**
|
||||||
// group membership updates
|
* Flips user_type from active to inactive and vice versa, handles
|
||||||
|
* group membership updates
|
||||||
|
*/
|
||||||
function user_active_flip($user_id, $user_type, $user_actkey = false, $username = false)
|
function user_active_flip($user_id, $user_type, $user_actkey = false, $username = false)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth;
|
global $db, $user, $auth;
|
||||||
|
@ -293,6 +295,9 @@ function user_active_flip($user_id, $user_type, $user_actkey = false, $username
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ban User
|
||||||
|
*/
|
||||||
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason)
|
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth;
|
global $db, $user, $auth;
|
||||||
|
@ -570,6 +575,9 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unban User
|
||||||
|
*/
|
||||||
function user_unban($mode, $ban)
|
function user_unban($mode, $ban)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth;
|
global $db, $user, $auth;
|
||||||
|
@ -631,7 +639,9 @@ function user_unban($mode, $ban)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Whois facility
|
/**
|
||||||
|
* Whois facility
|
||||||
|
*/
|
||||||
function user_ipwhois($ip)
|
function user_ipwhois($ip)
|
||||||
{
|
{
|
||||||
$ipwhois = '';
|
$ipwhois = '';
|
||||||
|
@ -673,12 +683,13 @@ function user_ipwhois($ip)
|
||||||
|
|
||||||
return $ipwhois;
|
return $ipwhois;
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// Data validation ... used primarily but not exclusively by
|
|
||||||
// ucp modules
|
|
||||||
//
|
|
||||||
|
|
||||||
// "Master" function for validating a range of data types
|
/**
|
||||||
|
* Data validation ... used primarily but not exclusively by
|
||||||
|
* ucp modules
|
||||||
|
*
|
||||||
|
* "Master" function for validating a range of data types
|
||||||
|
*/
|
||||||
function validate_data($data, $val_ary)
|
function validate_data($data, $val_ary)
|
||||||
{
|
{
|
||||||
$error = array();
|
$error = array();
|
||||||
|
@ -705,6 +716,9 @@ function validate_data($data, $val_ary)
|
||||||
return $error;
|
return $error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate String
|
||||||
|
*/
|
||||||
function validate_string($string, $optional = false, $min = 0, $max = 0)
|
function validate_string($string, $optional = false, $min = 0, $max = 0)
|
||||||
{
|
{
|
||||||
if (empty($string) && $optional)
|
if (empty($string) && $optional)
|
||||||
|
@ -724,6 +738,9 @@ function validate_string($string, $optional = false, $min = 0, $max = 0)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate Number
|
||||||
|
*/
|
||||||
function validate_num($num, $optional = false, $min = 0, $max = 1E99)
|
function validate_num($num, $optional = false, $min = 0, $max = 1E99)
|
||||||
{
|
{
|
||||||
if (empty($num) && $optional)
|
if (empty($num) && $optional)
|
||||||
|
@ -743,6 +760,9 @@ function validate_num($num, $optional = false, $min = 0, $max = 1E99)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate Match
|
||||||
|
*/
|
||||||
function validate_match($string, $optional = false, $match)
|
function validate_match($string, $optional = false, $match)
|
||||||
{
|
{
|
||||||
if (empty($string) && $optional)
|
if (empty($string) && $optional)
|
||||||
|
@ -757,9 +777,11 @@ function validate_match($string, $optional = false, $match)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if the username has been taken, or if it is disallowed.
|
/**
|
||||||
// Also checks if it includes the " character, which we don't allow in usernames.
|
* Check to see if the username has been taken, or if it is disallowed.
|
||||||
// Used for registering, changing names, and posting anonymously with a username
|
* Also checks if it includes the " character, which we don't allow in usernames.
|
||||||
|
* Used for registering, changing names, and posting anonymously with a username
|
||||||
|
*/
|
||||||
function validate_username($username)
|
function validate_username($username)
|
||||||
{
|
{
|
||||||
global $config, $db, $user;
|
global $config, $db, $user;
|
||||||
|
@ -825,12 +847,9 @@ function validate_username($username)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO?
|
/**
|
||||||
// Ability to limit types of email address ... not by banning, seperate table
|
* Check to see if email address is banned or already present in the DB
|
||||||
// capability to require (or deny) use of certain addresses when user is
|
*/
|
||||||
// registering from certain IP's/hosts
|
|
||||||
|
|
||||||
// Check to see if email address is banned or already present in the DB
|
|
||||||
function validate_email($email)
|
function validate_email($email)
|
||||||
{
|
{
|
||||||
global $config, $db, $user;
|
global $config, $db, $user;
|
||||||
|
@ -875,10 +894,9 @@ function validate_email($email)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
/**
|
||||||
// Avatar functions
|
* Remove avatar
|
||||||
//
|
*/
|
||||||
|
|
||||||
function avatar_delete($id)
|
function avatar_delete($id)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $config, $db, $user;
|
global $phpbb_root_path, $config, $db, $user;
|
||||||
|
@ -891,6 +909,9 @@ function avatar_delete($id)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remote avatar linkage
|
||||||
|
*/
|
||||||
function avatar_remote($data, &$error)
|
function avatar_remote($data, &$error)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $phpbb_root_path;
|
global $config, $db, $user, $phpbb_root_path;
|
||||||
|
@ -930,6 +951,9 @@ function avatar_remote($data, &$error)
|
||||||
return array(AVATAR_REMOTE, $data['remotelink'], $width, $height);
|
return array(AVATAR_REMOTE, $data['remotelink'], $width, $height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Avatar upload using the upload class
|
||||||
|
*/
|
||||||
function avatar_upload($data, &$error)
|
function avatar_upload($data, &$error)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $config, $db, $user;
|
global $phpbb_root_path, $config, $db, $user;
|
||||||
|
@ -959,6 +983,9 @@ function avatar_upload($data, &$error)
|
||||||
return array(AVATAR_UPLOAD, $file->get('realname'), $file->get('width'), $file->get('height'));
|
return array(AVATAR_UPLOAD, $file->get('realname'), $file->get('width'), $file->get('height'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Avatar Gallery
|
||||||
|
*/
|
||||||
function avatar_gallery($category, &$error)
|
function avatar_gallery($category, &$error)
|
||||||
{
|
{
|
||||||
global $config, $phpbb_root_path, $user;
|
global $config, $phpbb_root_path, $user;
|
||||||
|
@ -1015,8 +1042,10 @@ function avatar_gallery($category, &$error)
|
||||||
// Usergroup functions
|
// Usergroup functions
|
||||||
//
|
//
|
||||||
|
|
||||||
// Add or edit a group. If we're editing a group we only update user
|
/**
|
||||||
// parameters such as rank, etc. if they are changed
|
* Add or edit a group. If we're editing a group we only update user
|
||||||
|
* parameters such as rank, etc. if they are changed
|
||||||
|
*/
|
||||||
function group_create($group_id, $type, $name, $desc)
|
function group_create($group_id, $type, $name, $desc)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $config, $db, $user, $file_upload;
|
global $phpbb_root_path, $config, $db, $user, $file_upload;
|
||||||
|
@ -1093,6 +1122,9 @@ function group_create($group_id, $type, $name, $desc)
|
||||||
return (sizeof($error)) ? $error : false;
|
return (sizeof($error)) ? $error : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Group Delete
|
||||||
|
*/
|
||||||
function group_delete($group_id, $group_name = false)
|
function group_delete($group_id, $group_name = false)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -1162,6 +1194,9 @@ function group_delete($group_id, $group_name = false)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add user(s) to group
|
||||||
|
*/
|
||||||
function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0)
|
function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0)
|
||||||
{
|
{
|
||||||
global $db, $auth;
|
global $db, $auth;
|
||||||
|
@ -1355,9 +1390,11 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove a user/s from a given group. When we remove users we update their
|
/**
|
||||||
// default group_id. We do this by examining which "special" groups they belong
|
* Remove a user/s from a given group. When we remove users we update their
|
||||||
// to. The selection is made based on a reasonable priority system
|
* default group_id. We do this by examining which "special" groups they belong
|
||||||
|
* to. The selection is made based on a reasonable priority system
|
||||||
|
*/
|
||||||
function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false)
|
function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false)
|
||||||
{
|
{
|
||||||
global $db, $auth;
|
global $db, $auth;
|
||||||
|
@ -1485,7 +1522,9 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is used to promote (to leader), demote or set as default a member/s
|
/**
|
||||||
|
* This is used to promote (to leader), demote or set as default a member/s
|
||||||
|
*/
|
||||||
function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false)
|
function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false)
|
||||||
{
|
{
|
||||||
global $db, $auth;
|
global $db, $auth;
|
||||||
|
@ -1622,8 +1661,10 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obtain either the members of a specified group or the groups to
|
/**
|
||||||
// which the specified users are members
|
* Obtain either the members of a specified group or the groups to
|
||||||
|
* which the specified users are members
|
||||||
|
*/
|
||||||
function group_memberships($group_id = false, $user_id_ary = false)
|
function group_memberships($group_id = false, $user_id_ary = false)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
|
@ -1,20 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package mcp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : mcp_forum.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu Jul 08, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
//
|
|
||||||
// TODO:
|
|
||||||
//
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MCP Forum View
|
||||||
|
*/
|
||||||
function mcp_forum_view($id, $mode, $action, $url, $forum_info)
|
function mcp_forum_view($id, $mode, $action, $url, $forum_info)
|
||||||
{
|
{
|
||||||
global $SID, $phpEx, $phpbb_root_path, $config;
|
global $SID, $phpEx, $phpbb_root_path, $config;
|
||||||
|
@ -199,6 +195,9 @@ function mcp_forum_view($id, $mode, $action, $url, $forum_info)
|
||||||
unset($topic_rows);
|
unset($topic_rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resync topics
|
||||||
|
*/
|
||||||
function mcp_resync_topics($topic_ids)
|
function mcp_resync_topics($topic_ids)
|
||||||
{
|
{
|
||||||
global $auth, $db, $template, $phpEx, $user, $SID, $phpbb_root_path;
|
global $auth, $db, $template, $phpEx, $user, $SID, $phpbb_root_path;
|
||||||
|
|
|
@ -1,23 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package mcp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : mcp_front.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu Jul 08, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
//
|
|
||||||
// TODO:
|
|
||||||
// - add list of forums user is moderator in (with links to common management facilities)
|
|
||||||
// - add statistics (how many reports handled, how many posts locked/moved... etc.? -
|
|
||||||
// those would be only valid from the time the log is valid (and not purged)
|
|
||||||
//
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MCP Front Panel
|
||||||
|
*/
|
||||||
function mcp_front_view($id, $mode, $action, $url)
|
function mcp_front_view($id, $mode, $action, $url)
|
||||||
{
|
{
|
||||||
global $SID, $phpEx, $phpbb_root_path, $config;
|
global $SID, $phpEx, $phpbb_root_path, $config;
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package mcp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : mcp_main.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon Sep 02, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package mcp
|
||||||
|
* mcp_main
|
||||||
|
* Handling mcp actions
|
||||||
|
*/
|
||||||
class mcp_main extends module
|
class mcp_main extends module
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -196,10 +198,9 @@ class mcp_main extends module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lock/Unlock Topic/Post
|
||||||
|
*/
|
||||||
// Lock/Unlock Topic/Post
|
|
||||||
function lock_unlock($mode, $ids)
|
function lock_unlock($mode, $ids)
|
||||||
{
|
{
|
||||||
global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path;
|
global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path;
|
||||||
|
@ -272,7 +273,9 @@ function lock_unlock($mode, $ids)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change Topic Type
|
/**
|
||||||
|
* Change Topic Type
|
||||||
|
*/
|
||||||
function change_topic_type($mode, $topic_ids)
|
function change_topic_type($mode, $topic_ids)
|
||||||
{
|
{
|
||||||
global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path;
|
global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path;
|
||||||
|
@ -376,7 +379,9 @@ function change_topic_type($mode, $topic_ids)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move Topic
|
/**
|
||||||
|
* Move Topic
|
||||||
|
*/
|
||||||
function mcp_move_topic($topic_ids)
|
function mcp_move_topic($topic_ids)
|
||||||
{
|
{
|
||||||
global $auth, $user, $db, $template;
|
global $auth, $user, $db, $template;
|
||||||
|
@ -523,7 +528,9 @@ function mcp_move_topic($topic_ids)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete Topics
|
/**
|
||||||
|
* Delete Topics
|
||||||
|
*/
|
||||||
function mcp_delete_topic($topic_ids)
|
function mcp_delete_topic($topic_ids)
|
||||||
{
|
{
|
||||||
global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path;
|
global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path;
|
||||||
|
@ -581,7 +588,9 @@ function mcp_delete_topic($topic_ids)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete Posts
|
/**
|
||||||
|
* Delete Posts
|
||||||
|
*/
|
||||||
function mcp_delete_post($post_ids)
|
function mcp_delete_post($post_ids)
|
||||||
{
|
{
|
||||||
global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path;
|
global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path;
|
||||||
|
@ -690,7 +699,9 @@ function mcp_delete_post($post_ids)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fork Topic
|
/**
|
||||||
|
* Fork Topic
|
||||||
|
*/
|
||||||
function mcp_fork_topic($topic_ids)
|
function mcp_fork_topic($topic_ids)
|
||||||
{
|
{
|
||||||
global $auth, $user, $db, $template, $config;
|
global $auth, $user, $db, $template, $config;
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package mcp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : mcp_post.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu Jul 08, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handling actions in post details screen
|
||||||
|
*/
|
||||||
function mcp_post_details($id, $mode, $action, $url)
|
function mcp_post_details($id, $mode, $action, $url)
|
||||||
{
|
{
|
||||||
global $SID, $phpEx, $phpbb_root_path, $config;
|
global $SID, $phpEx, $phpbb_root_path, $config;
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package mcp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : mcp_queue.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon Sep 02, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package mcp
|
||||||
|
* mcp_queue
|
||||||
|
* Handling the moderation queue
|
||||||
|
*/
|
||||||
class mcp_queue extends module
|
class mcp_queue extends module
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -460,12 +462,9 @@ function approve_post($post_id_list)
|
||||||
|
|
||||||
$messenger->send($post_data['user_notify_type']);
|
$messenger->send($post_data['user_notify_type']);
|
||||||
$messenger->reset();
|
$messenger->reset();
|
||||||
|
}
|
||||||
|
|
||||||
if ($messenger->queue)
|
$messenger->save_queue();
|
||||||
{
|
|
||||||
$messenger->queue->save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send out normal user notifications
|
// Send out normal user notifications
|
||||||
|
@ -669,12 +668,9 @@ function disapprove_post($post_id_list)
|
||||||
|
|
||||||
$messenger->send($post_data['user_notify_type']);
|
$messenger->send($post_data['user_notify_type']);
|
||||||
$messenger->reset();
|
$messenger->reset();
|
||||||
|
}
|
||||||
|
|
||||||
if ($messenger->queue)
|
$messenger->save_queue();
|
||||||
{
|
|
||||||
$messenger->queue->save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
unset($post_info, $disapprove_reason);
|
unset($post_info, $disapprove_reason);
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package mcp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : mcp_topic.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Thu Jul 08, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
//
|
|
||||||
// TODO:
|
|
||||||
//
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View topic in MCP
|
||||||
|
*/
|
||||||
function mcp_topic_view($id, $mode, $action, $url)
|
function mcp_topic_view($id, $mode, $action, $url)
|
||||||
{
|
{
|
||||||
global $SID, $phpEx, $phpbb_root_path, $config;
|
global $SID, $phpEx, $phpbb_root_path, $config;
|
||||||
|
@ -215,6 +211,9 @@ function mcp_topic_view($id, $mode, $action, $url)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Split topic
|
||||||
|
*/
|
||||||
function split_topic($mode, $topic_id, $to_forum_id, $subject)
|
function split_topic($mode, $topic_id, $to_forum_id, $subject)
|
||||||
{
|
{
|
||||||
global $db, $template, $user, $phpEx, $SID, $phpbb_root_path, $auth;
|
global $db, $template, $user, $phpEx, $SID, $phpbb_root_path, $auth;
|
||||||
|
@ -392,7 +391,9 @@ function split_topic($mode, $topic_id, $to_forum_id, $subject)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Merge selected posts into selected topic
|
/**
|
||||||
|
* Merge selected posts into selected topic
|
||||||
|
*/
|
||||||
function merge_posts($topic_id, $to_topic_id)
|
function merge_posts($topic_id, $to_topic_id)
|
||||||
{
|
{
|
||||||
global $db, $template, $user, $phpEx, $SID, $phpbb_root_path, $auth;
|
global $db, $template, $user, $phpEx, $SID, $phpbb_root_path, $auth;
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : message_parser.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Fri Feb 28, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
if (!defined('IN_PHPBB'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
|
@ -35,10 +35,11 @@ if (!class_exists('bbcode'))
|
||||||
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||||
}
|
}
|
||||||
|
|
||||||
// BBCODE_FIRSTPASS
|
/**
|
||||||
//
|
* @package phpBB3
|
||||||
|
* BBCODE FIRSTPASS
|
||||||
// BBCODE first pass class (functions for parsing messages for db storage)
|
* BBCODE first pass class (functions for parsing messages for db storage)
|
||||||
|
*/
|
||||||
class bbcode_firstpass extends bbcode
|
class bbcode_firstpass extends bbcode
|
||||||
{
|
{
|
||||||
var $message = '';
|
var $message = '';
|
||||||
|
@ -600,11 +601,11 @@ class bbcode_firstpass extends bbcode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PARSE_MESSAGE EXTENDS BBCODE
|
/**
|
||||||
//
|
* @package phpBB3
|
||||||
|
* Main message parser for posting, pm, etc. takes raw message
|
||||||
// Main message parser for posting, pm, etc. takes raw message
|
* and parses it for attachments, html, bbcode and smilies
|
||||||
// and parses it for attachments, html, bbcode and smilies
|
*/
|
||||||
class parse_message extends bbcode_firstpass
|
class parse_message extends bbcode_firstpass
|
||||||
{
|
{
|
||||||
var $attachment_data = array();
|
var $attachment_data = array();
|
||||||
|
@ -1144,7 +1145,11 @@ class parse_message extends bbcode_firstpass
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parses a given message and updates/maintains the fulltext tables
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* Parses a given message and updates/maintains the fulltext tables
|
||||||
|
* @todo replace fulltext_search in message_parser with search modules
|
||||||
|
*/
|
||||||
class fulltext_search
|
class fulltext_search
|
||||||
{
|
{
|
||||||
function split_words($mode, $text)
|
function split_words($mode, $text)
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package search
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : mysql.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Fri Nov 19, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package search
|
||||||
|
* fulltext_mysql
|
||||||
|
* Search indexing for MySQL
|
||||||
|
*/
|
||||||
class fulltext_mysql
|
class fulltext_mysql
|
||||||
{
|
{
|
||||||
var $version = 4;
|
var $version = 4;
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package search
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : fulltext.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Fri Nov 19, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package search
|
||||||
|
* fulltext_phpbb
|
||||||
|
* phpBB's own db driven fulltext search
|
||||||
|
*/
|
||||||
class fulltext_phpbb
|
class fulltext_phpbb
|
||||||
{
|
{
|
||||||
function fulltext_phpbb(&$error)
|
function fulltext_phpbb(&$error)
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : session.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
* Session class
|
||||||
|
*/
|
||||||
class session
|
class session
|
||||||
{
|
{
|
||||||
var $session_id = '';
|
var $session_id = '';
|
||||||
|
@ -184,7 +185,7 @@ class session
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
// Check autologin request, is it valid?
|
// Check autologin request, is it valid?
|
||||||
if ($this->data === false || ($this->data['user_password'] != $autologin && !$set_autologin) || ($this->data['user_type'] == USER_INACTIVE && !$bot))
|
if ($this->data === false || ($this->data['user_password'] !== $autologin && !$set_autologin) || ($this->data['user_type'] == USER_INACTIVE && !$bot))
|
||||||
{
|
{
|
||||||
$autologin = '';
|
$autologin = '';
|
||||||
$this->data['user_id'] = $user_id = ANONYMOUS;
|
$this->data['user_id'] = $user_id = ANONYMOUS;
|
||||||
|
@ -475,8 +476,11 @@ class session
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Contains (at present) basic user methods such as configuration
|
/**
|
||||||
// creating date/time ... keep this?
|
* @package phpBB3
|
||||||
|
* Contains (at present) basic user methods such as configuration
|
||||||
|
* creating date/time ... keep this?
|
||||||
|
*/
|
||||||
class user extends session
|
class user extends session
|
||||||
{
|
{
|
||||||
var $lang = array();
|
var $lang = array();
|
||||||
|
@ -865,8 +869,11 @@ class user extends session
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Will be keeping my eye of 'other products' to ensure these things don't
|
/**
|
||||||
// mysteriously appear elsewhere, think up your own solutions!
|
* @package phpBB3
|
||||||
|
* Will be keeping my eye of 'other products' to ensure these things don't
|
||||||
|
* mysteriously appear elsewhere, think up your own solutions!
|
||||||
|
*/
|
||||||
class auth
|
class auth
|
||||||
{
|
{
|
||||||
var $founder = false;
|
var $founder = false;
|
||||||
|
|
|
@ -1,36 +1,34 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : template.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat, Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
/*
|
|
||||||
Template class.
|
|
||||||
|
|
||||||
Nathan Codding - Original version design and implementation
|
|
||||||
Crimsonbane - Initial caching proposal and work
|
|
||||||
psoTFX - Completion of file caching, decompilation routines and implementation of
|
|
||||||
conditionals/keywords and associated changes
|
|
||||||
|
|
||||||
The interface was inspired by PHPLib templates, and the template file (formats are
|
|
||||||
quite similar)
|
|
||||||
|
|
||||||
The keyword/conditional implementation is currently based on sections of code from
|
|
||||||
the Smarty templating engine (c) 2001 ispi of Lincoln, Inc. which is released
|
|
||||||
(on its own and in whole) under the LGPL. Section 3 of the LGPL states that any code
|
|
||||||
derived from an LGPL application may be relicenced under the GPL, this applies
|
|
||||||
to this source
|
|
||||||
|
|
||||||
DEFINE directive inspired by a request by Cyberalien
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package phpBB3
|
||||||
|
*
|
||||||
|
* Template class.
|
||||||
|
*
|
||||||
|
* Nathan Codding - Original version design and implementation
|
||||||
|
* Crimsonbane - Initial caching proposal and work
|
||||||
|
* psoTFX - Completion of file caching, decompilation routines and implementation of
|
||||||
|
* conditionals/keywords and associated changes
|
||||||
|
*
|
||||||
|
* The interface was inspired by PHPLib templates, and the template file (formats are
|
||||||
|
* quite similar)
|
||||||
|
*
|
||||||
|
* The keyword/conditional implementation is currently based on sections of code from
|
||||||
|
* the Smarty templating engine (c) 2001 ispi of Lincoln, Inc. which is released
|
||||||
|
* (on its own and in whole) under the LGPL. Section 3 of the LGPL states that any code
|
||||||
|
* derived from an LGPL application may be relicenced under the GPL, this applies
|
||||||
|
* to this source
|
||||||
|
*
|
||||||
|
* DEFINE directive inspired by a request by Cyberalien
|
||||||
|
*/
|
||||||
class template
|
class template
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -285,38 +283,49 @@ class template
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change already assigned key variable pair (one-dimensional - single loop entry)
|
/**
|
||||||
//
|
* Change already assigned key variable pair (one-dimensional - single loop entry)
|
||||||
// $blockname : the blockname, for example 'loop'
|
*
|
||||||
// $vararray : the var array to insert/add or merge
|
* Some Examples:
|
||||||
// $key : (array) KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] OR
|
* <code>
|
||||||
// (int) Position [the position to change or insert at directly given]
|
*
|
||||||
//
|
* alter_block_array('loop', $varrarray); // Insert vararray at the end
|
||||||
// If key is false the position is set to 0
|
* alter_block_array('loop', $vararray, 2); // Insert vararray at position 2
|
||||||
// If key is true the position is set to the last entry
|
* alter_block_array('loop', $vararray, array('KEY' => 'value')); // Insert vararray at the position where the key 'KEY' has the value of 'value'
|
||||||
//
|
* alter_block_array('loop', $vararray, false); // Insert vararray at first position
|
||||||
// $mode : insert|change
|
* alter_block_array('loop', $vararray, true); //Insert vararray at last position (assign_block_vars equivalence)
|
||||||
// If insert, the vararray is inserted at the given position (position counting from zero).
|
*
|
||||||
// If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be
|
* alter_block_array('loop', $vararray, 2, 'change'); // Change/Merge vararray with existing array at position 2
|
||||||
// replaced by the new value).
|
* alter_block_array('loop', $vararray, array('KEY' => 'value'), 'change'); // Change/Merge vararray with existing array at the position where the key 'KEY' has the value of 'value'
|
||||||
//
|
* alter_block_array('loop', $vararray, false, 'change'); // Change/Merge vararray with existing array at first position
|
||||||
// Since counting begins by zero...
|
* alter_block_array('loop', $vararray, true, 'change'); // Change/Merge vararray with existing array at last position
|
||||||
// inserting at the last position will result in this array: array(vararray, last positioned array)
|
*
|
||||||
// inserting at the position 1 will result in this array: array(first positioned array, vararray, following vars)
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $blockname the blockname, for example 'loop'
|
||||||
|
* @param array $vararray the var array to insert/add or merge
|
||||||
|
* @param mixed $key Key to search for
|
||||||
|
*
|
||||||
|
* array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position]
|
||||||
|
*
|
||||||
|
* int: Position [the position to change or insert at directly given]
|
||||||
|
*
|
||||||
|
* If key is false the position is set to 0
|
||||||
|
*
|
||||||
|
* If key is true the position is set to the last entry
|
||||||
|
*
|
||||||
|
* @param insert|change $mode Mode to execute
|
||||||
|
*
|
||||||
|
* If insert, the vararray is inserted at the given position (position counting from zero).
|
||||||
|
*
|
||||||
|
* If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value).
|
||||||
|
*
|
||||||
|
* Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
|
||||||
|
* and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
|
||||||
|
*
|
||||||
|
*/
|
||||||
function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')
|
function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')
|
||||||
{
|
{
|
||||||
// Examples:
|
|
||||||
// ('loop', $varrarray) : Insert vararray at the end
|
|
||||||
// ('loop', $vararray, 2) : Insert vararray at position 2
|
|
||||||
// ('loop', $vararray, array('KEY' => 'value')) : Insert vararray at the position where the key 'KEY' has the value of 'value'
|
|
||||||
// ('loop', $vararray, false) : Insert vararray at first position
|
|
||||||
// ('loop', $vararray, true) : Insert vararray at last position (assign_block_vars equivalence)
|
|
||||||
|
|
||||||
// ('loop', $vararray, 2, 'change') : Change/Merge vararray with existing array at position 2
|
|
||||||
// ('loop', $vararray, array('KEY' => 'value'), 'change') : Change/Merge vararray with existing array at the position where the key 'KEY' has the value of 'value'
|
|
||||||
// ('loop', $vararray, false, 'change') : Change/Merge vararray with existing array at first position
|
|
||||||
// ('loop', $vararray, true, 'change') : Change/Merge vararray with existing array at last position
|
|
||||||
|
|
||||||
if (strpos($blockname, '.') !== false)
|
if (strpos($blockname, '.') !== false)
|
||||||
{
|
{
|
||||||
// Nested blocks are not supported
|
// Nested blocks are not supported
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : ucp_activate.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon May 19, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package ucp
|
||||||
|
* ucp_activate
|
||||||
|
* User activation
|
||||||
|
*/
|
||||||
class ucp_activate extends module
|
class ucp_activate extends module
|
||||||
{
|
{
|
||||||
function ucp_activate($id, $mode)
|
function ucp_activate($id, $mode)
|
||||||
|
@ -91,7 +93,7 @@ class ucp_activate extends module
|
||||||
);
|
);
|
||||||
|
|
||||||
$messenger->send($row['user_notify_type']);
|
$messenger->send($row['user_notify_type']);
|
||||||
$messenger->queue->save();
|
$messenger->save_queue();
|
||||||
|
|
||||||
$message = 'ACCOUNT_ACTIVE_ADMIN';
|
$message = 'ACCOUNT_ACTIVE_ADMIN';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : ucp_attachments.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon Nov 03, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
//
|
|
||||||
// * Use this for ACP integration - changeable user id
|
|
||||||
//
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package ucp
|
||||||
|
* ucp_attachments
|
||||||
|
* User attachments
|
||||||
|
*/
|
||||||
class ucp_attachments extends module
|
class ucp_attachments extends module
|
||||||
{
|
{
|
||||||
function ucp_attachments($id, $mode)
|
function ucp_attachments($id, $mode)
|
||||||
|
|
|
@ -1,23 +1,25 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : ucp_confirm.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon May 19, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// Note to potential users of this code ...
|
|
||||||
//
|
|
||||||
// Remember this is released under the _GPL_ and is subject
|
|
||||||
// to that licence. Do not incorporate this within software
|
|
||||||
// released or distributed in any way under a licence other
|
|
||||||
// than the GPL. We will be watching ... ;)
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package ucp
|
||||||
|
* ucp_confirm
|
||||||
|
* Visual confirmation
|
||||||
|
*
|
||||||
|
* Note to potential users of this code ...
|
||||||
|
*
|
||||||
|
* Remember this is released under the _GPL_ and is subject
|
||||||
|
* to that licence. Do not incorporate this within software
|
||||||
|
* released or distributed in any way under a licence other
|
||||||
|
* than the GPL. We will be watching ... ;)
|
||||||
|
*/
|
||||||
class ucp_confirm extends module
|
class ucp_confirm extends module
|
||||||
{
|
{
|
||||||
function ucp_confirm($id, $mode)
|
function ucp_confirm($id, $mode)
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : ucp_groups.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sun Jun 6, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package ucp
|
||||||
|
* ucp_groups
|
||||||
|
*/
|
||||||
class ucp_groups extends module
|
class ucp_groups extends module
|
||||||
{
|
{
|
||||||
function ucp_groups($id, $mode)
|
function ucp_groups($id, $mode)
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : ucp_main.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon May 19, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package ucp
|
||||||
|
* ucp_main
|
||||||
|
* UCP Front Panel
|
||||||
|
*/
|
||||||
class ucp_main extends module
|
class ucp_main extends module
|
||||||
{
|
{
|
||||||
function ucp_main($id, $mode)
|
function ucp_main($id, $mode)
|
||||||
|
|
|
@ -1,45 +1,44 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : ucp_pm.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Mar 27, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// TODO:
|
|
||||||
//
|
|
||||||
// * Review of post when replying/quoting
|
|
||||||
// * Handle delete flag (user deletes PM from outbox)
|
|
||||||
// * Report PM
|
|
||||||
// * Check Permissions (compose message - to user/group)
|
|
||||||
|
|
||||||
/*
|
|
||||||
folder=
|
|
||||||
(int) display folder with the id used
|
|
||||||
(string) can be inbox, outbox or sentbox
|
|
||||||
|
|
||||||
Display Unread Messages - mode=unread
|
|
||||||
Display Messages (default to inbox) - mode=view_messages
|
|
||||||
Display single message - mode=view_messages&action=view_message&p=[msg_id] or &p=[msg_id] (short linkage)
|
|
||||||
|
|
||||||
if the folder id with (&f=[folder_id]) is used when displaying messages, one query will be saved. If it is not used, phpBB needs to grab
|
|
||||||
the folder id first in order to display the input boxes and folder names and such things. ;) phpBB always checks this against the database to make
|
|
||||||
sure the user is able to view the message.
|
|
||||||
|
|
||||||
Composing Messages (mode=compose):
|
|
||||||
To specific user (u=[user_id])
|
|
||||||
To specific group (g=[group_id])
|
|
||||||
Quoting a post (action=quote&q=1&p=[post_id])
|
|
||||||
Quoting a PM (action=quote&p=[msg_id])
|
|
||||||
Forwarding a PM (action=forward&p=[msg_id])
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package ucp
|
||||||
|
* ucp_pm
|
||||||
|
*
|
||||||
|
* Private Message Class
|
||||||
|
*
|
||||||
|
* @param int $folder display folder with the id used
|
||||||
|
* @param inbox|outbox|sentbox display folder with the associated name
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Display Unread Messages - mode=unread
|
||||||
|
* Display Messages (default to inbox) - mode=view_messages
|
||||||
|
* Display single message - mode=view_messages&action=view_message&p=[msg_id] or &p=[msg_id] (short linkage)
|
||||||
|
*
|
||||||
|
* if the folder id with (&f=[folder_id]) is used when displaying messages, one query will be saved. If it is not used, phpBB needs to grab
|
||||||
|
* the folder id first in order to display the input boxes and folder names and such things. ;) phpBB always checks this against the database to make
|
||||||
|
* sure the user is able to view the message.
|
||||||
|
*
|
||||||
|
* Composing Messages (mode=compose):
|
||||||
|
* To specific user (u=[user_id])
|
||||||
|
* To specific group (g=[group_id])
|
||||||
|
* Quoting a post (action=quote&q=1&p=[post_id])
|
||||||
|
* Quoting a PM (action=quote&p=[msg_id])
|
||||||
|
* Forwarding a PM (action=forward&p=[msg_id])
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @todo Review of post when replying/quoting
|
||||||
|
* @todo Report PM
|
||||||
|
* @todo Check Permissions (compose message - to user/group)
|
||||||
|
*
|
||||||
|
*/
|
||||||
class ucp_pm extends module
|
class ucp_pm extends module
|
||||||
{
|
{
|
||||||
function ucp_pm($id, $mode)
|
function ucp_pm($id, $mode)
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : compose.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Mar 27, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// * Called from ucp_pm with mode == 'compose'
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compose private message
|
||||||
|
* Called from ucp_pm with mode == 'compose'
|
||||||
|
*/
|
||||||
function compose_pm($id, $mode, $action)
|
function compose_pm($id, $mode, $action)
|
||||||
{
|
{
|
||||||
global $template, $db, $auth, $user;
|
global $template, $db, $auth, $user;
|
||||||
|
@ -763,7 +762,9 @@ function compose_pm($id, $mode, $action)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// For composing messages, handle list actions
|
/**
|
||||||
|
* For composing messages, handle list actions
|
||||||
|
*/
|
||||||
function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_to, $add_bcc)
|
function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_to, $add_bcc)
|
||||||
{
|
{
|
||||||
global $_REQUEST;
|
global $_REQUEST;
|
||||||
|
@ -832,7 +833,9 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return number of recipients
|
/**
|
||||||
|
* Return number of private message recipients
|
||||||
|
*/
|
||||||
function num_recipients($address_list)
|
function num_recipients($address_list)
|
||||||
{
|
{
|
||||||
$num_recipients = 0;
|
$num_recipients = 0;
|
||||||
|
@ -845,7 +848,9 @@ function num_recipients($address_list)
|
||||||
return $num_recipients;
|
return $num_recipients;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get recipient at position 'pos'
|
/**
|
||||||
|
* Get recipient at position 'pos'
|
||||||
|
*/
|
||||||
function get_recipient_pos($address_list, $position = 1)
|
function get_recipient_pos($address_list, $position = 1)
|
||||||
{
|
{
|
||||||
$recipient = array();
|
$recipient = array();
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : options.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon Apr 19, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute message options
|
||||||
|
*/
|
||||||
function message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions)
|
function message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db;
|
global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db;
|
||||||
|
@ -476,6 +476,9 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||||
show_defined_rules($user->data['user_id'], $check_lang, $rule_lang, $action_lang, $folder);
|
show_defined_rules($user->data['user_id'], $check_lang, $rule_lang, $action_lang, $folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defining check option for message rules
|
||||||
|
*/
|
||||||
function define_check_option($hardcoded, $check_option, $check_lang)
|
function define_check_option($hardcoded, $check_option, $check_lang)
|
||||||
{
|
{
|
||||||
global $template;
|
global $template;
|
||||||
|
@ -498,6 +501,9 @@ function define_check_option($hardcoded, $check_option, $check_lang)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defining action option for message rules
|
||||||
|
*/
|
||||||
function define_action_option($hardcoded, $action_option, $action_lang, $folder)
|
function define_action_option($hardcoded, $action_option, $action_lang, $folder)
|
||||||
{
|
{
|
||||||
global $db, $template, $user;
|
global $db, $template, $user;
|
||||||
|
@ -542,6 +548,9 @@ function define_action_option($hardcoded, $action_option, $action_lang, $folder)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defining rule option for message rules
|
||||||
|
*/
|
||||||
function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
|
function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
|
||||||
{
|
{
|
||||||
global $template;
|
global $template;
|
||||||
|
@ -564,6 +573,9 @@ function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defining condition option for message rules
|
||||||
|
*/
|
||||||
function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule_conditions)
|
function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule_conditions)
|
||||||
{
|
{
|
||||||
global $db, $template;
|
global $db, $template;
|
||||||
|
@ -668,6 +680,9 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display defined message rules
|
||||||
|
*/
|
||||||
function show_defined_rules($user_id, $check_lang, $rule_lang, $action_lang, $folder)
|
function show_defined_rules($user_id, $check_lang, $rule_lang, $action_lang, $folder)
|
||||||
{
|
{
|
||||||
global $db, $template;
|
global $db, $template;
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : viewfolder.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sun Apr 11, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// * Called from ucp_pm with mode == 'view_messages' && action == 'view_folder'
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View message folder
|
||||||
|
* Called from ucp_pm with mode == 'view_messages' && action == 'view_folder'
|
||||||
|
*/
|
||||||
function view_folder($id, $mode, $folder_id, $folder, $type)
|
function view_folder($id, $mode, $folder_id, $folder, $type)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db;
|
global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db;
|
||||||
|
@ -179,8 +178,11 @@ function view_folder($id, $mode, $folder_id, $folder, $type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get PM's in folder x from user x
|
/**
|
||||||
// Get PM's in all folders from user x with type of x (unread, new)
|
* Get Messages from folder/user
|
||||||
|
*
|
||||||
|
* @param unread|new|folder $type type of message
|
||||||
|
*/
|
||||||
function get_pm_from($folder_id, $folder, $user_id, $url, $type = 'folder')
|
function get_pm_from($folder_id, $folder, $user_id, $url, $type = 'folder')
|
||||||
{
|
{
|
||||||
global $user, $db, $template, $config, $auth, $_POST;
|
global $user, $db, $template, $config, $auth, $_POST;
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : viewmessage.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon Apr 12, 2004
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2004 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View private message
|
||||||
|
*/
|
||||||
function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db;
|
global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db;
|
||||||
|
@ -222,7 +222,9 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display Message History
|
/**
|
||||||
|
* Display Message History
|
||||||
|
*/
|
||||||
function message_history($msg_id, $user_id, $message_row, $folder)
|
function message_history($msg_id, $user_id, $message_row, $folder)
|
||||||
{
|
{
|
||||||
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $SID, $auth, $bbcode;
|
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $SID, $auth, $bbcode;
|
||||||
|
@ -356,7 +358,9 @@ function message_history($msg_id, $user_id, $message_row, $folder)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get User Informations (only for message display)
|
/**
|
||||||
|
* Get User Informations (only for message display)
|
||||||
|
*/
|
||||||
function get_user_informations($user_id, $user_row)
|
function get_user_informations($user_id, $user_row)
|
||||||
{
|
{
|
||||||
global $config, $db, $auth, $user, $phpbb_root_path, $phpEx, $SID;
|
global $config, $db, $auth, $user, $phpbb_root_path, $phpEx, $SID;
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : ucp_prefs.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon May 19, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package ucp
|
||||||
|
* ucp_prefs
|
||||||
|
* Changing user preferences
|
||||||
|
*/
|
||||||
class ucp_prefs extends module
|
class ucp_prefs extends module
|
||||||
{
|
{
|
||||||
function ucp_prefs($id, $mode)
|
function ucp_prefs($id, $mode)
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : ucp_profile.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon May 19, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package ucp
|
||||||
|
* ucp_profile
|
||||||
|
* Changing profile settings
|
||||||
|
*/
|
||||||
class ucp_profile extends module
|
class ucp_profile extends module
|
||||||
{
|
{
|
||||||
function ucp_profile($id, $mode)
|
function ucp_profile($id, $mode)
|
||||||
|
@ -150,7 +152,7 @@ class ucp_profile extends module
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
$messenger->queue->save();
|
$messenger->save_queue();
|
||||||
|
|
||||||
$sql_ary += array(
|
$sql_ary += array(
|
||||||
'user_type' => USER_INACTIVE,
|
'user_type' => USER_INACTIVE,
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : ucp_register.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon May 19, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package ucp
|
||||||
|
* ucp_register
|
||||||
|
* Board registration
|
||||||
|
*/
|
||||||
class ucp_register extends module
|
class ucp_register extends module
|
||||||
{
|
{
|
||||||
function ucp_register($id, $mode)
|
function ucp_register($id, $mode)
|
||||||
|
@ -69,7 +71,7 @@ class ucp_register extends module
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'L_AGREEMENT' => $user->lang['UCP_AGREEMENT'],
|
'L_TERMS_OF_USE' => $user->lang['TERMS_OF_USE_CONTENT'],
|
||||||
|
|
||||||
'S_SHOW_COPPA' => false,
|
'S_SHOW_COPPA' => false,
|
||||||
'S_REGISTER_ACTION' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=register")
|
'S_REGISTER_ACTION' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=register")
|
||||||
|
@ -413,7 +415,7 @@ class ucp_register extends module
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$code = gen_rand_string(6);
|
$code = gen_rand_string(6);
|
||||||
$confirm_id = md5(uniqid($user_ip));
|
$confirm_id = md5(uniqid($user->ip));
|
||||||
|
|
||||||
$sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
$sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||||
'confirm_id' => (string) $confirm_id,
|
'confirm_id' => (string) $confirm_id,
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : ucp_remind.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon May 19, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package ucp
|
||||||
|
* ucp_remind
|
||||||
|
* Sending password reminders
|
||||||
|
*/
|
||||||
class ucp_remind extends module
|
class ucp_remind extends module
|
||||||
{
|
{
|
||||||
function ucp_remind($id, $mode)
|
function ucp_remind($id, $mode)
|
||||||
|
@ -75,10 +77,7 @@ class ucp_remind extends module
|
||||||
);
|
);
|
||||||
|
|
||||||
$messenger->send($row['user_notify_type']);
|
$messenger->send($row['user_notify_type']);
|
||||||
if ($messenger->queue)
|
$messenger->save_queue();
|
||||||
{
|
|
||||||
$messenger->queue->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
meta_refresh(3, "index.$phpEx$SID");
|
meta_refresh(3, "index.$phpEx$SID");
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package ucp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : ucp_zebra.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sun Sep 28, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package ucp
|
||||||
|
* ucp_zebra
|
||||||
|
*/
|
||||||
class ucp_zebra extends module
|
class ucp_zebra extends module
|
||||||
{
|
{
|
||||||
function ucp_zebra($id, $mode)
|
function ucp_zebra($id, $mode)
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : index.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
$phpbb_root_path = './';
|
$phpbb_root_path = './';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : install.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Dec 17, 2002
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
|
|
||||||
// Error reporting level and runtime escaping
|
// Error reporting level and runtime escaping
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* admin [English]
|
||||||
//
|
*
|
||||||
// FILENAME : admin.php [ English ]
|
* @package phpBB3
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @version $Id$
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
*
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// DO NOT CHANGE
|
/**
|
||||||
|
* DO NOT CHANGE
|
||||||
|
*/
|
||||||
if (empty($lang) || !is_array($lang))
|
if (empty($lang) || !is_array($lang))
|
||||||
{
|
{
|
||||||
$lang = array();
|
$lang = array();
|
||||||
|
@ -201,6 +202,7 @@ $lang += array(
|
||||||
'log_prune_user_del_anon'=> '<b>Users Pruned and Posts Retained</b><br />%s',
|
'log_prune_user_del_anon'=> '<b>Users Pruned and Posts Retained</b><br />%s',
|
||||||
|
|
||||||
'LOG_RESYNC_STATS' => '<b>Post, topic and user stats reset</b>',
|
'LOG_RESYNC_STATS' => '<b>Post, topic and user stats reset</b>',
|
||||||
|
'LOG_RESYNC_POSTCOUNTS' => '<b>User postcounts synced</b>',
|
||||||
'LOG_RESET_DATE' => '<b>Board start date reset</b>',
|
'LOG_RESET_DATE' => '<b>Board start date reset</b>',
|
||||||
'LOG_RESET_ONLINE' => '<b>Most users online reset</b>',
|
'LOG_RESET_ONLINE' => '<b>Most users online reset</b>',
|
||||||
|
|
||||||
|
@ -277,9 +279,6 @@ $lang += array(
|
||||||
'LOG_JAB_REGISTER' => '<b>Jabber account registered</b>',
|
'LOG_JAB_REGISTER' => '<b>Jabber account registered</b>',
|
||||||
'LOG_JAB_CHANGED' => '<b>Jabber account changed</b>',
|
'LOG_JAB_CHANGED' => '<b>Jabber account changed</b>',
|
||||||
|
|
||||||
'LOG_EMAIL_ERROR' => '%s',
|
|
||||||
'LOG_JABBER_ERROR' => '%s',
|
|
||||||
|
|
||||||
'LOG_BOT_ADDED' => '<b>New bot added</b><br />» %s',
|
'LOG_BOT_ADDED' => '<b>New bot added</b><br />» %s',
|
||||||
'LOG_BOT_UPDATED' => '<b>Existing bot updated</b><br />» %s',
|
'LOG_BOT_UPDATED' => '<b>Existing bot updated</b><br />» %s',
|
||||||
'LOG_BOT_DELETE' => '<b>Deleted bot</b><br />» %s',
|
'LOG_BOT_DELETE' => '<b>Deleted bot</b><br />» %s',
|
||||||
|
@ -316,6 +315,7 @@ $lang += array(
|
||||||
'RESET_ONLINE' => 'Reset Online',
|
'RESET_ONLINE' => 'Reset Online',
|
||||||
'RESET_DATE' => 'Reset Date',
|
'RESET_DATE' => 'Reset Date',
|
||||||
'RESYNC_STATS' => 'Resync Stats',
|
'RESYNC_STATS' => 'Resync Stats',
|
||||||
|
'RESYNC_POSTCOUNTS' => 'Resync Postcounts',
|
||||||
|
|
||||||
'INACTIVE_USERS' => 'Inactive Users',
|
'INACTIVE_USERS' => 'Inactive Users',
|
||||||
'INACTIVE_USERS_EXPLAIN'=> 'This is a list of users who have registered but whos accounts are inactive. You can activate, delete or remind (by sending an email) these users if you wish.',
|
'INACTIVE_USERS_EXPLAIN'=> 'This is a list of users who have registered but whos accounts are inactive. You can activate, delete or remind (by sending an email) these users if you wish.',
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* common [English]
|
||||||
//
|
*
|
||||||
// FILENAME : common.php [ English ]
|
* @package phpBB3
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @version $Id$
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
*
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// DO NOT CHANGE
|
/**
|
||||||
|
* DO NOT CHANGE
|
||||||
|
*/
|
||||||
if (empty($lang) || !is_array($lang))
|
if (empty($lang) || !is_array($lang))
|
||||||
{
|
{
|
||||||
$lang = array();
|
$lang = array();
|
||||||
|
@ -43,6 +44,7 @@ $lang += array(
|
||||||
'6_MONTHS' => '6 Months',
|
'6_MONTHS' => '6 Months',
|
||||||
'7_DAYS' => '7 Days',
|
'7_DAYS' => '7 Days',
|
||||||
|
|
||||||
|
'ACCOUNT_ALREADY_ACTIVATED' => 'Your account is already activated',
|
||||||
'ACCOUNT_NOT_ACTIVATED' => 'Your account has not been activated yet',
|
'ACCOUNT_NOT_ACTIVATED' => 'Your account has not been activated yet',
|
||||||
'ACP' => 'Administration Control Panel',
|
'ACP' => 'Administration Control Panel',
|
||||||
'ACTIVE_ERROR' => 'You have specified an inactive username. Please activate your account and try again. If you continue to have problems please contact a board administrator.',
|
'ACTIVE_ERROR' => 'You have specified an inactive username. Please activate your account and try again. If you continue to have problems please contact a board administrator.',
|
||||||
|
@ -173,19 +175,6 @@ $lang += array(
|
||||||
'JUMP_PAGE' => 'Enter the page number you wish to goto',
|
'JUMP_PAGE' => 'Enter the page number you wish to goto',
|
||||||
'JUMP_TO' => 'Jump to',
|
'JUMP_TO' => 'Jump to',
|
||||||
|
|
||||||
'KARMA' => array(
|
|
||||||
'-5' => 'Extremely Bad',
|
|
||||||
'-4' => 'Very Bad',
|
|
||||||
'-3' => 'Very Poor',
|
|
||||||
'-2' => 'Bad',
|
|
||||||
'-1' => 'Poor',
|
|
||||||
'0' => 'Neutral',
|
|
||||||
'1' => 'Positive',
|
|
||||||
'2' => 'Good',
|
|
||||||
'3' => 'Very Good',
|
|
||||||
'4' => 'Extremely good',
|
|
||||||
'5' => 'Excellent'
|
|
||||||
),
|
|
||||||
'KB' => 'KB',
|
'KB' => 'KB',
|
||||||
|
|
||||||
'LAST_POST' => 'Last Post',
|
'LAST_POST' => 'Last Post',
|
||||||
|
@ -208,8 +197,13 @@ $lang += array(
|
||||||
'LOGIN_INFO' => 'In order to login you must be registered. Registering takes only a few seconds but gives you increased capabilies. The board administrator may also grant additional permissions to registered users. Before you login please ensure you are familiar with our terms of use and related policies. Please ensure you read any forum rules as you navigate around the board.',
|
'LOGIN_INFO' => 'In order to login you must be registered. Registering takes only a few seconds but gives you increased capabilies. The board administrator may also grant additional permissions to registered users. Before you login please ensure you are familiar with our terms of use and related policies. Please ensure you read any forum rules as you navigate around the board.',
|
||||||
'LOGIN_VIEWFORUM' => 'The board administrator requires you to be registered and logged in to view this forum.',
|
'LOGIN_VIEWFORUM' => 'The board administrator requires you to be registered and logged in to view this forum.',
|
||||||
'LOGOUT_USER' => 'Logout [ %s ]',
|
'LOGOUT_USER' => 'Logout [ %s ]',
|
||||||
|
'LOG_ADMIN_AUTH_FAIL' => '<b>Failed administration login attempt</b>',
|
||||||
|
'LOG_ADMIN_AUTH_SUCCESS'=> '<b>Sucessful administration login</b>',
|
||||||
'LOG_DELETE_TOPIC' => '<b>Deleted topic</b><br />» %s',
|
'LOG_DELETE_TOPIC' => '<b>Deleted topic</b><br />» %s',
|
||||||
|
'LOG_EMAIL_ERROR' => '<b>Email error<br />» %s',
|
||||||
|
'LOG_JABBER_ERROR' => '<b>Jabber error<br />» %s',
|
||||||
'LOG_ME_IN' => 'Log me on automatically each visit',
|
'LOG_ME_IN' => 'Log me on automatically each visit',
|
||||||
|
'LOG_USER_FEEDBACK' => '<b>Added user feedback</b><br />» %s',
|
||||||
'LOG_USER_GENERAL' => '%s',
|
'LOG_USER_GENERAL' => '%s',
|
||||||
|
|
||||||
'MARK' => 'Mark',
|
'MARK' => 'Mark',
|
||||||
|
@ -311,6 +305,7 @@ $lang += array(
|
||||||
'REPLY_WITH_QUOTE' => 'Reply with quote',
|
'REPLY_WITH_QUOTE' => 'Reply with quote',
|
||||||
'REPLYING_GLOBAL_ANNOUNCE' => 'Replying to global announcement',
|
'REPLYING_GLOBAL_ANNOUNCE' => 'Replying to global announcement',
|
||||||
'REPLYING_MESSAGE' => 'Replying to message in %s',
|
'REPLYING_MESSAGE' => 'Replying to message in %s',
|
||||||
|
'RESEND_ACTIVATION' => 'Resend activation email',
|
||||||
'RESET' => 'Reset',
|
'RESET' => 'Reset',
|
||||||
'RETURN_INDEX' => 'Click %sHere%s to return to the index',
|
'RETURN_INDEX' => 'Click %sHere%s to return to the index',
|
||||||
'RETURN_FORUM' => 'Click %sHere%s to return to the forum',
|
'RETURN_FORUM' => 'Click %sHere%s to return to the forum',
|
||||||
|
|
21
phpBB/language/en/email/user_resend_inactive.txt
Normal file
21
phpBB/language/en/email/user_resend_inactive.txt
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
Subject: Welcome to {SITENAME} Forums
|
||||||
|
Charset: iso-8859-1
|
||||||
|
|
||||||
|
{WELCOME_MSG}
|
||||||
|
|
||||||
|
Please keep this email for your records. Your account information is as follows:
|
||||||
|
|
||||||
|
----------------------------
|
||||||
|
Username: {USERNAME}
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Your password has been encrypted in our database. Should you forget your password you can request a new one which will be activated in the same way as this account.
|
||||||
|
|
||||||
|
Your account is currently inactive. You cannot use it until you visit the following link:
|
||||||
|
|
||||||
|
{U_ACTIVATE}
|
||||||
|
|
||||||
|
|
||||||
|
Thank you for registering.
|
||||||
|
|
||||||
|
{EMAIL_SIG}
|
|
@ -1,17 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* groups [English]
|
||||||
//
|
*
|
||||||
// FILENAME : gcp.php [ English ]
|
* @package phpBB3
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @version $Id$
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
*
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// DO NOT CHANGE
|
/**
|
||||||
|
* DO NOT CHANGE
|
||||||
|
*/
|
||||||
if (empty($lang) || !is_array($lang))
|
if (empty($lang) || !is_array($lang))
|
||||||
{
|
{
|
||||||
$lang = array();
|
$lang = array();
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* help_bbcode [English]
|
||||||
//
|
*
|
||||||
// FILENAME : help_bbcode.php [ English ]
|
* @package phpBB3
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @version $Id$
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
*
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
|
||||||
// DEVELOPERS PLEASE NOTE
|
// DEVELOPERS PLEASE NOTE
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* help_faq [English]
|
||||||
//
|
*
|
||||||
// FILENAME : help_faq.php [ English ]
|
* @package phpBB3
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @version $Id$
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
*
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
|
||||||
// DEVELOPERS PLEASE NOTE
|
// DEVELOPERS PLEASE NOTE
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* mcp [English]
|
||||||
//
|
*
|
||||||
// FILENAME : mcp.php [ English ]
|
* @package phpBB3
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @version $Id$
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
*
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// DO NOT CHANGE
|
/**
|
||||||
|
* DO NOT CHANGE
|
||||||
|
*/
|
||||||
if (empty($lang) || !is_array($lang))
|
if (empty($lang) || !is_array($lang))
|
||||||
{
|
{
|
||||||
$lang = array();
|
$lang = array();
|
||||||
|
@ -98,6 +99,7 @@ $lang += array(
|
||||||
'LOG_UNLOCK' => '<b>Unlocked topic</b><br />» %s',
|
'LOG_UNLOCK' => '<b>Unlocked topic</b><br />» %s',
|
||||||
'LOG_UNLOCK_POST' => '<b>Unlocked post</b><br />» %s',
|
'LOG_UNLOCK_POST' => '<b>Unlocked post</b><br />» %s',
|
||||||
'LOG_UNRATE' => '<b>Unrated post</b><br />» %s',
|
'LOG_UNRATE' => '<b>Unrated post</b><br />» %s',
|
||||||
|
'LOG_USER_LOCK' => '<b>User locked own topic</b><br />» %s',
|
||||||
'LOGVIEW_VIEWTOPIC' => 'View Topic',
|
'LOGVIEW_VIEWTOPIC' => 'View Topic',
|
||||||
'LOGVIEW_VIEWLOGS' => 'View Topic Log',
|
'LOGVIEW_VIEWLOGS' => 'View Topic Log',
|
||||||
'LOGVIEW_VIEWFORUM' => 'View Forum',
|
'LOGVIEW_VIEWFORUM' => 'View Forum',
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* memberlist [English]
|
||||||
//
|
*
|
||||||
// FILENAME : memberlist.php [ English ]
|
* @package phpBB3
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @version $Id$
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
*
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// DO NOT CHANGE
|
/**
|
||||||
|
* DO NOT CHANGE
|
||||||
|
*/
|
||||||
if (empty($lang) || !is_array($lang))
|
if (empty($lang) || !is_array($lang))
|
||||||
{
|
{
|
||||||
$lang = array();
|
$lang = array();
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* posting [English]
|
||||||
//
|
*
|
||||||
// FILENAME : posting.php [ English ]
|
* @package phpBB3
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @version $Id$
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
*
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// DO NOT CHANGE
|
/**
|
||||||
|
* DO NOT CHANGE
|
||||||
|
*/
|
||||||
if (empty($lang) || !is_array($lang))
|
if (empty($lang) || !is_array($lang))
|
||||||
{
|
{
|
||||||
$lang = array();
|
$lang = array();
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* search [English]
|
||||||
//
|
*
|
||||||
// FILENAME : search.php [ English ]
|
* @package phpBB3
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @version $Id$
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
*
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// DO NOT CHANGE
|
/**
|
||||||
|
* DO NOT CHANGE
|
||||||
|
*/
|
||||||
if (empty($lang) || !is_array($lang))
|
if (empty($lang) || !is_array($lang))
|
||||||
{
|
{
|
||||||
$lang = array();
|
$lang = array();
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* ucp [English]
|
||||||
//
|
*
|
||||||
// FILENAME : ucp.php [ English ]
|
* @package phpBB3
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @version $Id$
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
*
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// DO NOT CHANGE
|
/**
|
||||||
|
* DO NOT CHANGE
|
||||||
|
*/
|
||||||
if (empty($lang) || !is_array($lang))
|
if (empty($lang) || !is_array($lang))
|
||||||
{
|
{
|
||||||
$lang = array();
|
$lang = array();
|
||||||
|
@ -33,6 +34,7 @@ $lang += array(
|
||||||
'ACCOUNT_COPPA' => 'Your account has been created but has to be approved, please check your email for details.',
|
'ACCOUNT_COPPA' => 'Your account has been created but has to be approved, please check your email for details.',
|
||||||
'ACCOUNT_INACTIVE' => 'Your account has been created. However, this forum requires account activation, an activation key has been sent to the email address you provided. Please check your email for further information',
|
'ACCOUNT_INACTIVE' => 'Your account has been created. However, this forum requires account activation, an activation key has been sent to the email address you provided. Please check your email for further information',
|
||||||
'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this forum requires account activation by the administrator. An email has been sent to them and you will be informed when your account has been activated',
|
'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this forum requires account activation by the administrator. An email has been sent to them and you will be informed when your account has been activated',
|
||||||
|
'ACTIVATION_EMAIL_SENT' => 'The activation email has been sent to your email address',
|
||||||
'ADD' => 'Add',
|
'ADD' => 'Add',
|
||||||
'ADD_BCC' => 'Add [Bcc]',
|
'ADD_BCC' => 'Add [Bcc]',
|
||||||
'ADD_FOES' => 'Add new foes',
|
'ADD_FOES' => 'Add new foes',
|
||||||
|
@ -305,6 +307,7 @@ $lang += array(
|
||||||
'SORT_POST_TIME' => 'Post Time',
|
'SORT_POST_TIME' => 'Post Time',
|
||||||
'SORT_SIZE' => 'Filesize',
|
'SORT_SIZE' => 'Filesize',
|
||||||
|
|
||||||
|
'TERMS_OF_USE_CONTENT' => 'While the administrators and moderators of this forum will attempt to remove or edit any generally objectionable material as quickly as possible, it is impossible to review every message. Therefore you acknowledge that all posts made to these forums express the views and opinions of the author and not the administrators, moderators or webmaster (except for posts by these people) and hence will not be held liable.<br /><br />You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any applicable laws. Doing so may lead to you being immediately and permanently banned (and your service provider being informed). The IP address of all posts is recorded to aid in enforcing these conditions. You agree that the webmaster, administrator and moderators of this forum have the right to remove, edit, move or close any topic at any time should they see fit. As a user you agree to any information you have entered above being stored in a database. While this information will not be disclosed to any third party without your consent the webmaster, administrator and moderators cannot be held responsible for any hacking attempt that may lead to the data being compromised.<br /><br />This forum system uses cookies to store information on your local computer. These cookies do not contain any of the information you have entered above, they serve only to improve your viewing pleasure. The email address is used only for confirming your registration details and password (and for sending new passwords should you forget your current one).<br /><br />By clicking Register below you agree to be bound by these conditions.',
|
||||||
'TIMEZONE' => 'Timezone',
|
'TIMEZONE' => 'Timezone',
|
||||||
'TO' => 'To',
|
'TO' => 'To',
|
||||||
'TOO_MANY_RECIPIENTS' => 'Too many recipients',
|
'TOO_MANY_RECIPIENTS' => 'Too many recipients',
|
||||||
|
@ -312,7 +315,6 @@ $lang += array(
|
||||||
|
|
||||||
'UCP' => 'User Control Panel',
|
'UCP' => 'User Control Panel',
|
||||||
'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. The administrator will review your account and if approved you will an email at the address you specified.',
|
'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. The administrator will review your account and if approved you will an email at the address you specified.',
|
||||||
'UCP_AGREEMENT' => 'While the administrators and moderators of this forum will attempt to remove or edit any generally objectionable material as quickly as possible, it is impossible to review every message. Therefore you acknowledge that all posts made to these forums express the views and opinions of the author and not the administrators, moderators or webmaster (except for posts by these people) and hence will not be held liable.<br /><br />You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any applicable laws. Doing so may lead to you being immediately and permanently banned (and your service provider being informed). The IP address of all posts is recorded to aid in enforcing these conditions. You agree that the webmaster, administrator and moderators of this forum have the right to remove, edit, move or close any topic at any time should they see fit. As a user you agree to any information you have entered above being stored in a database. While this information will not be disclosed to any third party without your consent the webmaster, administrator and moderators cannot be held responsible for any hacking attempt that may lead to the data being compromised.<br /><br />This forum system uses cookies to store information on your local computer. These cookies do not contain any of the information you have entered above, they serve only to improve your viewing pleasure. The email address is used only for confirming your registration details and password (and for sending new passwords should you forget your current one).<br /><br />By clicking Register below you agree to be bound by these conditions.',
|
|
||||||
'UCP_AIM' => 'AOL Instant Messenger',
|
'UCP_AIM' => 'AOL Instant Messenger',
|
||||||
'UCP_ATTACHMENTS' => 'Attachments',
|
'UCP_ATTACHMENTS' => 'Attachments',
|
||||||
'UCP_COPPA_BEFORE' => 'Before %s',
|
'UCP_COPPA_BEFORE' => 'Before %s',
|
||||||
|
@ -350,6 +352,7 @@ $lang += array(
|
||||||
|
|
||||||
'UCP_REGISTER_DISABLE' => 'Creating a new account is currently not possible.',
|
'UCP_REGISTER_DISABLE' => 'Creating a new account is currently not possible.',
|
||||||
'UCP_REMIND' => 'Send password',
|
'UCP_REMIND' => 'Send password',
|
||||||
|
'UCP_RESEND' => 'Send activation email',
|
||||||
'UCP_WATCHED' => 'Watched items',
|
'UCP_WATCHED' => 'Watched items',
|
||||||
'UCP_WELCOME' => 'Welcome to the User Control Panel. From here you can monitor, view and update your profile, preferences, subscribed forums and topics. You can also send messages to other users (if permitted). Please ensure you read any announcements before continuing.',
|
'UCP_WELCOME' => 'Welcome to the User Control Panel. From here you can monitor, view and update your profile, preferences, subscribed forums and topics. You can also send messages to other users (if permitted). Please ensure you read any announcements before continuing.',
|
||||||
'UCP_YIM' => 'Yahoo Messenger',
|
'UCP_YIM' => 'Yahoo Messenger',
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* viewforum [English]
|
||||||
//
|
*
|
||||||
// FILENAME : viewforum.php [ English ]
|
* @package phpBB3
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @version $Id$
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
*
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// DO NOT CHANGE
|
/**
|
||||||
|
* DO NOT CHANGE
|
||||||
|
*/
|
||||||
if (empty($lang) || !is_array($lang))
|
if (empty($lang) || !is_array($lang))
|
||||||
{
|
{
|
||||||
$lang = array();
|
$lang = array();
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* viewtopic [English]
|
||||||
//
|
*
|
||||||
// FILENAME : viewtopic.php [ English ]
|
* @package phpBB3
|
||||||
// STARTED : Sat Dec 16, 2000
|
* @version $Id$
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// LICENCE : GPL v2.0 [ see /docs/COPYING ]
|
*
|
||||||
//
|
*/
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// DO NOT CHANGE
|
/**
|
||||||
|
* DO NOT CHANGE
|
||||||
|
*/
|
||||||
if (empty($lang) || !is_array($lang))
|
if (empty($lang) || !is_array($lang))
|
||||||
{
|
{
|
||||||
$lang = array();
|
$lang = array();
|
||||||
|
|
|
@ -1,25 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package mcp
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : mcp.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Mon May 5, 2003
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
$phpbb_root_path = './';
|
$phpbb_root_path = './';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
include($phpbb_root_path . 'common.'.$phpEx);
|
include($phpbb_root_path . 'common.'.$phpEx);
|
||||||
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
||||||
|
|
||||||
// ---------
|
/**
|
||||||
// FUNCTIONS
|
* @package mcp
|
||||||
//
|
* MCP Module
|
||||||
|
*/
|
||||||
class module
|
class module
|
||||||
{
|
{
|
||||||
var $id = 0;
|
var $id = 0;
|
||||||
|
@ -278,10 +279,9 @@ class module
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// FUNCTIONS
|
|
||||||
// ---------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
|
||||||
// Start session management
|
// Start session management
|
||||||
$user->start();
|
$user->start();
|
||||||
|
@ -438,7 +438,9 @@ switch ($mode)
|
||||||
//
|
//
|
||||||
// LITTLE HELPER
|
// LITTLE HELPER
|
||||||
|
|
||||||
// request_var, the array way
|
/**
|
||||||
|
* request_var, the array way
|
||||||
|
*/
|
||||||
function get_array($var, $default_value)
|
function get_array($var, $default_value)
|
||||||
{
|
{
|
||||||
$ids = request_var($var, $default_value);
|
$ids = request_var($var, $default_value);
|
||||||
|
@ -463,7 +465,9 @@ function get_array($var, $default_value)
|
||||||
return $ids;
|
return $ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build simple hidden fields from array
|
/**
|
||||||
|
* Build simple hidden fields from array
|
||||||
|
*/
|
||||||
function build_hidden_fields($field_ary)
|
function build_hidden_fields($field_ary)
|
||||||
{
|
{
|
||||||
$s_hidden_fields = '';
|
$s_hidden_fields = '';
|
||||||
|
@ -486,7 +490,9 @@ function build_hidden_fields($field_ary)
|
||||||
return $s_hidden_fields;
|
return $s_hidden_fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get simple topic data
|
/**
|
||||||
|
* Get simple topic data
|
||||||
|
*/
|
||||||
function get_topic_data($topic_ids, $acl_list = false)
|
function get_topic_data($topic_ids, $acl_list = false)
|
||||||
{
|
{
|
||||||
global $auth, $db;
|
global $auth, $db;
|
||||||
|
@ -516,7 +522,9 @@ function get_topic_data($topic_ids, $acl_list = false)
|
||||||
return $rowset;
|
return $rowset;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get simple post data
|
/**
|
||||||
|
* Get simple post data
|
||||||
|
*/
|
||||||
function get_post_data($post_ids, $acl_list = false)
|
function get_post_data($post_ids, $acl_list = false)
|
||||||
{
|
{
|
||||||
global $db, $auth;
|
global $db, $auth;
|
||||||
|
@ -549,6 +557,9 @@ function get_post_data($post_ids, $acl_list = false)
|
||||||
return $rowset;
|
return $rowset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get simple forum data
|
||||||
|
*/
|
||||||
function get_forum_data($forum_id, $acl_list = 'f_list')
|
function get_forum_data($forum_id, $acl_list = 'f_list')
|
||||||
{
|
{
|
||||||
global $auth, $db;
|
global $auth, $db;
|
||||||
|
@ -576,6 +587,9 @@ function get_forum_data($forum_id, $acl_list = 'f_list')
|
||||||
return $rowset;
|
return $rowset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sorting in mcp
|
||||||
|
*/
|
||||||
function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, &$sort_order_sql, &$total, $forum_id = 0, $topic_id = 0, $where_sql = 'WHERE')
|
function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, &$sort_order_sql, &$total, $forum_id = 0, $topic_id = 0, $where_sql = 'WHERE')
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template;
|
global $db, $user, $auth, $template;
|
||||||
|
@ -732,7 +746,9 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
/**
|
||||||
|
* Validate ids
|
||||||
|
*/
|
||||||
function check_ids(&$ids, $table, $sql_id, $acl_list = false)
|
function check_ids(&$ids, $table, $sql_id, $acl_list = false)
|
||||||
{
|
{
|
||||||
global $db, $auth;
|
global $db, $auth;
|
||||||
|
|
|
@ -1,18 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : memberlist.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 13, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
// TODO
|
/**
|
||||||
// Add permission check for IM clients
|
*/
|
||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
$phpbb_root_path = './';
|
$phpbb_root_path = './';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
|
@ -177,7 +174,7 @@ switch ($mode)
|
||||||
);
|
);
|
||||||
|
|
||||||
$messenger->send(NOTIFY_IM);
|
$messenger->send(NOTIFY_IM);
|
||||||
$messenger->queue->save();
|
$messenger->save_queue();
|
||||||
|
|
||||||
$s_select = 'S_SENT_JABBER';
|
$s_select = 'S_SENT_JABBER';
|
||||||
}
|
}
|
||||||
|
@ -591,7 +588,7 @@ switch ($mode)
|
||||||
);
|
);
|
||||||
|
|
||||||
$messenger->send($row['user_notify_type']);
|
$messenger->send($row['user_notify_type']);
|
||||||
$messenger->queue->save();
|
$messenger->save_queue();
|
||||||
|
|
||||||
meta_refresh(3, "index.$phpEx$SID");
|
meta_refresh(3, "index.$phpEx$SID");
|
||||||
$message = (!$topic_id) ? sprintf($user->lang['RETURN_INDEX'], '<a href="' . "index.$phpEx$SID" . '">', '</a>') : sprintf($user->lang['RETURN_TOPIC'], "<a href=\"viewtopic.$phpEx$SID&f=$forum_id&t=" . $row['topic_id'] . '">', '</a>');
|
$message = (!$topic_id) ? sprintf($user->lang['RETURN_INDEX'], '<a href="' . "index.$phpEx$SID" . '">', '</a>') : sprintf($user->lang['RETURN_TOPIC'], "<a href=\"viewtopic.$phpEx$SID&f=$forum_id&t=" . $row['topic_id'] . '">', '</a>');
|
||||||
|
@ -650,7 +647,7 @@ switch ($mode)
|
||||||
|
|
||||||
// Additional sorting options for user search ... if search is enabled, if not
|
// Additional sorting options for user search ... if search is enabled, if not
|
||||||
// then only admins can make use of this (for ACP functionality)
|
// then only admins can make use of this (for ACP functionality)
|
||||||
$sql_where = $form = $field = '';
|
$sql_from = $sql_where = $form = $field = '';
|
||||||
if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
|
if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
|
||||||
{
|
{
|
||||||
$form = request_var('form', '');
|
$form = request_var('form', '');
|
||||||
|
@ -669,7 +666,7 @@ switch ($mode)
|
||||||
$count_select = request_var('count_select', 'eq');
|
$count_select = request_var('count_select', 'eq');
|
||||||
$joined = explode('-', request_var('joined', ''));
|
$joined = explode('-', request_var('joined', ''));
|
||||||
$active = explode('-', request_var('active', ''));
|
$active = explode('-', request_var('active', ''));
|
||||||
$count = request_var('count', 0);
|
$count = (request_var('count', '')) ? request_var('count', 0) : '';
|
||||||
$ipdomain = request_var('ip', '');
|
$ipdomain = request_var('ip', '');
|
||||||
|
|
||||||
$find_key_match = array('lt' => '<', 'gt' => '>', 'eq' => '=');
|
$find_key_match = array('lt' => '<', 'gt' => '>', 'eq' => '=');
|
||||||
|
@ -697,14 +694,14 @@ switch ($mode)
|
||||||
$s_find_active_time .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
|
$s_find_active_time .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_where .= ($username) ? " AND u.username LIKE '" . str_replace('*', '%', $db->sql_escape($username)) ."'" : '';
|
$sql_where .= ($username) ? " AND u.username LIKE '" . str_replace('*', '%', $db->sql_escape($username)) . "'" : '';
|
||||||
$sql_where .= ($email) ? " AND u.user_email LIKE '" . str_replace('*', '%', $db->sql_escape($email)) ."' " : '';
|
$sql_where .= ($email) ? " AND u.user_email LIKE '" . str_replace('*', '%', $db->sql_escape($email)) . "' " : '';
|
||||||
$sql_where .= ($icq) ? " AND u.user_icq LIKE '" . str_replace('*', '%', $db->sql_escape($icq)) ."' " : '';
|
$sql_where .= ($icq) ? " AND u.user_icq LIKE '" . str_replace('*', '%', $db->sql_escape($icq)) . "' " : '';
|
||||||
$sql_where .= ($aim) ? " AND u.user_aim LIKE '" . str_replace('*', '%', $db->sql_escape($aim)) ."' " : '';
|
$sql_where .= ($aim) ? " AND u.user_aim LIKE '" . str_replace('*', '%', $db->sql_escape($aim)) . "' " : '';
|
||||||
$sql_where .= ($yahoo) ? " AND u.user_yim LIKE '" . str_replace('*', '%', $db->sql_escape($yahoo)) ."' " : '';
|
$sql_where .= ($yahoo) ? " AND u.user_yim LIKE '" . str_replace('*', '%', $db->sql_escape($yahoo)) . "' " : '';
|
||||||
$sql_where .= ($msn) ? " AND u.user_msnm LIKE '" . str_replace('*', '%', $db->sql_escape($msn)) ."' " : '';
|
$sql_where .= ($msn) ? " AND u.user_msnm LIKE '" . str_replace('*', '%', $db->sql_escape($msn)) . "' " : '';
|
||||||
$sql_where .= ($jabber) ? " AND u.user_jabber LIKE '" . str_replace('*', '%', $db->sql_escape($jabber)) . "' " : '';
|
$sql_where .= ($jabber) ? " AND u.user_jabber LIKE '" . str_replace('*', '%', $db->sql_escape($jabber)) . "' " : '';
|
||||||
$sql_where .= ($count) ? " AND u.user_posts " . $find_key_match[$count_select] . " $count " : '';
|
$sql_where .= (is_numeric($count)) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
|
||||||
$sql_where .= (sizeof($joined) > 1) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : '';
|
$sql_where .= (sizeof($joined) > 1) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : '';
|
||||||
$sql_where .= (sizeof($active) > 1) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';
|
$sql_where .= (sizeof($active) > 1) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';
|
||||||
|
|
||||||
|
@ -738,7 +735,6 @@ switch ($mode)
|
||||||
|
|
||||||
// Are we looking at a usergroup? If so, fetch additional info
|
// Are we looking at a usergroup? If so, fetch additional info
|
||||||
// and further restrict the user info query
|
// and further restrict the user info query
|
||||||
$sql_from = $sql_where = '';
|
|
||||||
if ($mode == 'group')
|
if ($mode == 'group')
|
||||||
{
|
{
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
|
@ -970,9 +966,9 @@ make_jumpbox('viewforum.'.$phpEx);
|
||||||
page_footer();
|
page_footer();
|
||||||
|
|
||||||
|
|
||||||
// ---------
|
/**
|
||||||
// FUNCTIONS
|
* Prepare profile data
|
||||||
//
|
*/
|
||||||
function show_profile($data)
|
function show_profile($data)
|
||||||
{
|
{
|
||||||
global $config, $auth, $template, $user, $ranks, $SID, $phpEx, $phpbb_root_path;
|
global $config, $auth, $template, $user, $ranks, $SID, $phpEx, $phpbb_root_path;
|
||||||
|
@ -983,7 +979,7 @@ function show_profile($data)
|
||||||
$rank_title = $rank_img = '';
|
$rank_title = $rank_img = '';
|
||||||
if (!empty($data['user_rank']))
|
if (!empty($data['user_rank']))
|
||||||
{
|
{
|
||||||
$rank_title = $ranks['special'][$data['user_rank']]['rank_title'];
|
$rank_title = (isset($ranks['special'][$data['user_rank']]['rank_title'])) ? $ranks['special'][$data['user_rank']]['rank_title'] : '';
|
||||||
$rank_img = (!empty($ranks['special'][$data['user_rank']]['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $ranks['special'][$data['user_rank']]['rank_image'] . '" border="0" alt="' . $ranks['special'][$data['user_rank']]['rank_title'] . '" title="' . $ranks['special'][$data['user_rank']]['rank_title'] . '" /><br />' : '';
|
$rank_img = (!empty($ranks['special'][$data['user_rank']]['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $ranks['special'][$data['user_rank']]['rank_image'] . '" border="0" alt="' . $ranks['special'][$data['user_rank']]['rank_title'] . '" title="' . $ranks['special'][$data['user_rank']]['rank_title'] . '" /><br />' : '';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1042,8 +1038,5 @@ function show_profile($data)
|
||||||
'S_ONLINE' => (intval($data['session_time']) >= time() - 300) ? true : false
|
'S_ONLINE' => (intval($data['session_time']) >= time() - 300) ? true : false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// FUNCTIONS
|
|
||||||
// ---------
|
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
// -------------------------------------------------------------
|
/**
|
||||||
//
|
*
|
||||||
// $Id$
|
* @package phpBB3
|
||||||
//
|
* @version $Id$
|
||||||
// FILENAME : posting.php
|
* @copyright (c) 2005 phpBB Group
|
||||||
// STARTED : Sat Feb 17, 2001
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
*
|
||||||
// WWW : http://www.phpbb.com/
|
*/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
|
||||||
//
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
$phpbb_root_path = './';
|
$phpbb_root_path = './';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
|
@ -1165,11 +1164,9 @@ if ($mode == 'reply' || $mode == 'quote')
|
||||||
page_footer();
|
page_footer();
|
||||||
|
|
||||||
|
|
||||||
// ---------
|
/**
|
||||||
// FUNCTIONS
|
* Delete Post
|
||||||
//
|
*/
|
||||||
|
|
||||||
// Delete Post
|
|
||||||
function delete_post($mode, $post_id, $topic_id, $forum_id, &$data)
|
function delete_post($mode, $post_id, $topic_id, $forum_id, &$data)
|
||||||
{
|
{
|
||||||
global $db, $user, $config, $auth, $phpEx, $SID;
|
global $db, $user, $config, $auth, $phpEx, $SID;
|
||||||
|
@ -1306,7 +1303,9 @@ function delete_post($mode, $post_id, $topic_id, $forum_id, &$data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Submit Post
|
/**
|
||||||
|
* Submit Post
|
||||||
|
*/
|
||||||
function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true)
|
function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true)
|
||||||
{
|
{
|
||||||
global $db, $auth, $user, $config, $phpEx, $SID, $template, $phpbb_root_path;
|
global $db, $auth, $user, $config, $phpEx, $SID, $template, $phpbb_root_path;
|
||||||
|
@ -1858,8 +1857,4 @@ function upload_popup($forum_style)
|
||||||
$template->display('popup');
|
$template->display('popup');
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// FUNCTIONS
|
|
||||||
// ---------
|
|
||||||
|
|
||||||
?>
|
?>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue