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: misc.php 5114 2010-07-25 22:52:44Z RyanGordon $
| * $Id$
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 49 | Zeile 49 |
---|
} if($mybb->input['action'] == "markread") {
|
} if($mybb->input['action'] == "markread") {
|
| if($mybb->user['uid'] && verify_post_check($mybb->input['my_post_key'], true) !== true) { // Protect our user's unread forums from CSRF error($lang->invalid_post_code); }
|
if($mybb->input['fid'])
|
if($mybb->input['fid'])
|
{
| {
|
$mybb->input['fid'] = intval($mybb->input['fid']); $validforum = get_forum($mybb->input['fid']); if(!$validforum)
|
$mybb->input['fid'] = intval($mybb->input['fid']); $validforum = get_forum($mybb->input['fid']); if(!$validforum)
|
{
| {
|
if(!$mybb->input['ajax']) { error($lang->error_invalidforum);
|
if(!$mybb->input['ajax']) { error($lang->error_invalidforum);
|
}
| }
|
else { echo 0;
| else { echo 0;
|
Zeile 74 | Zeile 80 |
---|
if(!$mybb->input['ajax']) { redirect(get_forum_link($mybb->input['fid']), $lang->redirect_markforumread);
|
if(!$mybb->input['ajax']) { redirect(get_forum_link($mybb->input['fid']), $lang->redirect_markforumread);
|
}
| }
|
else { echo 1; exit;
|
else { echo 1; exit;
|
} } else {
| } } else {
|
$plugins->run_hooks("misc_markread_end"); require_once MYBB_ROOT."/inc/functions_indicators.php";
| $plugins->run_hooks("misc_markread_end"); require_once MYBB_ROOT."/inc/functions_indicators.php";
|
Zeile 91 | Zeile 97 |
---|
} } elseif($mybb->input['action'] == "clearpass")
|
} } elseif($mybb->input['action'] == "clearpass")
|
{
| {
|
$plugins->run_hooks("misc_clearpass");
|
$plugins->run_hooks("misc_clearpass");
|
if($mybb->input['fid']) {
| if($mybb->input['fid']) { if(!verify_post_check($mybb->input['my_post_key'])) { error($lang->invalid_post_code); }
|
my_unsetcookie("forumpass[".intval($mybb->input['fid'])."]"); redirect("index.php", $lang->redirect_forumpasscleared); }
| my_unsetcookie("forumpass[".intval($mybb->input['fid'])."]"); redirect("index.php", $lang->redirect_forumpasscleared); }
|
Zeile 106 | Zeile 117 |
---|
{ $plugins->run_hooks("misc_rules_start");
|
{ $plugins->run_hooks("misc_rules_start");
|
$query = $db->simple_select("forums", "*", "fid='".intval($mybb->input['fid'])."' AND active!=0"); $forum = $db->fetch_array($query);
| $fid = intval($mybb->input['fid']);
$forum = get_forum($fid); if(!$forum || $forum['type'] != "f" || $forum['rules'] == '') { error($lang->error_invalidforum); }
|
$forumpermissions = forum_permissions($forum['fid']);
|
$forumpermissions = forum_permissions($forum['fid']);
|
if($forum['type'] != "f" || $forum['rules'] == '') { error($lang->error_invalidforum); }
| |
if($forumpermissions['canview'] != 1) { error_no_permission(); }
|
if($forumpermissions['canview'] != 1) { error_no_permission(); }
|
|
|
if(!$forum['rulestitle']) { $forum['rulestitle'] = $lang->sprintf($lang->forum_rules, $forum['name']);
| if(!$forum['rulestitle']) { $forum['rulestitle'] = $lang->sprintf($lang->forum_rules, $forum['name']);
|
Zeile 153 | Zeile 165 |
---|
$lang->load("helpsections"); $lang->load("customhelpdocs"); $lang->load("customhelpsections");
|
$lang->load("helpsections"); $lang->load("customhelpdocs"); $lang->load("customhelpsections");
|
|
|
add_breadcrumb($lang->nav_helpdocs, "misc.php?action=help");
$query = $db->query("
| add_breadcrumb($lang->nav_helpdocs, "misc.php?action=help");
$query = $db->query("
|
Zeile 175 | Zeile 187 |
---|
$langdescvar = "d".$helpdoc['hid']."_desc"; $langdocvar = "d".$helpdoc['hid']."_document"; if($lang->$langnamevar)
|
$langdescvar = "d".$helpdoc['hid']."_desc"; $langdocvar = "d".$helpdoc['hid']."_document"; if($lang->$langnamevar)
|
{
| {
|
$helpdoc['name'] = $lang->$langnamevar; } if($lang->$langdescvar)
|
$helpdoc['name'] = $lang->$langnamevar; } if($lang->$langdescvar)
|
{
| {
|
$helpdoc['description'] = $lang->$langdescvar; } if($lang->$langdocvar)
| $helpdoc['description'] = $lang->$langdescvar; } if($lang->$langdocvar)
|
Zeile 187 | Zeile 199 |
---|
$helpdoc['document'] = $lang->$langdocvar; if($langdocvar == "d3_document")
|
$helpdoc['document'] = $lang->$langdocvar; if($langdocvar == "d3_document")
|
{
| {
|
$helpdoc['document'] = $lang->sprintf($helpdoc['document'], $mybb->user['logoutkey']); } }
| $helpdoc['document'] = $lang->sprintf($helpdoc['document'], $mybb->user['logoutkey']); } }
|
Zeile 298 | Zeile 310 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
if($mybb->input['removebuddy'])
| if($mybb->input['removebuddy'] && verify_post_check($mybb->input['my_post_key']))
|
{ $buddies = $mybb->user['buddylist']; $namesarray = explode(",",$buddies);
| { $buddies = $mybb->user['buddylist']; $namesarray = explode(",",$buddies);
|
Zeile 320 | Zeile 332 |
---|
if($mybb->user['buddylist'] != "") { $timecut = TIME_NOW - $mybb->settings['wolcutoff'];
|
if($mybb->user['buddylist'] != "") { $timecut = TIME_NOW - $mybb->settings['wolcutoff'];
|
$query = $db->query(" SELECT u.*, g.canusepms FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=u.usergroup) WHERE u.uid IN ({$mybb->user['buddylist']}) ORDER BY u.lastactive ");
| $query = $db->simple_select("users", "*", "uid IN ({$mybb->user['buddylist']})", array('order_by' => 'lastactive'));
|
while($buddy = $db->fetch_array($query)) { $buddy_name = format_name($buddy['username'], $buddy['usergroup'], $buddy['displaygroup']); $profile_link = build_profile_link($buddy_name, $buddy['uid'], '_blank', 'if(window.opener) { window.opener.location = this.href; return false; }');
|
while($buddy = $db->fetch_array($query)) { $buddy_name = format_name($buddy['username'], $buddy['usergroup'], $buddy['displaygroup']); $profile_link = build_profile_link($buddy_name, $buddy['uid'], '_blank', 'if(window.opener) { window.opener.location = this.href; return false; }');
|
if($mybb->user['receivepms'] != 0 && $buddy['receivepms'] != 0 && $buddy['canusepms'] != 0)
| if($mybb->user['receivepms'] != 0 && $buddy['receivepms'] != 0 && $groupscache[$buddy['usergroup']]['canusepms'] != 0)
|
{ eval("\$send_pm = \"".$templates->get("misc_buddypopup_user_sendpm")."\";"); }
| { eval("\$send_pm = \"".$templates->get("misc_buddypopup_user_sendpm")."\";"); }
|
Zeile 350 | Zeile 358 |
---|
if($buddy['avatar']) {
|
if($buddy['avatar']) {
|
| $buddy['avatar'] = htmlspecialchars_uni($buddy['avatar']);
|
if($buddy['avatardimensions']) { require_once MYBB_ROOT."inc/functions_image.php";
| if($buddy['avatardimensions']) { require_once MYBB_ROOT."inc/functions_image.php";
|