- removed db cache (might re-appear, but for now we do not see the need for it)

- all changes to styles/subsilver/template are purely cosmetic (no functional changes)
- cosmetics
- bugfixes
- add index to modules table
- use modules ordering code for forums too


git-svn-id: file:///svn/phpbb/trunk@6073 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2006-06-16 16:54:51 +00:00
parent a3c9182e0f
commit b0c3e39582
144 changed files with 4275 additions and 4156 deletions

View file

@ -108,7 +108,7 @@ function adm_page_header($page_title)
// gzip_compression
if ($config['gzip_compress'])
{
if (extension_loaded('zlib') && !headers_sent())
if (@extension_loaded('zlib') && !headers_sent())
{
ob_start('ob_gzhandler');
}
@ -135,6 +135,12 @@ function adm_page_header($page_title)
'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
'ICON_MOVE_UP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
'ICON_MOVE_DOWN' => '<img src="' . $phpbb_admin_path . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
'ICON_EDIT' => '<img src="' . $phpbb_admin_path . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
'ICON_DELETE' => '<img src="' . $phpbb_admin_path . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
'ICON_SYNC' => '<img src="' . $phpbb_admin_path . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
'S_CONTENT_ENCODING' => $user->lang['ENCODING'],
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],

View file

@ -87,7 +87,7 @@
<!-- BEGIN bbcodes -->
<!-- IF bbcodes.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="text-align: center;">{bbcodes.BBCODE_TAG}</td>
<td style="text-align: center;"><a href="{bbcodes.U_EDIT}">{L_EDIT}</a> | <a href="{bbcodes.U_DELETE}">{L_DELETE}</a></td>
<td style="text-align: center;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}">{ICON_DELETE}</a></td>
</tr>
<!-- END bbcodes -->
</tbody>

View file

@ -316,11 +316,11 @@
<!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <b>{forums.FORUM_TOPICS}</b> / {L_POSTS}: <b>{forums.FORUM_POSTS}</b></span><!-- ENDIF -->
</td>
<td style="width: 15%; text-align: right; white-space: nowrap;">
<!-- IF not forums.S_FIRST_ROW --><a href="{forums.U_MOVE_UP}"><img src="images/icon_up.gif" alt="{L_MOVE_UP}" title="{L_MOVE_UP}" width="16" height="16" /></a> <!-- ENDIF -->
<!-- IF not forums.S_LAST_ROW --><a href="{forums.U_MOVE_DOWN}"><img src="images/icon_down.gif" alt="{L_MOVE_DOWN}" title="{L_MOVE_DOWN}" width="16" height="16" /></a> <!-- ENDIF -->
<a href="{forums.U_EDIT}"><img src="images/icon_edit.gif" alt="{L_EDIT}" title="{L_EDIT}" width="16" height="16" /></a>
<!-- IF not forums.S_LINK --><a href="{forums.U_SYNC}"><img src="images/icon_sync.gif" alt="{L_RESYNC}" title="{L_RESYNC}" width="16" height="16" /></a> <!-- ENDIF -->
<a href="{forums.U_DELETE}"><img src="images/icon_delete.gif" alt="{L_DELETE}" title="{L_DELETE}" width="16" height="16" /></a>
<!-- IF not forums.S_FIRST_ROW --><a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
<!-- IF not forums.S_LAST_ROW --><a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ENDIF -->
<a href="{forums.U_EDIT}">{ICON_EDIT}</a>
<!-- IF not forums.S_LINK --><a href="{forums.U_SYNC}">{ICON_SYNC}</a> <!-- ENDIF -->
<a href="{forums.U_DELETE}">{ICON_DELETE}</a>
</td>
</tr>
<!-- END forums -->

View file

@ -145,10 +145,10 @@
<td style="text-align: center;">{items.EMOTION}</td>
<!-- ENDIF -->
<td style="width: 15%; text-align: right; white-space: nowrap;">
<!-- IF not items.S_FIRST_ROW --><a href="{items.U_MOVE_UP}"><img src="images/icon_up.gif" alt="{L_MOVE_UP}" title="{L_MOVE_UP}" width="16" height="16" /></a> <!-- ENDIF -->
<!-- IF not items.S_LAST_ROW --><a href="{items.U_MOVE_DOWN}"><img src="images/icon_down.gif" alt="{L_MOVE_DOWN}" title="{L_MOVE_DOWN}" width="16" height="16" /></a> <!-- ENDIF -->
<a href="{items.U_EDIT}"><img src="images/icon_edit.gif" alt="{L_EDIT}" title="{L_EDIT}" width="16" height="16" /></a>
<a href="{items.U_DELETE}"><img src="images/icon_delete.gif" alt="{L_DELETE}" title="{L_DELETE}" width="16" height="16" /></a>
<!-- IF not items.S_FIRST_ROW --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
<!-- IF not items.S_LAST_ROW --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ENDIF -->
<a href="{items.U_EDIT}">{ICON_EDIT}</a>
<a href="{items.U_DELETE}">{ICON_DELETE}</a>
</td>
</tr>
<!-- END items -->

View file

@ -144,11 +144,13 @@
<tr>
<td style="width: 5%;">{modules.MODULE_IMAGE}</td>
<td style="width: 50%;"><a href="{modules.U_MODULE}">{modules.MODULE_TITLE}</a><!-- IF not modules.MODULE_DISPLAYED --> <span class="small">[{L_HIDDEN_MODULE}]</span><!-- ENDIF --></td>
<td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;"><a href="{modules.U_MOVE_UP}">{L_MOVE_UP}</a><br /><a href="{modules.U_MOVE_DOWN}">{L_MOVE_DOWN}</a></td>
<td style="width: 20%; white-space: nowrap; text-align: center; vertical-align: middle;">&nbsp;
<a href="{modules.U_EDIT}">{L_EDIT}</a> | <a href="{modules.U_DELETE}">{L_DELETE}</a> |
<!-- IF modules.MODULE_ENABLED --><a href="{modules.U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{modules.U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->
&nbsp;</td>
<td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;">&nbsp;<!-- IF modules.MODULE_ENABLED --><a href="{modules.U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{modules.U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->&nbsp;</td>
<td style="width: 20%; white-space: nowrap; text-align: center; vertical-align: middle;">
<!-- IF not modules.S_FIRST_ROW --><a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
<!-- IF not modules.S_LAST_ROW --><a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ENDIF -->
<a href="{modules.U_EDIT}">{ICON_EDIT}</a>
<a href="{modules.U_DELETE}">{ICON_DELETE}</a>
</td>
</tr>
<!-- END modules -->
</tbody>

View file

@ -188,10 +188,10 @@
</td>
<td style="vertical-align: top; white-space: nowrap;"><!-- IF roles.U_DISPLAY_ITEMS --><a href="{roles.U_DISPLAY_ITEMS}">{L_VIEW_ASSIGNED_ITEMS}</a><!-- ELSE -->{L_VIEW_ASSIGNED_ITEMS}<!-- ENDIF --></td>
<td style="vertical-align: top; white-space: nowrap;">
<!-- IF not roles.S_FIRST_ROW --><a href="{roles.U_MOVE_UP}"><img src="images/icon_up.gif" alt="{L_MOVE_UP}" title="{L_MOVE_UP}" width="16" height="16" /></a> <!-- ENDIF -->
<!-- IF not roles.S_LAST_ROW --><a href="{roles.U_MOVE_DOWN}"><img src="images/icon_down.gif" alt="{L_MOVE_DOWN}" title="{L_MOVE_DOWN}" width="16" height="16" /></a> <!-- ENDIF -->
<a href="{roles.U_EDIT}"><img src="images/icon_edit.gif" alt="{L_EDIT_ROLE}" title="{L_EDIT_ROLE}" width="16" height="16" /></a>
<a href="{roles.U_REMOVE}"><img src="images/icon_delete.gif" alt="{L_REMOVE_ROLE}" title="{L_REMOVE_ROLE}" width="16" height="16" /></a>
<!-- IF not roles.S_FIRST_ROW --><a href="{roles.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
<!-- IF not roles.S_LAST_ROW --><a href="{roles.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ENDIF -->
<a href="{roles.U_EDIT}" title="{L_EDIT_ROLE}">{ICON_EDIT}</a>
<a href="{roles.U_REMOVE}" title="{L_REMOVE_ROLE}">{ICON_DELETE}</a>
</td>
</tr>
<!-- END roles -->

View file

@ -167,10 +167,10 @@
<td><a href="{fields.U_ACTIVATE_DEACTIVATE}">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_EDIT}"><span style="color:red;">{L_EDIT}</span><!-- ENDIF --></td>
<td style="width: 15%; text-align: right; white-space: nowrap;">
<!-- IF not fields.S_FIRST_ROW --><a href="{fields.U_MOVE_UP}"><img src="images/icon_up.gif" alt="{L_MOVE_UP}" title="{L_MOVE_UP}" width="16" height="16" /></a> <!-- ENDIF -->
<!-- IF not fields.S_LAST_ROW --><a href="{fields.U_MOVE_DOWN}"><img src="images/icon_down.gif" alt="{L_MOVE_DOWN}" title="{L_MOVE_DOWN}" width="16" height="16" /></a> <!-- ENDIF -->
<!-- IF not fields.S_NEED_EDIT --><a href="{fields.U_EDIT}"><img src="images/icon_edit.gif" alt="{L_EDIT}" title="{L_EDIT}" width="16" height="16" /></a> <!-- ENDIF -->
<a href="{fields.U_DELETE}"><img src="images/icon_delete.gif" alt="{L_DELETE}" title="{L_DELETE}" width="16" height="16" /></a>
<!-- IF not fields.S_FIRST_ROW --><a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
<!-- IF not fields.S_LAST_ROW --><a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ENDIF -->
<!-- IF not fields.S_NEED_EDIT --><a href="{fields.U_EDIT}">{ICON_EDIT}</a> <!-- ENDIF -->
<a href="{fields.U_DELETE}">{ICON_DELETE}</a>
</td>
</tr>

View file

@ -75,7 +75,7 @@
<td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" /><!-- ELSE -->&nbsp; - &nbsp;<!-- ENDIF --></td>
<td style="text-align: center;">{ranks.RANK_TITLE}</td>
<td style="text-align: center;"><!-- IF ranks.S_SPECIAL_RANK -->&nbsp; - &nbsp;<!-- ELSE -->{ranks.MIN_POSTS}<!-- ENDIF --></td>
<td style="text-align: center;"><a href="{ranks.U_EDIT}">{L_EDIT}</a> | <a href="{ranks.U_DELETE}">{L_DELETE}</a></td>
<td style="text-align: center;"><a href="{ranks.U_EDIT}">{ICON_EDIT}</a> <a href="{ranks.U_DELETE}">{ICON_DELETE}</a></td>
</tr>
<!-- END ranks -->
</tbody>

View file

@ -65,10 +65,10 @@
</td>
<td style="width: 100px;">{reasons.REASON_COUNT}</td>
<td style="width: 15%; text-align: right; white-space: nowrap;">
<!-- IF not reasons.S_FIRST_ROW --><a href="{reasons.U_MOVE_UP}"><img src="images/icon_up.gif" alt="{L_MOVE_UP}" title="{L_MOVE_UP}" width="16" height="16" /></a> <!-- ENDIF -->
<!-- IF not reasons.S_LAST_ROW --><a href="{reasons.U_MOVE_DOWN}"><img src="images/icon_down.gif" alt="{L_MOVE_DOWN}" title="{L_MOVE_DOWN}" width="16" height="16" /></a> <!-- ENDIF -->
<a href="{reasons.U_EDIT}"><img src="images/icon_edit.gif" alt="{L_EDIT}" title="{L_EDIT}" width="16" height="16" /></a>
<!-- IF reasons.U_DELETE --><a href="{reasons.U_DELETE}"><img src="images/icon_delete.gif" alt="{L_DELETE}" title="{L_DELETE}" width="16" height="16" /></a><!-- ENDIF -->
<!-- IF not reasons.S_FIRST_ROW --><a href="{reasons.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
<!-- IF not reasons.S_LAST_ROW --><a href="{reasons.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ENDIF -->
<a href="{reasons.U_EDIT}">{ICON_EDIT}</a>
<!-- IF reasons.U_DELETE --><a href="{reasons.U_DELETE}">{ICON_DELETE}</a><!-- ENDIF -->
</td>
</tr>
<!-- END reasons -->

View file

@ -1,227 +0,0 @@
<?php
/**
*
* @package acm
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @package acm
* ACM Database Caching
*/
class acm
{
// Contains all loaded variables
var $vars = '';
// Contains the names of the variables that are ready to be used
// (iow, variables that have been unserialized)
var $var_ready = array();
// Contains variables that have been updated or destroyed this session
var $var_expires = array();
// Contains variables that have already been requested
// If a variable has been requested but not loaded, it simply means it
// wasn't found in the db
var $var_requested = array();
function load($var_names = '')
{
global $db;
$this->vars = array();
if (is_array($var_names))
{
$var_requested = $var_names;
$sql_condition = "var_name IN ('" . implode("', '", $var_names) . "')";
}
else
{
// $sql_condition = "var_name NOT LIKE '\_%'";
$sql_condition = "LEFT(var_name, 1) <> '_'";
}
$sql = 'SELECT var_name, var_data
FROM ' . CACHE_TABLE . '
WHERE var_expires > ' . time() . "
AND $sql_condition";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$this->vars[$row['var_name']] = $row['var_data'];
if (!$var_names)
{
$this->var_requested[] = $row['var_name'];
}
}
}
function unload()
{
$this->save();
unset($this->vars);
}
function save()
{
global $db;
$delete = $insert = array();
foreach ($this->var_expires as $var_name => $expires)
{
if ($expires == 'now')
{
$delete[] = $var_name;
}
else
{
$delete[] = $var_name;
$insert[] = "'$var_name', $expires, '" . $db->sql_escape(serialize($this->vars[$var_name])) . "'";
}
}
$this->var_expires = array();
if (sizeof($delete))
{
$sql = 'DELETE FROM ' . CACHE_TABLE . "
WHERE var_name IN ('" . implode("', '", $delete) . "')";
$db->sql_query($sql);
}
if (sizeof($insert))
{
switch (SQL_LAYER)
{
case 'mysql':
case 'mysql4':
case 'mysqli':
$sql = 'INSERT INTO ' . CACHE_TABLE . ' (var_name, var_expires, var_data)
VALUES (' . implode('), (', $insert) . ')';
$db->sql_query($sql);
break;
default:
foreach ($insert as $values)
{
$sql = 'INSERT INTO ' . CACHE_TABLE . " (var_name, var_expires, var_data)
VALUES ($values)";
$db->sql_query($sql);
}
}
}
}
function tidy()
{
global $db;
$sql = 'DELETE FROM ' . CACHE_TABLE . '
WHERE var_expires < ' . time();
$db->sql_query($sql);
set_config('cache_last_gc', time(), true);
}
function get($var_name)
{
if (!is_array($this->vars))
{
$this->load();
}
if ($var_name{0} == '_')
{
if (!in_array($var_name, $this->var_requested))
{
$this->var_requested[] = $var_name;
global $db;
$sql = 'SELECT var_data
FROM ' . CACHE_TABLE . "
WHERE var_name = '$var_name'
AND var_expires > " . time();
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
$this->vars[$var_name] = $row['var_data'];
}
}
}
if ($this->_exists($var_name))
{
if (empty($this->var_ready[$var_name]))
{
$this->vars[$var_name] = unserialize($this->vars[$var_name]);
$this->var_ready[$var_name] = true;
}
return $this->vars[$var_name];
}
else
{
return false;
}
}
function put($var_name, $var_data, $ttl = 31536000)
{
$this->vars[$var_name] = $var_data;
if ($var_name{0} == '_')
{
global $db;
switch (SQL_LAYER)
{
case 'mysql':
case 'mysql4':
case 'mysqli':
$INSERT = 'REPLACE';
break;
default:
$sql = 'DELETE FROM ' . CACHE_TABLE . "
WHERE var_name = '$var_name'";
$db->sql_query($sql);
$INSERT = 'INSERT';
}
$sql = "$INSERT INTO " . CACHE_TABLE . " (var_name, var_expires, var_data)
VALUES ('$var_name', " . (time() + $ttl) . ", '" . $db->sql_escape(serialize($var_data)) . "')";
$db->sql_query($sql);
}
else
{
$this->var_expires[$var_name] = time() + $ttl;
}
}
function destroy($var_name, $void = NULL)
{
if (isset($this->vars[$var_name]))
{
$this->var_expires[$var_name] = 'now';
unset($this->vars[$var_name]);
}
}
function _exists($var_name)
{
if (!is_array($this->vars))
{
$this->load();
}
return isset($this->vars[$var_name]);
}
}
?>

View file

