mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00:00
- clean up marklist calls (global function)
- added new feature: test out others permissions (admin permissions will not be copied) - changed attachment processing by directly using the template engine - fixed some attachment related bugs - additional tiny fixes git-svn-id: file:///svn/phpbb/trunk@5790 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
8c2f02ca00
commit
a0f8e1323a
49 changed files with 664 additions and 411 deletions
|
@ -61,39 +61,43 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<form id="stats" method="post" action="{U_ACTION}">
|
<!-- IF S_ACTION_OPTIONS -->
|
||||||
<fieldset class="quick">
|
<form id="stats" method="post" action="{U_ACTION}">
|
||||||
<select name="action">{S_ACTION_OPTIONS}</select>
|
<fieldset class="quick">
|
||||||
|
<select name="action">{S_ACTION_OPTIONS}</select>
|
||||||
|
|
||||||
<input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
|
<input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<h2>{L_ADMIN_LOG}</h2>
|
<!-- IF .log -->
|
||||||
|
<h2>{L_ADMIN_LOG}</h2>
|
||||||
|
|
||||||
<p>{L_ADMIN_LOG_INDEX_EXPLAIN}</p>
|
<p>{L_ADMIN_LOG_INDEX_EXPLAIN}</p>
|
||||||
|
|
||||||
<table cellspacing="1">
|
<table cellspacing="1">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{L_USERNAME}</th>
|
<th>{L_USERNAME}</th>
|
||||||
<th>{L_IP}</th>
|
<th>{L_IP}</th>
|
||||||
<th>{L_TIME}</th>
|
<th>{L_TIME}</th>
|
||||||
<th>{L_ACTION}</th>
|
<th>{L_ACTION}</th>
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<!-- BEGIN log -->
|
|
||||||
<!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
|
||||||
|
|
||||||
<td>{log.USERNAME}</td>
|
|
||||||
<td style="text-align: center;">{log.IP}</td>
|
|
||||||
<td style="text-align: center;">{log.DATE}</td>
|
|
||||||
<td>{log.ACTION}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END log -->
|
</thead>
|
||||||
</tbody>
|
<tbody>
|
||||||
</table>
|
<!-- BEGIN log -->
|
||||||
|
<!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||||
|
|
||||||
|
<td>{log.USERNAME}</td>
|
||||||
|
<td style="text-align: center;">{log.IP}</td>
|
||||||
|
<td style="text-align: center;">{log.DATE}</td>
|
||||||
|
<td>{log.ACTION}</td>
|
||||||
|
</tr>
|
||||||
|
<!-- END log -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF S_INACTIVE_USERS -->
|
<!-- IF S_INACTIVE_USERS -->
|
||||||
<h2>{L_INACTIVE_USERS}</h2>
|
<h2>{L_INACTIVE_USERS}</h2>
|
||||||
|
|
|
@ -84,6 +84,7 @@
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="user">{L_USERNAME}:</label><br /><span>{L_NAME_CHARS_EXPLAIN}</span></dt>
|
<dt><label for="user">{L_USERNAME}:</label><br /><span>{L_NAME_CHARS_EXPLAIN}</span></dt>
|
||||||
<dd><input type="text" id="user" name="user" value="{USER}" /></dd>
|
<dd><input type="text" id="user" name="user" value="{USER}" /></dd>
|
||||||
|
<!-- IF U_SWITCH_PERMISSIONS --><dd>[ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]</dd><!-- ENDIF -->
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label>{L_REGISTERED}:</label></dt>
|
<dt><label>{L_REGISTERED}:</label></dt>
|
||||||
|
|
|
@ -50,6 +50,11 @@ function dE(n, s, type)
|
||||||
function marklist(id, name, state)
|
function marklist(id, name, state)
|
||||||
{
|
{
|
||||||
var parent = document.getElementById(id);
|
var parent = document.getElementById(id);
|
||||||
|
if (!parent)
|
||||||
|
{
|
||||||
|
eval('parent = document.' + id);
|
||||||
|
}
|
||||||
|
|
||||||
if (!parent)
|
if (!parent)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -154,7 +154,7 @@ class acp_main
|
||||||
switch ($action)
|
switch ($action)
|
||||||
{
|
{
|
||||||
case 'online':
|
case 'online':
|
||||||
if (!$auth->acl_get('a_defaults'))
|
if (!$auth->acl_get('a_board'))
|
||||||
{
|
{
|
||||||
trigger_error($user->lang['NO_ADMIN']);
|
trigger_error($user->lang['NO_ADMIN']);
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ class acp_main
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'stats':
|
case 'stats':
|
||||||
if (!$auth->acl_get('a_defaults'))
|
if (!$auth->acl_get('a_board'))
|
||||||
{
|
{
|
||||||
trigger_error($user->lang['NO_ADMIN']);
|
trigger_error($user->lang['NO_ADMIN']);
|
||||||
}
|
}
|
||||||
|
@ -215,7 +215,7 @@ class acp_main
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'user':
|
case 'user':
|
||||||
if (!$auth->acl_get('a_defaults'))
|
if (!$auth->acl_get('a_board'))
|
||||||
{
|
{
|
||||||
trigger_error($user->lang['NO_ADMIN']);
|
trigger_error($user->lang['NO_ADMIN']);
|
||||||
}
|
}
|
||||||
|
@ -256,7 +256,7 @@ class acp_main
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'date':
|
case 'date':
|
||||||
if (!$auth->acl_get('a_defaults'))
|
if (!$auth->acl_get('a_board'))
|
||||||
{
|
{
|
||||||
trigger_error($user->lang['NO_ADMIN']);
|
trigger_error($user->lang['NO_ADMIN']);
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,7 @@ class acp_main
|
||||||
|
|
||||||
'U_ACTION' => "{$phpbb_admin_path}index.$phpEx$SID",
|
'U_ACTION' => "{$phpbb_admin_path}index.$phpEx$SID",
|
||||||
|
|
||||||
'S_ACTION_OPTIONS' => $s_action_options,
|
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? $s_action_options : '',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -735,6 +735,8 @@ class acp_users
|
||||||
'U_SHOW_IP' => $this->u_action . "&u=$user_id&ip=" . (($ip == 'ip') ? 'hostname' : 'ip'),
|
'U_SHOW_IP' => $this->u_action . "&u=$user_id&ip=" . (($ip == 'ip') ? 'hostname' : 'ip'),
|
||||||
'U_WHOIS' => $this->u_action . "&action=whois&user_ip={$user_row['user_ip']}",
|
'U_WHOIS' => $this->u_action . "&action=whois&user_ip={$user_row['user_ip']}",
|
||||||
|
|
||||||
|
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_row['user_id']) ? "{$phpbb_root_path}ucp.$phpEx$SID&mode=switch_perm&u={$user_row['user_id']}" : '',
|
||||||
|
|
||||||
'USER' => $user_row['username'],
|
'USER' => $user_row['username'],
|
||||||
'USER_REGISTERED' => $user->format_date($user_row['user_regdate']),
|
'USER_REGISTERED' => $user->format_date($user_row['user_regdate']),
|
||||||
'REGISTERED_IP' => ($ip == 'hostname') ? gethostbyaddr($user_row['user_ip']) : $user_row['user_ip'],
|
'REGISTERED_IP' => ($ip == 'hostname') ? gethostbyaddr($user_row['user_ip']) : $user_row['user_ip'],
|
||||||
|
|
|
@ -1101,6 +1101,59 @@ class auth_admin extends auth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use permissions from another user. This transferes a permission set from one user to another.
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function ghost_permissions($from_user_id, $to_user_id)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
if ($to_user_id == ANONYMOUS)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$hold_ary = $this->acl_raw_data($from_user_id, false, false);
|
||||||
|
|
||||||
|
if (isset($hold_ary[$from_user_id]))
|
||||||
|
{
|
||||||
|
$hold_ary = $hold_ary[$from_user_id];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Key 0 in $hold_ary are global options, all others are forum_ids
|
||||||
|
|
||||||
|
// We disallow copying admin permissions
|
||||||
|
foreach ($this->acl_options['global'] as $opt => $id)
|
||||||
|
{
|
||||||
|
if (strpos($opt, 'a_') === 0)
|
||||||
|
{
|
||||||
|
$hold_ary[0][$opt] = ACL_NO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Force a_switchperm to be allowed
|
||||||
|
$hold_ary[0]['a_switchperm'] = ACL_YES;
|
||||||
|
|
||||||
|
$user_permissions = $this->build_bitstring($hold_ary);
|
||||||
|
|
||||||
|
if (!$user_permissions)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||||
|
SET user_permissions = '" . $db->sql_escape($user_permissions) . "',
|
||||||
|
user_perm_from = $from_user_id
|
||||||
|
WHERE user_id = " . $to_user_id;
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -325,12 +325,34 @@ class auth
|
||||||
{
|
{
|
||||||
if (strpos($opt, 'a_') === 0)
|
if (strpos($opt, 'a_') === 0)
|
||||||
{
|
{
|
||||||
$hold_ary[0][$opt] = 1;
|
$hold_ary[0][$opt] = ACL_YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hold_str = $this->build_bitstring($hold_ary);
|
||||||
|
|
||||||
|
if ($hold_str)
|
||||||
|
{
|
||||||
|
$userdata['user_permissions'] = $hold_str;
|
||||||
|
|
||||||
|
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||||
|
SET user_permissions = '" . $db->sql_escape($userdata['user_permissions']) . "',
|
||||||
|
user_perm_from = 0
|
||||||
|
WHERE user_id = " . $userdata['user_id'];
|
||||||
|
$db->sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build bitstring from permission set
|
||||||
|
*/
|
||||||
|
function build_bitstring(&$hold_ary)
|
||||||
|
{
|
||||||
$hold_str = '';
|
$hold_str = '';
|
||||||
|
|
||||||
if (sizeof($hold_ary))
|
if (sizeof($hold_ary))
|
||||||
{
|
{
|
||||||
ksort($hold_ary);
|
ksort($hold_ary);
|
||||||
|
@ -379,16 +401,10 @@ class auth
|
||||||
}
|
}
|
||||||
unset($bitstring);
|
unset($bitstring);
|
||||||
|
|
||||||
$userdata['user_permissions'] = rtrim($hold_str);
|
$hold_str = rtrim($hold_str);
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
|
||||||
SET user_permissions = '" . $db->sql_escape($userdata['user_permissions']) . "'
|
|
||||||
WHERE user_id = " . $userdata['user_id'];
|
|
||||||
$db->sql_query($sql);
|
|
||||||
}
|
}
|
||||||
unset($hold_ary);
|
|
||||||
|
|
||||||
return;
|
return $hold_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -401,7 +417,8 @@ class auth
|
||||||
$where_sql = ($user_id !== false) ? ' WHERE user_id ' . ((is_array($user_id)) ? ' IN (' . implode(', ', array_map('intval', $user_id)) . ')' : " = $user_id") : '';
|
$where_sql = ($user_id !== false) ? ' WHERE user_id ' . ((is_array($user_id)) ? ' IN (' . implode(', ', array_map('intval', $user_id)) . ')' : " = $user_id") : '';
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||||
SET user_permissions = ''
|
SET user_permissions = '',
|
||||||
|
user_perm_from = 0
|
||||||
$where_sql";
|
$where_sql";
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
|
|
@ -147,23 +147,6 @@ function unique_id($extra = 0, $prefix = false)
|
||||||
return uniqid(($prefix === false) ? mt_rand() : $prefix, true);
|
return uniqid(($prefix === false) ? mt_rand() : $prefix, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get userdata
|
|
||||||
* @param mixed $user user id or username
|
|
||||||
*/
|
|
||||||
function get_userdata($user)
|
|
||||||
{
|
|
||||||
global $db;
|
|
||||||
|
|
||||||
$sql = 'SELECT *
|
|
||||||
FROM ' . USERS_TABLE . '
|
|
||||||
WHERE ';
|
|
||||||
$sql .= ((is_integer($user)) ? "user_id = $user" : "username = '" . $db->sql_escape($user) . "'") . " AND user_id <> " . ANONYMOUS;
|
|
||||||
$result = $db->sql_query($sql);
|
|
||||||
|
|
||||||
return ($row = $db->sql_fetchrow($result)) ? $row : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate sort selection fields
|
* Generate sort selection fields
|
||||||
*/
|
*/
|
||||||
|
@ -1654,10 +1637,11 @@ function decode_message(&$message, $bbcode_uid = '')
|
||||||
'#<!\-\- w \-\-><a href="http:\/\/(.*?)" target="_blank">.*?</a><!\-\- w \-\->#',
|
'#<!\-\- w \-\-><a href="http:\/\/(.*?)" target="_blank">.*?</a><!\-\- w \-\->#',
|
||||||
'#<!\-\- l \-\-><a href="(.*?)">.*?</a><!\-\- l \-\->#',
|
'#<!\-\- l \-\-><a href="(.*?)">.*?</a><!\-\- l \-\->#',
|
||||||
'#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
|
'#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
|
||||||
|
'#<!\-\- .*? \-\->#s',
|
||||||
'#<.*?>#s'
|
'#<.*?>#s'
|
||||||
);
|
);
|
||||||
|
|
||||||
$replace = array('\1', '\1', '\1', '\1', '\1', '<\1>');
|
$replace = array('\1', '\1', '\1', '\1', '\1', '', '<\1>');
|
||||||
|
|
||||||
$message = preg_replace($match, $replace, $message);
|
$message = preg_replace($match, $replace, $message);
|
||||||
|
|
||||||
|
@ -1863,7 +1847,7 @@ function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_
|
||||||
{
|
{
|
||||||
global $config, $user;
|
global $config, $user;
|
||||||
|
|
||||||
$attachments = display_attachments($forum_id, NULL, $attachments, $update_count, $preview, true);
|
$attachments = display_attachments($forum_id, NULL, $attachments, $update_count, false, true);
|
||||||
$tpl_size = sizeof($attachments);
|
$tpl_size = sizeof($attachments);
|
||||||
|
|
||||||
$unset_tpl = array();
|
$unset_tpl = array();
|
||||||
|
@ -2013,7 +1997,7 @@ function add_log()
|
||||||
$forum_id = ($mode == 'mod') ? intval(array_shift($args)) : '';
|
$forum_id = ($mode == 'mod') ? intval(array_shift($args)) : '';
|
||||||
$topic_id = ($mode == 'mod') ? intval(array_shift($args)) : '';
|
$topic_id = ($mode == 'mod') ? intval(array_shift($args)) : '';
|
||||||
$action = array_shift($args);
|
$action = array_shift($args);
|
||||||
$data = (!sizeof($args)) ? '' : $db->sql_escape(serialize($args));
|
$data = (!sizeof($args)) ? '' : serialize($args);
|
||||||
|
|
||||||
$sql_ary = array(
|
$sql_ary = array(
|
||||||
'user_id' => $user->data['user_id'],
|
'user_id' => $user->data['user_id'],
|
||||||
|
@ -2533,6 +2517,7 @@ function page_header($page_title = '')
|
||||||
'U_SEARCH_ACTIVE_TOPICS'=> "{$phpbb_root_path}search.$phpEx$SID&search_id=active_topics",
|
'U_SEARCH_ACTIVE_TOPICS'=> "{$phpbb_root_path}search.$phpEx$SID&search_id=active_topics",
|
||||||
'U_DELETE_COOKIES' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=delete_cookies",
|
'U_DELETE_COOKIES' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=delete_cookies",
|
||||||
'U_TEAM' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=leaders",
|
'U_TEAM' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=leaders",
|
||||||
|
'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? "{$phpbb_root_path}ucp.$phpEx$SID&mode=restore_perm" : '',
|
||||||
|
|
||||||
'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false,
|
'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false,
|
||||||
'S_REGISTERED_USER' => $user->data['is_registered'],
|
'S_REGISTERED_USER' => $user->data['is_registered'],
|
||||||
|
|
|
@ -584,7 +584,7 @@ function gen_forum_auth_level($mode, $forum_id, $forum_status)
|
||||||
($auth->acl_get('f_reply', $forum_id) && !$locked) ? $user->lang['RULES_REPLY_CAN'] : $user->lang['RULES_REPLY_CANNOT'],
|
($auth->acl_get('f_reply', $forum_id) && !$locked) ? $user->lang['RULES_REPLY_CAN'] : $user->lang['RULES_REPLY_CANNOT'],
|
||||||
($auth->acl_gets('f_edit', 'm_edit', $forum_id) && !$locked) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'],
|
($auth->acl_gets('f_edit', 'm_edit', $forum_id) && !$locked) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'],
|
||||||
($auth->acl_gets('f_delete', 'm_delete', $forum_id) && !$locked) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'],
|
($auth->acl_gets('f_delete', 'm_delete', $forum_id) && !$locked) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'],
|
||||||
($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach', $forum_id) && !$locked) ? $user->lang['RULES_ATTACH_CAN'] : $user->lang['RULES_ATTACH_CANNOT']
|
($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach') && !$locked) ? $user->lang['RULES_ATTACH_CAN'] : $user->lang['RULES_ATTACH_CANNOT']
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($rules as $rule)
|
foreach ($rules as $rule)
|
||||||
|
@ -670,41 +670,13 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold
|
||||||
function display_attachments($forum_id, $blockname, &$attachment_data, &$update_count, $force_physical = false, $return = false)
|
function display_attachments($forum_id, $blockname, &$attachment_data, &$update_count, $force_physical = false, $return = false)
|
||||||
{
|
{
|
||||||
global $template, $cache, $user;
|
global $template, $cache, $user;
|
||||||
global $attachment_tpl, $extensions, $config, $phpbb_root_path, $phpEx, $SID;
|
global $extensions, $config, $phpbb_root_path, $phpEx, $SID;
|
||||||
|
|
||||||
// $starttime = explode(' ', microtime());
|
|
||||||
// $starttime = $starttime[1] + $starttime[0];
|
|
||||||
$return_tpl = array();
|
$return_tpl = array();
|
||||||
|
|
||||||
$blocks = array(ATTACHMENT_CATEGORY_WM => 'WM_STREAM', ATTACHMENT_CATEGORY_RM => 'RM_STREAM', ATTACHMENT_CATEGORY_THUMB => 'THUMBNAIL', ATTACHMENT_CATEGORY_IMAGE => 'IMAGE');
|
$template->set_filenames(array(
|
||||||
|
'attachment_tpl' => 'attachment.html')
|
||||||
if (!isset($attachment_tpl))
|
);
|
||||||
{
|
|
||||||
if (!($attachment_tpl = $cache->get('attachment_tpl')))
|
|
||||||
{
|
|
||||||
$attachment_tpl = array();
|
|
||||||
|
|
||||||
$template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/attachment.html';
|
|
||||||
if (($attachment_template = file_get_contents($template_filename)) === false)
|
|
||||||
{
|
|
||||||
trigger_error('Could not load template file "' . $template_filename . '"');
|
|
||||||
}
|
|
||||||
|
|
||||||
// replace \ with \\ and then ' with \'.
|
|
||||||
$attachment_template = str_replace('\\', '\\\\', $attachment_template);
|
|
||||||
$attachment_template = str_replace("'", "\'", $attachment_template);
|
|
||||||
|
|
||||||
preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END (.*?) -->#s', $attachment_template, $tpl);
|
|
||||||
|
|
||||||
foreach ($tpl[1] as $num => $block_name)
|
|
||||||
{
|
|
||||||
$attachment_tpl[$block_name] = $tpl[2][$num];
|
|
||||||
}
|
|
||||||
unset($tpl);
|
|
||||||
|
|
||||||
$cache->put('attachment_tpl', $attachment_tpl);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($extensions) || !is_array($extensions))
|
if (empty($extensions) || !is_array($extensions))
|
||||||
{
|
{
|
||||||
|
@ -714,62 +686,55 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
|
||||||
|
|
||||||
foreach ($attachment_data as $attachment)
|
foreach ($attachment_data as $attachment)
|
||||||
{
|
{
|
||||||
|
// We need to reset/empty the _file block var, because this function might be called more than once
|
||||||
|
$template->reset_block_vars('_file');
|
||||||
|
|
||||||
|
$block_array = array();
|
||||||
|
|
||||||
// Some basics...
|
// Some basics...
|
||||||
$attachment['extension'] = strtolower(trim($attachment['extension']));
|
$attachment['extension'] = strtolower(trim($attachment['extension']));
|
||||||
$filename = $phpbb_root_path . $config['upload_path'] . '/' . basename($attachment['physical_filename']);
|
$filename = $phpbb_root_path . $config['upload_path'] . '/' . basename($attachment['physical_filename']);
|
||||||
$thumbnail_filename = $phpbb_root_path . $config['upload_path'] . '/thumb_' . basename($attachment['physical_filename']);
|
$thumbnail_filename = $phpbb_root_path . $config['upload_path'] . '/thumb_' . basename($attachment['physical_filename']);
|
||||||
|
|
||||||
$upload_image = '';
|
$upload_icon = '';
|
||||||
|
|
||||||
if ($user->img('icon_attach', '') && !$extensions[$attachment['extension']]['upload_icon'])
|
if ($user->img('icon_attach', '') && !$extensions[$attachment['extension']]['upload_icon'])
|
||||||
{
|
{
|
||||||
$upload_image = $user->img('icon_attach', '');
|
$upload_icon = $user->img('icon_attach', '');
|
||||||
}
|
}
|
||||||
else if ($extensions[$attachment['extension']]['upload_icon'])
|
else if ($extensions[$attachment['extension']]['upload_icon'])
|
||||||
{
|
{
|
||||||
$upload_image = '<img src="' . $phpbb_root_path . $config['upload_icons_path'] . '/' . trim($extensions[$attachment['extension']]['upload_icon']) . '" alt="" border="0" />';
|
$upload_icon = '<img src="' . $phpbb_root_path . $config['upload_icons_path'] . '/' . trim($extensions[$attachment['extension']]['upload_icon']) . '" alt="" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
$filesize = $attachment['filesize'];
|
$filesize = $attachment['filesize'];
|
||||||
$size_lang = ($filesize >= 1048576) ? $user->lang['MB'] : ( ($filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] );
|
$size_lang = ($filesize >= 1048576) ? $user->lang['MB'] : ( ($filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] );
|
||||||
|
|
||||||
$filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize);
|
$filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize);
|
||||||
|
|
||||||
$display_name = basename($attachment['real_filename']);
|
|
||||||
$comment = str_replace("\n", '<br />', censor_text($attachment['comment']));
|
$comment = str_replace("\n", '<br />', censor_text($attachment['comment']));
|
||||||
|
|
||||||
|
$block_array += array(
|
||||||
|
'UPLOAD_ICON' => $upload_icon,
|
||||||
|
'FILESIZE' => $filesize,
|
||||||
|
'SIZE_LANG' => $size_lang,
|
||||||
|
'DOWNLOAD_NAME' => basename($attachment['real_filename']),
|
||||||
|
'COMMENT' => $comment,
|
||||||
|
);
|
||||||
|
|
||||||
$denied = false;
|
$denied = false;
|
||||||
|
|
||||||
if (!extension_allowed($forum_id, $attachment['extension'], $extensions))
|
if (!extension_allowed($forum_id, $attachment['extension'], $extensions))
|
||||||
{
|
{
|
||||||
$denied = true;
|
$denied = true;
|
||||||
|
|
||||||
$template_array['VAR'] = array('{L_DENIED}');
|
$block_array += array(
|
||||||
$template_array['VAL'] = array(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']));
|
'S_DENIED' => true,
|
||||||
|
'DENIED_MESSAGE' => sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension'])
|
||||||
$tpl = str_replace($template_array['VAR'], $template_array['VAL'], $attachment_tpl['DENIED']);
|
);
|
||||||
|
|
||||||
// Replace {L_*} lang strings
|
|
||||||
$tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
|
|
||||||
|
|
||||||
if (!$return)
|
|
||||||
{
|
|
||||||
$template->assign_block_vars($blockname, array(
|
|
||||||
'DISPLAY_ATTACHMENT' => $tpl)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$return_tpl[] = $tpl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$denied)
|
if (!$denied)
|
||||||
{
|
{
|
||||||
$l_downloaded_viewed = '';
|
$l_downloaded_viewed = $download_link = '';
|
||||||
$download_link = '';
|
|
||||||
$additional_array['VAR'] = $additional_array['VAL'] = array();
|
|
||||||
|
|
||||||
$display_cat = $extensions[$attachment['extension']]['display_cat'];
|
$display_cat = $extensions[$attachment['extension']]['display_cat'];
|
||||||
|
|
||||||
if ($display_cat == ATTACHMENT_CATEGORY_IMAGE)
|
if ($display_cat == ATTACHMENT_CATEGORY_IMAGE)
|
||||||
|
@ -800,102 +765,108 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
|
||||||
{
|
{
|
||||||
// Images
|
// Images
|
||||||
case ATTACHMENT_CATEGORY_IMAGE:
|
case ATTACHMENT_CATEGORY_IMAGE:
|
||||||
$img_source = $filename;
|
|
||||||
$update_count[] = $attachment['attach_id'];
|
|
||||||
|
|
||||||
$l_downloaded_viewed = $user->lang['VIEWED'];
|
$l_downloaded_viewed = $user->lang['VIEWED'];
|
||||||
$download_link = $img_source;
|
$download_link = $filename;
|
||||||
break;
|
|
||||||
|
$block_array += array(
|
||||||
|
'S_IMAGE' => true,
|
||||||
|
);
|
||||||
|
|
||||||
|
$update_count[] = $attachment['attach_id'];
|
||||||
|
break;
|
||||||
|
|
||||||
// Images, but display Thumbnail
|
// Images, but display Thumbnail
|
||||||
case ATTACHMENT_CATEGORY_THUMB:
|
case ATTACHMENT_CATEGORY_THUMB:
|
||||||
$thumb_source = $thumbnail_filename;
|
|
||||||
|
|
||||||
$l_downloaded_viewed = $user->lang['VIEWED'];
|
$l_downloaded_viewed = $user->lang['VIEWED'];
|
||||||
$download_link = (!$force_physical) ? $phpbb_root_path . "download.$phpEx$SID&id=" . $attachment['attach_id'] : $filename;
|
$download_link = (!$force_physical && $attachment['attach_id']) ? $phpbb_root_path . "download.$phpEx$SID&id=" . $attachment['attach_id'] : $filename;
|
||||||
|
|
||||||
$additional_array['VAR'][] = '{THUMB_IMG}';
|
$block_array += array(
|
||||||
$additional_array['VAL'][] = $thumb_source;
|
'S_THUMBNAIL' => true,
|
||||||
break;
|
'THUMB_IMAGE' => $thumbnail_filename,
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
// Windows Media Streams
|
// Windows Media Streams
|
||||||
case ATTACHMENT_CATEGORY_WM:
|
case ATTACHMENT_CATEGORY_WM:
|
||||||
$l_downloaded_viewed = $user->lang['VIEWED'];
|
$l_downloaded_viewed = $user->lang['VIEWED'];
|
||||||
$download_link = $filename;
|
$download_link = $filename;
|
||||||
|
|
||||||
|
$block_array += array(
|
||||||
|
'S_WM_FILE' => true,
|
||||||
|
);
|
||||||
|
|
||||||
// Viewed/Heared File ... update the download count (download.php is not called here)
|
// Viewed/Heared File ... update the download count (download.php is not called here)
|
||||||
$update_count[] = $attachment['attach_id'];
|
$update_count[] = $attachment['attach_id'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Real Media Streams
|
// Real Media Streams
|
||||||
case ATTACHMENT_CATEGORY_RM:
|
case ATTACHMENT_CATEGORY_RM:
|
||||||
$l_downloaded_viewed = $user->lang['VIEWED'];
|
$l_downloaded_viewed = $user->lang['VIEWED'];
|
||||||
$download_link = $filename;
|
$download_link = $filename;
|
||||||
|
|
||||||
$additional_array['VAR'][] = '{U_FORUM}';
|
$block_array += array(
|
||||||
$additional_array['VAL'][] = generate_board_url();
|
'S_RM_FILE' => true,
|
||||||
$additional_array['VAR'][] = '{ATTACH_ID}';
|
'U_FORUM' => generate_board_url(),
|
||||||
$additional_array['VAL'][] = $attachment['attach_id'];
|
'ATTACH_ID' => $attachment['attach_id'],
|
||||||
|
);
|
||||||
|
|
||||||
// Viewed/Heared File ... update the download count (download.php is not called here)
|
// Viewed/Heared File ... update the download count (download.php is not called here)
|
||||||
$update_count[] = $attachment['attach_id'];
|
$update_count[] = $attachment['attach_id'];
|
||||||
break;
|
break;
|
||||||
/*
|
|
||||||
// Macromedia Flash Files
|
/* // Macromedia Flash Files
|
||||||
case SWF_CAT:
|
case SWF_CAT:
|
||||||
list($width, $height) = swf_getdimension($filename);
|
list($width, $height) = swf_getdimension($filename);
|
||||||
|
|
||||||
$l_downloaded_viewed = $user->lang['VIEWED'];
|
$l_downloaded_viewed = $user->lang['VIEWED'];
|
||||||
$download_link = $filename;
|
$download_link = $filename;
|
||||||
|
|
||||||
$additional_array = array(
|
$block_array += array(
|
||||||
'WIDTH' => $width,
|
'S_SWF_FILE' => true,
|
||||||
'HEIGHT' => $height
|
'WIDTH' => $width,
|
||||||
|
'HEIGHT' => $height,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Viewed/Heared File ... update the download count (download.php is not called here)
|
// Viewed/Heared File ... update the download count (download.php is not called here)
|
||||||
$update_count[] = $attachment['attach_id'];
|
$update_count[] = $attachment['attach_id'];
|
||||||
break;
|
break;
|
||||||
*/
|
*/
|
||||||
default:
|
default:
|
||||||
$l_downloaded_viewed = $user->lang['DOWNLOADED'];
|
$l_downloaded_viewed = $user->lang['DOWNLOADED'];
|
||||||
$download_link = (!$force_physical) ? $phpbb_root_path . "download.$phpEx$SID&id=" . $attachment['attach_id'] : $filename;
|
$download_link = (!$force_physical && $attachment['attach_id']) ? $phpbb_root_path . "download.$phpEx$SID&id=" . $attachment['attach_id'] : $filename;
|
||||||
break;
|
|
||||||
|
$block_array += array(
|
||||||
|
'S_FILE' => true,
|
||||||
|
);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$l_download_count = (!isset($attachment['download_count']) || $attachment['download_count'] == 0) ? $user->lang['DOWNLOAD_NONE'] : (($attachment['download_count'] == 1) ? sprintf($user->lang['DOWNLOAD_COUNT'], $attachment['download_count']) : sprintf($user->lang['DOWNLOAD_COUNTS'], $attachment['download_count']));
|
$l_download_count = (!isset($attachment['download_count']) || $attachment['download_count'] == 0) ? $user->lang['DOWNLOAD_NONE'] : (($attachment['download_count'] == 1) ? sprintf($user->lang['DOWNLOAD_COUNT'], $attachment['download_count']) : sprintf($user->lang['DOWNLOAD_COUNTS'], $attachment['download_count']));
|
||||||
|
|
||||||
$current_block = ($display_cat) ? $blocks[$display_cat] : 'FILE';
|
$block_array += array(
|
||||||
|
'U_DOWNLOAD_LINK' => $download_link,
|
||||||
$template_array['VAR'] = array_merge($additional_array['VAR'], array(
|
'L_DOWNLOADED_VIEWED' => $l_downloaded_viewed,
|
||||||
'{DOWNLOAD_NAME}', '{FILESIZE}', '{SIZE_VAR}', '{COMMENT}', '{U_DOWNLOAD_LINK}', '{UPLOAD_IMG}', '{L_DOWNLOADED_VIEWED}', '{L_DOWNLOAD_COUNT}')
|
'L_DOWNLOAD_COUNT' => $l_download_count
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$template_array['VAL'] = array_merge($additional_array['VAL'], array(
|
$template->assign_block_vars('_file', $block_array);
|
||||||
$display_name, $filesize, $size_lang, $comment, $download_link, $upload_image, $l_downloaded_viewed, $l_download_count)
|
|
||||||
|
$tpl = $template->assign_display('attachment_tpl');
|
||||||
|
|
||||||
|
if (!$return)
|
||||||
|
{
|
||||||
|
$template->assign_block_vars($blockname, array(
|
||||||
|
'DISPLAY_ATTACHMENT' => $tpl)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
$tpl = str_replace($template_array['VAR'], $template_array['VAL'], $attachment_tpl[$current_block]);
|
else
|
||||||
|
{
|
||||||
// Replace {L_*} lang strings
|
$return_tpl[] = $tpl;
|
||||||
$tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
|
|
||||||
|
|
||||||
if (!$return)
|
|
||||||
{
|
|
||||||
$template->assign_block_vars($blockname, array(
|
|
||||||
'DISPLAY_ATTACHMENT' => $tpl)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$return_tpl[] = $tpl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $return_tpl;
|
return $return_tpl;
|
||||||
// $mtime = explode(' ', microtime());
|
|
||||||
// $totaltime = $mtime[0] + $mtime[1] - $starttime;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -40,6 +40,10 @@ class template_compile
|
||||||
{
|
{
|
||||||
var $template;
|
var $template;
|
||||||
|
|
||||||
|
// Various storage arrays
|
||||||
|
var $block_names = array();
|
||||||
|
var $block_else_level = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* constuctor
|
* constuctor
|
||||||
*/
|
*/
|
||||||
|
@ -120,57 +124,54 @@ class template_compile
|
||||||
switch ($blocks[1][$curr_tb])
|
switch ($blocks[1][$curr_tb])
|
||||||
{
|
{
|
||||||
case 'BEGIN':
|
case 'BEGIN':
|
||||||
$this->template->block_else_level[] = false;
|
$this->block_else_level[] = false;
|
||||||
$compile_blocks[] = '<?php ' . $this->compile_tag_block($blocks[2][$curr_tb]) . ' ?>';
|
$compile_blocks[] = '<?php ' . $this->compile_tag_block($blocks[2][$curr_tb]) . ' ?>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'BEGINELSE':
|
case 'BEGINELSE':
|
||||||
$this->template->block_else_level[sizeof($this->template->block_else_level) - 1] = true;
|
$this->block_else_level[sizeof($this->block_else_level) - 1] = true;
|
||||||
$compile_blocks[] = '<?php }} else { ?>';
|
$compile_blocks[] = '<?php }} else { ?>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'END':
|
case 'END':
|
||||||
array_pop($this->template->block_names);
|
array_pop($this->block_names);
|
||||||
$compile_blocks[] = '<?php ' . ((array_pop($this->template->block_else_level)) ? '}' : '}}') . ' ?>';
|
$compile_blocks[] = '<?php ' . ((array_pop($this->block_else_level)) ? '}' : '}}') . ' ?>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'IF':
|
case 'IF':
|
||||||
$compile_blocks[] = '<?php ' . $this->compile_tag_if($blocks[2][$curr_tb], false) . ' ?>';
|
$compile_blocks[] = '<?php ' . $this->compile_tag_if($blocks[2][$curr_tb], false) . ' ?>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'ELSE':
|
case 'ELSE':
|
||||||
$compile_blocks[] = '<?php } else { ?>';
|
$compile_blocks[] = '<?php } else { ?>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'ELSEIF':
|
case 'ELSEIF':
|
||||||
$compile_blocks[] = '<?php ' . $this->compile_tag_if($blocks[2][$curr_tb], true) . ' ?>';
|
$compile_blocks[] = '<?php ' . $this->compile_tag_if($blocks[2][$curr_tb], true) . ' ?>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'ENDIF':
|
case 'ENDIF':
|
||||||
$compile_blocks[] = '<?php } ?>';
|
$compile_blocks[] = '<?php } ?>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'DEFINE':
|
case 'DEFINE':
|
||||||
$compile_blocks[] = '<?php ' . $this->compile_tag_define($blocks[2][$curr_tb], true) . ' ?>';
|
$compile_blocks[] = '<?php ' . $this->compile_tag_define($blocks[2][$curr_tb], true) . ' ?>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'UNDEFINE':
|
case 'UNDEFINE':
|
||||||
$compile_blocks[] = '<?php ' . $this->compile_tag_define($blocks[2][$curr_tb], false) . ' ?>';
|
$compile_blocks[] = '<?php ' . $this->compile_tag_define($blocks[2][$curr_tb], false) . ' ?>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'INCLUDE':
|
case 'INCLUDE':
|
||||||
$temp = '';
|
$temp = array_shift($include_blocks);
|
||||||
list(, $temp) = each($include_blocks);
|
|
||||||
$compile_blocks[] = '<?php ' . $this->compile_tag_include($temp) . ' ?>';
|
$compile_blocks[] = '<?php ' . $this->compile_tag_include($temp) . ' ?>';
|
||||||
$this->template->_tpl_include($temp, false);
|
$this->template->_tpl_include($temp, false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'INCLUDEPHP':
|
case 'INCLUDEPHP':
|
||||||
if ($config['tpl_php'])
|
if ($config['tpl_php'])
|
||||||
{
|
{
|
||||||
$temp = '';
|
$compile_blocks[] = '<?php ' . $this->compile_tag_include_php(array_shift($includephp_blocks)) . ' ?>';
|
||||||
list(, $temp) = each($includephp_blocks);
|
|
||||||
$compile_blocks[] = '<?php ' . $this->compile_tag_include_php($temp) . ' ?>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -181,9 +182,7 @@ class template_compile
|
||||||
case 'PHP':
|
case 'PHP':
|
||||||
if ($config['tpl_php'])
|
if ($config['tpl_php'])
|
||||||
{
|
{
|
||||||
$temp = '';
|
$compile_blocks[] = '<?php ' . array_shift($php_blocks) . ' ?>';
|
||||||
list(, $temp) = each($php_blocks);
|
|
||||||
$compile_blocks[] = '<?php ' . $temp . ' ?>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -306,9 +305,9 @@ class template_compile
|
||||||
}
|
}
|
||||||
|
|
||||||
$tag_template_php = '';
|
$tag_template_php = '';
|
||||||
array_push($this->template->block_names, $tag_args);
|
array_push($this->block_names, $tag_args);
|
||||||
|
|
||||||
if (sizeof($this->template->block_names) < 2)
|
if (sizeof($this->block_names) < 2)
|
||||||
{
|
{
|
||||||
// Block is not nested.
|
// Block is not nested.
|
||||||
$tag_template_php = '$_' . $tag_args . "_count = (isset(\$this->_tpldata['$tag_args'])) ? sizeof(\$this->_tpldata['$tag_args']) : 0;";
|
$tag_template_php = '$_' . $tag_args . "_count = (isset(\$this->_tpldata['$tag_args'])) ? sizeof(\$this->_tpldata['$tag_args']) : 0;";
|
||||||
|
@ -321,11 +320,11 @@ class template_compile
|
||||||
if ($no_nesting !== false)
|
if ($no_nesting !== false)
|
||||||
{
|
{
|
||||||
// We need to implode $no_nesting times from the end...
|
// We need to implode $no_nesting times from the end...
|
||||||
$namespace = implode('.', array_slice($this->template->block_names, -$no_nesting));
|
$namespace = implode('.', array_slice($this->block_names, -$no_nesting));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$namespace = implode('.', $this->template->block_names);
|
$namespace = implode('.', $this->block_names);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a reference to the data array for this block that depends on the
|
// Get a reference to the data array for this block that depends on the
|
||||||
|
|
|
@ -164,6 +164,39 @@ class filespec
|
||||||
return array_pop($filename);
|
return array_pop($filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get mimetype
|
||||||
|
*/
|
||||||
|
function get_mimetype($filename)
|
||||||
|
{
|
||||||
|
if (function_exists('mime_content_type'))
|
||||||
|
{
|
||||||
|
$mimetype = mime_content_type($filename);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mimetype = 'application/octetstream';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Opera adds the name to the mime type
|
||||||
|
$mimetype = (strpos($mimetype, '; name') !== false) ? str_replace(strstr($mimetype, '; name'), '', $mimetype) : $mimetype;
|
||||||
|
|
||||||
|
if (!$mimetype)
|
||||||
|
{
|
||||||
|
$mimetype = 'application/octetstream';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $mimetype;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get filesize
|
||||||
|
*/
|
||||||
|
function get_filesize($filename)
|
||||||
|
{
|
||||||
|
return @filesize($filename);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Move file to destination folder
|
* Move file to destination folder
|
||||||
*
|
*
|
||||||
|
|
|
@ -306,7 +306,12 @@ function mcp_warn_user_view($id, $mode, $action)
|
||||||
|
|
||||||
$sql_where = ($user_id) ? "user_id = $user_id" : "username = '" . $db->sql_escape($username) . "'";
|
$sql_where = ($user_id) ? "user_id = $user_id" : "username = '" . $db->sql_escape($username) . "'";
|
||||||
|
|
||||||
$userrow = get_userdata($user_id);
|
$sql = 'SELECT *
|
||||||
|
FROM ' . USERS_TABLE . '
|
||||||
|
WHERE ' . $sql_where;
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$userrow = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$user_id = $userrow['user_id'];
|
$user_id = $userrow['user_id'];
|
||||||
|
|
||||||
|
|
|
@ -977,9 +977,9 @@ class parse_message extends bbcode_firstpass
|
||||||
$this->filename_data['filecomment'] = request_var('filecomment', '', true);
|
$this->filename_data['filecomment'] = request_var('filecomment', '', true);
|
||||||
$upload_file = (isset($_FILES[$form_name]) && $_FILES[$form_name]['name'] != 'none' && trim($_FILES[$form_name]['name'])) ? true : false;
|
$upload_file = (isset($_FILES[$form_name]) && $_FILES[$form_name]['name'] != 'none' && trim($_FILES[$form_name]['name'])) ? true : false;
|
||||||
|
|
||||||
$add_file = (isset($_POST['add_file']));
|
$add_file = (isset($_POST['add_file'])) ? true : false;
|
||||||
$delete_file = (isset($_POST['delete_file']));
|
$delete_file = (isset($_POST['delete_file'])) ? true : false;
|
||||||
$edit_comment = (isset($_POST['edit_comment']));
|
$edit_comment = (isset($_POST['edit_comment'])) ? true : false;
|
||||||
|
|
||||||
$cfg = array();
|
$cfg = array();
|
||||||
$cfg['max_attachments'] = ($is_message) ? $config['max_attachments_pm'] : $config['max_attachments'];
|
$cfg['max_attachments'] = ($is_message) ? $config['max_attachments_pm'] : $config['max_attachments'];
|
||||||
|
@ -1063,6 +1063,9 @@ class parse_message extends bbcode_firstpass
|
||||||
if ($edit_comment)
|
if ($edit_comment)
|
||||||
{
|
{
|
||||||
$actual_comment_list = request_var('comment_list', array(''), true);
|
$actual_comment_list = request_var('comment_list', array(''), true);
|
||||||
|
|
||||||
|
$edit_comment = key(request_var('edit_comment', array(0 => '')));
|
||||||
|
$this->attachment_data[$edit_comment]['comment'] = $actual_comment_list[$edit_comment];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($add_file || $preview) && $upload_file)
|
if (($add_file || $preview) && $upload_file)
|
||||||
|
@ -1105,26 +1108,102 @@ class parse_message extends bbcode_firstpass
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Attachment Data
|
/**
|
||||||
|
* Get Attachment Data
|
||||||
|
*/
|
||||||
function get_submitted_attachment_data()
|
function get_submitted_attachment_data()
|
||||||
{
|
{
|
||||||
|
global $user, $db, $phpbb_root_path, $phpEx, $config;
|
||||||
|
|
||||||
$this->filename_data['filecomment'] = request_var('filecomment', '', true);
|
$this->filename_data['filecomment'] = request_var('filecomment', '', true);
|
||||||
$this->attachment_data = (isset($_POST['attachment_data'])) ? $_POST['attachment_data'] : array();
|
$this->attachment_data = (isset($_POST['attachment_data'])) ? $_POST['attachment_data'] : array();
|
||||||
|
|
||||||
//
|
// Regenerate data array...
|
||||||
$data_prepare = array('physical_filename' => 's', 'real_filename' => 's', 'comment' => 's', 'extension' => 's', 'mimetype' => 's',
|
$attach_ids = $filenames = array();
|
||||||
'filesize' => 'i', 'filetime' => 'i', 'attach_id' => 'i', 'thumbnail' => 'i');
|
|
||||||
foreach ($this->attachment_data as $pos => $var_ary)
|
foreach ($this->attachment_data as $pos => $var_ary)
|
||||||
{
|
{
|
||||||
foreach ($data_prepare as $var => $type)
|
if ($var_ary['attach_id'])
|
||||||
{
|
{
|
||||||
if ($type == 's')
|
$attach_ids[(int) $this->attachment_data[$pos]['attach_id']] = $pos;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$filenames[$pos] = '';
|
||||||
|
set_var($filenames[$pos], $this->attachment_data[$pos]['physical_filename'], 'string');
|
||||||
|
$filenames[$pos] = basename($filenames[$pos]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->attachment_data = array();
|
||||||
|
|
||||||
|
// Regenerate already posted attachments...
|
||||||
|
if (sizeof($attach_ids))
|
||||||
|
{
|
||||||
|
// Get the data from the attachments
|
||||||
|
$sql = 'SELECT attach_id, physical_filename, real_filename, extension, mimetype, filesize, filetime, thumbnail
|
||||||
|
FROM ' . ATTACHMENTS_TABLE . '
|
||||||
|
WHERE attach_id IN (' . implode(', ', array_keys($attach_ids)) . ')
|
||||||
|
AND poster_id = ' . $user->data['user_id'];
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
if (isset($attach_ids[$row['attach_id']]))
|
||||||
{
|
{
|
||||||
$this->attachment_data[$pos][$var] = trim(htmlspecialchars(str_replace(array("\r\n", "\r", '\xFF'), array("\n", "\n", ' '), stripslashes($this->attachment_data[$pos][$var]))));
|
$pos = $attach_ids[$row['attach_id']];
|
||||||
|
$this->attachment_data[$pos] = $row;
|
||||||
|
set_var($this->attachment_data[$pos]['comment'], $_POST['attachment_data'][$pos]['comment'], 'string', true);
|
||||||
|
|
||||||
|
unset($attach_ids[$row['attach_id']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if (sizeof($attach_ids))
|
||||||
|
{
|
||||||
|
trigger_error('NO_ACCESS_ATTACHMENT');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Regenerate newly uploaded attachments
|
||||||
|
if (sizeof($filenames))
|
||||||
|
{
|
||||||
|
include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
|
||||||
|
|
||||||
|
$sql = 'SELECT attach_id
|
||||||
|
FROM ' . ATTACHMENTS_TABLE . "
|
||||||
|
WHERE LOWER(physical_filename) IN ('" . implode("', '", array_map('strtolower', $filenames)) . "')";
|
||||||
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
|
$row = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if ($row)
|
||||||
|
{
|
||||||
|
trigger_error('NO_ACCESS_ATTACHMENT');
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($filenames as $pos => $physical_filename)
|
||||||
|
{
|
||||||
|
$this->attachment_data[$pos] = array(
|
||||||
|
'physical_filename' => $physical_filename,
|
||||||
|
'extension' => strtolower(filespec::get_extension($phpbb_root_path . $config['upload_path'] . '/' . $physical_filename)),
|
||||||
|
'filesize' => filespec::get_filesize($phpbb_root_path . $config['upload_path'] . '/' . $physical_filename),
|
||||||
|
'attach_id' => 0,
|
||||||
|
'thumbnail' => (file_exists($phpbb_root_path . $config['upload_path'] . '/thumb_' . $physical_filename)) ? 1 : 0,
|
||||||
|
);
|
||||||
|
|
||||||
|
set_var($this->attachment_data[$pos]['comment'], $_POST['attachment_data'][$pos]['comment'], 'string', true);
|
||||||
|
set_var($this->attachment_data[$pos]['real_filename'], $_POST['attachment_data'][$pos]['real_filename'], 'string', true);
|
||||||
|
set_var($this->attachment_data[$pos]['filetime'], $_POST['attachment_data'][$pos]['filetime'], 'int');
|
||||||
|
|
||||||
|
if (strpos($_POST['attachment_data'][$pos]['mimetype'], 'image/') !== false)
|
||||||
|
{
|
||||||
|
set_var($this->attachment_data[$pos]['mimetype'], $_POST['attachment_data'][$pos]['mimetype'], 'string');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->attachment_data[$pos][$var] = (int) $this->attachment_data[$pos][$var];
|
$this->attachment_data[$pos]['mimetype'] = filespec::get_mimetype($phpbb_root_path . $config['upload_path'] . '/' . $physical_filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,21 +18,7 @@ if (!defined('IN_PHPBB'))
|
||||||
/**
|
/**
|
||||||
* @package phpBB3
|
* @package phpBB3
|
||||||
*
|
*
|
||||||
* Template class.
|
* Base Template class.
|
||||||
*
|
|
||||||
* psoTFX - Completion of file caching, decompilation routines and implementation of
|
|
||||||
* conditionals/keywords and associated changes
|
|
||||||
*
|
|
||||||
* The interface was inspired by PHPLib templates, and the template file (formats are
|
|
||||||
* quite similar)
|
|
||||||
*
|
|
||||||
* The keyword/conditional implementation is currently based on sections of code from
|
|
||||||
* the Smarty templating engine (c) 2001 ispi of Lincoln, Inc. which is released
|
|
||||||
* (on its own and in whole) under the LGPL. Section 3 of the LGPL states that any code
|
|
||||||
* derived from an LGPL application may be relicenced under the GPL, this applies
|
|
||||||
* to this source
|
|
||||||
*
|
|
||||||
* DEFINE directive inspired by a request by Cyberalien
|
|
||||||
*/
|
*/
|
||||||
class template
|
class template
|
||||||
{
|
{
|
||||||
|
@ -52,11 +38,6 @@ class template
|
||||||
// this will hash handle names to the compiled/uncompiled code for that handle.
|
// this will hash handle names to the compiled/uncompiled code for that handle.
|
||||||
var $compiled_code = array();
|
var $compiled_code = array();
|
||||||
|
|
||||||
// Various counters and storage arrays
|
|
||||||
var $block_names = array();
|
|
||||||
var $block_else_level = array();
|
|
||||||
var $block_nesting_level = 0;
|
|
||||||
|
|
||||||
var $static_lang;
|
var $static_lang;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -153,7 +134,7 @@ class template
|
||||||
* Display the handle and assign the output to a template variable
|
* Display the handle and assign the output to a template variable
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
function assign_display($handle, $template_var, $return_content = false, $include_once = true)
|
function assign_display($handle, $template_var = '', $return_content = true, $include_once = false)
|
||||||
{
|
{
|
||||||
ob_start();
|
ob_start();
|
||||||
$this->display($handle, $include_once);
|
$this->display($handle, $include_once);
|
||||||
|
@ -357,6 +338,36 @@ class template
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset/empty complete block
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
function reset_block_vars($blockname)
|
||||||
|
{
|
||||||
|
if (strpos($blockname, '.') !== false)
|
||||||
|
{
|
||||||
|
// Nested block.
|
||||||
|
$blocks = explode('.', $blockname);
|
||||||
|
$blockcount = sizeof($blocks) - 1;
|
||||||
|
|
||||||
|
$str = &$this->_tpldata;
|
||||||
|
for ($i = 0; $i < $blockcount; $i++)
|
||||||
|
{
|
||||||
|
$str = &$str[$blocks[$i]];
|
||||||
|
$str = &$str[sizeof($str) - 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($str[$blocks[$blockcount]]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Top-level block.
|
||||||
|
unset($this->_tpldata[$blockname]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change already assigned key variable pair (one-dimensional - single loop entry)
|
* Change already assigned key variable pair (one-dimensional - single loop entry)
|
||||||
*
|
*
|
||||||
|
|
|
@ -73,8 +73,8 @@ function compose_pm($id, $mode, $action)
|
||||||
{
|
{
|
||||||
trigger_error('NO_AUTH_SEND_MESSAGE');
|
trigger_error('NO_AUTH_SEND_MESSAGE');
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
break;
|
|
||||||
case 'reply':
|
case 'reply':
|
||||||
case 'quote':
|
case 'quote':
|
||||||
case 'forward':
|
case 'forward':
|
||||||
|
@ -112,7 +112,7 @@ function compose_pm($id, $mode, $action)
|
||||||
AND t.msg_id = p.msg_id
|
AND t.msg_id = p.msg_id
|
||||||
AND p.msg_id = $msg_id";
|
AND p.msg_id = $msg_id";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'edit':
|
case 'edit':
|
||||||
if (!$msg_id)
|
if (!$msg_id)
|
||||||
|
@ -127,7 +127,7 @@ function compose_pm($id, $mode, $action)
|
||||||
AND t.folder_id = ' . PRIVMSGS_OUTBOX . "
|
AND t.folder_id = ' . PRIVMSGS_OUTBOX . "
|
||||||
AND t.msg_id = $msg_id
|
AND t.msg_id = $msg_id
|
||||||
AND t.msg_id = p.msg_id";
|
AND t.msg_id = p.msg_id";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'delete':
|
case 'delete':
|
||||||
if (!$auth->acl_get('u_pm_delete'))
|
if (!$auth->acl_get('u_pm_delete'))
|
||||||
|
@ -144,11 +144,11 @@ function compose_pm($id, $mode, $action)
|
||||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||||
WHERE user_id = ' . $user->data['user_id'] . "
|
WHERE user_id = ' . $user->data['user_id'] . "
|
||||||
AND msg_id = $msg_id";
|
AND msg_id = $msg_id";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'smilies':
|
case 'smilies':
|
||||||
generate_smilies('window', 0);
|
generate_smilies('window', 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
trigger_error('NO_ACTION_MODE');
|
trigger_error('NO_ACTION_MODE');
|
||||||
|
@ -175,42 +175,46 @@ function compose_pm($id, $mode, $action)
|
||||||
|
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$msg_id = (int) $post['msg_id'];
|
$msg_id = (int) $post['msg_id'];
|
||||||
$enable_urls = $post['enable_magic_url'];
|
$folder_id = (isset($post['folder_id'])) ? $post['folder_id'] : 0;
|
||||||
$enable_sig = (isset($post['enable_sig'])) ? $post['enable_sig'] : 0;
|
$message_text = (isset($post['message_text'])) ? $post['message_text'] : '';
|
||||||
|
|
||||||
$message_attachment = (isset($post['message_attachement'])) ? $post['message_attachement'] : 0;
|
|
||||||
$message_text = $post['message_text'];
|
|
||||||
$message_subject = $post['message_subject'];
|
|
||||||
$quote_username = (isset($post['quote_username'])) ? $post['quote_username'] : '';
|
|
||||||
|
|
||||||
$message_time = $post['message_time'];
|
|
||||||
$icon_id = (isset($post['icon_id'])) ? $post['icon_id'] : 0;
|
|
||||||
$folder_id = (isset($post['folder_id'])) ? $post['folder_id'] : 0;
|
|
||||||
$bbcode_uid = $post['bbcode_uid'];
|
|
||||||
|
|
||||||
if (!$post['author_id'] && $msg_id)
|
if (!$post['author_id'] && $msg_id)
|
||||||
{
|
{
|
||||||
trigger_error('NO_AUTHOR');
|
trigger_error('NO_AUTHOR');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !sizeof($address_list) && !$refresh && !$submit && !$preview)
|
if ($action != 'delete')
|
||||||
{
|
{
|
||||||
$address_list = array('u' => array($post['author_id'] => 'to'));
|
$enable_urls = $post['enable_magic_url'];
|
||||||
}
|
$enable_sig = (isset($post['enable_sig'])) ? $post['enable_sig'] : 0;
|
||||||
else if ($action == 'edit' && !sizeof($address_list) && !$refresh && !$submit && !$preview)
|
|
||||||
{
|
|
||||||
// Rebuild TO and BCC Header
|
|
||||||
$address_list = rebuild_header(array('to' => $post['to_address'], 'bcc' => $post['bcc_address']));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'quotepost')
|
$message_attachment = (isset($post['message_attachement'])) ? $post['message_attachement'] : 0;
|
||||||
{
|
$message_subject = $post['message_subject'];
|
||||||
$check_value = 0;
|
$message_time = $post['message_time'];
|
||||||
}
|
$bbcode_uid = $post['bbcode_uid'];
|
||||||
else
|
|
||||||
{
|
$quote_username = (isset($post['quote_username'])) ? $post['quote_username'] : '';
|
||||||
$check_value = (($post['enable_bbcode']+1) << 8) + (($post['enable_smilies']+1) << 4) + (($enable_urls+1) << 2) + (($post['enable_sig']+1) << 1);
|
$icon_id = (isset($post['icon_id'])) ? $post['icon_id'] : 0;
|
||||||
|
|
||||||
|
if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !sizeof($address_list) && !$refresh && !$submit && !$preview)
|
||||||
|
{
|
||||||
|
$address_list = array('u' => array($post['author_id'] => 'to'));
|
||||||
|
}
|
||||||
|
else if ($action == 'edit' && !sizeof($address_list) && !$refresh && !$submit && !$preview)
|
||||||
|
{
|
||||||
|
// Rebuild TO and BCC Header
|
||||||
|
$address_list = rebuild_header(array('to' => $post['to_address'], 'bcc' => $post['bcc_address']));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'quotepost')
|
||||||
|
{
|
||||||
|
$check_value = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$check_value = (($post['enable_bbcode']+1) << 8) + (($post['enable_smilies']+1) << 4) + (($enable_urls+1) << 2) + (($post['enable_sig']+1) << 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -247,8 +251,6 @@ function compose_pm($id, $mode, $action)
|
||||||
$icon_id = 0;
|
$icon_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$message_parser = new parse_message();
|
$message_parser = new parse_message();
|
||||||
|
|
||||||
$message_parser->message = ($action == 'reply') ? '' : $message_text;
|
$message_parser->message = ($action == 'reply') ? '' : $message_text;
|
||||||
|
@ -547,7 +549,7 @@ function compose_pm($id, $mode, $action)
|
||||||
$extensions = $update_count = array();
|
$extensions = $update_count = array();
|
||||||
|
|
||||||
$template->assign_var('S_HAS_ATTACHMENTS', true);
|
$template->assign_var('S_HAS_ATTACHMENTS', true);
|
||||||
display_attachments(0, 'attachment', $message_parser->attachment_data, $update_count, true);
|
display_attachments(0, 'attachment', $message_parser->attachment_data, $update_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
$preview_subject = censor_text($subject);
|
$preview_subject = censor_text($subject);
|
||||||
|
|
|
@ -381,7 +381,12 @@ function get_user_informations($user_id, $user_row)
|
||||||
|
|
||||||
if (empty($user_row))
|
if (empty($user_row))
|
||||||
{
|
{
|
||||||
$user_row = get_userdata((int) $user_id);
|
$sql = 'SELECT *
|
||||||
|
FROM ' . USERS_TABLE . '
|
||||||
|
WHERE user_id = ' . (int) $user_id;
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$user_row = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grab ranks
|
// Grab ranks
|
||||||
|
|
|
@ -1318,6 +1318,7 @@ CREATE TABLE phpbb_users (
|
||||||
user_type INTEGER DEFAULT 0 NOT NULL,
|
user_type INTEGER DEFAULT 0 NOT NULL,
|
||||||
group_id INTEGER DEFAULT 3 NOT NULL,
|
group_id INTEGER DEFAULT 3 NOT NULL,
|
||||||
user_permissions BLOB SUB_TYPE TEXT,
|
user_permissions BLOB SUB_TYPE TEXT,
|
||||||
|
user_perm_from INTEGER DEFAULT 0 NOT NULL,
|
||||||
user_ip VARCHAR(40) NOT NULL,
|
user_ip VARCHAR(40) NOT NULL,
|
||||||
user_regdate INTEGER DEFAULT 0 NOT NULL,
|
user_regdate INTEGER DEFAULT 0 NOT NULL,
|
||||||
username VARCHAR(255) NOT NULL,
|
username VARCHAR(255) NOT NULL,
|
||||||
|
|
|
@ -1976,6 +1976,7 @@ CREATE TABLE [phpbb_users] (
|
||||||
[user_type] [int] NOT NULL ,
|
[user_type] [int] NOT NULL ,
|
||||||
[group_id] [int] NOT NULL ,
|
[group_id] [int] NOT NULL ,
|
||||||
[user_permissions] [text] ,
|
[user_permissions] [text] ,
|
||||||
|
[user_perm_from] [int] NOT NULL ,
|
||||||
[user_ip] [varchar] (40) NOT NULL ,
|
[user_ip] [varchar] (40) NOT NULL ,
|
||||||
[user_regdate] [int] NOT NULL ,
|
[user_regdate] [int] NOT NULL ,
|
||||||
[username] [varchar] (255) NOT NULL ,
|
[username] [varchar] (255) NOT NULL ,
|
||||||
|
@ -2052,6 +2053,7 @@ GO
|
||||||
ALTER TABLE [phpbb_users] WITH NOCHECK ADD
|
ALTER TABLE [phpbb_users] WITH NOCHECK ADD
|
||||||
CONSTRAINT [DF_users__user_type] DEFAULT (0) FOR [user_type],
|
CONSTRAINT [DF_users__user_type] DEFAULT (0) FOR [user_type],
|
||||||
CONSTRAINT [DF_users__group_id] DEFAULT (3) FOR [group_id],
|
CONSTRAINT [DF_users__group_id] DEFAULT (3) FOR [group_id],
|
||||||
|
CONSTRAINT [DF_users__user_perm_from] DEFAULT (0) FOR [user_perm_from],
|
||||||
CONSTRAINT [DF_users__user_regdate] DEFAULT (0) FOR [user_regdate],
|
CONSTRAINT [DF_users__user_regdate] DEFAULT (0) FOR [user_regdate],
|
||||||
CONSTRAINT [DF_users__user_passchg] DEFAULT (0) FOR [user_passchg],
|
CONSTRAINT [DF_users__user_passchg] DEFAULT (0) FOR [user_passchg],
|
||||||
CONSTRAINT [DF_users__user_email_hash] DEFAULT (0) FOR [user_email_hash],
|
CONSTRAINT [DF_users__user_email_hash] DEFAULT (0) FOR [user_email_hash],
|
||||||
|
|
|
@ -873,6 +873,7 @@ CREATE TABLE phpbb_users (
|
||||||
user_type tinyint(1) DEFAULT '0' NOT NULL,
|
user_type tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
group_id mediumint(8) DEFAULT '3' NOT NULL,
|
group_id mediumint(8) DEFAULT '3' NOT NULL,
|
||||||
user_permissions text,
|
user_permissions text,
|
||||||
|
user_perm_from mediumint(8) DEFAULT '0' NOT NULL,
|
||||||
user_ip varchar(40) DEFAULT '' NOT NULL,
|
user_ip varchar(40) DEFAULT '' NOT NULL,
|
||||||
user_regdate int(11) DEFAULT '0' NOT NULL,
|
user_regdate int(11) DEFAULT '0' NOT NULL,
|
||||||
username varchar(255) DEFAULT '' NOT NULL,
|
username varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
|
|
@ -1713,6 +1713,7 @@ CREATE TABLE phpbb_users (
|
||||||
user_type number(1) DEFAULT '0' NOT NULL,
|
user_type number(1) DEFAULT '0' NOT NULL,
|
||||||
group_id number(8) DEFAULT '3' NOT NULL,
|
group_id number(8) DEFAULT '3' NOT NULL,
|
||||||
user_permissions clob,
|
user_permissions clob,
|
||||||
|
user_perm_from number(8) DEFAULT '0' NOT NULL,
|
||||||
user_ip varchar2(40) DEFAULT '',
|
user_ip varchar2(40) DEFAULT '',
|
||||||
user_regdate number(11) DEFAULT '0' NOT NULL,
|
user_regdate number(11) DEFAULT '0' NOT NULL,
|
||||||
username varchar2(255) DEFAULT '',
|
username varchar2(255) DEFAULT '',
|
||||||
|
|
|
@ -1216,6 +1216,7 @@ CREATE TABLE phpbb_users (
|
||||||
user_type INT2 DEFAULT '0' NOT NULL,
|
user_type INT2 DEFAULT '0' NOT NULL,
|
||||||
group_id INT4 DEFAULT '3' NOT NULL,
|
group_id INT4 DEFAULT '3' NOT NULL,
|
||||||
user_permissions TEXT,
|
user_permissions TEXT,
|
||||||
|
user_perm_from INT4 DEFAULT '0' NOT NULL,
|
||||||
user_ip varchar(40) DEFAULT '' NOT NULL,
|
user_ip varchar(40) DEFAULT '' NOT NULL,
|
||||||
user_regdate INT4 DEFAULT '0' NOT NULL,
|
user_regdate INT4 DEFAULT '0' NOT NULL,
|
||||||
username varchar(255) DEFAULT '' NOT NULL,
|
username varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
|
|
@ -294,6 +294,7 @@ INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_roles', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_search', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_search', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_server', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_server', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_styles', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_styles', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_switchperm', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_uauth', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_uauth', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_user', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_user', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_userdel', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_userdel', 1);
|
||||||
|
@ -515,15 +516,15 @@ INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class,
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (77, 1, 'attachments', 'acp', 1, 56, 351, 352, 'ACP_EXTENSION_GROUPS', 'ext_groups', 'acl_a_attach');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (77, 1, 'attachments', 'acp', 1, 56, 351, 352, 'ACP_EXTENSION_GROUPS', 'ext_groups', 'acl_a_attach');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (78, 1, 'attachments', 'acp', 1, 56, 353, 354, 'ACP_MANAGE_EXTENSIONS', 'extensions', 'acl_a_attach');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (78, 1, 'attachments', 'acp', 1, 56, 353, 354, 'ACP_MANAGE_EXTENSIONS', 'extensions', 'acl_a_attach');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (80, 1, 'attachments', 'acp', 1, 56, 355, 356, 'ACP_ORPHAN_ATTACHMENTS', 'orphan', 'acl_a_attach');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (80, 1, 'attachments', 'acp', 1, 56, 355, 356, 'ACP_ORPHAN_ATTACHMENTS', 'orphan', 'acl_a_attach');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (81, 1, 'board', 'acp', 1, 42, 285, 286, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (81, 1, 'board', 'acp', 1, 42, 285, 286, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_board');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (82, 1, 'board', 'acp', 1, 43, 297, 298, 'ACP_AUTH_SETTINGS', 'auth', 'acl_a_server');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (82, 1, 'board', 'acp', 1, 43, 297, 298, 'ACP_AUTH_SETTINGS', 'auth', 'acl_a_server');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (83, 1, 'board', 'acp', 1, 43, 299, 300, 'ACP_EMAIL_SETTINGS', 'email', 'acl_a_server');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (83, 1, 'board', 'acp', 1, 43, 299, 300, 'ACP_EMAIL_SETTINGS', 'email', 'acl_a_server');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (84, 1, 'jabber', 'acp', 1, 43, 301, 302, 'ACP_JABBER_SETTINGS', 'settings', 'acl_a_jabber');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (84, 1, 'jabber', 'acp', 1, 43, 301, 302, 'ACP_JABBER_SETTINGS', 'settings', 'acl_a_jabber');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (85, 1, 'board', 'acp', 1, 44, 305, 306, 'ACP_COOKIE_SETTINGS', 'cookie', 'acl_a_cookies');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (85, 1, 'board', 'acp', 1, 44, 305, 306, 'ACP_COOKIE_SETTINGS', 'cookie', 'acl_a_server');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (86, 1, 'board', 'acp', 1, 44, 307, 308, 'ACP_SERVER_SETTINGS', 'server', 'acl_a_server');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (86, 1, 'board', 'acp', 1, 44, 307, 308, 'ACP_SERVER_SETTINGS', 'server', 'acl_a_server');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (87, 1, 'board', 'acp', 1, 44, 311, 312, 'ACP_LOAD_SETTINGS', 'load', 'acl_a_server');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (87, 1, 'board', 'acp', 1, 44, 311, 312, 'ACP_LOAD_SETTINGS', 'load', 'acl_a_server');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (92, 1, 'modules', 'acp', 1, 67, 511, 512, 'MCP', 'mcp', 'acl_a_modules');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (92, 1, 'modules', 'acp', 1, 67, 511, 512, 'MCP', 'mcp', 'acl_a_modules');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (93, 1, 'board', 'acp', 1, 75, 337, 338, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (93, 1, 'board', 'acp', 1, 75, 337, 338, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_board');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (94, 1, 'bbcodes', 'acp', 1, 75, 339, 340, 'ACP_BBCODES', 'bbcodes', 'acl_a_bbcode');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (94, 1, 'bbcodes', 'acp', 1, 75, 339, 340, 'ACP_BBCODES', 'bbcodes', 'acl_a_bbcode');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (95, 1, 'icons', 'acp', 1, 75, 341, 342, 'ACP_ICONS', 'icons', 'acl_a_icons');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (95, 1, 'icons', 'acp', 1, 75, 341, 342, 'ACP_ICONS', 'icons', 'acl_a_icons');
|
||||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (96, 1, 'icons', 'acp', 1, 75, 343, 344, 'ACP_SMILIES', 'smilies', 'acl_a_icons');
|
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (96, 1, 'icons', 'acp', 1, 75, 343, 344, 'ACP_SMILIES', 'smilies', 'acl_a_icons');
|
||||||
|
@ -657,7 +658,7 @@ INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_setting) S
|
||||||
|
|
||||||
# ADMINISTRATOR group - admin and forum rights
|
# ADMINISTRATOR group - admin and forum rights
|
||||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'u_%';
|
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'u_%';
|
||||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'a_%';
|
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'a_%' AND auth_option NOT IN ('a_switchperm');
|
||||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_poll', 'f_announce', 'f_sticky', 'f_attach');
|
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_poll', 'f_announce', 'f_sticky', 'f_attach');
|
||||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_poll', 'f_announce', 'f_sticky', 'f_attach');
|
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_poll', 'f_announce', 'f_sticky', 'f_attach');
|
||||||
|
|
||||||
|
|
|
@ -935,6 +935,7 @@ CREATE TABLE phpbb_users (
|
||||||
user_type tinyint(1) NOT NULL DEFAULT '0',
|
user_type tinyint(1) NOT NULL DEFAULT '0',
|
||||||
group_id mediumint(8) NOT NULL DEFAULT '3',
|
group_id mediumint(8) NOT NULL DEFAULT '3',
|
||||||
user_permissions text(65535),
|
user_permissions text(65535),
|
||||||
|
user_perm_from mediumint(8) NOT NULL DEFAULT '0',
|
||||||
user_ip varchar(40) NOT NULL DEFAULT '',
|
user_ip varchar(40) NOT NULL DEFAULT '',
|
||||||
user_regdate int(11) NOT NULL DEFAULT '0',
|
user_regdate int(11) NOT NULL DEFAULT '0',
|
||||||
username varchar(255) NOT NULL DEFAULT '',
|
username varchar(255) NOT NULL DEFAULT '',
|
||||||
|
|
|
@ -345,6 +345,8 @@ $lang = array_merge($lang, array(
|
||||||
'LOG_ACL_DEL_MOD_LOCAL_M_' => '<b>Removed Moderators</b> from %s<br />» %s',
|
'LOG_ACL_DEL_MOD_LOCAL_M_' => '<b>Removed Moderators</b> from %s<br />» %s',
|
||||||
'LOG_ACL_DEL_FORUM_LOCAL_F_' => '<b>Removed User/Group Forum Permissions</b> from %s<br />» %s',
|
'LOG_ACL_DEL_FORUM_LOCAL_F_' => '<b>Removed User/Group Forum Permissions</b> from %s<br />» %s',
|
||||||
|
|
||||||
|
'LOG_ACL_TRANSFER_PERMISSIONS' => '<b>Permissions transfered from</b><br />» %s',
|
||||||
|
'LOG_ACL_RESTORE_PERMISSIONS' => '<b>Own permissions restored after using permissions from</b><br />» %s',
|
||||||
|
|
||||||
'LOG_ATTACH_EXT_ADD' => '<b>Added or edited attachment extension</b><br />» %s',
|
'LOG_ATTACH_EXT_ADD' => '<b>Added or edited attachment extension</b><br />» %s',
|
||||||
'LOG_ATTACH_EXT_DEL' => '<b>Removed attachment extension</b><br />» %s',
|
'LOG_ATTACH_EXT_DEL' => '<b>Removed attachment extension</b><br />» %s',
|
||||||
|
|
|
@ -204,6 +204,7 @@ $lang = array_merge($lang, array(
|
||||||
'acl_a_authgroups' => array('lang' => 'Can alter permissions for groups', 'cat' => 'permissions'),
|
'acl_a_authgroups' => array('lang' => 'Can alter permissions for groups', 'cat' => 'permissions'),
|
||||||
'acl_a_authusers' => array('lang' => 'Can alter permissions for users', 'cat' => 'permissions'),
|
'acl_a_authusers' => array('lang' => 'Can alter permissions for users', 'cat' => 'permissions'),
|
||||||
'acl_a_roles' => array('lang' => 'Can manage roles', 'cat' => 'permissions'),
|
'acl_a_roles' => array('lang' => 'Can manage roles', 'cat' => 'permissions'),
|
||||||
|
'acl_a_switchperm' => array('lang' => 'Can use others permissions', 'cat' => 'permissions'),
|
||||||
|
|
||||||
'acl_a_styles' => array('lang' => 'Can manage styles', 'cat' => 'misc'),
|
'acl_a_styles' => array('lang' => 'Can manage styles', 'cat' => 'misc'),
|
||||||
'acl_a_viewlogs' => array('lang' => 'Can view logs', 'cat' => 'misc'),
|
'acl_a_viewlogs' => array('lang' => 'Can view logs', 'cat' => 'misc'),
|
||||||
|
|
|
@ -286,6 +286,7 @@ $lang = array_merge($lang, array(
|
||||||
'NOT_AUTHORIZED' => 'You are not authorized to access this area.',
|
'NOT_AUTHORIZED' => 'You are not authorized to access this area.',
|
||||||
'NOT_WATCHING_FORUM' => 'You are no longer subscribed to updates on this forum.',
|
'NOT_WATCHING_FORUM' => 'You are no longer subscribed to updates on this forum.',
|
||||||
'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.',
|
'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.',
|
||||||
|
'NO_ACCESS_ATTACHMENT' => 'You are not allowed to access this file.',
|
||||||
'NO_AUTH_ADMIN' => 'You do not have admin permissions and therefore not allowed to access the administration control panel.',
|
'NO_AUTH_ADMIN' => 'You do not have admin permissions and therefore not allowed to access the administration control panel.',
|
||||||
'NO_AUTH_ADMIN_USER_DIFFER' => 'You are not able to re-authenticate as a different user.',
|
'NO_AUTH_ADMIN_USER_DIFFER' => 'You are not able to re-authenticate as a different user.',
|
||||||
'NO_AUTH_OPERATION' => 'You do not have the neccessary permissions to complete this operation.',
|
'NO_AUTH_OPERATION' => 'You do not have the neccessary permissions to complete this operation.',
|
||||||
|
@ -482,6 +483,7 @@ $lang = array_merge($lang, array(
|
||||||
'USER_POST' => '%d Post',
|
'USER_POST' => '%d Post',
|
||||||
'USER_POSTS' => '%d Posts',
|
'USER_POSTS' => '%d Posts',
|
||||||
'USERS' => 'Users',
|
'USERS' => 'Users',
|
||||||
|
'USE_PERMISSIONS' => 'Test out users permissions',
|
||||||
|
|
||||||
'VIEWED' => 'Viewed',
|
'VIEWED' => 'Viewed',
|
||||||
'VIEWING_FAQ' => 'Viewing FAQ',
|
'VIEWING_FAQ' => 'Viewing FAQ',
|
||||||
|
|
|
@ -112,6 +112,7 @@ $lang = array_merge($lang, array(
|
||||||
'SORT_POST_COUNT' => 'Post count',
|
'SORT_POST_COUNT' => 'Post count',
|
||||||
|
|
||||||
'USERNAME_BEGINS_WITH' => 'Username begins with',
|
'USERNAME_BEGINS_WITH' => 'Username begins with',
|
||||||
|
'USER_ADMIN' => 'Administrate User',
|
||||||
'USER_FORUM' => 'User statistics',
|
'USER_FORUM' => 'User statistics',
|
||||||
'USER_ONLINE' => 'Online',
|
'USER_ONLINE' => 'Online',
|
||||||
'USER_PRESENCE' => 'Forum presence',
|
'USER_PRESENCE' => 'Forum presence',
|
||||||
|
|
|
@ -279,6 +279,8 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'PASSWORD_ACTIVATED' => 'Your new password has been activated',
|
'PASSWORD_ACTIVATED' => 'Your new password has been activated',
|
||||||
'PASSWORD_UPDATED' => 'Your password has been sent successfully to your original email address.',
|
'PASSWORD_UPDATED' => 'Your password has been sent successfully to your original email address.',
|
||||||
|
'PERMISSIONS_RESTORED' => 'Successfully restored original permissions.',
|
||||||
|
'PERMISSIONS_TRANSFERED' => 'Successfully transfered permissions from <b>%s</b>, you are now able to browse the forum with the users permissions.<br />Please note that admin permissions were not transfered. You are able to revert to your permission set at any time.',
|
||||||
'PM_DISABLED' => 'Private messaging has been disabled on this board',
|
'PM_DISABLED' => 'Private messaging has been disabled on this board',
|
||||||
'PM_FROM' => 'From',
|
'PM_FROM' => 'From',
|
||||||
'PM_ICON' => 'PM Icon',
|
'PM_ICON' => 'PM Icon',
|
||||||
|
|
|
@ -396,6 +396,9 @@ switch ($mode)
|
||||||
'S_CUSTOM_FIELDS' => (isset($profile_fields['row']) && sizeof($profile_fields['row'])) ? true : false,
|
'S_CUSTOM_FIELDS' => (isset($profile_fields['row']) && sizeof($profile_fields['row'])) ? true : false,
|
||||||
'S_SHOW_ACTIVITY' => ($config['load_user_activity']) ? true : false,
|
'S_SHOW_ACTIVITY' => ($config['load_user_activity']) ? true : false,
|
||||||
|
|
||||||
|
'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? "{$phpbb_root_path}adm/index.$phpEx?sid={$user->session_id}&i=users&mode=overview&u={$user_id}" : '',
|
||||||
|
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_id) ? "{$phpbb_root_path}ucp.$phpEx$SID&mode=switch_perm&u={$user_id}" : '',
|
||||||
|
|
||||||
'S_ZEBRA' => ($user->data['user_id'] != $user_id && $user->data['is_registered']) ? true : false,
|
'S_ZEBRA' => ($user->data['user_id'] != $user_id && $user->data['is_registered']) ? true : false,
|
||||||
'U_ADD_FRIEND' => "{$phpbb_root_path}ucp.$phpEx$SID&i=zebra&add=" . urlencode($member['username']),
|
'U_ADD_FRIEND' => "{$phpbb_root_path}ucp.$phpEx$SID&i=zebra&add=" . urlencode($member['username']),
|
||||||
'U_ADD_FOE' => "{$phpbb_root_path}ucp.$phpEx$SID&i=zebra&mode=foes&add=" . urlencode($member['username']))
|
'U_ADD_FOE' => "{$phpbb_root_path}ucp.$phpEx$SID&i=zebra&mode=foes&add=" . urlencode($member['username']))
|
||||||
|
|
|
@ -1,73 +1,84 @@
|
||||||
<!-- BEGIN DENIED -->
|
|
||||||
<span class="postbody">[{L_DENIED}]</span><br /><br />
|
|
||||||
<!-- END DENIED -->
|
|
||||||
|
|
||||||
<!-- BEGIN WM_STREAM -->
|
<!-- BEGIN _file -->
|
||||||
<span class="postbody">{COMMENT}</span><br />
|
|
||||||
<object id="wmp" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
|
|
||||||
<param name="FileName" value="{U_DOWNLOAD_LINK}">
|
|
||||||
<param name="ShowControls" value="1">
|
|
||||||
<param name="ShowDisplay" value="0">
|
|
||||||
<param name="ShowStatusBar" value="1">
|
|
||||||
<param name="AutoSize" value="1">
|
|
||||||
<param name="AutoStart" value="0">
|
|
||||||
<param name="Visible" value="1">
|
|
||||||
<param name="AnimationStart" value="0">
|
|
||||||
<param name="Loop" value="0">
|
|
||||||
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp" src="{U_DOWNLOAD_LINK}" name=MediaPlayer2 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 autostart=0 visible=1 animationatstart=0 loop=0></embed>
|
|
||||||
</object>
|
|
||||||
<br /><span class="gensmall">{DOWNLOAD_NAME} - {L_DOWNLOADED_VIEWED} {L_DOWNLOAD_COUNT}</span><br /><br />
|
|
||||||
<!-- END WM_STREAM -->
|
|
||||||
|
|
||||||
<!-- BEGIN RM_STREAM -->
|
<!-- IF _file.S_DENIED -->
|
||||||
<span class="postbody">{COMMENT}</span><br />
|
<span class="genmed">[{_file.DENIED_MESSAGE}]</span><br />
|
||||||
<object id=rmstream_{ATTACH_ID} classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="0" height="0">
|
<!-- ELSE -->
|
||||||
<param name="src" value="{U_FORUM}/{U_DOWNLOAD_LINK}">
|
|
||||||
<param name="autostart" value="false">
|
|
||||||
<param name="controls" value="ImageWindow">
|
|
||||||
<param name="console" value="{U_DOWNLOAD_LINK}">
|
|
||||||
<param name="prefetch" value="true">
|
|
||||||
<embed name=rmstream_{ATTACH_ID} type="audio/x-pn-realaudio-plugin" src="{U_FORUM}/{U_DOWNLOAD_LINK}" width="0" height="0" autostart="false" controls="ImageWindow" console="video" prefetch="true"></embed>
|
|
||||||
</object>
|
|
||||||
<br />
|
|
||||||
<object id=ctrls_{ATTACH_ID} classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="0" height="36">
|
|
||||||
<param name="controls" value="ControlPanel">
|
|
||||||
<param name="console" value="{U_DOWNLOAD_LINK}">
|
|
||||||
<embed name=ctrls_{ATTACH_ID} type="audio/x-pn-realaudio-plugin" width="0" height="36" controls="ControlPanel" console="video"></embed>
|
|
||||||
</object>
|
|
||||||
|
|
||||||
<script language="Javascript">
|
<!-- IF _file.COMMENT -->
|
||||||
<!--
|
<span class="gensmall"><b>{L_FILE_COMMENT}:</b> {_file.COMMENT}</span><br />
|
||||||
while (!document.rmstream_{ATTACH_ID}.GetClipWidth())
|
<!-- ENDIF -->
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
var width = document.rmstream_{ATTACH_ID}.GetClipWidth();
|
<!-- IF _file.S_THUMBNAIL -->
|
||||||
var height = document.rmstream_{ATTACH_ID}.GetClipHeight();
|
<a href="{_file.U_DOWNLOAD_LINK}" target="_blank"><img src="{_file.THUMB_IMAGE}" alt="{_file.DOWNLOAD_NAME}" /></a><br />
|
||||||
|
<span class="gensmall">{_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOADED_VIEWED} {_file.L_DOWNLOAD_COUNT} ]</span>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
document.rmstream_{ATTACH_ID}.width = width;
|
<!-- IF _file.S_IMAGE -->
|
||||||
document.rmstream_{ATTACH_ID}.height = height;
|
<img src="{_file.U_DOWNLOAD_LINK}" alt="{_file.DOWNLOAD_NAME}" /><br />
|
||||||
document.ctrls_{ATTACH_ID}.width = width;
|
<span class="gensmall">{_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOADED_VIEWED} {_file.L_DOWNLOAD_COUNT} ]</span>
|
||||||
//-->
|
<!-- ENDIF -->
|
||||||
</script>
|
|
||||||
<br /><span class="gensmall">{DOWNLOAD_NAME} - {L_DOWNLOADED_VIEWED} {L_DOWNLOAD_COUNT}</span><br /><br />
|
|
||||||
<!-- END RM_STREAM -->
|
|
||||||
|
|
||||||
<!-- BEGIN IMAGE -->
|
<!-- IF _file.S_FILE -->
|
||||||
<span class="postbody">{COMMENT}<br />
|
<span class="genmed">
|
||||||
<img src="{U_DOWNLOAD_LINK}" alt="{DOWNLOAD_NAME}" /></span>
|
<!-- IF _file.UPLOAD_IMAGE -->{_file.UPLOAD_IMAGE} <!-- ENDIF -->
|
||||||
<br /><span class="gensmall">{DOWNLOAD_NAME} - {L_DOWNLOADED_VIEWED} {L_DOWNLOAD_COUNT}</span><br /><br />
|
<a href="{_file.U_DOWNLOAD_LINK}">{_file.DOWNLOAD_NAME}</a> [{_file.FILESIZE} {_file.SIZE_LANG}]
|
||||||
<!-- END IMAGE -->
|
</span><br />
|
||||||
|
<span class="gensmall">{_file.L_DOWNLOADED_VIEWED} {_file.L_DOWNLOAD_COUNT}</span>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- BEGIN THUMBNAIL -->
|
<!-- IF _file.S_WM_FILE -->
|
||||||
<span class="gensmall"><b>{L_FILE_COMMENT}:</b> {COMMENT}</span><hr />
|
<object id="wmp" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
|
||||||
<a href="{U_DOWNLOAD_LINK}" target="_blank"><img src="{THUMB_IMG}" alt="{DOWNLOAD_NAME}" border="0" /></a><br clear="all" />
|
<param name="FileName" value="{_file.U_DOWNLOAD_LINK}">
|
||||||
<span class="gensmall">{DOWNLOAD_NAME} - {L_DOWNLOADED_VIEWED} {L_DOWNLOAD_COUNT}</span>
|
<param name="ShowControls" value="1">
|
||||||
<!-- END THUMBNAIL -->
|
<param name="ShowDisplay" value="0">
|
||||||
|
<param name="ShowStatusBar" value="1">
|
||||||
|
<param name="AutoSize" value="1">
|
||||||
|
<param name="AutoStart" value="0">
|
||||||
|
<param name="Visible" value="1">
|
||||||
|
<param name="AnimationStart" value="0">
|
||||||
|
<param name="Loop" value="0">
|
||||||
|
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp" src="{_file.U_DOWNLOAD_LINK}" name=MediaPlayer2 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 autostart=0 visible=1 animationatstart=0 loop=0></embed>
|
||||||
|
</object>
|
||||||
|
<br />
|
||||||
|
<span class="gensmall">{_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOADED_VIEWED} {_file.L_DOWNLOAD_COUNT} ]</span>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- BEGIN FILE -->
|
<!-- IF _file.S_RM_FILE -->
|
||||||
<span class="gensmall"><b>{L_FILE_COMMENT}:</b> {COMMENT}</span><hr />
|
<object id=rmstream_{_file.ATTACH_ID} classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="0" height="0">
|
||||||
<span class="postbody">{UPLOAD_IMG} <a href="{U_DOWNLOAD_LINK}" target="_blank">{DOWNLOAD_NAME}</a> - {FILESIZE} {SIZE_VAR}</span><br clear="all" />
|
<param name="src" value="{_file.U_FORUM}/{_file.U_DOWNLOAD_LINK}">
|
||||||
<span class="gensmall">{L_DOWNLOADED_VIEWED} {L_DOWNLOAD_COUNT}</span>
|
<param name="autostart" value="false">
|
||||||
<!-- END FILE -->
|
<param name="controls" value="ImageWindow">
|
||||||
|
<param name="console" value="{_file.U_DOWNLOAD_LINK}">
|
||||||
|
<param name="prefetch" value="true">
|
||||||
|
<embed name=rmstream_{_file.ATTACH_ID} type="audio/x-pn-realaudio-plugin" src="{_file.U_FORUM}/{_file.U_DOWNLOAD_LINK}" width="0" height="0" autostart="false" controls="ImageWindow" console="video" prefetch="true"></embed>
|
||||||
|
</object>
|
||||||
|
<br />
|
||||||
|
<object id=ctrls_{_file.ATTACH_ID} classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="0" height="36">
|
||||||
|
<param name="controls" value="ControlPanel">
|
||||||
|
<param name="console" value="{_file.U_DOWNLOAD_LINK}">
|
||||||
|
<embed name=ctrls_{_file.ATTACH_ID} type="audio/x-pn-realaudio-plugin" width="0" height="36" controls="ControlPanel" console="video"></embed>
|
||||||
|
</object>
|
||||||
|
|
||||||
|
<script language="Javascript">
|
||||||
|
<!--
|
||||||
|
while (!document.rmstream_{_file.ATTACH_ID}.GetClipWidth())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
var width = document.rmstream_{_file.ATTACH_ID}.GetClipWidth();
|
||||||
|
var height = document.rmstream_{_file.ATTACH_ID}.GetClipHeight();
|
||||||
|
|
||||||
|
document.rmstream_{_file.ATTACH_ID}.width = width;
|
||||||
|
document.rmstream_{_file.ATTACH_ID}.height = height;
|
||||||
|
document.ctrls_{_file.ATTACH_ID}.width = width;
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<br />
|
||||||
|
<span class="gensmall">{_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOADED_VIEWED} {_file.L_DOWNLOAD_COUNT} ]</span>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<!-- END _file -->
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<!-- IF U_VIEW_FORUM_LOGS --><a href="{U_VIEW_FORUM_LOGS}">{L_VIEW_FORUM_LOGS}</a><!-- ENDIF -->
|
<!-- IF U_VIEW_FORUM_LOGS --><a href="{U_VIEW_FORUM_LOGS}">{L_VIEW_FORUM_LOGS}</a><!-- ENDIF -->
|
||||||
|
|
||||||
<form method="post" name="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>
|
<tr>
|
||||||
<td class="cat" colspan="6" align="center"><span class="gensmall">{L_DISPLAY_TOPICS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" /></span></td>
|
<td class="cat" colspan="6" align="center"><span class="gensmall">{L_DISPLAY_TOPICS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" /></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right" valign="top" nowrap="nowrap"><b class="gensmall"><a href="javascript:marklist('mcp', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('mcp', false);">{L_UNMARK_ALL}</a></b></td>
|
<td align="right" valign="top" nowrap="nowrap"><b class="gensmall"><a href="javascript:marklist('mcp', 'topic_id_list', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('mcp', 'topic_id_list', false);">{L_UNMARK_ALL}</a></b></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,5 @@
|
||||||
<!-- INCLUDE overall_header.html -->
|
<!-- INCLUDE overall_header.html -->
|
||||||
|
|
||||||
<script language="javascript" type="text/javascript" defer="defer">
|
|
||||||
<!--
|
|
||||||
function marklist(form_name, status)
|
|
||||||
{
|
|
||||||
for (i = 0; i < document.forms[form_name].length; i++)
|
|
||||||
{
|
|
||||||
document.forms[form_name].elements[i].checked = status;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- IF TOPIC_TITLE or FORUM_NAME -->
|
<!-- IF TOPIC_TITLE or FORUM_NAME -->
|
||||||
<div id="pageheader">
|
<div id="pageheader">
|
||||||
<h2><!-- IF TOPIC_TITLE --><a class="titles" href="{U_VIEWTOPIC}">{TOPIC_TITLE}</a><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2>
|
<h2><!-- IF TOPIC_TITLE --><a class="titles" href="{U_VIEWTOPIC}">{TOPIC_TITLE}</a><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!-- INCLUDE mcp_header.html -->
|
<!-- INCLUDE mcp_header.html -->
|
||||||
|
|
||||||
<table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0"><form name="mcp" method="post" action="{S_MCP_ACTION}">
|
<table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0"><form name="mcp" id="mcp" method="post" action="{S_MCP_ACTION}">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="6" height="28" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
|
<th colspan="6" height="28" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right" valign="top" nowrap="nowrap"><b class="gensmall"><a href="javascript:marklist('mcp', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('mcp', false);">{L_UNMARK_ALL}</a></b></td>
|
<td align="right" valign="top" nowrap="nowrap"><b class="gensmall"><a href="javascript:marklist('mcp', '', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('mcp', '', false);">{L_UNMARK_ALL}</a></b></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!-- INCLUDE mcp_header.html -->
|
<!-- INCLUDE mcp_header.html -->
|
||||||
|
|
||||||
<table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0"><form name="mcp" method="post" action="{S_MCP_ACTION}">
|
<table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0"><form name="mcp" id="mcp" method="post" action="{S_MCP_ACTION}">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="5" height="28" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
|
<th colspan="5" height="28" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right" valign="top" nowrap="nowrap"><b class="gensmall"><a href="javascript:marklist('mcp', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('mcp', false);">{L_UNMARK_ALL}</a></b></td>
|
<td align="right" valign="top" nowrap="nowrap"><b class="gensmall"><a href="javascript:marklist('mcp', '', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('mcp', '', false);">{L_UNMARK_ALL}</a></b></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!-- INCLUDE mcp_header.html -->
|
<!-- INCLUDE mcp_header.html -->
|
||||||
|
|
||||||
<form name="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 -->
|
<!-- IF S_CAN_SPLIT -->
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="3" nowrap="nowrap">{L_SPLIT_TOPIC}</th>
|
<th colspan="3" nowrap="nowrap">{L_SPLIT_TOPIC}</th>
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
|
|
||||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right" valign="top" nowrap="nowrap"><b class="gensmall"><a href="javascript:marklist('mcp', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('mcp', false);">{L_UNMARK_ALL}</a></b></td>
|
<td align="right" valign="top" nowrap="nowrap"><b class="gensmall"><a href="javascript:marklist('mcp', '', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('mcp', '', false);">{L_UNMARK_ALL}</a></b></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
<table width="100%" cellspacing="0" cellpadding="0">
|
<table width="100%" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="pagination">{PAGE_NUMBER} [ {TOTAL_USERS} ]</td>
|
<td class="pagination">{PAGE_NUMBER} [ {TOTAL_USERS} ]</td>
|
||||||
<td align="right"><!-- IF S_SEARCH_USER --><b class="nav"><a href="javascript:marklist(true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist(false);">{L_UNMARK_ALL}</a></b><br /><!-- ENDIF --><span class="pagination"><!-- IF PAGINATION --><a href="javascript:jumpto();">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a> <!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE --> <a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --><!-- ENDIF --></span></td>
|
<td align="right"><!-- IF S_SEARCH_USER --><b class="nav"><a href="javascript:marklist('results', 'user', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('results', 'user', false);">{L_UNMARK_ALL}</a></b><br /><!-- ENDIF --><span class="pagination"><!-- IF PAGINATION --><a href="javascript:jumpto();">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a> <!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE --> <a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --><!-- ENDIF --></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -28,13 +28,6 @@ function insert_marked(users)
|
||||||
self.close();
|
self.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
function marklist(status)
|
|
||||||
{
|
|
||||||
for (i = 0; i < document.results.length; i++)
|
|
||||||
{
|
|
||||||
document.results.elements[i].checked = status;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<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>
|
<tr>
|
||||||
<td class="gen" align="center"><!-- IF USER_COLOR --><b style="color: #{USER_COLOR}"><!-- ELSE --><b><!-- ENDIF -->{USERNAME}</b></td>
|
<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>
|
</tr>
|
||||||
<!-- IF RANK -->
|
<!-- IF RANK -->
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -33,6 +33,11 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">{ONLINE_IMG}</td>
|
<td align="center">{ONLINE_IMG}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- IF U_SWITCH_PERMISSIONS -->
|
||||||
|
<tr>
|
||||||
|
<td class="genmed" align="center">[ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
<!-- IF S_USER_LOGGED_IN and S_ZEBRA -->
|
<!-- IF S_USER_LOGGED_IN and S_ZEBRA -->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="genmed" align="center">[ <a href="{U_ADD_FRIEND}">{L_ADD_FRIEND}</a> | <a href="{U_ADD_FOE}">{L_ADD_FOE}</a> ]</td>
|
<td class="genmed" align="center">[ <a href="{U_ADD_FRIEND}">{L_ADD_FRIEND}</a> | <a href="{U_ADD_FOE}">{L_ADD_FOE}</a> ]</td>
|
||||||
|
|
|
@ -49,6 +49,32 @@ function jumpto()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mark/unmark checkboxes
|
||||||
|
// id = ID of parent container, name = name prefix, state = state [true/false]
|
||||||
|
function marklist(id, name, state)
|
||||||
|
{
|
||||||
|
var parent = document.getElementById(id);
|
||||||
|
if (!parent)
|
||||||
|
{
|
||||||
|
eval('parent = document.' + id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!parent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var rb = parent.getElementsByTagName('input');
|
||||||
|
|
||||||
|
for (var r = 0; r < rb.length; r++)
|
||||||
|
{
|
||||||
|
if (rb[r].name.substr(0, name.length) == name)
|
||||||
|
{
|
||||||
|
rb[r].checked = state;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
@ -67,7 +93,14 @@ function jumpto()
|
||||||
|
|
||||||
<div id="menubar"><table width="100%" cellspacing="0">
|
<div id="menubar"><table width="100%" cellspacing="0">
|
||||||
<tr>
|
<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> <!-- IF S_USER_LOGGED_IN --><!-- IF S_DISPLAY_PM --> <a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{L_PRIVATE_MESSAGES}" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a><!-- ENDIF --><!-- ELSE --> <a href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" /> {L_REGISTER}</a><!-- ENDIF --></td>
|
<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>
|
||||||
|
<!-- IF U_RESTORE_PERMISSIONS --> <a href="{U_RESTORE_PERMISSIONS}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" /> Restore Permissions</a><!-- ENDIF -->
|
||||||
|
<!-- IF S_USER_LOGGED_IN -->
|
||||||
|
<!-- IF S_DISPLAY_PM --> <a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{L_PRIVATE_MESSAGES}" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a><!-- ENDIF -->
|
||||||
|
<!-- ELSE --> <a href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" /> {L_REGISTER}</a>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
</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 --> <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 --> <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 --> <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>
|
<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 --> <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 --> <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 --> <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>
|
</tr>
|
||||||
</table></div>
|
</table></div>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div style="float:right"><b class="gensmall"><a href="javascript:marklist('ucp', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('ucp', false);">{L_UNMARK_ALL}</a></b></div>
|
<div style="float:right"><b class="gensmall"><a href="javascript:marklist('ucp', 'attachment', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('ucp', 'attachment', false);">{L_UNMARK_ALL}</a></b></div>
|
||||||
|
|
||||||
<!-- ELSE -->
|
<!-- ELSE -->
|
||||||
|
|
||||||
|
|
|
@ -135,19 +135,6 @@
|
||||||
|
|
||||||
<!-- ELSEIF S_LIST -->
|
<!-- ELSEIF S_LIST -->
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
function marklist(match, status)
|
|
||||||
{
|
|
||||||
doc = document.forms[match];
|
|
||||||
for (i = 0; i < doc.length; i++)
|
|
||||||
{
|
|
||||||
doc.elements[i].checked = status;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<h1>{L_GROUP_MEMBERS}</h1>
|
<h1>{L_GROUP_MEMBERS}</h1>
|
||||||
|
|
||||||
<p>{L_GROUP_MEMBERS_EXPLAIN}</p>
|
<p>{L_GROUP_MEMBERS_EXPLAIN}</p>
|
||||||
|
@ -196,7 +183,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END member -->
|
<!-- END member -->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cat" colspan="5" align="center"><div style="float: right;"><span class="small"><a href="javascript:marklist('ucp', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('ucp', false);">{L_UNMARK_ALL}</a></span></div><div style="float: left"><select name="action"><option class="sep" value="">{L_SELECT_OPTION}</option>{S_ACTION_OPTIONS}</select> <input class="button2" type="submit" name="update" value="{L_SUBMIT}" /></div></td>
|
<td class="cat" colspan="5" align="center"><div style="float: right;"><span class="small"><a href="javascript:marklist('ucp', 'mark', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('ucp', 'mark', false);">{L_UNMARK_ALL}</a></span></div><div style="float: left"><select name="action"><option class="sep" value="">{L_SELECT_OPTION}</option>{S_ACTION_OPTIONS}</select> <input class="button2" type="submit" name="update" value="{L_SUBMIT}" /></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -156,4 +156,4 @@
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td><img src="images/spacer.gif" width="4" alt="" /></td>
|
<td><img src="images/spacer.gif" width="4" alt="" /></td>
|
||||||
<td width="80%" valign="top"><!-- IF not S_PRIVMSGS --><form name="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}><!-- ENDIF -->
|
<td width="80%" valign="top"><!-- IF not S_PRIVMSGS --><form name="ucp" id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}><!-- ENDIF -->
|
||||||
|
|
|
@ -53,6 +53,6 @@
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- IF not S_NO_DISPLAY_BOOKMARKS --><div class="gensmall" style="float: right; padding-top: 2px;"><b><a href="javascript:marklist('ucp', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('ucp', false);">{L_UNMARK_ALL}</a></b></div><!-- ENDIF -->
|
<!-- IF not S_NO_DISPLAY_BOOKMARKS --><div class="gensmall" style="float: right; padding-top: 2px;"><b><a href="javascript:marklist('ucp', 't', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('ucp', 't', false);">{L_UNMARK_ALL}</a></b></div><!-- ENDIF -->
|
||||||
|
|
||||||
<!-- INCLUDE ucp_footer.html -->
|
<!-- INCLUDE ucp_footer.html -->
|
|
@ -81,6 +81,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="gensmall" style="float: right; padding-top: 2px;"><b><a href="javascript:marklist('ucp', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('ucp', false);">{L_UNMARK_ALL}</a></b></div>
|
<div class="gensmall" style="float: right; padding-top: 2px;"><b><a href="javascript:marklist('ucp', 't', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('ucp', 't', false);">{L_UNMARK_ALL}</a></b></div>
|
||||||
|
|
||||||
<!-- INCLUDE ucp_footer.html -->
|
<!-- INCLUDE ucp_footer.html -->
|
|
@ -37,5 +37,5 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- IF not S_VIEW_MESSAGE -->
|
<!-- IF not S_VIEW_MESSAGE -->
|
||||||
<div style="float:right"><b class="gensmall"><a href="javascript:marklist('viewfolder', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('viewfolder', false);">{L_UNMARK_ALL}</a></b></div>
|
<div style="float:right"><b class="gensmall"><a href="javascript:marklist('viewfolder', 'marked_msg_id', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('viewfolder', 'marked_msg_id', false);">{L_UNMARK_ALL}</a></b></div>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
|
|
||||||
<script language="javascript" type="text/javascript">
|
|
||||||
<!--
|
|
||||||
function marklist(form_name, status)
|
|
||||||
{
|
|
||||||
for (i = 0; i < document.forms[form_name].length; i++)
|
|
||||||
{
|
|
||||||
document.forms[form_name].elements[i].checked = status;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
|
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1">
|
<td class="row1">
|
||||||
|
|
|
@ -26,14 +26,6 @@ s_help = "{L_BBCODE_S_HELP}";
|
||||||
f_help = "{L_BBCODE_F_HELP}";
|
f_help = "{L_BBCODE_F_HELP}";
|
||||||
e_help = "{L_BBCODE_E_HELP}";
|
e_help = "{L_BBCODE_E_HELP}";
|
||||||
|
|
||||||
function marklist(form_name, status)
|
|
||||||
{
|
|
||||||
for (i = 0; i < document.forms[form_name].length; i++)
|
|
||||||
{
|
|
||||||
document.forms[form_name].elements[i].checked = status;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
<script language="javascript" type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
|
<script language="javascript" type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
|
||||||
|
|
|
@ -206,7 +206,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<!-- BEGIN attachment -->
|
<!-- BEGIN attachment -->
|
||||||
<tr>
|
<tr>
|
||||||
<!-- IF postrow.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{postrow.attachment.DISPLAY_ATTACHMENT}</td>
|
<!-- IF postrow.attachment.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{postrow.attachment.DISPLAY_ATTACHMENT}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END attachment -->
|
<!-- END attachment -->
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -39,8 +39,8 @@ switch ($mode)
|
||||||
case 'activate':
|
case 'activate':
|
||||||
$module->load('ucp', 'activate');
|
$module->load('ucp', 'activate');
|
||||||
$module->display($user->lang['UCP_ACTIVATE']);
|
$module->display($user->lang['UCP_ACTIVATE']);
|
||||||
redirect("index.$phpEx$SID");
|
|
||||||
|
|
||||||
|
redirect("index.$phpEx$SID");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'resend_act':
|
case 'resend_act':
|
||||||
|
@ -64,7 +64,6 @@ switch ($mode)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'confirm':
|
case 'confirm':
|
||||||
|
|
||||||
$module->load('ucp', 'confirm');
|
$module->load('ucp', 'confirm');
|
||||||
exit;
|
exit;
|
||||||
break;
|
break;
|
||||||
|
@ -161,6 +160,72 @@ switch ($mode)
|
||||||
redirect("index.$phpEx$SID");
|
redirect("index.$phpEx$SID");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'switch_perm':
|
||||||
|
|
||||||
|
$user_id = request_var('u', 0);
|
||||||
|
|
||||||
|
$sql = 'SELECT *
|
||||||
|
FROM ' . USERS_TABLE . '
|
||||||
|
WHERE user_id = ' . (int) $user_id;
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$user_row = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if (!$auth->acl_get('a_switchperm') || !$user_row || $user_id == $user->data['user_id'])
|
||||||
|
{
|
||||||
|
redirect("index.$phpEx$SID");
|
||||||
|
}
|
||||||
|
|
||||||
|
include($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
|
||||||
|
|
||||||
|
$auth_admin = new auth_admin();
|
||||||
|
if (!$auth_admin->ghost_permissions($user_id, $user->data['user_id']))
|
||||||
|
{
|
||||||
|
redirect("index.$phpEx$SID");
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'SELECT username
|
||||||
|
FROM ' . USERS_TABLE . '
|
||||||
|
WHERE user_id = ' . $user_id;
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$username = $db->sql_fetchfield('username');
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
add_log('admin', 'LOG_ACL_TRANSFER_PERMISSIONS', $username);
|
||||||
|
|
||||||
|
$message = sprintf($user->lang['PERMISSIONS_TRANSFERED'], $user_row['username']) . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], "<a href=\"{$phpbb_root_path}index.$phpEx$SID\">", '</a>');
|
||||||
|
trigger_error($message);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'restore_perm':
|
||||||
|
|
||||||
|
if (!$user->data['user_perm_from'] || !$auth->acl_get('a_switchperm'))
|
||||||
|
{
|
||||||
|
redirect("index.$phpEx$SID");
|
||||||
|
}
|
||||||
|
|
||||||
|
$auth->acl_cache($user->data);
|
||||||
|
|
||||||
|
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||||
|
SET user_perm_from = 0
|
||||||
|
WHERE user_id = " . $user->data['user_id'];
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
$sql = 'SELECT username
|
||||||
|
FROM ' . USERS_TABLE . '
|
||||||
|
WHERE user_id = ' . $user->data['user_perm_from'];
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$username = $db->sql_fetchfield('username');
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
add_log('admin', 'LOG_ACL_RESTORE_PERMISSIONS', $username);
|
||||||
|
|
||||||
|
$message = $user->lang['PERMISSIONS_RESTORED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], "<a href=\"{$phpbb_root_path}index.$phpEx$SID\">", '</a>');
|
||||||
|
trigger_error($message);
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only registered users can go beyond this point
|
// Only registered users can go beyond this point
|
||||||
|
|
Loading…
Add table
Reference in a new issue