当前位置: 首页>>代码示例>>PHP>>正文


PHP saveConfig函数代码示例

本文整理汇总了PHP中saveConfig函数的典型用法代码示例。如果您正苦于以下问题:PHP saveConfig函数的具体用法?PHP saveConfig怎么用?PHP saveConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了saveConfig函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     $this->coderoot = dirname(__FILE__) . '/' . __CLASS__ . '/';
     parent::__construct();
     if (!Sql_Table_exists($GLOBALS['table_prefix'] . 'restapi_request_log')) {
         saveConfig(md5('plugin-restapi-initialised'), false, 0);
         $this->initialise();
     }
 }
开发者ID:grzchr15,项目名称:phplist-plugin-restapi,代码行数:9,代码来源:restapi.php

示例2: processRequest

function processRequest()
{
    @header('Content-type: application/json');
    $action = getRequestParameter("action");
    $token = getRequestParameter("token");
    if ($action == 'getAllDemos') {
        $maxItems = getRequestParameter("maxItems");
        $userEmail = getRequestParameter("userEmail");
        logUsage($action, "", $maxItems, $userEmail);
        echo json_encode(getAllConfigsFromDatabase($userEmail, $maxItems));
    } else {
        if ($action == 'getStandardDemos') {
            logUsage($action, "", "", "");
            echo json_encode(getDefaultConfigsFromDatabase());
        } else {
            if ($action == 'saveConfig') {
                $config = getRequestParameter("config");
                $savedConfig = saveConfig(json_decode($config));
                logUsage($action, "", $savedConfig->token, $config);
                echo json_encode($savedConfig);
            } else {
                if ($action == 'copyConfig') {
                    // copy token config to a new token
                    // copy website...
                    $newToken = copyConfig($token);
                    logUsage($action, "", $newToken, "");
                    echo json_encode($newToken);
                } else {
                    if ($action == 'getConfig') {
                        logUsage($action, "", $token, "");
                        echo json_encode(getConfig($token));
                    } else {
                        // display how to use service.
                        $endpointVariables = array("Name" => "token", "Type" => "String", "Mandatory" => false);
                        $serviceEndpoints = array(array("Name" => "Reset Demo", "Description" => "....", "Endpoint" => "/api?action=resetDemo&token=...", "Variables" => $endpointVariables), array("Name" => "Get Configuration", "Description" => "....", "Endpoint" => "/api?action=getConfig[&token=...]"), array("Name" => "Save Configuration", "Description" => "....", "Endpoint" => "/api?action=saveConfig&config=..."), array("Name" => "Get Offers", "Description" => "....", "Endpoint" => "/api?action=getOffers&customer=...&maxOffer=...&token=..."), array("Name" => "Respond to Offer", "Description" => "....", "Endpoint" => "/api?action=respondToOffer&offer=...&customer=...&token=..."), array("Name" => "Get History", "Description" => "....", "Endpoint" => "/api?action=getHistory&customer=...&token=..."));
                        $serviceEndpointDesc = array("Service Endpoints" => $serviceEndpoints);
                        echo json_encode($serviceEndpointDesc);
                    }
                }
            }
        }
    }
    // log usage
    return;
}
开发者ID:khanab85,项目名称:Telco-Simulator,代码行数:45,代码来源:index.php

示例3: removeComments

        break;
    case "remove":
        removeComments($cid, $option);
        break;
    case "publish":
        publishComments($cid, 1, $option);
        break;
    case "unpublish":
        publishComments($cid, 0, $option);
        break;
    case "settings":
        showConfig($option);
        break;
    case "savesettings":
        $allow_comments_in_sections = implode(',', $_POST['mcselections']);
        saveConfig($option, $auto_publish_comments, $allow_anonymous_entries, $notify_new_entries, $allow_comments_in_sections, $comments_per_page, $admin_comments_length);
        break;
    default:
        showComments($option);
        break;
}
/**
 * @param option
 * @return list of comments
 */