@ -256,7 +256,6 @@ class acp_attachments
{
if ($submit)
{
// Change Extensions ?
$extension_change_list = (isset($_POST['extension_change_list'])) ? array_map('intval', $_POST['extension_change_list']) : array();
$group_select_list = (isset($_POST['group_select'])) ? array_map('intval', $_POST['group_select']) : array();
@ -282,6 +281,7 @@ class acp_attachments
SET group_id = ' . (int) $extensions[$row['extension_id']]['group_id'] . '
WHERE extension_id = ' . $row['extension_id'];
$db->sql_query($sql);
add_log('admin', 'LOG_ATTACH_EXT_UPDATE', $row['extension']);
}
}
@ -439,6 +439,7 @@ class acp_attachments
FROM ' . EXTENSION_GROUPS_TABLE . "
WHERE LOWER(group_name) = '" . $db->sql_escape(strtolower($new_group_name)) . "'";
$result = $db->sql_query($sql);
if ($db->sql_fetchrow($result))
{
$error[] = sprintf($user->lang['EXTENSION_GROUP_EXIST'], $new_group_name);
@ -580,7 +581,8 @@ class acp_attachments
trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($this->u_action));
}
$sql = 'SELECT * FROM ' . EXTENSION_GROUPS_TABLE . "
$sql = 'SELECT *
FROM ' . EXTENSION_GROUPS_TABLE . "
WHERE group_id = $group_id";
$result = $db->sql_query($sql);
$ext_group_row = $db->sql_fetchrow($result);
@ -588,6 +590,8 @@ class acp_attachments
$forum_ids = (!$ext_group_row['allowed_forums']) ? array() : unserialize(trim($ext_group_row['allowed_forums']));
// no break;
case 'add':
if ($action == 'add')
@ -607,8 +611,10 @@ class acp_attachments
$extensions = array();
$sql = 'SELECT * FROM ' . EXTENSIONS_TABLE . "
WHERE group_id = $group_id OR group_id = 0
$sql = 'SELECT *
FROM ' . EXTENSIONS_TABLE . "
WHERE group_id = $group_id
OR group_id = 0
ORDER BY extension";
$result = $db->sql_query($sql);
$extensions = $db->sql_fetchrowset($result);
@ -808,7 +814,6 @@ class acp_attachments
if ($submit)
{
$delete_files = (isset($_POST['delete'])) ? array_keys(request_var('delete', array('' => 0))) : array();
$add_files = (isset($_POST['add'])) ? array_keys(request_var('add', array('' => 0))) : array();
$post_ids = request_var('post_id', array('' => 0));
@ -862,15 +867,15 @@ class acp_attachments
{
$return = true;
if ($auth->acl_gets('f_attach', 'u_attach', $row['forum_id']))
if ($auth->acl_get('f_attach', $row['forum_id']))
{
$return = $this->upload_file($row['post_id'], $row['topic_id'], $row['forum_id'], $config['upload_path'], $upload_list[$row['post_id']]);
}
$template->assign_block_vars('upload', array(
'FILE_INFO' => sprintf($user->lang['UPLOADING_FILE_TO'], $upload_list[$row['post_id']], $row['post_id']),
'S_DENIED' => (!$auth->acl_gets('f_attach', 'u_attach', $row['forum_id'])) ? true : false,
'L_DENIED' => (!$auth->acl_gets('f_attach', 'u_attach', $row['forum_id'])) ? sprintf($user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '',
'S_DENIED' => (!$auth->acl_get('f_attach', $row['forum_id'])) ? true : false,
'L_DENIED' => (!$auth->acl_get('f_attach', $row['forum_id'])) ? sprintf($user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '',
'ERROR_MSG' => ($return === true) ? false : $return)
);
}
@ -939,7 +944,6 @@ class acp_attachments
'NOTIFY_MSG' => implode('<br />', $notify))
);
}
}
/**
@ -1072,7 +1076,6 @@ class acp_attachments
/**
* Upload already uploaded file... huh? are you kidding?
* @todo integrate into upload class
*/
function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename)
{
@ -1332,6 +1335,7 @@ class acp_attachments
unset($iplist_tmp);
unset($hostlist_tmp);
}
$db->sql_freeresult($result);
if (sizeof($iplist))
{
@ -1380,6 +1384,7 @@ class acp_attachments
{
$l_unip_list .= (($l_unip_list != '') ? ', ' : '') . (($row['site_ip']) ? $row['site_ip'] : $row['site_hostname']);
}
$db->sql_freeresult($result);
$sql = 'DELETE FROM ' . SITELIST_TABLE . "
WHERE site_id IN ($unip_sql)";

View file

@ -96,6 +96,9 @@ class acp_ban
);
}
/**
* Display ban options
*/
function display_ban_options($mode)
{
global $user, $db, $template;

View file

@ -42,12 +42,13 @@ class acp_bbcodes
FROM ' . BBCODES_TABLE . '
WHERE bbcode_id = ' . $bbcode_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row = $db->sql_fetchrow($result))
if (!$row)
{
trigger_error('BBCODE_NOT_EXIST');
}
$db->sql_freeresult($result);
$bbcode_match = $row['bbcode_match'];
$bbcode_tpl = htmlspecialchars($row['bbcode_tpl']);
@ -59,12 +60,13 @@ class acp_bbcodes
FROM ' . BBCODES_TABLE . '
WHERE bbcode_id = ' . $bbcode_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row = $db->sql_fetchrow($result))
if (!$row)
{
trigger_error('BBCODE_NOT_EXIST');
}
$db->sql_freeresult($result);
// No break here
@ -151,12 +153,17 @@ class acp_bbcodes
$sql_ary['bbcode_id'] = (int) $bbcode_id;
$db->sql_query('INSERT INTO ' . BBCODES_TABLE . $db->sql_build_array('INSERT', $sql_ary));
$lang = 'BBCODE_ADDED';
$log_action = 'LOG_BBCODE_ADD';
}
else
{
$db->sql_query('UPDATE ' . BBCODES_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE bbcode_id = ' . $bbcode_id);
$sql = 'UPDATE ' . BBCODES_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE bbcode_id = ' . $bbcode_id;
$db->sql_query($sql);
$lang = 'BBCODE_EDITED';
$log_action = 'LOG_BBCODE_EDIT';
}
@ -173,13 +180,14 @@ class acp_bbcodes
FROM ' . BBCODES_TABLE . "
WHERE bbcode_id = $bbcode_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row = $db->sql_fetchrow($result))
if ($row)
{
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']);
}
$db->sql_freeresult($result);
break;
}

View file

@ -498,7 +498,6 @@ class acp_board
// Output relevant page
foreach ($display_vars['vars'] as $config_key => $vars)
{
if (!is_array($vars) && strpos($config_key, 'legend') === false)
{
continue;
@ -564,6 +563,9 @@ class acp_board
}
}
/**
* Select auth method
*/
function select_auth_method($selected_method, $key = '')
{
global $phpbb_root_path, $phpEx;
@ -591,6 +593,9 @@ class acp_board
return $auth_select;
}
/**
* Select mail authentication method
*/
function mail_auth_select($selected_method, $key = '')
{
global $user;
@ -606,6 +611,9 @@ class acp_board
return $s_smtp_auth_options;
}
/**
* Select full folder action
*/
function full_folder_select($value, $key = '')
{
global $user;
@ -613,6 +621,9 @@ class acp_board
return '<option value="1"' . (($value == 1) ? ' selected="selected"' : '') . '>' . $user->lang['DELETE_OLDEST_MESSAGES'] . '</option><option value="2"' . (($value == 2) ? ' selected="selected"' : '') . '>' . $user->lang['HOLD_NEW_MESSAGES_SHORT'] . '</option>';
}
/**
* Select captcha pixel noise
*/
function captcha_pixel_noise_select($value, $key = '')
{
global $user;
@ -620,6 +631,9 @@ class acp_board
return '<option value="0"' . (($value == 0) ? ' selected="selected"' : '') . '>' . $user->lang['NONE'] . '</option><option value="1"' . (($value == 1) ? ' selected="selected"' : '') . '>' . $user->lang['LIGHT'] . '</option><option value="2"' . (($value == 2) ? ' selected="selected"' : '') . '>' . $user->lang['MEDIUM'] . '</option><option value="3"' . (($value == 3) ? ' selected="selected"' : '') . '>' . $user->lang['HEAVY'] . '</option>';
}
/**
* Select ip validation
*/
function select_ip_check($value, $key = '')
{
$radio_ary = array(4 => 'ALL', 3 => 'CLASS_C', 2 => 'CLASS_B', 0 => 'NONE');
@ -627,6 +641,9 @@ class acp_board
return h_radio('config[ip_check]', $radio_ary, $value, $key);
}
/**
* Select account activation method
*/
function select_acc_activation($value, $key = '')
{
global $user, $config;
@ -640,6 +657,9 @@ class acp_board
return h_radio('config[require_activation]', $radio_ary, $value, $key);
}
/**
* Maximum/Minimum username length
*/
function username_length($value, $key = '')
{
global $user;
@ -647,6 +667,9 @@ class acp_board
return '<input id="' . $key . '" type="text" size="3" maxlength="3" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="text" size="3" maxlength="3" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
}
/**
* Allowed chars in usernames
*/
function select_username_chars($selected_value, $key)
{
global $user;
@ -662,6 +685,9 @@ class acp_board
return $user_char_options;
}
/**
* Maximum/Minimum password length
*/
function password_length($value, $key)
{
global $user;
@ -669,6 +695,9 @@ class acp_board
return '<input id="' . $key . '" type="text" size="3" maxlength="3" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="text" size="3" maxlength="3" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
}
/**
* Required chars in passwords
*/
function select_password_chars($selected_value, $key)
{
global $user;
@ -684,6 +713,9 @@ class acp_board
return $pass_char_options;
}
/**
* Select bump interval
*/
function bump_interval($value, $key)
{
global $user;
@ -699,6 +731,9 @@ class acp_board
return '<input id="' . $key . '" type="text" size="3" maxlength="4" name="config[bump_interval]" value="' . $value . '" />&nbsp;<select name="config[bump_type]">' . $s_bump_type . '</select>';
}
/**
* Board disable option and message
*/
function board_disable($value, $key)
{
global $user;
@ -708,6 +743,9 @@ class acp_board
return h_radio('config[board_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $this->new_config['board_disable_msg'] . '" />';
}
/**
* Select default dateformat
*/
function dateformat_select($value, $key)
{
global $user;

View file

@ -111,6 +111,8 @@ class acp_bots
case 'edit':
case 'add':
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
$bot_row = array(
'bot_name' => request_var('bot_name', '', true),
'bot_agent' => request_var('bot_agent', ''),
@ -160,25 +162,18 @@ class acp_bots
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"));
}
$sql = 'INSERT INTO ' . USERS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
$user_id = user_add(array(
'user_type' => (int) USER_IGNORE,
'group_id' => (int) $group_row['group_id'],
'username' => (string) $bot_row['bot_name'],
'user_type' => (int) USER_IGNORE,
'user_regdate' => time(),
'user_password' => '',
'user_colour' => (string) $group_row['group_colour'],
'user_email' => '',
'user_lang' => (string) $bot_row['bot_lang'],
'user_style' => (int) $bot_row['bot_style'],
'user_options' => 0)
);
$db->sql_query($sql);
$user_id = $db->sql_nextid();
// Add to Bots usergroup
$sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'user_id' => $user_id,
'group_id' => $group_row['group_id'])
);
$db->sql_query($sql);
$sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'user_id' => (int) $user_id,

View file

@ -33,7 +33,7 @@ class acp_disallow
if ($disallow)
{
$disallowed_user = str_replace('*', '%', request_var('disallowed_user', ''));
$disallowed_user = str_replace('*', '%', request_var('disallowed_user', '', true));
if (!$disallowed_user)
{

View file

@ -84,14 +84,16 @@ class acp_email
}
}
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!($row = $db->sql_fetchrow($result)))
if (!$row)
{
trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action));
}
$db->sql_freeresult($result);
$i = $j = 0;
// Send with BCC, no more than 50 recipients for one mail (to not exceed the limit)
$max_chunk_size = 50;
$email_list = array();
@ -175,8 +177,7 @@ class acp_email
}
else
{
// Not great but the logging routine doesn't cope well with localising
// on the fly
// Not great but the logging routine doesn't cope well with localising on the fly
$group_name = $user->lang['ALL_USERS'];
}

View file

@ -253,7 +253,7 @@ class acp_forums
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
}
$sql = 'SELECT parent_id, left_id, right_id
$sql = 'SELECT *
FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$result = $db->sql_query($sql);
@ -265,90 +265,13 @@ class acp_forums
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
}
$forum_info = array($forum_id => $row);
$move_forum_name = $this->move_forum_by($row, $action, 1);
// Get the adjacent forum
$sql = 'SELECT forum_id, forum_name, left_id, right_id
FROM ' . FORUMS_TABLE . "
WHERE parent_id = $this->parent_id
AND " . (($action == 'move_up') ? "right_id < {$row['right_id']} ORDER BY right_id DESC" : "left_id > {$row['left_id']} ORDER BY left_id ASC");
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row)
if ($move_forum_name !== false)
{
// already on top or at bottom
break;
}
if ($action == 'move_up')
{
$log_action = 'LOG_FORUM_MOVE_UP';
$up_id = $forum_id;
$down_id = $row['forum_id'];
}
else
{
$log_action = 'LOG_FORUM_MOVE_DOWN';
$up_id = $row['forum_id'];
$down_id = $forum_id;
}
$move_forum_name = $row['forum_name'];
$forum_info[$row['forum_id']] = $row;
$diff_up = $forum_info[$up_id]['right_id'] - $forum_info[$up_id]['left_id'];
$diff_down = $forum_info[$down_id]['right_id'] - $forum_info[$down_id]['left_id'];
$forum_ids = array();
$sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE . '
WHERE left_id > ' . $forum_info[$up_id]['left_id'] . '
AND right_id < ' . $forum_info[$up_id]['right_id'];
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$forum_ids[] = $row['forum_id'];
}
$db->sql_freeresult($result);
// Start transaction
$db->sql_transaction('begin');
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET left_id = left_id + ' . ($diff_up + 1) . ', right_id = right_id + ' . ($diff_up + 1) . '
WHERE left_id > ' . $forum_info[$down_id]['left_id'] . '
AND right_id < ' . $forum_info[$down_id]['right_id'];
$db->sql_query($sql);
if (sizeof($forum_ids))
{
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET left_id = left_id - ' . ($diff_down + 1) . ', right_id = right_id - ' . ($diff_down + 1) . '
WHERE forum_id IN (' . implode(', ', $forum_ids) . ')';
$db->sql_query($sql);
}
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET left_id = ' . $forum_info[$down_id]['left_id'] . ', right_id = ' . ($forum_info[$down_id]['left_id'] + $diff_up) . '
WHERE forum_id = ' . $up_id;
$db->sql_query($sql);
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET left_id = ' . ($forum_info[$up_id]['right_id'] - $diff_down) . ', right_id = ' . $forum_info[$up_id]['right_id'] . '
WHERE forum_id = ' . $down_id;
$db->sql_query($sql);
$db->sql_transaction('commit');
$forum_data = $this->get_forum_info($forum_id);
add_log('admin', $log_action, $forum_data['forum_name'], $move_forum_name);
unset($forum_data);
add_log('admin', 'LOG_FORUM_' . strtoupper($action), $row['forum_name'], $move_forum_name);
$cache->destroy('sql', FORUMS_TABLE);
}
break;
@ -1439,15 +1362,91 @@ class acp_forums
$db->sql_query("UPDATE $table SET forum_id = 0 WHERE forum_id = $forum_id");
}
/**
* @todo run cron for optimize table or redirect to database management screen
*/
$db->sql_transaction('commit');
return array();
}
/**
* Move forum position by $steps up/down
*/
function move_forum_by($forum_row, $action = 'move_up', $steps = 1)
{
global $db;
/**
* Fetch all the siblings between the module's current spot
* and where we want to move it to. If there are less than $steps
* siblings between the current spot and the target then the
* module will move as far as possible
*/
$sql = 'SELECT forum_id, forum_name, left_id, right_id
FROM ' . FORUMS_TABLE . "
WHERE parent_id = {$forum_row['parent_id']}
AND " . (($action == 'move_up') ? "right_id < {$forum_row['right_id']} ORDER BY right_id DESC" : "left_id > {$forum_row['left_id']} ORDER BY left_id ASC");
$result = $db->sql_query_limit($sql, $steps);
$target = array();
while ($row = $db->sql_fetchrow($result))
{
$target = $row;
}
$db->sql_freeresult($result);
if (!sizeof($target))
{
// The forum is already on top or bottom
return false;
}
/**
* $left_id and $right_id define the scope of the nodes that are affected by the move.
* $diff_up and $diff_down are the values to substract or add to each node's left_id
* and right_id in order to move them up or down.
* $move_up_left and $move_up_right define the scope of the nodes that are moving
* up. Other nodes in the scope of ($left_id, $right_id) are considered to move down.
*/
if ($action == 'move_up')
{
$left_id = $target['left_id'];
$right_id = $forum_row['right_id'];
$diff_up = $forum_row['left_id'] - $target['left_id'];
$diff_down = $forum_row['right_id'] + 1 - $forum_row['left_id'];
$move_up_left = $forum_row['left_id'];
$move_up_right = $forum_row['right_id'];
}
else
{
$left_id = $forum_row['left_id'];
$right_id = $target['right_id'];
$diff_up = $forum_row['right_id'] + 1 - $forum_row['left_id'];
$diff_down = $target['right_id'] - $forum_row['right_id'];
$move_up_left = $forum_row['right_id'] + 1;
$move_up_right = $target['right_id'];
}
// Now do the dirty job
$sql = 'UPDATE ' . FORUMS_TABLE . "
SET left_id = left_id + CASE
WHEN left_id BETWEEN {$move_up_left} AND {$move_up_right} THEN -{$diff_up}
ELSE {$diff_down}
END,
right_id = right_id + CASE
WHEN right_id BETWEEN {$move_up_left} AND {$move_up_right} THEN -{$diff_up}
ELSE {$diff_down}
END,
forum_parents = ''
WHERE
left_id BETWEEN {$left_id} AND {$right_id}
AND right_id BETWEEN {$left_id} AND {$right_id}";
$db->sql_query($sql);
return $target['forum_name'];
}
}
?>

