本文整理汇总了PHP中simple_set_value函数的典型用法代码示例。如果您正苦于以下问题:PHP simple_set_value函数的具体用法?PHP simple_set_value怎么用?PHP simple_set_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了simple_set_value函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: simple_set_configs
/**
* 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);
}
}
}
示例2: simple_set_toggle
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');
?>
示例3: tra
$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'];
}
示例4: array
<?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'));
示例5: header
<?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');
}
示例6: header
<?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');
示例7: basename
<?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";
示例8: check_ticket
}
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", "");
示例9: array
$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);
}
}
示例10: Chatterbox
<?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);
}
示例11: header
<?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');
示例12: simple_set_value
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"])) {
示例13: count
<?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');
示例14: simple_set_value
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');
示例15: array
<?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);
}
}
}