Zeile 582 | Zeile 582 |
---|
} elseif($type == "radio") {
|
} elseif($type == "radio") {
|
| $userfield = htmlspecialchars_uni($userfield);
|
$expoptions = explode("\n", $options); if(is_array($expoptions)) {
| $expoptions = explode("\n", $options); if(is_array($expoptions)) {
|
Zeile 599 | Zeile 600 |
---|
} elseif($type == "checkbox") {
|
} elseif($type == "checkbox") {
|
| $userfield = htmlspecialchars_uni($userfield);
|
if($errors) { $useropts = $userfield;
| if($errors) { $useropts = $userfield;
|
Zeile 1195 | Zeile 1197 |
---|
} else {
|
} else {
|
if($mybb->user['usergroup'] != "5" && $mybb->usergroup['cancp'] != 1 && $mybb->settings['regtype'] != "verify")
| $activation = false; // Checking for pending activations for non-activated accounts if($mybb->user['usergroup'] == 5 && ($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "both")) { $query = $db->simple_select("awaitingactivation", "*", "uid='".$mybb->user['uid']."' AND (type='r' OR type='b')"); $activation = $db->fetch_array($query); } if($activation) { $userhandler->update_user();
$db->delete_query("awaitingactivation", "uid='".$mybb->user['uid']."'");
// Send new activation mail for non-activated accounts $activationcode = random_str(); $activationarray = array( "uid" => $mybb->user['uid'], "dateline" => TIME_NOW, "code" => $activationcode, "type" => $activation['type'] ); $db->insert_query("awaitingactivation", $activationarray); $emailsubject = $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']); switch($mybb->settings['username_method']) { case 0: $emailmessage = $lang->sprintf($lang->email_activateaccount, $mybb->user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $mybb->user['uid'], $activationcode); break; case 1: $emailmessage = $lang->sprintf($lang->email_activateaccount1, $mybb->user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $mybb->user['uid'], $activationcode); break; case 2: $emailmessage = $lang->sprintf($lang->email_activateaccount2, $mybb->user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $mybb->user['uid'], $activationcode); break; default: $emailmessage = $lang->sprintf($lang->email_activateaccount, $mybb->user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $mybb->user['uid'], $activationcode); break; } my_mail($mybb->user['email'], $emailsubject, $emailmessage);
$plugins->run_hooks("usercp_do_email_changed"); redirect("usercp.php?action=email", $lang->redirect_emailupdated); } elseif($mybb->usergroup['cancp'] != 1 && ($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "both"))
|
{ $uid = $mybb->user['uid']; $username = $mybb->user['username'];
| { $uid = $mybb->user['uid']; $username = $mybb->user['username'];
|
Zeile 2506 | Zeile 2551 |
---|
}
if($mybb->input['action'] == "acceptrequest")
|
}
if($mybb->input['action'] == "acceptrequest")
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
// Validate request $query = $db->simple_select('buddyrequests', '*', 'id='.$mybb->get_input('id', MyBB::INPUT_INT).' AND touid='.(int)$mybb->user['uid']); $request = $db->fetch_array($query); if(empty($request)) { error($lang->invalid_request); }
$plugins->run_hooks("usercp_acceptrequest_start");
$user = get_user($request['uid']); if(!empty($user))
| { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
// Validate request $query = $db->simple_select('buddyrequests', '*', 'id='.$mybb->get_input('id', MyBB::INPUT_INT).' AND touid='.(int)$mybb->user['uid']); $request = $db->fetch_array($query); if(empty($request)) { error($lang->invalid_request); }
$plugins->run_hooks("usercp_acceptrequest_start");
$user = get_user($request['uid']); if(!empty($user))
|
{ // We want to add us to this user's buddy list if($user['buddylist'] != '')
| { // We want to add us to this user's buddy list if($user['buddylist'] != '')
|
Zeile 3182 | Zeile 3227 |
---|
if($received_rows == '') { eval("\$received_rows = \"".$templates->get("usercp_editlists_no_requests")."\";");
|
if($received_rows == '') { eval("\$received_rows = \"".$templates->get("usercp_editlists_no_requests")."\";");
|
}
eval("\$received_requests = \"".$templates->get("usercp_editlists_received_requests")."\";");
| }
eval("\$received_requests = \"".$templates->get("usercp_editlists_received_requests")."\";");
|
$sent_rows = ''; $query = $db->query("
| $sent_rows = ''; $query = $db->query("
|
Zeile 3732 | Zeile 3777 |
---|
error($lang->attachments_disabled); }
|
error($lang->attachments_disabled); }
|
$attachments = '';
| // Get unviewable forums $f_perm_sql = ''; $unviewable_forums = get_unviewable_forums(true); $inactiveforums = get_inactive_forums(); if($unviewable_forums) { $f_perm_sql = " AND t.fid NOT IN ($unviewable_forums)"; } if($inactiveforums) { $f_perm_sql .= " AND t.fid NOT IN ($inactiveforums)"; }
$attachments = '';
|
$query = $db->simple_select("attachments", "SUM(filesize) AS ausage, COUNT(aid) AS acount", "uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query); $totalattachments = $usage['acount'];
|
$query = $db->simple_select("attachments", "SUM(filesize) AS ausage, COUNT(aid) AS acount", "uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query); $totalattachments = $usage['acount'];
|
|
|
// Pagination if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) {
| // Pagination if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) {
|
Zeile 3746 | Zeile 3804 |
---|
$perpage = $mybb->settings['threadsperpage']; $page = $mybb->get_input('page', MyBB::INPUT_INT);
|
$perpage = $mybb->settings['threadsperpage']; $page = $mybb->get_input('page', MyBB::INPUT_INT);
|
|
|
if($page > 0) { $start = ($page-1) * $perpage;
| if($page > 0) { $start = ($page-1) * $perpage;
|
Zeile 3771 | Zeile 3829 |
---|
FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
|
FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
|
WHERE a.uid='".$mybb->user['uid']."'
| WHERE a.uid='".$mybb->user['uid']."' {$f_perm_sql}
|
ORDER BY p.dateline DESC LIMIT {$start}, {$perpage} ");
| ORDER BY p.dateline DESC LIMIT {$start}, {$perpage} ");
|
Zeile 3804 | Zeile 3862 |
---|
// This little thing delets attachments without a thread/post remove_attachment($attachment['pid'], $attachment['posthash'], $attachment['aid']); }
|
// This little thing delets attachments without a thread/post remove_attachment($attachment['pid'], $attachment['posthash'], $attachment['aid']); }
|
}
| }
|
$totalusage = $usage['ausage']; $friendlyusage = get_friendly_size((int)$totalusage);
| $totalusage = $usage['ausage']; $friendlyusage = get_friendly_size((int)$totalusage);
|
Zeile 3819 | Zeile 3877 |
---|
{ $attachquota = $lang->unlimited; $usagenote = $lang->sprintf($lang->attachments_usage, $friendlyusage, $totalattachments);
|
{ $attachquota = $lang->unlimited; $usagenote = $lang->sprintf($lang->attachments_usage, $friendlyusage, $totalattachments);
|
}
| }
|
$multipage = multipage($totalattachments, $perpage, $page, "usercp.php?action=attachments"); $bandwidth = get_friendly_size($bandwidth);
| $multipage = multipage($totalattachments, $perpage, $page, "usercp.php?action=attachments"); $bandwidth = get_friendly_size($bandwidth);
|
Zeile 3847 | Zeile 3905 |
---|
{ error($lang->no_attachments_selected); }
|
{ error($lang->no_attachments_selected); }
|
| // Get unviewable forums $f_perm_sql = ''; $unviewable_forums = get_unviewable_forums(true); $inactiveforums = get_inactive_forums(); if($unviewable_forums) { $f_perm_sql = " AND p.fid NOT IN ($unviewable_forums)"; } if($inactiveforums) { $f_perm_sql .= " AND p.fid NOT IN ($inactiveforums)"; }
|
$aids = implode(',', array_map('intval', $mybb->input['attachments']));
|
$aids = implode(',', array_map('intval', $mybb->input['attachments']));
|
$query = $db->simple_select("attachments", "*", "aid IN ($aids) AND uid='".$mybb->user['uid']."'");
| $query = $db->query(" SELECT a.*, p.fid FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid) WHERE aid IN ({$aids}) AND a.uid={$mybb->user['uid']} {$f_perm_sql} ");
|
while($attachment = $db->fetch_array($query)) { remove_attachment($attachment['pid'], '', $attachment['aid']);
| while($attachment = $db->fetch_array($query)) { remove_attachment($attachment['pid'], '', $attachment['aid']);
|