* as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ if (isset($_POST['save_option'])) { update_email_options($_SESSION['uid'], "del_virus_notifi", $_POST['del_virus_notifi'], 0); update_email_options($_SESSION['uid'], "del_dups_mails", $_POST['del_dups_mails'], 0); update_mailfilter('del_virus_notifi', $_SESSION['uid'], $_POST['del_virus_notifi'], 0, 0); update_mailfilter('del_dups_mails', $_SESSION['uid'], $_POST['del_dups_mails'], 0, 0); // activate System-Script run_systemscripts(); if (is_dir(ROOT . "/includes/localization/" . $_POST['web_lang']) || ($_POST['web_lang'] = "en_US")) { update_email_options($_SESSION['uid'], 'web_lang', $_POST['web_lang'], 0); $_SESSION['lang'] = $_POST['web_lang']; } } $del_virus_notifi = get_email_options($_SESSION['uid'], "del_virus_notifi", 0); $smarty->assign('del_virus_notifi', $del_virus_notifi); $del_dups_mails = get_email_options($_SESSION['uid'], "del_dups_mails", 0); $smarty->assign('del_dups_mails', $del_dups_mails); $smarty->assign('table_lang', get_all_langs()); $smarty->assign('web_lang', $_SESSION['lang']); $smarty->assign('email', $_SESSION['email']);
public function actionControl_panel() { global $gd_exist, $zip_support; is_admin(); $current_tab = 'overview'; $tabs_array = array('overview', 'siteset', 'message', 'ban_ip'); $tabs_name_array = array(t('ACP_OVERVIEW'), t('ACP_CONFSET'), t('ACP_MANAGE_POST'), t('ACP_MANAGE_IP')); if (isset($_GET['subtab'])) { if (in_array($_GET['subtab'], $tabs_array)) { $current_tab = $_GET['subtab']; } } $themes = get_all_themes(); $data = get_all_data(TRUE, false, TRUE, TRUE, false); $reply_data = $this->_model->queryAll(parse_tbprefix("SELECT * FROM <reply>")); $ban_ip_info = $this->_model->queryAll(parse_tbprefix("SELECT * FROM <badip>")); $nums = count($data); $reply_num = count($reply_data); if ($gd_exist) { $gd_info = gd_version(); $gd_version = $gd_info ? $gd_info : '<font color="red">' . t('UNKNOWN') . '</font>'; } else { $gd_version = '<font color="red">GD' . t('NOT_SUPPORT') . '</font>'; } $register_globals = ini_get("register_globals") ? 'On' : 'Off'; $magic_quotes_gpc = ini_get("magic_quotes_gpc") ? 'On' : 'Off'; $languages = get_all_langs(); $timezone_array = get_all_timezone(); $this->render('admin', array('tabs_array' => $tabs_array, 'current_tab' => $current_tab, 'tabs_name_array' => $tabs_name_array, 'nums' => $nums, 'reply_num' => $reply_num, 'gd_version' => $gd_version, 'register_globals' => $register_globals, 'magic_quotes_gpc' => $magic_quotes_gpc, 'zip_support' => $zip_support, 'themes' => $themes, 'timezone_array' => $timezone_array, 'languages' => $languages, 'data' => $data, 'ban_ip_info' => $ban_ip_info)); }
public static function langSwitcher() { $flags = ''; $all_langs = get_all_langs(); foreach ($all_langs as $code => $name) { if (LANG == $code) { $flags .= ' <a href="' . LOCAL . $code . (u0 ? '/' . PATH : '') . '" class="active" title="' . $name . '"> <img src="' . LOCAL . 'images/flags/' . $code . '.png" alt="' . $code . '" /> </a>'; } else { $flags .= ' <a href="' . LOCAL . $code . (u0 ? '/' . PATH : '') . '" class="inactive" title="' . $name . '"> <img src="' . LOCAL . 'images/flags/' . $code . '.png" alt="' . $code . '" /> </a> '; } } return $flags . "\n"; }
private function set_lang() { $lang = isset($_POST['lang']) && in_array($_POST['lang'], get_all_langs()) ? $_POST['lang'] : 'en'; $this->_model->query(sprintf(parse_tbprefix("UPDATE <sysvar> SET varvalue='%s' WHERE varname='lang'"), $lang)); }
$form['communicator_image'] = htmlspecialchars($form['communicator_image']); $form['communicator_url'] = htmlspecialchars($form['communicator_url']); $form['reserved_usernames'] = r2n($form['reserved_usernames']); $form['time_zone'] = (double) $form['time_zone']; save_config($system, 'system', local_url . 'admin/system'); } else { negative($errors); } } else { //neutral(array('<strong>Radzę z rozwagą i świadomością edytować poniższe dane.</strong>', $lang_system['REQUIRED'])); $templates_dir = opendir(ROOT . 'templates/'); } while (false !== ($template_dir = readdir($templates_dir))) { if (ctype_alpha($template_dir)) { $templates[] = $template_dir; } } $tpl = new PHPTAL('admin/system/settings.html'); $tpl->form = $form; $tpl->errors = $errors; $tpl->system = $system; $tpl->lang2 = $lang2; $tpl->lang_admin = $lang_admin; $tpl->templates = $templates; $tpl->date_formats = array('d-m-Y, H:i', 'Y-m-d, H:i', 'd.m.y - H:i', 'j F Y, H:i', 'D j M Y, H:i'); $tpl->short_date_formats = array('d-m-Y', 'Y-m-d', 'd.m.y', 'j F Y', 'D j M Y'); $tpl->time_zones = $cfg->system['time_zones']; $tpl->languages = get_all_langs(); $tpl->columns = form_columns(); $tpl->blocks = form_blocks(); echo $tpl->execute();