/** * Admin interface */ public function viewTagsAdmin() { global $aidlink; pageAccess('F'); add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=ft', 'title' => self::$locale['forum_tag_0100'])); echo "<div class='well'>" . self::$locale['forum_tag_0101'] . "</div>\n"; $tab['title'][] = self::$locale['forum_tag_0102']; $tab['id'][] = "tag_list"; $tab['icon'][] = ""; $tab['title'][] = isset($_GET['tag_id']) && isnum($_GET['tag_id']) ? self::$locale['forum_tag_0104'] : self::$locale['forum_tag_0103']; $tab['id'][] = "tag_form"; $tab['icon'][] = ""; $_GET['ref'] = isset($_GET['ref']) && in_array($_GET['ref'], $tab['id']) ? $_GET['ref'] : "tag_list"; echo opentab($tab, $_GET['ref'], "rank_admin", TRUE, "m-t-10", "ref"); switch ($_GET['ref']) { case "tag_form": echo $this->displayTagForm(); break; case "tag_list": echo $this->displayTagList(); } echo closetab(); }
public function viewRanksAdmin() { global $aidlink; pageAccess('FR'); add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=fr', 'title' => self::$locale['404'])); $forum_settings = $this->get_forum_settings(); echo "<div class='well'>" . self::$locale['forum_rank_0100'] . "</div>\n"; if ($forum_settings['forum_ranks']) { $tab['title'][] = self::$locale['402']; $tab['id'][] = "rank_list"; $tab['icon'][] = ""; $tab['title'][] = isset($_GET['rank_id']) && isnum($_GET['rank_id']) ? self::$locale['401'] : self::$locale['400']; $tab['id'][] = "rank_form"; $tab['icon'][] = ""; $_GET['ref'] = isset($_GET['ref']) && in_array($_GET['ref'], $tab['id']) ? $_GET['ref'] : "rank_list"; echo opentab($tab, $_GET['ref'], "rank_admin", TRUE, "m-t-10", "ref"); switch ($_GET['ref']) { case "rank_form": // @todo: improvise rank from ui echo $this->displayRanksForm(); break; case "rank_list": echo $this->displayRankList(); } echo closetab(); } else { opentable(self::$locale['403']); ?> <div class="well text-center"> <?php echo sprintf(self::$locale['450'], "<a href='" . FUSION_SELF . $aidlink . "§ion=fs'>" . self::$locale['451'] . "</a>"); ?> </div> <?php closetable(); } }
public function viewMoodAdmin() { global $aidlink; pageAccess('FR'); add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=fmd', 'title' => self::$locale['forum_admin_004'])); echo "<div class='well'>" . self::$locale['forum_090'] . "</div>\n"; $tab['title'][] = self::$locale['forum_093']; $tab['id'][] = "mood_list"; $tab['icon'][] = ""; $tab['title'][] = isset($_GET['mood_id']) && isnum($_GET['mood_id']) ? self::$locale['forum_092'] : self::$locale['forum_091']; $tab['id'][] = "mood_form"; $tab['icon'][] = ""; $_GET['ref'] = isset($_GET['ref']) && in_array($_GET['ref'], $tab['id']) ? $_GET['ref'] : "mood_list"; echo opentab($tab, $_GET['ref'], "mood_admin", TRUE, "m-t-10", "ref"); switch ($_GET['ref']) { case "mood_form": $this->displayMoodForm(); break; case "mood_list": $this->displayMoodList(); break; } echo closetab(); }
<?php require_once "inx/global.inc.php"; // only accesible to SuperAdmin and Administrator pageAccess($_SESSION["auth"]["roles"], array('SuperAdmin', 'Administrator')); $page = new HTML_Page2($page_defaults); $sql = "SELECT use_id,use_fname,use_sname FROM user"; $q = $db->query($sql); if (DB::isError($q)) { die("db error: " . $q->getMessage()); } while ($row = $q->fetchRow()) { $users[$row["use_id"]] = $row["use_fname"] . ' ' . $row["use_sname"]; } $formData1 = array('use_id' => array('type' => 'select', 'label' => 'User', 'value' => $use_id, 'options' => $users, 'attributes' => array('class' => 'addr'), 'required' => 2), 'use_password' => array('type' => 'text', 'label' => 'Password', 'value' => $use_password, 'attributes' => array('class' => 'addr'), 'required' => 2, 'tooltip' => 'Passwords must be at least 8 characters, and contain at least one number and one UPPER CASE letter')); if (!$_GET["action"]) { $form = new Form(); $form->addForm("", "get", $PHP_SELF); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "action", "", "reset"); ///////////////////////////////////////////////////////////////////////////////// $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">Reset Password</div>'); $form->addData($formData1, $_GET); $form->addHtml($form->addDiv($form->makeField("submit", "", "", "Save Changes", array('class' => 'submit')))); $form->addHtml("</fieldset>\n"); $form->addHtml('<pre>'); for ($i = 1; $i <= 5; ++$i) { $form->addHtml(random_string(16, 'safe') . "\n"); } $form->addHtml('</pre>');
public function display_forum_admin() { global $aidlink; opentable(self::$locale['forum_000c']); $tab_title['title'][] = self::$locale['forum_admin_000']; $tab_title['id'][] = 'fm'; $tab_title['icon'][] = ''; $tab_title['title'][] = self::$locale['forum_admin_001']; $tab_title['id'][] = 'fr'; $tab_title['icon'][] = ''; $tab_title['title'][] = self::$locale['forum_admin_002']; $tab_title['id'][] = 'ft'; $tab_title['icon'][] = ''; $tab_title['title'][] = self::$locale['forum_admin_004']; $tab_title['id'][] = 'fmd'; $tab_title['icon'][] = ''; $tab_title['title'][] = self::$locale['forum_admin_003']; $tab_title['id'][] = 'fs'; $tab_title['icon'][] = ''; echo opentab($tab_title, isset($_GET['section']) ? $_GET['section'] : 'fm', 'forum-admin-tabs', TRUE); if (isset($_GET['section'])) { switch ($_GET['section']) { case 'fr': $this->viewRank()->viewRanksAdmin(); break; case 'ft': $this->viewTags()->viewTagsAdmin(); break; case 'fmd': $this->viewMood()->viewMoodAdmin(); break; case 'fs': $this->viewSettings()->viewSettingsAdmin(); break; default: redirect(INFUSIONS . 'forum/admin/forums.php' . $aidlink); } } else { pageAccess('F'); add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink, 'title' => self::$locale['forum_admin_000'])); $this->display_forum_index(); } echo closetab(); closetable(); }
$tab_title['icon'][] = ''; $tab_active = tab_active($tab_title, isset($_GET['section']) ? $_GET['section'] : 'fm', true); echo opentab($tab_title, $tab_active, 'fmm', true); if (isset($_GET['section'])) { switch ($_GET['section']) { case 'fr': pageAccess('FR'); add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=fr', 'title' => $locale['404'])); echo opentabbody($tab_title['title'][1], $tab_title['id'][1], $tab_active, true, 'section'); include INFUSIONS . 'forum/admin/forum_ranks.php'; echo closetabbody(); break; case 'fs': pageAccess('F'); echo opentabbody($tab_title['title'][2], $tab_title['id'][2], $tab_active, true, 'section'); include INFUSIONS . 'forum/admin/settings_forum.php'; echo closetabbody(); break; default: redirect(INFUSIONS . 'forum/admin/forums.php' . $aidlink); } } else { pageAccess('F'); add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink, 'title' => $locale['forum_admin_000'])); echo opentabbody($tab_title['title'][0], $tab_title['id'][0], $tab_active, true, 'section'); $forum_admin->display_forum_admin(); echo closetabbody(); } echo closetab(); closetable(); require_once THEMES . "templates/footer.php";
| Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: user_log.php | Author: gh0st2k +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess('UL'); require_once THEMES . "templates/admin_header.php"; include LOCALE . LOCALESET . "admin/user_log.php"; add_breadcrumb(array('link' => ADMIN . 'administrators.php' . $aidlink, 'title' => $locale['100'])); if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; } // Set default values $dbOrder = "ORDER BY userlog_timestamp DESC"; $dbWhere = ""; $dbWhereCount = ""; $getString = $aidlink; $orderby = "userlog_timestamp"; $expr = "DESC"; $user = ""; $userField = "";
| PHP-Fusion Content Management System | Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: admin/blog_settings.php | Author: Frederick MC Chan (Chan) +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ pageAccess("S8"); if (isset($_POST['savesettings'])) { $error = 0; $inputArray = array("article_pagination" => form_sanitizer($_POST['article_pagination'], 0, "article_pagination"), "article_allow_submission" => form_sanitizer($_POST['article_allow_submission'], 0, "article_allow_submission"), "article_extended_required" => isset($_POST['article_extended_required']) ? 1 : 0); if (defender::safe()) { foreach ($inputArray as $settings_name => $settings_value) { $inputSettings = array("settings_name" => $settings_name, "settings_value" => $settings_value, "settings_inf" => "article"); dbquery_insert(DB_SETTINGS_INF, $inputSettings, "update", array("primary_key" => "settings_name")); } addNotice("success", $locale['900']); redirect(FUSION_REQUEST); } else { addNotice('danger', $locale['901']); } } echo "<div class='well'>" . $locale['articles_0031'] . "</div>";
| Copyright (C) 2002 - 2011 Nick Jones | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: permalinks.php | Author: Ankur Thakur +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess('PL'); require_once THEMES . "templates/admin_header.php"; include LOCALE . LOCALESET . "admin/settings.php"; include LOCALE . LOCALESET . "admin/permalinks.php"; $settings = fusion_get_settings(); add_breadcrumb(array('link' => ADMIN . 'permalink.php' . $aidlink, 'title' => $locale['428'])); // Check if mod_rewrite is enabled $mod_rewrite = FALSE; if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) { $mod_rewrite = TRUE; } elseif (isset($_SERVER['IIS_UrlRewriteModule'])) { $mod_rewrite = TRUE; } elseif (isset($_SERVER['MOD_REWRITE'])) { $mod_rewrite = TRUE; } define('MOD_REWRITE', $mod_rewrite);
| Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: settings_misc.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess('S6'); require_once THEMES . "templates/admin_header.php"; include LOCALE . LOCALESET . "admin/settings.php"; add_breadcrumb(array('link' => ADMIN . "settings_misc.php" . $aidlink, 'title' => $locale['misc_settings'])); if (isset($_POST['savesettings'])) { $inputData = array("tinymce_enabled" => form_sanitizer($_POST['tinymce_enabled'], 0, "tinymce_enabled"), "smtp_host" => form_sanitizer($_POST['smtp_host'], "", "smtp_host"), "smtp_port" => form_sanitizer($_POST['smtp_port'], "", "smtp_port"), "smtp_auth" => isset($_POST['smtp_auth']) && !empty($_POST['smtp_username']) && !empty($_POST['smtp_password']) ? TRUE : FALSE, "smtp_username" => form_sanitizer($_POST['smtp_username'], "", "smtp_username"), "login_method" => form_sanitizer($_POST['login_method'], 0, "login_method"), "thumb_compression" => form_sanitizer($_POST['thumb_compression'], 0, "thumb_compression"), "mime_check" => form_sanitizer($_POST['mime_check'], 0, "mime_check"), "guestposts" => form_sanitizer($_POST['guestposts'], 0, "guestposts"), "comments_enabled" => form_sanitizer($_POST['comments_enabled'], 0, "comments_enabled"), "comments_per_page" => form_sanitizer($_POST['comments_per_page'], 10, "comments_per_page"), "ratings_enabled" => form_sanitizer($_POST['ratings_enabled'], 0, "ratings_enabled"), "visitorcounter_enabled" => form_sanitizer($_POST['visitorcounter_enabled'], 0, "visitorcounter_enabled"), "rendertime_enabled" => form_sanitizer($_POST['rendertime_enabled'], 0, "rendertime_enabled"), "comments_sorting" => form_sanitizer($_POST['comments_sorting'], "DESC", "comments_sorting"), "index_url_bbcode" => form_sanitizer($_POST['index_url_bbcode'], 0, "index_url_bbcode"), "index_url_userweb" => form_sanitizer($_POST['index_url_userweb'], 0, "index_url_userweb")); if (defender::safe()) { foreach ($inputData as $settings_name => $settings_value) { $data = array("settings_name" => $settings_name, "settings_value" => $settings_value); dbquery_insert(DB_SETTINGS, $data, "update", array("primary_key" => "settings_name")); } addNotice('success', $locale['900']); redirect(FUSION_SELF . $aidlink); } else { addNotice('danger', $locale['901']); }
| Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: images.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess('IM'); require_once THEMES . "templates/admin_header.php"; include LOCALE . LOCALESET . "admin/image_uploads.php"; if (isset($_GET['action']) && ($_GET['action'] = "update")) { include INCLUDES . "buildlist.php"; } $folders = array("images" => IMAGES, "imagesa" => IMAGES_A, "imagesn" => IMAGES_N, "imagesnc" => IMAGES_NC, "imagesb" => IMAGES_B, "imagesbc" => IMAGES_BC); if (isset($_GET['ifolder']) && ctype_alnum($_GET['ifolder']) == 1 && isset($folders[$_GET['ifolder']])) { $_GET['ifolder'] = stripinput($_GET['ifolder']); $afolder = $folders[$_GET['ifolder']]; } else { $_GET['ifolder'] = "images"; $afolder = IMAGES; } $image_list = makefilelist($afolder, ".|..", TRUE, "files", "php|js|ico|DS_Store|SVN"); if ($image_list) {
| Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: polls.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../../maincore.php"; pageAccess('PO'); require_once THEMES . "templates/admin_header.php"; if (file_exists(INFUSIONS . "member_poll_panel/locale/" . LOCALESET . "member_poll_panel_admin.php")) { include INFUSIONS . "member_poll_panel/locale/" . LOCALESET . "member_poll_panel_admin.php"; } else { include INFUSIONS . "member_poll_panel/locale/English/member_poll_panel_admin.php"; } add_breadcrumb(array('link' => ADMIN . 'polls.php' . $aidlink, 'title' => $locale['439c'])); if (isset($_GET['poll_id']) && !isnum($_GET['poll_id'])) { redirect(FUSION_SELF); } $poll_option = array(); if (isset($_POST['save'])) { $poll_title = form_sanitizer($_POST['poll_title'], '', 'poll_title'); $poll_language = form_sanitizer($_POST['poll_language'], "", "poll_language"); foreach ($_POST['poll_option'] as $key => $value) {
| Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: settings_languages.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess("LANG"); require_once THEMES . "templates/admin_header.php"; $locale = fusion_get_locale('', LOCALE . LOCALESET . 'admin/settings.php'); $locale += fusion_get_locale('', LOCALE . LOCALESET . 'setup.php'); // Just follow the display of the current admin language. $settings = fusion_get_settings(); if (!empty($locale['setup_3007'])) { dbquery("UPDATE " . DB_LANGUAGE_TABLES . " SET mlt_title='" . $locale['setup_3007'] . "' WHERE mlt_rights='CP'"); } if (!empty($locale['setup_3210'])) { dbquery("UPDATE " . DB_LANGUAGE_TABLES . " SET mlt_title='" . $locale['setup_3210'] . "' WHERE mlt_rights='SL'"); } if (!empty($locale['setup_3208'])) { dbquery("UPDATE " . DB_LANGUAGE_TABLES . " SET mlt_title='" . $locale['setup_3208'] . "' WHERE mlt_rights='ET'"); } if (!empty($locale['setup_3211'])) {
| Copyright (C) 2002 - 2011 Nick Jones | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: db_backup.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess('DB'); require_once THEMES . "templates/admin_header.php"; include LOCALE . LOCALESET . "admin/db-backup.php"; add_breadcrumb(array('link' => ADMIN . 'db_backup.php' . $aidlink, 'title' => $locale['450'])); function stripsiteinput($text) { $search = array("&", """, "'", "\", """, "'", "<", ">", " "); $replace = array("", "", "", "", "", "", "", "", ""); $text = str_replace($search, $replace, $text); return $text; } if (isset($_POST['btn_create_backup'])) { $backup_file_name = form_sanitizer($_POST['backup_filename'], '', 'backup_filename'); if (!check_admin_pass(isset($_POST['user_admin_password']) ? form_sanitizer($_POST['user_admin_password'], '', 'user_admin_password') : "")) { $defender->stop(); }
| Filename: panels.php | Author: PHP-Fusion Development Team | Author: Robert Gaudyn (Wooya) | Author: Joakim Falk (Domi) | Author: Frederick MC Chan (Hien) +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess('P'); require_once THEMES . "templates/admin_header.php"; include LOCALE . LOCALESET . "admin/panels.php"; /** * Class fusion_panels */ class fusion_panels { /** * @var array|bool */ private $data = array('panel_id' => 0, 'panel_name' => '', 'panel_filename' => '', 'panel_content' => '', 'panel_type' => 'php', 'panel_side' => 1, 'panel_order' => 0, 'panel_access' => 0, 'panel_display' => 0, 'panel_status' => 0, 'panel_url_list' => '', 'panel_restriction' => 3, 'panel_languages' => ''); /** * @var string */ private $formaction = '';
<?php pageAccess("N"); /** * Displays News Listing */ function display_news_listing() { $aidlink = fusion_get_aidlink(); $locale = fusion_get_locale(); // Run functions $allowed_actions = array_flip(array("publish", "unpublish", "sticky", "unsticky", "delete")); if (isset($_POST['table_action']) && isset($allowed_actions[$_POST['table_action']])) { $input = isset($_POST['news_id']) ? explode(",", form_sanitizer($_POST['news_id'], "", "news_id")) : ""; if (!empty($input)) { foreach ($input as $news_id) { // check input table if (dbcount("('news_id')", DB_NEWS, "news_id='" . intval($news_id) . "'") && defender::safe()) { switch ($_POST['table_action']) { case "publish": dbquery("UPDATE " . DB_NEWS . " SET news_draft='0' WHERE news_id='" . intval($news_id) . "'"); break; case "unpublish": dbquery("UPDATE " . DB_NEWS . " SET news_draft='1' WHERE news_id='" . intval($news_id) . "'"); break; case "sticky": dbquery("UPDATE " . DB_NEWS . " SET news_sticky='1' WHERE news_id='" . intval($news_id) . "'"); break; case "unsticky": dbquery("UPDATE " . DB_NEWS . " SET news_sticky='0' WHERE news_id='" . intval($news_id) . "'"); break;
| PHP-Fusion Content Management System | Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: admin/gallery_actions.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ pageAccess("PH"); if (isset($_POST['cancel'])) { redirect(FUSION_SELF . $aidlink); } /** * Move up and down album */ if (isset($_GET['action']) && ($_GET['action'] == "mu" || $_GET['action'] == "md") && isset($_GET['cat_id']) && isnum($_GET['cat_id']) && isset($_GET['order']) && isnum($_GET['order'])) { $album_max_order = dbresult(dbquery("SELECT MAX(album_order) FROM " . DB_PHOTO_ALBUMS . " WHERE album_language='" . LANGUAGE . "'"), 0) + 1; if (dbcount("('album_id')", DB_PHOTO_ALBUMS, "album_id=' " . intval($_GET['cat_id']) . " '")) { switch ($_GET['action']) { case "mu": // -1 album order if ($_GET['order'] < $album_max_order && $_GET['order'] >= 1) { dbquery("UPDATE " . DB_PHOTO_ALBUMS . " SET album_order = album_order+1 WHERE album_order='" . $_GET['order'] . "'"); dbquery("UPDATE " . DB_PHOTO_ALBUMS . " SET album_order= '" . $_GET['order'] . "' WHERE album_id ='" . $_GET['cat_id'] . "'");
| https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: theme.php | Author: Frederick MC Chan (Hien) | Co-Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess('S1'); require_once THEMES . "templates/admin_header.php"; require_once LOCALE . LOCALESET . "admin/theme.php"; $theme_admin = new \PHPFusion\Atom\Admin(); /** * Auto Upgrade Script -- remove after beta period */ if (!db_exists(DB_SETTINGS_THEME)) { $result = dbquery("CREATE TABLE " . DB_SETTINGS_THEME . "\r\n\t\t(settings_name VARCHAR(200) NOT NULL DEFAULT '',\r\n\t\tsettings_value TEXT NOT NULL,\r\n\t\tsettings_theme VARCHAR(200) NOT NULL DEFAULT '',\r\n\t\tPRIMARY KEY (settings_name)\r\n\t\t) ENGINE=MYISAM DEFAULT CHARSET=UTF8 COLLATE=utf8_unicode_ci\r\n\t"); addNotice('success', "Theme Engine has been upgraded"); } opentable($locale['theme_1000']); switch ($_GET['action']) { case "manage": if (isset($_GET['theme'])) { echo "<div class='m-t-20'>\n";
| Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: upgrade.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess("U"); require_once THEMES . "templates/admin_header.php"; $settings = fusion_get_settings(); if (file_exists(LOCALE . LOCALESET . "admin/upgrade.php")) { include LOCALE . LOCALESET . "admin/upgrade.php"; } else { include LOCALE . "English/admin/upgrade.php"; } add_breadcrumb(array('link' => ADMIN . 'upgrade.php' . $aidlink, 'title' => $locale['400'])); opentable($locale['400']); // Execute Gallery migration script if called if (isset($_GET['migrate_gallery'])) { require_once ADMIN . "upgrade/gallery_migrate.php"; echo "<div class='well'>Your Photoalbums have been moved</div>"; } // Execute Forum attachment migration script if called
| PHP-Fusion Content Management System | Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: article_cats_admin.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ pageAccess("A"); if (isset($_GET['action']) && $_GET['action'] == "delete" && (isset($_GET['cat_id']) && isnum($_GET['cat_id']))) { $result = dbcount("(article_id)", DB_ARTICLES, "article_cat='" . $_GET['cat_id'] . "'") || dbcount("(article_cat_id)", DB_ARTICLE_CATS, "article_cat_parent='" . intval($_GET['cat_id']) . "'"); if (!empty($result)) { addNotice("danger", $locale['articles_0152'] . " " . $locale['articles_0153']); redirect(clean_request("cat_view=1", array("section", "aid"), true)); } else { $result = dbquery("DELETE FROM " . DB_ARTICLE_CATS . " WHERE article_cat_id='" . intval($_GET['cat_id']) . "'"); addNotice("success", $locale['articles_0154']); redirect(clean_request("cat_view=1", array("section", "aid"), true)); } } else { // First Initialize $cat_id = 0; $cat_name = ""; $cat_description = "";
| PHP-Fusion Content Management System | Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: admin/blog_cat.php | Author: Frederick MC Chan (Chan) +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ pageAccess('BLOG'); /** * Delete category images */ if (isset($_GET['action']) && $_GET['action'] == "delete" && (isset($_GET['cat_id']) && isnum($_GET['cat_id']))) { $result = dbcount("(blog_cat)", DB_BLOG, "blog_cat='" . $_GET['cat_id'] . "'") || dbcount("(blog_cat_id)", DB_BLOG_CATS, "blog_cat_parent='" . $_GET['cat_id'] . "'"); if (!empty($result)) { addNotice("danger", $locale['blog_0522'] . "-<span class='small'>" . $locale['blog_0523'] . "</span>"); redirect(FUSION_SELF . $aidlink); } else { $result = dbquery("DELETE FROM " . DB_BLOG_CATS . " WHERE blog_cat_id='" . intval($_GET['cat_id']) . "'"); addNotice("success", $locale['blog_0524b']); redirect(FUSION_SELF . $aidlink); } redirect(clean_request("", array("action"), FALSE)); }
| Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: faq/faq_admin.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../../maincore.php"; pageAccess('FQ'); require_once THEMES . "templates/admin_header.php"; require_once INCLUDES . "html_buttons_include.php"; if (file_exists(INFUSIONS . "faq/locale/" . LOCALESET . "faq_admin.php")) { include INFUSIONS . "faq/locale/" . LOCALESET . "faq_admin.php"; } else { include INFUSIONS . "faq/locale/English/faq_admin.php"; } add_breadcrumb(array('link' => INFUSIONS . "faq/faq_admin.php" . $aidlink, 'title' => $locale['faq_0100'])); $show_faqs = 5; $data = array("faq_cat_name" => "", "faq_cat_description" => "", "faq_cat_language" => LANGUAGE); $faq_edit = isset($_GET['action']) && $_GET['action'] == "edit" && isset($_GET['faq_id']) && isnum($_GET['faq_id']) ? TRUE : FALSE; $faqCat_edit = isset($_GET['action']) && $_GET['action'] == "edit" && isset($_GET['cat_id']) && isnum($_GET['cat_id']) ? TRUE : FALSE; opentable($locale['faq_0100']); $faq_tab['title'][] = $locale['faq_0101']; $faq_tab['id'][] = "faq-list";
<?php require_once "../inx/global.inc.php"; // allows manual editing of property records // only accesible to SuperAdmin pageAccess($_SESSION["auth"]["roles"], array('SuperAdmin', 'SuperProduction')); // if a property id is given, get info from pro table if ($_GET["pro_id"]) { $sql = "SELECT\n\tpro_id,pro_addr1,pro_addr2,pro_addr3,pro_addr4,pro_addr5,pro_addr6,pro_country,pro_postcode,pro_area,pro_pcid,\n\tpro_authority,pro_east,pro_north,pro_latitude,pro_longitude,pro_dump\n\n\tFROM\n\tproperty\n\tWHERE\n\tpro_id = " . $_GET["pro_id"] . "\n\tLIMIT 1"; $q = $db->query($sql); if (DB::isError($q)) { die("db error: " . $q->getMessage()); } $render = "<form><table>"; $row = $q->fetchRow(); foreach ($row as $key => $val) { foreach ($row as $key => $val) { ${$key} = $val; } } } // get areas $areas[0] = ''; $sql_area = "SELECT * FROM area ORDER BY are_title"; $q_area = $db->query($sql_area); while ($row_area = $q_area->fetchRow()) { $areas[$row_area["are_id"]] = $row_area["are_title"] . ' ' . $row_area["are_postcode"]; } // get country $sql_area = "SELECT * FROM country ORDER BY cou_title"; $q_area = $db->query($sql_area);
| Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: site_links.php | Author: Frederick MC Chan (Hien) +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess("SL"); require_once THEMES . "templates/admin_header.php"; include LOCALE . LOCALESET . "admin/sitelinks.php"; $site_links = new \PHPFusion\SiteLinks(); $edit = isset($_GET['link_id']) ? $site_links->verify_edit($_GET['link_id']) : 0; $master_title['title'][] = $locale['SL_0001']; $master_title['id'][] = "links"; $master_title['icon'][] = ''; $master_title['title'][] = $edit ? $locale['SL_0011'] : $locale['SL_0010']; $master_title['id'][] = "nform"; $master_title['icon'][] = $edit ? "fa fa-pencil m-r-10" : "fa fa-plus-square m-r-10"; $section = "links"; $allowed_section = array("links", "nform"); if (isset($_GET['section']) && in_array($_GET['section'], $allowed_section)) { $section = $_GET['section']; }
| Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: settings_banners.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess('SB'); require_once THEMES . "templates/admin_header.php"; require_once INCLUDES . "html_buttons_include.php"; include LOCALE . LOCALESET . "admin/settings.php"; $settings = fusion_get_settings(); add_breadcrumb(array('link' => ADMIN . 'banners.php' . $aidlink, 'title' => $locale['850'])); $message = ''; if (isset($_GET['error'])) { switch ($_GET['error']) { case '1': $message = $locale['901']; $status = 'danger'; $icon = "<i class='fa fa-alert fa-lg fa-fw'></i>"; break; default: $message = $locale['900'];
| Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: administrators.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess('AD'); require_once THEMES . "templates/admin_header.php"; include LOCALE . LOCALESET . "admin/admins.php"; add_breadcrumb(array('link' => ADMIN . 'administrators.php' . $aidlink, 'title' => $locale['420'])); $message = ''; if (isset($_GET['status'])) { switch ($_GET['status']) { case 'sn': $message = $locale['400']; $status = 'success'; $icon = "<i class='fa fa-check-square-o fa-lg fa-fw'></i>"; break; case 'su': $message = $locale['401']; $status = 'info'; $icon = "<i class='fa fa-check-square-o fa-lg fa-fw'></i>";
public function viewSettingsAdmin() { global $aidlink; pageAccess('F'); $forum_settings = $this->get_forum_settings(); add_breadcrumb(array('link' => ADMIN . 'settings_forum.php' . $aidlink, 'title' => self::$locale['forum_settings'])); if (isset($_POST['recount_user_post'])) { $result = dbquery("SELECT post_author, COUNT(post_id) as num_posts FROM " . DB_FORUM_POSTS . " GROUP BY post_author"); if (dbrows($result)) { while ($data = dbarray($result)) { $result2 = dbquery("UPDATE " . DB_USERS . " SET user_posts='" . $data['num_posts'] . "' WHERE user_id='" . $data['post_author'] . "'"); } addNotice('success', self::$locale['forum_061']); } } if (isset($_POST['savesettings'])) { $numofthreads = form_sanitizer($_POST['numofthreads'], 20, 'numofthreads'); $threads_num = form_sanitizer($_POST['threads_per_page'], 20, 'threads_per_page'); $posts_num = form_sanitizer($_POST['posts_per_page'], 20, 'posts_per_page'); $forum_ips = form_sanitizer($_POST['forum_ips'], -103, 'forum_ips'); $attachmax = form_sanitizer($_POST['calc_b'], 1, 'calc_b') * form_sanitizer($_POST['calc_c'], 1000000, 'calc_c'); $attachmax_count = form_sanitizer($_POST['forum_attachmax_count'], 5, 'forum_attachmax_count'); $attachtypes = form_sanitizer($_POST['forum_attachtypes'], '.pdf,.gif,.jpg,.png,.zip,.rar,.tar,.bz2,.7z', 'forum_attachtypes'); $thread_notify = form_sanitizer($_POST['thread_notify'], '0', 'thread_notify'); $forum_ranks = form_sanitizer($_POST['forum_ranks'], '0', 'forum_ranks'); $forum_rank_style = form_sanitizer($_POST['forum_rank_style'], '0', 'forum_rank_style'); $forum_edit_lock = form_sanitizer($_POST['forum_edit_lock'], '0', 'forum_edit_lock'); $forum_edit_timelimit = form_sanitizer($_POST['forum_edit_timelimit'], '0', 'forum_edit_timelimit'); $popular_threads_timeframe = form_sanitizer($_POST['popular_threads_timeframe'], '604800', 'popular_threads_timeframe'); $forum_last_posts_reply = form_sanitizer($_POST['forum_last_posts_reply'], '0', 'forum_last_posts_reply'); $forum_last_post_avatar = form_sanitizer($_POST['forum_last_post_avatar'], '0', 'forum_last_post_avatar'); $forum_editpost_to_lastpost = form_sanitizer($_POST['forum_editpost_to_lastpost'], '0', 'forum_editpost_to_lastpost'); if (\defender::safe()) { dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$numofthreads}' WHERE settings_name='numofthreads' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$threads_num}' WHERE settings_name='threads_per_page' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$posts_num}' WHERE settings_name='posts_per_page' AND settings_inf='forum'"); //".(isnum($_POST['forum_ips']) ? $_POST['forum_ips'] : "103")." dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_ips}' WHERE settings_name='forum_ips' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$attachmax}' WHERE settings_name='forum_attachmax' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$attachmax_count}' WHERE settings_name='forum_attachmax_count' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$attachtypes}' WHERE settings_name='forum_attachtypes' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$thread_notify}' WHERE settings_name='thread_notify' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_ranks}' WHERE settings_name='forum_ranks' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_rank_style}' WHERE settings_name='forum_rank_style' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_edit_lock}' WHERE settings_name='forum_edit_lock' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_edit_timelimit}' WHERE settings_name='forum_edit_timelimit' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$popular_threads_timeframe}' WHERE settings_name='popular_threads_timeframe' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_last_posts_reply}' WHERE settings_name='forum_last_posts_reply' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_last_post_avatar}' WHERE settings_name='forum_last_post_avatar' AND settings_inf='forum'"); dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_editpost_to_lastpost}' WHERE settings_name='forum_editpost_to_lastpost' AND settings_inf='forum'"); addNotice('success', self::$locale['900']); redirect(FUSION_SELF . $aidlink . '§ion=fs'); } } $yes_no_array = array('1' => self::$locale['yes'], '0' => self::$locale['no']); echo "<div class='well'>" . self::$locale['forum_description'] . "</div>"; echo openform('forum_settings_form', 'post', FUSION_REQUEST, array('class' => 'm-t-20')); echo "<div class='row'>\n"; echo "<div class='col-xs-12 col-sm-8'>\n"; openside(''); echo "<span class='small pull-right'>* " . self::$locale['506'] . "</span><br/>\n"; echo form_text('numofthreads', self::$locale['505'], $forum_settings['numofthreads'], array('error_text' => self::$locale['error_value'], 'inline' => 1, 'width' => '150px', 'type' => 'number')); closeside(); openside(''); echo form_text('threads_per_page', self::$locale['forum_080'], $forum_settings['threads_per_page'], array('error_text' => self::$locale['error_value'], 'inline' => 1, 'width' => '150px', 'type' => 'number')); echo form_text('posts_per_page', self::$locale['forum_081'], $forum_settings['posts_per_page'], array('error_text' => self::$locale['error_value'], 'inline' => 1, 'width' => '150px', 'type' => 'number')); closeside(); openside(''); echo form_select('thread_notify', self::$locale['512'], $forum_settings['thread_notify'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1)); closeside(); openside(''); echo "<span class='pull-right position-absolute small' style='right:30px;'>" . self::$locale['537'] . "</span>\n"; echo form_select('forum_edit_timelimit', self::$locale['536'], $forum_settings['forum_edit_timelimit'], array('options' => array('0', '10', '30', '45', '60'), 'max_length' => 2, 'width' => '100px', 'required' => 1, 'error_text' => self::$locale['error_value'], 'inline' => 1)); echo form_select('forum_ips', self::$locale['507'], $forum_settings['forum_ips'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1)); echo form_select('forum_ranks', self::$locale['520'], $forum_settings['forum_ranks'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1)); echo form_select('forum_rank_style', self::$locale['forum_064'], $forum_settings['forum_rank_style'], array('options' => array(self::$locale['forum_063'], self::$locale['forum_062']), 'error_text' => self::$locale['error_value'], 'inline' => 1)); echo form_select('forum_last_post_avatar', self::$locale['539'], $forum_settings['forum_last_post_avatar'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1)); echo form_select('forum_edit_lock', self::$locale['521'], $forum_settings['forum_edit_lock'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1)); echo form_select('forum_editpost_to_lastpost', self::$locale['538'], $forum_settings['forum_editpost_to_lastpost'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1)); closeside(); echo "</div>\n"; echo "<div class='col-xs-12 col-sm-4'>\n"; openside(''); $calc_opts = array(1 => 'Bytes (bytes)', 1000 => 'KB (Kilobytes)', 1000000 => 'MB (Megabytes)'); $calc_c = self::calculate_byte($forum_settings['forum_attachmax']); $calc_b = $forum_settings['forum_attachmax'] / $calc_c; require_once INCLUDES . "mimetypes_include.php"; $mime = mimeTypes(); $mime_opts = array(); foreach ($mime as $m => $Mime) { $ext = ".{$m}"; $mime_opts[$ext] = $ext; } sort($mime_opts); echo "<div class='clearfix'>\n"; echo "<span class='pull-right small'>" . self::$locale['509'] . "</span>"; echo "<label for='calc_c'>" . self::$locale['508'] . "</label><br />\n"; echo form_text('calc_b', '', $calc_b, array('required' => 1, 'number' => 1, 'error_text' => self::$locale['error_rate'], 'width' => '100px', 'max_length' => '3', 'class' => 'm-r-10 pull-left')); echo form_select('calc_c', '', $calc_c, array('options' => $calc_opts, 'placeholder' => self::$locale['choose'], 'class' => 'pull-left', 'width' => '100%')); echo "</div>\n"; echo "<div class='clearfix'>\n"; echo "<span class='small pull-right'>" . self::$locale['535'] . "</span>\n"; echo "<label for='attachmax_count'>" . self::$locale['534'] . "</label>\n"; echo form_select('forum_attachmax_count', '', $forum_settings['forum_attachmax_count'], array('options' => range(1, 10), 'error_text' => self::$locale['error_value'], 'width' => '100%')); echo "</div>\n"; echo "<div class='clearfix'>\n"; echo "<span class='small pull-right'>" . self::$locale['511'] . "</span>\n"; echo form_select('forum_attachtypes', self::$locale['510'], $forum_settings['forum_attachtypes'], array('options' => $mime_opts, 'width' => '100%', 'error_text' => self::$locale['error_type'], 'tags' => 1, 'multiple' => 1, 'placeholder' => self::$locale['choose'])); echo "</div>\n"; closeside(); openside(''); $timeframe_opts = array('604800' => self::$locale['527'], '2419200' => self::$locale['528'], '31557600' => self::$locale['529'], '0' => self::$locale['530']); $lastpost_opts = array('0' => self::$locale['519'], '1' => self::$locale['533']); for ($i = 2; $i <= 20; $i++) { $array_opts[$i] = sprintf(self::$locale['532'], $i); } if (isset($_GET['action']) && $_GET['action'] == "count_posts") { echo alert(self::$locale['524'], '', array('class' => 'warning')); } echo "<div class='clearfix'>\n"; echo form_select('popular_threads_timeframe', self::$locale['525'], $forum_settings['popular_threads_timeframe'], array('options' => $timeframe_opts, 'error_text' => self::$locale['error_value'], 'width' => '100%')); echo "</div>\n"; echo "<div class='clearfix'>\n"; echo form_select('forum_last_posts_reply', self::$locale['531'], $forum_settings['forum_last_posts_reply'], array('options' => $lastpost_opts, 'error_text' => self::$locale['error_value'], 'width' => '100%')); echo "</div>\n"; echo form_button('recount_user_post', self::$locale['523'], '1', array('class' => 'btn-primary btn-block')); closeside(); echo "</div>\n"; echo "</div>\n"; echo form_button('savesettings', self::$locale['750'], self::$locale['750'], array('class' => 'btn-success')); echo closeform(); }
| Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: settings_theme.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess('S3'); require_once THEMES . "templates/admin_header.php"; include LOCALE . LOCALESET . "admin/settings.php"; add_breadcrumb(array('link' => ADMIN . "settings_theme.php" . $aidlink, 'title' => $locale['theme_settings'])); // These are the default settings and the only settings we expect to be posted $settings_theme = array('admin_theme' => fusion_get_settings('admin_theme'), 'theme' => fusion_get_settings('theme'), 'bootstrap' => fusion_get_settings('bootstrap'), 'entypo' => fusion_get_settings('entypo'), 'fontawesome' => fusion_get_settings('fontawesome')); // Saving settings if (isset($_POST['savesettings'])) { $settings_theme = array("admin_theme" => form_sanitizer($_POST['admin_theme'], $settings_theme['admin_theme'], "admin_theme"), "theme" => form_sanitizer($_POST['theme'], $settings_theme['theme'], "theme"), "bootstrap" => form_sanitizer($_POST['bootstrap'], 0, "bootstrap"), "entypo" => form_sanitizer($_POST['entypo'], 0, "entypo"), "fontawesome" => form_sanitizer($_POST['fontawesome'], 0, "fontawesome")); if (\defender::safe()) { $result = dbquery("UPDATE " . DB_SETTINGS . " SET settings_value='" . $settings_theme['admin_theme'] . "' WHERE settings_name='admin_theme'"); if ($result) { dbquery("UPDATE " . DB_SETTINGS . " SET settings_value='" . $settings_theme['theme'] . "' WHERE settings_name='theme'"); } if ($result) { dbquery("UPDATE " . DB_SETTINGS . " SET settings_value='" . $settings_theme['bootstrap'] . "' WHERE settings_name='bootstrap'");
| Copyright (C) PHP-Fusion Inc | https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: settings_registration.php | Author: PHP-Fusion Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess('S4'); require_once THEMES . "templates/admin_header.php"; include LOCALE . LOCALESET . "admin/settings.php"; add_breadcrumb(array('link' => ADMIN . "settings_register.php" . $aidlink, 'title' => $locale['register_settings'])); if ($settings['tinymce_enabled']) { echo "<script language='javascript' type='text/javascript'>advanced();</script>\n"; } else { require_once INCLUDES . "html_buttons_include.php"; } $settings2 = array(); $result = dbquery("SELECT * FROM " . DB_SETTINGS); while ($data = dbarray($result)) { $settings2[$data['settings_name']] = $data['settings_value']; } if (isset($_POST['savesettings'])) { $error = 0;
<?php if (!defined("IN_FUSION")) { die("Access Denied"); } pageAccess("W"); if (fusion_get_settings("tinymce_enabled")) { echo "<script language='javascript' type='text/javascript'>advanced();</script>\n"; } $result = dbcount("(weblink_cat_id)", DB_WEBLINK_CATS); if (!empty($result)) { $data = array("weblink_id" => 0, "weblink_name" => "", "weblink_cat" => 0, "weblink_description" => "", "weblink_visibility" => iGUEST, "weblink_url" => "", "weblink_datestamp" => time()); if (isset($_GET['action']) && $_GET['action'] == "delete" && (isset($_GET['weblink_id']) && isnum($_GET['weblink_id']))) { $result = dbquery("DELETE FROM " . DB_WEBLINKS . " WHERE weblink_id='" . $_GET['weblink_id'] . "'"); addNotice("success", $locale['wl_0302']); redirect(FUSION_SELF . $aidlink); } if (isset($_POST['save_link'])) { $data = array("weblink_id" => form_sanitizer($_POST['weblink_id'], 0, 'weblink_id'), "weblink_cat" => form_sanitizer($_POST['weblink_cat'], 0, 'weblink_cat'), "weblink_name" => form_sanitizer($_POST['weblink_name'], '', 'weblink_name'), "weblink_description" => form_sanitizer($_POST['weblink_description'], '', 'weblink_description'), "weblink_visibility" => form_sanitizer($_POST['weblink_visibility'], '0', 'weblink_visibility'), "weblink_url" => form_sanitizer($_POST['weblink_url'], '', 'weblink_url'), "weblink_datestamp" => form_sanitizer($_POST['weblink_datestamp'], '', 'weblink_datestamp')); if (defender::safe()) { if (dbcount("(weblink_id)", DB_WEBLINKS, "weblink_id='" . intval($data['weblink_id']) . "'")) { $data['weblink_datestamp'] = isset($_POST['update_datestamp']) ? time() : $data['weblink_datestamp']; dbquery_insert(DB_WEBLINKS, $data, "update"); addNotice("success", $locale['wl_0301']); redirect(FUSION_SELF . $aidlink); } else { dbquery_insert(DB_WEBLINKS, $data, "save"); addNotice("success", $locale['wl_0300']); redirect(FUSION_SELF . $aidlink); } }