function showComments($option)
{
    global $database, $mainframe;
    $limit = $mainframe->getUserStateFromRequest("viewlistlimit", 'limit', 10);
    $limitstart = $mainframe->getUserStateFromRequest("view{$option}limitstart", 'limitstart', 0);
    $search = $mainframe->getUserStateFromRequest("search{$option}", 'search', '');
开发者ID:jwest00724,项目名称:mambo,代码行数:31,代码来源:admin.comment.php

示例4: displayStatus

        } else {
            echo "No password defined. ";
            $ok = false;
        }
    }
    // default values for the other parameters saved in config.php
    $config["zfurl"] = $_POST['zfurl'];
    $config["subtag"] = ZF_HOMETAG;
    $config["refreshmode"] = ZF_REFRESHMODE;
    $config["template"] = ZF_TEMPLATE;
    $config["displayerror"] = ZF_DISPLAYERROR;
    $config["encoding"] = ZF_ENCODING;
    $config["locale"] = ZF_LOCALE;
    $config["pubdateformat"] = ZF_PUBDATEFORMAT;
    $config["dateformat"] = ZF_DATEFORMAT;
    if ($ok && saveConfig($config)) {
        displayStatus('Basic configuration saved.');
        echo '<br/>Please go to the <a href="index.php?zfaction=config">configuration page</a> to complete the installation<br/><br/>';
        echo 'For security reasons, make sure to delete the file <code>install.php</code><br/><br/>';
        echo 'Have a look at the <a href="embed-demo.php">Embed demo page</a> to embed feeds on your site.';
    } else {
        echo "Cannot continue the installation";
        displayStatus('Configuration NOT saved.');
    }
    echo '</div>';
}
//phpinfo();
?>
</body>
</html>
开发者ID:mm999,项目名称:zebrafeeds,代码行数:30,代码来源:install.php

示例5: listCategories

$subselect .= '(category is null or category = "")';
$categories = listCategories();
if (!sizeof($categories)) {
    ## try to fetch them from existing lists
    $req = Sql_Query(sprintf('select distinct category from %s where category != "" ', $tables['list']));
    while ($row = Sql_Fetch_Row($req)) {
        array_push($categories, $row[0]);
    }
    if (!sizeof($categories)) {
        print '<p>' . s('No list categories have been defined') . '</p>';
        print '<p>' . s('Once you have set up a few categories, come back to this page to classify your lists with your categories.') . '</p>';
        print '<p>' . PageLinkButton('configure&id=list_categories', $I18N->get('Configure Categories')) . '</p>';
        print '<br/>';
        return;
    } else {
        saveConfig('list_categories', join(',', $categories));
    }
}
if (!empty($_POST['category']) && is_array($_POST['category'])) {
    foreach ($_POST['category'] as $key => $val) {
        Sql_Query(sprintf('update %s set category = "%s" %s and id = %d ', $tables['list'], sql_escape($val), $subselect, $key));
    }
    print Info($I18N->get('Categories saved'));
}
$req = Sql_Query(sprintf('select * from %s %s', $tables['list'], $subselect));
if (!Sql_Affected_Rows()) {
    print Info(s('All lists have already been assigned a category'), true);
} else {
    print '<div class="fright">' . PageLinkButton('configure&id=list_categories', $I18N->get('Configure Categories')) . '</div>';
}
$ls = new WebblerListing(s('Categorise lists'));
开发者ID:dehvCurtis,项目名称:phplist,代码行数:31,代码来源:catlists.php

示例6: saveConfig

<!-- Start #main -->
<div id="main">			
	<div class="content">	
		<div class="content-header">
			<h4><a href="?p=admin">Main Menu</a> / Site Config</h4>
		</div> <!-- .content-header -->				
		<div class="main-content">					
		<?php 
