/**
 * Store or update an array of values
 * @param $pArray an array of values to set
 * @param $pPackageName name of the package the feature belongs to
 * @return none
 */
function simple_set_configs($pArray, $pPackageName = NULL)
{
    foreach ($pArray as $item => $data) {
        if ($data['type'] == 'numeric') {
            simple_set_int($item, $pPackageName);
        } elseif ($data['type'] == 'toggle') {
            simple_set_toggle($item, $pPackageName);
        } elseif ($data['type'] == 'input') {
            simple_set_value($item, $pPackageName);
        }
    }
}
    simple_set_toggle("feature_community_mouseover");
    simple_set_toggle("feature_community_mouseover_name");
    simple_set_toggle("feature_community_mouseover_picture");
    simple_set_toggle("feature_community_mouseover_friends");
    simple_set_toggle("feature_community_mouseover_score");
    simple_set_toggle("feature_community_mouseover_country");
    simple_set_toggle("feature_community_mouseover_email");
    simple_set_toggle("feature_community_mouseover_lastlogin");
    simple_set_toggle("feature_community_mouseover_distance");
}
if (isset($_REQUEST["listfeatures"])) {
    check_ticket('admin-inc-community');
    simple_set_toggle("feature_community_list_name");
    simple_set_toggle("feature_community_list_score");
    simple_set_toggle("feature_community_list_country");
    simple_set_toggle("feature_community_list_distance");
    simple_set_value("user_list_order");
}
/* This is desired future feature
if (isset($_REQUEST["friendshipfeatures"])) {
	check_ticket('admin-inc-community');
	simple_set_toggle("feature_community_friends_permission");
	simple_set_int("feature_community_friends_permission_dep");

}
*/
ask_ticket('admin-inc-community');
?>


Example #3
0
            $mvmsg .= ' ' . tra('a timeout occurred. Hit the reload button to move the rest');
        }
        $tikifeedback[]['mes'] = $mvmsg;
    }
}
if (isset($_REQUEST['imagegallistprefs'])) {
    check_ticket('admin-inc-gal');
    $pref_toggles = array('gal_list_name', 'gal_list_parent', 'gal_list_description', 'gal_list_created', 'gal_list_lastmodif', 'gal_list_user', 'gal_list_imgs', 'gal_list_visits');
    foreach ($pref_toggles as $toggle) {
        simple_set_toggle($toggle);
    }
}
if (isset($_REQUEST['imagegalcomprefs'])) {
    check_ticket('admin-inc-gal');
    simple_set_value('image_galleries_comments_per_page');
    simple_set_value('image_galleries_comments_default_order');
}
if (isset($_REQUEST['mvimg']) && isset($_REQUEST['move_gallery'])) {
    check_ticket('admin-inc-gal');
    if ($_REQUEST['mvimg'] == 'to_fs' && $prefs['gal_use_db'] == 'n' || $_REQUEST['mvimg'] == 'to_db' && $prefs['gal_use_db'] == 'y') {
        $mvresult = $imagegallib->move_gallery_store($_REQUEST['move_gallery'], $_REQUEST['mvimg']);
        $mvmsg = sprintf(tra('moved %d images, %d errors occurred.'), $mvresult['moved_images'], $mvresult['errors']);
        if ($mvresult['timeout']) {
            $mvmsg .= ' ' . tra('a timeout occurred. Hit the reload button to move the rest');
        }
        $tikifeedback[]['mes'] = $mvmsg;
    }
}
if (!isset($_REQUEST['maxRows'])) {
    $_REQUEST['maxRows'] = $prefs['maxRowsGalleries'];
}
Example #4
0
<?php

require_once '../../../kernel/setup_inc.php';
require_once KERNEL_PKG_PATH . '/simple_form_functions_lib.php';
$gBitSystem->verifyPermission('p_admin');
$feedback = array();
$sources = array('ASP' => 'ASP', 'ActionScript' => 'ActionScript', 'Ada' => 'Ada', 'Apache' => 'Apache Log File', 'AppleScript' => 'AppleScript', 'Asm' => 'ASM (NASM based)', 'Bash' => 'Bash', 'Blitz Basic' => 'Blitz Basic', 'C' => 'C', 'CSS' => 'CSS', 'CSharp' => 'C#', 'C_Mac' => 'C for Macs', 'CadDcl' => 'AutoCAD DCL', 'CadLisp' => 'AutoCAD LISP', 'Cpp' => 'C++', 'D' => 'D', 'DIV' => 'DIV', 'DOS' => 'DOS', 'Delphi' => 'Delphi', 'Diff' => 'Diff Output', 'Eiffel' => 'Eiffel', 'FreeBasic' => 'FreeBasic', 'GML' => 'GML', 'Html4Strict' => 'HTML (4.0.1)', 'Inno' => 'Inno', 'Java' => 'Java', 'JavaScript' => 'JavaScript', 'Lisp' => 'Lisp', 'Lua' => 'Lua', 'MatLab' => 'MatLab', 'MpAsm' => 'MpAsm', 'MySQL' => 'MySQL', 'Niss' => 'NullSoft Installer', 'OCaml' => 'OCaml', 'ObjC' => 'Objective C', 'OoBas' => 'OpenOffice.org Basic', 'Oracle8' => 'Oracle8', 'Pascal' => 'Pascal', 'Perl' => 'Perl', 'Php' => 'Php', 'Php_Brief' => 'Php_Brief', 'Python' => 'Python', 'QBasic' => 'QuickBasic', 'Ruby' => 'Ruby', 'SQL' => 'SQL', 'Scheme' => 'Scheme', 'Smarty' => 'Smarty', 'VHDL' => 'VHDL', 'Vb' => 'VisualBasic', 'VbNet' => 'VB.NET', 'Visual Basic' => 'Visual Basic', 'VisualFoxPro' => 'VisualFoxPro', 'XML' => 'XML', 'ini' => 'ini');
$gBitSmarty->assign('sources', $sources);
if (!empty($_REQUEST['plugin_settings'])) {
    simple_set_value('liberty_plugin_code_default_source', LIBERTY_PKG_NAME);
    $feedback['success'] = tra('The plugin was successfully updated');
}
$gBitSmarty->assign('feedback', $feedback);
$gBitSystem->display('bitpackage:liberty/plugins/data_code_admin.tpl', tra('Data Code Plugin Settings'), array('display_mode' => 'admin'));
<?php

// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_messages.php,v 1.1.2.1 2008-03-16 17:43:14 luciash Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
    header("location: index.php");
    exit;
}
if (isset($_REQUEST["messagesprefs"])) {
    ask_ticket('admin-inc-messages');
    simple_set_value('messu_mailbox_size');
    simple_set_value('messu_archive_size');
    simple_set_value('messu_sent_size');
    simple_set_toggle('allowmsg_is_optional');
    simple_set_toggle('allowmsg_by_default');
}
Example #6
0
<?php

// (c) Copyright 2002-2013 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: include_calendar.php 44444 2013-01-05 21:24:24Z changi67 $
include_once 'lib/calendar/calendarlib.php';
$rawcals = $calendarlib->list_calendars();
if (array_key_exists('data', $rawcals)) {
    $rawcals = $rawcals['data'];
    $smarty->assign('rawcals', $rawcals);
}
// This script may only be included - so its better to die if called directly.
if (strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !== false) {
    header('location: index.php');
    exit;
}
if (isset($_REQUEST['calprefs'])) {
    check_ticket('admin-inc-cal');
    simple_set_toggle('feature_jscalendar');
    simple_set_value('feature_default_calendars');
    simple_set_value('default_calendars', '', true);
}
ask_ticket('admin-inc-cal');
Example #7
0
<?php

// (c) Copyright 2002-2013 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: include_sefurl.php 50503 2014-03-25 23:52:33Z jyhem $
require_once 'tiki-setup.php';
$access->check_script($_SERVER["SCRIPT_NAME"], basename(__FILE__));
if (isset($_REQUEST['save'])) {
    check_ticket('admin-inc-sefurl');
    $_REQUEST['feature_sefurl_paths'] = preg_split('/ *[,\\/] */', $_REQUEST['feature_sefurl_paths']);
    simple_set_value('feature_sefurl_paths');
}
if (TikiInit::isIIS()) {
    $httpd = 'IIS';
    if (TikiInit::hasIIS_UrlRewriteModule()) {
        $smarty->assign('IIS_UrlRewriteModule', true);
        $enabledFileName = 'web.config';
        $referenceFileName = 'web_config';
    } else {
        $smarty->assign('IIS_UrlRewriteModule', false);
    }
} else {
    $enabledFileName = '.htaccess';
    $referenceFileName = '_htaccess';
    $httpd = 'Apache';
}
$smarty->assign('httpd', $httpd);
// Check if the URL rewriting configuration file is present and current
$configurationFile = "missing";
}
if (isset($_REQUEST['auth_shib'])) {
    check_ticket('admin-inc-login');
    simple_set_toggle('shib_create_user_tiki');
    simple_set_toggle('shib_skip_admin');
    simple_set_value('shib_affiliation');
    simple_set_toggle('shib_usegroup');
    simple_set_value('shib_group');
}
// Users Defaults
if (isset($_REQUEST['users_defaults'])) {
    check_ticket('admin-inc-login');
    // numerical and text values
    $_prefs = array('users_prefs_theme', 'users_prefs_userbreadCrumb', 'users_prefs_language', 'users_prefs_display_timezone', 'users_prefs_user_information', 'users_prefs_mailCharset', 'users_prefs_mess_maxRecords', 'users_prefs_minPrio', 'users_prefs_user_dbl', 'users_prefs_diff_versions', 'users_prefs_mess_archiveAfter', 'users_prefs_tasks_maxRecords');
    foreach ($_prefs as $pref) {
        simple_set_value($pref);
    }
    // boolean values
    $_prefs = array('users_prefs_show_mouseover_user_info', 'users_prefs_allowMsgs', 'users_prefs_mytiki_pages', 'users_prefs_mytiki_blogs', 'users_prefs_mytiki_gals', 'users_prefs_mytiki_msgs', 'users_prefs_mytiki_tasks', 'users_prefs_mytiki_items', 'users_prefs_mytiki_workflow', 'users_prefs_mytiki_forum_topics', 'users_prefs_mytiki_forum_replies', 'users_prefs_mess_sendReadStatus');
    foreach ($_prefs as $pref) {
        simple_set_toggle($pref);
    }
}
$smarty->assign("phpcas_enabled", $phpcas_enabled);
$smarty->assign('gd_lib_found', function_exists('gd_info') ? 'y' : 'n');
// Get list of available languages
$languages = array();
$languages = $tikilib->list_languages(false, null, true);
$smarty->assign_by_ref('languages', $languages);
$smarty->assign("styles", $tikilib->list_styles());
$listTrackers = $tikilib->list_trackers(0, -1, "name_desc", "");
Example #9
0
        $formRSSFeeds[$pkg . '_rss'] = array('label' => $pkg);
    }
}
$gBitSmarty->assign("formRSSFeeds", $formRSSFeeds);
$formRSSSettings = array('rssfeed_language' => array('label' => 'Language'), 'rssfeed_creator' => array('label' => 'Creator'), 'rssfeed_editor' => array('label' => 'Editor', 'note' => 'Email address for person responsible for editorial content. For RDF 2.0'), 'rssfeed_webmaster' => array('label' => 'Webmaster', 'note' => 'Email address for person responsible for technical issues relating to channel. For RDF 2.0'), 'rssfeed_image_url' => array('label' => 'Image URL', 'note' => 'Enter the full URL to an image that you want to associate with your RSS channels'), 'rssfeed_css_url' => array('label' => 'CSS File URL', 'note' => 'Enter the full URL to a CSS file you want to use to style your RSS Feeds.'), 'rssfeed_truncate' => array('label' => 'Truncate RSS feed', 'note' => 'Enter the number of characters you want to feed per item in the rss feeds. Default is 5000 characters.'));
$gBitSmarty->assign("formRSSSettings", $formRSSSettings);
$formRSSOptions = array('rssfeed_httpauth' => array('label' => 'Enable HTTP Authentication', 'note' => 'Use HTTP Authentication with SSL to enable Registered Users to gain access to Private Content Feeds.'));
$gBitSmarty->assign("formRSSOptions", $formRSSOptions);
$cacheTimes = array(0 => tra("(no cache)"), 60 => "1 " . tra("minute"), 300 => "5 " . tra("minutes"), 600 => "10 " . tra("minutes"), 1800 => "30 " . tra("minutes"), 3600 => "1 " . tra("hour"), 7200 => "2 " . tra("hours"), 14400 => "4 " . tra("hours"));
$gBitSmarty->assign("cacheTimes", $cacheTimes);
$feedTypes = array(0 => "RSS 0.91", 1 => "RSS 1.0", 2 => "RSS 2.0", 3 => "PIE 0.1", 4 => "MBOX", 5 => "ATOM", 6 => "ATOM 0.3", 7 => "OPML", 8 => "HTML", 9 => "JS");
$gBitSmarty->assign("feedTypes", $feedTypes);
if (!empty($_REQUEST['feed_settings'])) {
    // save package specific RSS feed settings
    foreach (array_keys($formRSSFeeds) as $item) {
        $package = preg_replace("/^rss_/", "", $item);
        simple_set_toggle($item, $package);
        simple_set_int($item . '_max_records', $package);
        simple_set_value($item . '_title', $package);
        simple_set_value($item . '_description', $package);
    }
    // deal with the RSS settings
    foreach (array_keys($formRSSSettings) as $item) {
        simple_set_value($item, RSS_PKG_NAME);
    }
    simple_set_value('rssfeed_default_version');
    simple_set_int('rssfeed_cache_time');
    foreach ($formRSSOptions as $item => $data) {
        simple_set_toggle($item, RSS_PKG_NAME);
    }
}
<?php

