Zeile 946 | Zeile 946 |
---|
eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";"); } }
|
eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";"); } }
|
| $plugins->run_hooks("modcp_modlogs_result");
|
eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";"); }
if(!$results)
|
eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";"); }
if(!$results)
|
{
| {
|
eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";"); }
| eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";"); }
|
Zeile 975 | Zeile 977 |
---|
if(!$user['username']) { $user['username'] = $lang->na_deleted;
|
if(!$user['username']) { $user['username'] = $lang->na_deleted;
|
}
| }
|
$selected = ''; if($mybb->get_input('uid', MyBB::INPUT_INT) == $user['uid'])
| $selected = ''; if($mybb->get_input('uid', MyBB::INPUT_INT) == $user['uid'])
|
Zeile 985 | Zeile 987 |
---|
$user['username'] = htmlspecialchars_uni($user['username']); eval("\$user_options .= \"".$templates->get("modcp_modlogs_user")."\";");
|
$user['username'] = htmlspecialchars_uni($user['username']); eval("\$user_options .= \"".$templates->get("modcp_modlogs_user")."\";");
|
}
$forum_select = build_forum_jump("", $mybb->get_input('fid', MyBB::INPUT_INT), 1, '', 0, true, '', "fid");
| }
$forum_select = build_forum_jump("", $mybb->get_input('fid', MyBB::INPUT_INT), 1, '', 0, true, '', "fid");
|
eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";"); output_page($modlogs); }
|
eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";"); output_page($modlogs); }
|
|
|
if($mybb->input['action'] == "do_delete_announcement")
|
if($mybb->input['action'] == "do_delete_announcement")
|
{ verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canmanageannounce'] == 0) { error_no_permission(); }
$aid = $mybb->get_input('aid'); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'"); $announcement = $db->fetch_array($query);
if(!$announcement) { error($lang->error_invalid_announcement); } if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums))) { error_no_permission(); }
| { verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canmanageannounce'] == 0) { error_no_permission(); }
$aid = $mybb->get_input('aid'); $query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'"); $announcement = $db->fetch_array($query);
if(!$announcement) { error($lang->error_invalid_announcement); } if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums))) { error_no_permission(); }
|
$plugins->run_hooks("modcp_do_delete_announcement");
$db->delete_query("announcements", "aid='{$aid}'"); log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted); $cache->update_forumsdisplay();
|
$plugins->run_hooks("modcp_do_delete_announcement");
$db->delete_query("announcements", "aid='{$aid}'"); log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted); $cache->update_forumsdisplay();
|
|
|
redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement); }
if($mybb->input['action'] == "delete_announcement") { if($mybb->usergroup['canmanageannounce'] == 0)
|
redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement); }
if($mybb->input['action'] == "delete_announcement") { if($mybb->usergroup['canmanageannounce'] == 0)
|
{ error_no_permission();
| { error_no_permission();
|
}
$aid = $mybb->get_input('aid');
| }
$aid = $mybb->get_input('aid');
|
Zeile 1054 | Zeile 1056 |
---|
}
if($mybb->input['action'] == "do_new_announcement")
|
}
if($mybb->input['action'] == "do_new_announcement")
|
{ verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canmanageannounce'] == 0) { error_no_permission(); }
$announcement_fid = $mybb->get_input('fid', MyBB::INPUT_INT); if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid, "canmanageannouncements")) || ($unviewableforums && in_array($announcement_fid, $unviewableforums))) {
| { verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canmanageannounce'] == 0) { error_no_permission(); }
$announcement_fid = $mybb->get_input('fid', MyBB::INPUT_INT); if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid, "canmanageannouncements")) || ($unviewableforums && in_array($announcement_fid, $unviewableforums))) {
|
error_no_permission(); }
|
error_no_permission(); }
|
|
|
$errors = array();
$mybb->input['title'] = $mybb->get_input('title'); if(!trim($mybb->input['title']))
|
$errors = array();
$mybb->input['title'] = $mybb->get_input('title'); if(!trim($mybb->input['title']))
|
{
| {
|
$errors[] = $lang->error_missing_title; }
| $errors[] = $lang->error_missing_title; }
|
Zeile 1100 | Zeile 1102 |
---|
if($startdate[0] >= 24) { $startdate[0] = "00";
|
if($startdate[0] >= 24) { $startdate[0] = "00";
|
} }
| } }
|
if(stristr($mybb->input['endtime_time'], "pm")) {
| if(stristr($mybb->input['endtime_time'], "pm")) {
|
Zeile 1119 | Zeile 1121 |
---|
$mybb->input['starttime_month'] = '01'; }
|
$mybb->input['starttime_month'] = '01'; }
|
$localized_time_offset = $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
| $localized_time_offset = (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
|
|
|
$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) -$localized_time_offset;
| $startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) - $localized_time_offset;
|
if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false) { $errors[] = $lang->error_invalid_start_date;
|
if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false) { $errors[] = $lang->error_invalid_start_date;
|
}
| }
|
if($mybb->get_input('endtime_type', MyBB::INPUT_INT) == 2) {
| if($mybb->get_input('endtime_type', MyBB::INPUT_INT) == 2) {
|
Zeile 1241 | Zeile 1243 |
---|
else { $errors = '';
|
else { $errors = '';
|
}
| }
|
// Set $announcement to input stuff $announcement['subject'] = $mybb->input['title']; $announcement['message'] = $mybb->input['message'];
| // Set $announcement to input stuff $announcement['subject'] = $mybb->input['title']; $announcement['message'] = $mybb->input['message'];
|
Zeile 1261 | Zeile 1263 |
---|
} else {
|
} else {
|
$localized_time = TIME_NOW + $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
| $localized_time = TIME_NOW + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
|
$starttime_time = gmdate($mybb->settings['timeformat'], $localized_time); $endtime_time = gmdate($mybb->settings['timeformat'], $localized_time);
|
$starttime_time = gmdate($mybb->settings['timeformat'], $localized_time); $endtime_time = gmdate($mybb->settings['timeformat'], $localized_time);
|
$startday = $endday = gmdate("j", TIME_NOW + $localized_time);
| $startday = $endday = gmdate("j", $localized_time);
|
$startmonth = $endmonth = gmdate("m", $localized_time); $startdateyear = gmdate("Y", $localized_time);
| $startmonth = $endmonth = gmdate("m", $localized_time); $startdateyear = gmdate("Y", $localized_time);
|
Zeile 1420 | Zeile 1422 |
---|
}
if($mybb->input['action'] == "do_edit_announcement")
|
}
if($mybb->input['action'] == "do_edit_announcement")
|
{
| {
|
verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canmanageannounce'] == 0)
| verify_post_check($mybb->get_input('my_post_key'));
if($mybb->usergroup['canmanageannounce'] == 0)
|
Zeile 1492 | Zeile 1494 |
---|
$mybb->input['starttime_month'] = '01'; }
|
$mybb->input['starttime_month'] = '01'; }
|
$localized_time_offset = TIME_NOW + $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
| $localized_time_offset = (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
|
$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) - $localized_time_offset; if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)
| $startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) - $localized_time_offset; if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)
|
Zeile 1666 | Zeile 1668 |
---|
} else {
|
} else {
|
$localized_time_startdate = $announcement['startdate'] + $mybb->user['timezone']*3600 + $mybb->user['dst']*3600; $localized_time_enddate = $announcement['enddate'] + $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
| $localized_time_startdate = $announcement['startdate'] + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600; $localized_time_enddate = $announcement['enddate'] + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
|
$starttime_time = gmdate($mybb->settings['timeformat'], $localized_time_startdate); $endtime_time = gmdate($mybb->settings['timeformat'], $localized_time_enddate);
| $starttime_time = gmdate($mybb->settings['timeformat'], $localized_time_startdate); $endtime_time = gmdate($mybb->settings['timeformat'], $localized_time_enddate);
|
Zeile 2830 | Zeile 2832 |
---|
} $returndatesel = $selected = ''; for($day = 1; $day <= 31; ++$day)
|
} $returndatesel = $selected = ''; for($day = 1; $day <= 31; ++$day)
|
{
| {
|
if($returndate[0] == $day) { $selected = "selected=\"selected\"";
| if($returndate[0] == $day) { $selected = "selected=\"selected\"";
|
Zeile 2877 | Zeile 2879 |
---|
{ foreach($pfcache as $profilefield) {
|
{ foreach($pfcache as $profilefield) {
|
$userfield = $code = $select = $val = $options = $expoptions = $useropts = $seloptions = '';
| $userfield = $code = $select = $val = $options = $expoptions = $useropts = ''; $seloptions = array();
|
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']); $profilefield['name'] = htmlspecialchars_uni($profilefield['name']); $profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
| $profilefield['type'] = htmlspecialchars_uni($profilefield['type']); $profilefield['name'] = htmlspecialchars_uni($profilefield['name']); $profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
|
Zeile 3293 | Zeile 3296 |
---|
$page_url = 'modcp.php?action=finduser'; foreach(array('username', 'sortby', 'order') as $field) {
|
$page_url = 'modcp.php?action=finduser'; foreach(array('username', 'sortby', 'order') as $field) {
|
$mybb->input[$field] = urlencode($mybb->get_input($field));
| |
if(!empty($mybb->input[$field])) { $page_url .= "&{$field}=".$mybb->input[$field];
| if(!empty($mybb->input[$field])) { $page_url .= "&{$field}=".$mybb->input[$field];
|
Zeile 4710 | Zeile 4712 |
---|
eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";"); } }
|
eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";"); } }
|
| $plugins->run_hooks("modcp_modlogs_result");
|
eval("\$modlogresults .= \"".$templates->get("modcp_modlogs_result")."\";"); }
| eval("\$modlogresults .= \"".$templates->get("modcp_modlogs_result")."\";"); }
|