if (isset($_POST['task'])) {
    if ($_POST['task'] == 'saveconfig') {
        saveConfig();
    }
}
?>
			<div class="mini-nav" style="width: 98%;">
				<table>
					<thead>
						<th  style="background: #FFD;"><center>Sub - Navigation</center></th>
					</thead>
				</table>
				<p>
					<center>
						| <a href="#basic">Basic Settings</a> |
						<a href="#config">Site Configuration</a> |
						<a href="#lang">Language Settings</a> |
						<a href="#acct">Account & Register Settings</a> |
						<a href="#fp">Frontpage Settings</a> |
						<br />
						| <a href="#email">Email Settings</a> |
						<a href="#paypal">Paypal Settings</a> |
						<a href="#module">In-Built Module Settings</a> |
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:31,代码来源:admin.siteconfig.php

示例7: templates

	$tpl=new templates();
	$ERROR_NO_PRIVS=$tpl->javascript_parse_text("{ERROR_NO_PRIVS}");
	echo "alert('$ERROR_NO_PRIVS');";
	die();
	
}

	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["index"])){index();exit;}
	if(isset($_GET["settings"])){parameters();exit;}
	if(isset($_GET["dnsbl"])){dnsbl();exit;}
	if(isset($_GET["dnsbl-list"])){dnsbl_list();exit;}
	if(isset($_GET["dnsbl-add"])){dnsbl_add();exit;}
	if(isset($_GET["dnsbl-delete"])){dnsbl_delete();exit;}
	if(isset($_GET["postscreen_dnsbl_action"])){saveConfig();exit;}
	if(isset($_GET["postscreen_bare_newline_enable"])){saveConfig();exit;}
	
	
	
	if(isset($_GET["EnablePostScreen"])){EnablePostScreen_edit();exit;}

js();



function js(){
	$page=CurrentPageName();
	$title="PostScreen::{$_GET["hostname"]}/{$_GET["ou"]}";
	echo "YahooWin3(660,'$page?popup=yes&hostname={$_GET["hostname"]}&ou={$_GET["ou"]}','$title');";
	}
	
开发者ID:rsd,项目名称:artica-1.5,代码行数:30,代码来源:postscreen.php