// $Header$
require_once CHATTERBOX_PKG_PATH . 'Chatterbox.php';
$gChatterbox = new Chatterbox();
if (!empty($_REQUEST['chatterbox_settings']) && !empty($_REQUEST['clear_logs'])) {
    $gChatterbox->pruneList(0);
}
// get the chatterbox data
$listHash = array('page' => !empty($_REQUEST['curPage']) ? $_REQUEST['curPage'] : 1, 'max_records' => !empty($_REQUEST['max_records']) ? $_REQUEST['max_records'] : 60, 'last_id' => !empty($_REQUEST['last_id']) ? $_REQUEST['last_id'] : -1, 'get_count' => TRUE);
$chatterbox = $gChatterbox->getList($listHash);
$gBitSmarty->assign('chatterbox', $chatterbox);
// pagination
$offset = !empty($_REQUEST['offset']) ? $_REQUEST['offset'] : 0;
$gBitSmarty->assign('curPage', $curPage = !empty($_REQUEST['curPage']) ? $_REQUEST['curPage'] : 1);
// calculate page number
$numPages = ceil($chatterbox['cant'] / $listHash['max_records']);
$gBitSmarty->assign('numPages', $numPages);
$pruneThreshold = array('-1' => tra('None'), '3600' => tra('Hour'), '86400' => tra('Day'), '604800' => tra('Week'), '2629743' => tra('Month'), '31556926' => tra('Year'), '999999999' => tra('Unlimited'));
$gBitSmarty->assign('pruneThreshold', $pruneThreshold);
if (!empty($_REQUEST['chatterbox_settings'])) {
    simple_set_value('chatterbox_prune_threshold', CHATTERBOX_PKG_NAME);
    simple_set_int('online_user_timeout', CHATTERBOX_PKG_NAME);
}
<?php

// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_wysiwyg.php,v 1.1.2.3 2008-03-19 14:00:42 sylvieg Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
    header("location: index.php");
    exit;
}
if (isset($_REQUEST["wysiwygfeatures"])) {
    check_ticket('admin-inc-wysiwyg');
    $pref_toggles = array("wysiwyg_optional", "wysiwyg_default", 'wysiwyg_memo', "wysiwyg_wiki_parsed", "wysiwyg_wiki_semi_parsed");
    if (isset($_REQUEST['restore']) && $_REQUEST['restore'] == 'on') {
        $tikilib->delete_preference('wysiwyg_toolbar');
    } else {
        simple_set_value('wysiwyg_toolbar');
    }
    foreach ($pref_toggles as $toggle) {
        simple_set_toggle($toggle);
    }
    simple_set_value('wysiwyg_toolbar_skin');
}
ask_ticket('admin-inc-wysiwyg');
    simple_set_value('fgal_list_author');
    simple_set_value('fgal_list_last_user');
    simple_set_value('fgal_list_comment');
    simple_set_value('fgal_list_files');
    simple_set_value('fgal_list_hits');
    simple_set_value('fgal_list_lockedby');
    $_REQUEST['fgal_sort_mode'] = (empty($_REQUEST['fgal_sortorder']) ? 'created' : $_REQUEST['fgal_sortorder']) . '_' . (empty($_REQUEST['fgal_sortdirection']) ? 'desc' : $_REQUEST['fgal_sortdirection']);
    $prefs['fgal_sort_mode'] = $_REQUEST['fgal_sort_mode'];
    simple_set_value('fgal_sort_mode');
    simple_set_toggle('fgal_show_explorer');
    simple_set_toggle('fgal_show_path');
}
if (isset($_REQUEST["filegalcomprefs"])) {
    check_ticket('admin-inc-fgal');
    simple_set_value("file_galleries_comments_per_page");
    simple_set_value("file_galleries_comments_default_ordering");
}
if (isset($_REQUEST["filegalhandlers"])) {
    check_ticket('admin-inc-fgal');
    $mimes = $_REQUEST["mimes"];
    foreach ($mimes as $mime => $cmd) {
        if (empty($cmd)) {
            $filegallib->delete_file_handler($mime);
        } else {
            $filegallib->change_file_handler($mime, $cmd);
        }
    }
    if (!empty($_REQUEST['newMime']) && !empty($_REQUEST['newCmd'])) {
        $filegallib->change_file_handler($_REQUEST['newMime'], $_REQUEST['newCmd']);
    }
    if (isset($_REQUEST["fgal_enable_auto_indexing"])) {
Example #13
0
<?php

// $Header$
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See below for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
$usersList = $gBitUser->getSelectionList();
$gBitSmarty->assign('usersList', count($usersList) < 50 ? $usersList : NULL);
if (!empty($_REQUEST['anonymous_settings'])) {
    simple_set_toggle("messages_site_contact", MESSAGES_PKG_NAME);
    simple_set_value("messages_contact_user", MESSAGES_PKG_NAME);
}
$gBitSystem->setHelpInfo('Features', 'Settings', 'Help with the features settings');
Example #14
0
    simple_set_value('interlist');
    simple_set_value('tiki_key');
    simple_set_value('feature_intertiki_mymaster');
    simple_set_toggle('feature_intertiki_sharedcookie');
    simple_set_toggle('feature_intertiki_import_preferences');
    simple_set_toggle('feature_intertiki_import_groups');
    simple_set_value('feature_intertiki_imported_groups');
}
if (isset($_REQUEST["intertikiserver"])) {
    check_ticket('admin-inc-intertiki');
    simple_set_toggle('feature_intertiki_sharedcookie');
    simple_set_toggle('feature_intertiki_server');
    simple_set_value('intertiki_logfile');
    simple_set_value('intertiki_errfile');
    if (isset($_REQUEST['newhost']) and is_array($_REQUEST['newhost']) and $_REQUEST['newhost']['key']) {
        $newhost["{$_REQUEST['newhost']['key']}"] = $_REQUEST['newhost'];
        $_REQUEST['known_hosts'] += $newhost;
    }
    if (!empty($_REQUEST['known_hosts'])) {
        foreach ($_REQUEST['known_hosts'] as $k => $v) {
            if (isset($_REQUEST['known_hosts'][$k]['allowusersregister'])) {
                $_REQUEST['known_hosts'][$k]['allowusersregister'] = 'y';
            }
            if (empty($_REQUEST['known_hosts'][$k]['name']) && empty($_REQUEST['known_hosts'][$k]['key']) && empty($_REQUEST['known_hosts'][$k]['ip']) && empty($_REQUEST['known_hosts'][$k]['contact'])) {
                unset($_REQUEST['known_hosts'][$k]);
            }
        }
    }
    simple_set_value('known_hosts');
}
ask_ticket('admin-inc-intertiki');
Example #15
0
<?php

/**
 * @version $Header$
 *
 * @author lsces
 * @package nlpg
 * @subpackage functions
 */
/**
 * required setup
 */
$formNlpgDisplayOptions = array("nlpg_maplink" => array('label' => 'Include links to map pages', 'note' => 'Expand coordinate displays to include links to map packages. The maps packagas available are defined separatly.', 'type' => 'toggle'), "nlpg_default_ordering" => array('label' => 'Initial ordering of results', 'note' => 'Used to supply the initial display ordering.', 'type' => 'input'));
$gBitSmarty->assign('formNlpgDisplayOptions', $formNlpgDisplayOptions);
$formNlpgFeatureOptions = array("nlpg_edit" => array('label' => 'On-line editing', 'note' => 'Enable on-line edit pages for NLPG information. Additional to edit permission controls to allow finer management.', 'type' => 'toggle'));
$gBitSmarty->assign('formNlpgFeatureOptions', $formNlpgFeatureOptions);
if (!empty($_REQUEST['nlpg_preferences'])) {
    $nlpg_opt = array_merge($formNlpgDisplayOptions, $formNlpgFeatureOptions);
    foreach ($nlpg_opt as $item => $data) {
        if ($data['type'] == 'numeric') {
            simple_set_int($item, NLPG_PKG_NAME);
        } elseif ($data['type'] == 'toggle') {
            simple_set_toggle($item, NLPG_PKG_NAME);
        } elseif ($data['type'] == 'input') {
            simple_set_value($item, NLPG_PKG_NAME);
        }
    }
}
<?php

// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_faqs.php,v 1.12 2007-03-06 19:29:45 sylvieg Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
    header("location: index.php");
    exit;
}
if (isset($_REQUEST["faqcomprefs"])) {
    check_ticket('admin-inc-faqs');
    simple_set_value('faq_comments_per_page');
    simple_set_toggle('feature_faq_comments');
    simple_set_value('faq_comments_default_ordering');
    simple_set_value('faq_prefix');
}
ask_ticket('admin-inc-faqs');
Example #17
0
    }
    $adminlib->restore_tag($_REQUEST['tagname']);
}
if (isset($_REQUEST['removetag'])) {
    check_ticket('admin-inc-wiki');
    // Check existance
    $adminlib->remove_tag($_REQUEST['tagname']);
}
if (isset($_REQUEST['rmvunusedpic'])) {
    check_ticket('admin-inc-wiki');
    $adminlib->remove_unused_pictures();
}
if (isset($_REQUEST['wikidiscussprefs'])) {
    check_ticket('admin-inc-wiki');
    simple_set_toggle('feature_wiki_discuss');
    simple_set_value('wiki_forum_id');
}
if (isset($_REQUEST['wikifeatures'])) {
    check_ticket('admin-inc-wiki');
    if (isset($_REQUEST['feature_backlinks']) && $_REQUEST['feature_backlinks'] == 'on' && $prefs['feature_backlinks'] == 'y' || empty($_REQUEST['feature_backlinks']) && $prefs['feature_backlinks'] == 'y') {
        $backlinksChange = true;
    }
    if (isset($backlinksChange) && $backlinksChange) {
        global $wikilib;
        include_once 'lib/wiki/wikilib.php';
        $wikilib->refresh_backlinks();
    }
}
if (isset($_REQUEST['wikiset3d'])) {
    check_ticket('admin-inc-wiki');
    if (isset($_REQUEST['wiki_3d_autoload']) && $_REQUEST['wiki_3d_autoload'] == 'on') {
Example #18
0
        $formRatable['guids']['stars_rate_' . $cType['content_type_guid']] = $gLibertySystem->getContentTypeName($cType['content_type_guid']);
    }
}
if (!empty($_REQUEST['stars_preferences'])) {
    $stars = array_merge($formStarsOptions, $formStarsWeight);
    foreach ($stars as $item => $data) {
        if ($data['type'] == 'numeric') {
            simple_set_int($item, STARS_PKG_NAME);
        } elseif ($data['type'] == 'toggle') {
            simple_set_toggle($item, STARS_PKG_NAME);
        } elseif ($data['type'] == 'input') {
            simple_set_value($item, STARS_PKG_NAME);
        }
        simple_set_int('stars_icon_width', STARS_PKG_NAME);
        simple_set_int('stars_icon_height', STARS_PKG_NAME);
        simple_set_value('stars_rating_names', STARS_PKG_NAME);
    }
    foreach (array_keys($formRatable['guids']) as $ratable) {
        $gBitSystem->storeConfig($ratable, !empty($_REQUEST['ratable_content']) && in_array($ratable, $_REQUEST['ratable_content']) ? 'y' : NULL, STARS_PKG_NAME);
    }
}
if (!empty($_REQUEST['recalculate'])) {
    $stars = new LibertyStars();
    if ($stars->reCalculateRating()) {
        $feedback['success'] = tra('All ratings have been brought up to speed.');
    } else {
        $feedback['error'] = tra('There was a problem updating all the ratings in your database.');
    }
}
// check the correct packages in the package selection
foreach ($gLibertySystem->mContentTypes as $cType) {
Example #19
0
<?php

require_once '../../../kernel/setup_inc.php';
include_once KERNEL_PKG_PATH . 'simple_form_functions_lib.php';
$gBitSystem->verifyPermission('p_admin');
$feedback = array();
$pdfSettings = array('pdf2swf_path' => array('label' => 'Path to pdf2swf', 'note' => 'Path to the pdf2swf executable.', 'type' => 'text'), 'swfcombine_path' => array('label' => 'Path to swfcombine', 'note' => 'Path to the swfcombine executable.', 'type' => 'text'), 'mwconvert_path' => array('label' => 'Path to ImageMagick convert', 'note' => 'Path to the ImageMagick convert executable.', 'type' => 'text'), 'pdf_thumbnails' => array('label' => 'PDF Upload Thumbnails', 'note' => 'Create thumbnails for PDF uploads.', 'type' => 'checkbox'));
if (function_exists('shell_exec')) {
    $pdfSettings['pdf2swf_path']['default'] = shell_exec('which pdf2swf');
    $pdfSettings['swfcombine_path']['default'] = shell_exec('which swfcombine');
    $pdfSettings['mwconvert_path']['default'] = shell_exec('which convert');
} else {
    $feedback['error'] = "You can not execute binaries on your server. You can not make use of this plugin.";
}
$gBitSmarty->assign('pdfSettings', $pdfSettings);
if (!empty($_REQUEST['plugin_settings'])) {
    foreach ($pdfSettings as $item => $data) {
        if ($data['type'] == 'checkbox') {
            simple_set_toggle($item, LIBERTY_PKG_NAME);
        } elseif ($data['type'] == 'numeric') {
            simple_set_int($item, LIBERTY_PKG_NAME);
        } else {
            simple_set_value($item, LIBERTY_PKG_NAME);
        }
    }
    $feedback['success'] = tra('The plugin was successfully updated');
}
$gBitSmarty->assign('feedback', $feedback);
$gBitSystem->display('bitpackage:liberty/mime/pdf/adminx.tpl', tra('PDF Plugin Settings'), array('display_mode' => 'admin'));
<?php

$formFckeditorFeatures = array("fckeditor_custom_config" => array('label' => 'Custom Config File', 'note' => 'If enabled, a custom configuration is included, either <kbd>' . CONFIG_PKG_DIR . '/themes/&lt;current-style&gt;/fckeditor/fckconfig.custom.js</kbd>, or <kbd>' . FCKEDITOR_PKG_DIR . '/fckconfig.custom.js</kbd>. It may be a modified copy of <kbd>jscripts/fckconfig.js</kbd> or of <kbd>fckconfig.bitweaver.js</kbd>. Depending on the modifications, a few of the settings below might not work anymore as expected (e.g., toolbar or skin settings).'), "fckeditor_debug" => array('label' => 'Enabled debugging', 'note' => 'Enable support for debug message output. On first debug message a window will pop up.'), "fckeditor_on_click" => array('label' => 'Load FCKEditor on Click', 'note' => 'Delay loading the FCKEditor until the user clicks on the text area.'), "fckeditor_ask" => array('label' => 'Ask to use FCKEditor', 'note' => 'If set the user will be prompted if they want to use FCKEditor for a given textbox. This option implies Load FCKEditor on Click even if it is not set.'));
// Toolbars
$gBitSmarty->assign('formFckeditorFeatures', $formFckeditorFeatures);
$formToolbars = array('fckedit_toolbars' => array('label' => 'Toolbar Set', 'note' => 'The toolbar set to use. "All" includes functionality not supported by Bitweaver. Use at your own risk!'));
$gBitSmarty->assign('formToolbars', $formToolbars);
$gBitSmarty->assign('formToolbarChoices', array('Basic', 'Beginner', 'Intermediate', 'Advanced', 'Supported', 'All'));
// Skin
$formSkin = array('fckedit_skin' => array('label' => 'Skin', 'note' => 'The skin to use.'));
$gBitSmarty->assign('formSkin', $formSkin);
$gBitSmarty->assign('formSkinChoices', array('default', 'silver', 'office2003'));
if (!empty($_REQUEST['change_prefs'])) {
    foreach ($formFckeditorFeatures as $item => $data) {
        simple_set_toggle($item, FCKEDITOR_PKG_NAME);
    }
    $fckeditorSets = array_merge($formToolbars, $formSkin);
    foreach ($fckeditorSets as $item => $data) {
        simple_set_value($item, FCKEDITOR_PKG_NAME);
    }
}
Example #21
0
<?php

$themeSettings = array('site_use_jscalendar' => array('label' => 'Enable JSCalendar', 'note' => 'If checked, a calendar popup allows for easily selecting a date using an appealing interface.'), 'themes_collapsible_modules' => array('label' => 'Collapsible modules', 'note' => 'This allows users to collapse modules by clicking on their titles. Can be useful if you use many modules.'), 'site_disable_fat' => array('label' => "Disable fading", 'note' => "If checked, success, warning or error messages display no fading effect anymore."), 'site_disable_jstabs' => array('label' => "Disable Javascript tabs", 'note' => "If checked, admin pages flow vertically, instead of displaying in a 'tabbed pages' interface."), 'site_fancy_zoom' => array('label' => "Enable Fancy Zoom for images", 'note' => "If checked, a Javascript zooms images when clicking on them. This will modify the behaviour when viewing most images. If you are running a commercial site, please read the license notice in /util/javascript/fancyzoom/js-global/FancyZoom.js."), 'site_mods_req_admn_grp' => array('label' => 'Modules require membership', 'note' => 'If enabled, modules with group/role restrictions require the administrator to be member of the group/role. If disabled, all modules are always visible to administrators.'), 'themes_joined_js_css' => array('label' => 'Joined CSS and JS', 'note' => 'If enabled, javascript and CSS files will be concatenated into single files to reduce server requests. This is useful for webdesigners and developers. Please enable this feature on live sites.'), 'themes_packed_js_css' => array('label' => 'Packed CSS and JS', 'note' => 'If enabled, javascript and CSS files will be reduced to their smallest possible size. This is useful for webdesigners and developers. Please enable this feature on live sites.'), 'themes_disable_pkg_css' => array('label' => 'Disable All Package CSS', 'note' => 'If checked, all css that is automatically included by packages will be disabled. If you want to include some of the package css it is recommended you copy that css to your theme css file.'));
$gBitSmarty->assign('themeSettings', $themeSettings);
if (!empty($_REQUEST['change_prefs'])) {
    $pref_simple_values = array("site_biticon_display_style", "site_icon_size", "themes_jquery_hosting", "default_icon_style");
    foreach ($pref_simple_values as $svitem) {
        simple_set_value($svitem, THEMES_PKG_NAME);
    }
    foreach (array_keys($themeSettings) as $toggle) {
        simple_set_toggle($toggle, THEMES_PKG_NAME);
    }
    // due to the packing / joining options, we will remove the cache and reload the page
    $gBitThemes->mThemeCache->expungeCache();
    bit_redirect(KERNEL_PKG_URL . "admin/index.php?page=themes");
}
// set the options biticon takes
$biticon_display_options = array('icon' => tra('Icon'), 'text' => tra('Text'), 'icon_text' => tra('Icon and Text'));
$gBitSmarty->assign("biticon_display_options", $biticon_display_options);
// get the icon styles
$subDirs = array('style_info');
$iconStyles = $gBitThemes->getStylesList(CONFIG_PKG_PATH . "styles/icons/", NULL, $subDirs);
foreach ($iconStyles as $key => $style) {
    $iconStyles[$key] = str_replace("_", " ", $style['style']);
}
$gBitSmarty->assign_by_ref("iconStyles", $iconStyles);
$biticon_sizes = array('small' => tra('Small'), 'large' => tra('Large'));
$gBitSmarty->assign("biticon_sizes", $biticon_sizes);
// These numbers are intentionally off by 1 due to the way IE fixes name their js
$jqueryOptions = array('jquery' => tra('Google Hosted'), 'jquerylocal' => tra('Local'));
$gBitSmarty->assign('jqueryOptions', $jqueryOptions);
Example #22
0
<?php

require_once '../../kernel/setup_inc.php';
require_once KERNEL_PKG_PATH . '/simple_form_functions_lib.php';
$gBitSystem->verifyPermission('p_admin');
$formEnable = array('dbreport_direct' => array('label' => 'Allow Direct DSN Entries', 'note' => 'Allow direct input of DSN connection data to allow remote report generation.', 'page' => 'DBReportDirect'), 'dbreport_manage' => array('label' => 'Allow Managed DB Entries', 'note' => 'Allow DSN information from the managed list of tables and querirs.', 'page' => 'DBReportManage'));
$gBitSmarty->assign('formEnable', $formEnable);
$formStyle = array('dbreport_group' => array('label' => 'Allow Group entries', 'note' => 'Allow generation of group footers.', 'page' => 'DBReportGroup'), 'dbreport_total' => array('label' => 'Allow Total Entries', 'note' => 'Allow generation of total footer.', 'page' => 'DBReportTotal'));
$gBitSmarty->assign('formStyle', $formStyle);
$feedback = array();
if (!empty($_REQUEST['change_prefs'])) {
    $featureToggles = array_merge($formEnable, $formStyle);
    foreach ($featureToggles as $item => $info) {
        if (empty($info['type']) || $info['type'] == 'checkbox') {
            simple_set_toggle($item, KERNEL_PKG_NAME);
        } elseif ($info['type'] == 'text') {
            simple_set_value($item, KERNEL_PKG_NAME);
        }
    }
}
$gBitSmarty->assign('feedback', $feedback);
$gBitSystem->display('bitpackage:tasks/data_dbreport_admin.tpl', tra('Data DBReport Plugin Settings'), array('display_mode' => 'admin'));
}
if (isset($_REQUEST["cleanup"])) {
    check_ticket('admin-inc-freetags');
    global $freetaglib;
    if (!is_object($freetaglib)) {
        include_once 'lib/freetag/freetaglib.php';
    }
    $freetaglib->cleanup_tags();
}
if (isset($_REQUEST["morelikethisoptions"])) {
    check_ticket('admin-inc-freetags');
    simple_set_value('morelikethis_algorithm');
    simple_set_value('morelikethis_basic_mincommon');
}
if (isset($_REQUEST["freetagsset3d"])) {
    check_ticket('admin-inc-freetags');
    $pref_toggles = array('freetags_feature_3d', 'freetags_feature_3d');
    foreach ($pref_toggles as $toggle) {
        simple_set_toggle($toggle);
    }
    $pref_values = array('freetags_3d_width', 'freetags_3d_height', 'freetags_3d_navigation_depth', 'freetags_3d_feed_animation_interval', 'freetags_3d_existing_page_color', 'freetags_3d_missing_page_color', 'freetags_3d_autoload', 'freetags_3d_camera_distance', 'freetags_3d_fov', 'freetags_3d_node_size', 'freetags_3d_text_size', 'freetags_3d_friction_constant', 'freetags_3d_elastic_constant', 'freetags_3d_eletrostatic_constant', 'freetags_3d_spring_size', 'freetags_3d_node_mass', 'freetags_3d_node_charge');
    foreach ($pref_values as $value) {
        simple_set_value($value);
    }
    if (isset($_REQUEST["freetags_3d_adjust_camera"]) && $_REQUEST["freetags_3d_adjust_camera"] == "on") {
        $tikilib->set_preference("freetags_3d_adjust_camera", 'true');
    } else {
        $tikilib->set_preference("freetags_3d_adjust_camera", 'false');
    }
}
ask_ticket('admin-inc-freetags');
Example #24
0
<?php

