Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: usercp.php 5142 2010-07-29 23:36:56Z RyanGordon $
| * $Id: usercp.php 5459 2011-05-10 10:47:56Z Tomm $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 403 | Zeile 403 |
---|
while($profilefield = $db->fetch_array($query)) { $profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
|
while($profilefield = $db->fetch_array($query)) { $profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
|
| $profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
|
$profilefield['description'] = htmlspecialchars_uni($profilefield['description']); $thing = explode("\n", $profilefield['type'], "2"); $type = $thing[0];
| $profilefield['description'] = htmlspecialchars_uni($profilefield['description']); $thing = explode("\n", $profilefield['type'], "2"); $type = $thing[0];
|
Zeile 576 | Zeile 577 |
---|
{ $defaulttitle = $mybb->usergroup['usertitle']; }
|
{ $defaulttitle = $mybb->usergroup['usertitle']; }
|
if(empty($user['usertitle']))
| if(trim($user['usertitle']) == '')
|
{ $lang->current_custom_usertitle = ''; }
| { $lang->current_custom_usertitle = ''; }
|
Zeile 619 | Zeile 621 |
---|
"timeformat" => intval($mybb->input['timeformat']), "timezone" => $db->escape_string($mybb->input['timezoneoffset']), "language" => $mybb->input['language']
|
"timeformat" => intval($mybb->input['timeformat']), "timezone" => $db->escape_string($mybb->input['timezoneoffset']), "language" => $mybb->input['language']
|
);
| );
|
$user['options'] = array( "allownotices" => $mybb->input['allownotices'],
| $user['options'] = array( "allownotices" => $mybb->input['allownotices'],
|
Zeile 640 | Zeile 642 |
---|
"showredirect" => $mybb->input['showredirect'], "classicpostbit" => $mybb->input['classicpostbit'] );
|
"showredirect" => $mybb->input['showredirect'], "classicpostbit" => $mybb->input['classicpostbit'] );
|
|
|
if($mybb->settings['usertppoptions']) { $user['options']['tpp'] = intval($mybb->input['tpp']);
| if($mybb->settings['usertppoptions']) { $user['options']['tpp'] = intval($mybb->input['tpp']);
|
Zeile 649 | Zeile 651 |
---|
if($mybb->settings['userpppoptions']) { $user['options']['ppp'] = intval($mybb->input['ppp']);
|
if($mybb->settings['userpppoptions']) { $user['options']['ppp'] = intval($mybb->input['ppp']);
|
}
$userhandler->set_data($user);
| }
$userhandler->set_data($user);
|
if(!$userhandler->validate_user())
|
if(!$userhandler->validate_user())
|
Zeile 663 | Zeile 665 |
---|
else { $userhandler->update_user();
|
else { $userhandler->update_user();
|
|
|
$plugins->run_hooks("usercp_do_options_end");
redirect("usercp.php", $lang->redirect_optionsupdated);
| $plugins->run_hooks("usercp_do_options_end");
redirect("usercp.php", $lang->redirect_optionsupdated);
|
Zeile 748 | Zeile 750 |
---|
if($user['showavatars'] == 1) { $showavatarscheck = "checked=\"checked\"";
|
if($user['showavatars'] == 1) { $showavatarscheck = "checked=\"checked\"";
|
} else {
| } else {
|
$showavatarscheck = ""; }
| $showavatarscheck = ""; }
|
Zeile 837 | Zeile 839 |
---|
}
if($user['classicpostbit'] != 0)
|
}
if($user['classicpostbit'] != 0)
|
{
| {
|
$classicpostbitcheck = "checked=\"checked\""; } else
| $classicpostbitcheck = "checked=\"checked\""; } else
|
Zeile 925 | Zeile 927 |
---|
eval("\$editprofile = \"".$templates->get("usercp_options")."\";"); output_page($editprofile);
|
eval("\$editprofile = \"".$templates->get("usercp_options")."\";"); output_page($editprofile);
|
}
| }
|
if($mybb->input['action'] == "do_email" && $mybb->request_method == "post") { // Verify incoming POST request
| if($mybb->input['action'] == "do_email" && $mybb->request_method == "post") { // Verify incoming POST request
|
Zeile 1101 | Zeile 1103 |
---|
if(!$userhandler->validate_user()) { $errors = $userhandler->get_friendly_errors();
|
if(!$userhandler->validate_user()) { $errors = $userhandler->get_friendly_errors();
|
}
| }
|
else { $userhandler->update_user();
| else { $userhandler->update_user();
|
Zeile 1176 | Zeile 1178 |
---|
if($mybb->input['action'] == "subscriptions") { $plugins->run_hooks("usercp_subscriptions_start");
|
if($mybb->input['action'] == "subscriptions") { $plugins->run_hooks("usercp_subscriptions_start");
|
| // Thread visiblity $visible = "AND t.visible != 0"; if(is_moderator() == true) { $visible = ''; }
|
// Do Multi Pages
|
// Do Multi Pages
|
$query = $db->simple_select("threadsubscriptions", "COUNT(tid) AS threads", "uid='".$mybb->user['uid']."'");
| $query = $db->query(" SELECT COUNT(ts.tid) as threads FROM ".TABLE_PREFIX."threadsubscriptions ts LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = ts.tid) WHERE ts.uid = '".$mybb->user['uid']."' {$visible} ");
|
$threadcount = $db->fetch_field($query, "threads");
if(!$mybb->settings['threadsperpage'])
| $threadcount = $db->fetch_field($query, "threads");
if(!$mybb->settings['threadsperpage'])
|
Zeile 1214 | Zeile 1228 |
---|
LEFT JOIN ".TABLE_PREFIX."threads t ON (s.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) LEFT JOIN ".TABLE_PREFIX."threadprefixes p ON (p.pid=t.prefix)
|
LEFT JOIN ".TABLE_PREFIX."threads t ON (s.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) LEFT JOIN ".TABLE_PREFIX."threadprefixes p ON (p.pid=t.prefix)
|
WHERE s.uid='".$mybb->user['uid']."'
| WHERE s.uid='".$mybb->user['uid']."' {$visible}
|
ORDER BY t.lastpost DESC LIMIT $start, $perpage "); while($subscription = $db->fetch_array($query)) { $forumpermissions = $fpermissions[$subscription['fid']];
|
ORDER BY t.lastpost DESC LIMIT $start, $perpage "); while($subscription = $db->fetch_array($query)) { $forumpermissions = $fpermissions[$subscription['fid']];
|
// Only keep if we're allowed to view them if($forumpermissions['canview'] != 0 || $forumpermissions['canviewthreads'] != 0) { $subscriptions[$subscription['tid']] = $subscription; } // Hmm, you don't have permission to view - unsubscribe! else if($subscription['tid']) {
| if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0) { // Hmm, you don't have permission to view this thread - unsubscribe!
|
$del_subscriptions[] = $subscription['tid'];
|
$del_subscriptions[] = $subscription['tid'];
|
| } else if($subscription['tid']) { $subscriptions[$subscription['tid']] = $subscription;
|
} }
| } }
|
Zeile 1237 | Zeile 1251 |
---|
{ $tids = implode(',', $del_subscriptions); if($tids)
|
{ $tids = implode(',', $del_subscriptions); if($tids)
|
{
| {
|
$db->delete_query("threadsubscriptions", "tid IN ({$tids}) AND uid='{$mybb->user['uid']}'"); } }
|
$db->delete_query("threadsubscriptions", "tid IN ({$tids}) AND uid='{$mybb->user['uid']}'"); } }
|
|
|
if(is_array($subscriptions)) { $tids = implode(",", array_keys($subscriptions));
| if(is_array($subscriptions)) { $tids = implode(",", array_keys($subscriptions));
|
Zeile 1276 | Zeile 1290 |
---|
if($forumsread[$forum['fid']]) { $forum['lastread'] = $forumsread[$forum['fid']];
|
if($forumsread[$forum['fid']]) { $forum['lastread'] = $forumsread[$forum['fid']];
|
} } $readforums[$forum['fid']] = $forum['lastread']; }
| } } $readforums[$forum['fid']] = $forum['lastread']; }
|
// Check participation by the current user in any of these threads - for 'dot' folder icons if($mybb->settings['dotfolders'] != 0) { $query = $db->simple_select("posts", "tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})"); while($post = $db->fetch_array($query))
|
// Check participation by the current user in any of these threads - for 'dot' folder icons if($mybb->settings['dotfolders'] != 0) { $query = $db->simple_select("posts", "tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})"); while($post = $db->fetch_array($query))
|
{
| {
|
$subscriptions[$post['tid']]['doticon'] = 1; } }
| $subscriptions[$post['tid']]['doticon'] = 1; } }
|
Zeile 1302 | Zeile 1316 |
---|
} $icon_cache = $cache->read("posticons");
|
} $icon_cache = $cache->read("posticons");
|
|
|
// Now we can build our subscription list foreach($subscriptions as $thread) {
| // Now we can build our subscription list foreach($subscriptions as $thread) {
|
Zeile 1324 | Zeile 1338 |
---|
// Build our links $thread['threadlink'] = get_thread_link($thread['tid']); $thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
|
// Build our links $thread['threadlink'] = get_thread_link($thread['tid']); $thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
|
|
|
// Fetch the thread icon if we have one if($thread['icon'] > 0 && $icon_cache[$thread['icon']]) {
| // Fetch the thread icon if we have one if($thread['icon'] > 0 && $icon_cache[$thread['icon']]) {
|
Zeile 1412 | Zeile 1426 |
---|
{ $folder_label .= $lang->icon_no_new; $new_class = "subject_old";
|
{ $folder_label .= $lang->icon_no_new; $new_class = "subject_old";
|
}
| }
|
if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews'])
|
if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews'])
|
{
| {
|
$folder .= "hot"; $folder_label .= $lang->icon_hot;
|
$folder .= "hot"; $folder_label .= $lang->icon_hot;
|
}
| }
|
if($thread['closed'] == 1)
|
if($thread['closed'] == 1)
|
{
| {
|
$folder .= "lock"; $folder_label .= $lang->icon_lock; }
|
$folder .= "lock"; $folder_label .= $lang->icon_lock; }
|
$folder .= "folder";
| $folder .= "folder";
if($thread['visible'] == 0) { $bgcolor = "trow_shaded"; }
|
// Build last post info
|
// Build last post info
|
| |
$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']); $lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']); $lastposter = $thread['lastposter'];
| $lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']); $lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']); $lastposter = $thread['lastposter'];
|
Zeile 1587 | Zeile 1605 |
---|
if($mybb->user['suspendsignature'] == 1 && $mybb->user['suspendsigtime'] > TIME_NOW) { error_no_permission();
|
if($mybb->user['suspendsignature'] == 1 && $mybb->user['suspendsigtime'] > TIME_NOW) { error_no_permission();
|
}
| }
|
if($mybb->input['updateposts'] == "enable") { $update_signature = array( "includesig" => 1
|
if($mybb->input['updateposts'] == "enable") { $update_signature = array( "includesig" => 1
|
);
| );
|
$db->update_query("posts", $update_signature, "uid='".$mybb->user['uid']."'"); } elseif($mybb->input['updateposts'] == "disable")
| $db->update_query("posts", $update_signature, "uid='".$mybb->user['uid']."'"); } elseif($mybb->input['updateposts'] == "disable")
|
Zeile 1620 | Zeile 1638 |
---|
{ $sig = $mybb->input['signature']; $template = "usercp_editsig_preview";
|
{ $sig = $mybb->input['signature']; $template = "usercp_editsig_preview";
|
}
| }
|
elseif(!$error) { $sig = $mybb->user['signature'];
| elseif(!$error) { $sig = $mybb->user['signature'];
|
Zeile 1630 | Zeile 1648 |
---|
{ $sig = $mybb->input['signature']; $template = false;
|
{ $sig = $mybb->input['signature']; $template = false;
|
}
| }
|
|
|
if(!$mybb->user['signature'] && ($mybb->user['suspendsignature'] && $mybb->user['suspendsigtime'] > TIME_NOW))
| if($mybb->user['suspendsignature'] && ($mybb->user['suspendsigtime'] == 0 || $mybb->user['suspendsigtime'] > 0 && $mybb->user['suspendsigtime'] > TIME_NOW))
|
{ // User currently has no signature and they're suspended error_no_permission();
| { // User currently has no signature and they're suspended error_no_permission();
|
Zeile 2331 | Zeile 2349 |
---|
if($mybb->request_method == "post" && $mybb->input['ajax'] == 1) { if($mybb->input['manage'] == "ignored")
|
if($mybb->request_method == "post" && $mybb->input['ajax'] == 1) { if($mybb->input['manage'] == "ignored")
|
{
| {
|
echo $ignore_list; echo "<script type=\"text/javascript\"> $('ignored_count').innerHTML = '{$ignore_count}'; {$message_js}</script>"; }
| echo $ignore_list; echo "<script type=\"text/javascript\"> $('ignored_count').innerHTML = '{$ignore_count}'; {$message_js}</script>"; }
|
Zeile 2462 | Zeile 2480 |
---|
verify_post_check($mybb->input['my_post_key']);
if(my_strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false)
|
verify_post_check($mybb->input['my_post_key']);
if(my_strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false)
|
{ error($lang->not_member_of_group);
| { error($lang->not_member_of_group);
|
} $query = $db->simple_select("usergroups", "*", "gid='".intval($mybb->input['displaygroup'])."'"); $dispgroup = $db->fetch_array($query);
| } $query = $db->simple_select("usergroups", "*", "gid='".intval($mybb->input['displaygroup'])."'"); $dispgroup = $db->fetch_array($query);
|
Zeile 2485 | Zeile 2503 |
---|
verify_post_check($mybb->input['my_post_key']);
if(my_strpos($ingroups, ",".$mybb->input['leavegroup'].",") === false)
|
verify_post_check($mybb->input['my_post_key']);
if(my_strpos($ingroups, ",".$mybb->input['leavegroup'].",") === false)
|
{
| {
|
error($lang->not_member_of_group); } if($mybb->user['usergroup'] == $mybb->input['leavegroup'])
| error($lang->not_member_of_group); } if($mybb->user['usergroup'] == $mybb->input['leavegroup'])
|
Zeile 2506 | Zeile 2524 |
---|
// Joining a group if($mybb->input['joingroup'])
|
// Joining a group if($mybb->input['joingroup'])
|
{
| {
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
Zeile 2638 | Zeile 2656 |
---|
elseif($usergroup['candisplaygroup'] == 1) { $displaycode = " (<a href=\"usercp.php?action=usergroups&displaygroup={$usergroup['gid']}&my_post_key={$mybb->post_code}\">{$lang->set_as_display_group}</a>)";
|
elseif($usergroup['candisplaygroup'] == 1) { $displaycode = " (<a href=\"usercp.php?action=usergroups&displaygroup={$usergroup['gid']}&my_post_key={$mybb->post_code}\">{$lang->set_as_display_group}</a>)";
|
}
| }
|
else { $displaycode = '';
| else { $displaycode = '';
|
Zeile 2660 | Zeile 2678 |
---|
elseif($usergroup['type'] != 4 && $usergroup['type'] != 3) { $leavelink = "<div style=\"text-align: center;\"><span class=\"smalltext\">{$lang->usergroup_cannot_leave}</span></div>";
|
elseif($usergroup['type'] != 4 && $usergroup['type'] != 3) { $leavelink = "<div style=\"text-align: center;\"><span class=\"smalltext\">{$lang->usergroup_cannot_leave}</span></div>";
|
}
| }
|
else { $leavelink = "<div style=\"text-align: center;\"><a href=\"usercp.php?action=usergroups&leavegroup=".$usergroup['gid']."&my_post_key={$mybb->post_code}\">".$lang->usergroup_leave."</a></div>";
| else { $leavelink = "<div style=\"text-align: center;\"><a href=\"usercp.php?action=usergroups&leavegroup=".$usergroup['gid']."&my_post_key={$mybb->post_code}\">".$lang->usergroup_leave."</a></div>";
|
Zeile 2681 | Zeile 2699 |
---|
if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup']) { $displaycode = " ({$lang->display_group})";
|
if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup']) { $displaycode = " ({$lang->display_group})";
|
}
| }
|
elseif($usergroup['candisplaygroup'] == 1) { $displaycode = "(<a href=\"usercp.php?action=usergroups&displaygroup={$usergroup['gid']}&my_post_key={$mybb->post_code}\">{$lang->set_as_display_group}</a>)";
| elseif($usergroup['candisplaygroup'] == 1) { $displaycode = "(<a href=\"usercp.php?action=usergroups&displaygroup={$usergroup['gid']}&my_post_key={$mybb->post_code}\">{$lang->set_as_display_group}</a>)";
|
Zeile 2691 | Zeile 2709 |
---|
$displaycode = ''; } eval("\$memberoflist .= \"".$templates->get("usercp_usergroups_memberof_usergroup")."\";");
|
$displaycode = ''; } eval("\$memberoflist .= \"".$templates->get("usercp_usergroups_memberof_usergroup")."\";");
|
} }
| } }
|
eval("\$membergroups = \"".$templates->get("usercp_usergroups_memberof")."\";");
// List of groups this user has applied for but has not been accepted in to $query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."'"); while($request = $db->fetch_array($query))
|
eval("\$membergroups = \"".$templates->get("usercp_usergroups_memberof")."\";");
// List of groups this user has applied for but has not been accepted in to $query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."'"); while($request = $db->fetch_array($query))
|
{
| {
|
$appliedjoin[$request['gid']] = $request['dateline']; }
| $appliedjoin[$request['gid']] = $request['dateline']; }
|
Zeile 2725 | Zeile 2743 |
---|
// Moderating join requests? if($usergroup['type'] == 4)
|
// Moderating join requests? if($usergroup['type'] == 4)
|
{
| {
|
$conditions = $lang->usergroup_joins_moderated; } else
| $conditions = $lang->usergroup_joins_moderated; } else
|
Zeile 2780 | Zeile 2798 |
---|
require_once MYBB_ROOT."inc/functions_upload.php";
$attachments = '';
|
require_once MYBB_ROOT."inc/functions_upload.php";
$attachments = '';
|
$query = $db->simple_select("attachments", "SUM(filesize) AS ausage, COUNT(aid) AS acount", "uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query); $totalusage = $usage['ausage']; $totalattachments = $usage['acount']; $friendlyusage = get_friendly_size($totalusage); if($mybb->usergroup['attachquota']) { $percent = round(($totalusage/($mybb->usergroup['attachquota']*1024))*100)."%"; $attachquota = get_friendly_size($mybb->usergroup['attachquota']*1024); $usagenote = $lang->sprintf($lang->attachments_usage_quota, $friendlyusage, $attachquota, $percent, $totalattachments); } else { $percent = $lang->unlimited; $attachquota = $lang->unlimited; $usagenote = $lang->sprintf($lang->attachments_usage, $friendlyusage, $totalattachments); }
| |
// Pagination if(!$mybb->settings['threadsperpage']) { $mybb->settings['threadsperpage'] = 20; }
|
// Pagination if(!$mybb->settings['threadsperpage']) { $mybb->settings['threadsperpage'] = 20; }
|
|
|
$perpage = $mybb->settings['threadsperpage']; $page = intval($mybb->input['page']);
| $perpage = $mybb->settings['threadsperpage']; $page = intval($mybb->input['page']);
|
Zeile 2819 | Zeile 2820 |
---|
$end = $start + $perpage; $lower = $start+1;
|
$end = $start + $perpage; $lower = $start+1;
|
if($end > $totalattachments) { $upper = $totalattachments; } $multipage = multipage($totalattachments, $perpage, $page, "usercp.php?action=attachments");
| |
$query = $db->query(" SELECT a.*, p.subject, p.dateline, t.tid, t.subject AS threadsubject 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)
|
$query = $db->query(" SELECT a.*, p.subject, p.dateline, t.tid, t.subject AS threadsubject 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']."' AND a.pid!='0'
| WHERE a.uid='".$mybb->user['uid']."'
|
ORDER BY p.dateline DESC LIMIT {$start}, {$perpage} ");
|
ORDER BY p.dateline DESC LIMIT {$start}, {$perpage} ");
|
|
|
$bandwidth = $totaldownloads = 0; while($attachment = $db->fetch_array($query)) {
| $bandwidth = $totaldownloads = 0; while($attachment = $db->fetch_array($query)) {
|
Zeile 2853 | Zeile 2849 |
---|
// Add to bandwidth total $bandwidth += ($attachment['filesize'] * $attachment['downloads']); $totaldownloads += $attachment['downloads'];
|
// Add to bandwidth total $bandwidth += ($attachment['filesize'] * $attachment['downloads']); $totaldownloads += $attachment['downloads'];
|
}
| }
|
else { // This little thing delets attachments without a thread/post remove_attachment($attachment['pid'], $attachment['posthash'], $attachment['aid']);
|
else { // This little thing delets attachments without a thread/post remove_attachment($attachment['pid'], $attachment['posthash'], $attachment['aid']);
|
} }
| } }
$query = $db->simple_select("attachments", "SUM(filesize) AS ausage, COUNT(aid) AS acount", "uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query); $totalusage = $usage['ausage']; $totalattachments = $usage['acount']; $friendlyusage = get_friendly_size($totalusage); if($mybb->usergroup['attachquota']) { $percent = round(($totalusage/($mybb->usergroup['attachquota']*1024))*100)."%"; $attachquota = get_friendly_size($mybb->usergroup['attachquota']*1024); $usagenote = $lang->sprintf($lang->attachments_usage_quota, $friendlyusage, $attachquota, $percent, $totalattachments); } else { $percent = $lang->unlimited; $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);
if(!$attachments)
| $bandwidth = get_friendly_size($bandwidth);
if(!$attachments)
|
Zeile 2910 | Zeile 2926 |
---|
{ // Get posts per day $daysreg = (TIME_NOW - $mybb->user['regdate']) / (24*3600);
|
{ // Get posts per day $daysreg = (TIME_NOW - $mybb->user['regdate']) / (24*3600);
|
| if($daysreg < 1) { $daysreg = 1; }
|
$perday = $mybb->user['postnum'] / $daysreg; $perday = round($perday, 2); if($perday > $mybb->user['postnum'])
| $perday = $mybb->user['postnum'] / $daysreg; $perday = round($perday, 2); if($perday > $mybb->user['postnum'])
|
Zeile 2922 | Zeile 2944 |
---|
if($posts == 0) { $percent = "0";
|
if($posts == 0) { $percent = "0";
|
} else {
| } else {
|
$percent = $mybb->user['postnum']*100/$posts; $percent = round($percent, 2);
|
$percent = $mybb->user['postnum']*100/$posts; $percent = round($percent, 2);
|
}
| }
|
$lang->posts_day = $lang->sprintf($lang->posts_day, my_number_format($perday), $percent); $usergroup = $groupscache[$mybb->user['usergroup']]['title'];
| $lang->posts_day = $lang->sprintf($lang->posts_day, my_number_format($perday), $percent); $usergroup = $groupscache[$mybb->user['usergroup']]['title'];
|
Zeile 2947 | Zeile 2969 |
---|
else { $avatar = '';
|
else { $avatar = '';
|
}
| }
|
$regdate = my_date($mybb->settings['dateformat'].", ".$mybb->settings['timeformat'], $mybb->user['regdate']);
if($mybb->user['usergroup'] == 5 && $mybb->settings['regtype'] != "admin")
| $regdate = my_date($mybb->settings['dateformat'].", ".$mybb->settings['timeformat'], $mybb->user['regdate']);
if($mybb->user['usergroup'] == 5 && $mybb->settings['regtype'] != "admin")
|
Zeile 3033 | Zeile 3055 |
---|
else { $expires = my_date($mybb->settings['dateformat'], $warning['expires']).", ".my_date($mybb->settings['timeformat'], $warning['expires']);
|
else { $expires = my_date($mybb->settings['dateformat'], $warning['expires']).", ".my_date($mybb->settings['timeformat'], $warning['expires']);
|
}
| }
|
$alt_bg = alt_trow(); eval("\$warnings .= \"".$templates->get("usercp_warnings_warning")."\";"); }
| $alt_bg = alt_trow(); eval("\$warnings .= \"".$templates->get("usercp_warnings_warning")."\";"); }
|
Zeile 3042 | Zeile 3064 |
---|
{ eval("\$latest_warnings = \"".$templates->get("usercp_warnings")."\";"); }
|
{ eval("\$latest_warnings = \"".$templates->get("usercp_warnings")."\";"); }
|
} }
| } }
|
// Format username $username = format_name($mybb->user['username'], $mybb->user['usergroup'], $mybb->user['displaygroup']);
| // Format username $username = format_name($mybb->user['username'], $mybb->user['usergroup'], $mybb->user['displaygroup']);
|
Zeile 3051 | Zeile 3073 |
---|
// Format post numbers $mybb->user['posts'] = my_number_format($mybb->user['postnum']);
|
// Format post numbers $mybb->user['posts'] = my_number_format($mybb->user['postnum']);
|
|
|
// Build referral link if($mybb->settings['usereferrals'] == 1) {
| // Build referral link if($mybb->settings['usereferrals'] == 1) {
|
Zeile 3069 | Zeile 3091 |
---|
$query = $db->simple_select("threadsubscriptions", "sid", "uid = '".$mybb->user['uid']."'", array("limit" => 1)); if($db->num_rows($query)) {
|
$query = $db->simple_select("threadsubscriptions", "sid", "uid = '".$mybb->user['uid']."'", array("limit" => 1)); if($db->num_rows($query)) {
|
| $visible = "AND t.visible != 0"; if(is_moderator() == true) { $visible = ''; }
|
$query = $db->query(" SELECT s.*, t.*, t.username AS threadusername, u.username FROM ".TABLE_PREFIX."threadsubscriptions s LEFT JOIN ".TABLE_PREFIX."threads t ON (s.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
|
$query = $db->query(" SELECT s.*, t.*, t.username AS threadusername, u.username FROM ".TABLE_PREFIX."threadsubscriptions s LEFT JOIN ".TABLE_PREFIX."threads t ON (s.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
|
WHERE s.uid='".$mybb->user['uid']."'
| WHERE s.uid='".$mybb->user['uid']."' {$visible}
|
ORDER BY t.lastpost DESC LIMIT 0, 10 ");
| ORDER BY t.lastpost DESC LIMIT 0, 10 ");
|
Zeile 3125 | Zeile 3153 |
---|
foreach($subscriptions as $thread) {
|
foreach($subscriptions as $thread) {
|
| $folder = ''; $folder_label = '';
|
if($thread['tid']) { $bgcolor = alt_trow();
| if($thread['tid']) { $bgcolor = alt_trow();
|
Zeile 3179 | Zeile 3210 |
---|
} $folder .= "folder";
|
} $folder .= "folder";
|
| if($thread['visible'] == 0) { $bgcolor = "trow_shaded"; }
|
$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']); $lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);
| $lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']); $lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);
|
Zeile 3213 | Zeile 3249 |
---|
if($unviewable_forums) { $f_perm_sql = "AND t.fid NOT IN (".$unviewable_forums.")";
|
if($unviewable_forums) { $f_perm_sql = "AND t.fid NOT IN (".$unviewable_forums.")";
|
| }
$visible = " AND t.visible != 0"; if(is_moderator() == true) { $visible = '';
|
}
$query = $db->query(" SELECT t.*, t.username AS threadusername, u.username FROM ".TABLE_PREFIX."threads t LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
|
}
$query = $db->query(" SELECT t.*, t.username AS threadusername, u.username FROM ".TABLE_PREFIX."threads t LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
|
WHERE t.uid='".$mybb->user['uid']."' {$f_perm_sql}
| WHERE t.uid='".$mybb->user['uid']."' AND t.firstpost != 0 AND t.visible != '-2' {$visible} {$f_perm_sql}
|
ORDER BY t.lastpost DESC LIMIT 0, 5 ");
| ORDER BY t.lastpost DESC LIMIT 0, 5 ");
|
Zeile 3255 | Zeile 3297 |
---|
ORDER BY pid, disporder "); while($forum = $db->fetch_array($query))
|
ORDER BY pid, disporder "); while($forum = $db->fetch_array($query))
|
{
| {
|
$readforums[$forum['fid']] = $forum['lastread']; }
| $readforums[$forum['fid']] = $forum['lastread']; }
|
Zeile 3342 | Zeile 3384 |
---|
if($thread['lastpost'] > $cutoff) { if($thread['lastread'])
|
if($thread['lastpost'] > $cutoff) { if($thread['lastread'])
|
{
| {
|
$lastread = $thread['lastread']; } } if(!$lastread)
|
$lastread = $thread['lastread']; } } if(!$lastread)
|
{
| {
|
$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']); if($readcookie > $forum_read) { $lastread = $readcookie;
|
$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']); if($readcookie > $forum_read) { $lastread = $readcookie;
|
}
| }
|
else { $lastread = $forum_read; }
|
else { $lastread = $forum_read; }
|
}
| }
|
// Folder Icons if($thread['doticon']) {
| // Folder Icons if($thread['doticon']) {
|
Zeile 3375 | Zeile 3417 |
---|
$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost"); eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";"); $unreadpost = 1;
|
$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost"); eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";"); $unreadpost = 1;
|
}
| }
|
else { $folder_label .= $lang->icon_no_new; $new_class = "subject_old";
|
else { $folder_label .= $lang->icon_no_new; $new_class = "subject_old";
|
}
| }
|
if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews'])
|
if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews'])
|
{
| {
|
$folder .= "hot"; $folder_label .= $lang->icon_hot;
|
$folder .= "hot"; $folder_label .= $lang->icon_hot;
|
| }
// Is our thread visible? if($thread['visible'] == 0) { $bgcolor = 'trow_shaded';
|
}
if($thread['closed'] == 1)
| }
if($thread['closed'] == 1)
|