View file

@ -450,6 +450,7 @@ class acp_groups
case AVATAR_UPLOAD:
$avatar_img = $phpbb_root_path . $config['avatar_path'] . '/';
break;
case AVATAR_GALLERY:
$avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/';
break;

View file

@ -97,6 +97,8 @@ class acp_icons
unset($_images);
$_images = array();
// no break;
case 'add':
$order_list = '';
@ -269,9 +271,10 @@ class acp_icons
{
$update = true;
$result = $db->sql_query("SELECT {$fields}_order
$sql = "SELECT {$fields}_order
FROM $table
WHERE {$fields}_id = " . $image_id[$image]);
WHERE {$fields}_id = " . $image_id[$image];
$result = $db->sql_query($sql);
$order_old = (int) $db->sql_fetchfield($fields . '_order');
$db->sql_freeresult($result);
@ -403,8 +406,9 @@ class acp_icons
));
}
$db->sql_query("UPDATE $table SET " . $db->sql_build_array('UPDATE', $sql) . "
WHERE $field_sql = '" . $db->sql_escape($replace_sql) . "'");
$sql = "UPDATE $table SET " . $db->sql_build_array('UPDATE', $sql) . "
WHERE $field_sql = '" . $db->sql_escape($replace_sql) . "'";
$db->sql_query($sql);
}
else
{
@ -638,7 +642,6 @@ class acp_icons
}
}
$db->sql_freeresult($result);
}
}

View file

@ -65,11 +65,10 @@ class acp_jabber
{
if (!$jabber->connect())
{
trigger_error('Could not connect to Jabber server' . adm_back_link($this->u_action));
trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action));
}
// First we'll try to authorise using this account, if that fails we'll
// try to create it.
// First we'll try to authorise using this account, if that fails we'll try to create it.
if (!($result = $jabber->send_auth()))
{
if (($result = $jabber->account_registration($config['board_email'], $config['sitename'])) <> 2)
@ -95,12 +94,12 @@ class acp_jabber
{
if (!$jabber->connect())
{
trigger_error('Could not connect to Jabber server' . adm_back_link($this->u_action));
trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action));
}
if (!$jabber->send_auth())
{
trigger_error('Could not authorise on Jabber server' . adm_back_link($this->u_action));
trigger_error($user->lang['ERR_JAB_AUTH'] . adm_back_link($this->u_action));
}
$jabber->send_presence(NULL, NULL, 'online');

View file

@ -60,9 +60,7 @@ class acp_language
if ($action == 'upload_data' && request_var('test_connection', ''))
{
$test_connection = false;
$action = 'upload_file';
$method = request_var('method', '');
include_once($phpbb_root_path . 'includes/functions_transfer.' . $phpEx);
@ -72,6 +70,7 @@ class acp_language
case 'ftp':
$transfer = new ftp(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
break;
default:
trigger_error($user->lang['INVALID_UPLOAD_METHOD']);
}

View file

@ -109,7 +109,6 @@ class acp_logs
'S_SORT_KEY' => $s_sort_key,
'S_SORT_DIR' => $s_sort_dir,
'S_CLEARLOGS' => $auth->acl_get('a_clearlogs'),
)
);

View file

@ -31,11 +31,10 @@ class acp_modules
global $db, $user, $auth, $template;
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
// Set a global define for modules we might include (the author is able to prevent executing of code with this)
// Set a global define for modules we might include (the author is able to prevent execution of code by checking this constant)
define('MODULE_INCLUDE', true);
$user->add_lang('acp/modules');
$this->tpl_name = 'acp_modules';
// module class
@ -560,6 +559,7 @@ class acp_modules
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
ORDER BY left_id ASC";
break;
default:
$sql = 'SELECT module_id, module_enabled, module_name, parent_id, module_langname, left_id, right_id, module_auth
FROM ' . MODULES_TABLE . "
@ -649,6 +649,7 @@ class acp_modules
default:
$condition = 'm2.left_id BETWEEN m1.left_id AND m1.right_id OR m1.left_id BETWEEN m2.left_id AND m2.right_id';
break;
}
$rows = array();
@ -934,14 +935,11 @@ class acp_modules
/**
* Move module position by $steps up/down
* @todo support more than one step up/down (at the moment $steps needs to be 1)!
*/
function move_module_by($module_row, $action = 'move_up', $steps = 1)
{
global $db;
$module_id = $module_row['module_id'];
/**
* Fetch all the siblings between the module's current spot
* and where we want to move it to. If there are less than $steps
@ -955,14 +953,14 @@ class acp_modules
AND " . (($action == 'move_up') ? "right_id < {$module_row['right_id']} ORDER BY right_id DESC" : "left_id > {$module_row['left_id']} ORDER BY left_id ASC");
$result = $db->sql_query_limit($sql, $steps);
$target_module = array();
$target = array();
while ($row = $db->sql_fetchrow($result))
{
$target_module = $row;
$target = $row;
}
$db->sql_freeresult($result);
if (!sizeof($target_module))
if (!sizeof($target))
{
// The module is already on top or bottom
return false;
@ -977,10 +975,10 @@ class acp_modules
*/
if ($action == 'move_up')
{
$left_id = $target_module['left_id'];
$left_id = $target['left_id'];
$right_id = $module_row['right_id'];
$diff_up = $module_row['left_id'] - $target_module['left_id'];
$diff_up = $module_row['left_id'] - $target['left_id'];
$diff_down = $module_row['right_id'] + 1 - $module_row['left_id'];
$move_up_left = $module_row['left_id'];
@ -989,13 +987,13 @@ class acp_modules
else
{
$left_id = $module_row['left_id'];
$right_id = $target_module['right_id'];
$right_id = $target['right_id'];
$diff_up = $module_row['right_id'] + 1 - $module_row['left_id'];
$diff_down = $target_module['right_id'] - $module_row['right_id'];
$diff_down = $target['right_id'] - $module_row['right_id'];
$move_up_left = $module_row['right_id'] + 1;
$move_up_right = $target_module['right_id'];
$move_up_right = $target['right_id'];
}
// Now do the dirty job
@ -1015,7 +1013,7 @@ class acp_modules
$this->remove_cache_file();
return $this->lang_name($target_module['module_langname']);
return $this->lang_name($target['module_langname']);
}
}

View file

@ -128,6 +128,8 @@ class acp_permission_roles
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
}
// no break;
case 'add':
$role_name = request_var('role_name', '', true);
@ -193,7 +195,6 @@ class acp_permission_roles
trigger_error($user->lang['ROLE_' . strtoupper($action) . '_SUCCESS'] . adm_back_link($this->u_action));
break;
}
}
@ -243,6 +244,8 @@ class acp_permission_roles
$db->sql_freeresult($result);
}
// no break;
case 'edit':
if ($action == 'edit')
@ -348,7 +351,7 @@ class acp_permission_roles
break;
}
// By default, check that image_order is valid and fix it if necessary
// By default, check that role_order is valid and fix it if necessary
$sql = 'SELECT role_id, role_order
FROM ' . ACL_ROLES_TABLE . "
WHERE role_type = '" . $db->sql_escape($permission_type) . "'

View file

@ -136,6 +136,7 @@ class acp_permissions
if ($mode == 'intro')
{
$this->page_title = 'ACP_PERMISSIONS';
$template->assign_vars(array(
'S_INTRO' => true)
);
@ -942,7 +943,7 @@ class acp_permissions
FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$result = $db->sql_query($sql, 3600);
$forum_name = $db->sql_fetchfield('forum_name', false, $result);
$forum_name = $db->sql_fetchfield('forum_name');
$db->sql_freeresult($result);
}

View file

@ -150,9 +150,11 @@ class acp_prune
FROM ' . FORUMS_TABLE . '
WHERE forum_id IN (' . implode(', ', $forum_id) . ')';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
if (!($row = $db->sql_fetchrow($result)))
if (!$row)
{
$db->sql_freeresult($result);
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action));
}
@ -175,9 +177,7 @@ class acp_prune
'FORUM_LIST' => $forum_list,
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
}
}
/**
@ -361,7 +361,6 @@ class acp_prune
'S_COUNT_OPTIONS' => $s_find_count,
'U_FIND_USER' => append_sid($phpbb_root_path . "memberlist.$phpEx", 'mode=searchuser&amp;form=acp_prune&amp;field=users'))
);
}
}

View file

@ -30,7 +30,6 @@ class acp_reasons
$this->tpl_name = 'acp_reasons';
$this->page_title = 'ACP_REASONS';
// dumdidum... do i really need to do something mom?
$error = array();
switch ($action)

View file

@ -130,6 +130,12 @@ class acp_users
'S_FORM_OPTIONS' => $s_form_options)
);
// Prevent normal users/admins change/view founders if they are not a founder by themselves
if ($user->data['user_type'] != USER_FOUNDER && $user_row['user_type'] == USER_FOUNDER)
{
trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action));
}
switch ($mode)
{
case 'overview':

View file

@ -124,6 +124,7 @@ class auth_admin extends auth
FROM ' . USERS_TABLE . '
WHERE user_id IN (' . implode(',', $ug_id) . ')';
$result = $db->sql_query($sql);
while ($userdata = $db->sql_fetchrow($result))
{
if ($user->data['user_id'] != $user_id)
@ -148,6 +149,7 @@ class auth_admin extends auth
}
}
$db->sql_freeresult($result);
unset($userdata);
unset($auth2);
}
@ -546,6 +548,7 @@ class auth_admin extends auth
default:
$folder_image = ($forum_names_ary[$forum_id]['left_id'] + 1 != $forum_names_ary[$forum_id]['right_id']) ? '<img src="images/icon_folder_sub_small.gif" width="22" height="18" alt="' . $user->lang['SUBFORUM'] . '" />' : '<img src="images/icon_folder_small.gif" width="19" height="18" alt="' . $user->lang['FOLDER'] . '" />';
break;
}
}
}
@ -740,6 +743,7 @@ class auth_admin extends auth
}
$cache->destroy('acl_options');
$this->acl_clear_prefetch();
return true;
}
@ -1181,7 +1185,7 @@ class auth_admin extends auth
* The other user is always able to revert back to his permission set.
* This function does not check for lower/higher permissions, it is possible for the user to gain
* "more" permissions by this.
*
* Admin permissions will not be copied.
*/
function ghost_permissions($from_user_id, $to_user_id)
{

View file

@ -53,7 +53,6 @@ class auth
$db->sql_freeresult($result);
$cache->put('acl_options', $this->acl_options);
$this->acl_clear_prefetch();
$this->acl_cache($userdata);
}
else if (!trim($userdata['user_permissions']))

View file

@ -28,7 +28,7 @@ function login_apache(&$username, &$password)
$php_auth_user = $_SERVER['PHP_AUTH_USER'];
$php_auth_pw = $_SERVER['PHP_AUTH_PW'];
if ((!empty($php_auth_user)) && (!empty($php_auth_pw)))
if (!empty($php_auth_user) && !empty($php_auth_pw))
{
$sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type
FROM ' . USERS_TABLE . "
@ -85,16 +85,17 @@ function autologin_apache()
$php_auth_user = $_SERVER['PHP_AUTH_USER'];
$php_auth_pw = $_SERVER['PHP_AUTH_PW'];
if ((!empty($php_auth_user)) && (!empty($php_auth_pw)))
if (!empty($php_auth_user) && !empty($php_auth_pw))
{
$sql = 'SELECT *
FROM ' . USERS_TABLE . "
WHERE username = '" . $db->sql_escape($php_auth_user) . "'";
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row)
{
return ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE) ? array() : $row;
}
}
@ -109,7 +110,7 @@ function autologin_apache()
*/
function validate_session_apache(&$user)
{
return ($_SERVER['PHP_AUTH_USER'] == $user['username']) ? true : false;
return ($_SERVER['PHP_AUTH_USER'] === $user['username']) ? true : false;
}
?>

View file

