Zeile 108 | Zeile 108 |
---|
error($lang->invalid_post_code); }
|
error($lang->invalid_post_code); }
|
my_unsetcookie("forumpass[".$mybb->input['fid']."]");
| my_unsetcookie("forumpass[".$mybb->get_input('fid', MyBB::INPUT_INT)."]");
|
redirect("index.php", $lang->redirect_forumpasscleared); } }
| redirect("index.php", $lang->redirect_forumpasscleared); } }
|
Zeile 192 | Zeile 192 |
---|
} }
|
} }
|
if($mybb->get_input('name', 1) != 1 && $mybb->get_input('document', 1) != 1)
| if($mybb->get_input('name', MyBB::INPUT_INT) != 1 && $mybb->get_input('document', MyBB::INPUT_INT) != 1)
|
{ error($lang->error_nosearchresults); }
|
{ error($lang->error_nosearchresults); }
|
if($mybb->get_input('document', 1) == 1)
| if($mybb->get_input('document', MyBB::INPUT_INT) == 1)
|
{ $resulttype = "helpdoc"; }
| { $resulttype = "helpdoc"; }
|
Zeile 208 | Zeile 208 |
---|
$search_data = array( "keywords" => $mybb->get_input('keywords'),
|
$search_data = array( "keywords" => $mybb->get_input('keywords'),
|
"name" => $mybb->get_input('name', 1), "document" => $mybb->get_input('document', 1),
| "name" => $mybb->get_input('name', MyBB::INPUT_INT), "document" => $mybb->get_input('document', MyBB::INPUT_INT),
|
);
if($db->can_search == true)
| );
if($db->can_search == true)
|
Zeile 269 | Zeile 269 |
---|
// Work out pagination, which page we're at, as well as the limits. $perpage = $mybb->settings['threadsperpage'];
|
// Work out pagination, which page we're at, as well as the limits. $perpage = $mybb->settings['threadsperpage'];
|
$page = $mybb->get_input('page', 1);
| $page = $mybb->get_input('page', MyBB::INPUT_INT);
|
if($page > 0) { $start = ($page-1) * $perpage;
| if($page > 0) { $start = ($page-1) * $perpage;
|
Zeile 364 | Zeile 364 |
---|
$lang->load("customhelpdocs"); $lang->load("customhelpsections");
|
$lang->load("customhelpdocs"); $lang->load("customhelpsections");
|
$hid = $mybb->get_input('hid', 1);
| $hid = $mybb->get_input('hid', MyBB::INPUT_INT);
|
add_breadcrumb($lang->nav_helpdocs, "misc.php?action=help");
if($hid)
| add_breadcrumb($lang->nav_helpdocs, "misc.php?action=help");
if($hid)
|
Zeile 408 | Zeile 408 |
---|
if($lang->$langdocvar) { $helpdoc['document'] = $lang->$langdocvar;
|
if($lang->$langdocvar) { $helpdoc['document'] = $lang->$langdocvar;
|
if($langdocvar == "d3_document") { $helpdoc['document'] = $lang->sprintf($helpdoc['document'], $mybb->user['logoutkey']); }
| |
} }
|
} }
|
| if($helpdoc['hid'] == 3) { $helpdoc['document'] = $lang->sprintf($helpdoc['document'], $mybb->post_code); }
|
add_breadcrumb($helpdoc['name']);
$plugins->run_hooks("misc_help_helpdoc_end");
| add_breadcrumb($helpdoc['name']);
$plugins->run_hooks("misc_help_helpdoc_end");
|
Zeile 522 | Zeile 523 |
---|
{ $buddies = $mybb->user['buddylist']; $namesarray = explode(",", $buddies);
|
{ $buddies = $mybb->user['buddylist']; $namesarray = explode(",", $buddies);
|
$mybb->input['removebuddy'] = $mybb->get_input('removebuddy', 1);
| $mybb->input['removebuddy'] = $mybb->get_input('removebuddy', MyBB::INPUT_INT);
|
if(is_array($namesarray)) { foreach($namesarray as $key => $buddyid)
| if(is_array($namesarray)) { foreach($namesarray as $key => $buddyid)
|
Zeile 567 | Zeile 568 |
---|
$last_active = $lang->sprintf($lang->last_active, $lang->never); }
|
$last_active = $lang->sprintf($lang->last_active, $lang->never); }
|
$buddy['avatar'] = format_avatar(htmlspecialchars_uni($buddy['avatar']), $buddy['avatardimensions'], '44x44');
| $buddy['avatar'] = format_avatar($buddy['avatar'], $buddy['avatardimensions'], '44x44');
|
if($buddy['lastactive'] > $timecut && ($buddy['invisible'] == 0 || $mybb->user['usergroup'] == 4) && $buddy['lastvisit'] != $buddy['lastactive']) {
| if($buddy['lastactive'] > $timecut && ($buddy['invisible'] == 0 || $mybb->user['usergroup'] == 4) && $buddy['lastvisit'] != $buddy['lastactive']) {
|
Zeile 615 | Zeile 616 |
---|
$numposts = 0; $altbg = alt_trow(); $whoposted = '';
|
$numposts = 0; $altbg = alt_trow(); $whoposted = '';
|
$tid = $mybb->get_input('tid', 1);
| $tid = $mybb->get_input('tid', MyBB::INPUT_INT);
|
$thread = get_thread($tid);
// Make sure we are looking at a real thread here.
| $thread = get_thread($tid);
// Make sure we are looking at a real thread here.
|
Zeile 625 | Zeile 626 |
---|
}
if(is_moderator($thread['fid'], "canviewunapprove"))
|
}
if(is_moderator($thread['fid'], "canviewunapprove"))
|
{
| {
|
$ismod = true; $show_posts = "(p.visible = '1' OR p.visible = '0')";
|
$ismod = true; $show_posts = "(p.visible = '1' OR p.visible = '0')";
|
}
| }
|
else { $ismod = false; $show_posts = "p.visible = '1'";
|
else { $ismod = false; $show_posts = "p.visible = '1'";
|
}
| }
|
// Make sure we are looking at a real thread here. if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))
| // Make sure we are looking at a real thread here. if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))
|
Zeile 651 | Zeile 652 |
---|
$forumpermissions = forum_permissions($forum['fid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 || (isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $thread['uid'] != $mybb->user['uid']))
|
$forumpermissions = forum_permissions($forum['fid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 || (isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $thread['uid'] != $mybb->user['uid']))
|
{
| {
|
error_no_permission(); }
|
error_no_permission(); }
|
|
|
// Check if this forum is password protected and we have a valid password check_forum_password($forum['fid']);
if($mybb->get_input('sort') != 'username')
|
// Check if this forum is password protected and we have a valid password check_forum_password($forum['fid']);
if($mybb->get_input('sort') != 'username')
|
{
| {
|
$sortsql = ' ORDER BY posts DESC'; } else
| $sortsql = ' ORDER BY posts DESC'; } else
|
Zeile 695 | Zeile 696 |
---|
$poster['posts'] = my_number_format($poster['posts']); eval("\$whop = \"".$templates->get("misc_whoposted", 1, 0)."\";"); echo $whop;
|
$poster['posts'] = my_number_format($poster['posts']); eval("\$whop = \"".$templates->get("misc_whoposted", 1, 0)."\";"); echo $whop;
|
exit; }
| exit; }
|
elseif($mybb->input['action'] == "smilies") { $smilies = '';
| elseif($mybb->input['action'] == "smilies") { $smilies = '';
|
Zeile 712 | Zeile 713 |
---|
$extra_class = ' smilie_pointer'; foreach($smilies_cache as $smilie) {
|
$extra_class = ' smilie_pointer'; foreach($smilies_cache as $smilie) {
|
| $smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']); $smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image'])); $smilie['name'] = htmlspecialchars_uni($smilie['name']);
|
// Only show the first text to replace in the box $temp = explode("\n", $smilie['find']); // use temporary variable for php 5.3 compatibility $smilie['find'] = $temp[0];
|
// Only show the first text to replace in the box $temp = explode("\n", $smilie['find']); // use temporary variable for php 5.3 compatibility $smilie['find'] = $temp[0];
|
$smilie['insert'] = addslashes($smilie['find']);
| |
$smilie['find'] = htmlspecialchars_uni($smilie['find']);
|
$smilie['find'] = htmlspecialchars_uni($smilie['find']);
|
$onclick = " onclick=\"MyBBEditor.insertText('{$smilie['insert']}');\"";
| $smilie_insert = str_replace(array('\\', "'"), array('\\\\', "\'"), $smilie['find']);
$onclick = " onclick=\"MyBBEditor.insertText(' $smilie_insert ');\"";
|
eval('$smilie_image = "'.$templates->get('smilie', 1, 0).'";'); eval("\$smilies .= \"".$templates->get("misc_smilies_popup_smilie")."\";"); if($e == 2)
| eval('$smilie_image = "'.$templates->get('smilie', 1, 0).'";'); eval("\$smilies .= \"".$templates->get("misc_smilies_popup_smilie")."\";"); if($e == 2)
|
Zeile 750 | Zeile 756 |
---|
$extra_class = $onclick = ''; foreach($smilies_cache as $smilie) {
|
$extra_class = $onclick = ''; foreach($smilies_cache as $smilie) {
|
$smilie['find'] = htmlspecialchars_uni($smilie['find']);
| $smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']); $smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image'])); $smilie['name'] = htmlspecialchars_uni($smilie['name']); $smilie['find'] = nl2br(htmlspecialchars_uni($smilie['find']));
|
eval('$smilie_image = "'.$templates->get('smilie').'";'); eval("\$smilies .= \"".$templates->get("misc_smilies_smilie")."\";"); $class = alt_trow();
| eval('$smilie_image = "'.$templates->get('smilie').'";'); eval("\$smilies .= \"".$templates->get("misc_smilies_smilie")."\";"); $class = alt_trow();
|
Zeile 767 | Zeile 777 |
---|
{ error($lang->error_invalidimtype); }
|
{ error($lang->error_invalidimtype); }
|
$uid = $mybb->get_input('uid', 1);
| $uid = $mybb->get_input('uid', MyBB::INPUT_INT);
|
$user = get_user($uid);
if(!$user)
|
$user = get_user($uid);
if(!$user)
|
{
| {
|
error($lang->error_invaliduser); }
| error($lang->error_invaliduser); }
|
Zeile 781 | Zeile 791 |
---|
}
$settingkey = 'allow'.$mybb->input['imtype'].'field';
|
}
$settingkey = 'allow'.$mybb->input['imtype'].'field';
|
if(!($mybb->settings[$settingkey] == -1 || $mybb->settings[$settingkey] != '' && is_member($mybb->settings[$settingkey], $user)))
| if(!is_member($mybb->settings[$settingkey], $user))
|
{
|
{
|
error($lang->error_invaliduser);
| error_no_permission();
|
}
// Build IM navigation bar $navigationbar = $navsep = $imtype = $imtype_lang = ''; if($user['aim'])
|
}
// Build IM navigation bar $navigationbar = $navsep = $imtype = $imtype_lang = ''; if($user['aim'])
|
{
| {
|
$imtype = "aim"; $imtype_lang = $lang->aol_im; eval("\$navigationbar .= \"".$templates->get("misc_imcenter_nav")."\";");
| $imtype = "aim"; $imtype_lang = $lang->aol_im; eval("\$navigationbar .= \"".$templates->get("misc_imcenter_nav")."\";");
|
Zeile 827 | Zeile 837 |
---|
{ $plugins->run_hooks("misc_syndication_start");
|
{ $plugins->run_hooks("misc_syndication_start");
|
$fid = $mybb->get_input('fid', 1);
| $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
$version = $mybb->get_input('version');
|
$version = $mybb->get_input('version');
|
$limit = $mybb->get_input('limit', 1); $forums = $mybb->get_input('forums', 2);
| $limit = $mybb->get_input('limit', MyBB::INPUT_INT); $forums = $mybb->get_input('forums', MyBB::INPUT_ARRAY);
|
$limit = 15; $feedurl = ''; $add = false;
| $limit = 15; $feedurl = ''; $add = false;
|
Zeile 838 | Zeile 848 |
---|
add_breadcrumb($lang->nav_syndication); $unviewable = get_unviewable_forums(); $inactiveforums = get_inactive_forums();
|
add_breadcrumb($lang->nav_syndication); $unviewable = get_unviewable_forums(); $inactiveforums = get_inactive_forums();
|
| $unexp1 = explode(',', $unviewable); $unexp2 = explode(',', $inactiveforums); $unexp = array_merge($unexp1, $unexp2);
|
if(is_array($forums)) {
|
if(is_array($forums)) {
|
$unexp = explode(",", str_replace("'", '', $unviewable)); foreach($unexp as $fid) { $unview[$fid] = true; }
$unexp = explode(",", $inactiveforums);
| |
foreach($unexp as $fid) { $unview[$fid] = true;
| foreach($unexp as $fid) { $unview[$fid] = true;
|
Zeile 923 | Zeile 930 |
---|
$rss2check = ''; } else
|
$rss2check = ''; } else
|
{
| {
|
$atom1check = ''; $rss2check = "checked=\"checked\""; }
| $atom1check = ''; $rss2check = "checked=\"checked\""; }
|
Zeile 936 | Zeile 943 |
---|
} elseif($mybb->input['action'] == "clearcookies") {
|
} elseif($mybb->input['action'] == "clearcookies") {
|
| verify_post_check($mybb->get_input('my_post_key'));
|
$plugins->run_hooks("misc_clearcookies");
|
$plugins->run_hooks("misc_clearcookies");
|
if($mybb->get_input('key') != $mybb->user['logoutkey']) { error($lang->error_invalidkey); }
$remove_cookies = array('mybb', 'mybbuser', 'mybb[password]', 'mybb[lastvisit]', 'mybb[lastactive]', 'collapsed', 'mybb[forumread]', 'mybb[threadsread]', 'mybbadmin');
| $remove_cookies = array('mybbuser', 'mybb[announcements]', 'mybb[lastvisit]', 'mybb[lastactive]', 'collapsed', 'mybb[forumread]', 'mybb[threadsread]', 'mybbadmin', 'mybblang', 'mybbtheme', 'multiquote', 'mybb[readallforums]', 'coppauser', 'coppadob', 'mybb[referrer]');
|
foreach($remove_cookies as $name)
|
foreach($remove_cookies as $name)
|
{ @my_setcookie($name, '', TIME_NOW-1, $mybb->settings['cookiepath'], $mybb->settings['cookiedomain']); }
| { my_unsetcookie($name); }
|
redirect("index.php", $lang->redirect_cookiescleared); }
|
redirect("index.php", $lang->redirect_cookiescleared); }
|
function makesyndicateforums($pid="0", $selitem="", $addselect="1", $depth="", $permissions="")
| /** * Build a list of forums for RSS multiselect. * * @param int $pid Parent forum ID. * @param string $selitem deprecated * @param boolean $addselect Whether to add selected attribute or not. * @param string $depth HTML for the depth of the forum. * @return string HTML of the list of forums for CSS. */ function makesyndicateforums($pid=0, $selitem="", $addselect=true, $depth="")
|
{
|
{
|
global $db, $forumcache, $permissioncache, $mybb, $forumlist, $forumlistbits, $flist, $lang, $unviewable, $inactiveforums, $templates; static $unviewableforums;
| global $db, $forumcache, $permissioncache, $mybb, $forumlist, $forumlistbits, $flist, $lang, $unexp, $templates;
|
$pid = (int)$pid;
|
$pid = (int)$pid;
|
if(!$permissions) { $permissions = $mybb->usergroup; }
| $forumlist = '';
|
if(!is_array($forumcache)) {
| if(!is_array($forumcache)) {
|
Zeile 970 | Zeile 980 |
---|
while($forum = $db->fetch_array($query)) { $forumcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;
|
while($forum = $db->fetch_array($query)) { $forumcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;
|
} }
| } }
|
if(!is_array($permissioncache))
|
if(!is_array($permissioncache))
|
{
| {
|
$permissioncache = forum_permissions();
|
$permissioncache = forum_permissions();
|
}
if(!$unviewableforums) { // Save our unviewable forums in an array $unviewableforums = explode(",", str_replace("'", '', $unviewable.','.$inactiveforums));
| |
}
if(is_array($forumcache[$pid])) { foreach($forumcache[$pid] as $key => $main)
|
}
if(is_array($forumcache[$pid])) { foreach($forumcache[$pid] as $key => $main)
|
{
| {
|
foreach($main as $key => $forum) { $perms = $permissioncache[$forum['fid']]; if($perms['canview'] == 1 || $mybb->settings['hideprivateforums'] == 0) {
|
foreach($main as $key => $forum) { $perms = $permissioncache[$forum['fid']]; if($perms['canview'] == 1 || $mybb->settings['hideprivateforums'] == 0) {
|
| $optionselected = '';
|
if(isset($flist[$forum['fid']])) {
|
if(isset($flist[$forum['fid']])) {
|
$optionselected = "selected=\"selected\"";
| $optionselected = 'selected="selected"';
|
$selecteddone = "1";
|
$selecteddone = "1";
|
} else { $optionselected = ''; }
| }
|
|
|
if($forum['password'] == '' && !in_array($forum['fid'], $unviewableforums) || $forum['password'] && isset($mybb->cookies['forumpass'][$forum['fid']]) && $mybb->cookies['forumpass'][$forum['fid']] == md5($mybb->user['uid'].$forum['password']))
| if($forum['password'] == '' && !in_array($forum['fid'], $unexp) || $forum['password'] && isset($mybb->cookies['forumpass'][$forum['fid']]) && $mybb->cookies['forumpass'][$forum['fid']] === md5($mybb->user['uid'].$forum['password']))
|
{ $forumlistbits .= "<option value=\"{$forum['fid']}\" $optionselected>$depth {$forum['name']}</option>\n"; }
| { $forumlistbits .= "<option value=\"{$forum['fid']}\" $optionselected>$depth {$forum['name']}</option>\n"; }
|
Zeile 1011 | Zeile 1012 |
---|
if(!empty($forumcache[$forum['fid']])) { $newdepth = $depth." ";
|
if(!empty($forumcache[$forum['fid']])) { $newdepth = $depth." ";
|
$forumlistbits .= makesyndicateforums($forum['fid'], $selitem, 0, $newdepth, $perms);
| $forumlistbits .= makesyndicateforums($forum['fid'], '', 0, $newdepth);
|
} } } } }
|
} } } } }
|
|
|
if($addselect) {
|
if($addselect) {
|
| $addsel = '';
|
if(empty($selecteddone)) {
|
if(empty($selecteddone)) {
|
$addsel = " selected=\"selected\""; } else { $addsel = '';
| $addsel = ' selected="selected"';
|
}
eval("\$forumlist = \"".$templates->get("misc_syndication_forumlist")."\";");
| }
eval("\$forumlist = \"".$templates->get("misc_syndication_forumlist")."\";");
|