Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html *
|
* $Id: usercp.php 3139 2007-06-18 08:34:28Z chris $
| * $Id: usercp.php 3478 2007-11-15 04:11:36Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 1110 | Zeile 1110 |
---|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) WHERE f.type='f' AND f.uid='".$mybb->user['uid']."' ORDER BY t.lastpost DESC
|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) WHERE f.type='f' AND f.uid='".$mybb->user['uid']."' ORDER BY t.lastpost DESC
|
| LIMIT {$start}, {$perpage}
|
"); while($favorite = $db->fetch_array($query)) {
| "); while($favorite = $db->fetch_array($query)) {
|
Zeile 1484 | Zeile 1485 |
---|
} remove_avatars($mybb->user['uid']); }
|
} remove_avatars($mybb->user['uid']); }
|
}
| }
|
elseif($_FILES['avatarupload']['name']) // upload avatar { if($mybb->usergroup['canuploadavatars'] == "no")
| elseif($_FILES['avatarupload']['name']) // upload avatar { if($mybb->usergroup['canuploadavatars'] == "no")
|
Zeile 1495 | Zeile 1496 |
---|
if($avatar['error']) { $avatar_error = $avatar['error'];
|
if($avatar['error']) { $avatar_error = $avatar['error'];
|
} else {
| } else {
|
if($avatar['width'] > 0 && $avatar['height'] > 0) { $avatar_dimensions = $avatar['width']."|".$avatar['height'];
| if($avatar['width'] > 0 && $avatar['height'] > 0) { $avatar_dimensions = $avatar['width']."|".$avatar['height'];
|
Zeile 1539 | Zeile 1540 |
---|
if(!$type) { $avatar_error = $lang->error_invalidavatarurl;
|
if(!$type) { $avatar_error = $lang->error_invalidavatarurl;
|
} } }
| } } }
|
if(empty($avatar_error)) { if($width && $height && $mybb->settings['maxavatardims'] != "")
| if(empty($avatar_error)) { if($width && $height && $mybb->settings['maxavatardims'] != "")
|
Zeile 1717 | Zeile 1718 |
---|
eval("\$avatar = \"".$templates->get("usercp_avatar")."\";"); $plugins->run_hooks("usercp_avatar_end"); output_page($avatar);
|
eval("\$avatar = \"".$templates->get("usercp_avatar")."\";"); $plugins->run_hooks("usercp_avatar_end"); output_page($avatar);
|
} }
| } }
|
if($mybb->input['action'] == "notepad") { $plugins->run_hooks("usercp_notepad_start");
| if($mybb->input['action'] == "notepad") { $plugins->run_hooks("usercp_notepad_start");
|
Zeile 1726 | Zeile 1727 |
---|
eval("\$notepad = \"".$templates->get("usercp_notepad")."\";"); $plugins->run_hooks("usercp_notepad_end"); output_page($notepad);
|
eval("\$notepad = \"".$templates->get("usercp_notepad")."\";"); $plugins->run_hooks("usercp_notepad_end"); output_page($notepad);
|
}
| }
|
if($mybb->input['action'] == "do_notepad" && $mybb->request_method == "post") { $plugins->run_hooks("usercp_do_notepad_start");
| if($mybb->input['action'] == "do_notepad" && $mybb->request_method == "post") { $plugins->run_hooks("usercp_do_notepad_start");
|
Zeile 1754 | Zeile 1755 |
---|
$uid = $buddy['uid']; $username = $buddy['username']; eval("\$buddylist .= \"".$templates->get("usercp_editlists_user")."\";");
|
$uid = $buddy['uid']; $username = $buddy['username']; eval("\$buddylist .= \"".$templates->get("usercp_editlists_user")."\";");
|
} }
| } }
|
$comma2 = ''; $ignoresql = ''; $ignorelist = '';
| $comma2 = ''; $ignoresql = ''; $ignorelist = '';
|
Zeile 1763 | Zeile 1764 |
---|
if(is_array($ignorearray)) { foreach($ignorearray as $key => $ignoreid)
|
if(is_array($ignorearray)) { foreach($ignorearray as $key => $ignoreid)
|
{
| {
|
$ignoresql .= "$comma2'$ignoreid'"; $comma2 = ","; }
| $ignoresql .= "$comma2'$ignoreid'"; $comma2 = ","; }
|
Zeile 1777 | Zeile 1778 |
---|
} $newlist = ''; for($i = 1; $i <= 2; $i++)
|
} $newlist = ''; for($i = 1; $i <= 2; $i++)
|
{
| {
|
$uid = "new$i"; $username = ''; eval("\$newlist .= \"".$templates->get("usercp_editlists_user")."\";");
| $uid = "new$i"; $username = ''; eval("\$newlist .= \"".$templates->get("usercp_editlists_user")."\";");
|
Zeile 1785 | Zeile 1786 |
---|
eval("\$listpage = \"".$templates->get("usercp_editlists")."\";"); $plugins->run_hooks("usercp_editlists_end"); output_page($listpage);
|
eval("\$listpage = \"".$templates->get("usercp_editlists")."\";"); $plugins->run_hooks("usercp_editlists_end"); output_page($listpage);
|
}
| }
|
if($mybb->input['action'] == "do_editlists" && $mybb->request_method == "post") { $plugins->run_hooks("usercp_do_editlists_start"); $comma = ''; $users = ''; foreach($mybb->input['listuser'] as $key => $val)
|
if($mybb->input['action'] == "do_editlists" && $mybb->request_method == "post") { $plugins->run_hooks("usercp_do_editlists_start"); $comma = ''; $users = ''; foreach($mybb->input['listuser'] as $key => $val)
|
{
| {
|
if(strtoupper($mybb->user['username']) != strtoupper($val)) { $val = $db->escape_string($val); $users .= "$comma'$val'"; $comma = ","; }
|
if(strtoupper($mybb->user['username']) != strtoupper($val)) { $val = $db->escape_string($val); $users .= "$comma'$val'"; $comma = ","; }
|
}
| }
|
$comma2 = ''; $newlist = ''; $query = $db->simple_select(TABLE_PREFIX."users", "uid", "username IN ($users)");
| $comma2 = ''; $newlist = ''; $query = $db->simple_select(TABLE_PREFIX."users", "uid", "username IN ($users)");
|
Zeile 1835 | Zeile 1836 |
---|
ORDER BY p.dateline DESC "); while($draft = $db->fetch_array($query))
|
ORDER BY p.dateline DESC "); while($draft = $db->fetch_array($query))
|
{
| {
|
$trow = alt_trow(); if($draft['threadvisible'] == 1) // We're looking at a draft post {
| $trow = alt_trow(); if($draft['threadvisible'] == 1) // We're looking at a draft post {
|
Zeile 1843 | Zeile 1844 |
---|
$editurl = "newreply.php?action=editdraft&pid={$draft['pid']}"; $id = $draft['pid']; $type = "post";
|
$editurl = "newreply.php?action=editdraft&pid={$draft['pid']}"; $id = $draft['pid']; $type = "post";
|
}
| }
|
elseif($draft['threadvisible'] == -2) // We're looking at a draft thread { $detail = $lang->forum." <a href=\"forumdisplay.php?fid=".$draft['fid']."\">".htmlspecialchars_uni($draft['forumname'])."</a>"; $editurl = "newthread.php?action=editdraft&tid=$draft[tid]"; $id = $draft['tid']; $type = "thread";
|
elseif($draft['threadvisible'] == -2) // We're looking at a draft thread { $detail = $lang->forum." <a href=\"forumdisplay.php?fid=".$draft['fid']."\">".htmlspecialchars_uni($draft['forumname'])."</a>"; $editurl = "newthread.php?action=editdraft&tid=$draft[tid]"; $id = $draft['tid']; $type = "thread";
|
}
| }
|
$draft['subject'] = htmlspecialchars_uni($draft['subject']); $savedate = my_date($mybb->settings['dateformat'], $draft['dateline']); $savetime = my_date($mybb->settings['timeformat'], $draft['dateline']);
| $draft['subject'] = htmlspecialchars_uni($draft['subject']); $savedate = my_date($mybb->settings['dateformat'], $draft['dateline']); $savetime = my_date($mybb->settings['timeformat'], $draft['dateline']);
|
Zeile 1894 | Zeile 1895 |
---|
$tidin = implode(",", $tidin); $db->delete_query(TABLE_PREFIX."threads", "tid IN ($tidin) AND visible='-2' AND uid='".$mybb->user['uid']."'"); $tidinp = "OR tid IN ($tidin)";
|
$tidin = implode(",", $tidin); $db->delete_query(TABLE_PREFIX."threads", "tid IN ($tidin) AND visible='-2' AND uid='".$mybb->user['uid']."'"); $tidinp = "OR tid IN ($tidin)";
|
}
| }
|
if($pidin || $tidinp) { if($pidin)
| if($pidin || $tidinp) { if($pidin)
|
Zeile 1919 | Zeile 1920 |
---|
// Changing our display group if($mybb->input['displaygroup']) {
|
// Changing our display group if($mybb->input['displaygroup']) {
|
if(!strstr($ingroups, ",".$mybb->input['displaygroup'].","))
| if(strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false)
|
{ error($lang->not_member_of_group); }
| { error($lang->not_member_of_group); }
|
Zeile 1932 | Zeile 1933 |
---|
$db->update_query(TABLE_PREFIX."users", array('displaygroup' => intval($mybb->input['displaygroup'])), "uid='".$mybb->user['uid']."'"); $plugins->run_hooks("usercp_usergroups_change_displaygroup"); redirect("usercp.php?action=usergroups", $lang->display_group_changed);
|
$db->update_query(TABLE_PREFIX."users", array('displaygroup' => intval($mybb->input['displaygroup'])), "uid='".$mybb->user['uid']."'"); $plugins->run_hooks("usercp_usergroups_change_displaygroup"); redirect("usercp.php?action=usergroups", $lang->display_group_changed);
|
exit;
| exit;
|
}
// Leaving a group if($mybb->input['leavegroup']) {
|
}
// Leaving a group if($mybb->input['leavegroup']) {
|
if(!strstr($ingroups, ",".$mybb->input['leavegroup'].","))
| if(strpos($ingroups, ",".$mybb->input['leavegroup'].",") === false)
|
{ error($lang->not_member_of_group); }
| { error($lang->not_member_of_group); }
|
Zeile 1955 | Zeile 1956 |
---|
leave_usergroup($mybb->user['uid'], $mybb->input['leavegroup']); $plugins->run_hooks("usercp_usergroups_leave_group"); redirect("usercp.php?action=usergroups", $lang->left_group);
|
leave_usergroup($mybb->user['uid'], $mybb->input['leavegroup']); $plugins->run_hooks("usercp_usergroups_leave_group"); redirect("usercp.php?action=usergroups", $lang->left_group);
|
| exit;
|
}
// Joining a group
| }
// Joining a group
|
Zeile 1969 | Zeile 1971 |
---|
error($lang->cannot_join_group); }
|
error($lang->cannot_join_group); }
|
if(strstr($ingroups, ",".intval($mybb->input['joingroup']).",") || $mybb->user['usergroup'] == $mybb->input['joingroup'] || $mybb->user['displaygroup'] == $mybb->input['joingroup'])
| if(strpos($ingroups, ",".intval($mybb->input['joingroup']).",") !== false)
|
{ error($lang->already_member_of_group); }
| { error($lang->already_member_of_group); }
|