aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r--phpBB/includes/ucp/ucp_activate.php14
-rw-r--r--phpBB/includes/ucp/ucp_attachments.php34
-rw-r--r--phpBB/includes/ucp/ucp_confirm.php20
-rw-r--r--phpBB/includes/ucp/ucp_groups.php46
-rw-r--r--phpBB/includes/ucp/ucp_main.php42
-rw-r--r--phpBB/includes/ucp/ucp_pm.php12
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php8
-rw-r--r--phpBB/includes/ucp/ucp_pm_options.php42
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php16
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php14
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php14
-rw-r--r--phpBB/includes/ucp/ucp_profile.php12
-rw-r--r--phpBB/includes/ucp/ucp_register.php8
-rw-r--r--phpBB/includes/ucp/ucp_remind.php14
-rw-r--r--phpBB/includes/ucp/ucp_resend.php14
-rw-r--r--phpBB/includes/ucp/ucp_zebra.php34
16 files changed, 237 insertions, 107 deletions
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php
index 6b17b28ba0..134729ffe9 100644
--- a/phpBB/includes/ucp/ucp_activate.php
+++ b/phpBB/includes/ucp/ucp_activate.php
@@ -1,14 +1,22 @@
<?php
-/**
+/**
*
* @package ucp
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* ucp_activate
* User activation
* @package ucp
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php
index fba366fd65..2732879913 100644
--- a/phpBB/includes/ucp/ucp_attachments.php
+++ b/phpBB/includes/ucp/ucp_attachments.php
@@ -1,14 +1,22 @@
<?php
-/**
+/**
*
* @package ucp
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* ucp_attachments
* User attachments
* @package ucp
@@ -113,7 +121,7 @@ class ucp_attachments
$db->sql_freeresult($result);
$sql = 'SELECT a.*, t.topic_title, p.message_subject as message_title
- FROM ' . ATTACHMENTS_TABLE . ' a
+ FROM ' . ATTACHMENTS_TABLE . ' a
LEFT JOIN ' . TOPICS_TABLE . ' t ON (a.topic_id = t.topic_id AND a.in_message = 0)
LEFT JOIN ' . PRIVMSGS_TABLE . ' p ON (a.post_msg_id = p.msg_id AND a.in_message = 1)
WHERE a.poster_id = ' . $user->data['user_id'] . "
@@ -158,25 +166,25 @@ class ucp_attachments
);
$row_count++;
- }
+ }
while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
- $template->assign_vars(array(
+ $template->assign_vars(array(
'PAGE_NUMBER' => on_page($num_attachments, $config['topics_per_page'], $start),
'PAGINATION' => generate_pagination($this->u_action . "&amp;sk=$sort_key&amp;sd=$sort_dir", $num_attachments, $config['topics_per_page'], $start),
'TOTAL_ATTACHMENTS' => $num_attachments,
'L_TITLE' => $user->lang['UCP_ATTACHMENTS'],
- 'U_SORT_FILENAME' => $this->u_action . "&amp;sk=a&amp;sd=" . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_FILE_COMMENT' => $this->u_action . "&amp;sk=b&amp;sd=" . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_EXTENSION' => $this->u_action . "&amp;sk=c&amp;sd=" . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_FILESIZE' => $this->u_action . "&amp;sk=d&amp;sd=" . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_DOWNLOADS' => $this->u_action . "&amp;sk=e&amp;sd=" . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_POST_TIME' => $this->u_action . "&amp;sk=f&amp;sd=" . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_TOPIC_TITLE' => $this->u_action . "&amp;sk=g&amp;sd=" . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_FILENAME' => $this->u_action . "&amp;sk=a&amp;sd=" . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_FILE_COMMENT' => $this->u_action . "&amp;sk=b&amp;sd=" . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_EXTENSION' => $this->u_action . "&amp;sk=c&amp;sd=" . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_FILESIZE' => $this->u_action . "&amp;sk=d&amp;sd=" . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_DOWNLOADS' => $this->u_action . "&amp;sk=e&amp;sd=" . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_POST_TIME' => $this->u_action . "&amp;sk=f&amp;sd=" . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_TOPIC_TITLE' => $this->u_action . "&amp;sk=g&amp;sd=" . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'),
'S_DISPLAY_MARK_ALL' => ($num_attachments) ? true : false,
'S_DISPLAY_PAGINATION' => ($num_attachments) ? true : false,
diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php
index e971dbb3ae..0f37c456fa 100644
--- a/phpBB/includes/ucp/ucp_confirm.php
+++ b/phpBB/includes/ucp/ucp_confirm.php
@@ -1,21 +1,29 @@
<?php
-/**
+/**
*
* @package VC
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* ucp_confirm
* Visual confirmation
*
* Note to potential users of this code ...
*
* Remember this is released under the _GPL_ and is subject
-* to that licence. Do not incorporate this within software
+* to that licence. Do not incorporate this within software
* released or distributed in any way under a licence other
* than the GPL. We will be watching ... ;)
*
@@ -40,8 +48,8 @@ class ucp_confirm
// Try and grab code for this id and session
$sql = 'SELECT code, seed
- FROM ' . CONFIRM_TABLE . "
- WHERE session_id = '" . $db->sql_escape($user->session_id) . "'
+ FROM ' . CONFIRM_TABLE . "
+ WHERE session_id = '" . $db->sql_escape($user->session_id) . "'
AND confirm_id = '" . $db->sql_escape($confirm_id) . "'
AND confirm_type = $type";
$result = $db->sql_query($sql);
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php
index cc428d98eb..a4fc818343 100644
--- a/phpBB/includes/ucp/ucp_groups.php
+++ b/phpBB/includes/ucp/ucp_groups.php
@@ -9,6 +9,14 @@
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* ucp_groups
* @package ucp
*/
@@ -397,8 +405,8 @@ class ucp_groups
if ($group_id)
{
- $sql = 'SELECT *
- FROM ' . GROUPS_TABLE . "
+ $sql = 'SELECT *
+ FROM ' . GROUPS_TABLE . "
WHERE group_id = $group_id";
$result = $db->sql_query($sql);
$group_row = $db->sql_fetchrow($result);
@@ -480,10 +488,10 @@ class ucp_groups
{
// Avatar stuff
$var_ary = array(
- 'uploadurl' => array('string', true, 5, 255),
- 'remotelink' => array('string', true, 5, 255),
- 'width' => array('string', true, 1, 3),
- 'height' => array('string', true, 1, 3),
+ 'uploadurl' => array('string', true, 5, 255),
+ 'remotelink' => array('string', true, 5, 255),
+ 'width' => array('string', true, 1, 3),
+ 'height' => array('string', true, 1, 3),
);
if (!($error = validate_data($data, $var_ary)))
@@ -561,7 +569,7 @@ class ucp_groups
if (!sizeof($error))
{
// Only set the rank, colour, etc. if it's changed or if we're adding a new
- // group. This prevents existing group members being updated if no changes
+ // group. This prevents existing group members being updated if no changes
// were made.
$group_attributes = array();
@@ -615,7 +623,7 @@ class ucp_groups
$group_rank = $group_row['group_rank'];
}
- $sql = 'SELECT *
+ $sql = 'SELECT *
FROM ' . RANKS_TABLE . '
WHERE rank_special = 1
ORDER BY rank_title';
@@ -716,9 +724,9 @@ class ucp_groups
$start = request_var('start', 0);
// Grab the leaders - always, on every page...
- $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
- FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
- WHERE ug.group_id = $group_id
+ $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
+ FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
+ WHERE ug.group_id = $group_id
AND u.user_id = ug.user_id
AND ug.group_leader = 1
ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean";
@@ -740,18 +748,18 @@ class ucp_groups
$db->sql_freeresult($result);
// Total number of group members (non-leaders)
- $sql = 'SELECT COUNT(user_id) AS total_members
- FROM ' . USER_GROUP_TABLE . "
- WHERE group_id = $group_id
+ $sql = 'SELECT COUNT(user_id) AS total_members
+ FROM ' . USER_GROUP_TABLE . "
+ WHERE group_id = $group_id
AND group_leader = 0";
$result = $db->sql_query($sql);
$total_members = (int) $db->sql_fetchfield('total_members');
$db->sql_freeresult($result);
// Grab the members
- $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
- FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
- WHERE ug.group_id = $group_id
+ $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
+ FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
+ WHERE ug.group_id = $group_id
AND u.user_id = ug.user_id
AND ug.group_leader = 0
ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean";
@@ -858,9 +866,9 @@ class ucp_groups
do
{
- $sql = 'SELECT user_id
+ $sql = 'SELECT user_id
FROM ' . USER_GROUP_TABLE . "
- WHERE group_id = $group_id
+ WHERE group_id = $group_id
ORDER BY user_id";
$result = $db->sql_query_limit($sql, 200, $start);
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index a8f31d2e72..c2fa50c79e 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -1,14 +1,22 @@
<?php
-/**
+/**
*
* @package ucp
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* ucp_main
* UCP Front Panel
* @package ucp
@@ -38,7 +46,7 @@ class ucp_main
if ($config['load_db_track'])
{
- $sql_from .= ' LEFT JOIN ' . TOPICS_POSTED_TABLE . ' tp ON (tp.topic_id = t.topic_id
+ $sql_from .= ' LEFT JOIN ' . TOPICS_POSTED_TABLE . ' tp ON (tp.topic_id = t.topic_id
AND tp.user_id = ' . $user->data['user_id'] . ')';
$sql_select .= ', tp.topic_posted';
}
@@ -59,7 +67,7 @@ class ucp_main
$forum_ary = array_unique(array_keys($forum_ary));
// Determine first forum the user is able to read into - for global announcement link
- $sql = 'SELECT forum_id
+ $sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE . '
WHERE forum_type = ' . FORUM_POST;
@@ -71,7 +79,7 @@ class ucp_main
$g_forum_id = (int) $db->sql_fetchfield('forum_id');
$db->sql_freeresult($result);
- $sql = "SELECT t.* $sql_select
+ $sql = "SELECT t.* $sql_select
FROM $sql_from
WHERE t.forum_id = 0
AND t.topic_type = " . POST_GLOBAL . '
@@ -164,13 +172,13 @@ class ucp_main
display_user_activity($user->data);
}
- // Do the relevant calculations
+ // Do the relevant calculations
$memberdays = max(1, round((time() - $user->data['user_regdate']) / 86400));
$posts_per_day = $user->data['user_posts'] / $memberdays;
$percentage = ($config['num_posts']) ? min(100, ($user->data['user_posts'] / $config['num_posts']) * 100) : 0;
$template->assign_vars(array(
- 'USER_COLOR' => (!empty($user->data['user_colour'])) ? $user->data['user_colour'] : '',
+ 'USER_COLOR' => (!empty($user->data['user_colour'])) ? $user->data['user_colour'] : '',
'JOINED' => $user->format_date($user->data['user_regdate']),
'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit),
'WARNINGS' => ($user->data['user_warnings']) ? $user->data['user_warnings'] : 0,
@@ -181,7 +189,7 @@ class ucp_main
'OCCUPATION' => (!empty($row['user_occ'])) ? $row['user_occ'] : '',
'INTERESTS' => (!empty($row['user_interests'])) ? $row['user_interests'] : '',
-// 'S_GROUP_OPTIONS' => $group_options,
+// 'S_GROUP_OPTIONS' => $group_options,
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user->data['user_id'] . '&amp;sr=posts') : '',
));
@@ -256,7 +264,7 @@ class ucp_main
FORUMS_TABLE => 'f'
),
- 'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
+ 'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
AND f.forum_id = fw.forum_id
AND ' . $db->sql_in_set('f.forum_id', $forbidden_forums, true, true),
@@ -322,7 +330,7 @@ class ucp_main
}
$template->assign_block_vars('forumrow', array(
- 'FORUM_ID' => $forum_id,
+ 'FORUM_ID' => $forum_id,
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'),
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
@@ -336,7 +344,7 @@ class ucp_main
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
- 'U_LAST_POST' => $last_post_url,
+ 'U_LAST_POST' => $last_post_url,
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']))
);
}
@@ -468,8 +476,8 @@ class ucp_main
'draft_message' => $draft_message
);
- $sql = 'UPDATE ' . DRAFTS_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', $draft_row) . "
+ $sql = 'UPDATE ' . DRAFTS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $draft_row) . "
WHERE draft_id = $draft_id
AND user_id = " . $user->data['user_id'];
$db->sql_query($sql);
@@ -504,7 +512,7 @@ class ucp_main
$sql = 'SELECT * FROM ' . DRAFTS_TABLE . '
WHERE user_id = ' . $user->data['user_id'] . ' ' .
(($edit) ? "AND draft_id = $draft_id" : '') . '
- AND forum_id = 0
+ AND forum_id = 0
AND topic_id = 0
ORDER BY save_time DESC';
}
@@ -600,10 +608,10 @@ class ucp_main
}
- $template->assign_vars(array(
+ $template->assign_vars(array(
'L_TITLE' => $user->lang['UCP_MAIN_' . strtoupper($mode)],
- 'S_DISPLAY_MARK_ALL' => ($mode == 'watched' || ($mode == 'drafts' && !isset($_GET['edit']))) ? true : false,
+ 'S_DISPLAY_MARK_ALL' => ($mode == 'watched' || ($mode == 'drafts' && !isset($_GET['edit']))) ? true : false,
'S_HIDDEN_FIELDS' => (isset($s_hidden_fields)) ? $s_hidden_fields : '',
'S_UCP_ACTION' => $this->u_action,
diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php
index b383d3e36d..e843e89139 100644
--- a/phpBB/includes/ucp/ucp_pm.php
+++ b/phpBB/includes/ucp/ucp_pm.php
@@ -7,7 +7,15 @@
*
*/
-/**
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* Private Message Class
*
* $_REQUEST['folder'] display folder with the id used
@@ -271,7 +279,7 @@ class ucp_pm
$sql = 'SELECT folder_id
FROM ' . PRIVMSGS_TO_TABLE . "
WHERE msg_id = $msg_id
- AND folder_id <> " . PRIVMSGS_NO_BOX . '
+ AND folder_id <> " . PRIVMSGS_NO_BOX . '
AND user_id = ' . $user->data['user_id'];
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index a22fc57761..ff5ab13716 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -9,6 +9,14 @@
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* Compose private message
* Called from ucp_pm with mode == 'compose'
*/
diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php
index 5a7f4b1e40..2d2ff23cab 100644
--- a/phpBB/includes/ucp/ucp_pm_options.php
+++ b/phpBB/includes/ucp/ucp_pm_options.php
@@ -1,14 +1,22 @@
<?php
-/**
+/**
*
* @package ucp
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* Execute message options
*/
function message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions)
@@ -69,7 +77,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
if ($folder_name)
{
- $sql = 'SELECT folder_name
+ $sql = 'SELECT folder_name
FROM ' . PRIVMSGS_FOLDER_TABLE . "
WHERE folder_name = '" . $db->sql_escape($folder_name) . "'
AND user_id = " . $user->data['user_id'];
@@ -138,7 +146,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
trigger_error('CANNOT_RENAME_FOLDER');
}
- $sql = 'UPDATE ' . PRIVMSGS_FOLDER_TABLE . "
+ $sql = 'UPDATE ' . PRIVMSGS_FOLDER_TABLE . "
SET folder_name = '" . $db->sql_escape($new_folder_name) . "'
WHERE folder_id = $rename_folder_id
AND user_id = {$user->data['user_id']}";
@@ -149,7 +157,9 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
{
$msg = $user->lang['FORM_INVALID'];
}
+
$message = $msg . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $redirect_url . '">', '</a>');
+
meta_refresh(3, $redirect_url);
trigger_error($message);
}
@@ -194,7 +204,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
if (confirm_box(true))
{
// Gather message ids
- $sql = 'SELECT msg_id
+ $sql = 'SELECT msg_id
FROM ' . PRIVMSGS_TO_TABLE . '
WHERE user_id = ' . $user->data['user_id'] . "
AND folder_id = $remove_folder_id";
@@ -302,7 +312,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
'rule_folder_id' => $folder_id
);
- $sql = 'SELECT rule_id
+ $sql = 'SELECT rule_id
FROM ' . PRIVMSGS_RULES_TABLE . '
WHERE ' . $db->sql_build_array('SELECT', $rule_ary);
$result = $db->sql_query($sql);
@@ -357,7 +367,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
$message = $user->lang['RULE_DELETED'];
// Reset user_message_rules if no more assigned
- $sql = 'SELECT rule_id
+ $sql = 'SELECT rule_id
FROM ' . PRIVMSGS_RULES_TABLE . '
WHERE user_id = ' . $user->data['user_id'];
$result = $db->sql_query_limit($sql, 1);
@@ -394,11 +404,11 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
$db->sql_freeresult($result);
$folder[PRIVMSGS_INBOX] = array(
- 'folder_name' => $user->lang['PM_INBOX'],
+ 'folder_name' => $user->lang['PM_INBOX'],
'message_status' => sprintf($user->lang['FOLDER_MESSAGE_STATUS'], $num_messages, $user->data['message_limit'])
);
- $sql = 'SELECT folder_id, folder_name, pm_count
+ $sql = 'SELECT folder_id, folder_name, pm_count
FROM ' . PRIVMSGS_FOLDER_TABLE . '
WHERE user_id = ' . $user->data['user_id'];
$result = $db->sql_query($sql);
@@ -408,7 +418,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
{
$num_user_folder++;
$folder[$row['folder_id']] = array(
- 'folder_name' => $row['folder_name'],
+ 'folder_name' => $row['folder_name'],
'message_status' => sprintf($user->lang['FOLDER_MESSAGE_STATUS'], $row['pm_count'], $user->data['message_limit'])
);
}
@@ -557,7 +567,7 @@ function define_check_option($hardcoded, $check_option, $check_lang)
{
foreach ($check_lang as $value => $lang)
{
- $s_check_options .= '<option value="' . $value . '"' . (($value == $check_option) ? ' selected="selected"' : '') . '>' . $lang . '</option>';
+ $s_check_options .= '<option value="' . $value . '"' . (($value == $check_option) ? ' selected="selected"' : '') . '>' . $lang . '</option>';
}
}
@@ -629,7 +639,7 @@ function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
{
foreach ($check_ary as $value => $_check)
{
- $s_rule_options .= '<option value="' . $value . '"' . (($value == $rule_option) ? ' selected="selected"' : '') . '>' . $rule_lang[$value] . '</option>';
+ $s_rule_options .= '<option value="' . $value . '"' . (($value == $rule_option) ? ' selected="selected"' : '') . '>' . $rule_lang[$value] . '</option>';
}
}
@@ -729,10 +739,10 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
case 'group':
$rule_group_id = request_var('rule_group_id', 0);
$rule_string = utf8_normalize_nfc(request_var('rule_string', '', true));
-
+
$sql = 'SELECT g.group_id, g.group_name, g.group_type
FROM ' . GROUPS_TABLE . ' g ';
-
+
if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
$sql .= 'LEFT JOIN ' . USER_GROUP_TABLE . ' ug
@@ -762,7 +772,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
$rule_string = (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']);
}
- $s_class = ($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '';
+ $s_class = ($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '';
$s_selected = ($row['group_id'] == $rule_group_id) ? ' selected="selected"' : '';
$s_group_options .= '<option value="' . $row['group_id'] . '"' . $s_class . $s_selected . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index 79b663a39d..e9c337519a 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -1,14 +1,22 @@
<?php
-/**
+/**
*
* @package ucp
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* View message folder
* Called from ucp_pm with mode == 'view' && action == 'view_folder'
*/
@@ -132,7 +140,7 @@ function view_folder($id, $mode, $folder_id, $folder)
{
if ($ug_type == 'u')
{
- $sql = 'SELECT user_id as id, username as name, user_colour as colour
+ $sql = 'SELECT user_id as id, username as name, user_colour as colour
FROM ' . USERS_TABLE . '
WHERE ';
}
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 7fc6d7c0de..3f109b0771 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -1,14 +1,22 @@
<?php
-/**
+/**
*
* @package ucp
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* View private message
*/
function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index 445000b4dc..3ce3ea73ed 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -1,14 +1,22 @@
<?php
-/**
+/**
*
* @package ucp
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* ucp_prefs
* Changing user preferences
* @package ucp
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index b89af840b6..3fe3d72d59 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -9,6 +9,14 @@
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* ucp_profile
* Changing profile settings
*
@@ -491,8 +499,8 @@ class ucp_profile
'user_sig_bbcode_bitfield' => $message_parser->bbcode_bitfield
);
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user->data['user_id'];
$db->sql_query($sql);
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 571ea423e5..4b409daed5 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -9,6 +9,14 @@
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* ucp_register
* Board registration
* @package ucp
diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php
index 3f2c737045..12de817099 100644
--- a/phpBB/includes/ucp/ucp_remind.php
+++ b/phpBB/includes/ucp/ucp_remind.php
@@ -1,14 +1,22 @@
<?php
-/**
+/**
*
* @package ucp
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* ucp_remind
* Sending password reminders
* @package ucp
diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php
index edd372333e..ea5e0d8b17 100644
--- a/phpBB/includes/ucp/ucp_resend.php
+++ b/phpBB/includes/ucp/ucp_resend.php
@@ -1,14 +1,22 @@
<?php
-/**
+/**
*
* @package ucp
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* ucp_resend
* Resending activation emails
* @package ucp
diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php
index aa2dcb15b7..fb5df9394b 100644
--- a/phpBB/includes/ucp/ucp_zebra.php
+++ b/phpBB/includes/ucp/ucp_zebra.php
@@ -1,14 +1,22 @@
<?php
-/**
+/**
*
* @package ucp
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* ucp_zebra
* @package ucp
*/
@@ -49,11 +57,11 @@ class ucp_zebra
$data['add'] = array_map('trim', array_map('utf8_clean_string', explode("\n", $data['add'])));
// Do these name/s exist on a list already? If so, ignore ... we could be
- // 'nice' and automatically handle names added to one list present on
+ // 'nice' and automatically handle names added to one list present on
// the other (by removing the existing one) ... but I have a feeling this
// may lead to complaints
- $sql = 'SELECT z.*, u.username, u.username_clean
- FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u
+ $sql = 'SELECT z.*, u.username, u.username_clean
+ FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u
WHERE z.user_id = ' . $user->data['user_id'] . '
AND u.user_id = z.zebra_id';
$result = $db->sql_query($sql);
@@ -104,7 +112,7 @@ class ucp_zebra
if (sizeof($data['add']))
{
$sql = 'SELECT user_id, user_type
- FROM ' . USERS_TABLE . '
+ FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('username_clean', $data['add']) . '
AND user_type <> ' . USER_INACTIVE;
$result = $db->sql_query($sql);
@@ -180,8 +188,8 @@ class ucp_zebra
// Force integer values
$data['usernames'] = array_map('intval', $data['usernames']);
- $sql = 'DELETE FROM ' . ZEBRA_TABLE . '
- WHERE user_id = ' . $user->data['user_id'] . '
+ $sql = 'DELETE FROM ' . ZEBRA_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] . '
AND ' . $db->sql_in_set('zebra_id', $data['usernames']);
$db->sql_query($sql);
@@ -212,10 +220,10 @@ class ucp_zebra
}
$sql_and = ($mode == 'friends') ? 'z.friend = 1' : 'z.foe = 1';
- $sql = 'SELECT z.*, u.username, u.username_clean
- FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u
+ $sql = 'SELECT z.*, u.username, u.username_clean
+ FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u
WHERE z.user_id = ' . $user->data['user_id'] . "
- AND $sql_and
+ AND $sql_and
AND u.user_id = z.zebra_id
ORDER BY u.username_clean ASC";
$result = $db->sql_query($sql);
@@ -227,7 +235,7 @@ class ucp_zebra
}
$db->sql_freeresult($result);
- $template->assign_vars(array(
+ $template->assign_vars(array(
'L_TITLE' => $user->lang['UCP_ZEBRA_' . $l_mode],
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=ucp&amp;field=add'),