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


PHP save_config函数代码示例

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


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

示例1: overwrite_value_config

function overwrite_value_config($config, $key, $new_value)
{
    global $base_dir;
    unset($config[$key]);
    $config[$key] = $new_value;
    save_config($config, $base_dir);
}
开发者ID:Timfreaky,项目名称:ThinkTax,代码行数:7,代码来源:functions.php

示例2: WebRoot

 private static function WebRoot()
 {
     global $INI;
     if (defined('WEB_ROOT')) {
         return $INI;
     }
     /* validator */
     $script_name = $_SERVER['SCRIPT_NAME'];
     if (preg_match('#^(.*)/app.php$#', $script_name, $m)) {
         $INI['webroot'] = $m[1];
         save_config('php');
     }
     if (isset($INI['webroot'])) {
         define('WEB_ROOT', $INI['webroot']);
     } else {
         $document_root = $_SERVER['DOCUMENT_ROOT'];
         $docroot = rtrim(str_replace('\\', '/', $document_root), '/');
         if (!$docroot) {
             $script_filename = $_SERVER['SCRIPT_FILENAME'];
             $script_filename = str_replace('\\', '/', $script_filename);
             $script_name = $_SERVER['SCRIPT_NAME'];
             $script_name = str_replace('\\', '/', $script_name);
             $lengthf = strlen($script_filename);
             $lengthn = strlen($script_name);
             $length = $lengthf - $lengthn;
             $docroot = rtrim(substr($script_filename, 0, $length), '/');
         }
         $webroot = trim(substr(WWW_ROOT, strlen($docroot)), '\\/');
         define('WEB_ROOT', $webroot ? "/{$webroot}" : '');
     }
     return $INI;
 }
开发者ID:norain2050,项目名称:zuituware,代码行数:32,代码来源:ZSystem.class.php

示例3: migrate_config

function migrate_config()
{
    $curr_dir = dirname(__FILE__);
    if (!is_readable($curr_dir . '/admin/incConfig.php') || !detect_config(false)) {
        return false;
        // nothing to migrate
    }
    @(include $curr_dir . '/admin/incConfig.php');
    @(include $curr_dir . '/config.php');
    $config_array = array('dbServer' => $dbServer, 'dbUsername' => $dbUsername, 'dbPassword' => $dbPassword, 'dbDatabase' => $dbDatabase, 'adminConfig' => $adminConfig);
    if (save_config($config_array)) {
        @rename($curr_dir . '/admin/incConfig.php', $curr_dir . '/admin/incConfig.bak.php');
        @unlink($curr_dir . '/admin/incConfig.php');
        return true;
    }
    return false;
}
开发者ID:bigprof,项目名称:jaap,代码行数:17,代码来源:settings-manager.php

示例4: _moduleContent