示例8: pdoQuery

 }
 if (isset($_POST['getOrderDetail'])) {
     $query = pdoQuery('user_order_view', null, array('o_id' => $_POST['o_id']), '');
     foreach ($query as $row) {
         $detail[] = $row;
     }
     echo json_encode($detail);
 }
 if (isset($_POST['changeCateHome'])) {
     $configPath = $GLOBALS['mypath'] . '/mobile/config/config.json';
     pdoUpdate('category_tbl', array('remark' => $_POST['stu']), array('id' => $_POST['id']));
     $query = pdoQuery('category_tbl', array('count(*) as num'), array('remark' => 'home'), null);
     $num = $query->fetch();
     $config = getConfig($configPath);
     $config['cateWidth'] = 100 / $num['num'] < 20 ? 20 : 100 / $num['num'];
     saveConfig($configPath, $config);
     echo 'ok';
     exit;
 }
 if (isset($_POST['add_sc_parm'])) {
     for ($i = 25; $i > 0; $i--) {
         $colList[] = 'col' . $i;
     }
     $colQuery = pdoQuery('par_col_tbl', array('col_name'), array('sc_id' => $_POST['sc_id']), null);
     $colExist = array();
     foreach ($colQuery as $row) {
         $colExist[] = $row['col_name'];
     }
     $namePool = array_diff($colList, $colExist);
     $col_name = array_pop($namePool);
     //        mylog($col_name);
开发者ID:ldong728,项目名称:ashtonmall,代码行数:31,代码来源:ajax_request.php

示例9: listCategories

}
$categories = listCategories();
if (!count($categories)) {
    ## try to fetch them from existing lists
    $req = Sql_Query(sprintf('select distinct category from %s where category != "" ', $tables['list']));
    while ($row = Sql_Fetch_Row($req)) {
        array_push($categories, $row[0]);
    }
    if (!count($categories)) {
        print '<p>' . s('No list categories have been defined') . '</p>';
        print '<p>' . s('Once you have set up a few categories, come back to this page to classify your lists with your categories.') . '</p>';
        print '<p>' . PageLinkButton('configure&id=list_categories&ret=catlists', $I18N->get('Configure Categories')) . '</p>';
        print '<br/>';
        return;
    } else {
        saveConfig('list_categories', implode(',', $categories));
    }
}
if (!empty($_POST['category']) && is_array($_POST['category'])) {
    foreach ($_POST['category'] as $key => $val) {
        Sql_Query(sprintf('update %s set category = "%s" %s and id = %d ', $tables['list'], sql_escape($val), $subselect, $key));
    }
    if (isset($_GET['show']) && $_GET['show'] == 'all') {
        $_SESSION['action_result'] = s('Category assignments saved');
        Redirect('list');
    } else {
        Info(s('Categories saved'), true);
    }
}
$req = Sql_Query(sprintf('select * from %s %s', $tables['list'], $subselect));
if (!Sql_Affected_Rows()) {
开发者ID:MarcelvC,项目名称:phplist3,代码行数:31,代码来源:catlists.php

示例10: updateDBtranslations

 function updateDBtranslations($translations, $time, $language = '')
 {
     if (empty($language)) {
         $language = $this->language;
     }
     if (sizeof($translations)) {
         foreach ($translations as $orig => $trans) {
             Sql_Replace($GLOBALS['tables']['i18n'], array('lan' => $language, 'original' => $orig, 'translation' => $trans), '');
         }
     }
     $this->resetCache();
     saveConfig('lastlanguageupdate-' . $language, $time, 0);
 }
开发者ID:bcantwell,项目名称:website,代码行数:13,代码来源:languages.php

示例11: setForumVariable

     setForumVariable($cid, 'published', 0);
     break;
 case "remove":
     deleteForum($cid, $option);
     break;
 case "orderup":
     orderForumUpDown($cid0, -1, $option);
     break;
 case "orderdown":
     orderForumUpDown($cid0, 1, $option);
     break;
 case "showconfig":
     showConfig($option);
     break;
 case "saveconfig":
     saveConfig($option);
     break;
 case "defaultconfig":
     defaultConfig($option);
     break;
 case "revertconfig":
     revertConfig($option);
     break;
 case "newmoderator":
     newModerator($option, $id);
     break;
 case "addmoderator":
     addModerator($option, $id, $cid, 1);
     break;
 case "removemoderator":
     addModerator($option, $id, $cid, 0);
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:admin.kunena.php

示例12: Sql_Fetch_Row_Query

<?php

## add default system template
## this should be part of the "UI theme"
print '<h2>Default system template</h2>';
$template = '<div style="margin:0; text-align:center; width:100%; background:#EEE;min-width:240px;height:100%;"><br />
    <div style="width:96%;margin:0 auto; border-top:6px solid #369;border-bottom: 6px solid #369;background:#DEF;" >
        <h3 style="margin-top:5px;background-color:#69C; font-weight:normal; color:#FFF; text-align:center; margin-bottom:5px; padding:10px; line-height:1.2; font-size:21px; text-transform:capitalize;">[SUBJECT]</h3>
        <div style="text-align:justify;background:#FFF;padding:20px; border-top:2px solid #369;min-height:200px;font-size:13px; border-bottom:2px solid #369;">[CONTENT]<div style="clear:both"></div></div>
        <div style="clear:both;background:#69C;font-weight:normal; padding:10px;color:#FFF;text-align:center;font-size:11px;margin:5px 0px">[FOOTER]<br/>[SIGNATURE]</div>
    </div>
<br /></div>';
$exists = Sql_Fetch_Row_Query(sprintf('select * from %s where title = "System Template"', $GLOBALS['tables']['template']));
if ($exists[0]) {
    print '<p>' . $GLOBALS['I18N']->get('The default system template already exists') . '</p>';
    print '<p>' . PageLinkButton('templates', $GLOBALS['I18N']->get('Go back to templates')) . '</p>';
} else {
    Sql_Query(sprintf('insert into %s (title,template,listorder) values("System Template","%s",0)', $GLOBALS['tables']['template'], addslashes($template)));
    $newid = Sql_Insert_Id();
    saveConfig('systemmessagetemplate', $newid);
    print '<p>' . $GLOBALS['I18N']->get('The default system template has been added as template with ID') . ' ' . $newid . ' </p>';
    print '<p>' . PageLinkButton('templates', $GLOBALS['I18N']->get('Go back to templates')) . '</p>';
    print '<p>' . PageLinkButton('template&amp;id=' . $newid, $GLOBALS['I18N']->get('Edit template')) . '</p>';
}
开发者ID:dehvCurtis,项目名称:phplist,代码行数:24,代码来源:defaultsystemtemplate.php

示例13: array

EndHTML;
//print "<pre>";      # DEBUG
//print_r($_SERVER);  # DEBUG
//print_r($_REQUEST); # DEBUG
//print "</pre>";     # DEBUG
#exit();
#Begin Perquisite Array 	(Needed files/directories with write access)
$dir_array = array('', 'tmp', 'tmp/simplepie_cache', 'lib/', 'tmp/smarty/templates_c', 'tmp/smarty/cache', 'tmp/openidserver', 'lib/simplepie', 'lib/feedpressreview', 'config.php');
#end perquisite array
#Begin Global Options Array
$optionsInfo = array('CONF_USE_CRON_FOR_DB_CLEANUP' => array('title' => 'Use cron for DB cleanup', 'depend' => 'return 1;', 'message' => '&nbsp;'), 'GMAPS_HOTSPOTS_MAP_ENABLED' => array('title' => 'Google Maps Support', 'depend' => 'return 1;', 'message' => '&nbsp;'), 'LOG_CONTENT_DISPLAY' => array('title' => 'Log what content is displayed to users', 'depend' => 'return 1;', 'message' => '&nbsp;'));
$CONFIG_FILE = 'config.php';
$LOCAL_CONFIG_FILE = 'local.config.php';
if (!empty($config)) {
    # If not empty, save javascript 'config' variable to config.php file
    saveConfig($config);
}
### Read Configuration file. Keys and Values => define('FOO', 'BRAK');
# Use config.php if local.config.php does not exist
//if(!file_exists(WIFIDOG_ABS_FILE_PATH."$LOCAL_CONFIG_FILE"))
$contentArray = file(WIFIDOG_ABS_FILE_PATH . "{$CONFIG_FILE}");
//else
//  $contentArray = file(WIFIDOG_ABS_FILE_PATH."$LOCAL_CONFIG_FILE");
$configArray = array();
foreach ($contentArray as $line) {
    #print "$line<BR>"; # Debug
    if (preg_match("/^define\\((.+)\\);/", $line, $matchesArray)) {
        //echo '<pre>';print_r($matchesArray);echo '</pre>';
        list($key, $value) = explode(',', $matchesArray[1]);
        $pattern = array("/^'/", "/'\$/");
        $replacement = array('', '');
开发者ID:alpha2z,项目名称:wifidog-auth,代码行数:31,代码来源:install.php

示例14: createNewsletter

     break;
 case 'createConfig':
     $new_id = createNewsletter($cnx, $row_config_globale['table_listsconfig'], $_POST['newsletter_name'], $_POST['from'], $_POST['from_name'], $_POST['subject'], $_POST['header'], $_POST['footer'], $_POST['subscription_subject'], $_POST['subscription_body'], $_POST['welcome_subject'], $_POST['welcome_body'], $_POST['quit_subject'], $_POST['quit_body'], $_POST['preview_addr']);
     if ($new_id > 0) {
         $list_id = $new_id;
         $l = 'l';
     }
     break;
 case 'saveGlobalconfig':
     $smtp_host = isset($_POST['smtp_host']) ? $_POST['smtp_host'] : '';
     $smtp_auth = isset($_POST['smtp_auth']) ? $_POST['smtp_auth'] : 0;
     $smtp_login = isset($_POST['smtp_login']) ? $_POST['smtp_login'] : '';
     $smtp_pass = isset($_POST['smtp_pass']) ? $_POST['smtp_pass'] : '';
     $mod_sub = isset($_POST['mod_sub']) ? $_POST['mod_sub'] : 0;
     $timezone = isset($_POST['timezone']) ? $_POST['timezone'] : '';
     if (saveConfig($cnx, $_POST['table_config'], $_POST['admin_pass'], 50, $_POST['base_url'], $_POST['path'], $_POST['language'], $_POST['table_email'], $_POST['table_temp'], $_POST['table_listsconfig'], $_POST['table_archives'], $_POST['sending_method'], $smtp_host, $smtp_auth, $smtp_login, $smtp_pass, $_POST['sending_limit'], $_POST['validation_period'], $_POST['sub_validation'], $_POST['unsub_validation'], $_POST['admin_email'], $_POST['admin_name'], $_POST['mod_sub'], $_POST['table_sub'], $_POST['charset'], $_POST['table_track'], $_POST['table_send'], $_POST['table_sauvegarde'], $_POST['table_upload'])) {
         $configSaved = true;
         $row_config_globale = $cnx->SqlRow("SELECT * FROM {$table_global_config}");
     } else {
         $configSaved = false;
     }
     if ($_POST['file'] == 1) {
         $configFile = saveConfigFile($PMNL_VERSION, $_POST['db_host'], $_POST['db_login'], $_POST['db_pass'], $_POST['db_name'], $_POST['table_config'], $_POST['db_type'], $_POST['type_serveur'], $_POST['type_env'], $timezone);
         $forceUpdate = 1;
         include "include/config.php";
         unset($forceUpdate);
     }
     saveBounceFile($_POST['bounce_host'], $_POST['bounce_user'], $_POST['bounce_pass'], $_POST['bounce_port'], $_POST['bounce_service'], $_POST['bounce_option']);
     break;
 case 'subscriber_add':
     $add_addr = empty($_POST['add_addr']) ? "" : $_POST['add_addr'];
开发者ID:Arnaud69,项目名称:phpmynewsletter-2.0,代码行数:31,代码来源:index.php

示例15: displayStatus

// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
if (!defined('ZF_VER')) {
    exit;
}
if (!is_writable(ZF_CONFIGFILE)) {
    displayStatus('config.php is not writable (you cannot save changes)!');
}
if (isset($_POST['dosave']) && $_POST['dosave'] == 'Save') {
    if ($_POST['newpassword'] == $_POST['confirmpassword'] && $_POST['newpassword'] != '') {
        $_POST['adminpassword'] = crypt($_POST['newpassword']);
    } else {
        $_POST['adminpassword'] = ZF_ADMINPASS;
    }
    $_POST['zfurl'] = ZF_URL;
    if (saveConfig($_POST)) {
        displayStatus('Configuration saved.');
    } else {
        displayStatus('Configuration NOT saved.');
    }
} else {
    ?>

<div id="core">
	<form name="configform" action="<?php 
    echo $_SERVER['PHP_SELF'] . '?zfaction=config';
    ?>
" method="post">
		<div class="frame">
		<h2>General configuration</h2>
开发者ID:mm999,项目名称:zebrafeeds,代码行数:30,代码来源:changeconfig.php


注:本文中的saveConfig函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。