Zeile 293 | Zeile 293 |
---|
}
// do some type filtering
|
}
// do some type filtering
|
$mybb->input['type'] = str_replace("\n", "", $mybb->input['type']); if(strtolower(substr($mybb->input['type'], 0, 3)) == "php")
| $mybb->input['type'] = $mybb->get_input('type'); if(!ctype_alnum($mybb->input['type']) || strtolower($mybb->input['type']) == "php")
|
{ $mybb->input['type'] = ""; }
| { $mybb->input['type'] = ""; }
|
Zeile 496 | Zeile 496 |
---|
}
// do some type filtering
|
}
// do some type filtering
|
$mybb->input['type'] = str_replace("\n", "", $mybb->input['type']); if(strtolower(substr($mybb->input['type'], 0, 3)) == "php")
| $mybb->input['type'] = $mybb->get_input('type'); if(!ctype_alnum($mybb->input['type']) || strtolower($mybb->input['type']) == "php")
|
{ $mybb->input['type'] = ""; }
| { $mybb->input['type'] = ""; }
|
Zeile 1283 | Zeile 1283 |
---|
{ my_unsetcookie("adminsid"); $mybb->settings['cookieprefix'] = $mybb->input['upsetting']['cookieprefix'];
|
{ my_unsetcookie("adminsid"); $mybb->settings['cookieprefix'] = $mybb->input['upsetting']['cookieprefix'];
|
my_setcookie("adminsid", $admin_session['sid'], '', true, "lax");
| my_setcookie("adminsid", $admin_session['sid'], '', true, "strict");
|
}
if(isset($mybb->input['upsetting']['statstopreferrer']) && $mybb->input['upsetting']['statstopreferrer'] != $mybb->settings['statstopreferrer'])
| }
if(isset($mybb->input['upsetting']['statstopreferrer']) && $mybb->input['upsetting']['statstopreferrer'] != $mybb->settings['statstopreferrer'])
|
Zeile 1403 | Zeile 1403 |
---|
{ $groupinfo['title'] = $lang->$group_lang_var; }
|
{ $groupinfo['title'] = $lang->$group_lang_var; }
|
| $groupinfo['title'] = htmlspecialchars_uni($groupinfo['title']);
|
// Page header $page->add_breadcrumb_item($groupinfo['title']);
| // Page header $page->add_breadcrumb_item($groupinfo['title']);
|
Zeile 1428 | Zeile 1430 |
---|
while($setting = $db->fetch_array($query)) { $cache_settings[$setting['gid']][$setting['sid']] = $setting;
|
while($setting = $db->fetch_array($query)) { $cache_settings[$setting['gid']][$setting['sid']] = $setting;
|
}
| }
|
// Page header $page->add_breadcrumb_item($lang->show_all_settings); $page->output_header($lang->board_settings." - {$lang->show_all_settings}"); }
|
// Page header $page->add_breadcrumb_item($lang->show_all_settings); $page->output_header($lang->board_settings." - {$lang->show_all_settings}"); }
|
|
|
// Build individual forms as per settings group foreach($cache_groups as $groupinfo) {
| // Build individual forms as per settings group foreach($cache_groups as $groupinfo) {
|
Zeile 1445 | Zeile 1447 |
---|
if(isset($lang->$group_lang_var)) { $groupinfo['title'] = $lang->$group_lang_var;
|
if(isset($lang->$group_lang_var)) { $groupinfo['title'] = $lang->$group_lang_var;
|
}
$form_container = new FormContainer($groupinfo['title']);
| }
$groupinfo['title'] = htmlspecialchars_uni($groupinfo['title']);
$form_container = new FormContainer($groupinfo['title']);
|
if(empty($cache_settings[$groupinfo['gid']])) { $form_container->output_cell($lang->error_no_settings_found); $form_container->construct_row();
|
if(empty($cache_settings[$groupinfo['gid']])) { $form_container->output_cell($lang->error_no_settings_found); $form_container->construct_row();
|
|
|
$form_container->end(); echo '<br />';
| $form_container->end(); echo '<br />';
|
Zeile 1462 | Zeile 1466 |
---|
foreach($cache_settings[$groupinfo['gid']] as $setting) {
|
foreach($cache_settings[$groupinfo['gid']] as $setting) {
|
| $setting['name'] = htmlspecialchars_uni($setting['name']);
|
$options = ""; $type = explode("\n", $setting['optionscode']); $type[0] = trim($type[0]);
| $options = ""; $type = explode("\n", $setting['optionscode']); $type[0] = trim($type[0]);
|
Zeile 1491 | Zeile 1497 |
---|
} } $setting_code = $form->generate_numeric_field($element_name, $setting['value'], $field_options);
|
} } $setting_code = $form->generate_numeric_field($element_name, $setting['value'], $field_options);
|
}
| }
|
else if($type[0] == "textarea") { $setting_code = $form->generate_text_area($element_name, $setting['value'], array('id' => $element_id));
| else if($type[0] == "textarea") { $setting_code = $form->generate_text_area($element_name, $setting['value'], array('id' => $element_id));
|
Zeile 1578 | Zeile 1584 |
---|
<tr> <td valign=\"top\"><small>{$lang->forums_colon}</small></td> <td>".$form->generate_forum_select('select['.$setting['name'].'][]', $selected_values, array('id' => $element_id, 'multiple' => true, 'size' => 5))."</td>
|
<tr> <td valign=\"top\"><small>{$lang->forums_colon}</small></td> <td>".$form->generate_forum_select('select['.$setting['name'].'][]', $selected_values, array('id' => $element_id, 'multiple' => true, 'size' => 5))."</td>
|
</tr>
| </tr>
|
</table> </dd> <dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"none\" {$forum_checked['none']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->none}</strong></label></dt>
| </table> </dd> <dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"none\" {$forum_checked['none']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->none}</strong></label></dt>
|
Zeile 1586 | Zeile 1592 |
---|
<script type=\"text/javascript\"> checkAction('{$element_id}'); </script>";
|
<script type=\"text/javascript\"> checkAction('{$element_id}'); </script>";
|
}
| }
|
else if($type[0] == "forumselectsingle") { $selected_value = (int)$setting['value']; // No need to check if empty, int will give 0
| else if($type[0] == "forumselectsingle") { $selected_value = (int)$setting['value']; // No need to check if empty, int will give 0
|
Zeile 1604 | Zeile 1610 |
---|
$value = (int)$value; } unset($value);
|
$value = (int)$value; } unset($value);
|
}
| }
|
$group_checked = array('all' => '', 'custom' => '', 'none' => ''); if($setting['value'] == -1)
| $group_checked = array('all' => '', 'custom' => '', 'none' => ''); if($setting['value'] == -1)
|
Zeile 1614 | Zeile 1620 |
---|
elseif($setting['value'] != '') { $group_checked['custom'] = 'checked="checked"';
|
elseif($setting['value'] != '') { $group_checked['custom'] = 'checked="checked"';
|
} else { $group_checked['none'] = 'checked="checked"'; }
print_selection_javascript();
$setting_code = "
| } else { $group_checked['none'] = 'checked="checked"'; }
print_selection_javascript();
$setting_code = "
|
<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%\"> <dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"all\" {$group_checked['all']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_groups}</strong></label></dt> <dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"custom\" {$group_checked['custom']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_groups}</strong></label></dt>
| <dl style=\"margin-top: 0; margin-bottom: 0; width: 100%\"> <dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"all\" {$group_checked['all']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_groups}</strong></label></dt> <dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"custom\" {$group_checked['custom']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_groups}</strong></label></dt>
|
Zeile 1639 | Zeile 1645 |
---|
<script type=\"text/javascript\"> checkAction('{$element_id}'); </script>";
|
<script type=\"text/javascript\"> checkAction('{$element_id}'); </script>";
|
}
| }
|
else if($type[0] == "groupselectsingle") { $selected_value = (int)$setting['value']; // No need to check if empty, int will give 0
| else if($type[0] == "groupselectsingle") { $selected_value = (int)$setting['value']; // No need to check if empty, int will give 0
|
Zeile 1649 | Zeile 1655 |
---|
{ $selected_values = ''; if($setting['value'] != '' && $setting['value'] != -1)
|
{ $selected_values = ''; if($setting['value'] != '' && $setting['value'] != -1)
|
{
| {
|
$selected_values = explode(',', (string)$setting['value']); foreach($selected_values as &$value) {
| $selected_values = explode(',', (string)$setting['value']); foreach($selected_values as &$value) {
|
Zeile 1665 | Zeile 1671 |
---|
elseif($setting['value'] != '') { $prefix_checked['custom'] = 'checked="checked"';
|
elseif($setting['value'] != '') { $prefix_checked['custom'] = 'checked="checked"';
|
}
| }
|
else { $prefix_checked['none'] = 'checked="checked"';
| else { $prefix_checked['none'] = 'checked="checked"';
|
Zeile 1698 | Zeile 1704 |
---|
$multivalue = explode(',', $setting['value']); }
|
$multivalue = explode(',', $setting['value']); }
|
| $option_list = array();
|
for($i = 0; $i < $typecount; $i++) { $optionsexp = explode("=", $type[$i]);
| for($i = 0; $i < $typecount; $i++) { $optionsexp = explode("=", $type[$i]);
|
Zeile 1709 | Zeile 1716 |
---|
if(isset($lang->$title_lang)) { $optionsexp[1] = $lang->$title_lang;
|
if(isset($lang->$title_lang)) { $optionsexp[1] = $lang->$title_lang;
|
}
| }
|
if($type[0] == "select") {
| if($type[0] == "select") {
|
Zeile 1720 | Zeile 1727 |
---|
if($setting['value'] == $optionsexp[0]) { $option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));
|
if($setting['value'] == $optionsexp[0]) { $option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));
|
}
| }
|
else { $option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id));
| else { $option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id));
|
Zeile 1731 | Zeile 1738 |
---|
if(in_array($optionsexp[0], $multivalue)) { $option_list[$i] = $form->generate_check_box("{$element_name}[]", $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));
|
if(in_array($optionsexp[0], $multivalue)) { $option_list[$i] = $form->generate_check_box("{$element_name}[]", $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));
|
}
| }
|
else { $option_list[$i] = $form->generate_check_box("{$element_name}[]", $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id)); }
|
else { $option_list[$i] = $form->generate_check_box("{$element_name}[]", $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id)); }
|
}
| }
|
}
if($type[0] == "select") { $setting_code = $form->generate_select_box($element_name, $option_list, $setting['value'], array('id' => $element_id));
|
}
if($type[0] == "select") { $setting_code = $form->generate_select_box($element_name, $option_list, $setting['value'], array('id' => $element_id));
|
}
| }
|
else { $setting_code = implode("<br />", $option_list);
| else { $setting_code = implode("<br />", $option_list);
|
Zeile 1752 | Zeile 1759 |
---|
$setting_code .= $form->generate_hidden_field("isvisible_{$setting['name']}", 1); } }
|
$setting_code .= $form->generate_hidden_field("isvisible_{$setting['name']}", 1); } }
|
$option_list = array();
| |
}
// Do we have a custom language variable for this title or description?
| }
// Do we have a custom language variable for this title or description?
|