//.........这里部分代码省略.........
            $report = true;
            $date_start = translateDate($dateStartFilter) . " 00:00:00";
            $date_end = translateDate($dateEndFilter) . " 23:59:59";
            $arrDate = array('date_start' => $dateStartFilter, 'date_end' => $dateEndFilter);
            $arrFilterExtraVars = array("date_start" => $dateStartFilter, "date_end" => $dateEndFilter);
            $htmlFilter = $contenidoModulo = $oFilterForm->fetchForm("{$local_templates_dir}/filter.tpl", "", $_GET);
        } else {
            $report = true;
            //se añade control a los filtros
            $arrDate = array('date_start' => date("d M Y"), 'date_end' => date("d M Y"));
            $htmlFilter = $contenidoModulo = $oFilterForm->fetchForm("{$local_templates_dir}/filter.tpl", "", array('date_start' => date("d M Y"), 'date_end' => date("d M Y")));
        }
    }
    $oGrid = new paloSantoGrid($smarty);
    if ($report) {
        $oGrid->addFilterControl(_tr("Filter applied ") . _tr("Start Date") . " = " . $arrDate['date_start'] . ", " . _tr("End Date") . " = " . $arrDate['date_end'], $arrDate, array('date_start' => date("d M Y"), 'date_end' => date("d M Y")), true);
    }
    if (getParameter('submit_eliminar')) {
        borrarVoicemails();
        if ($oFilterForm->validateForm($_POST)) {
            // Exito, puedo procesar los datos ahora.
            $date_start = translateDate($_POST['date_start']) . " 00:00:00";
            $date_end = translateDate($_POST['date_end']) . " 23:59:59";
            $arrFilterExtraVars = array("date_start" => $_POST['date_start'], "date_end" => $_POST['date_end']);
        }
        $htmlFilter = $oFilterForm->fetchForm("{$local_templates_dir}/filter.tpl", "", $_POST);
    }
    if (getParameter('config')) {
        if (!(is_null($ext) || $ext == "")) {
            return form_config($smarty, $module_name, $local_templates_dir, $arrLang, $ext, $pDB_ast);
        }
    }
    if (getParameter('save')) {
        if (!save_config($smarty, $module_name, $local_templates_dir, $arrLang, $ext, $pDB_ast)) {
            return form_config($smarty, $module_name, $local_templates_dir, $arrLang, $ext, $pDB_ast);
        }
    }
    if (getParameter('action') == "display_record") {
        $file = getParameter("name");
        $ext = getParameter("ext");
        $user = isset($_SESSION['elastix_user']) ? $_SESSION['elastix_user'] : "";
        $extension = $pACL->getUserExtension($user);
        $esAdministrador = $pACL->isUserAdministratorGroup($user);
        $path = "/var/spool/asterisk/voicemail/default";
        $voicemailPath = "{$path}/{$ext}/INBOX/" . base64_decode($file);
        $tmpfile = basename($voicemailPath);
        $filetmp = "{$path}/{$ext}/INBOX/{$tmpfile}";
        if (!is_file($filetmp)) {
            die("<b>404 " . $arrLang["no_file"] . "</b>");
        }
        if (!$esAdministrador) {
            if ($extension != $ext) {
                die("<b>404 " . $arrLang["no_file"] . "</b>");
            }
            $voicemailPath = "{$path}/{$extension}/INBOX/" . base64_decode($file);
        }
        if (isset($file) && preg_match("/^[[:alpha:]]+[[:digit:]]+\\.(wav|WAV|Wav|mp3|gsm)\$/", base64_decode($file))) {
            if (!is_file($voicemailPath)) {
                die("<b>404 " . $arrLang["no_file"] . "</b>");
            }
            $sContenido = "";
            $name = basename($voicemailPath);
            $format = substr(strtolower($name), -3);
            // This will set the Content-Type to the appropriate setting for the file
            $ctype = '';
            switch ($format) {
开发者ID:hardikk,项目名称:HNH,代码行数:67,代码来源:index.php

示例5: tep_db_query

     $r = tep_db_query($q);
     $items_confirmed = array();
     while ($row = tep_db_fetch_array($r)) {
         $items_confirmed[] = $row['jng_sp_orders_items_id'];
     }
     if (count($items_confirmed) > 0) {
         $class_jo->confirmOrderDelivery($items_confirmed);
     }
     echo 'UPDATED';
     exit;
 } elseif ($_POST['me_action'] == 'CHANGESTOCKDELAY') {
     $new_delay = intval($_POST['new_delay']);
     if ($new_delay >= 60) {
         $config_open_orders = load_config('open-orders');
         $config_open_orders['stock-delay-non-zalando'] = $new_delay;
         save_config('open-orders', $config_open_orders);
     } else {
         $new_delay = 0;
     }
     echo utf8_encode(strval($new_delay));
     exit;
 } elseif ($_POST['me_action'] == 'CLOSEORDERSINSENTTAB') {
     if (isset($_POST['tobeclosed']) && is_array($_POST['tobeclosed'])) {
         $sp_list = $class_sp->retrieveList();
         foreach ($_POST['tobeclosed'] as $tbc) {
             list($jng_sp_id, $sent_date) = explode('|', $tbc);
             $q = "SELECT DISTINCT joi.jng_sp_orders_items_id, jo.jng_sp_orders_id";
             $q .= " FROM jng_sp_orders jo";
             $q .= " INNER JOIN jng_sp_orders_items joi ON joi.jng_sp_orders_id = jo.jng_sp_orders_id AND joi.status=9 AND joi.confirm_delivery='0'";
             $q .= " INNER JOIN jng_sp_orders_items_status_history joish ON joish.jng_sp_orders_items_id=joi.jng_sp_orders_items_id AND joish.status=joi.status";
             $q .= " WHERE jo.jng_sp_id={$jng_sp_id} AND joish.status_date LIKE '{$sent_date}%'";
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:sp-orders-amvd-upload.php

示例6: array

					</div>
				</div>
			<?php 
        include_once "{$curr_dir}/footer.php";
        exit;
    }
    /* if db test is successful, output success message and exit */
    if ($test) {
        exit;
    }
    /* create database tables */
    $silent = false;
    include "{$curr_dir}/updateDB.php";
    /* attempt to save db config file */
    $new_config = array('dbServer' => undo_magic_quotes($db_server), 'dbUsername' => undo_magic_quotes($db_username), 'dbPassword' => undo_magic_quotes($db_password), 'dbDatabase' => undo_magic_quotes($db_name), 'adminConfig' => array('adminUsername' => $username, 'adminPassword' => md5($password), 'notifyAdminNewMembers' => false, 'defaultSignUp' => 1, 'anonymousGroup' => 'anonymous', 'anonymousMember' => 'guest', 'groupsPerPage' => 10, 'membersPerPage' => 10, 'recordsPerPage' => 10, 'custom1' => 'Full Name', 'custom2' => 'Address', 'custom3' => 'City', 'custom4' => 'State', 'MySQLDateFormat' => '%m/%d/%Y', 'PHPDateFormat' => 'n/j/Y', 'PHPDateTimeFormat' => 'm/d/Y, h:i a', 'senderName' => 'Membership management', 'senderEmail' => $email, 'approvalSubject' => 'Your membership is now approved', 'approvalMessage' => "Dear member,\n\nYour membership is now approved by the admin. You can log in to your account here:\nhttp://{$_SERVER['HTTP_HOST']}" . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "\n\nRegards,\nAdmin", 'hide_twitter_feed' => false));
    $save_result = save_config($new_config);
    if ($save_result !== true) {
        // display instructions for manually creating them if saving not successful
        $folder_path_formatted = '<strong>' . dirname(__FILE__) . '</strong>';
        ?>
				<div class="row">
					<div class="col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">
						<p style="background-color: white; padding: 20px; margin-bottom: 40px; border-radius: 4px;"><img src="logo.png"></p>
						<div class="alert alert-danger"><?php 
        echo $Translation['error:'] . ' ' . $save_result['error'];
        ?>
</div>
						<?php 
        printf($Translation['failed to create config instructions'], $folder_path_formatted);
        ?>
						<pre style="overflow: scroll; font-size: large;"><?php 
开发者ID:ahmedandroid1980,项目名称:appgini,代码行数:31,代码来源:setup.php

示例7: copy

 public function copy($newThemeName = '')
 {
     if (!is_dir($this->_themeDir)) {
         return array('errors' => 'Theme `' . $this->_themeName . '` doesn\'t exist');
     }
     ProviderLog::start('copyTheme');
     $newThemeName = $newThemeName ? checkThemeName($newThemeName) : checkThemeName($this->_themeName);
     $this->prepareCopyRename($newThemeName, false);
     save_config($this->_previewThemeDir, $this->_previewThemeDir, $this->_themeName);
     // HACK: We have to rename source Config.xml back
     Designer::addTheme($newThemeName);
     ProviderLog::end('copyTheme');
     return array('result' => 'done', 'log' => ProviderLog::getLog(), 'newName' => $newThemeName);
 }
开发者ID:tmdhosting,项目名称:TMDHosting-PrestaShop-Technology-Theme,代码行数:14,代码来源:DesignerTabSelf.php

示例8: is_csrf_proper

    $proper = is_csrf_proper(from($_REQUEST, 'csrf_token'));
    if (login() && $proper) {
        $newKey = from($_REQUEST, 'newKey');
        $newValue = from($_REQUEST, 'newValue');
        $new_config = array();
        $new_Keys = array();
        if (!empty($newKey)) {
            $new_Keys[$newKey] = $newValue;
        }
        foreach ($_POST as $name => $value) {
            if (substr($name, 0, 8) == "-config-") {
                $name = str_replace("_", ".", substr($name, 8));
                $new_config[$name] = $value;
            }
        }
        save_config($new_config, $new_Keys);
        $login = site_url() . 'admin/config';
        header("location: {$login}");
    } else {
        $login = site_url() . 'login';
        header("location: {$login}");
    }
    die;
});
// Show Backup page
get('/admin/backup', function () {
    if (login()) {
        config('views.root', 'system/admin/views');
        render('backup', array('title' => 'Backup content - ' . blog_title(), 'description' => blog_description(), 'canonical' => site_url(), 'bodyclass' => 'backup', 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; Backup'));
    } else {
        $login = site_url() . 'login';
开发者ID:robihidayat,项目名称:htmly,代码行数:31,代码来源:htmly.php

示例9: elseif

     exit;
 } elseif ($_POST['me_action'] == 'KPI-LEAD-RELOADTABLE') {
     $status = tep_db_prepare_input($_POST['status']);
     $closing_date_start = tep_db_prepare_input($_POST['closing_date_start']);
     $closing_date_end = tep_db_prepare_input($_POST['closing_date_end']);
     echo utf8_encode(kpiLeadtimeLoad($status, $closing_date_start, $closing_date_end));
     exit;
 } elseif ($_POST['me_action'] == 'KPI-FCHECK-UPDATECONFIG') {
     $kpi_lead_config_data = tep_db_prepare_input($_POST['kpi_fcheck_config_data']);
     $config_temp = explode('||', $kpi_lead_config_data);
     $config = array();
     foreach ($config_temp as $ct) {
         list($cn, $cv) = explode('|', $ct);
         $config[$cn] = $cv;
     }
     save_config('kpi-leadtime', $config);
     echo utf8_encode('ok');
     exit;
 } elseif ($_POST['me_action'] == 'KPI-FCHECK-RELOADTABLE') {
     if (isset($_POST['seldate'])) {
         $seldate = tep_db_prepare_input($_POST['seldate']);
         $seldate_ts = strtotime($seldate);
         $seldate_ts_start = $seldate_ts - 7 * 86400;
         $date_start = date('Y-m-d', $seldate_ts_start);
         $date_end = date('Y-m-d', $seldate_ts);
     } else {
         $date_start = date('Y-m-d', strtotime('-7 days'));
         $date_end = date('Y-m-d');
     }
     $result = '<div id="kpi-fcheck">';
     //Preparing Result
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:home.php

示例10: array

            if (is_exists_s_config_group_item_var($config_group_item_r['group_id'], $config_group_item_r['id'], $config_group_item_r['keyid'])) {
                if (!delete_s_config_group_item_vars($config_group_item_r['group_id'], $config_group_item_r['id'], $config_group_item_r['keyid'])) {
                    $errors[] = array('error' => 'Config Group Item Var not deleted', 'detail' => db_error());
                }
            }
        }
    }
}
@set_time_limit(0);
if (strlen($HTTP_VARS['group_id']) == 0) {
    $HTTP_VARS['group_id'] = 'site';
}
// process any updates
if ($HTTP_VARS['op'] == 'save') {
    //print_r($HTTP_VARS);
    save_config($HTTP_VARS, $errors);
}
if (is_not_empty_array($errors)) {
    echo format_error_block($errors);
}
echo get_javascript("admin/config/select.js");
echo "<div class=\"tabContainer\">";
$config_group_rs = NULL;
$results = fetch_s_config_group_rs();
if ($results) {
    while ($config_group_r = db_fetch_assoc($results)) {
        $config_group_rs[] = $config_group_r;
    }
    db_free_result($results);
}
if (is_array($config_group_rs)) {
开发者ID:horrabin,项目名称:opendb,代码行数:31,代码来源:index.php

示例11: array

$api_status_ok = true;
$exchange_rate = array();
$exchange_rate['date'] = date('d.m.Y H:i:s');
$currencies = getAllCurrencies();
foreach ($currencies as $c_from) {
    foreach ($currencies as $c_to) {
        $key = generateExchangeRateKey($c_from, $c_to);
        if ($c_from == $c_to) {
            $rate = 1;
        } else {
            $rate = getExchangeRateOnline($c_from, $c_to);
            if ($rate == 0 || $rate === false) {
                $api_status_ok = false;
            }
        }
        $exchange_rate[$key] = $rate;
        $logger->write('Rate for ' . $key . ': ' . $rate);
    }
}
if ($api_status_ok) {
    save_config('exchange-rate', $exchange_rate);
    $logger->write('Save rate to configuration file');
} else {
    $subject = 'IMPORTANT & URGENT: Exchange Rate Cron Failed!';
    $content = '<p>Dear All, there seems to be a problem running ' . 'cron/daily-exchange-rate.php! It is not saved and ' . 'last success value is kept.</p>' . '<p>Please check the log and try to rerun it manually.' . ' If you keep receiving this error, create a 2 stars bug report!</p>';
    tep_mail(EMAIL_NAME_DEBUGR, EMAIL_ADDRESS_DEBUGR, $subject, $content, FROM_EMAIL_NAME, FROM_EMAIL_ADDRESS);
    $logger->write('Problem found! A notification is sent to IT Team.');
}
$logger->close();
echo 'Done!';
tep_db_close();
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:daily-exchange-rate.php

示例12: set_admin_password

/**
 * @brief Set a new administrator password
 *
 * @note    The password will be trimmed, salted, crypted with sha256 and stored in $config.
 *          Optionally, $config can be written in config.php.
 *
 * @param string    $old_password       The current administrator password (plain, not crypted)
 * @param string    $new_password_1     The new administrator password (plain, not crypted) (first time)
 * @param string    $new_password_2     The new administrator password (plain, not crypted) (second time)
 * @param boolean   $save_config        If true, the config.php file will be overwritten.
 *                                      If false, the new password will be stored in $config,
 *                                      but you must manually save the $config with save_config()!
 *
 * @throws Exception    if the old password is not correct
 * @throws Exception    if the new password is not allowed (maybe empty)
 * @throws Exception    if the new passworts are different
 * @throws Exception    if $config could not be saved in config.php
 */
function set_admin_password($old_password, $new_password_1, $new_password_2, $save_config = true)
{
    global $config;
    $salt = 'h>]gW3$*j&o;O"s;@&G)';
    settype($old_password, 'string');
    settype($new_password_1, 'string');
    settype($new_password_2, 'string');
    $old_password = trim($old_password);
    $new_password_1 = trim($new_password_1);
    $new_password_2 = trim($new_password_2);
    if (!is_admin_password($old_password)) {
        throw new Exception('Das eingegebene Administratorpasswort ist nicht korrekt!');
    }
    if (mb_strlen($new_password_1) < 4) {
        throw new Exception('Das neue Passwort muss mindestens 4 Zeichen lang sein!');
    }
    if ($new_password_1 !== $new_password_2) {
        throw new Exception('Die neuen Passwörter stimmen nicht überein!');
    }
    // all ok, save the new password
    $config['admin']['password'] = hash('sha256', $salt . $new_password_1);
    if ($save_config) {
        save_config();
    }
}
开发者ID:AlexanderS,项目名称:Part-DB,代码行数:43,代码来源:lib.php

示例13: queryDepotSummary


//.........这里部分代码省略.........
             $stock_target = $product->getDIOHstockTarget($row['articles_id']);
             $stock_diff = $stock_available - $stock_target;
             if ($stock_diff > $goodstock_tolerance) {
                 //OVERSTOCK
                 $overstock_quantity = $stock_diff - $goodstock_tolerance;
                 $overstock[$product->stars]['products'][] = $product->id;
                 $overstock[$product->stars]['articles']++;
                 $overstock[$product->stars]['quantity'] += $overstock_quantity;
                 $goodstock[$product->stars]['quantity'] += $stock_available - $overstock_quantity;
                 $overstock[$product->stars]['value'] += $overstock_quantity * $material_expenses;
                 $goodstock[$product->stars]['value'] += ($stock_available - $overstock_quantity) * $material_expenses;
             } elseif ($stock_diff < -1 * $goodstock_tolerance) {
                 //SHORTAGE
                 $shortages_quantity = abs($stock_diff) - $goodstock_tolerance;
                 $shortages[$product->stars]['products'][] = $product->id;
                 $shortages[$product->stars]['articles']++;
                 $shortages[$product->stars]['quantity'] += $shortages_quantity;
                 $shortages[$product->stars]['quantity'] += $stock_available;
                 $shortages[$product->stars]['value'] += $shortages_quantity * $material_expenses;
                 $shortages[$product->stars]['value'] += $stock_available * $material_expenses;
             } else {
                 $goodstock[$product->stars]['products'][] = $product->id;
                 $goodstock[$product->stars]['articles']++;
                 $goodstock[$product->stars]['quantity'] += $stock_available;
                 $goodstock[$product->stars]['value'] += $stock_available * $material_expenses;
             }
         }
         //            echo '. ';
     }
     $logger->write('Total rows from query = ' . $rowcounter);
     for ($s = 0; $s <= $totalstars; $s++) {
         $overstock[$s]['products'] = count(array_unique($overstock[$s]['products']));
         $shortages[$s]['products'] = count(array_unique($shortages[$s]['products']));
         $goodstock[$s]['products'] = count(array_unique($goodstock[$s]['products']));
     }
     //        echo '<pre>';
     //        var_dump($goodstock);
     //        var_dump($overstock);
     //        var_dump($shortages);
     //        echo '</pre>';
     $depot_summary['lastrun'] = time();
     $depot_summary['diohTarget-0'] = self::$diohStopLevel[0];
     $depot_summary['diohTarget-1'] = self::$diohStopLevel[1];
     $depot_summary['diohTarget-2'] = self::$diohStopLevel[2];
     $depot_summary['diohTarget-3'] = self::$diohStopLevel[3];
     $depot_summary['overstock-3-products'] = $overstock[3]['products'];
     $depot_summary['overstock-3-articles'] = $overstock[3]['articles'];
     $depot_summary['overstock-3-quantity'] = $overstock[3]['quantity'];
     $depot_summary['overstock-3-value'] = $overstock[3]['value'];
     $depot_summary['overstock-2-products'] = $overstock[2]['products'];
     $depot_summary['overstock-2-articles'] = $overstock[2]['articles'];
     $depot_summary['overstock-2-quantity'] = $overstock[2]['quantity'];
     $depot_summary['overstock-2-value'] = $overstock[2]['value'];
     $depot_summary['overstock-1-products'] = $overstock[1]['products'];
     $depot_summary['overstock-1-articles'] = $overstock[1]['articles'];
     $depot_summary['overstock-1-quantity'] = $overstock[1]['quantity'];
     $depot_summary['overstock-1-value'] = $overstock[1]['value'];
     $depot_summary['overstock-0-products'] = $overstock[0]['products'];
     $depot_summary['overstock-0-articles'] = $overstock[0]['articles'];
     $depot_summary['overstock-0-quantity'] = $overstock[0]['quantity'];
     $depot_summary['overstock-0-value'] = $overstock[0]['value'];
     $depot_summary['goodstock-3-products'] = $goodstock[3]['products'];
     $depot_summary['goodstock-3-articles'] = $goodstock[3]['articles'];
     $depot_summary['goodstock-3-quantity'] = $goodstock[3]['quantity'];
     $depot_summary['goodstock-3-value'] = $goodstock[3]['value'];
     $depot_summary['goodstock-2-products'] = $goodstock[2]['products'];
     $depot_summary['goodstock-2-articles'] = $goodstock[2]['articles'];
     $depot_summary['goodstock-2-quantity'] = $goodstock[2]['quantity'];
     $depot_summary['goodstock-2-value'] = $goodstock[2]['value'];
     $depot_summary['goodstock-1-products'] = $goodstock[1]['products'];
     $depot_summary['goodstock-1-articles'] = $goodstock[1]['articles'];
     $depot_summary['goodstock-1-quantity'] = $goodstock[1]['quantity'];
     $depot_summary['goodstock-1-value'] = $goodstock[1]['value'];
     $depot_summary['goodstock-0-products'] = $goodstock[0]['products'];
     $depot_summary['goodstock-0-articles'] = $goodstock[0]['articles'];
     $depot_summary['goodstock-0-quantity'] = $goodstock[0]['quantity'];
     $depot_summary['goodstock-0-value'] = $goodstock[0]['value'];
     $depot_summary['shortages-3-products'] = $shortages[3]['products'];
     $depot_summary['shortages-3-articles'] = $shortages[3]['articles'];
     $depot_summary['shortages-3-quantity'] = $shortages[3]['quantity'];
     $depot_summary['shortages-2-products'] = $shortages[2]['products'];
     $depot_summary['shortages-2-articles'] = $shortages[2]['articles'];
     $depot_summary['shortages-2-quantity'] = $shortages[2]['quantity'];
     $depot_summary['shortages-2-value'] = $shortages[2]['value'];
     $depot_summary['shortages-1-products'] = $shortages[1]['products'];
     $depot_summary['shortages-1-articles'] = $shortages[1]['articles'];
     $depot_summary['shortages-1-quantity'] = $shortages[1]['quantity'];
     $depot_summary['shortages-1-value'] = $shortages[1]['value'];
     $depot_summary['shortages-0-products'] = $shortages[0]['products'];
     $depot_summary['shortages-0-articles'] = $shortages[0]['articles'];
     $depot_summary['shortages-0-quantity'] = $shortages[0]['quantity'];
     $depot_summary['shortages-0-value'] = $shortages[0]['value'];
     if ($save_to_config) {
         save_config('depot-summary', $depot_summary);
     }
     $logger->write('New value successfully saved');
     $logger->close();
     //        echo 'Done!';
     return $depot_summary;
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:101,代码来源:Product.php

示例14: processRename

function processRename($themeDir, $previewThemeDir, $newThemeDir, $newThemePreviewDir, $newThemeName, $rename = true)
{
    save_config($previewThemeDir, $previewThemeDir, $newThemeName);
    // Check with upload archive & rename
    copyOrRename($previewThemeDir, $newThemePreviewDir, $rename);
    copyOrRename($themeDir, $newThemeDir, $rename);
}
开发者ID:tmdhosting,项目名称:TMDHosting-PrestaShop-Technology-Theme,代码行数:7,代码来源:EditorHelper.php

示例15: trigger_error

     if (!preg_match('/^[A-Za-z0-9_\\|]+$/', $uploads_extensions)) {
         trigger_error($ind295, E_USER_WARNING);
     }
     $exts = explode('|', $uploads_extensions);
     $good_exts = array();
     for ($i = 0, $num_exts = sizeof($exts); $i < $num_exts; ++$i) {
         if ($exts[$i] && !in_array($exts[$i], $good_exts)) {
             $good_exts[] = $exts[$i];
         }
     }
     $uploads_extensions = implode('|', $good_exts);
     $configs = config_array();
     $configs['uploads_size'] = $uploads_size;
     $configs['uploads_active'] = $uploads_active;
     $configs['uploads_ext'] = $uploads_extensions;
     save_config($configs);
     $title = $ind21;
     echo make_redirect($ind22, '?id=uploads', $ind338);
 } else {
     if ($id == 'help') {
         /*id Help*/
         if (!has_access(NEWS_REPORTER)) {
             trigger_error($ind19, E_USER_WARNING);
         }
         $message = '';
         $version = '';
         $title = $ind152;
         if ($fp = @fsockopen('www.fusionnews.net', 80, $errno, $errstr, 10)) {
             $out = 'GET /version/fnews_version.txt HTTP/1.1' . "\r\n";
             $out .= 'Host: www.fusionnews.net' . "\r\n";
             $out .= 'Connection: close' . "\r\n\r\n";
开发者ID:NotoriousPyro,项目名称:phpMCWeb,代码行数:31,代码来源:index.php


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