protected function createComponentAddSetting() { $form = new Form(); $form->addText('key', 'Klíč')->setRequired('Zadejte klíč nastavení'); $form->addText('value', 'Hodnota')->setRequired('Zadejte hodnotu nastavení'); $form->addSubmit('send', 'Zapsat'); $form->onSuccess[] = function (Form $f) { try { $val = $f->values; $this->settings->set($val->key, $val->value); $this->settings->push(); //Write $this->logger->log('System', 'edit', "%user% změnila(a) nastavení"); $msg = $this->flashMessage("Nastavení bylo zapsáno", 'success'); $msg->title = 'Yehet!'; $msg->icon = 'check'; $this->redirect('this'); } catch (\PDOException $e) { \Nette\Diagnostics\Debugger::log($e); $msg = $this->flashMessage("Něco se podělalo. Zkuste to prosím později.", 'danger'); $msg->title = 'Oh shit!'; $msg->icon = 'warning'; } }; return $form; }
public function updateAction() { Settings::load(); $languages = Config::get()->languages->list; $start_pages = array(); foreach ($languages as $language_id => $language) { $start_page = 0; if (isset($_POST['start-page-' . $language_id])) { $start_page = $this->sanitizeInteger($_POST['start-page-' . $language_id]); } $start_pages[$language_id] = $start_page; } Settings::set('startPages', $start_pages); $error_pages = array(); foreach ($languages as $language_id => $language) { $error_page = 0; if (isset($_POST['error-page-' . $language_id])) { $error_page = $this->sanitizeInteger($_POST['error-page-' . $language_id]); } $error_pages[$language_id] = $error_page; } Settings::set('errorPages', $error_pages); $use_cache = $this->sanitizeBoolean(Request::postParam('use-cache', false)); Settings::set('useCache', $use_cache); $cache_lifetime = $this->sanitizeInteger(Request::postParam('cache-lifetime', 0)); Settings::set('cacheLifetime', $cache_lifetime); Settings::save(); $this->success(); }
public static function save(\contact\Resource\ContactInfo\Map $map) { $values = self::getValues($map); foreach ($values as $key => $val) { \Settings::set('contact', $key, $val); } }
private static function loadSettings() { global $simpleORMSetting; foreach ($simpleORMSetting as $key => $value) { Settings::set($key, $value); } }
public function __construct() { $supported_lang = Settings::get('supported_languages'); $cufon_enabled = $supported_lang[CURRENT_LANGUAGE]['direction'] !== 'rtl'; $cufon_font = 'qk.font.js'; // Translators, only if the default font is incompatible with the chars of your // language generate a new font (link: <http://cufon.shoqolate.com/generate/>) and add // your case in switch bellow. Important: use a licensed font and harmonic with design switch (CURRENT_LANGUAGE) { case 'zh': $cufon_enabled = FALSE; break; case 'ar': $cufon_enabled = FALSE; break; case 'he': $cufon_enabled = TRUE; case 'ru': $cufon_font = 'times.font.js'; break; } Settings::set('theme_default', compact('cufon_enabled', 'cufon_font')); }
function execute() { $data = $_POST; Settings::load('connection'); foreach ($data as $key => $value) { Settings::set($key, $value, 'connection', false); } Settings::save('connection'); }
public function postSettings() { $newAccountInformation = strip_tags(filter_input(INPUT_POST, 'newAccountInformation', FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_ENCODE_AMP), PHPWS_ALLOWED_TAGS); \Settings::set('tailgate', 'new_account_information', $newAccountInformation); $reply_to = filter_input(INPUT_POST, 'replyTo', FILTER_SANITIZE_EMAIL); if (empty($reply_to)) { throw new \Exception('Badly formed or empty email address'); } \Settings::set('tailgate', 'reply_to', $reply_to); }
public static function save(PhysicalAddressResource $physical_address) { \Settings::set('contact', 'building', $physical_address->getBuilding()); \Settings::set('contact', 'room_number', $physical_address->getRoomNumber()); \Settings::set('contact', 'post_box', $physical_address->getPostBox()); \Settings::set('contact', 'street', $physical_address->getStreet()); \Settings::set('contact', 'city', $physical_address->getCity()); \Settings::set('contact', 'state', $physical_address->getState()); \Settings::set('contact', 'zip', $physical_address->getZip()); }
public function ajax_set_api_user_keys() { if (!$this->input->is_ajax_request()) { exit('Trickery is afoot.'); } $status = (bool) (int) $this->input->post('status'); // Update the setting Settings::set('api_user_keys', $status); echo json_encode(array('status' => $status)); }
public function post(\Request $request) { $cmd = $request->shiftCommand(); switch ($cmd) { case 'toggleAllow': \Settings::set('pulse', 'allow_web_access', (\Settings::get('pulse', 'allow_web_access') - 1) * -1); $response = new \Http\SeeOtherResponse(\Server::getSiteUrl() . 'pulse/admin/'); break; } return $response; exit; }
protected function settings() { if (!$this->session->status()) { return $this->_response("Authentication Required", 401); } $settings = new Settings(); if ($this->method == 'GET') { return $settings->get(); } else { if ($this->method == 'PUT') { if ($this->data) { return $settings->set($this->data); } } } return ""; }
public function actionAdd() { $action = 'site'; if (count($_GET)) { foreach ($_GET as $key => $param) { $action = $key; break; } } if (!empty($_POST)) { $category = $_POST['category'] == 'add_new' ? $_POST['category_value'] : $_POST['category']; Settings::set($category, $_POST['key'], $_POST['value'], $_POST['hint'], $_POST['type']); $this->redirect(array('/admin/settings/' . $category)); } $dataProvider = array('action' => $action); Yii::app()->clientScript->registerCoreScript('jquery'); $this->render('add', $dataProvider); }
$grrSettings['ldap_champ_nom'] = $_POST['ldap_champ_nom']; if ($_POST['ldap_champ_prenom'] == '') { $_POST['ldap_champ_prenom'] = "sn"; } if (!Settings::set("ldap_champ_prenom", $_POST['ldap_champ_prenom'])) { echo "Erreur lors de l'enregistrement de ldap_champ_prenom !<br />"; } $grrSettings['ldap_champ_prenom'] = $_POST['ldap_champ_prenom']; if ($_POST['ldap_champ_email'] == '') { $_POST['ldap_champ_email'] = "sn"; } if (!Settings::set("ldap_champ_email", $_POST['ldap_champ_email'])) { echo "Erreur lors de l'enregistrement de ldap_champ_email !<br />"; } $grrSettings['ldap_champ_email'] = $_POST['ldap_champ_email']; if (!Settings::set("se3_liste_groupes_autorises", $_POST['se3_liste_groupes_autorises'])) { echo "Erreur lors de l'enregistrement de se3_liste_groupes_autorises !<br />"; } $grrSettings['se3_liste_groupes_autorises'] = $_POST['se3_liste_groupes_autorises']; } } //Chargement des valeurs de la table settingS if (!Settings::load()) { die("Erreur chargement settings"); } if (isset($_POST['submit'])) { if (isset($_POST['login']) && isset($_POST['password'])) { $sql = "select upper(login) login, password, prenom, nom, statut from " . TABLE_PREFIX . "_utilisateurs where login = '******'login'] . "' and password = md5('" . $_POST['password'] . "') and etat != 'inactif' and statut='administrateur' "; $res_user = grr_sql_query($sql); $num_row = grr_sql_count($res_user); if ($num_row == 1) {
/** * Edit an existing settings item * * @return void */ public function edit() { if (PYRO_DEMO) { $this->session->set_flashdata('notice', lang('global:demo_restrictions')); redirect('admin/settings'); } $settings = $this->settings_m->get_many_by(array('is_gui' => 1)); // Create dynamic validation rules foreach ($settings as $setting) { $this->validation_rules[] = array('field' => $setting->slug . (in_array($setting->type, array('select-multiple', 'checkbox')) ? '[]' : ''), 'label' => 'lang:settings:' . $setting->slug, 'rules' => 'trim' . ($setting->is_required ? '|required' : '') . ($setting->type !== 'textarea' ? '|max_length[255]' : '')); } // Set the validation rules $this->form_validation->set_rules($this->validation_rules); // Got valid data? if ($this->form_validation->run()) { $settings_stored = array(); // Loop through again now we know it worked foreach ($settings as $setting) { $new_value = $this->input->post($setting->slug, false); // Store arrays as CSV if (is_array($new_value)) { $new_value = implode(',', $new_value); } // Only update passwords if not placeholder value if ($setting->type === 'password' and $new_value === 'XXXXXXXXXXXX') { continue; } // Dont update if its the same value if ($new_value != $setting->value) { Settings::set($setting->slug, $new_value); $settings_stored[$setting->slug] = $new_value; } } // Fire an event. Yay! We know when settings are updated. Events::trigger('settings_updated', $settings_stored); // Success... $this->session->set_flashdata('success', lang('settings:save_success')); } elseif (validation_errors()) { $this->session->set_flashdata('error', validation_errors()); } redirect('admin/settings'); }
/** * Constructor * */ public function __construct() { parent::__construct(); $this->load->helper('module_helper'); // Redirect the not authorized user to the login panel. See /application/config/connect.php Connect()->restrict_type_redirect = array('uri' => config_item('admin_url') . '/user/login', 'flash_msg' => 'You have been denied access to %s', 'flash_use_lang' => false, 'flash_var' => 'error'); // $this->output->enable_profiler(true); // PHP standard session is mandatory for FileManager authentication // and other external lib // session_start(); // Librairies $this->connect = Connect::get_instance(); // Current user $this->template['current_user'] = $this->connect->get_current_user(); // Set the admin theme as current theme Theme::set_theme('admin'); /* * Admin languages : Depending on installed translations in /application/languages/ * The Admin translations are only stored in the translation file /application/languages/xx/admin_lang.php * */ // Set admin lang codes array Settings::set('admin_languages', $this->settings_model->get_admin_langs()); Settings::set('displayed_admin_languages', explode(',', Settings::get('displayed_admin_languages'))); // Set Router's found language code as current language Settings::set('current_lang', config_item('language_abbr')); // Load the current language translations file $this->lang->load('admin', Settings::get_lang()); /* * Modules config * */ $this->get_modules_config(); // Including all modules languages files require APPPATH . 'config/modules.php'; $this->modules = $modules; foreach ($this->modules as $module) { $lang_file = MODPATH . $module . '/language/' . Settings::get_lang() . '/' . strtolower($module) . '_lang.php'; if (is_file($lang_file)) { include $lang_file; $this->lang->language = array_merge($this->lang->language, $lang); unset($lang); } } /* * Loads all Module's addons * */ $this->_get_modules_addons(); // Load all modules lang files /* Look how to make Modules translations available in javascript Notice : $yhis->lang object is transmitted to JS through load->view('javascript_lang') if ( ! empty($lang_files)) { foreach($lang_files as $l) { if (is_file($l)) { // $logical_name = substr($l, strripos($l, '/') +1); // $logical_name = str_replace('_lang.php', '', $logical_name); // $this->lang->load($logical_name, Settings::get_lang()); include $l; $this->lang->language = array_merge($this->lang->language, $lang); unset($lang); } } } */ /* * Settings * */ // @TODO : Remove this thing from the global CMS. Not more mandatory, but necessary for compatibility with historical version // Available menus // Each menu was a root node in which you can put several pages, wich are composing a menu. // Was never really implemented in ionize historical version, but already used as : menus[0]... Settings::set('menus', config_item('menus')); // Don't want to cache this content $this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate"); $this->output->set_header("Cache-Control: post-check=0, pre-check=0", false); $this->output->set_header("Pragma: no-cache"); }
mkdir($path); if (!is_dir($path)) { echo '<script type="text/javascript">parent.addMessage("'._t('로고 이미지를 업로드 할 수 없었습니다').'");</script>'; exit; } @chmod($path, 0777); } if (file_exists($path . '/'. basename($_FILES['logoFile']['name']))) { $filename = substr(md5(time()), -1, 8).$_FILES['logoFile']['name']; } else { $filename = $_FILES['logoFile']['name']; } if (!move_uploaded_file($_FILES['logoFile']['tmp_name'], $path.'/'.$filename)) { echo '<script type="text/javascript">parent.addMessage("'._t('로고를 변경할 수 없었습니다').'");</script>'; exit; } else { $config->set('logo', $filename); @unlink($path.'/'.$config->logo); } } } $nowLogo = $config->get('logo'); $logoURL = (!empty($nowLogo)) ? '/cache/logo/'.$nowLogo : '/images/noimage.jpg'; echo '<script type="text/javascript">parent.addMessage("'._t('수정 완료했습니다.').'"); parent.document.getElementById("myLogo").src = "'.$service['path'].$logoURL.'";</script>'; ?> </body> </html>
function verify_retard_reservation() { global $dformat; $day = date("d"); $month = date("m"); $year = date("Y"); $date_now = mktime(0, 0, 0, $month, $day, $year); if ((Settings::get("date_verify_reservation2") == "" || Settings::get("date_verify_reservation2") < $date_now) && Settings::get("automatic_mail") == 'yes') { $res = grr_sql_query("SELECT id FROM " . TABLE_PREFIX . "_room"); if (!$res) { include "trailer.inc.php"; exit; } else { for ($i = 0; $row = grr_sql_row($res, $i); $i++) { $res2 = grr_sql_query("SELECT id from " . TABLE_PREFIX . "_entry WHERE statut_entry='e' AND end_time < '" . $date_now . "' AND room_id='" . $row[0] . "'"); if (!$res2) { include "trailer.inc.php"; exit; } else { for ($j = 0; $row2 = grr_sql_row($res2, $j); $j++) { $_SESSION['session_message_error'] = send_mail($row2[0], 7, $dformat); } } } } if (!Settings::set("date_verify_reservation2", $date_now)) { echo "Erreur lors de l'enregistrement de date_verify_reservation2 !<br />"; die; } } }
$sso_active_correspondance_profil_statut = "y"; } } if (!Settings::set("sso_ac_corr_profil_statut", $sso_active_correspondance_profil_statut)) { echo "Erreur lors de l'enregistrement de sso_active_correspondance_profil_statut !<br />"; } if ($_POST['sso_statut'] != "cas_visiteur" && $_POST['sso_statut'] != "cas_utilisateur") { $sso_redirection_accueil_grr = "n"; } else { if (!isset($_POST['sso_redirection_accueil_grr'])) { $sso_redirection_accueil_grr = "n"; } else { $sso_redirection_accueil_grr = "y"; } } if (!Settings::set("sso_redirection_accueil_grr", $sso_redirection_accueil_grr)) { echo "Erreur lors de l'enregistrement de sso_redirection_accueil_grr !<br />"; } } if (isset($_SERVER['HTTP_REFERER'])) { $back = htmlspecialchars($_SERVER['HTTP_REFERER']); } if (authGetUserLevel(getUserName(), -1) < 6 && $valid != 'yes') { showAccessDenied($back); exit; } # print the page header print_header("", "", "", $type = "with_session"); // Affichage de la colonne de gauche include "admin_col_gauche.php"; echo "<form action=\"admin_config_sso.php\" method=\"post\">\n";
if ($_SERVER['PIMPLE_PATH']) { require_once rtrim($_SERVER['PIMPLE_PATH'], '/') . '/bootstrap.php'; } elseif ($_ENV['PIMPLE_PATH']) { require_once rtrim($_ENV['PIMPLE_PATH'], '/') . '/bootstrap.php'; } else { die('PIMPLE_PATH NOT FOUND'); } //Set url to pimple/www/ Settings::set(Pimple::URL, '/pimple/'); require_once 'CouchDb.php'; require_once 'model/SessionModel.php'; require_once 'model/UserModel.php'; require_once 'service/UserService.php'; require_once 'service/ProjectService.php'; //Check for local config file (db settings etc.) if (isset($_SERVER['HOME']) && !isset($_ENV['HOME'])) { $_ENV['HOME'] = $_SERVER['HOME']; } $localconfig = $_ENV['HOME'] . '/.pimple/scrumbanana.php'; if (isset($_ENV['HOME']) && file_exists($localconfig)) { require_once $localconfig; } Pimple::instance()->setSiteName('ScrumBanana.com'); Settings::set(Mail::FROM_NAME, 'ScrumBanana.com'); //Overrule all mails to send to this address - if debug is enabled Settings::set(Mail::TEST_MAIL, '*****@*****.**'); //Default date formats Settings::set(Date::DATE_FORMAT, 'd.m.Y'); Settings::set(Date::DATETIME_FORMAT, 'd.m.Y H:i:s'); Settings::set(Date::TIME_FORMAT, 'H:i:s');
/** * @param FormRequestAbstract $request * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ public function storeBackEndSettings(FormRequestAbstract $request) { $is_registration_allowed = $request->get('is_registration_allowed'); \Settings::set('users.is_registration_allowed', !is_null($is_registration_allowed)); $is_role_management_allowed = $request->get('is_role_management_allowed'); \Settings::set('users.is_role_management_allowed', !is_null($is_role_management_allowed)); $social_login = $request->get('social_login'); \Settings::set('users.social.login', is_array($social_login) ? $social_login : []); $widgets = $request->get('widgets'); if (array_key_exists('frontend', $widgets)) { $this->r_dashboard->setSettingKey('users.frontend.dashboard.widgets'); $this->r_dashboard->setModuleSettingKey('.front.users.dashboard.widgets'); $this->r_dashboard->activate($widgets['frontend']); } if (array_key_exists('backend', $widgets)) { $this->r_dashboard->setSettingKey('users.backend.dashboard.widgets'); $this->r_dashboard->setModuleSettingKey('.admin.dashboard.widgets'); $this->r_dashboard->activate($widgets['backend']); } return redirect(route('backend.users.settings.index')); }
$msg = get_vocab("message_records"); } } // Enregistrement de allow_users_modify_email // Un gestionnaire d'utilisateurs ne peut pas Autoriser ou non la modification par un utilisateur de ses informations personnelles if (isset($_GET['action']) && $_GET['action'] == "modif_email" && authGetUserLevel(getUserName(), -1, 'user') != 1) { if (!Settings::set("allow_users_modify_email", $_GET['allow_users_modify_email'])) { $msg = get_vocab("message_records_error"); } else { $msg = get_vocab("message_records"); } } // Enregistrement de allow_users_modify_mdp // Un gestionnaire d'utilisateurs ne peut pas Autoriser ou non la modification par un utilisateur de son mot de passe if (isset($_GET['action']) && $_GET['action'] == "modif_mdp" && authGetUserLevel(getUserName(), -1, 'user') != 1) { if (!Settings::set("allow_users_modify_mdp", $_GET['allow_users_modify_mdp'])) { $msg = get_vocab("message_records_error"); } else { $msg = get_vocab("message_records"); } } // Nettoyage de la base locale // On propose de supprimer les utilisateurs ext de GRR qui ne sont plus présents dans la base LCS if (isset($_GET['action']) && $_GET['action'] == "nettoyage" && Settings::get("sso_statut") == "lcs") { // Sélection des utilisateurs non locaux $sql = "SELECT login, etat, source FROM " . TABLE_PREFIX . "_utilisateurs where source='ext'"; $res = grr_sql_query($sql); if ($res) { include LCS_PAGE_AUTH_INC_PHP; include LCS_PAGE_LDAP_INC_PHP; for ($i = 0; $row = grr_sql_row($res, $i); $i++) {
/** * Create admin page * * @author Thibaud Rohmer */ public function __construct() { /// Check that current user is an admin or an uploader if (!(CurrentUser::$admin || CurrentUser::$uploader)) { return; } /// Get actions available for Uploaders too if (isset($_GET['a'])) { switch ($_GET['a']) { case "Abo": $this->page = new AdminAbout(); break; case "Upl": if (isset($_POST['path'])) { AdminUpload::upload(); CurrentUser::$path = File::r2a(stripslashes($_POST['path'])); } break; case "Mov": if (isset($_POST['pathFrom'])) { try { CurrentUser::$path = File::r2a(dirname(stripslashes($_POST['pathFrom']))); } catch (Exception $e) { CurrentUser::$path = Settings::$photos_dir; } } Admin::move(); if (isset($_POST['move']) && $_POST['move'] == "rename") { try { if (is_dir(File::r2a(stripslashes($_POST['pathFrom'])))) { CurrentUser::$path = dirname(File::r2a(stripslashes($_POST['pathFrom']))) . "/" . stripslashes($_POST['pathTo']); } } catch (Exception $e) { CurrentUser::$path = Settings::$photos_dir; } } break; case "Del": if (isset($_POST['del'])) { if (!is_array($_POST['del'])) { CurrentUser::$path = dirname(File::r2a(stripslashes($_POST['del']))); } else { CurrentUser::$path = dirname(File::r2a(stripslashes($_POST['del'][0]))); } Admin::delete(); } break; } } /// Check that current user is an admin if (!CurrentUser::$admin) { return; } /// Get action if (isset($_GET['a'])) { switch ($_GET['a']) { case "Sta": $this->page = new AdminStats(); break; case "VTk": $this->page = new GuestToken(); break; case "DTk": if (isset($_POST['tokenkey'])) { GuestToken::delete($_POST['tokenkey']); } $this->page = new GuestToken(); break; case "Acc": if (isset($_POST['edit'])) { Account::edit($_POST['login'], $_POST['old_password'], $_POST['password'], $_POST['name'], $_POST['email'], NULL, $_POST['language']); } if (isset($_POST['login'])) { $this->page = new Account($_POST['login']); } else { $this->page = CurrentUser::$account; } break; case "GC": Group::create($_POST['group']); $this->page = new Group(); break; case "AAc": Account::create($_POST['login'], $_POST['password'], $_POST['verif']); $this->page = new Group(); break; case "AGA": $a = new Account($_POST['acc']); $a->add_group($_POST['group']); $a->save(); $this->page = CurrentUser::$account; break; case "AGR": $a = new Account($_POST['acc']); $a->remove_group($_POST['group']); $a->save(); $this->page = CurrentUser::$account; break; case "ADe": Account::delete($_POST['name']); $this->page = new Group(); break; case "GEd": Group::edit($_POST); $this->page = new Group(); break; case "GDe": Group::delete($_GET['g']); $this->page = new Group(); break; case "CDe": CurrentUser::$path = File::r2a($_POST['image']); Comments::delete($_POST['id']); $this->page = new MainPage(); break; case "JS": break; case "EdA": $this->page = new Group(); break; case "GAl": if (isset($_POST['path'])) { Settings::gener_all(File::r2a(stripslashes($_POST['path']))); } case "Set": if (isset($_POST['name'])) { Settings::set(); } $this->page = new Settings(); break; } } if (!isset($this->page)) { $this->page = new AdminAbout(); } /// Create menu $this->menu = new AdminMenu(); }
private static function save(\contact\Resource\ContactInfo $contact_info) { \Settings::set('contact', 'phone_number', $contact_info->getPhoneNumber()); \Settings::set('contact', 'fax_number', $contact_info->getFaxNumber()); \Settings::set('contact', 'email', $contact_info->getEmail()); }
if ($_GET['verif_reservation_auto'] == 0) { $_GET['motdepasse_verif_auto_grr'] = ""; $_GET['chemin_complet_grr'] = ""; } } if (isset($_GET['motdepasse_verif_auto_grr'])) { if ($_GET['verif_reservation_auto'] == 1 && $_GET['motdepasse_verif_auto_grr'] == "") { $msg .= "l'exécution du script verif_auto_grr.php requiert un mot de passe !\\n"; } if (!Settings::set("motdepasse_verif_auto_grr", $_GET['motdepasse_verif_auto_grr'])) { echo "Erreur lors de l'enregistrement de motdepasse_verif_auto_grr !<br />"; die; } } if (isset($_GET['chemin_complet_grr'])) { if (!Settings::set("chemin_complet_grr", $_GET['chemin_complet_grr'])) { echo "Erreur lors de l'enregistrement de chemin_complet_grr !<br />"; die; } } if (!Settings::load()) { die("Erreur chargement settings"); } # print the page header print_header("", "", "", $type = "with_session"); if (isset($_GET['ok'])) { $msg = get_vocab("message_records"); affiche_pop_up($msg, "admin"); } // Affichage de la colonne de gauche include "admin_col_gauche.php";
/** * Sets an exporter setting. * * @since 0.4.0 * @param string $name * @param mixed $value * @return boolean * @access protected */ protected function set_setting($name, $value) { return $this->settings->set($name, $value); }
unset($display); $display = isset($_GET["display"]) ? $_GET["display"] : NULL; $day = date("d"); $month = date("m"); $year = date("Y"); check_access(6, $back); if (isset($_GET['valid']) && $_GET['valid'] == "yes") { if (!Settings::set("begin_bookings", $_GET['begin_bookings'])) { echo "Erreur lors de l'enregistrement de begin_bookings !<br />"; } else { $del = grr_sql_query("DELETE FROM " . TABLE_PREFIX . "_entry WHERE (end_time < " . Settings::get('begin_bookings') . ")"); $del = grr_sql_query("DELETE FROM " . TABLE_PREFIX . "_repeat WHERE end_date < " . Settings::get("begin_bookings")); $del = grr_sql_query("DELETE FROM " . TABLE_PREFIX . "_entry_moderate WHERE (end_time < " . Settings::get('begin_bookings') . ")"); $del = grr_sql_query("DELETE FROM " . TABLE_PREFIX . "_calendar WHERE DAY < " . Settings::get("begin_bookings")); } if (!Settings::set("end_bookings", $_GET['end_bookings'])) { echo "Erreur lors de l'enregistrement de end_bookings !<br />"; } else { $del = grr_sql_query("DELETE FROM " . TABLE_PREFIX . "_entry WHERE start_time > " . Settings::get("end_bookings")); $del = grr_sql_query("DELETE FROM " . TABLE_PREFIX . "_repeat WHERE start_time > " . Settings::get("end_bookings")); $del = grr_sql_query("DELETE FROM " . TABLE_PREFIX . "_entry_moderate WHERE (start_time > " . Settings::get('end_bookings') . ")"); $del = grr_sql_query("DELETE FROM " . TABLE_PREFIX . "_calendar WHERE DAY > " . Settings::get("end_bookings")); } header("Location: ./admin_config.php"); } else { if (isset($_GET['valid']) && $_GET['valid'] == "no") { header("Location: ./admin_config.php"); } } # print the page header print_header("", "", "", $type = "with_session");
# print the page header print_header("", "", "", $type = "with_session"); // Affichage de la colonne de gauche include "admin_col_gauche.php"; // Affichage du tableau de choix des sous-configuration $grr_script_name = "admin_calend_jour_cycle.php"; include "include/admin_calend_jour_cycle.inc.php"; // Met à jour dans la BD le nombre de jours par cycle if (isset($_GET['nombreJours'])) { if (!Settings::set("nombre_jours_Jours/Cycles", $_GET['nombreJours'])) { echo "Erreur lors de l'enregistrement de nombre_jours_Jours/Cycles ! <br />"; } } // Met à jour dans la BD le premier jour du premier cycle if (isset($_GET['jourDebut'])) { if (!Settings::set("jour_debut_Jours/Cycles", $_GET['jourDebut'])) { echo "Erreur lors de l'enregistrement de jour_debut_Jours/Cycles ! <br />"; } } // // Configurations du nombre de jours par Jours/Cycles et du premier jour du premier Jours/Cycles //****************************** // echo "<h3>" . get_vocab("titre_config_Jours/Cycles") . "</h3>\n"; echo "<form action=\"./admin_calend_jour_cycle.php\" method=\"get\" style=\"width: 100%;\" onsubmit=\"return verifierJoursCycles(false);\">\n"; echo "<p>" . get_vocab("explication_Jours_Cycles1"); echo "<br />" . get_vocab("explication_Jours_Cycles2"); ?> <br /><br /> </p> <table class="table table-bordered">
/** * Sets the maintenance page * */ function set_maintenance_page() { $id_page = $this->input->post('id_page'); $data = array('name' => 'maintenance_page', 'content' => $id_page); $this->settings_model->save_setting($data); if ($id_page) { $this->load->model('page_model', '', true); $page = $this->page_model->get($id_page, Settings::get_lang('default')); $options = array(CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => false, CURLOPT_FOLLOWLOCATION => true, CURLOPT_ENCODING => "", CURLOPT_USERAGENT => "ionize", CURLOPT_AUTOREFERER => true, CURLOPT_CONNECTTIMEOUT => 120, CURLOPT_TIMEOUT => 120, CURLOPT_MAXREDIRS => 10, CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_VERBOSE => 1); $ch = curl_init(base_url() . $page['name']); curl_setopt_array($ch, $options); $content = curl_exec($ch); $err = curl_errno($ch); $errmsg = curl_error($ch); $header = curl_getinfo($ch); curl_close($ch); write_file(FCPATH . 'maintenance.html', $content); } else { @unlink(FCPATH . 'maintenance.html'); } Settings::set('maintenance_page', $id_page); $this->get_maintenance_page(); }
if (isset($_GET['sessionMaxLength'])) { settype($_GET['sessionMaxLength'], "integer"); if ($_GET['sessionMaxLength'] < 1) { $_GET['sessionMaxLength'] = 30; } if (!Settings::set("sessionMaxLength", $_GET['sessionMaxLength'])) { echo "Erreur lors de l'enregistrement de sessionMaxLength !<br />"; } } // pass_leng if (isset($_GET['pass_leng'])) { settype($_GET['pass_leng'], "integer"); if ($_GET['pass_leng'] < 1) { $_GET['pass_leng'] = 1; } if (!Settings::set("pass_leng", $_GET['pass_leng'])) { echo "Erreur lors de l'enregistrement de pass_leng !<br />"; } } if (!Settings::load()) { die("Erreur chargement settings"); } # print the page header print_header("", "", "", $type = "with_session"); if (isset($_GET['ok'])) { $msg = get_vocab("message_records"); affiche_pop_up($msg, "admin"); } // Affichage de la colonne de gauche include "admin_col_gauche.php"; // Affichage du tableau de choix des sous-configuration
function ShowMessages() { global $aMessages, $sLangID, $aGetVars, $sHTMLCharSet; // // force message numbers on unless "mnums=no" // if (isset($aGetVars["mnums"]) && $aGetVars["mnums"] == "no") { Settings::set('bShowMesgNumbers', false); } else { Settings::set('bShowMesgNumbers', true); } LoadBuiltinLanguage(); $s_def_lang = $sLangID; $a_def_mesgs = $aMessages; LoadLanguageFile(); $s_active_lang = $sLangID; $a_active_mesgs = $aMessages; $a_list = get_defined_constants(); echo "<html>\n"; echo "<head>\n"; if (isset($sHTMLCharSet) && $sHTMLCharSet !== "") { echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset={$sHTMLCharSet}\">\n"; } echo "</head>\n"; echo "<body>\n"; echo "<table border=\"1\" cellpadding=\"10\" width=\"95%\">\n"; echo "<tr>\n"; echo "<th>\n"; echo "Message Number"; echo "</th>\n"; echo "<th>\n"; echo "{$s_def_lang}"; echo "</th>\n"; echo "<th>\n"; echo "{$s_active_lang}"; echo "</th>\n"; echo "</tr>\n"; foreach ($a_list as $s_name => $i_value) { if (substr($s_name, 0, 4) == "MSG_") { // // some PHP constants begin with MSG_, so we try to skip them // too // switch ($s_name) { case "MSG_IPC_NOWAIT": case "MSG_EAGAIN": case "MSG_ENOMSG": case "MSG_NOERROR": case "MSG_EXCEPT": case "MSG_OOB": case "MSG_PEEK": case "MSG_DONTROUTE": case "MSG_EOR": continue 2; } if ($i_value >= 256) { continue; } echo "<tr>\n"; echo "<td valign=\"top\">\n"; echo "{$s_name} ({$i_value})"; echo "</td>\n"; echo "<td valign=\"top\">\n"; $aMessages = $a_def_mesgs; $s_def_msg = GetMessage((int) $i_value, array(), true, true); echo nl2br(htmlentities($s_def_msg)); // English - don't need // FixedHTMLEntities echo "</td>\n"; echo "<td valign=\"top\">\n"; $aMessages = $a_active_mesgs; $s_act_msg = GetMessage((int) $i_value, array(), true, true); if ($s_def_msg == $s_act_msg) { echo "<i>identical</i>\n"; } else { echo nl2br(FixedHTMLEntities($s_act_msg)); } echo "</td>\n"; echo "</tr>\n"; } } echo "</table>\n"; echo "</body>\n"; echo "</html>\n"; }