Zeile 1 | Zeile 1 |
---|
<?php /** * MyBB 1.4
|
<?php /** * MyBB 1.4
|
* Copyright � 2008 MyBB Group, All Rights Reserved
| * Copyright © 2008 MyBB Group, All Rights Reserved
|
* * Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* * Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: settings.php 4031 2008-07-20 20:56:39Z Tikitiki $
| * $Id: settings.php 5379 2011-02-21 11:06:42Z Tomm $
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 19 | Zeile 19 |
---|
$plugins->run_hooks("admin_config_settings_begin");
|
$plugins->run_hooks("admin_config_settings_begin");
|
| /*
|
// Delete all duplicate settings and setting groups if($mybb->input['action'] == "delete_duplicates") { $query = $db->query(" DELETE s1 FROM ".TABLE_PREFIX."settings s1
|
// Delete all duplicate settings and setting groups if($mybb->input['action'] == "delete_duplicates") { $query = $db->query(" DELETE s1 FROM ".TABLE_PREFIX."settings s1
|
INNER JOIN ".TABLE_PREFIX."settings s2 ON (s2.name=s1.name AND s2.sid!=s1.sid)
| INNER JOIN ".TABLE_PREFIX."settings s2 ON (s2.name=s1.name AND s2.sid!=s1.sid AND s2.sid < s1.sid)
|
"); $query = $db->query(" DELETE g1 FROM ".TABLE_PREFIX."settinggroups g1
|
"); $query = $db->query(" DELETE g1 FROM ".TABLE_PREFIX."settinggroups g1
|
INNER JOIN ".TABLE_PREFIX."settinggroups g2 ON (g2.title=g1.title AND g2.gid!=g1.gid)
| INNER JOIN ".TABLE_PREFIX."settinggroups g2 ON (g2.title=g1.title AND g2.gid!=g1.gid AND g2.gid < g1.gid)
|
"); rebuild_settings();
| "); rebuild_settings();
|
Zeile 41 | Zeile 42 |
---|
flash_message($lang->success_duplicate_settings_deleted, 'success'); admin_redirect("index.php?module=config/settings&action=manage");
|
flash_message($lang->success_duplicate_settings_deleted, 'success'); admin_redirect("index.php?module=config/settings&action=manage");
|
}
| }*/ // ^^ Code, Please go away. Forever.
|
// Creating a new setting group if($mybb->input['action'] == "addgroup")
| // Creating a new setting group if($mybb->input['action'] == "addgroup")
|
Zeile 54 | Zeile 56 |
---|
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_group_title;
|
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_group_title;
|
}
| }
|
// Validate identifier if(!trim($mybb->input['name']))
| // Validate identifier if(!trim($mybb->input['name']))
|
Zeile 62 | Zeile 64 |
---|
$errors[] = $lang->error_missing_group_name; } $query = $db->simple_select("settinggroups", "title", "name='".$db->escape_string($mybb->input['name'])."'");
|
$errors[] = $lang->error_missing_group_name; } $query = $db->simple_select("settinggroups", "title", "name='".$db->escape_string($mybb->input['name'])."'");
|
if($db->num_rows($query) > 0)
| if($db->num_rows($query) > 0)
|
{ $dup_group_title = $db->fetch_field($query, 'title'); $errors[] = $lang->sprintf($lang->error_duplicate_group_name, $dup_group_title);
| { $dup_group_title = $db->fetch_field($query, 'title'); $errors[] = $lang->sprintf($lang->error_duplicate_group_name, $dup_group_title);
|
Zeile 164 | Zeile 166 |
---|
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_group_title;
|
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_group_title;
|
}
| }
|
// Validate identifier if(!trim($mybb->input['name']))
| // Validate identifier if(!trim($mybb->input['name']))
|
Zeile 206 | Zeile 208 |
---|
'title' => $lang->edit_setting_group, 'link' => "index.php?module=config/settings&action=editgroup&gid={$group['gid']}", 'description' => $lang->edit_setting_group_desc
|
'title' => $lang->edit_setting_group, 'link' => "index.php?module=config/settings&action=editgroup&gid={$group['gid']}", 'description' => $lang->edit_setting_group_desc
|
);
$page->output_nav_tabs($sub_tabs, 'edit_setting_group');
| );
$page->output_nav_tabs($sub_tabs, 'edit_setting_group');
|
$form = new Form("index.php?module=config/settings&action=editgroup", "post", "editgroup");
| $form = new Form("index.php?module=config/settings&action=editgroup", "post", "editgroup");
|
Zeile 373 | Zeile 375 |
---|
$sub_tabs['change_settings'] = array( 'title' => $lang->change_settings, 'link' => "index.php?module=config/settings"
|
$sub_tabs['change_settings'] = array( 'title' => $lang->change_settings, 'link' => "index.php?module=config/settings"
|
); $sub_tabs['add_setting'] = array( 'title' => $lang->add_new_setting,
| ); $sub_tabs['add_setting'] = array( 'title' => $lang->add_new_setting,
|
'link' => "index.php?module=config/settings&action=add", 'description' => $lang->add_new_setting_desc );
| 'link' => "index.php?module=config/settings&action=add", 'description' => $lang->add_new_setting_desc );
|
Zeile 422 | Zeile 424 |
---|
"select" => $lang->select, "radio" => $lang->radio, "checkbox" => $lang->checkbox,
|
"select" => $lang->select, "radio" => $lang->radio, "checkbox" => $lang->checkbox,
|
"language" => $lang->language,
| "language" => $lang->language_selection_box,
|
"adminlanguage" => $lang->adminlanguage, "cpstyle" => $lang->cpstyle, //"php" => $lang->php // Internal Use Only
| "adminlanguage" => $lang->adminlanguage, "cpstyle" => $lang->cpstyle, //"php" => $lang->php // Internal Use Only
|
Zeile 503 | Zeile 505 |
---|
if(!$mybb->input['type']) { $errors[] = $lang->error_invalid_type;
|
if(!$mybb->input['type']) { $errors[] = $lang->error_invalid_type;
|
}
| }
|
if(!$errors) {
| if(!$errors) {
|
Zeile 544 | Zeile 546 |
---|
$page->add_breadcrumb_item($lang->edit_setting); $page->output_header($lang->board_settings." - ".$lang->edit_setting);
|
$page->add_breadcrumb_item($lang->edit_setting); $page->output_header($lang->board_settings." - ".$lang->edit_setting);
|
$sub_tabs['change_settings'] = array( 'title' => $lang->change_settings, 'link' => "index.php?module=config/settings", );
| $sub_tabs['change_settings'] = array( 'title' => $lang->change_settings, 'link' => "index.php?module=config/settings", );
|
$sub_tabs['add_setting'] = array( 'title' => $lang->add_new_setting, 'link' => "index.php?module=config/settings&action=add"
|
$sub_tabs['add_setting'] = array( 'title' => $lang->add_new_setting, 'link' => "index.php?module=config/settings&action=add"
|
);
| );
|
$sub_tabs['add_setting_group'] = array( 'title' => $lang->add_new_setting_group,
| $sub_tabs['add_setting_group'] = array( 'title' => $lang->add_new_setting_group,
|
Zeile 563 | Zeile 565 |
---|
'title' => $lang->modify_existing_settings, 'link' => "index.php?module=config/settings&action=manage", 'description' => $lang->modify_existing_settings_desc
|
'title' => $lang->modify_existing_settings, 'link' => "index.php?module=config/settings&action=manage", 'description' => $lang->modify_existing_settings_desc
|
);
| );
|
$page->output_nav_tabs($sub_tabs, 'modify_setting');
| $page->output_nav_tabs($sub_tabs, 'modify_setting');
|
Zeile 608 | Zeile 610 |
---|
"select" => $lang->select, "radio" => $lang->radio, "checkbox" => $lang->checkbox,
|
"select" => $lang->select, "radio" => $lang->radio, "checkbox" => $lang->checkbox,
|
"language" => $lang->language,
| "language" => $lang->language_selection_box,
|
"adminlanguage" => $lang->adminlanguage, "cpstyle" => $lang->cpstyle, //"php" => $lang->php // Internal Use Only
| "adminlanguage" => $lang->adminlanguage, "cpstyle" => $lang->cpstyle, //"php" => $lang->php // Internal Use Only
|
Zeile 669 | Zeile 671 |
---|
rebuild_settings(); $plugins->run_hooks("admin_config_settings_delete_commit");
|
rebuild_settings(); $plugins->run_hooks("admin_config_settings_delete_commit");
|
|
|
// Log admin action log_admin_action($setting['sid'], $setting['title']);
| // Log admin action log_admin_action($setting['sid'], $setting['title']);
|
Zeile 711 | Zeile 713 |
---|
} $plugins->run_hooks("admin_config_settings_manage_commit");
|
} $plugins->run_hooks("admin_config_settings_manage_commit");
|
// Log admin action log_admin_action();
| // Log admin action log_admin_action();
|
flash_message($lang->success_display_orders_updated, 'success'); admin_redirect("index.php?module=config/settings&action=manage"); }
| flash_message($lang->success_display_orders_updated, 'success'); admin_redirect("index.php?module=config/settings&action=manage"); }
|
Zeile 831 | Zeile 833 |
---|
$form->output_submit_wrapper($buttons); $form->end();
|
$form->output_submit_wrapper($buttons); $form->end();
|
echo '<script type="text/javascript" src="./jscripts/config_settings.js"></script><script type="text/javascript">Event.observe(window, "load", ManageSettings.init);</script>';
| /*echo '<script type="text/javascript" src="./jscripts/config_settings.js"></script><script type="text/javascript">Event.observe(window, "load", ManageSettings.init);</script>';*/
|
$page->output_footer(); }
| $page->output_footer(); }
|
Zeile 866 | Zeile 868 |
---|
}
// If the delayedthreadviews setting was changed, enable or disable the tasks for it.
|
}
// If the delayedthreadviews setting was changed, enable or disable the tasks for it.
|
if($mybb->input['upsetting']['delayedthreadviews'] && $mybb->settings['delayedthreadviews'] != $mybb->input['upsetting']['delayedthreadviews'])
| if(isset($mybb->input['upsetting']['delayedthreadviews']) && $mybb->settings['delayedthreadviews'] != $mybb->input['upsetting']['delayedthreadviews'])
|
{ if($mybb->input['upsetting']['delayedthreadviews'] == 0) {
| { if($mybb->input['upsetting']['delayedthreadviews'] == 0) {
|
Zeile 994 | Zeile 996 |
---|
$form = new Form("index.php?module=config/settings&action=change", "post", "change");
|
$form = new Form("index.php?module=config/settings&action=change", "post", "change");
|
echo $form->generate_hidden_field("gid", $group['gid']);
| echo $form->generate_hidden_field("gid", $groupinfo['gid']);
|
} else {
| } else {
|
Zeile 1094 | Zeile 1096 |
---|
{ $languages = $lang->get_languages(1); $setting_code = $form->generate_select_box($element_name, $languages, $setting['value'], array('id' => $element_id));
|
{ $languages = $lang->get_languages(1); $setting_code = $form->generate_select_box($element_name, $languages, $setting['value'], array('id' => $element_id));
|
| } else if($type[0] == "passwordbox") { $setting_code = $form->generate_password_box($element_name, $setting['value'], array('id' => $element_id));
|
} else if($type[0] == "php") {
| } else if($type[0] == "php") {
|
Zeile 1124 | Zeile 1130 |
---|
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 {
| } else {
|
$option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id)); } }
| $option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id)); } }
|
Zeile 1134 | Zeile 1140 |
---|
{ if($setting['value'] == $optionsexp[0]) {
|
{ if($setting['value'] == $optionsexp[0]) {
|
$option_list[$i] = $form->generate_checkbox_input($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));
| $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 {
|
} else {
|
$option_list[$i] = $form->generate_checkbox_input($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id));
| $option_list[$i] = $form->generate_check_box($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id));
|
} } }
| } } }
|
Zeile 1175 | Zeile 1181 |
---|
print_setting_peekers(); if(!isset($mybb->input['ajax_search']))
|
print_setting_peekers(); if(!isset($mybb->input['ajax_search']))
|
{
| {
|
$page->output_footer(); } }
| $page->output_footer(); } }
|
Zeile 1222 | Zeile 1228 |
---|
echo "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />"; $search->end(); echo "</div>\n";
|
echo "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />"; $search->end(); echo "</div>\n";
|
|
|
echo '<div id="search_results"> </div><div id="group_list">'; $table = new Table; $table->construct_header($lang->setting_groups);
| echo '<div id="search_results"> </div><div id="group_list">'; $table = new Table; $table->construct_header($lang->setting_groups);
|
Zeile 1391 | Zeile 1397 |
---|
new Peeker($$(".setting_enablewarningsystem"), $("row_setting_canviewownwarning"), /1/, true); new Peeker($$(".setting_enablewarningsystem"), $("row_setting_maxwarningpoints"), /1/, true); new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowhtml"), /1/, true);
|
new Peeker($$(".setting_enablewarningsystem"), $("row_setting_canviewownwarning"), /1/, true); new Peeker($$(".setting_enablewarningsystem"), $("row_setting_maxwarningpoints"), /1/, true); new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowhtml"), /1/, true);
|
|
|
new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowmycode"), /1/, true); new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowsmilies"), /1/, true); new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowimgcode"), /1/, true);
|
new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowmycode"), /1/, true); new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowsmilies"), /1/, true); new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowimgcode"), /1/, true);
|
new Peeker($$(".setting_enablecalendar"), $("row_setting_publiceventcolor"), /1/, true); new Peeker($$(".setting_enablecalendar"), $("row_setting_privateeventcolor"), /1/, true);
| |
new Peeker($$(".setting_smilieinserter"), $("row_setting_smilieinsertertot"), /1/, true); new Peeker($$(".setting_smilieinserter"), $("row_setting_smilieinsertercols"), /1/, true); new Peeker($("setting_mail_handler"), $("row_setting_smtp_host"), /smtp/, false);
| new Peeker($$(".setting_smilieinserter"), $("row_setting_smilieinsertertot"), /1/, true); new Peeker($$(".setting_smilieinserter"), $("row_setting_smilieinsertercols"), /1/, true); new Peeker($("setting_mail_handler"), $("row_setting_smtp_host"), /smtp/, false);
|