// $Header$
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See below for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
$formCmsSettings = array('articles_attachments' => array('label' => 'File Attachments', 'note' => 'Allow the attachment of files to an article. This feature is required if you want to have individual article images.'), 'articles_display_filter_bar' => array('label' => 'Articles Filter', 'note' => 'Allows admins to quickly filter articles based on status, topic and type.'), 'articles_submissions_rnd_img' => array('label' => 'Prevent Spam', 'note' => 'This will generate a random number as an image which the user has to confirm.'), 'articles_auto_approve' => array('label' => 'Auto Approve Articles', 'note' => 'Allow User ratings to Auto Approve Articles'));
$gBitSmarty->assign('formCmsSettings', $formCmsSettings);
$articleDateThreshold = array('' => tra('never'), 'always' => tra('always'), 'year' => tra('up to a year'), 'month' => tra('up to a month'), 'week' => tra('up to a week'), 'day' => tra('up to a day'), 'hour' => tra('up to an hour'));
$gBitSmarty->assign('articleDateThreshold', $articleDateThreshold);
$formArticleListing = array("articles_list_title" => array('label' => 'Title', 'note' => 'List the title of the article.'), "articles_list_type" => array('label' => 'Type', 'note' => 'Display what type of article it is.'), "articles_list_topic" => array('label' => 'Topic', 'note' => 'Display the article topic.'), "articles_list_date" => array('label' => 'Creation Date', 'note' => 'Display when the article was submitted first.'), "articles_list_expire" => array('label' => 'Expiration Date', 'note' => 'Display when the article will expire.'), "articles_list_author" => array('label' => 'Author', 'note' => 'Display the name of the author of an article.'), "articles_list_reads" => array('label' => 'Hits', 'note' => 'Display the number of times a given article has been accessed.'), "articles_list_size" => array('label' => 'Size', 'note' => 'Display the size of any given article.'), "articles_list_img" => array('label' => 'Image', 'note' => 'Display the image that is associated with a given article.'), "articles_list_status" => array('label' => 'Status', 'note' => 'This will indicate whether a given article has been submitted or has been approved.'));
$gBitSmarty->assign('formArticleListing', $formArticleListing);
$gBitSmarty->assign('imageSizes', get_image_size_options(FALSE));
if (!empty($_REQUEST['store_settings'])) {
    $featureToggles = array_merge($formArticleListing, $formCmsSettings);
    foreach ($featureToggles as $item => $data) {
        simple_set_toggle($item, ARTICLES_PKG_NAME);
    }
    simple_set_int("articles_max_list", ARTICLES_PKG_NAME);
    simple_set_int("articles_description_length", ARTICLES_PKG_NAME);
    simple_set_value("articles_image_size", ARTICLES_PKG_NAME);
}
<?php

// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
    header("location: index.php");
    exit;
}
if (isset($_REQUEST["categorysetup"])) {
    ask_ticket('admin-inc-category');
    $pref_toggles = array("feature_categoryobjects", "feature_categorypath", "feature_search_show_forbidden_cat", "feature_category_reinforce", "feature_category_use_phplayers");
    foreach ($pref_toggles as $toggle) {
        simple_set_toggle($toggle);
    }
    $pref_simple_values = array("categorypath_excluded");
    foreach ($pref_simple_values as $svitem) {
        simple_set_value($svitem);
    }
}
<?php

// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_gmap.php,v 1.6 2007-10-12 07:55:24 nyloth Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
    header("location: index.php");
    exit;
}
if (isset($_REQUEST["gmapsetup"])) {
    check_ticket('admin-inc-gmap');
    simple_set_value("gmap_key");
    simple_set_value("gmap_defaultx");
    simple_set_value("gmap_defaulty");
    simple_set_value("gmap_defaultz");
}
if (isset($prefs['gmap_key']) and strlen($prefs['gmap_key']) == '86') {
    $smarty->assign('show_map', 'y');
} else {
    $smarty->assign('show_map', 'n');
}
ask_ticket('admin-inc-gmap');
Example #27
0
    simple_set_value('fgal_list_id_admin');
    simple_set_value('fgal_list_type_admin');
    simple_set_value('fgal_list_name_admin');
    simple_set_value('fgal_list_description_admin');
    simple_set_value('fgal_list_size_admin');
    simple_set_value('fgal_list_created_admin');
    simple_set_value('fgal_list_lastModif_admin');
    simple_set_value('fgal_list_creator_admin');
    simple_set_value('fgal_list_author_admin');
    simple_set_value('fgal_list_last_user_admin');
    simple_set_value('fgal_list_comment_admin');
    simple_set_value('fgal_list_files_admin');
    simple_set_value('fgal_list_hits_admin');
    simple_set_value('fgal_list_lastDownload_admin');
    simple_set_value('fgal_list_lockedby_admin');
    simple_set_value('fgal_list_backlinks_admin');
}
$usedSize = $filegallib->getUsedSize();
$smarty->assign_by_ref('usedSize', $usedSize);
if (isset($_REQUEST["filegalhandlers"])) {
    check_ticket('admin-inc-fgal');
    if (!empty($_REQUEST['mimes'])) {
        $mimes = $_REQUEST['mimes'];
        foreach ($mimes as $mime => $cmd) {
            $mime = trim($mime);
            if (empty($cmd)) {
                $filegallib->delete_file_handler($mime);
            } else {
                $filegallib->change_file_handler($mime, $cmd);
            }
        }
<?php

// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_directory.php,v 1.13 2007-03-06 19:29:45 sylvieg Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
    header("location: index.php");
    exit;
}
if (isset($_REQUEST["directory"])) {
    check_ticket('admin-inc-directory');
    simple_set_toggle('directory_validate_urls');
    simple_set_toggle('directory_cool_sites');
    simple_set_toggle('directory_country_flag');
    simple_set_value('directory_columns');
    simple_set_value('directory_links_per_page');
    simple_set_value('directory_open_links');
}
ask_ticket('admin-inc-directory');
Example #29
0
//
// (c) 2006 bitweaver.org - GNU LGPL
//
require_once '../../kernel/setup_inc.php';
require_once KERNEL_PKG_PATH . "simple_form_functions_lib.php";
//$gBitSmarty->assign( 'loadDragDrop', TRUE );
//$gBitSystem->setOnloadScript('initDragDrop();');
$gBitSystem->verifyPermission('p_admin');
$formMenuSettings = array('site_top_bar_dropdown' => array('label' => 'Dropdown menu', 'note' => 'Use the CSS driven dropdown menus in the top bar. Compatibility and further reading can be found at <a class="external" href="http://www.htmldog.com/articles/suckerfish/dropdowns/">Suckerfish Dropdowns</a>.'), 'site_hide_my_top_bar_link' => array('label' => 'Hide "My" Link', 'note' => 'Hide the <strong>My &lt;sitename&gt;</strong> link from users that are not logged in.'));
$gBitSmarty->assign('formMenuSettings', $formMenuSettings);
$formMenuJsSettings = array('site_top_bar_js' => array('label' => 'Enhance Dropdown with Javascript', 'note' => 'This small javascript will delay the menu slightly making it easier to navigate. Also you can apply below effects. Please see <a class="external" href="http://www.twinhelix.com">TwinHelix</a> for details.'), 'site_top_bar_js_fade' => array('label' => 'Fade Effect', 'note' => 'Fade in menu dropdown elements.'), 'site_top_bar_js_swipe' => array('label' => 'Swipe Effect', 'note' => 'Sweep the menu from the top down.'), 'site_top_bar_js_clip' => array('label' => 'Clip Effect', 'note' => 'Similar to the swipe effect.'));
if (!empty($_REQUEST['menu_settings'])) {
    foreach (array_keys($formMenuSettings) as $item) {
        simple_set_toggle($item, THEMES_PKG_NAME);
    }
    simple_set_value('site_menu_title', THEMES_PKG_NAME);
}
if (!empty($_REQUEST['menu_js_settings'])) {
    foreach (array_keys($formMenuJsSettings) as $item) {
        simple_set_toggle($item, THEMES_PKG_NAME);
    }
}
if (!empty($_REQUEST['update_menus'])) {
    foreach (array_keys($gBitSystem->mAppMenu['bar']) as $menuPackage) {
        if (empty($_REQUEST["menu_{$menuPackage}"])) {
            // the package menu is off - store it off
            $gBitSystem->storeConfig("menu_{$menuPackage}", 'n', THEMES_PKG_NAME);
        } elseif ($gBitSystem->getConfig("menu_{$menuPackage}") == 'n') {
            // the package menu was off and now is on. Just delete the pref since on is the assumed state
            $gBitSystem->storeConfig("menu_{$menuPackage}", NULL, THEMES_PKG_NAME);
        }
    exit;
}
if (isset($_REQUEST["searchprefs"])) {
    check_ticket('admin-inc-search');
    simple_set_toggle("feature_search_fulltext");
    simple_set_toggle("feature_search_stats");
    simple_set_toggle("feature_referer_highlight");
    simple_set_toggle("feature_search_show_forbidden_obj");
    simple_set_toggle("feature_search_show_forbidden_cat");
    simple_set_int("search_refresh_rate");
    simple_set_int("search_min_wordlength");
    simple_set_int("search_max_syllwords");
    simple_set_int("search_syll_age");
    simple_set_int("search_lru_purge_rate");
    simple_set_int("search_lru_length");
    simple_set_value("search_refresh_index_mode");
    simple_set_toggle("search_parsed_snippet");
}
global $tiki_p_admin;
if ($tiki_p_admin == 'y' && !empty($_REQUEST['refresh_files_index_now']) && $_REQUEST['refresh_files_index_now'] == 'y') {
    require_once 'lib/search/refresh-functions.php';
    refresh_index('files');
    $smarty->assign('refresh_files_index_now', $_REQUEST['refresh_files_index_now']);
}
if ($tiki_p_admin == 'y' && !empty($_REQUEST['refresh_index_now']) && $_REQUEST['refresh_index_now'] == 'y') {
    require_once 'lib/search/refresh-functions.php';
    refresh_index('pages');
    $smarty->assign('refresh_index_now', $_REQUEST['refresh_index_now']);
}
if ($tiki_p_admin == 'y' && !empty($_REQUEST['refresh_tracker_index_now']) && $_REQUEST['refresh_tracker_index_now'] == 'y') {
    require_once 'lib/search/refresh-functions.php';