@ -103,7 +103,10 @@ function login_db(&$username, &$password)
if (md5($password) == $row['user_password'])
{
// Successful, reset login attempts (the user passed all stages)
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_attempts = 0 WHERE user_id = ' . $row['user_id']);
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_login_attempts = 0
WHERE user_id = ' . $row['user_id'];
$db->sql_query($sql);
// User inactive...
if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
@ -124,7 +127,10 @@ function login_db(&$username, &$password)
}
// Password incorrect - increase login attempts
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_attempts = user_login_attempts + 1 WHERE user_id = ' . $row['user_id']);
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_login_attempts = user_login_attempts + 1
WHERE user_id = ' . $row['user_id'];
$db->sql_query($sql);
// Give status about wrong password...
return array(

View file

@ -20,13 +20,15 @@
*/
/**
* Connect to ldap server
* Only allow changing authentication to ldap if we can connect to the ldap server
* Called in acp_board while setting authentication plugins
*/
function init_ldap()
{
global $config, $user;
if (!extension_loaded('ldap'))
if (!@extension_loaded('ldap'))
{
return $user->lang['LDAP_NO_LDAP_EXTENSION'];
}
@ -38,13 +40,10 @@ function init_ldap()
@ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
// We'll get a notice here that we don't want, if we cannot connect to the server.
// ldap_connect only checks whether the specified server is valid, so the connection might still fail
ob_start();
$search = @ldap_search($ldap, $config['ldap_base_dn'], $config['ldap_uid'] . '=' . $user->data['username'], array($config['ldap_uid']));
if (ob_get_clean())
if ($search === false)
{
return $user->lang['LDAP_NO_SERVER_CONNECTION'];
}
@ -68,7 +67,7 @@ function login_ldap(&$username, &$password)
{
global $db, $config;
if (!extension_loaded('ldap'))
if (!@extension_loaded('ldap'))
{
return array(
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
@ -155,7 +154,7 @@ function admin_ldap(&$new)
global $user;
/**
* @todo Using same approach with cfg_build_template?
* @todo Using same approach as with cfg_build_template?
*/
$tpl = '

View file

@ -375,14 +375,17 @@ class bbcode
{
if (empty($bbcode_hardtpl))
{
static $bbcode_hardtpl = array(
global $user;
static $bbcode_hardtpl = array();
$bbcode_hardtpl = array(
'b_open' => '<span style="font-weight: bold">',
'b_close' => '</span>',
'i_open' => '<span style="font-style: italic">',
'i_close' => '</span>',
'u_open' => '<span style="text-decoration: underline">',
'u_close' => '</span>',
'img' => '<img src="$1" border="0" />',
'img' => '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',
'size' => '<span style="font-size: $1px; line-height: normal">$2</span>',
'color' => '<span style="color: $1">$2</span>',
'email' => '<a href="mailto:$1">$2</a>'

View file

@ -143,7 +143,6 @@ define('BANLIST_TABLE', $table_prefix . 'banlist');
define('BBCODES_TABLE', $table_prefix . 'bbcodes');
define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks');
define('BOTS_TABLE', $table_prefix . 'bots');
define('CACHE_TABLE', $table_prefix . 'cache');
define('CONFIG_TABLE', $table_prefix . 'config');
define('CONFIRM_TABLE', $table_prefix . 'confirm');
define('PROFILE_FIELDS_TABLE', $table_prefix . 'profile_fields');

View file

@ -2357,7 +2357,7 @@ function page_header($page_title = '', $display_online_list = true)
// gzip_compression
if ($config['gzip_compress'])
{
if (extension_loaded('zlib') && !headers_sent())
if (@extension_loaded('zlib') && !headers_sent())
{
ob_start('ob_gzhandler');
}

View file

@ -474,7 +474,7 @@ class compress_tar extends compress
*/
function extract($dst)
{
$fzread = ($this->isbz && function_exists('bzread')) ? 'bzread' : (($this->isgz && extension_loaded('zlib')) ? 'gzread' : 'fread');
$fzread = ($this->isbz && function_exists('bzread')) ? 'bzread' : (($this->isgz && @extension_loaded('zlib')) ? 'gzread' : 'fread');
// Run through the file and grab directory entries
while ($buffer = $fzread($this->fp, 512))
@ -536,11 +536,11 @@ class compress_tar extends compress
*/
function close()
{
$fzclose = ($this->isbz && function_exists('bzclose')) ? 'bzclose' : (($this->isgz && extension_loaded('zlib')) ? 'gzclose' : 'fclose');
$fzclose = ($this->isbz && function_exists('bzclose')) ? 'bzclose' : (($this->isgz && @extension_loaded('zlib')) ? 'gzclose' : 'fclose');
if ($this->wrote)
{
$fzwrite = ($this->isbz && function_exists('bzwrite')) ? 'bzwrite' : (($this->isgz && extension_loaded('zlib')) ? 'gzwrite' : 'fwrite');
$fzwrite = ($this->isbz && function_exists('bzwrite')) ? 'bzwrite' : (($this->isgz && @extension_loaded('zlib')) ? 'gzwrite' : 'fwrite');
// Symbolizes that there are no more files
$fzwrite($this->fp, pack("a512", ""));
@ -555,7 +555,7 @@ class compress_tar extends compress
function data($name, $data, $is_dir = false, $stat)
{
$this->wrote = true;
$fzwrite = ($this->isbz && function_exists('bzwrite')) ? 'bzwrite' : (($this->isgz && extension_loaded('zlib')) ? 'gzwrite' : 'fwrite');
$fzwrite = ($this->isbz && function_exists('bzwrite')) ? 'bzwrite' : (($this->isgz && @extension_loaded('zlib')) ? 'gzwrite' : 'fwrite');
$typeflag = ($is_dir) ? '5' : '';
@ -600,7 +600,7 @@ class compress_tar extends compress
*/
function open()
{
$fzopen = ($this->isbz && function_exists('bzopen')) ? 'bzopen' : (($this->isgz && extension_loaded('zlib')) ? 'gzopen' : 'fopen');
$fzopen = ($this->isbz && function_exists('bzopen')) ? 'bzopen' : (($this->isgz && @extension_loaded('zlib')) ? 'gzopen' : 'fopen');
$this->fp = @$fzopen($this->file, $this->mode . 'b' . (($fzopen == 'gzopen') ? '9' : ''));
if (!$this->fp)

View file

@ -114,7 +114,7 @@ class custom_profile
return 'FIELD_INVALID_DATE';
}
if (!checkdate($month, $day, $year) === false)
if (checkdate($month, $day, $year) === false)
{
return 'FIELD_INVALID_DATE';
}

View file

@ -228,6 +228,7 @@ function mcp_resync_topics($topic_ids)
{
add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_TOPIC_RESYNC', $row['topic_title']);
}
$db->sql_freeresult($result);
$msg = (sizeof($topic_ids) == 1) ? $user->lang['TOPIC_RESYNC_SUCCESS'] : $user->lang['TOPICS_RESYNC_SUCCESS'];

View file

@ -56,6 +56,7 @@ function mcp_front_view($id, $mode, $action)
AND post_approved = 0
ORDER BY post_id DESC';
$result = $db->sql_query_limit($sql, 5);
while ($row = $db->sql_fetchrow($result))
{
$post_list[] = $row['post_id'];
@ -116,6 +117,7 @@ function mcp_front_view($id, $mode, $action)
$forum_list = get_forum_list('m_');
$template->assign_var('S_SHOW_REPORTS', (!empty($forum_list)) ? true : false);
if (!empty($forum_list))
{
$sql = 'SELECT COUNT(r.report_id) AS total
@ -124,8 +126,8 @@ function mcp_front_view($id, $mode, $action)
AND r.report_closed = 0
AND p.forum_id IN (0, ' . implode(', ', $forum_list) . ')';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$total = $row['total'];
$total = (int) $db->sql_fetchfield('total');
$db->sql_freeresult($result);
if ($total)
{
@ -140,7 +142,6 @@ function mcp_front_view($id, $mode, $action)
TOPICS_TABLE => 't',
USERS_TABLE => 'u',
POSTS_TABLE => 'p'
),
'LEFT_JOIN' => array(
@ -221,8 +222,8 @@ function mcp_front_view($id, $mode, $action)
'IP' => $row['ip'],
'TIME' => $user->format_date($row['time']),
'ACTION' => $row['action'],
'U_VIEWTOPIC' => isset($row['viewtopic']) ? $row['viewtopic'] : '',
'U_VIEWLOGS' => isset($row['viewlogs']) ? $row['viewlogs'] : '')
'U_VIEWTOPIC' => (!empty($row['viewtopic'])) ? $row['viewtopic'] : '',
'U_VIEWLOGS' => (!empty($row['viewlogs'])) ? $row['viewlogs'] : '')
);
}
}

View file

@ -180,7 +180,7 @@ class mcp_main
break;
default:
trigger_error("Unknown mode: $mode");
trigger_error("Unknown mode: $mode", E_USER_ERROR);
}
}
}
@ -543,7 +543,9 @@ function mcp_delete_topic($topic_ids)
$return = delete_topics('topic_id', $topic_ids, true);
// TODO: Adjust total post count...
/**
* @todo Adjust total post count (mcp_delete_topic)
*/
}
else
{
@ -778,7 +780,7 @@ function mcp_fork_topic($topic_ids)
$new_topic_id_list[$topic_id] = $new_topic_id;
/**
* @todo enable
* @todo enable? (is this still needed?)
* markread('topic', $to_forum_id, $new_topic_id);
*/
@ -793,9 +795,14 @@ function mcp_fork_topic($topic_ids)
while ($row = $db->sql_fetchrow($result))
{
$sql = 'INSERT INTO ' . POLL_OPTIONS_TABLE . ' (poll_option_id, topic_id, poll_option_text, poll_option_total)
VALUES (' . $row['poll_option_id'] . ', ' . $new_topic_id . ", '" . $db->sql_escape($row['poll_option_text']) . "', 0)";
$db->sql_query($sql);
$sql_ary = array(
'poll_option_id' => (int) $row['poll_option_id'],
'topic_id' => (int) $new_topic_id,
'poll_option_text' => (string) $row['poll_option_text'],
'poll_option_total' => 0
);
$db->sql_query('INSERT INTO ' . POLL_OPTIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
}
}
@ -810,7 +817,7 @@ function mcp_fork_topic($topic_ids)
{
$post_rows[] = $row;
}
$db->sql_freeresult();
$db->sql_freeresult($result);
if (!sizeof($post_rows))
{

View file

@ -179,7 +179,7 @@ class mcp_queue
$forum_list[] = $row['forum_id'];
}
if (!$forum_list = implode(', ', $forum_list))
if (!($forum_list = implode(', ', $forum_list)))
{
trigger_error('NOT_MODERATOR');
}
@ -244,6 +244,7 @@ class mcp_queue
$post_ids[] = $row['post_id'];
$row_num[$row['post_id']] = $i++;
}
$db->sql_freeresult($result);
if (sizeof($post_ids))
{
@ -252,8 +253,8 @@ class mcp_queue
WHERE p.post_id IN (" . implode(', ', $post_ids) . ")
AND t.topic_id = p.topic_id
AND u.user_id = p.poster_id";
$result = $db->sql_query($sql);
$post_data = $rowset = array();
while ($row = $db->sql_fetchrow($result))
{
@ -311,6 +312,7 @@ class mcp_queue
{
$forum_names[$row['forum_id']] = $row['forum_name'];
}
$db->sql_freeresult($result);
}
foreach ($rowset as $row)
@ -324,8 +326,6 @@ class mcp_queue
$poster = $row['username'];
}
$s_checkbox = '<input type="checkbox" class="radio" name="post_id_list[]" value="' . $row['post_id'] . '" />';
$global_topic = ($row['forum_id']) ? false : true;
if ($global_topic)
{
@ -340,15 +340,14 @@ class mcp_queue
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;start=$start&amp;mode=approve_details&amp;f={$row['forum_id']}&amp;p={$row['post_id']}" . (($mode == 'unapproved_topics') ? "&amp;t={$row['topic_id']}" : '')),
'U_VIEWPROFILE' => ($row['poster_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['poster_id']) : '',
'POST_ID' => $row['post_id'],
'FORUM_NAME' => (!$global_topic) ? $forum_names[$row['forum_id']] : $user->lang['GLOBAL_ANNOUNCEMENT'],
'TOPIC_TITLE' => $row['topic_title'],
'POSTER' => $poster,
'POST_TIME' => $user->format_date($row['post_time']),
'S_CHECKBOX' => $s_checkbox)
'POST_TIME' => $user->format_date($row['post_time']))
);
}
unset($rowset);
unset($forum_names);
unset($rowset, $forum_names);
// Now display the page
$template->assign_vars(array(
@ -372,7 +371,9 @@ class mcp_queue
}
}
// Approve Post/Topic
/**
* Approve Post/Topic
*/
function approve_post($post_id_list, $mode)
{
global $db, $template, $user, $config;
@ -588,7 +589,9 @@ function approve_post($post_id_list, $mode)
}
}
// Disapprove Post/Topic
/**
* Disapprove Post/Topic
*/
function disapprove_post($post_id_list, $mode)
{
global $db, $template, $user, $config;
@ -627,7 +630,7 @@ function disapprove_post($post_id_list, $mode)
if (!$row || (!$reason && $row['reason_title'] == 'other'))
{
$additional_msg = 'Please give an appropiate reason for disapproval';
$additional_msg = $user->lang['NO_REASON_DISAPPROVAL'];
unset($_POST['confirm']);
}
else

View file

@ -76,14 +76,14 @@ class mcp_reports
AND rr.reason_id = r.reason_id
AND r.user_id = u.user_id";
$result = $db->sql_query($sql);
$report = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!($report = $db->sql_fetchrow($result)))
if (!$report)
{
trigger_error('NO_POST_REPORT');
}
$db->sql_freeresult($result);
$reason = array('title' => $report['reason_title'], 'description' => $report['reason_description']);
if (isset($user->lang['report_reasons']['TITLE'][strtoupper($reason['title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($reason['title'])]))
{
@ -112,6 +112,7 @@ class mcp_reports
if ($post_info['bbcode_bitfield'])
{
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
$bbcode = new bbcode($post_info['bbcode_bitfield']);
$bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
}
@ -137,6 +138,7 @@ class mcp_reports
'U_VIEW_REPORTER_PROFILE' => ($report['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $report['user_id']) : '',
'EDIT_IMG' => $user->img('btn_edit', $user->lang['EDIT_POST']),
'UNAPPROVED_IMG' => $user->img('icon_unapproved', $user->lang['POST_UNAPPROVED']),
'RETURN_REPORTS' => sprintf($user->lang['RETURN_REPORTS'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports' . (($post_info['post_reported']) ? '&amp;mode=reports' : '&amp;mode=reports_closed') . '&amp;start=' . $start) . '">', '</a>'),
'REPORTED_IMG' => $user->img('icon_reported', $user->lang['POST_REPORTED']),
@ -146,8 +148,6 @@ class mcp_reports
'REPORT_DATE' => $user->format_date($report['report_time']),
'REPORT_TEXT' => $report['report_text'],
'UNAPPROVED_IMG' => $user->img('icon_unapproved', $user->lang['POST_UNAPPROVED']),
'POSTER_NAME' => $poster,
'POST_PREVIEW' => $message,
'POST_SUBJECT' => $post_info['post_subject'],
@ -189,7 +189,7 @@ class mcp_reports
$forum_list[] = $row['forum_id'];
}
if (!$forum_list = implode(', ', $forum_list))
if (!($forum_list = implode(', ', $forum_list)))
{
trigger_error('NOT_MODERATOR');
}
@ -200,7 +200,6 @@ class mcp_reports
$result = $db->sql_query($sql);
$forum_info['forum_topics'] = (int) $db->sql_fetchfield('sum_forum_topics');
$db->sql_freeresult($result);
}
else
{
@ -263,6 +262,7 @@ class mcp_reports
$post_ids[] = $row['post_id'];
$row_num[$row['post_id']] = $i++;
}
$db->sql_freeresult($result);
if (sizeof($post_ids))
{
@ -273,8 +273,8 @@ class mcp_reports
AND r.post_id = p.post_id
AND u.user_id = p.poster_id
AND ru.user_id = r.user_id";
$result = $db->sql_query($sql);
$post_data = $rowset = array();
while ($row = $db->sql_fetchrow($result))
{
@ -295,8 +295,6 @@ class mcp_reports
$poster = $row['username'];
}
$s_checkbox = '<input type="checkbox" class="radio" name="post_id_list[]" value="' . $row['post_id'] . '" />';
$template->assign_block_vars('postrow', array(
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
// Q: Why accessing the topic by a post_id instead of its topic_id?
@ -306,10 +304,9 @@ class mcp_reports
'U_VIEW_POSTER_PROFILE' => ($row['poster_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['poster_id']) : '',
'U_VIEW_REPORTER_PROFILE' => ($row['reporter_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['reporter_id']) : '',
'S_CHECKBOX' => $s_checkbox,
'FORUM_NAME' => ($row['forum_id']) ? $forum_data[$row['forum_id']]['forum_name'] : $user->lang['ALL_FORUMS'],
'POSTER' => $poster,
'POST_ID' => $row['post_id'],
'POST_SUBJECT' => $row['post_subject'],
'POST_TIME' => $user->format_date($row['post_time']),
'REPORTER' => ($row['reporter_id'] == ANONYMOUS) ? $user->lang['GUEST'] : $row['reporter_name'],
@ -383,12 +380,9 @@ function close_report($post_id_list, $mode, $action)
{
$reports[$report['post_id']] = $report;
}
$db->sql_freeresult($result);
$close_report_posts = array();
$close_report_topics = array();
$notify_reporters = array();
$close_report_posts = $close_report_topics = $notify_reporters = array();
foreach ($post_info as $post_id => $post_data)
{
if (isset($reports[$post_id]))
@ -420,6 +414,7 @@ function close_report($post_id_list, $mode, $action)
{
$keep_report_topics[] = $row['topic_id'];
}
$db->sql_freeresult($result);
$close_report_topics = array_diff($close_report_topics, $keep_report_topics);
unset($keep_report_topics);

View file

@ -61,7 +61,6 @@ function mcp_topic_view($id, $mode, $action)
make_jumpbox($url . "&amp;i=$id&amp;mode=forum_view", $topic_info['forum_id'], false, 'm_');
$where_sql = ($action == 'reports') ? 'WHERE post_reported = 1 AND ' : 'WHERE';
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
@ -73,6 +72,7 @@ function mcp_topic_view($id, $mode, $action)
{
$total = $topic_info['topic_replies'] + 1;
}
$posts_per_page = max(0, request_var('posts_per_page', intval($config['posts_per_page'])));
if ($posts_per_page == 0)
{
@ -94,6 +94,7 @@ function mcp_topic_view($id, $mode, $action)
$rowset[] = $row;
$bbcode_bitfield |= $row['bbcode_bitfield'];
}
$db->sql_freeresult($result);
if ($bbcode_bitfield)
{
@ -118,9 +119,6 @@ function mcp_topic_view($id, $mode, $action)
$message = smiley_text($message);
$message = str_replace("\n", '<br />', $message);
$checked = ($post_id_list && in_array(intval($row['post_id']), $post_id_list)) ? 'checked="checked" ' : '';
$s_checkbox = '<input type="checkbox" class="radio" name="post_id_list[]" value="' . $row['post_id'] . '" ' . $checked . '/>';
if (!$row['post_approved'])
{
$has_unapproved_posts = true;
@ -136,9 +134,9 @@ function mcp_topic_view($id, $mode, $action)
'MINI_POST_IMG' => ($row['post_time'] > $user->data['user_lastvisit'] && $user->data['is_registered']) ? $user->img('icon_post_new', $user->lang['NEW_POST']) : $user->img('icon_post', $user->lang['POST']),
'S_CHECKBOX' => $s_checkbox,
'S_POST_REPORTED' => ($row['post_reported']) ? true : false,
'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true,
'S_CHECKED' => ($post_id_list && in_array(intval($row['post_id']), $post_id_list)) ? true : false,
'U_POST_DETAILS' => "$url&amp;i=$id&amp;p={$row['post_id']}&amp;mode=post_details",
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $topic_info['forum_id'] . '&amp;p=' . $row['post_id']),
@ -344,6 +342,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$post_id_list[] = $row['post_id'];
}
}
$db->sql_freeresult($result);
}
if (!sizeof($post_id_list))

View file

@ -43,14 +43,17 @@ class mcp_warn
mcp_warn_front_view($id, $mode);
$this->tpl_name = 'mcp_warn_front';
break;
case 'list':
mcp_warn_list_view($id, $mode, $action);
$this->tpl_name = 'mcp_warn_list';
break;
case 'warn_post':
mcp_warn_post_view($id, $mode, $action);
$this->tpl_name = 'mcp_warn_post';
break;
case 'warn_user':
mcp_warn_user_view($id, $mode, $action);
$this->tpl_name = 'mcp_warn_user';
@ -188,16 +191,18 @@ function mcp_warn_post_view($id, $mode, $action)
$notify = (isset($_REQUEST['notify_user'])) ? true : false;
$warning = request_var('warning', '', true);
$sql = 'SELECT u.*, p.* FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
$sql = 'SELECT u.*, p.*
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
WHERE post_id = $post_id
AND u.user_id = p.poster_id";
$result = $db->sql_query($sql);
$userrow = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$userrow = $db->sql_fetchrow($result))
if (!$userrow)
{
trigger_error($user->lang['NO_POST']);
}
$db->sql_freeresult($result);
// There is no point issuing a warning to ignored users (ie anonymous and bots)
if ($userrow['user_type'] == USER_IGNORE)
@ -207,15 +212,17 @@ function mcp_warn_post_view($id, $mode, $action)
// Check if there is already a warning for this post to prevent multiple
// warnings for the same offence
$sql = 'SELECT * FROM ' . WARNINGS_TABLE . "
$sql = 'SELECT post_id
FROM ' . WARNINGS_TABLE . "
WHERE post_id = $post_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row = $db->sql_fetchrow($result))
if ($row)
{
trigger_error($user->lang['ALREADY_WARNED']);
}
$db->sql_freeresult($result);
$user_id = $userrow['user_id'];
@ -238,6 +245,7 @@ function mcp_warn_post_view($id, $mode, $action)
if ($userrow['bbcode_bitfield'])
{
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
$bbcode = new bbcode($userrow['bbcode_bitfield']);
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
}
@ -260,13 +268,14 @@ function mcp_warn_post_view($id, $mode, $action)
case AVATAR_UPLOAD:
$avatar_img = $config['avatar_path'] . '/';
break;
case AVATAR_GALLERY:
$avatar_img = $config['avatar_gallery_path'] . '/';
break;
}
$avatar_img .= $userrow['user_avatar'];
$avatar_img = '<img src="' . $avatar_img . '" width="' . $userrow['user_avatar_width'] . '" height="' . $userrow['user_avatar_height'] . '" border="0" alt="" />';
$avatar_img = '<img src="' . $avatar_img . '" width="' . $userrow['user_avatar_width'] . '" height="' . $userrow['user_avatar_height'] . '" alt="" />';
}
$template->assign_vars(array(
@ -307,6 +316,11 @@ function mcp_warn_user_view($id, $mode, $action)
$userrow = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$userrow)
{
trigger_error('NO_USER');
}
$user_id = $userrow['user_id'];
if ($warning && $action == 'add_warning')
@ -330,13 +344,14 @@ function mcp_warn_user_view($id, $mode, $action)
case AVATAR_UPLOAD:
$avatar_img = $config['avatar_path'] . '/';
break;
case AVATAR_GALLERY:
$avatar_img = $config['avatar_gallery_path'] . '/';
break;
}
$avatar_img .= $userrow['user_avatar'];
$avatar_img = '<img src="' . $avatar_img . '" width="' . $userrow['user_avatar_width'] . '" height="' . $userrow['user_avatar_height'] . '" border="0" alt="" />';
$avatar_img = '<img src="' . $avatar_img . '" width="' . $userrow['user_avatar_width'] . '" height="' . $userrow['user_avatar_height'] . '" alt="" />';
}
// OK, they didn't submit a warning so lets build the page for them to do so
@ -366,13 +381,14 @@ function add_warning($userrow, $warning, $send_pm = true, $post_id = 0)
if ($send_pm)
{
include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
include($phpbb_root_path . 'includes/message_parser.'.$phpEx);
include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
$userrow['user_lang'] = (file_exists($phpbb_root_path . 'language/' . $userrow['user_lang'] . "/mcp.$phpEx")) ? $userrow['user_lang'] : $config['default_lang'];
include($phpbb_root_path . 'language/' . $userrow['user_lang'] . "/mcp.$phpEx");
include($phpbb_root_path . 'language/' . basename($userrow['user_lang']) . "/mcp.$phpEx");
$message_parser = new parse_message();
$message_parser->message = sprintf($lang['WARNING_PM_BODY'], $warning);
$message_parser->parse(true, true, true, false, false, true);
@ -412,4 +428,5 @@ function add_warning($userrow, $warning, $send_pm = true, $post_id = 0)
WHERE user_id = ' . $userrow['user_id'];
$db->sql_query($sql);
}
?>

View file

@ -258,6 +258,12 @@ class bbcode_firstpass extends bbcode
{
$stats = @getimagesize($in);
if ($stats === false)
{
$this->warn_msg[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
}
else
{
if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $stats[1])
{
$this->warn_msg[] = sprintf($user->lang['MAX_IMG_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']);
@ -268,6 +274,7 @@ class bbcode_firstpass extends bbcode
$this->warn_msg[] = sprintf($user->lang['MAX_IMG_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']);
}
}
}
if ($this->path_in_domain($in))
{
@ -282,7 +289,7 @@ class bbcode_firstpass extends bbcode
*/
function bbcode_flash($width, $height, $in)
{
global $config;
global $user, $config, $phpEx;
if (!$this->check_bbcode('flash', $in))
{

View file

@ -52,7 +52,7 @@ class fulltext_mysql extends search_backend
}
$result = $db->sql_query('SELECT VERSION() AS mysql_version');
$version = $db->sql_fetchfield('mysql_version', 0, $result);
$version = $db->sql_fetchfield('mysql_version');
$db->sql_freeresult($result);
if (!preg_match('#^4|5|6#s', $version))
@ -248,9 +248,11 @@ class fulltext_mysql extends search_backend
$id_ary = array();
$join_topic = ($type == 'posts') ? false : true;
// Build sql strings for sorting
$sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
$sql_sort_table = $sql_sort_join = '';
switch ($sql_sort[0])
{
case 'u':
@ -291,6 +293,7 @@ class fulltext_mysql extends search_backend
default:
$sql_match = 'p.post_subject, p.post_text';
$sql_match_where = '';
break;
}
if (!sizeof($m_approve_fid_ary))
@ -358,6 +361,7 @@ class fulltext_mysql extends search_backend
// Get the ids for the current result block
$any_words = (sizeof($any_words)) ? ' +(' . implode(' ', $any_words) . ')' : '';
$sql = "SELECT $sql_select
FROM $sql_from$sql_sort_table" . POSTS_TABLE . " p
WHERE MATCH ($sql_match) AGAINST ('" . $db->sql_escape(implode(' ', $words)) . $any_words . "' IN BOOLEAN MODE)
@ -714,7 +718,8 @@ class fulltext_mysql extends search_backend
return array(
$user->lang['FULLTEXT_MYSQL_TOTAL_POSTS'] => ($this->index_created()) ? $this->stats['total_posts'] : 0,
$user->lang['FULLTEXT_MYSQL_TEXT_CARDINALITY'] => isset($this->stats['post_text']['Cardinality']) ? $this->stats['post_text']['Cardinality'] : 0,
$user->lang['FULLTEXT_MYSQL_SUBJECT_CARDINALITY'] => isset($this->stats['post_subject']['Cardinality']) ? $this->stats['post_subject']['Cardinality'] : 0);
$user->lang['FULLTEXT_MYSQL_SUBJECT_CARDINALITY'] => isset($this->stats['post_subject']['Cardinality']) ? $this->stats['post_subject']['Cardinality'] : 0,
);
}
function get_stats()

View file

@ -284,9 +284,11 @@ class fulltext_native extends search_backend
$id_ary = array();
$join_topic = ($type == 'posts') ? false : true;
// Build sql strings for sorting
$sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
$sql_sort_table = $sql_sort_join = '';
switch ($sql_sort[0])
{
case 'u':
@ -364,16 +366,20 @@ class fulltext_native extends search_backend
case '-':
$bool = 'NOT';
continue;
case '+':
$bool = 'AND';
continue;
case '|':
$bool = 'OR';
continue;
default:
$bool = ($terms != 'all') ? 'OR' : $bool;
$sql_words[$bool][] = "'" . $db->sql_escape(preg_replace('#\*+#', '%', trim($word))) . "'";
$bool = ($terms == 'all') ? 'AND' : 'OR';
break;
}
}
@ -400,6 +406,7 @@ class fulltext_native extends search_backend
if (!($row = $db->sql_fetchrow($result)))
{
$db->sql_freeresult($result);
$id_ary = array();
return false;
}
@ -444,6 +451,7 @@ class fulltext_native extends search_backend
if (!($row = $db->sql_fetchrow($result)))
{
$db->sql_freeresult($result);
$id_ary = array();
return false;
}

View file

@ -71,7 +71,7 @@ class ucp_confirm
}
$policy = '';
if (extension_loaded('gd') && sizeof($policy_modules))
if (@extension_loaded('gd') && sizeof($policy_modules))
{
include($phpbb_root_path . 'includes/captcha/captcha_gd.' . $phpEx);
$policy = $policy_modules[array_rand($policy_modules)];

View file

@ -35,17 +35,17 @@ function compose_pm($id, $mode, $action)
// Do NOT use request_var or specialchars here
$address_list = isset($_REQUEST['address_list']) ? $_REQUEST['address_list'] : array();
$submit = (isset($_POST['post']));
$preview = (isset($_POST['preview']));
$save = (isset($_POST['save']));
$load = (isset($_POST['load']));
$cancel = (isset($_POST['cancel']) && !isset($_POST['save']));
$delete = (isset($_POST['delete']));
$submit = (isset($_POST['post'])) ? true : false;
$preview = (isset($_POST['preview'])) ? true : false;
$save = (isset($_POST['save'])) ? true : false;
$load = (isset($_POST['load'])) ? true : false;
$cancel = (isset($_POST['cancel']) && !isset($_POST['save'])) ? true : false;
$delete = (isset($_POST['delete'])) ? true : false;
$remove_u = (isset($_REQUEST['remove_u']));
$remove_g = (isset($_REQUEST['remove_g']));
$add_to = (isset($_REQUEST['add_to']));
$add_bcc = (isset($_REQUEST['add_bcc']));
$remove_u = (isset($_REQUEST['remove_u'])) ? true : false;
$remove_g = (isset($_REQUEST['remove_g'])) ? true : false;
$add_to = (isset($_REQUEST['add_to'])) ? true : false;
$add_bcc = (isset($_REQUEST['add_bcc'])) ? true : false;
$refresh = isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['edit_comment']) || $save || $load
|| $remove_u || $remove_g || $add_to || $add_bcc;
@ -273,7 +273,9 @@ function compose_pm($id, $mode, $action)
{
delete_pm($user->data['user_id'], $msg_id, $folder_id);
// TODO - jump to next message in "history"?
/**
* @todo jump to next message in "history"?
*/
$meta_info = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;folder=$folder_id");
$message = $user->lang['MESSAGE_DELETED'];
@ -340,12 +342,13 @@ function compose_pm($id, $mode, $action)
AND user_id = ' . $user->data['user_id'] .
(($draft_id) ? " AND draft_id <> $draft_id" : '');
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($db->sql_fetchrow($result))
if ($row)
{
$drafts = true;
}
$db->sql_freeresult($result);
}
if ($action == 'edit')
@ -353,10 +356,10 @@ function compose_pm($id, $mode, $action)
$message_parser->bbcode_uid = $bbcode_uid;
}
$bbcode_status = ($config['allow_bbcode'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode'));
$smilies_status = ($config['allow_smilies'] && $config['auth_smilies_pm'] && $auth->acl_get('u_pm_smilies'));
$img_status = ($config['auth_img_pm'] && $auth->acl_get('u_pm_img'));
$flash_status = ($config['auth_flash_pm'] && $auth->acl_get('u_pm_flash'));
$bbcode_status = ($config['allow_bbcode'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode')) ? true : false;
$smilies_status = ($config['allow_smilies'] && $config['auth_smilies_pm'] && $auth->acl_get('u_pm_smilies')) ? true : false;
$img_status = ($config['auth_img_pm'] && $auth->acl_get('u_pm_img')) ? true : false;
$flash_status = ($config['auth_flash_pm'] && $auth->acl_get('u_pm_flash')) ? true : false;
// Save Draft
if ($save && $auth->acl_get('u_savedrafts'))
@ -375,7 +378,8 @@ function compose_pm($id, $mode, $action)
'forum_id' => 0,
'save_time' => $current_time,
'draft_subject' => $subject,
'draft_message' => $message));
'draft_message' => $message)
);
$db->sql_query($sql);
$redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;mode=$mode");
@ -427,6 +431,7 @@ function compose_pm($id, $mode, $action)
{
$draft_id = 0;
}
$db->sql_freeresult($result);
}
// Load Drafts
@ -761,7 +766,7 @@ function compose_pm($id, $mode, $action)
break;
default:
trigger_error('NO_ACTION_MODE');
trigger_error('NO_ACTION_MODE', E_USER_ERROR);
}
$s_hidden_fields = '<input type="hidden" name="lastclick" value="' . $current_time . '" />';
@ -901,7 +906,7 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_
{
// We need to check their PM status (do they want to receive PM's?)
// Only check if not a moderator or admin, since they are allowed to override this user setting
if (!$auth->acl_gets('a_', 'm_'))
if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
{
$sql = 'SELECT user_id
FROM ' . USERS_TABLE . '

View file

@ -340,12 +340,17 @@ class ucp_profile
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
}
$bday_day = $bday_month = $bday_year = 0;
if (!isset($bday_day))
{
if ($user->data['user_birthday'])
{
list($bday_day, $bday_month, $bday_year) = explode('-', $user->data['user_birthday']);
}
else
{
$bday_day = $bday_month = $bday_year = 0;
}
}
$s_birthday_day_options = '<option value="0"' . ((!$bday_day) ? ' selected="selected"' : '') . '>--</option>';
for ($i = 1; $i < 32; $i++)

View file

@ -201,7 +201,9 @@ class module
var $mode;
var $sub;
// Private methods, should not be overwritten
/**
* Private methods, should not be overwritten
*/
function create($module_type, $module_url, $selected_mod = false, $selected_submod = false)
{
global $db, $config, $phpEx;
@ -263,7 +265,9 @@ class module
} // END foreach
} // END create
// Load and run the relevant module if applicable
/**
* Load and run the relevant module if applicable
*/
function load($mode = false, $run = true)
{
global $phpbb_root_path, $phpEx;
@ -275,13 +279,16 @@ class module
$this->mode = $mode;
}
/**
* @todo this could be written as $this->module = new $this->filename($this); ... no? (eval statement in install/index.php)
*/
eval("\$this->module = new $this->filename(\$this);");
if (method_exists($this->module, 'main'))
{
$this->module->main($this->mode, $this->sub);
}
}
} // END load
}
/**
* Output the standard page header
@ -598,4 +605,5 @@ class module
return $tpl;
}
}
?>

View file

@ -124,6 +124,7 @@ class install_install extends module
else
{
$passed['php'] = true;
// We also give feedback on whether we're running in safe mode
$result = '<b style="color:green">' . $lang['YES'];
if (@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'on')
@ -132,6 +133,7 @@ class install_install extends module
}
$result .= '</b>';
}
$template->assign_block_vars('checks', array(
'TITLE' => $lang['PHP_VERSION_REQD'],
'RESULT' => $result,
@ -173,7 +175,7 @@ class install_install extends module
{
$dll = $db_ary['MODULE'];
if (!extension_loaded($dll))
if (!@extension_loaded($dll))
{
if (!$this->can_load_dll($dll))
{
@ -208,7 +210,7 @@ class install_install extends module
foreach ($this->php_dlls_other as $dll)
{
if (!extension_loaded($dll))
if (!@extension_loaded($dll))
{
if (!$this->can_load_dll($dll))
{
@ -222,6 +224,7 @@ class install_install extends module
continue;
}
}
$template->assign_block_vars('checks', array(
'TITLE' => $lang['DLL_' . strtoupper($dll)],
'RESULT' => '<b style="color:green">' . $lang['AVAILABLE'] . '</b>',
@ -429,7 +432,7 @@ class install_install extends module
$available_dbms_temp = array();
foreach ($this->available_dbms as $type => $dbms_ary)
{
if (!extension_loaded($dbms_ary['MODULE']))
if (!@extension_loaded($dbms_ary['MODULE']))
{
if (!$this->can_load_dll($dbms_ary['MODULE']))
{
@ -693,7 +696,7 @@ class install_install extends module
foreach ($check_exts as $dll)
{
if (!extension_loaded($dll))
if (!@extension_loaded($dll))
{
if (!$this->can_load_dll($dll))
{
@ -907,7 +910,7 @@ class install_install extends module
$cookie_domain = ($server_name != '') ? $server_name : (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME');
// If we get here and the extension isn't loaded it should be safe to just go ahead and load it
if (!extension_loaded($this->available_dbms[$dbms]['MODULE']))
if (!@extension_loaded($this->available_dbms[$dbms]['MODULE']))
{
@dl($this->available_dbms[$dbms]['MODULE'] . ".$prefix");
}
@ -1264,8 +1267,6 @@ class install_install extends module
if ($module_class == 'acp')
{
// Move main module 4 up...
for ($i = 1; $i <= 4; $i++)
{
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE module_name = 'main'
@ -1275,12 +1276,9 @@ class install_install extends module
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$_module->move_module_by($row, 'move_up', 1);
}
$_module->move_module_by($row, 'move_up', 4);
// Move permissions intro screen module 4 up...
for ($i = 1; $i <= 4; $i++)
{
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE module_name = 'permissions'
@ -1290,8 +1288,7 @@ class install_install extends module
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$_module->move_module_by($row, 'move_up', 1);
}
$_module->move_module_by($row, 'move_up', 4);
}
// And now for the special ones
@ -1374,7 +1371,7 @@ class install_install extends module
foreach ($this->bot_list as $bot_name => $bot_ary)
{
$user_row = array(
'user_type' => GROUP_HIDDEN,
'user_type' => USER_IGNORE,
'group_id' => $group_id,
'username' => $bot_name,
'user_regdate' => time(),
@ -1530,7 +1527,7 @@ class install_install extends module
$sql = "SELECT name
FROM sysobjects
WHERE type='U'";
$field = "name";
$field = 'name';
break;
case 'postgres':
@ -1538,7 +1535,7 @@ class install_install extends module
FROM pg_class
WHERE relkind = 'r'
AND relname NOT LIKE 'pg\_%'";
$field = "relname";
$field = 'relname';
break;
case 'firebird':
@ -1563,8 +1560,7 @@ class install_install extends module
do
{
// All phpBB installations will at least have config else it won't
// work
// All phpBB installations will at least have config else it won't work
if (in_array(strtolower($row[$field]), $table_ary))
{
$error[] = $lang['INST_ERR_PREFIX'];
@ -1612,7 +1608,7 @@ class install_install extends module
{
$path = $phpbb_root_path . 'language/' . $file;
if (is_file($path) || is_link($path) || $file == '.' || $file == '..')
if (is_file($path) || is_link($path) || $file == '.' || $file == '..' || $file == 'CVS')
{
continue;
}

View file

@ -45,10 +45,12 @@ class install_main extends module
$title = $lang['SUB_INTRO'];
$body = $lang['OVERVIEW_BODY'];
break;
case 'license' :
$title = $lang['GPL'];
$body = implode("<br/>\n", file('../docs/COPYING'));
break;
case 'support' :
$title = $lang['SUB_SUPPORT'];
$body = $lang['SUPPORT_BODY'];
@ -64,4 +66,5 @@ class install_main extends module
));
}
}
?>

View file

@ -204,16 +204,6 @@ BEGIN
END;;
# phpbb_cache
CREATE TABLE phpbb_cache (
var_name VARCHAR(252) NOT NULL,
var_expires INTEGER DEFAULT 0 NOT NULL,
var_data BLOB SUB_TYPE TEXT
);;
ALTER TABLE phpbb_cache ADD PRIMARY KEY (var_name);;
# phpbb_config
CREATE TABLE phpbb_config (
config_name VARCHAR(252) NOT NULL,
@ -565,6 +555,7 @@ ALTER TABLE phpbb_modules ADD PRIMARY KEY (module_id);;
CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules(module_enabled);;
CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules(left_id, right_id);;
CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules(module_class, left_id);;
CREATE GENERATOR phpbb_modules_gen;;
SET GENERATOR phpbb_modules_gen TO 0;;

View file

@ -329,29 +329,6 @@ CREATE INDEX [bot_active] ON [phpbb_bots]([bot_active]) ON [PRIMARY]
GO
/*
Table: phpbb_cache
*/
CREATE TABLE [phpbb_cache] (
[var_name] [varchar] (255) NOT NULL ,
[var_expires] [int] NOT NULL ,
[var_data] [text]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_cache] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_cache] PRIMARY KEY CLUSTERED
(
[var_name]
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_cache] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_cache__var_expires] DEFAULT (0) FOR [var_expires],
CONSTRAINT [DF_phpbb_cache__var_name] DEFAULT ('') FOR [var_name]
GO
/*
Table: phpbb_config
*/
@ -895,6 +872,9 @@ GO
CREATE INDEX [module_left_right_id] ON [phpbb_modules]([left_id], [right_id]) ON [PRIMARY]
GO
CREATE INDEX [module_class_left_id] ON [phpbb_modules]([module_class], [left_id]) ON [PRIMARY]
GO
/*
Table: phpbb_poll_options

View file

@ -132,14 +132,6 @@ CREATE TABLE phpbb_bots (
KEY bot_active (bot_active)
);
# Table: 'phpbb_cache'
CREATE TABLE phpbb_cache (
var_name varchar(255) DEFAULT '' NOT NULL,
var_expires int(10) UNSIGNED DEFAULT '0' NOT NULL,
var_data mediumtext,
PRIMARY KEY (var_name)
);
# Table: 'phpbb_config'
CREATE TABLE phpbb_config (
config_name varchar(255) NOT NULL,
@ -362,7 +354,8 @@ CREATE TABLE phpbb_modules (
module_auth varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (module_id),
KEY left_right_id (left_id, right_id),
KEY module_enabled (module_enabled)
KEY module_enabled (module_enabled),
KEY class_left_id (module_class, left_id)
);
# Table: 'phpbb_poll_options'

View file

@ -307,18 +307,6 @@ CREATE INDEX phpbb_bots_bot_active on phpbb_bots (bot_active)
/
/*
Table: phpbb_cache
*/
CREATE TABLE phpbb_cache (
var_name varchar2(255) DEFAULT '',
var_expires number(10) DEFAULT '0' NOT NULL,
var_data clob,
CONSTRAINT pk_phpbb_cache PRIMARY KEY (var_name)
)
/
/*
Table: phpbb_config
*/
@ -781,6 +769,8 @@ CREATE INDEX phpbb_modules_module_enabled on phpbb_modules (module_enabled)
/
CREATE INDEX phpbb_modules_left_right_id on phpbb_modules (left_id, right_id)
/
CREATE INDEX phpbb_modules_class_left_id on phpbb_modules (module_class, left_id)
/
/*

View file

@ -254,18 +254,6 @@ CREATE TABLE phpbb_bots (
CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active);
/* Table: phpbb_cache */
CREATE TABLE phpbb_cache (
var_name varchar(255) DEFAULT '' NOT NULL,
var_expires INT4 DEFAULT '0' NOT NULL,
var_data TEXT,
PRIMARY KEY (var_name),
CHECK (var_expires>=0)
);
/* Table: phpbb_config */
CREATE TABLE phpbb_config (
config_name varchar(255) NOT NULL,
@ -590,7 +578,7 @@ CREATE TABLE phpbb_modules (
CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled);
CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id);
CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id);

View file

@ -146,15 +146,6 @@ CREATE TABLE phpbb_bots (
CREATE INDEX phpbb_bots_bot_active on phpbb_bots (bot_active);
# Table: phpbb_cache
CREATE TABLE phpbb_cache (
var_name varchar(255) NOT NULL DEFAULT '',
var_expires int(10) NOT NULL DEFAULT '0',
var_data mediumtext(16777215),
PRIMARY KEY (var_name)
);
# Table: phpbb_config
CREATE TABLE phpbb_config (
config_name varchar(255) NOT NULL,
@ -392,6 +383,7 @@ CREATE TABLE phpbb_modules (
CREATE INDEX phpbb_modules_module_enabled on phpbb_modules (module_enabled);
CREATE INDEX phpbb_modules_left_right_id on phpbb_modules (left_id, right_id);
CREATE INDEX phpbb_modules_class_left_id on phpbb_modules (module_class, left_id);
# Table: phpbb_poll_options

View file

@ -139,9 +139,9 @@ $lang = array_merge($lang, array(
'MAX_POST_FONT_SIZE' => 'Max font size per post',
'MAX_POST_FONT_SIZE_EXPLAIN' => 'Set to 0 for unlimited font size.',
'MAX_POST_IMG_HEIGHT' => 'Max image height per post',
'MAX_POST_IMG_HEIGHT_EXPLAIN' => 'Set to 0 for unlimited image height.',
'MAX_POST_IMG_HEIGHT_EXPLAIN' => 'Maximum height of an image/flash file in postings. Set to 0 for unlimited size.',
'MAX_POST_IMG_WIDTH' => 'Max image width per post',
'MAX_POST_IMG_WIDTH_EXPLAIN' => 'Set to 0 for unlimited image width.',
'MAX_POST_IMG_WIDTH_EXPLAIN' => 'Maximum width of an image/flash file in postings. Set to 0 for unlimited size.',
'MAX_POST_URLS' => 'Max links per post',
'MAX_POST_URLS_EXPLAIN' => 'Set to 0 for unlimited links.',
'POSTING' => 'Posting',
@ -160,9 +160,9 @@ $lang = array_merge($lang, array(
'MAX_SIG_FONT_SIZE' => 'Maximum signature font size',
'MAX_SIG_FONT_SIZE_EXPLAIN' => 'Maximum font size allowed in user signatures. Set to 0 for unlimited size.',
'MAX_SIG_IMG_HEIGHT' => 'Maximum signature image height',
'MAX_SIG_IMG_HEIGHT_EXPLAIN' => 'Maximum height of an image in user signatures. Set to 0 for unlimited size.',
'MAX_SIG_IMG_HEIGHT_EXPLAIN' => 'Maximum height of an image/flash file in user signatures. Set to 0 for unlimited size.',
'MAX_SIG_IMG_WIDTH' => 'Maximum signature image width',
'MAX_SIG_IMG_WIDTH_EXPLAIN' => 'Maximum width of an image in user signatures. Set to 0 for unlimited size.',
'MAX_SIG_IMG_WIDTH_EXPLAIN' => 'Maximum width of an image/flash file in user signatures. Set to 0 for unlimited size.',
'MAX_SIG_LENGTH' => 'Maximum signature length',
'MAX_SIG_LENGTH_EXPLAIN' => 'Maximum number of characters in user signatures.',
'MAX_SIG_SMILIES' => 'Maximum smilies per signature',
@ -395,6 +395,8 @@ $lang = array_merge($lang, array(
$lang = array_merge($lang, array(
'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use Jabber for instant messaging and board notices. Jabber is an opensource protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Note that it may take several seconds to update Jabber account details, do not stop the script till completed!',
'ERR_JAB_AUTH' => 'Could not authorise on Jabber server',
'ERR_JAB_CONNECT' => 'Could not connect to Jabber server',
'ERR_JAB_PASSCHG' => 'Could not change password',
'ERR_JAB_PASSFAIL' => 'Password update failed, %s',
'ERR_JAB_REGISTER' => 'An error occured trying to register this account, %s',

View file

@ -244,6 +244,7 @@ $lang = array_merge($lang, array(
'PROCEED_TO_ACP' => 'Click %sHere%s to proceed to the ACP',
'REMIND' => 'Remind',
'REORDER' => 'Reorder',
'RESYNC' => 'Sync',
'RETURN_TO' => 'Return to ...',
'SELECT_ANONYMOUS' => 'Select Anonymous User',

View file

@ -117,7 +117,6 @@ $lang = array_merge($lang, array(
'PRUNE_OLD_POLLS_EXPLAIN' => 'Removes topics with polls not voted in for post age days.',
'REDIRECT_ACL' => 'Now you are able to %sset permissions%s for this forum.',
'RESYNC' => 'Sync',
'TYPE_CAT' => 'Category',
'TYPE_FORUM' => 'Forum',

View file

@ -57,6 +57,7 @@ $lang = array_merge($lang, array(
'MOVE_POSTS_EXPLAIN' => 'Please select the forum to which you wish to move all the posts this user has made.',
'NO_SPECIAL_RANK' => 'No special rank assigned',
'NOT_MANAGE_FOUNDER' => 'You tried to manage a user with founder status. Only founders are allowed to manage other founders.',
'QUICK_TOOLS' => 'Quick tools',

View file

@ -207,6 +207,7 @@ $lang = array_merge($lang, array(
'NO_POST' => 'You have to select a post in order to warn the user for a post',
'NO_POST_REPORT' => 'This post was not reported.',
'NO_POST_SELECTED' => 'You must select at least one post to perform this action',
'NO_REASON_DISAPPROVAL' => 'Please give an appropiate reason for disapproval',
'NO_TOPIC_SELECTED' => 'You must select at least one topic to perform this action',
'OTHER_IPS' => 'Other IP addresses this user has posted from',

View file

@ -180,6 +180,7 @@ $lang = array_merge($lang, array(
'TOO_MANY_USER_OPTIONS' => 'You cannot specify more Options per User than existing poll options',
'TOPIC_BUMPED' => 'Topic has been bumped successfully',
'UNABLE_GET_IMAGE_SIZE' => 'Accessing the image was impossible or file isn\'t a valid picture.',
'UNAUTHORISED_BBCODE' => 'You cannot use certain bbcodes: ',
'UNGLOBALISE_EXPLAIN' => 'To switch this topic back from being global to a normal topic, you need to select the forum you whish this topic to be displayed',
'UPDATE_COMMENT' => 'Update comment',

View file

@ -379,7 +379,7 @@ if ($mode != 'post' && $config['allow_topic_notify'] && $user->data['is_register
}
// Do we want to edit our post ?
if ($mode == 'edit')
if ($mode == 'edit' && $post_data['bbcode_uid'])
{
$message_parser->bbcode_uid = $post_data['bbcode_uid'];
}

View file

@ -2,14 +2,18 @@
<div id="pagecontent">
<form name="confirm" action="{S_CONFIRM_ACTION}" method="post"><table class="tablebg" width="100%" cellspacing="1">
<form name="confirm" action="{S_CONFIRM_ACTION}" method="post">
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<th>{MESSAGE_TITLE}</th>
</tr>
<tr>
<td class="row1" align="center"><br /><p class="gen">{MESSAGE_TEXT}</p><br />{S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="btnmain" />&nbsp;&nbsp;<input type="submit" name="cancel" value="{L_NO}" class="btnlite" /></td>
</tr>
</table></form>
</table>
</form>
</div>

View file

@ -1,6 +1,7 @@
<!-- INCLUDE overall_header.html -->
<a name="faqtop"></a>
<div id="pagecontent">
<table class="tablebg" width="100%" cellspacing="1">

View file

@ -19,7 +19,9 @@
<a href="{U_TERMS_USE}">{L_TERMS_USE}</a> | <a href="{U_PRIVACY}">{L_PRIVACY}</a>
</p>
</td>
<td class="row2"><table cellspacing="1" cellpadding="4">
<td class="row2">
<table cellspacing="1" cellpadding="4">
<!-- IF LOGIN_ERROR -->
<tr>
<td class="gensmall" colspan="2" align="center"><span class="error">{LOGIN_ERROR}</span></td>
@ -52,7 +54,8 @@
<td><input type="checkbox" class="radio" name="viewonline" tabindex="4" /> <span class="gensmall">{L_HIDE_ME}</span></td>
</tr>
<!-- ENDIF -->
</table></td>
</table>
</td>
</tr>
<!-- IF S_CONFIRM_CODE -->
<tr>
@ -75,7 +78,9 @@
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="login" class="btnmain" value="{L_LOGIN}" tabindex="5" /></td>
</tr>
</table></form>
</table>
</form>
<br clear="all" />
@ -92,5 +97,4 @@
<div align="right"><!-- INCLUDE jumpbox.html --></div>
<!-- INCLUDE overall_footer.html -->

View file

@ -2,7 +2,9 @@
<div id="pagecontent">
<form name="login" method="post" action="{S_LOGIN_ACTION}"><table class="tablebg" width="100%" cellspacing="1" align="center">
<form name="login" method="post" action="{S_LOGIN_ACTION}">
<table class="tablebg" width="100%" cellspacing="1" align="center">
<tr>
<th>{L_LOGIN}</th>
</tr>
@ -10,24 +12,27 @@
<td class="row3" align="center"><span class="gensmall">{L_LOGIN_FORUM}</td>
</tr>
<tr>
<td class="row1" align="center"><table cellspacing="1" cellpadding="4" border="0">
<td class="row1" align="center">
<table cellspacing="1" cellpadding="4" border="0">
<!-- IF LOGIN_ERROR -->
<tr>
<td class="gensmall" colspan="2" align="center"><span class="error">{LOGIN_ERROR}</span></td>
</tr>
<!-- ENDIF -->
<tr>
<td class="gensmall"><b>{L_PASSWORD}:</b></td>
<td><input class="post" type="password" name="password" size="25" maxlength="25" tabindex="2" /></td>
</tr>
</table></td>
</table>
</td>
</tr>
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="login" class="btnmain" value="{L_LOGIN}" tabindex="3" /></td>
</tr>
</table></form>
</table>
</form>
</div>

View file

@ -2,6 +2,7 @@
</td>
</tr>
</table>
<!-- IF PAGINATION -->
<table width="80%" align="right" cellspacing="1">
<tr>

View file

@ -2,7 +2,9 @@
<!-- IF U_VIEW_FORUM_LOGS --><a href="{U_VIEW_FORUM_LOGS}">{L_VIEW_FORUM_LOGS}</a><!-- ENDIF -->
<form method="post" id="mcp" action="{S_MCP_ACTION}"><table class="tablebg" width="100%" cellspacing="1">
<form method="post" id="mcp" action="{S_MCP_ACTION}">
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<td class="cat" colspan="6" align="center"><span class="gensmall">{L_DISPLAY_TOPICS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></span></td>
</tr>
@ -35,7 +37,6 @@
<td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
<td class="row1" width="120" align="center"><p class="topicdetails">{topicrow.LAST_POST_TIME}</p></td>
<td class="row2" align="center"><input type="checkbox" class="radio" name="topic_id_list[]" value="{topicrow.TOPIC_ID}" {topicrow.S_TOPIC_CHECKED}/></td>
</tr>
<!-- BEGINELSE -->
<tr>
@ -54,7 +55,9 @@
<input class="btnmain" type="submit" value="{L_SUBMIT}" />
</td>
</tr>
</table></form>
</table>
</form>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>

View file

@ -17,7 +17,6 @@
<div id="pagecontent">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="20%" valign="top">
@ -62,14 +61,18 @@
<!-- ENDIF -->
<!-- IF CONFIRM_MESSAGE -->
<table class="tablebg" width="100%" cellspacing="1"><form name="confirm" method="post" action="{S_CONFIRM_ACTION}">
<form name="confirm" method="post" action="{S_CONFIRM_ACTION}">
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<th><b>{L_PLEASE_CONFIRM}</b></th>
</tr>
<tr>
<td class="row1" align="center"><span class="gen"><br />{CONFIRM_MESSAGE}<br /><br />{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="confirm" value="{L_YES}" />&nbsp;&nbsp;<input class="btnlite" type="submit" name="cancel" value="{L_NO}" /><br /><br /></span></td>
</tr>
</form></table>
</table>
</form>
<br />
<!-- ENDIF -->

View file

@ -1,13 +1,17 @@
<!-- Note: no longer in use... -->
<form name="jumpbox" method="post" action="{S_JUMPBOX_ACTION}">
<span class="gensmall">{L_JUMP_TO}:</span>&nbsp;<select name="f" onChange="if(this.options[this.selectedIndex].value != -1 && this.options[this.selectedIndex].value != document.jumpbox.current_f.value){ forms['jumpbox'].submit() }">
<!-- IF S_ENABLE_SELECT_ALL -->
<option value="0">{L_ALL_FORUMS}</option>
<!-- ELSE -->
<option value="-1">{L_SELECT_FORUM}</option>
<!-- ENDIF -->
<!-- BEGIN options --><option value="{options.VALUE}"<!-- IF options.VALUE eq -1 --> class="greyed"<!-- ENDIF -->{options.SELECTED}/>{options.TEXT}</option>
<!-- BEGIN options -->
<option value="{options.VALUE}"<!-- IF options.VALUE eq -1 --> class="greyed"<!-- ENDIF -->{options.SELECTED}/>{options.TEXT}</option>
<!-- BEGINELSE -->
<!-- END options -->
</select>&nbsp;<input type="hidden" name="current_f" value="{S_CURRENT_FORUM}" /><input name="jumpbox" class="btnlite" type="submit" value="{L_GO}" onClick="if(document.jumpbox.f.value == -1){return false;}" />

View file

@ -11,6 +11,7 @@
<!-- IF S_CLEAR_ALLOWED --><th>{L_MARK}</th><!-- ENDIF -->
</tr>
<!-- IF S_LOGS -->
<!-- BEGIN log -->
<!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td class="genmed">{log.USERNAME}</td>

View file

@ -2,7 +2,9 @@
<div id="pagecontent">
<form name="confirm" action="{S_CONFIRM_ACTION}" method="post"><table class="tablebg" width="100%" cellspacing="1">
<form name="confirm" action="{S_CONFIRM_ACTION}" method="post">
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<th>{MESSAGE_TITLE}</th>
</tr>
@ -20,7 +22,9 @@
<input type="submit" name="confirm" value="{YES_VALUE}" class="btnmain" />&nbsp;&nbsp;<input type="submit" name="cancel" value="{L_NO}" class="btnlite" /></span>
</td>
</tr>
</table></form>
</table>
</form>
</div>
@ -38,4 +42,3 @@
<br clear="all" />
<!-- INCLUDE overall_footer.html -->

View file

@ -1,6 +1,7 @@
<!-- INCLUDE mcp_header.html -->
<form method="post" name="mcp" action="{U_POST_ACTION}">
<table class="bg" width="75%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"align="center">{L_SELECT_USER}</th>
@ -13,6 +14,7 @@
<td class="cat" colspan="2" align="center"><input type="submit" name="submituser" value="{L_SUBMIT}" class="btnmain" /></td>
</tr>
</table>
</form>
<br clear="all" /><br />

View file

@ -7,7 +7,8 @@
<th colspan="2" height="28" align="center">{USERNAME}</th>
</tr>
<tr>
<td class="row1" align="center"><table cellspacing="1" cellpadding="2" border="0">
<td class="row1" align="center">
<table cellspacing="1" cellpadding="2" border="0">
<tr>
<td class="gen" align="center"><!-- IF USER_COLOR --><b style="color: #{USER_COLOR}"><!-- ELSE --><b><!-- ENDIF -->{USERNAME}</b></td>
</tr>
@ -24,8 +25,10 @@
<tr>
<td align="center"><!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF --></td>
</tr>
</table></td>
<td class="row1"><table width="100%" cellspacing="1" cellpadding="2" border="0">
</table>
</td>
<td class="row1">
<table width="100%" cellspacing="1" cellpadding="2" border="0">
<tr>
<td class="gen" align="right" nowrap="nowrap">{L_JOINED}: </td>
<td width="100%"><b class="gen">{JOINED}</b></td>
@ -38,14 +41,17 @@
<td class="gen" align="right" valign="top" nowrap="nowrap">{L_WARNINGS}: </td>
<td><b class="gen">{WARNINGS}</b></td>
</tr>
</table></td>
</table>
</td>
</tr>
</table>
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
<tr>
<th colspan="2" height="28" align="center">{L_FEEDBACK}</th>
</tr>
<!-- IF S_USER_NOTES -->
<!-- BEGIN usernotes -->
<!-- IF usernotes.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td<!-- IF not S_CLEAR_ALLOWED --> colspan="2"<!-- ENDIF -->><span class="gensmall">{L_REPORT_BY}: <b>{usernotes.REPORT_BY}</b> {L_ON} {usernotes.REPORT_AT}</span><hr /><span class="gen">{usernotes.ACTION}</span></td>
@ -60,12 +66,14 @@
<td class="cat" colspan="2" align="center"><input class="btnlite" type="submit" name="action[del_marked]" value="{L_DELETE_MARKED}" />&nbsp; <input class="btnlite" type="submit" name="action[del_all]" value="{L_DELETE_ALL}" /></td>
</tr>
<!-- ENDIF -->
<!-- ELSE -->
<tr>
<td class="row1" colspan="2" align="center"><span class="gen">{L_NO_FEEDBACK}</span></td>
</tr>
<!-- ENDIF -->
</table>
<br clear="all" />
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
@ -88,7 +96,6 @@
<td align="right"><span class="pagination"><!-- IF PAGINATION --><a href="javascript:jumpto();">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a>&nbsp;&nbsp;<!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE -->&nbsp;&nbsp;<a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --><!-- ENDIF --></span></td>
</tr>
</table>
</table>
</form>

View file

@ -1,7 +1,9 @@
<!-- INCLUDE mcp_header.html -->
<!-- IF S_MCP_REPORT -->
<form method="post" name="mcp_report" action="{U_CLOSE_ACTION}"><table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
<form method="post" name="mcp_report" action="{U_CLOSE_ACTION}">
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
<tr>
<th colspan="2" height="28" align="center">{L_REPORT_DETAILS}</th>
</tr>
@ -28,13 +30,17 @@
<tr>
<td class="cat" align="center" colspan="2"><!-- IF S_POST_REPORTED --><input class="btnmain" type="submit" value="{L_CLOSE_REPORT}" name="action[close]" /><!-- ELSE -->{L_REPORT_CLOSED}<!-- ENDIF --> &nbsp; <input class="btnlite" type="submit" value="{L_DELETE_REPORT}" name="action[delete]" /></td>
</tr>
</table>
<input type="hidden" name="post_id_list[]" value="{POST_ID}" />
</table></form>
</form>
<br clear="all"/>
<!-- ENDIF -->
<!-- IF S_MCP_QUEUE --><form method="post" name="mcp_approve" action="{U_APPROVE_ACTION}"><!-- ELSE --><form method="post" name="mcp_report" action="{U_CLOSE_ACTION}"><!-- ENDIF --><table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
<!-- IF S_MCP_QUEUE --><form method="post" name="mcp_approve" action="{U_APPROVE_ACTION}"><!-- ELSE --><form method="post" name="mcp_report" action="{U_CLOSE_ACTION}"><!-- ENDIF -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
<tr>
<th colspan="2" height="28" align="center">{L_POST_DETAILS}</th>
</tr>
@ -72,6 +78,7 @@
<input type="hidden" name="post_id_list[]" value="{POST_ID}" />
<!-- ENDIF -->
</table>
</form>
<!-- IF S_MCP_QUEUE -->

View file

@ -1,6 +1,8 @@
<!-- INCLUDE mcp_header.html -->
<table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0"><form name="mcp" id="mcp" method="post" action="{S_MCP_ACTION}">
<form name="mcp" id="mcp" method="post" action="{S_MCP_ACTION}">
<table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0">
<tr>
<th colspan="6" height="28" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
</tr>
@ -14,13 +16,14 @@
<th width="5%">&nbsp;{L_SELECT}&nbsp;</th>
</tr>
<!-- BEGIN postrow -->
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEWTOPIC}">{postrow.TOPIC_TITLE}</a></p>
<span class="gensmall"><!-- IF postrow.U_VIEWFORUM -->{L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span></td>
<td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen"><!-- IF postrow.U_VIEWPROFILE --><a href="{postrow.U_VIEWPROFILE}">{postrow.POSTER}</a><!-- ELSE -->{postrow.POSTER}<!-- ENDIF --></span><br />
<span class="gensmall">[ <a href="{postrow.U_VIEW_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
<td class="postdetails" style="padding: 4px;" align="left" valign="top" nowrap="nowrap">{postrow.POST_TIME}</td>
<td align="center">{postrow.S_CHECKBOX}</td>
<td align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{postrow.POST_ID}" /></td>
</tr>
<!-- BEGINELSE -->
<tr>
@ -30,7 +33,9 @@
<tr>
<td class="cat" colspan="6" height="28" align="center"><input class="btnmain" type="submit" name="action[approve]" value="{L_APPROVE}" />&nbsp;&nbsp;<input class="btnlite" type="submit" name="action[disapprove]" value="{L_DISAPPROVE}" /></td>
</tr>
</form></table>
</table>
</form>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>

View file

@ -1,6 +1,8 @@
<!-- INCLUDE mcp_header.html -->
<table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0"><form name="mcp" id="mcp" method="post" action="{S_MCP_ACTION}">
<form name="mcp" id="mcp" method="post" action="{S_MCP_ACTION}">
<table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0">
<tr>
<th colspan="5" height="28" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
</tr>
@ -15,6 +17,7 @@
<th width="5%">&nbsp;{L_SELECT}&nbsp;</th>
</tr>
<!-- BEGIN postrow -->
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEWTOPIC}">{postrow.POST_SUBJECT}</a></p>
<span class="gensmall">{L_TOPIC}: <a href="{postrow.U_VIEWTOPIC}">{postrow.TOPIC_TITLE}</a></span><br />
@ -24,7 +27,7 @@
<td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen"><!-- IF postrow.U_VIEW_REPORTER_PROFILE --><a href="{postrow.U_VIEW_REPOTER_PROFILE}">{postrow.REPORTER}</a><!-- ELSE -->{postrow.REPORTER}<!-- ENDIF --></span></td>
<td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen">{postrow.REPORT_TIME}</span><br />
<span class="gensmall">[ <a href="{postrow.U_VIEW_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
<td align="center">{postrow.S_CHECKBOX}</td>
<td align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{postrow.POST_ID}" /></td>
</tr>
<!-- BEGINELSE -->
<tr>
@ -40,7 +43,9 @@
<!-- ENDIF -->
</td>
</tr>
</form></table>
</table>
</form>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>

View file

@ -1,6 +1,8 @@
<!-- INCLUDE mcp_header.html -->
<form name="mcp" id="mcp" method="post" action="{S_MCP_ACTION}"><table class="tablebg" width="100%" cellspacing="1">
<form name="mcp" id="mcp" method="post" action="{S_MCP_ACTION}">
<table class="tablebg" width="100%" cellspacing="1">
<!-- IF S_CAN_SPLIT -->
<tr>
<th colspan="3" nowrap="nowrap">{L_SPLIT_TOPIC}</th>
@ -16,17 +18,21 @@
<td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_FORUM}</span></td>
<td class="row2" colspan="2">{S_FORUM_SELECT}</td>
</tr>
<!-- IF S_SHOW_TOPIC_ICONS -->
<tr>
<td class="row1"><span class="gen">{L_TOPIC_ICON}</span></td>
<td class="row2" colspan="2"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<td class="row2" colspan="2">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><input type="radio" class="radio" name="icon" value="0"<!-- IF not S_TOPIC_ICON --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NONE}</span> <!-- BEGIN topic_icon --><input type="radio" class="radio" name="icon" value="{topic_icon.ICON_ID}"<!-- IF topic_icon.S_CHECKED --> checked="checked"<!-- ENDIF --> /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" hspace="2" vspace="2" /> <!-- END topic_icon --></td>
</tr>
</table></td>
</table>
</td>
</tr>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF S_CAN_MERGE -->
<tr>
<th colspan="3" nowrap="nowrap">{L_MERGE_TOPIC}</th>
@ -63,26 +69,23 @@
<td class="row3" colspan="3" align="center"><span class="gensmall">{RETURN_TOPIC}</span></td>
</tr>
<!-- BEGIN postrow -->
<!-- IF postrow.S_ROW_COUNT is even -->
<tr class="row1">
<!-- ELSE -->
<tr class="row2">
<!-- ENDIF -->
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td align="center"><b class="postauthor">{postrow.POSTER_NAME}</b></td>
<td width="100%" height="28"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<td width="100%" height="28">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr valign="top">
<td class="gensmall" nowrap="nowrap">&nbsp;<b>{L_POST_SUBJECT}:</b>&nbsp;</td>
<td class="gensmall" width="100%">{postrow.POST_SUBJECT}</td>
</tr>
</table></td>
<td rowspan="2" width="5%" align="center">{postrow.S_CHECKBOX}</td>
</table>
</td>
<td rowspan="2" width="5%" align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{postrow.POST_ID}"<!-- IF postrow.S_CHECKED --> checked="checked"<!-- ENDIF --> /></td>
</tr>
<!-- IF postrow.S_ROW_COUNT is even -->
<tr class="row1">
<!-- ELSE -->
<tr class="row2">
<!-- ENDIF -->
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td valign="bottom">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr valign="middle">
@ -90,7 +93,8 @@
</tr>
</table>
</td>
<td width="100%" valign="top"><table width="100%" cellspacing="0" cellpadding="2" border="0">
<td width="100%" valign="top">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td class="postbody" valign="top">{postrow.MESSAGE}<br /><br /></td>
</tr>
@ -108,7 +112,8 @@
</table>
</td>
</tr>
</table></td>
</table>
</td>
</tr>
<tr>
<td class="row3" colspan="3" height="1"><img src="images/spacer.gif" width="1" height="1" alt="" /></td>

View file

@ -1,7 +1,8 @@
<!-- INCLUDE mcp_header.html -->
<table class="tablebg" width="100%" cellspacing="1" cellpadding="2" border="0">
<form method="post" name="mcp" action="{S_MCP_ACTION}">
<table class="tablebg" width="100%" cellspacing="1" cellpadding="2" border="0">
<tr>
<th colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" height="28" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
</tr>
@ -38,6 +39,7 @@
</tr>
<!-- END log -->
</form>
</table>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">

View file

@ -1,6 +1,7 @@
<!-- INCLUDE mcp_header.html -->
<form method="post" name="mcp" action="{U_POST_ACTION}">
<table class="bg" width="75%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"align="center">{L_SELECT_USER}</th>
@ -13,6 +14,7 @@
<td class="cat" colspan="2" align="center"><input type="submit" name="submituser" value="{L_SUBMIT}" class="btnmain" /></td>
</tr>
</table>
</form>
<br clear="all" /><br />

View file

@ -5,7 +5,8 @@
<th colspan="2" height="28" align="center">{L_POST}</th>
</tr>
<tr>
<td class="row1" align="center"><table cellspacing="1" cellpadding="2" border="0">
<td class="row1" align="center">
<table cellspacing="1" cellpadding="2" border="0">
<tr>
<td class="gen" align="center"><!-- IF USER_COLOR --><b style="color: #{USER_COLOR}"><!-- ELSE --><b><!-- ENDIF -->{USERNAME}</b></td>
</tr>
@ -22,7 +23,8 @@
<tr>
<td align="center"><!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF --></td>
</tr>
</table></td>
</table>
</td>
<td class="row1">
<span class="gen">{POST}</span>
</td>
@ -32,6 +34,7 @@
<br clear="all" /><br />
<form method="post" name="mcp" action="{U_POST_ACTION}">
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
<tr>
<th height="28" align="center">{L_ADD_WARNING}</th>

View file

@ -5,7 +5,8 @@
<th colspan="2" height="28" align="center">{USERNAME}</th>
</tr>
<tr>
<td class="row1" align="center"><table cellspacing="1" cellpadding="2" border="0">
<td class="row1" align="center">
<table cellspacing="1" cellpadding="2" border="0">
<tr>
<td class="gen" align="center"><!-- IF USER_COLOR --><b style="color: #{USER_COLOR}"><!-- ELSE --><b><!-- ENDIF -->{USERNAME}</b></td>
</tr>
@ -22,8 +23,10 @@
<tr>
<td align="center"><!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF --></td>
</tr>
</table></td>
<td class="row1"><table width="100%" cellspacing="1" cellpadding="2" border="0">
</table>
</td>
<td class="row1">
<table width="100%" cellspacing="1" cellpadding="2" border="0">
<tr>
<td class="gen" align="right" nowrap="nowrap">{L_JOINED}: </td>
<td width="100%"><b class="gen">{JOINED}</b></td>
@ -36,13 +39,15 @@
<td class="gen" align="right" valign="top" nowrap="nowrap">{L_WARNINGS}: </td>
<td><b class="gen">{WARNINGS}</b></td>
</tr>
</table></td>
</table>
</td>
</tr>
</table>
<br clear="all" /><br />
<form method="post" name="mcp" action="{U_POST_ACTION}">
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
<tr>
<th height="28" align="center">{L_ADD_WARNING}</th>

View file

@ -38,6 +38,7 @@
<!-- IF S_SEARCH_USER and S_FORM_NAME --><th width="2%" nowrap="nowrap">{L_MARK}</th><!-- ENDIF -->
</tr>
<!-- BEGIN memberrow -->
<!-- IF S_SHOW_GROUP -->
<!-- IF memberrow.S_FIRST_ROW and memberrow.S_GROUP_LEADER -->
<tr class="row3">
@ -50,6 +51,7 @@
<!-- DEFINE $S_MEMBER_HEADER = 1 -->
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF memberrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF -->
<td class="gen" align="center">&nbsp;{memberrow.ROW_NUMBER}&nbsp;</td>

View file

@ -3,12 +3,14 @@
<script language="JavaScript" type="text/javascript">
<!--
function checkForm(formObj) {
function checkForm(formObj)
{
return;
formErrors = false;
if (formObj.message.value.length < 2) {
if (formObj.message.value.length < 2)
{
formErrors = "{LA_EMPTY_MESSAGE_EMAIL}";
}
else if ( formObj.subject.value.length < 2)
@ -16,7 +18,8 @@ function checkForm(formObj) {
formErrors = "{LA_EMPTY_SUBJECT_EMAIL}";
}
if (formErrors) {
if (formErrors)
{
alert(formErrors);
return false;
}
@ -26,7 +29,9 @@ function checkForm(formObj) {
<div id="pagecontent">
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)"><table class="tablebg" width="100%" cellspacing="1">
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)">
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<th colspan="2">{L_SEND_EMAIL}</th>
</tr>
@ -64,17 +69,21 @@ function checkForm(formObj) {
</tr>
<tr>
<td class="row1" valign="top"><span class="gen"><b>{L_OPTIONS}</b></span></td>
<td class="row2"><table cellspacing="0" cellpadding="1" border="0">
<td class="row2">
<table cellspacing="0" cellpadding="1" border="0">
<tr>
<td><input type="checkbox" class="radio" name="cc_email" value="1" checked="checked" /></td>
<td class="gen">{L_CC_EMAIL}</td>
</tr>
</table></td>
</table>
</td>
</tr>
<tr>
<td class="cat" colspan="2" height="28" align="center"><input type="submit" tabindex="6" name="submit" class="btnmain" value="{L_SEND_EMAIL}" /></td>
</tr>
</table></form>
</table>
</form>
</div>

View file

@ -4,7 +4,8 @@
<!-- MSNM info from http://www.cdolive.net/ - doesn't seem to work with MSN Messenger -->
<form method="post" action="{S_IM_ACTION}"><table class="tablebg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<form method="post" action="{S_IM_ACTION}">
<table class="tablebg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2">{L_SEND_IM}</th>
</tr>
@ -76,6 +77,7 @@
</tr>
<!-- ENDIF -->
</table></form>
</table>
</form>
<!-- INCLUDE simple_footer.html -->

View file

@ -2,7 +2,9 @@
<div id="pagecontent">
<form method="post" action="{S_PROFILE_ACTION}"><table class="tablebg" width="100%" cellspacing="1">
<form method="post" action="{S_PROFILE_ACTION}">
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<th colspan="2" nowrap="nowrap">{L_VIEWING_PROFILE}</th>
</tr>
@ -11,7 +13,9 @@
<td class="cat" width="60%" align="center"><h4>{L_USER_FORUM}</h4></td>
</tr>
<tr>
<td class="row1" align="center"><table cellspacing="1" cellpadding="2" border="0">
<td class="row1" align="center">
<table cellspacing="1" cellpadding="2" border="0">
<tr>
<td align="center"><!-- IF USER_COLOR --><b class="gen" style="color: #{USER_COLOR}"><!-- ELSE --><b class="gen"><!-- ENDIF -->{USERNAME}</b><!-- IF U_USER_ADMIN --><span class="genmed"> [ <a href="{U_USER_ADMIN}">{L_USER_ADMIN}</a> ]</span><!-- ENDIF --></td>
</tr>
@ -43,8 +47,10 @@
<td class="genmed" align="center">[ <a href="{U_ADD_FRIEND}">{L_ADD_FRIEND}</a> | <a href="{U_ADD_FOE}">{L_ADD_FOE}</a> ]</td>
</tr>
<!-- ENDIF -->
</table></td>
<td class="row1"><table width="100%" cellspacing="1" cellpadding="2" border="0">
</table>
</td>
<td class="row1">
<table width="100%" cellspacing="1" cellpadding="2" border="0">
<tr>
<td class="gen" align="right" nowrap="nowrap">{L_JOINED}: </td>
<td width="100%"><b class="gen">{JOINED}</b></td>
@ -73,14 +79,16 @@
<td><!-- IF ACTIVE_TOPIC_PCT neq 0 --><b><a class="gen" href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></b><br /><span class="gensmall">[ {ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
</tr>
<!-- ENDIF -->
</table></td>
</table>
</td>
</tr>
<tr>
<td class="cat" align="center"><h4>{L_CONTACT_USER}</h4></td>
<td class="cat" align="center"><h4>{L_ABOUT_USER}</h4></td>
</tr>
<tr>
<td class="row1"><table width="100%" cellspacing="1" cellpadding="2" border="0">
<td class="row1">
<table width="100%" cellspacing="1" cellpadding="2" border="0">
<tr>
<td class="gen" align="right" nowrap="nowrap">{L_EMAIL_ADDRESS}: </td>
<td class="row1" width="100%"><!-- IF U_EMAIL --><a href="{U_EMAIL}">{EMAIL_IMG}</a><!-- ENDIF --></td>
@ -109,8 +117,10 @@
<td class="gen" nowrap="nowrap" align="right">{L_JABBER}: </td>
<td><!-- IF U_JABBER and S_JABBER_ENABLED --><a href="{U_JABBER}" onclick="popup('{U_JABBER}', 550, 320); return false">{JABBER_IMG}</a><!-- ELSEIF U_JABBER -->{JABBER_IMG}<!-- ENDIF --></td>
</tr>
</table></td>
<td class="row1"><table cellspacing="1" cellpadding="2" border="0">
</table>
</td>
<td class="row1">
<table cellspacing="1" cellpadding="2" border="0">
<tr>
<td class="gen" align="right" nowrap="nowrap">{L_USERGROUPS}: </td>
<td><select name="g">{S_GROUP_OPTIONS}</select> <input class="btnlite" type="submit" name="submit" value="{L_GO}" /></td>
@ -144,7 +154,8 @@
<td><b class="genmed">{custom_fields.PROFILE_FIELD_VALUE}</b></td>
</tr>
<!-- END custom_fields -->
</table></td>
</table>
</td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><h4>{L_SIGNATURE}</h4></td>
@ -152,7 +163,9 @@
<tr>
<td class="row1" colspan="2"><div class="postbody" style="padding: 10px;">{SIGNATURE}</div></td>
</tr>
</table></form>
</table>
</form>
</div>

View file

@ -84,14 +84,17 @@ function marklist(id, name, state)
<div id="wrapheader">
<div id="logodesc"><table width="100%" cellspacing="0">
<div id="logodesc">
<table width="100%" cellspacing="0">
<tr>
<td><a href="{U_INDEX}">{SITE_LOGO_IMG}</a></td>
<td width="100%" align="center"><h1>{SITENAME}</h1><span class="gen">{SITE_DESCRIPTION}</span></td>
</tr>
</table></div>
</table>
</div>
<div id="menubar"><table width="100%" cellspacing="0">
<div id="menubar">
<table width="100%" cellspacing="0">
<tr>
<td class="genmed">
<a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" /> {L_LOGIN_LOGOUT}</a>&nbsp;
@ -103,14 +106,17 @@ function marklist(id, name, state)
</td>
<td class="genmed" align="right"><a href="{U_FAQ}"><img src="{T_THEME_PATH}/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" /> {L_FAQ}</a><!-- IF S_DISPLAY_SEARCH -->&nbsp; &nbsp;<a href="{U_SEARCH}"><img src="{T_THEME_PATH}/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" /> {L_SEARCH}</a><!-- ENDIF --><!-- IF S_DISPLAY_MEMBERLIST -->&nbsp; &nbsp;<a href="{U_MEMBERLIST}"><img src="{T_THEME_PATH}/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" /> {L_MEMBERLIST}</a><!-- ENDIF --><!-- IF S_USER_LOGGED_IN -->&nbsp; &nbsp;<a href="{U_PROFILE}"><img src="{T_THEME_PATH}/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" /> {L_PROFILE}</a><!-- ENDIF --></td>
</tr>
</table></div>
</table>
</div>
<div id="datebar"><table width="100%" cellspacing="0">
<div id="datebar">
<table width="100%" cellspacing="0">
<tr>
<td class="gensmall"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ENDIF --></td>
<td class="gensmall" align="right">{CURRENT_TIME}<br /></td>
</tr>
</table></div>
</table>
</div>
</div>

View file

@ -1,5 +1,8 @@
<script language="javascript" type="text/javascript">
<script type="text/javascript">
<!--
/**
* Show upload progress bar
*/
function popup_progress_bar()
{
close_waitscreen = 0;
@ -29,15 +32,19 @@
</tr>
<tr>
<td class="row1"><b class="genmed">{L_FILE_COMMENT}</b></td>
<td class="row2"><table border="0" cellspacing="0" cellpadding="2">
<td class="row2">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td><textarea class="post" name="filecomment" rows="3" cols="35" size="40">{FILE_COMMENT}</textarea>&nbsp;</td>
<td valign="top"><table border="0" cellspacing="4" cellpadding="0">
<td valign="top">
<table border="0" cellspacing="4" cellpadding="0">
<tr>
<td><input class="btnlite" type="submit" style="width:150px" name="add_file" value="{L_ADD_FILE}" onclick="javascript:popup_progress_bar();" /></td>
</tr></table>
</tr>
</table>
</td>
</tr></table>
</tr>
</table>
</td>
</tr>
@ -53,18 +60,22 @@
</tr>
<tr>
<td class="row1"><b class="genmed">{L_FILE_COMMENT}</b></td>
<td class="row2"><table border="0" cellspacing="0" cellpadding="2">
<td class="row2">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td><textarea class="post" name="comment_list[{attach_row.ASSOC_INDEX}]" rows="3" cols="35" wrap="virtual" size=40>{attach_row.FILE_COMMENT}</textarea>&nbsp;</td>
<td valign="top"><table border="0" cellspacing="4" cellpadding="0">
<td valign="top">
<table border="0" cellspacing="4" cellpadding="0">
<tr>
<td><input class="btnlite" type="submit" style="width:150px" name="edit_comment[{attach_row.ASSOC_INDEX}]" value="{L_UPDATE_COMMENT}" /></td>
</tr>
<tr>
<td><input class="btnlite" type="submit" style="width:150px" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" /></td>
</tr></table>
</tr>
</table>
</td>
</tr></table>
</tr>
</table>
</td>
</tr>
{attach_row.S_HIDDEN}

View file

@ -32,10 +32,13 @@ e_help = "{LA_BBCODE_E_HELP}";
function checkForm()
{
if (document.post.message.value.length < 2) {
if (document.post.message.value.length < 2)
{
alert('{LA_EMPTY_MESSAGE}');
return false;
} else {
}
else
{
// document.post.post.disabled = true;
return true;
}
@ -165,11 +168,13 @@ function checkForm()
<!-- IF S_SHOW_TOPIC_ICONS -->
<tr>
<td class="row1"><b class="genmed">{L_ICON}:</b></td>
<td class="row2"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<td class="row2">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><input type="radio" class="radio" name="icon" value="0"{S_NO_ICON_CHECKED} /><span class="genmed">{L_NONE}</span> <!-- BEGIN topic_icon --><input type="radio" class="radio" name="icon" value="{topic_icon.ICON_ID}"{topic_icon.S_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" hspace="2" vspace="2" /> <!-- END topic_icon --></td>
</tr>
</table></td>
</table>
</td>
</tr>
<!-- ENDIF -->
@ -226,10 +231,14 @@ function checkForm()
</tr>
<!-- ENDIF -->
</table></td>
<td class="row2" valign="top"><table width="100%" cellspacing="0" cellpadding="0" border="0">
</table>
</td>
<td class="row2" valign="top">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr valign="middle" align="left">
<td colspan="2"><input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" />
<td colspan="2">
<input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" />
<input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" />
<input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" />
<!-- IF S_BBCODE_QUOTE --><input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" /><!-- ENDIF -->
@ -255,6 +264,7 @@ function checkForm()
<input type="button" class="btnbbcode" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" />
<!-- END custom_tags -->
</td>
</tr>
<!-- ENDIF -->
<tr>
<td><input type="text" name="helpbox" style="width:100%" maxlength="100" class="helpline" value="{L_STYLES_TIP}" /></td>
@ -262,13 +272,16 @@ function checkForm()
</tr>
<tr>
<td valign="top" style="width: 100%;"><textarea name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" style="width: 98%;">{MESSAGE}</textarea></td>
<td width="80" align="center" valign="top"><script language="javascript" type="text/javascript"><!--
<td width="80" align="center" valign="top">
<script type="text/javascript">
<!--
colorPalette('v', 7, 6)
//--></script></td>
//-->
</script>
</td>
</tr>
</table></td>
</table>
</td>
</tr>
<!-- IF S_INLINE_ATTACHMENT_OPTIONS -->
@ -280,7 +293,8 @@ function checkForm()
<!-- ENDIF -->
<tr>
<td class="row1" valign="top"><b class="genmed">{L_OPTIONS}:</b><br /><table cellspacing="2" cellpadding="0" border="0">
<td class="row1" valign="top"><b class="genmed">{L_OPTIONS}:</b><br />
<table cellspacing="2" cellpadding="0" border="0">
<tr>
<td class="gensmall">{BBCODE_STATUS}</td>
</tr>
@ -293,8 +307,10 @@ function checkForm()
<tr>
<td class="gensmall">{SMILIES_STATUS}</td>
</tr>
</table></td>
<td class="row2"><table cellpadding="1">
</table>
</td>
<td class="row2">
<table cellpadding="1">
<!-- IF S_BBCODE_ALLOWED -->
<tr>
<td><input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /></td>
@ -350,7 +366,8 @@ function checkForm()
</tr>
<!-- ENDIF -->
<!-- ENDIF -->
</table></td>
</table>
</td>
</tr>
<!-- IF S_TOPIC_TYPE_ANNOUNCE or S_TOPIC_TYPE_STICKY -->

View file

@ -25,7 +25,9 @@
<tr>
<td class="row1"><b class="genmed">{L_POLL_VOTE_CHANGE}:</b><br /><span class="gensmall">{L_POLL_VOTE_CHANGE_EXPLAIN}</span></td>
<td class="row2"><input type="checkbox" class="radio" name="poll_vote_change"{VOTE_CHANGE_CHECKED} /></td>
</tr>
<!-- ENDIF -->
<!-- IF S_POLL_DELETE -->
<tr>
<td class="row1"><b class="genmed">{L_POLL_DELETE}</b></td>

View file

@ -39,7 +39,8 @@
</tr>
<!-- ENDIF -->
<tr>
<td class="row1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<td class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div class="postbody">{PREVIEW_MESSAGE}</div>
<!-- IF S_HAS_ATTACHMENTS -->
@ -58,7 +59,8 @@
<!-- ENDIF -->
<!-- IF PREVIEW_SIGNATURE --><span class="postbody"><br />_________________<br />{PREVIEW_SIGNATURE}</span><!-- ENDIF --></td>
</tr>
</table></td>
</table>
</td>
</tr>
<tr>
<td class="spacer"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>

View file

@ -1,5 +1,8 @@
<script language="javascript" type="text/javascript">
<!--
/**
* Close upload popup
*/
function close_popup()
{
if (opener != null)

View file

@ -1,3 +1,4 @@
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<th align="center">{L_POST_REVIEW}</th>
@ -9,18 +10,15 @@
<td class="spacer"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td class="row1"><table class="tablebg" width="100%" cellspacing="1">
<td class="row1">
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<th width="22%">{L_AUTHOR}</th>
<th>{L_MESSAGE}</th>
</tr>
<!-- BEGIN post_review_row -->
<!-- IF post_review_row.S_ROW_COUNT is even -->
<tr class="row1">
<!-- ELSE -->
<tr class="row2">
<!-- ENDIF -->
<!-- IF post_review_row.S_ROW_COUNT is even --> <tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td rowspan="2" align="left" valign="top"><a name="{post_review_row.U_POST_ID}"></a>
<table width="150" cellspacing="0" cellpadding="4" border="0">
@ -41,13 +39,10 @@
</td>
</tr>
<!-- IF post_review_row.S_ROW_COUNT is even -->
<tr class="row1">
<!-- ELSE -->
<tr class="row2">
<!-- ENDIF -->
<!-- IF post_review_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td valign="top"><table width="100%" cellspacing="0">
<td valign="top">
<table width="100%" cellspacing="0">
<tr>
<td valign="top">
<table width="100%" cellspacing="0" cellpadding="2">
@ -68,13 +63,15 @@
</table>
</td>
</tr>
</table></td>
</table>
</td>
</tr>
<tr>
<td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<!-- END post_review_row -->
</table></td>
</table>
</td>
</tr>
</table>

View file

@ -2,14 +2,20 @@
<script language="javascript" type="text/javascript">
<!--
/**
* Apply clicked smiley to message body
*/
function smiley(text) {
text = ' ' + text + ' ';
if (opener.document.forms['post'].message.createTextRange && opener.document.forms['post'].message.caretPos) {
if (opener.document.forms['post'].message.createTextRange && opener.document.forms['post'].message.caretPos)
{
var caretPos = opener.document.forms['post'].message.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
opener.document.forms['post'].message.focus();
} else {
}
else
{
opener.document.forms['post'].message.value += text;
opener.document.forms['post'].message.focus();
}
@ -19,14 +25,16 @@ function smiley(text) {
<table width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
<td><table class="tablebg" width="95%" cellspacing="1" cellpadding="4" border="0">
<td>
<table class="tablebg" width="95%" cellspacing="1" cellpadding="4" border="0">
<tr>
<th height="28">{L_SMILIES}</th>
</tr>
<tr>
<td class="row1" align="center" valign="middle"><!-- BEGIN smiley --> <a href="javascript:smiley('{smiley.A_SMILEY_CODE}')"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" border="0" alt="{smiley.SMILEY_DESC}" title="{smiley.SMILEY_DESC}" hspace="2" vspace="2" onclick="smiley('{smiley.A_SMILEY_CODE}');return false" /></a> <!-- END smiley --><br /><a class="nav" href="javascript:window.close();">{L_CLOSE_WINDOW}</a></td>
</tr>
</table></td>
</table>
</td>
</tr>
</table>

Some files were not shown because too many files have changed in this diff Show more