Zeile 187 | Zeile 187 |
---|
$plugins->run_hooks("usercp_do_profile_start");
|
$plugins->run_hooks("usercp_do_profile_start");
|
if($mybb->get_input('away', 1) == 1 && $mybb->settings['allowaway'] != 0)
| if($mybb->get_input('away', MyBB::INPUT_INT) == 1 && $mybb->settings['allowaway'] != 0)
|
{ $awaydate = TIME_NOW; if(!empty($mybb->input['awayday'])) { // If the user has indicated that they will return on a specific day, but not month or year, assume it is current month and year
|
{ $awaydate = TIME_NOW; if(!empty($mybb->input['awayday'])) { // If the user has indicated that they will return on a specific day, but not month or year, assume it is current month and year
|
if(!$mybb->get_input('awaymonth', 1))
| if(!$mybb->get_input('awaymonth', MyBB::INPUT_INT))
|
{ $mybb->input['awaymonth'] = my_date('n', $awaydate); }
|
{ $mybb->input['awaymonth'] = my_date('n', $awaydate); }
|
if(!$mybb->get_input('awayyear', 1))
| if(!$mybb->get_input('awayyear', MyBB::INPUT_INT))
|
{ $mybb->input['awayyear'] = my_date('Y', $awaydate); }
| { $mybb->input['awayyear'] = my_date('Y', $awaydate); }
|
Zeile 238 | Zeile 238 |
---|
}
$bday = array(
|
}
$bday = array(
|
"day" => $mybb->get_input('bday1', 1), "month" => $mybb->get_input('bday2', 1), "year" => $mybb->get_input('bday3', 1)
| "day" => $mybb->get_input('bday1', MyBB::INPUT_INT), "month" => $mybb->get_input('bday2', MyBB::INPUT_INT), "year" => $mybb->get_input('bday3', MyBB::INPUT_INT)
|
);
// Set up user handler.
| );
// Set up user handler.
|
Zeile 255 | Zeile 255 |
---|
"birthday" => $bday, "birthdayprivacy" => $mybb->get_input('birthdayprivacy'), "away" => $away,
|
"birthday" => $bday, "birthdayprivacy" => $mybb->get_input('birthdayprivacy'), "away" => $away,
|
"profile_fields" => $mybb->get_input('profile_fields', 2)
| "profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY)
|
); foreach(array('icq', 'aim', 'yahoo', 'skype', 'google') as $cfield) {
| ); foreach(array('icq', 'aim', 'yahoo', 'skype', 'google') as $cfield) {
|
Zeile 265 | Zeile 265 |
---|
continue; }
|
continue; }
|
if($mybb->settings[$csetting] != -1 && !is_member($mybb->settings[$csetting]))
| if(!is_member($mybb->settings[$csetting]))
|
{ continue; }
| { continue; }
|
Zeile 326 | Zeile 326 |
---|
{ $user = $mybb->input; $bday = array();
|
{ $user = $mybb->input; $bday = array();
|
$bday[0] = $mybb->get_input('bday1', 1); $bday[1] = $mybb->get_input('bday2', 1); $bday[2] = $mybb->get_input('bday3', 1);
| $bday[0] = $mybb->get_input('bday1', MyBB::INPUT_INT); $bday[1] = $mybb->get_input('bday2', MyBB::INPUT_INT); $bday[2] = $mybb->get_input('bday3', MyBB::INPUT_INT);
|
} else {
| } else {
|
Zeile 420 | Zeile 420 |
---|
continue; }
|
continue; }
|
if($mybb->settings[$csetting] != -1 && !is_member($mybb->settings[$csetting]))
| if(!is_member($mybb->settings[$csetting]))
|
{ continue; }
| { continue; }
|
Zeile 453 | Zeile 453 |
---|
$awaycheck[0] = "checked=\"checked\""; } $returndate = array();
|
$awaycheck[0] = "checked=\"checked\""; } $returndate = array();
|
$returndate[0] = $mybb->get_input('awayday', 1); $returndate[1] = $mybb->get_input('awaymonth', 1); $returndate[2] = $mybb->get_input('awayyear', 1);
| $returndate[0] = $mybb->get_input('awayday', MyBB::INPUT_INT); $returndate[1] = $mybb->get_input('awaymonth', MyBB::INPUT_INT); $returndate[2] = $mybb->get_input('awayyear', MyBB::INPUT_INT);
|
$user['awayreason'] = htmlspecialchars_uni($mybb->get_input('awayreason')); } else
| $user['awayreason'] = htmlspecialchars_uni($mybb->get_input('awayreason')); } else
|
Zeile 511 | Zeile 511 |
---|
// Custom profile fields baby! $altbg = "trow1"; $requiredfields = $customfields = '';
|
// Custom profile fields baby! $altbg = "trow1"; $requiredfields = $customfields = '';
|
$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', 2);
| $mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
|
$pfcache = $cache->read('profilefields');
| $pfcache = $cache->read('profilefields');
|
Zeile 519 | Zeile 519 |
---|
{ foreach($pfcache as $profilefield) {
|
{ foreach($pfcache as $profilefield) {
|
if(empty($profilefield['editableby']) || ($profilefield['editableby'] != -1 && !is_member($profilefield['editableby']))) { continue; }
// Does this field have a minimum post count? if($profilefield['postnum'] && $profilefield['postnum'] > $mybb->user['postnum'])
| if(!is_member($profilefield['editableby']) || ($profilefield['postnum'] && $profilefield['postnum'] > $mybb->user['postnum']))
|
{ continue; }
| { continue; }
|
Zeile 609 | Zeile 603 |
---|
$val = trim($val); $val = str_replace("\n", "\\n", $val); $sel = "";
|
$val = trim($val); $val = str_replace("\n", "\\n", $val); $sel = "";
|
if($val == htmlspecialchars_uni($userfield)) { $sel = " selected=\"selected\""; }
| if($val == htmlspecialchars_uni($userfield)) { $sel = " selected=\"selected\""; }
|
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); }
| eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); }
|
Zeile 731 | Zeile 725 |
---|
} else {
|
} else {
|
$defaulttitle = $mybb->usergroup['usertitle'];
| $defaulttitle = htmlspecialchars_uni($mybb->usergroup['usertitle']);
|
}
$newtitle = ''; if(trim($user['usertitle']) == '')
|
}
$newtitle = ''; if(trim($user['usertitle']) == '')
|
{
| {
|
$lang->current_custom_usertitle = ''; } else
| $lang->current_custom_usertitle = ''; } else
|
Zeile 745 | Zeile 739 |
---|
{ $newtitle = htmlspecialchars_uni($user['usertitle']); $user['usertitle'] = $mybb->user['usertitle'];
|
{ $newtitle = htmlspecialchars_uni($user['usertitle']); $user['usertitle'] = $mybb->user['usertitle'];
|
} }
| } }
|
$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);
| $user['usertitle'] = htmlspecialchars_uni($user['usertitle']);
|
Zeile 766 | Zeile 760 |
---|
else { $customtitle = "";
|
else { $customtitle = "";
|
}
| }
|
if($mybb->usergroup['canchangewebsite'] == 1) {
| if($mybb->usergroup['canchangewebsite'] == 1) {
|
Zeile 777 | Zeile 771 |
---|
eval("\$editprofile = \"".$templates->get("usercp_profile")."\";"); output_page($editprofile);
|
eval("\$editprofile = \"".$templates->get("usercp_profile")."\";"); output_page($editprofile);
|
}
| }
|
if($mybb->input['action'] == "do_options" && $mybb->request_method == "post") {
| if($mybb->input['action'] == "do_options" && $mybb->request_method == "post") {
|
Zeile 792 | Zeile 786 |
---|
$user = array( "uid" => $mybb->user['uid'],
|
$user = array( "uid" => $mybb->user['uid'],
|
"style" => $mybb->get_input('style', 1), "dateformat" => $mybb->get_input('dateformat', 1), "timeformat" => $mybb->get_input('timeformat', 1),
| "style" => $mybb->get_input('style', MyBB::INPUT_INT), "dateformat" => $mybb->get_input('dateformat', MyBB::INPUT_INT), "timeformat" => $mybb->get_input('timeformat', MyBB::INPUT_INT),
|
"timezone" => $db->escape_string($mybb->get_input('timezoneoffset')), "language" => $mybb->get_input('language') );
$user['options'] = array(
|
"timezone" => $db->escape_string($mybb->get_input('timezoneoffset')), "language" => $mybb->get_input('language') );
$user['options'] = array(
|
"allownotices" => $mybb->get_input('allownotices', 1), "hideemail" => $mybb->get_input('hideemail', 1), "subscriptionmethod" => $mybb->get_input('subscriptionmethod', 1), "invisible" => $mybb->get_input('invisible', 1), "dstcorrection" => $mybb->get_input('dstcorrection', 1),
| "allownotices" => $mybb->get_input('allownotices', MyBB::INPUT_INT), "hideemail" => $mybb->get_input('hideemail', MyBB::INPUT_INT), "subscriptionmethod" => $mybb->get_input('subscriptionmethod', MyBB::INPUT_INT), "invisible" => $mybb->get_input('invisible', MyBB::INPUT_INT), "dstcorrection" => $mybb->get_input('dstcorrection', MyBB::INPUT_INT),
|
"threadmode" => $mybb->get_input('threadmode'),
|
"threadmode" => $mybb->get_input('threadmode'),
|
"showimages" => $mybb->get_input('showimages', 1), "showvideos" => $mybb->get_input('showvideos', 1), "showsigs" => $mybb->get_input('showsigs', 1), "showavatars" => $mybb->get_input('showavatars', 1), "showquickreply" => $mybb->get_input('showquickreply', 1), "receivepms" => $mybb->get_input('receivepms', 1), "pmnotice" => $mybb->get_input('pmnotice', 1), "receivefrombuddy" => $mybb->get_input('receivefrombuddy', 1), "daysprune" => $mybb->get_input('daysprune', 1), "showcodebuttons" => $mybb->get_input('showcodebuttons', 1), "sourceeditor" => $mybb->get_input('sourceeditor', 1), "pmnotify" => $mybb->get_input('pmnotify', 1), "buddyrequestspm" => $mybb->get_input('buddyrequestspm', 1), "buddyrequestsauto" => $mybb->get_input('buddyrequestsauto', 1), "showredirect" => $mybb->get_input('showredirect', 1), "classicpostbit" => $mybb->get_input('classicpostbit', 1)
| "showimages" => $mybb->get_input('showimages', MyBB::INPUT_INT), "showvideos" => $mybb->get_input('showvideos', MyBB::INPUT_INT), "showsigs" => $mybb->get_input('showsigs', MyBB::INPUT_INT), "showavatars" => $mybb->get_input('showavatars', MyBB::INPUT_INT), "showquickreply" => $mybb->get_input('showquickreply', MyBB::INPUT_INT), "receivepms" => $mybb->get_input('receivepms', MyBB::INPUT_INT), "pmnotice" => $mybb->get_input('pmnotice', MyBB::INPUT_INT), "receivefrombuddy" => $mybb->get_input('receivefrombuddy', MyBB::INPUT_INT), "daysprune" => $mybb->get_input('daysprune', MyBB::INPUT_INT), "showcodebuttons" => $mybb->get_input('showcodebuttons', MyBB::INPUT_INT), "sourceeditor" => $mybb->get_input('sourceeditor', MyBB::INPUT_INT), "pmnotify" => $mybb->get_input('pmnotify', MyBB::INPUT_INT), "buddyrequestspm" => $mybb->get_input('buddyrequestspm', MyBB::INPUT_INT), "buddyrequestsauto" => $mybb->get_input('buddyrequestsauto', MyBB::INPUT_INT), "showredirect" => $mybb->get_input('showredirect', MyBB::INPUT_INT), "classicpostbit" => $mybb->get_input('classicpostbit', MyBB::INPUT_INT)
|
);
if($mybb->settings['usertppoptions'])
|
);
if($mybb->settings['usertppoptions'])
|
{ $user['options']['tpp'] = $mybb->get_input('tpp', 1); }
| { $user['options']['tpp'] = $mybb->get_input('tpp', MyBB::INPUT_INT); }
|
if($mybb->settings['userpppoptions'])
|
if($mybb->settings['userpppoptions'])
|
{ $user['options']['ppp'] = $mybb->get_input('ppp', 1); }
| { $user['options']['ppp'] = $mybb->get_input('ppp', MyBB::INPUT_INT); }
|
$userhandler->set_data($user);
| $userhandler->set_data($user);
|
Zeile 842 | Zeile 836 |
---|
$errors = $userhandler->get_friendly_errors(); $errors = inline_error($errors); $mybb->input['action'] = "options";
|
$errors = $userhandler->get_friendly_errors(); $errors = inline_error($errors); $mybb->input['action'] = "options";
|
} else {
| } else {
|
$userhandler->update_user();
|
$userhandler->update_user();
|
|
|
$plugins->run_hooks("usercp_do_options_end");
redirect("usercp.php?action=options", $lang->redirect_optionsupdated);
|
$plugins->run_hooks("usercp_do_options_end");
redirect("usercp.php?action=options", $lang->redirect_optionsupdated);
|
}
| }
|
}
if($mybb->input['action'] == "options")
| }
if($mybb->input['action'] == "options")
|
Zeile 860 | Zeile 854 |
---|
if($errors != '') { $user = $mybb->input;
|
if($errors != '') { $user = $mybb->input;
|
}
| }
|
else { $user = $mybb->user; }
|
else { $user = $mybb->user; }
|
|
|
$languages = $lang->get_languages(); $board_language = $langoptions = ''; if(count($languages) > 1)
| $languages = $lang->get_languages(); $board_language = $langoptions = ''; if(count($languages) > 1)
|
Zeile 884 | Zeile 878 |
---|
}
eval('$board_language = "'.$templates->get('usercp_options_language').'";');
|
}
eval('$board_language = "'.$templates->get('usercp_options_language').'";');
|
}
| }
|
// Lets work out which options the user has selected and check the boxes if(isset($user['allownotices']) && $user['allownotices'] == 1) {
| // Lets work out which options the user has selected and check the boxes if(isset($user['allownotices']) && $user['allownotices'] == 1) {
|
Zeile 962 | Zeile 956 |
---|
if(isset($user['showavatars']) && $user['showavatars'] == 1) { $showavatarscheck = "checked=\"checked\"";
|
if(isset($user['showavatars']) && $user['showavatars'] == 1) { $showavatarscheck = "checked=\"checked\"";
|
} else
| } else
|
{ $showavatarscheck = ""; }
| { $showavatarscheck = ""; }
|
Zeile 972 | Zeile 966 |
---|
{ $showquickreplycheck = "checked=\"checked\""; }
|
{ $showquickreplycheck = "checked=\"checked\""; }
|
else { $showquickreplycheck = ""; }
if(isset($user['receivepms']) && $user['receivepms'] == 1)
| else { $showquickreplycheck = ""; }
if(isset($user['receivepms']) && $user['receivepms'] == 1)
|
{ $receivepmscheck = "checked=\"checked\""; }
| { $receivepmscheck = "checked=\"checked\""; }
|
Zeile 993 | Zeile 987 |
---|
else { $receivefrombuddycheck = "";
|
else { $receivefrombuddycheck = "";
|
}
| }
|
if(isset($user['pmnotice']) && $user['pmnotice'] >= 1) {
| if(isset($user['pmnotice']) && $user['pmnotice'] >= 1) {
|
Zeile 1002 | Zeile 996 |
---|
else { $pmnoticecheck = "";
|
else { $pmnoticecheck = "";
|
}
| }
|
$dst_auto_selected = $dst_enabled_selected = $dst_disabled_selected = ''; if(isset($user['dstcorrection']) && $user['dstcorrection'] == 2) {
| $dst_auto_selected = $dst_enabled_selected = $dst_disabled_selected = ''; if(isset($user['dstcorrection']) && $user['dstcorrection'] == 2) {
|
Zeile 1080 | Zeile 1074 |
---|
if(isset($user['classicpostbit']) && $user['classicpostbit'] != 0) { $classicpostbitcheck = "checked=\"checked\"";
|
if(isset($user['classicpostbit']) && $user['classicpostbit'] != 0) { $classicpostbitcheck = "checked=\"checked\"";
|
} else {
| } else {
|
$classicpostbitcheck = ''; }
| $classicpostbitcheck = ''; }
|
Zeile 1091 | Zeile 1085 |
---|
{ $selected = ''; if(isset($user['dateformat']) && $user['dateformat'] == $key)
|
{ $selected = ''; if(isset($user['dateformat']) && $user['dateformat'] == $key)
|
{ $selected = " selected=\"selected\"";
| { $selected = " selected=\"selected\"";
|
}
$dateformat = my_date($format, TIME_NOW, "", 0); eval("\$date_format_options .= \"".$templates->get("usercp_options_date_format")."\";");
|
}
$dateformat = my_date($format, TIME_NOW, "", 0); eval("\$date_format_options .= \"".$templates->get("usercp_options_date_format")."\";");
|
}
| }
|
$time_format_options = $timeformat = ''; foreach($time_formats as $key => $format)
| $time_format_options = $timeformat = ''; foreach($time_formats as $key => $format)
|
Zeile 1107 | Zeile 1101 |
---|
{ $selected = " selected=\"selected\""; }
|
{ $selected = " selected=\"selected\""; }
|
|
|
$timeformat = my_date($format, TIME_NOW, "", 0); eval("\$time_format_options .= \"".$templates->get("usercp_options_time_format")."\";");
|
$timeformat = my_date($format, TIME_NOW, "", 0); eval("\$time_format_options .= \"".$templates->get("usercp_options_time_format")."\";");
|
}
$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);
| }
$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);
|
$pms_from_buddys = ''; if($mybb->settings['allowbuddyonly'] == 1)
| $pms_from_buddys = ''; if($mybb->settings['allowbuddyonly'] == 1)
|
Zeile 1122 | Zeile 1116 |
---|
$threadview = array('linear' => '', 'threaded' => ''); if(isset($user['threadmode']) && is_scalar($user['threadmode']))
|
$threadview = array('linear' => '', 'threaded' => ''); if(isset($user['threadmode']) && is_scalar($user['threadmode']))
|
{
| {
|
$threadview[$user['threadmode']] = 'selected="selected"'; } $daysprunesel = array(1 => '', 5 => '', 10 => '', 20 => '', 50 => '', 75 => '', 100 => '', 365 => '', 9999 => '');
| $threadview[$user['threadmode']] = 'selected="selected"'; } $daysprunesel = array(1 => '', 5 => '', 10 => '', 20 => '', 50 => '', 75 => '', 100 => '', 365 => '', 9999 => '');
|
Zeile 1131 | Zeile 1125 |
---|
$daysprunesel[$user['daysprune']] = 'selected="selected"'; } if(!isset($user['style']))
|
$daysprunesel[$user['daysprune']] = 'selected="selected"'; } if(!isset($user['style']))
|
{
| {
|
$user['style'] = ''; }
| $user['style'] = ''; }
|
Zeile 1161 | Zeile 1155 |
---|
$tpp_option = $lang->sprintf($lang->tpp_option, $val); eval("\$tppoptions .= \"".$templates->get("usercp_options_tppselect_option")."\";");
|
$tpp_option = $lang->sprintf($lang->tpp_option, $val); eval("\$tppoptions .= \"".$templates->get("usercp_options_tppselect_option")."\";");
|
} }
| } }
|
eval("\$tppselect = \"".$templates->get("usercp_options_tppselect")."\";"); }
if($mybb->settings['userpppoptions'])
|
eval("\$tppselect = \"".$templates->get("usercp_options_tppselect")."\";"); }
if($mybb->settings['userpppoptions'])
|
{
| {
|
$explodedppp = explode(",", $mybb->settings['userpppoptions']); $pppoptions = $ppp_option = ''; if(is_array($explodedppp))
| $explodedppp = explode(",", $mybb->settings['userpppoptions']); $pppoptions = $ppp_option = ''; if(is_array($explodedppp))
|
Zeile 1186 | Zeile 1180 |
---|
} } eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");
|
} } eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");
|
}
| }
|
$plugins->run_hooks("usercp_options_end");
eval("\$editprofile = \"".$templates->get("usercp_options")."\";");
| $plugins->run_hooks("usercp_options_end");
eval("\$editprofile = \"".$templates->get("usercp_options")."\";");
|
Zeile 1202 | Zeile 1196 |
---|
$errors = array();
$plugins->run_hooks("usercp_do_email_start");
|
$errors = array();
$plugins->run_hooks("usercp_do_email_start");
|
if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('password')) == false) { $errors[] = $lang->error_invalidpassword; } else { // Set up user handler. require_once "inc/datahandlers/user.php"; $userhandler = new UserDataHandler("update");
$user = array( "uid" => $mybb->user['uid'],
| if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('password')) == false) { $errors[] = $lang->error_invalidpassword; } else { // Set up user handler. require_once "inc/datahandlers/user.php"; $userhandler = new UserDataHandler("update");
$user = array( "uid" => $mybb->user['uid'],
|
"email" => $mybb->get_input('email'), "email2" => $mybb->get_input('email2') );
| "email" => $mybb->get_input('email'), "email2" => $mybb->get_input('email2') );
|
Zeile 1291 | Zeile 1285 |
---|
}
if($mybb->input['action'] == "do_password" && $mybb->request_method == "post")
|
}
if($mybb->input['action'] == "do_password" && $mybb->request_method == "post")
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$errors = array();
| { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$errors = array();
|
$plugins->run_hooks("usercp_do_password_start"); if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('oldpassword')) == false)
| $plugins->run_hooks("usercp_do_password_start"); if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('oldpassword')) == false)
|
Zeile 1418 | Zeile 1412 |
---|
$plugins->run_hooks("usercp_do_subscriptions_start");
if(!isset($mybb->input['check']) || !is_array($mybb->input['check']))
|
$plugins->run_hooks("usercp_do_subscriptions_start");
if(!isset($mybb->input['check']) || !is_array($mybb->input['check']))
|
{
| {
|
error($lang->no_subscriptions_selected); }
// Clean input - only accept integers thanks!
|
error($lang->no_subscriptions_selected); }
// Clean input - only accept integers thanks!
|
$mybb->input['check'] = array_map('intval', $mybb->get_input('check', 2));
| $mybb->input['check'] = array_map('intval', $mybb->get_input('check', MyBB::INPUT_ARRAY));
|
$tids = implode(",", $mybb->input['check']);
// Deleting these subscriptions?
| $tids = implode(",", $mybb->input['check']);
// Deleting these subscriptions?
|
Zeile 1482 | Zeile 1476 |
---|
}
$perpage = $mybb->settings['threadsperpage'];
|
}
$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 1542 | Zeile 1536 |
---|
if($sids) { $db->delete_query("threadsubscriptions", "sid IN ({$sids}) AND uid='{$mybb->user['uid']}'");
|
if($sids) { $db->delete_query("threadsubscriptions", "sid IN ({$sids}) AND uid='{$mybb->user['uid']}'");
|
}
| }
|
$threadcount = $threadcount - count($del_subscriptions);
if($threadcount < 0) { $threadcount = 0;
|
$threadcount = $threadcount - count($del_subscriptions);
if($threadcount < 0) { $threadcount = 0;
|
}
| }
|
}
if(!empty($subscriptions))
| }
if(!empty($subscriptions))
|
Zeile 1559 | Zeile 1553 |
---|
if($mybb->user['uid'] == 0) { // Build a forum cache.
|
if($mybb->user['uid'] == 0) { // Build a forum cache.
|
$query = $db->query(" SELECT fid FROM ".TABLE_PREFIX."forums WHERE active != 0 ORDER BY pid, disporder ");
| $query = $db->simple_select('forums', 'fid', 'active != 0', array('order_by' => 'pid, disporder'));
|
$forumsread = my_unserialize($mybb->cookies['mybb']['forumread']); }
| $forumsread = my_unserialize($mybb->cookies['mybb']['forumread']); }
|
Zeile 1589 | Zeile 1578 |
---|
} } $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) {
| // Check participation by the current user in any of these threads - for 'dot' folder icons if($mybb->settings['dotfolders'] != 0) {
|
Zeile 1712 | Zeile 1701 |
---|
{ $lastread = $forum_read; }
|
{ $lastread = $forum_read; }
|
}
| }
|
if($lastread && $lastread < $thread['lastpost']) { $folder .= "new";
| if($lastread && $lastread < $thread['lastpost']) { $folder .= "new";
|
Zeile 1836 | Zeile 1825 |
---|
{ $forum['lastread'] = $forumsread[$forum['fid']]; }
|
{ $forum['lastread'] = $forumsread[$forum['fid']]; }
|
}
| }
|
$readforums[$forum['fid']] = $forum['lastread']; }
| $readforums[$forum['fid']] = $forum['lastread']; }
|
Zeile 1860 | Zeile 1849 |
---|
$forumpermissions = $fpermissions[$forum['fid']];
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
|
$forumpermissions = $fpermissions[$forum['fid']];
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
|
{
| {
|
continue; }
| continue; }
|
Zeile 1876 | Zeile 1865 |
---|
{ $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($forum['lastpost'] == 0 || $forum['lastposter'] == "") { eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_never")."\";");
| if($forum['lastpost'] == 0 || $forum['lastposter'] == "") { eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_never")."\";");
|
Zeile 2255 | Zeile 2244 |
---|
$avatarurl = htmlspecialchars_uni($mybb->user['avatar']); }
|
$avatarurl = htmlspecialchars_uni($mybb->user['avatar']); }
|
$useravatar = format_avatar(htmlspecialchars_uni($mybb->user['avatar']), $mybb->user['avatardimensions'], '100x100');
| $useravatar = format_avatar($mybb->user['avatar'], $mybb->user['avatardimensions'], '100x100');
|
eval("\$currentavatar = \"".$templates->get("usercp_avatar_current")."\";");
if($mybb->settings['maxavatardims'] != "")
| eval("\$currentavatar = \"".$templates->get("usercp_avatar_current")."\";");
if($mybb->settings['maxavatardims'] != "")
|
Zeile 2309 | Zeile 2298 |
---|
verify_post_check($mybb->get_input('my_post_key'));
// Validate request
|
verify_post_check($mybb->get_input('my_post_key'));
// Validate request
|
$query = $db->simple_select('buddyrequests', '*', 'id='.(int)$mybb->input['id'].' AND touid='.(int)$mybb->user['uid']);
| $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)) {
| $request = $db->fetch_array($query); if(empty($request)) {
|
Zeile 2413 | Zeile 2402 |
---|
verify_post_check($mybb->get_input('my_post_key')); // Validate request
|
verify_post_check($mybb->get_input('my_post_key')); // Validate request
|
$query = $db->simple_select('buddyrequests', '*', 'id='.(int)$mybb->input['id'].' AND touid='.(int)$mybb->user['uid']);
| $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)) {
| $request = $db->fetch_array($query); if(empty($request)) {
|
Zeile 2442 | Zeile 2431 |
---|
verify_post_check($mybb->get_input('my_post_key')); // Validate request
|
verify_post_check($mybb->get_input('my_post_key')); // Validate request
|
$query = $db->simple_select('buddyrequests', '*', 'id='.(int)$mybb->input['id'].' AND uid='.(int)$mybb->user['uid']);
| $query = $db->simple_select('buddyrequests', '*', 'id='.$mybb->get_input('id', MyBB::INPUT_INT).' AND uid='.(int)$mybb->user['uid']);
|
$request = $db->fetch_array($query); if(empty($request)) {
| $request = $db->fetch_array($query); if(empty($request)) {
|
Zeile 2537 | Zeile 2526 |
---|
while($req = $db->fetch_array($query)) { $requests_rec[$req['uid']] = true;
|
while($req = $db->fetch_array($query)) { $requests_rec[$req['uid']] = true;
|
}
| }
|
$sent = false;
// Fetch out new users if(count($users) > 0) {
|
$sent = false;
// Fetch out new users if(count($users) > 0) {
|
$query = $db->simple_select("users", "uid,buddyrequestsauto,buddyrequestspm,language", "LOWER(username) IN ('".my_strtolower(implode("','", $users))."')");
| switch($db->type) { case 'mysql': case 'mysqli': $field = 'username'; break; default: $field = 'LOWER(username)'; break; } $query = $db->simple_select("users", "uid,buddyrequestsauto,buddyrequestspm,language", "{$field} IN ('".my_strtolower(implode("','", $users))."')");
|
while($user = $db->fetch_array($query)) { ++$found_users;
|
while($user = $db->fetch_array($query)) { ++$found_users;
|
|
|
// Make sure we're not adding a duplicate if(in_array($user['uid'], $existing_users) || in_array($user['uid'], $selected_list)) { if($mybb->get_input('manage') == "ignored")
|
// Make sure we're not adding a duplicate if(in_array($user['uid'], $existing_users) || in_array($user['uid'], $selected_list)) { if($mybb->get_input('manage') == "ignored")
|
{
| {
|
$error_message = "ignore"; } else
| $error_message = "ignore"; } else
|
Zeile 2578 | Zeile 2577 |
---|
if($mybb->get_input('manage') != "ignored") { $error_message = $lang->users_already_sent_request;
|
if($mybb->get_input('manage') != "ignored") { $error_message = $lang->users_already_sent_request;
|
}
| }
|
elseif($mybb->get_input('manage') == "ignored") { $error_message = $lang->users_already_sent_request_alt;
|
elseif($mybb->get_input('manage') == "ignored") { $error_message = $lang->users_already_sent_request_alt;
|
} array_pop($users); // To maintain a proper count when we call count($users) continue; }
| } array_pop($users); // To maintain a proper count when we call count($users) continue; }
|
if(isset($requests_rec[$user['uid']])) {
| if(isset($requests_rec[$user['uid']])) {
|
Zeile 2598 | Zeile 2597 |
---|
{ $error_message = $lang->users_already_rec_request_alt; }
|
{ $error_message = $lang->users_already_rec_request_alt; }
|
|
|
array_pop($users); // To maintain a proper count when we call count($users) continue; }
| array_pop($users); // To maintain a proper count when we call count($users) continue; }
|
Zeile 2611 | Zeile 2610 |
---|
$pm = array( 'subject' => 'buddyrequest_new_buddy', 'message' => 'buddyrequest_new_buddy_message',
|
$pm = array( 'subject' => 'buddyrequest_new_buddy', 'message' => 'buddyrequest_new_buddy_message',
|
'touid' => $user['uid'], 'receivepms' => (int)$user['buddyrequestspm'], 'language' => $user['language'], 'language_file' => 'usercp' ); send_pm($pm); }
| 'touid' => $user['uid'], 'receivepms' => (int)$user['buddyrequestspm'], 'language' => $user['language'], 'language_file' => 'usercp' ); send_pm($pm); }
|
elseif($user['buddyrequestsauto'] != 1 && $mybb->get_input('manage') != "ignored") { // Send request
| elseif($user['buddyrequestsauto'] != 1 && $mybb->get_input('manage') != "ignored") { // Send request
|
Zeile 2659 | Zeile 2658 |
---|
if($mybb->get_input('manage') == "ignored") { $message = $lang->users_added_to_ignore_list;
|
if($mybb->get_input('manage') == "ignored") { $message = $lang->users_added_to_ignore_list;
|
}
| }
|
else { $message = $lang->users_added_to_buddy_list;
|
else { $message = $lang->users_added_to_buddy_list;
|
} }
| } }
|
if($adding_self == true) { if($mybb->get_input('manage') == "ignored")
|
if($adding_self == true) { if($mybb->get_input('manage') == "ignored")
|
{
| {
|
$error_message = $lang->cant_add_self_to_ignore_list; } else
| $error_message = $lang->cant_add_self_to_ignore_list; } else
|
Zeile 2679 | Zeile 2678 |
---|
}
if(count($existing_users) == 0)
|
}
if(count($existing_users) == 0)
|
{
| {
|
$message = ""; if($sent === true)
| $message = ""; if($sent === true)
|
Zeile 2690 | Zeile 2689 |
---|
}
// Removing a user from this list
|
}
// Removing a user from this list
|
else if($mybb->get_input('delete', 1))
| else if($mybb->get_input('delete', MyBB::INPUT_INT))
|
{ // Check if user exists on the list
|
{ // Check if user exists on the list
|
$key = array_search($mybb->get_input('delete', 1), $existing_users);
| $key = array_search($mybb->get_input('delete', MyBB::INPUT_INT), $existing_users);
|
if($key !== false) { unset($existing_users[$key]);
|
if($key !== false) { unset($existing_users[$key]);
|
$user = get_user($mybb->get_input('delete', 1));
| $user = get_user($mybb->get_input('delete', MyBB::INPUT_INT));
|
if(!empty($user)) { // We want to remove us from this user's buddy list if($user['buddylist'] != '')
|
if(!empty($user)) { // We want to remove us from this user's buddy list if($user['buddylist'] != '')
|
{
| {
|
$user['buddylist'] = explode(',', $user['buddylist']); } else
|
$user['buddylist'] = explode(',', $user['buddylist']); } else
|
{
| {
|
$user['buddylist'] = array();
|
$user['buddylist'] = array();
|
} $key = array_search((int)$mybb->input['delete'], $user['buddylist']); unset($user['buddylist'][$key]);
| } $key = array_search($mybb->get_input('delete', MyBB::INPUT_INT), $user['buddylist']); unset($user['buddylist'][$key]);
|
// Now we have the new list, so throw it all back together $new_list = implode(",", $user['buddylist']);
| // Now we have the new list, so throw it all back together $new_list = implode(",", $user['buddylist']);
|
Zeile 2732 | Zeile 2731 |
---|
$user['buddylist'] = $db->escape_string($new_list); $db->update_query("users", array('buddylist' => $user['buddylist']), "uid='".(int)$user['uid']."'");
|
$user['buddylist'] = $db->escape_string($new_list); $db->update_query("users", array('buddylist' => $user['buddylist']), "uid='".(int)$user['uid']."'");
|
}
| }
|
if($mybb->get_input('manage') == "ignored") { $message = $lang->removed_from_ignore_list;
|
if($mybb->get_input('manage') == "ignored") { $message = $lang->removed_from_ignore_list;
|
}
| }
|
else { $message = $lang->removed_from_buddy_list; } $message = $lang->sprintf($message, $user['username']);
|
else { $message = $lang->removed_from_buddy_list; } $message = $lang->sprintf($message, $user['username']);
|
} }
| } }
|
// Now we have the new list, so throw it all back together $new_list = implode(",", $existing_users);
| // Now we have the new list, so throw it all back together $new_list = implode(",", $existing_users);
|
Zeile 2802 | Zeile 2801 |
---|
$message_js .= " $.jGrowl('{$error_message}');"; }
|
$message_js .= " $.jGrowl('{$error_message}');"; }
|
if($mybb->get_input('delete', 1))
| if($mybb->get_input('delete', MyBB::INPUT_INT))
|
{ header("Content-type: text/javascript");
|
{ header("Content-type: text/javascript");
|
echo "$(\"#".$mybb->get_input('manage')."_".$mybb->get_input('delete', 1)."\").remove();\n";
| echo "$(\"#".$mybb->get_input('manage')."_".$mybb->get_input('delete', MyBB::INPUT_INT)."\").remove();\n";
|
if($new_list == "") { echo "\$(\"#".$mybb->get_input('manage')."_count\").html(\"0\");\n";
| if($new_list == "") { echo "\$(\"#".$mybb->get_input('manage')."_count\").html(\"0\");\n";
|
Zeile 2868 | Zeile 2867 |
---|
$lang->current_buddies = $lang->sprintf($lang->current_buddies, $buddy_count); if(!$buddy_list)
|
$lang->current_buddies = $lang->sprintf($lang->current_buddies, $buddy_count); if(!$buddy_list)
|
{
| {
|
eval("\$buddy_list = \"".$templates->get("usercp_editlists_no_buddies")."\";"); }
| eval("\$buddy_list = \"".$templates->get("usercp_editlists_no_buddies")."\";"); }
|
Zeile 2892 | Zeile 2891 |
---|
} eval("\$ignore_list .= \"".$templates->get("usercp_editlists_user")."\";"); ++$ignore_count;
|
} eval("\$ignore_list .= \"".$templates->get("usercp_editlists_user")."\";"); ++$ignore_count;
|
}
| }
|
}
$lang->current_ignored_users = $lang->sprintf($lang->current_ignored_users, $ignore_count); if(!$ignore_list)
|
}
$lang->current_ignored_users = $lang->sprintf($lang->current_ignored_users, $ignore_count); if(!$ignore_list)
|
{
| {
|
eval("\$ignore_list = \"".$templates->get("usercp_editlists_no_ignored")."\";"); }
| eval("\$ignore_list = \"".$templates->get("usercp_editlists_no_ignored")."\";"); }
|
Zeile 2908 | Zeile 2907 |
---|
{ echo $ignore_list; echo "<script type=\"text/javascript\"> $(\"#ignored_count\").html(\"{$ignore_count}\"); {$message_js}</script>";
|
{ echo $ignore_list; echo "<script type=\"text/javascript\"> $(\"#ignored_count\").html(\"{$ignore_count}\"); {$message_js}</script>";
|
} else
| } else
|
{ if(isset($sent) && $sent === true)
|
{ if(isset($sent) && $sent === true)
|
{
| {
|
$sent_rows = ''; $query = $db->query(" SELECT r.*, u.username
|
$sent_rows = ''; $query = $db->query(" SELECT r.*, u.username
|
FROM `".TABLE_PREFIX."buddyrequests` r LEFT JOIN `".TABLE_PREFIX."users` u ON (u.uid=r.touid) WHERE r.uid=".(int)$mybb->user['uid']." ");
| FROM ".TABLE_PREFIX."buddyrequests r LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=r.touid) WHERE r.uid=".(int)$mybb->user['uid']);
|
while($request = $db->fetch_array($query)) { $bgcolor = alt_trow();
| while($request = $db->fetch_array($query)) { $bgcolor = alt_trow();
|
Zeile 2948 | Zeile 2947 |
---|
} $received_rows = '';
|
} $received_rows = '';
|
$query = $db->query(" SELECT r.*, u.username FROM `".TABLE_PREFIX."buddyrequests` r LEFT JOIN `".TABLE_PREFIX."users` u ON (u.uid=r.uid) WHERE r.touid=".(int)$mybb->user['uid']." "); while($request = $db->fetch_array($query)) { $bgcolor = alt_trow();
| $query = $db->query(" SELECT r.*, u.username FROM ".TABLE_PREFIX."buddyrequests r LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=r.uid) WHERE r.touid=".(int)$mybb->user['uid']);
while($request = $db->fetch_array($query)) { $bgcolor = alt_trow();
|
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['uid']); $request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']); eval("\$received_rows .= \"".$templates->get("usercp_editlists_received_request")."\";");
| $request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['uid']); $request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']); eval("\$received_rows .= \"".$templates->get("usercp_editlists_received_request")."\";");
|
Zeile 2965 | Zeile 2964 |
---|
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(" SELECT r.*, u.username
|
$sent_rows = ''; $query = $db->query(" SELECT r.*, u.username
|
FROM `".TABLE_PREFIX."buddyrequests` r LEFT JOIN `".TABLE_PREFIX."users` u ON (u.uid=r.touid) WHERE r.uid=".(int)$mybb->user['uid']." ");
| FROM ".TABLE_PREFIX."buddyrequests r LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=r.touid) WHERE r.uid=".(int)$mybb->user['uid']);
|
while($request = $db->fetch_array($query)) { $bgcolor = alt_trow();
| while($request = $db->fetch_array($query)) { $bgcolor = alt_trow();
|
Zeile 3000 | Zeile 2999 |
---|
if($mybb->input['action'] == "drafts") { $plugins->run_hooks("usercp_drafts_start");
|
if($mybb->input['action'] == "drafts") { $plugins->run_hooks("usercp_drafts_start");
|
|
|
$query = $db->simple_select("posts", "COUNT(pid) AS draftcount", "visible='-2' AND uid='{$mybb->user['uid']}'"); $draftcount = $db->fetch_field($query, 'draftcount');
| $query = $db->simple_select("posts", "COUNT(pid) AS draftcount", "visible='-2' AND uid='{$mybb->user['uid']}'"); $draftcount = $db->fetch_field($query, 'draftcount');
|
Zeile 3041 | Zeile 3040 |
---|
$id = $draft['tid']; $type = "thread"; }
|
$id = $draft['tid']; $type = "thread"; }
|
|
|
$draft['subject'] = htmlspecialchars_uni($draft['subject']); $savedate = my_date('relative', $draft['dateline']); eval("\$drafts .= \"".$templates->get("usercp_drafts_draft")."\";");
| $draft['subject'] = htmlspecialchars_uni($draft['subject']); $savedate = my_date('relative', $draft['dateline']); eval("\$drafts .= \"".$templates->get("usercp_drafts_draft")."\";");
|
Zeile 3065 | Zeile 3064 |
---|
verify_post_check($mybb->get_input('my_post_key'));
$plugins->run_hooks("usercp_do_drafts_start");
|
verify_post_check($mybb->get_input('my_post_key'));
$plugins->run_hooks("usercp_do_drafts_start");
|
$mybb->input['deletedraft'] = $mybb->get_input('deletedraft', 2);
| $mybb->input['deletedraft'] = $mybb->get_input('deletedraft', MyBB::INPUT_ARRAY);
|
if(empty($mybb->input['deletedraft'])) { error($lang->no_drafts_selected);
| if(empty($mybb->input['deletedraft'])) { error($lang->no_drafts_selected);
|
Zeile 3115 | Zeile 3114 |
---|
$usergroups = $mybb->cache->read('usergroups');
// Changing our display group
|
$usergroups = $mybb->cache->read('usergroups');
// Changing our display group
|
if($mybb->get_input('displaygroup', 1))
| if($mybb->get_input('displaygroup', MyBB::INPUT_INT))
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
Zeile 3125 | Zeile 3124 |
---|
error($lang->not_member_of_group); }
|
error($lang->not_member_of_group); }
|
$dispgroup = $usergroups[$mybb->get_input('displaygroup', 1)];
| $dispgroup = $usergroups[$mybb->get_input('displaygroup', MyBB::INPUT_INT)];
|
if($dispgroup['candisplaygroup'] != 1) { error($lang->cannot_set_displaygroup); }
|
if($dispgroup['candisplaygroup'] != 1) { error($lang->cannot_set_displaygroup); }
|
$db->update_query("users", array('displaygroup' => $mybb->get_input('displaygroup', 1)), "uid='".$mybb->user['uid']."'");
| $db->update_query("users", array('displaygroup' => $mybb->get_input('displaygroup', MyBB::INPUT_INT)), "uid='".$mybb->user['uid']."'");
|
$cache->update_moderators(); $plugins->run_hooks("usercp_usergroups_change_displaygroup"); redirect("usercp.php?action=usergroups", $lang->display_group_changed);
| $cache->update_moderators(); $plugins->run_hooks("usercp_usergroups_change_displaygroup"); redirect("usercp.php?action=usergroups", $lang->display_group_changed);
|
Zeile 3138 | Zeile 3137 |
---|
}
// Leaving a group
|
}
// Leaving a group
|
if($mybb->get_input('leavegroup', 1))
| if($mybb->get_input('leavegroup', MyBB::INPUT_INT))
|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(my_strpos($ingroups, ",".$mybb->get_input('leavegroup', 1).",") === false)
| if(my_strpos($ingroups, ",".$mybb->get_input('leavegroup', MyBB::INPUT_INT).",") === false)
|
{ error($lang->not_member_of_group); }
|
{ error($lang->not_member_of_group); }
|
if($mybb->user['usergroup'] == $mybb->get_input('leavegroup', 1))
| if($mybb->user['usergroup'] == $mybb->get_input('leavegroup', MyBB::INPUT_INT))
|
{ error($lang->cannot_leave_primary_group); }
|
{ error($lang->cannot_leave_primary_group); }
|
$usergroup = $usergroups[$mybb->get_input('leavegroup', 1)];
| $usergroup = $usergroups[$mybb->get_input('leavegroup', MyBB::INPUT_INT)];
|
if($usergroup['type'] != 4 && $usergroup['type'] != 3 && $usergroup['type'] != 5) { error($lang->cannot_leave_group); }
|
if($usergroup['type'] != 4 && $usergroup['type'] != 3 && $usergroup['type'] != 5) { error($lang->cannot_leave_group); }
|
leave_usergroup($mybb->user['uid'], $mybb->get_input('leavegroup', 1));
| leave_usergroup($mybb->user['uid'], $mybb->get_input('leavegroup', MyBB::INPUT_INT));
|
$plugins->run_hooks("usercp_usergroups_leave_group"); redirect("usercp.php?action=usergroups", $lang->left_group); exit;
| $plugins->run_hooks("usercp_usergroups_leave_group"); redirect("usercp.php?action=usergroups", $lang->left_group); exit;
|
Zeile 3167 | Zeile 3166 |
---|
// List of usergroup leaders $query = $db->query("
|
// List of usergroup leaders $query = $db->query("
|
SELECT g.*, u.username, u.displaygroup, u.usergroup
| SELECT g.*, u.username, u.displaygroup, u.usergroup, u.email, u.language
|
FROM ".TABLE_PREFIX."groupleaders g LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=g.uid) ORDER BY u.username ASC
| FROM ".TABLE_PREFIX."groupleaders g LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=g.uid) ORDER BY u.username ASC
|
Zeile 3178 | Zeile 3177 |
---|
}
// Joining a group
|
}
// Joining a group
|
if($mybb->get_input('joingroup', 1))
| if($mybb->get_input('joingroup', MyBB::INPUT_INT))
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
$usergroup = $usergroups[$mybb->get_input('joingroup', 1)];
| $usergroup = $usergroups[$mybb->get_input('joingroup', MyBB::INPUT_INT)];
|
if($usergroup['type'] == 5) {
| if($usergroup['type'] == 5) {
|
Zeile 3195 | Zeile 3194 |
---|
error($lang->cannot_join_group); }
|
error($lang->cannot_join_group); }
|
if(my_strpos($ingroups, ",".$mybb->get_input('joingroup', 1).",") !== false)
| if(my_strpos($ingroups, ",".$mybb->get_input('joingroup', MyBB::INPUT_INT).",") !== false)
|
{ error($lang->already_member_of_group); }
|
{ error($lang->already_member_of_group); }
|
$query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('joingroup', 1)."'");
| $query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('joingroup', MyBB::INPUT_INT)."'");
|
$joinrequest = $db->fetch_array($query); if($joinrequest['rid']) {
| $joinrequest = $db->fetch_array($query); if($joinrequest['rid']) {
|
Zeile 3211 | Zeile 3210 |
---|
$now = TIME_NOW; $joinrequest = array( "uid" => $mybb->user['uid'],
|
$now = TIME_NOW; $joinrequest = array( "uid" => $mybb->user['uid'],
|
"gid" => $mybb->get_input('joingroup', 1),
| "gid" => $mybb->get_input('joingroup', MyBB::INPUT_INT),
|
"reason" => $db->escape_string($mybb->get_input('reason')), "dateline" => TIME_NOW );
$db->insert_query("joinrequests", $joinrequest);
|
"reason" => $db->escape_string($mybb->get_input('reason')), "dateline" => TIME_NOW );
$db->insert_query("joinrequests", $joinrequest);
|
foreach($groupleaders as $key => $groupleader)
| foreach($groupleaders[$usergroup['gid']] as $leader)
|
{
|
{
|
foreach($groupleader as $leader) { $leader_user = get_user($leader['uid']); // Load language $lang->set_language($leader_user['language']); $lang->load("messages");
| // Load language $lang->set_language($leader['language']); $lang->load("messages");
|
|
|
$subject = $lang->sprintf($lang->emailsubject_newjoinrequest, $mybb->settings['bbname']); $message = $lang->sprintf($lang->email_groupleader_joinrequest, $leader_user['username'], $mybb->user['username'], $usergroups[$leader['gid']]['title'], $mybb->settings['bbname'], $mybb->get_input('reason'), $mybb->settings['bburl'], $leader['gid']); my_mail($leader_user['email'], $subject, $message); }
| $subject = $lang->sprintf($lang->emailsubject_newjoinrequest, $mybb->settings['bbname']); $message = $lang->sprintf($lang->email_groupleader_joinrequest, $leader['username'], $mybb->user['username'], $usergroup['title'], $mybb->settings['bbname'], $mybb->get_input('reason'), $mybb->settings['bburl'], $leader['gid']); my_mail($leader['email'], $subject, $message);
|
}
// Load language
| }
// Load language
|
Zeile 3244 | Zeile 3238 |
---|
} elseif($usergroup['type'] == 4) {
|
} elseif($usergroup['type'] == 4) {
|
$joingroup = $mybb->get_input('joingroup', 1);
| $joingroup = $mybb->get_input('joingroup', MyBB::INPUT_INT);
|
eval("\$joinpage = \"".$templates->get("usercp_usergroups_joingroup")."\";"); output_page($joinpage); exit; } else {
|
eval("\$joinpage = \"".$templates->get("usercp_usergroups_joingroup")."\";"); output_page($joinpage); exit; } else {
|
join_usergroup($mybb->user['uid'], $mybb->get_input('joingroup', 1));
| join_usergroup($mybb->user['uid'], $mybb->get_input('joingroup', MyBB::INPUT_INT));
|
$plugins->run_hooks("usercp_usergroups_join_group"); redirect("usercp.php?action=usergroups", $lang->joined_group); } }
// Accepting invitation
|
$plugins->run_hooks("usercp_usergroups_join_group"); redirect("usercp.php?action=usergroups", $lang->joined_group); } }
// Accepting invitation
|
if($mybb->get_input('acceptinvite', 1))
| if($mybb->get_input('acceptinvite', MyBB::INPUT_INT))
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
$usergroup = $usergroups[$mybb->get_input('acceptinvite', 1)];
| $usergroup = $usergroups[$mybb->get_input('acceptinvite', MyBB::INPUT_INT)];
|
|
|
if(my_strpos($ingroups, ",".$mybb->get_input('acceptinvite', 1).",") !== false)
| if(my_strpos($ingroups, ",".$mybb->get_input('acceptinvite', MyBB::INPUT_INT).",") !== false)
|
{ error($lang->already_accepted_invite); }
|
{ error($lang->already_accepted_invite); }
|
$query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('acceptinvite', 1)."' AND invite='1'");
| $query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('acceptinvite', MyBB::INPUT_INT)."' AND invite='1'");
|
$joinrequest = $db->fetch_array($query); if($joinrequest['rid']) {
|
$joinrequest = $db->fetch_array($query); if($joinrequest['rid']) {
|
join_usergroup($mybb->user['uid'], $mybb->get_input('acceptinvite', 1)); $db->delete_query("joinrequests", "uid='{$mybb->user['uid']}' AND gid='".$mybb->get_input('acceptinvite', 1)."'");
| join_usergroup($mybb->user['uid'], $mybb->get_input('acceptinvite', MyBB::INPUT_INT)); $db->delete_query("joinrequests", "uid='{$mybb->user['uid']}' AND gid='".$mybb->get_input('acceptinvite', MyBB::INPUT_INT)."'");
|
$plugins->run_hooks("usercp_usergroups_accept_invite"); redirect("usercp.php?action=usergroups", $lang->joined_group); }
| $plugins->run_hooks("usercp_usergroups_accept_invite"); redirect("usercp.php?action=usergroups", $lang->joined_group); }
|
Zeile 3319 | Zeile 3313 |
---|
{ $memberlistlink = $moderaterequestslink = ''; eval("\$memberlistlink = \"".$templates->get("usercp_usergroups_leader_usergroup_memberlist")."\";");
|
{ $memberlistlink = $moderaterequestslink = ''; eval("\$memberlistlink = \"".$templates->get("usercp_usergroups_leader_usergroup_memberlist")."\";");
|
| $usergroup['title'] = htmlspecialchars_uni($usergroup['title']);
|
if($usergroup['type'] != 4) { $usergroup['joinrequests'] = '--';
| if($usergroup['type'] != 4) { $usergroup['joinrequests'] = '--';
|
Zeile 3340 | Zeile 3335 |
---|
// Fetch the list of groups the member is in // Do the primary group first $usergroup = $usergroups[$mybb->user['usergroup']];
|
// Fetch the list of groups the member is in // Do the primary group first $usergroup = $usergroups[$mybb->user['usergroup']];
|
| $usergroup['title'] = htmlspecialchars_uni($usergroup['title']); $usergroup['usertitle'] = htmlspecialchars_uni($usergroup['usertitle']); $usergroup['description'] = htmlspecialchars_uni($usergroup['description']);
|
eval("\$leavelink = \"".$templates->get("usercp_usergroups_memberof_usergroup_leaveprimary")."\";"); $trow = alt_trow(); if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup'])
| eval("\$leavelink = \"".$templates->get("usercp_usergroups_memberof_usergroup_leaveprimary")."\";"); $trow = alt_trow(); if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup'])
|
Zeile 3378 | Zeile 3376 |
---|
}
$description = '';
|
}
$description = '';
|
| $usergroup['title'] = htmlspecialchars_uni($usergroup['title']); $usergroup['usertitle'] = htmlspecialchars_uni($usergroup['usertitle']);
|
if($usergroup['description']) {
|
if($usergroup['description']) {
|
| $usergroup['description'] = htmlspecialchars_uni($usergroup['description']);
|
eval("\$description = \"".$templates->get("usercp_usergroups_memberof_usergroup_description")."\";"); } $trow = alt_trow();
| eval("\$description = \"".$templates->get("usercp_usergroups_memberof_usergroup_description")."\";"); } $trow = alt_trow();
|
Zeile 3421 | Zeile 3422 |
---|
$trow = alt_trow();
$description = '';
|
$trow = alt_trow();
$description = '';
|
| $usergroup['title'] = htmlspecialchars_uni($usergroup['title']);
|
if($usergroup['description']) {
|
if($usergroup['description']) {
|
| $usergroup['description'] = htmlspecialchars_uni($usergroup['description']);
|
eval("\$description = \"".$templates->get("usercp_usergroups_joinable_usergroup_description")."\";"); }
| eval("\$description = \"".$templates->get("usercp_usergroups_joinable_usergroup_description")."\";"); }
|
Zeile 3508 | Zeile 3511 |
---|
}
$perpage = $mybb->settings['threadsperpage'];
|
}
$perpage = $mybb->settings['threadsperpage'];
|
$page = $mybb->get_input('page', 1);
| $page = $mybb->get_input('page', MyBB::INPUT_INT);
|
if($page > 0) {
| if($page > 0) {
|
Zeile 3667 | Zeile 3670 |
---|
$lang->posts_day = $lang->sprintf($lang->posts_day, my_number_format($perday), $percent); $regdate = my_date('relative', $mybb->user['regdate']);
|
$lang->posts_day = $lang->sprintf($lang->posts_day, my_number_format($perday), $percent); $regdate = my_date('relative', $mybb->user['regdate']);
|
$useravatar = format_avatar(htmlspecialchars_uni($mybb->user['avatar']), $mybb->user['avatardimensions'], '100x100');
| $useravatar = format_avatar($mybb->user['avatar'], $mybb->user['avatardimensions'], '100x100');
|
eval("\$avatar = \"".$templates->get("usercp_currentavatar")."\";");
|
eval("\$avatar = \"".$templates->get("usercp_currentavatar")."\";");
|
$usergroup = $groupscache[$mybb->user['usergroup']]['title'];
| $usergroup = htmlspecialchars_uni($groupscache[$mybb->user['usergroup']]['title']);
|
if($mybb->user['usergroup'] == 5 && $mybb->settings['regtype'] != "admin") { eval("\$usergroup .= \"".$templates->get("usercp_resendactivation")."\";");
| if($mybb->user['usergroup'] == 5 && $mybb->settings['regtype'] != "admin") { eval("\$usergroup .= \"".$templates->get("usercp_resendactivation")."\";");
|
Zeile 3957 | Zeile 3960 |
---|
$inactiveforums = get_inactive_forums(); if($unviewable_forums) {
|
$inactiveforums = get_inactive_forums(); if($unviewable_forums) {
|
$f_perm_sql = " AND t.fid NOT IN (".$unviewable_forums.")";
| $f_perm_sql = " AND t.fid NOT IN ($unviewable_forums)";
|
} if($inactiveforums) {
|
} if($inactiveforums) {
|
$f_perm_sql .= " AND t.fid NOT IN (".$inactiveforums.")";
| $f_perm_sql .= " AND t.fid NOT IN ($inactiveforums)";
|
}
$visible = " AND t.visible != 0";
| }
$visible = " AND t.visible != 0";
|