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 5616 2011-09-20 13:24:59Z Tomm $
| * $Id: usercp.php 5765 2012-03-27 09:52:45Z Tomm $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 1256 | Zeile 1256 |
---|
if(is_array($del_subscriptions)) { $tids = implode(',', $del_subscriptions);
|
if(is_array($del_subscriptions)) { $tids = implode(',', $del_subscriptions);
|
|
|
if($tids) { $db->delete_query("threadsubscriptions", "tid IN ({$tids}) AND uid='{$mybb->user['uid']}'");
|
if($tids) { $db->delete_query("threadsubscriptions", "tid IN ({$tids}) AND uid='{$mybb->user['uid']}'");
|
}
| }
$threadcount = $threadcount - count($del_subscriptions);
if($threadcount < 0) { $threadcount = 0; }
|
}
if(is_array($subscriptions))
| }
if(is_array($subscriptions))
|
Zeile 1267 | Zeile 1275 |
---|
$tids = implode(",", array_keys($subscriptions)); if($mybb->user['uid'] == 0)
|
$tids = implode(",", array_keys($subscriptions)); if($mybb->user['uid'] == 0)
|
{
| {
|
// Build a forum cache. $query = $db->query(" SELECT fid
| // Build a forum cache. $query = $db->query(" SELECT fid
|
Zeile 1276 | Zeile 1284 |
---|
ORDER BY pid, disporder ");
|
ORDER BY pid, disporder ");
|
$forumsread = unserialize($mybb->cookies['mybb']['forumread']);
| $forumsread = my_unserialize($mybb->cookies['mybb']['forumread']);
|
} else {
| } else {
|
Zeile 1289 | Zeile 1297 |
---|
ORDER BY pid, disporder "); }
|
ORDER BY pid, disporder "); }
|
|
|
while($forum = $db->fetch_array($query)) { if($mybb->user['uid'] == 0)
| while($forum = $db->fetch_array($query)) { if($mybb->user['uid'] == 0)
|
Zeile 1495 | Zeile 1504 |
---|
eval("\$subscriptions = \"".$templates->get("usercp_subscriptions")."\";"); output_page($subscriptions); }
|
eval("\$subscriptions = \"".$templates->get("usercp_subscriptions")."\";"); output_page($subscriptions); }
|
|
|
if($mybb->input['action'] == "forumsubscriptions") { $plugins->run_hooks("usercp_forumsubscriptions_start");
|
if($mybb->input['action'] == "forumsubscriptions") { $plugins->run_hooks("usercp_forumsubscriptions_start");
|
$query = $db->simple_select("forumpermissions", "*", "gid='".$db->escape_string($mybb->user['usergroup'])."'"); while($permissions = $db->fetch_array($query)) { $permissioncache[$permissions['gid']][$permissions['fid']] = $permissions; }
| |
if($mybb->user['uid'] == 0) {
| if($mybb->user['uid'] == 0) {
|
Zeile 1514 | Zeile 1519 |
---|
ORDER BY pid, disporder ");
|
ORDER BY pid, disporder ");
|
$forumsread = unserialize($mybb->cookies['mybb']['forumread']);
| $forumsread = my_unserialize($mybb->cookies['mybb']['forumread']);
|
} else {
| } else {
|
Zeile 1527 | Zeile 1532 |
---|
ORDER BY pid, disporder "); }
|
ORDER BY pid, disporder "); }
|
|
|
while($forum = $db->fetch_array($query)) { if($mybb->user['uid'] == 0)
| while($forum = $db->fetch_array($query)) { if($mybb->user['uid'] == 0)
|
Zeile 1537 | Zeile 1543 |
---|
} } $readforums[$forum['fid']] = $forum['lastread'];
|
} } $readforums[$forum['fid']] = $forum['lastread'];
|
} require_once MYBB_ROOT."inc/functions_forumlist.php";
| }
|
$fpermissions = forum_permissions();
|
$fpermissions = forum_permissions();
|
| require_once MYBB_ROOT."inc/functions_forumlist.php";
|
$query = $db->query(" SELECT fs.*, f.*, t.subject AS lastpostsubject, fr.dateline AS lastread FROM ".TABLE_PREFIX."forumsubscriptions fs
| $query = $db->query(" SELECT fs.*, f.*, t.subject AS lastpostsubject, fr.dateline AS lastread FROM ".TABLE_PREFIX."forumsubscriptions fs
|
Zeile 1551 | Zeile 1557 |
---|
WHERE f.type='f' AND fs.uid='".$mybb->user['uid']."' ORDER BY f.name ASC ");
|
WHERE f.type='f' AND fs.uid='".$mybb->user['uid']."' ORDER BY f.name ASC ");
|
|
|
$forums = ''; while($forum = $db->fetch_array($query)) { $forum_url = get_forum_link($forum['fid']); $forumpermissions = $fpermissions[$forum['fid']];
|
$forums = ''; while($forum = $db->fetch_array($query)) { $forum_url = get_forum_link($forum['fid']); $forumpermissions = $fpermissions[$forum['fid']];
|
if($forumpermissions['canview'] != 0)
| if($forumpermissions['canview'] == 0) { continue; }
$lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost'])); $folder = $lightbulb['folder'];
if($forum['lastpost'] == 0 || $forum['lastposter'] == "") { $lastpost = "<div align=\"center\">$lang->never</div>"; } else
|
{
|
{
|
$lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost'])); $folder = $lightbulb['folder']; if($forum['lastpost'] == 0 || $forum['lastposter'] == "")
| $lastpost_date = my_date($mybb->settings['dateformat'], $forum['lastpost']); $lastpost_time = my_date($mybb->settings['timeformat'], $forum['lastpost']); $lastposttid = $forum['lastposttid']; $lastposter = $forum['lastposter']; $lastpost_profilelink = build_profile_link($lastposter, $forum['lastposteruid']); $lastpost_subject = htmlspecialchars_uni($forum['lastpostsubject']); if(my_strlen($lastpost_subject) > 25)
|
{
|
{
|
$lastpost = "<div align=\"center\">$lang->never</div>"; } else { $lastpost_date = my_date($mybb->settings['dateformat'], $forum['lastpost']); $lastpost_time = my_date($mybb->settings['timeformat'], $forum['lastpost']); $lastposttid = $forum['lastposttid']; $lastposter = $forum['lastposter']; $lastpost_profilelink = build_profile_link($lastposter, $forum['lastposteruid']); $lastpost_subject = $forum['lastpostsubject']; if(my_strlen($lastpost_subject) > 25) { $lastpost_subject = my_substr($lastpost_subject, 0, 25) . "..."; } $lastpost_link = get_thread_link($forum['lastposttid'], 0, "lastpost"); eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost")."\";");
| $lastpost_subject = my_substr($lastpost_subject, 0, 25) . "...";
|
}
|
}
|
| $lastpost_link = get_thread_link($forum['lastposttid'], 0, "lastpost"); eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost")."\";");
|
}
|
}
|
|
|
$posts = my_number_format($forum['posts']); $threads = my_number_format($forum['threads']);
|
$posts = my_number_format($forum['posts']); $threads = my_number_format($forum['threads']);
|
|
|
if($mybb->settings['showdescriptions'] == 0) { $forum['description'] = ""; }
|
if($mybb->settings['showdescriptions'] == 0) { $forum['description'] = ""; }
|
|
|
eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";");
|
eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";");
|
}
| }
|
if(!$forums) { eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";"); }
|
if(!$forums) { eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";"); }
|
|
|
$plugins->run_hooks("usercp_forumsubscriptions_end");
|
$plugins->run_hooks("usercp_forumsubscriptions_end");
|
|
|
eval("\$forumsubscriptions = \"".$templates->get("usercp_forumsubscriptions")."\";"); output_page($forumsubscriptions); }
|
eval("\$forumsubscriptions = \"".$templates->get("usercp_forumsubscriptions")."\";"); output_page($forumsubscriptions); }
|
|
|
if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post") { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post") { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
|
|
$plugins->run_hooks("usercp_do_editsig_start");
|
$plugins->run_hooks("usercp_do_editsig_start");
|
|
|
// User currently has a suspended signature if($mybb->user['suspendsignature'] == 1 && $mybb->user['suspendsigtime'] > TIME_NOW)
|
// User currently has a suspended signature if($mybb->user['suspendsignature'] == 1 && $mybb->user['suspendsigtime'] > TIME_NOW)
|
{
| {
|
error_no_permission(); }
if($mybb->input['updateposts'] == "enable")
|
error_no_permission(); }
if($mybb->input['updateposts'] == "enable")
|
{ $update_signature = array(
| { $update_signature = array(
|
"includesig" => 1 ); $db->update_query("posts", $update_signature, "uid='".$mybb->user['uid']."'");
| "includesig" => 1 ); $db->update_query("posts", $update_signature, "uid='".$mybb->user['uid']."'");
|
Zeile 1651 | Zeile 1668 |
---|
{ $sig = $mybb->input['signature']; $template = false;
|
{ $sig = $mybb->input['signature']; $template = false;
|
}
| }
|
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($lang->sig_suspended);
|
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($lang->sig_suspended);
|
}
| }
|
if($mybb->usergroup['canusesig'] != 1)
|
if($mybb->usergroup['canusesig'] != 1)
|
{
| {
|
// Usergroup has no permission to use this facility error_no_permission(); }
| // Usergroup has no permission to use this facility error_no_permission(); }
|
Zeile 1671 | Zeile 1688 |
---|
}
if($sig && $template)
|
}
if($sig && $template)
|
{
| {
|
$sig_parser = array( "allow_html" => $mybb->settings['sightml'], "allow_mycode" => $mybb->settings['sigmycode'], "allow_smilies" => $mybb->settings['sigsmilies'], "allow_imgcode" => $mybb->settings['sigimgcode'], "me_username" => $mybb->user['username'],
|
$sig_parser = array( "allow_html" => $mybb->settings['sightml'], "allow_mycode" => $mybb->settings['sigmycode'], "allow_smilies" => $mybb->settings['sigsmilies'], "allow_imgcode" => $mybb->settings['sigimgcode'], "me_username" => $mybb->user['username'],
|
| "filter_badwords" => 1
|
);
$sigpreview = $parser->parse_message($sig, $sig_parser);
| );
$sigpreview = $parser->parse_message($sig, $sig_parser);
|
Zeile 2065 | Zeile 2083 |
---|
{ // Create a list of buddies... $selected_list = explode(",", $mybb->user['buddylist']);
|
{ // Create a list of buddies... $selected_list = explode(",", $mybb->user['buddylist']);
|
} } else
| } } else
|
{ if($mybb->user['buddylist']) {
| { if($mybb->user['buddylist']) {
|
Zeile 2853 | Zeile 2871 |
---|
$attachment['postlink'] = get_post_link($attachment['pid'], $attachment['tid']); $attachment['threadlink'] = get_thread_link($attachment['tid']); $attachment['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['threadsubject']));
|
$attachment['postlink'] = get_post_link($attachment['pid'], $attachment['tid']); $attachment['threadlink'] = get_thread_link($attachment['tid']); $attachment['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['threadsubject']));
|
|
|
$size = get_friendly_size($attachment['filesize']); $icon = get_attachment_icon(get_extension($attachment['filename']));
|
$size = get_friendly_size($attachment['filesize']); $icon = get_attachment_icon(get_extension($attachment['filename']));
|
| $attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
|
$sizedownloads = $lang->sprintf($lang->attachment_size_downloads, $size, $attachment['downloads']); $attachdate = my_date($mybb->settings['dateformat'], $attachment['dateline']); $attachtime = my_date($mybb->settings['timeformat'], $attachment['dateline']); $altbg = alt_trow();
|
$sizedownloads = $lang->sprintf($lang->attachment_size_downloads, $size, $attachment['downloads']); $attachdate = my_date($mybb->settings['dateformat'], $attachment['dateline']); $attachtime = my_date($mybb->settings['timeformat'], $attachment['dateline']); $altbg = alt_trow();
|
|
|
eval("\$attachments .= \"".$templates->get("usercp_attachments_attachment")."\";");
|
eval("\$attachments .= \"".$templates->get("usercp_attachments_attachment")."\";");
|
|
|
// Add to bandwidth total $bandwidth += ($attachment['filesize'] * $attachment['downloads']); $totaldownloads += $attachment['downloads'];
| // Add to bandwidth total $bandwidth += ($attachment['filesize'] * $attachment['downloads']); $totaldownloads += $attachment['downloads'];
|