• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fn_get_storage_data函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: init

 public static function init($reinit = false, $config = array())
 {
     self::$active_debug_mode = false;
     self::$allow_backtrace_sql = isset($_REQUEST['sql_backtrace']);
     self::$debugger_cookie = !empty($_COOKIE['debugger']) ? $_COOKIE['debugger'] : '';
     if ($reinit) {
         Registry::registerCache('debugger', SESSION_ALIVE_TIME, Registry::cacheLevel('time'), true);
         self::$actives = fn_get_storage_data('debugger_active');
         self::$actives = !empty(self::$actives) ? unserialize(self::$actives) : array();
         $active_in_registry = !empty(self::$actives[self::$debugger_cookie]) && time() - self::$actives[self::$debugger_cookie] < 0 ? true : false;
     }
     $debugger_token = !empty($config) ? $config['debugger_token'] : Registry::get('config.debugger_token');
     switch (true) {
         case defined('AJAX_REQUEST') && substr($_REQUEST['dispatch'], 0, 8) !== 'debugger':
             break;
         case defined('DEBUG_MODE') && DEBUG_MODE == true:
         case !$reinit && (!empty(self::$debugger_cookie) || isset($_REQUEST[$debugger_token])):
             self::$active_debug_mode = true;
             break;
         case !$reinit:
             break;
             // next if reinit
         // next if reinit
         case !empty(self::$debugger_cookie) && !empty($active_in_registry):
             self::$active_debug_mode = true;
             break;
         case isset($_REQUEST[$debugger_token]):
             $salt = '';
             if ($_SESSION['auth']['user_type'] == 'A' && $_SESSION['auth']['is_root'] == 'Y') {
                 $user_admin = db_get_row('SELECT email, password FROM ?:users WHERE user_id = ?i', $_SESSION['auth']['user_id']);
                 $salt = $user_admin['email'] . $user_admin['password'];
             }
             if ($debugger_token != self::DEFAULT_TOKEN || !empty($salt)) {
                 // for non-default token allow full access
                 self::$debugger_cookie = substr(md5(SESSION::getId() . $salt), 0, 8);
                 $active_in_registry = true;
                 self::$active_debug_mode = true;
             }
             if (AREA == 'C' && !empty($_REQUEST[$debugger_token])) {
                 if (!empty(self::$actives[$_REQUEST[$debugger_token]]) && time() - self::$actives[$_REQUEST[$debugger_token]] < 0) {
                     $active_in_registry = true;
                     self::$debugger_cookie = $_REQUEST[$debugger_token];
                     self::$active_debug_mode = true;
                 }
             }
             fn_set_cookie('debugger', self::$debugger_cookie, SESSION_ALIVE_TIME);
             break;
     }
     if ($reinit && self::$active_debug_mode && !empty(self::$debugger_cookie)) {
         self::$actives[self::$debugger_cookie] = time() + self::EXPIRE_DEBUGGER;
         fn_set_storage_data('debugger_active', serialize(self::$actives));
         $active_in_registry = true;
     }
     if ($reinit && !empty(self::$debugger_cookie) && empty($active_in_registry)) {
         fn_set_cookie('debugger', '', 0);
         unset(self::$actives[self::$debugger_cookie]);
         fn_set_storage_data('debugger_active', serialize(self::$actives));
     }
     return self::$active_debug_mode;
 }
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:60,代码来源:Debugger.php


示例2: smarty_block_scripts

/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */
function smarty_block_scripts($params, $content, &$smarty, &$repeat)
{
    if ($repeat == true) {
        Registry::set('runtime.inside_scripts', 1);
        return;
    }
    if (Registry::get('config.tweaks.dev_js')) {
        $content .= smarty_helper_inline_scripts($params, $content, $smarty, $repeat);
        return $content;
    }
    $scripts = array();
    $external_scripts = array();
    $dir_root = Registry::get('config.dir.root');
    $return = '';
    $current_location = Registry::get('config.current_location');
    if (preg_match_all('/\\<script(.*?)\\>(.*?)\\<\\/script\\>/s', $content, $m)) {
        $contents = '';
        foreach ($m[1] as $src) {
            if (!empty($src) && preg_match('/src ?= ?"([^"]+)"/', $src, $_m)) {
                if (strpos($_m[1], $current_location) !== false) {
                    $scripts[] = str_replace($current_location, '', preg_replace('/\\?.*?$/', '', $_m[1]));
                } else {
                    $external_scripts[] = $_m[1];
                }
            }
        }
        // Check file changes in dev mode
        $names = $scripts;
        if (Development::isEnabled('compile_check')) {
            foreach ($names as $index => $name) {
                if (is_file($dir_root . '/' . $name)) {
                    $names[$index] .= filemtime($dir_root . '/' . $name);
                }
            }
        }
        $filename = 'js/tygh/scripts-' . md5(implode(',', $names)) . fn_get_storage_data('cache_id') . '.js';
        if (!Storage::instance('statics')->isExist($filename)) {
            foreach ($scripts as $src) {
                $contents .= fn_get_contents(Registry::get('config.dir.root') . $src);
            }
            $contents = str_replace('[files]', implode("\n", $scripts), Registry::get('config.js_css_cache_msg')) . $contents;
            $contents = Minifier::minify($contents, array('flaggedComments' => false));
            Storage::instance('statics')->put($filename, array('contents' => $contents, 'compress' => false, 'caching' => true));
        }
        $return = '<script type="text/javascript" src="' . Storage::instance('statics')->getUrl($filename) . '?ver=' . PRODUCT_VERSION . '"></script>' . "\n";
        if (!empty($external_scripts)) {
            foreach ($external_scripts as $sc) {
                $return .= '<script type="text/javascript" src="' . $sc . '"></script>' . "\n";
            }
        }
        foreach ($m[2] as $sc) {
            if (!empty($sc)) {
                $return .= '<script type="text/javascript">' . $sc . '</script>' . "\n";
            }
        }
        $return .= smarty_helper_inline_scripts($params, $content, $smarty, $repeat);
    }
    return $return;
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:64,代码来源:block.scripts.php


示例3: getLastSynchronizationTimes

 protected static function getLastSynchronizationTimes()
 {
     $result = fn_get_storage_data('ebay_shipping_synchronization_time');
     $result = json_decode($result, true);
     if (!is_array($result)) {
         $result = array();
     }
     return $result;
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:9,代码来源:Shipping.php


示例4: read

 /**
  * Reads development mode settings
  */
 private static function read()
 {
     if (is_null(self::$modes)) {
         $modes = fn_get_storage_data('dev_mode');
         if (!empty($modes)) {
             $modes = unserialize($modes);
         } else {
             $modes = array();
         }
         self::$modes = $modes;
     }
 }
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:15,代码来源:Development.php


示例5: fn_rus_payments_uninstall

function fn_rus_payments_uninstall()
{
    $payments = fn_get_schema('rus_payments', 'processors');
    fn_rus_payments_disable_payments($payments, true);
    foreach ($payments as $payment) {
        db_query("DELETE FROM ?:payment_processors WHERE admin_template = ?s", $payment['admin_template']);
    }
    $statuses = fn_get_schema('rus_payments', 'statuses', 'php', true);
    if (!empty($statuses)) {
        foreach ($statuses as $status_name => $status_data) {
            fn_delete_status(fn_get_storage_data($status_name), 'O');
        }
    }
}
开发者ID:ambient-lounge,项目名称:site,代码行数:14,代码来源:func.php


示例6: check

 /**
  * Validate specified data by schema
  *
  * @param  array $schema  Incoming validator schema
  * @param  array $request Request data
  * @return array Validation result and Data to be displayed
  */
 public function check($schema, $request)
 {
     $result = true;
     $data = array();
     $files = array();
     if (empty($schema['files'])) {
         return array($result, $data);
     }
     $files_hash = md5(serialize($schema['files']));
     if (!empty($request['skip_collisions'])) {
         fn_set_storage_data('collisions_hash', $files_hash);
     }
     $collisions_hash = fn_get_storage_data('collisions_hash');
     if ($files_hash == $collisions_hash) {
         $request['skip_collisions'] = true;
     }
     if (!empty($schema['files']) && !isset($request['skip_collisions'])) {
         foreach ($schema['files'] as $path => $file_data) {
             $original_path = $this->config['dir']['root'] . '/' . $path;
             switch ($file_data['status']) {
                 case 'changed':
                     if (!file_exists($original_path) || file_exists($original_path) && md5_file($original_path) != $file_data['hash']) {
                         $data['changed'][] = $path;
                         $result = false;
                         $files[] = $path;
                     }
                     break;
                 case 'deleted':
                     if (file_exists($original_path) && md5_file($original_path) != $file_data['hash']) {
                         $data['deleted'][] = $path;
                         $result = false;
                         $files[] = $path;
                     }
                     break;
                 case 'new':
                     if (file_exists($original_path)) {
                         $data['new'][] = $path;
                         $result = false;
                         $files[] = $path;
                     }
                     break;
             }
         }
         fn_set_storage_data('collision_files', serialize($files));
     }
     return array($result, $data);
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:54,代码来源:Collisions.php


示例7: smarty_block_scripts

/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */
function smarty_block_scripts($params, $content, &$smarty, &$repeat)
{
    if ($repeat == true) {
        return;
    }
    if (Registry::get('config.tweaks.dev_js')) {
        return $content;
    }
    $scripts = array();
    $dir_root = Registry::get('config.dir.root');
    $return = '';
    if (preg_match_all('/\\<script(.*?)\\>(.*?)\\<\\/script\\>/s', $content, $m)) {
        $contents = '';
        foreach ($m[1] as $src) {
            if (!empty($src) && preg_match('/src ?= ?"([^"]+)"/', $src, $_m)) {
                $scripts[] = str_replace(Registry::get('config.current_location'), '', preg_replace('/\\?.*?$/', '', $_m[1]));
            }
        }
        // Check file changes in dev mode
        $names = $scripts;
        if (Development::isEnabled('compile_check')) {
            foreach ($names as $index => $name) {
                if (is_file($dir_root . '/' . $name)) {
                    $names[$index] .= filemtime($dir_root . '/' . $name);
                }
            }
        }
        $gz_suffix = Registry::get('config.tweaks.gzip_css_js') ? '.gz' : '';
        $filename = 'js/tygh/scripts-' . md5(implode(',', $names)) . fn_get_storage_data('cache_id') . '.js';
        if (!Storage::instance('statics')->isExist($filename . $gz_suffix)) {
            foreach ($scripts as $src) {
                $contents .= fn_get_contents(Registry::get('config.dir.root') . $src);
            }
            $contents = str_replace('[files]', implode("\n", $scripts), Registry::get('config.js_css_cache_msg')) . $contents;
            Storage::instance('statics')->put($filename . $gz_suffix, array('contents' => $contents, 'compress' => Registry::get('config.tweaks.gzip_css_js'), 'caching' => true));
        }
        $return = '<script type="text/javascript" src="' . Storage::instance('statics')->getUrl($filename) . '?ver=' . PRODUCT_VERSION . '"></script>';
        foreach ($m[2] as $sc) {
            if (!empty($sc)) {
                $return .= '<script type="text/javascript">' . $sc . '</script>' . "\n";
            }
        }
    }
    return $return;
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:50,代码来源:block.scripts.php


示例8: fn_settings_actions_upgrade_center_license_number

function fn_settings_actions_upgrade_center_license_number(&$new_value, &$old_value)
{
    if (empty($new_value)) {
        $new_value = $old_value;
        fn_set_notification('E', __('error'), __('license_number_cannot_be_empty'));
        return false;
    }
    $mode = fn_get_storage_data('store_mode');
    $data = Helpdesk::getLicenseInformation($new_value);
    list($license_status, $updates, $messages) = Helpdesk::parseLicenseInformation($data, $_SESSION['auth'], true);
    if ($license_status == 'ACTIVE' && ($mode != 'full' || empty($old_value))) {
        fn_set_storage_data('store_mode', 'full');
        $_SESSION['mode_recheck'] = true;
    } else {
        if ($license_status != 'ACTIVE') {
            $new_value = $old_value;
        }
    }
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:19,代码来源:actions.functions.php


示例9: fn_merge_styles

/**
 * Merges css and less files
 *
 * @param array $files Array with style files
 * @param string $styles Style code
 * @param string $prepend_prefix Prepend prefix
 * @param array $params additional params
 */
function fn_merge_styles($files, $styles = '', $prepend_prefix = '', $params = array(), $area = AREA)
{
    $prefix = !empty($prepend_prefix) ? 'embedded' : 'standalone';
    $make_rtl = false;
    if (fn_is_rtl_language()) {
        $prefix .= '-rtl';
        $make_rtl = true;
    }
    $output = '';
    $less_output = '';
    $less_reflection = array();
    $compiled_less = '';
    $compiled_css = '';
    $relative_path = fn_get_theme_path('[relative]/[theme]/css', $area);
    $hashes = array();
    $names = array_map(function ($v) {
        return !empty($v['relative']) ? $v['relative'] : false;
    }, $files);
    // Check file changes
    if (Development::isEnabled('compile_check') || Debugger::isActive()) {
        $dir_root = Registry::get('config.dir.root');
        foreach ($names as $index => $name) {
            if (file_exists($dir_root . '/' . $name)) {
                $hashes[] = $name . filemtime($dir_root . '/' . $name);
            }
        }
    }
    $hashes[] = md5(implode('|', $names));
    $hashes[] = md5($styles);
    if ($area == 'C') {
        $hashes[] = Registry::get('runtime.layout.layout_id');
        $hashes[] = Registry::get('runtime.layout.style_id');
    }
    arsort($hashes);
    $hash = md5(implode(',', $hashes) . PRODUCT_VERSION) . fn_get_storage_data('cache_id');
    $filename = $prefix . '.' . $hash . '.css';
    $theme_manifest = Themes::factory(fn_get_theme_path('[theme]', 'C'))->getManifest();
    if (!Storage::instance('assets')->isExist($relative_path . '/' . $filename)) {
        Debugger::checkpoint('Before styles compilation');
        foreach ($files as $src) {
            $m_prefix = '';
            $m_suffix = '';
            if (!empty($src['media'])) {
                $m_prefix = "\n@media " . $src['media'] . " {\n";
                $m_suffix = "\n}\n";
            }
            if (strpos($src['file'], '.css') !== false) {
                $output .= "\n" . $m_prefix . fn_get_contents($src['file']) . $m_suffix;
            } elseif ($area != 'C' || empty($theme_manifest['converted_to_css'])) {
                $less_output_chunk = '';
                if (file_exists($src['file'])) {
                    if ($area == 'C' && (empty($theme_manifest['parent_theme']) || $theme_manifest['parent_theme'] == 'basic')) {
                        $less_output_chunk = "\n" . $m_prefix . fn_get_contents($src['file']) . $m_suffix;
                    } else {
                        $less_output_chunk = "\n" . $m_prefix . '@import "' . str_replace($relative_path . '/', '', $src['relative']) . '";' . $m_suffix;
                    }
                }
                if (!empty($params['reflect_less'])) {
                    if (preg_match('{/addons/([^/]+)/}is', $src['relative'], $m)) {
                        $less_reflection['output']['addons'][$m[1]] .= $less_output_chunk;
                    } else {
                        $less_reflection['output']['main'] .= $less_output_chunk;
                    }
                }
                $less_output .= $less_output_chunk;
            }
        }
        $header = str_replace('[files]', implode("\n", $names), Registry::get('config.js_css_cache_msg'));
        if (!empty($styles)) {
            $less_output .= $styles;
        }
        // Prepend all styles with prefix
        if (!empty($prepend_prefix)) {
            $less_output = $output . "\n" . $less_output;
            $output = '';
        }
        if (!empty($output)) {
            $compiled_css = Less::parseUrls($output, Storage::instance('assets')->getAbsolutePath($relative_path), fn_get_theme_path('[themes]/[theme]/media', $area));
        }
        if (!empty($theme_manifest['converted_to_css']) && $area == 'C') {
            $theme_css_path = fn_get_theme_path('[themes]/[theme]', $area) . '/css';
            $pcl_filepath = $theme_css_path . '/' . Themes::$compiled_less_filename;
            if (file_exists($pcl_filepath)) {
                $compiled_css .= fn_get_contents($pcl_filepath);
            }
            list($installed_addons) = fn_get_addons(array('type' => 'active'));
            foreach ($installed_addons as $addon) {
                $addon_pcl_filpath = $theme_css_path . "/addons/{$addon['addon']}/" . Themes::$compiled_less_filename;
                if (file_exists($pcl_filepath)) {
                    $compiled_css .= fn_get_contents($addon_pcl_filpath);
                }
            }
//.........这里部分代码省略.........
开发者ID:arpad9,项目名称:bygmarket,代码行数:101,代码来源:fn.common.php


示例10: fn_simple_decode_str

            $_SESSION[$description] = LIC_STAT_TR;
            break;
        case fn_simple_decode_str('gsff'):
        case fn_simple_decode_str('gvmm'):
            $_SESSION[$prefix . '_' . $description] = fn_simple_decode_str('BDUJWF');
            if ($mode == fn_simple_decode_str('gvmm')) {
                fn_set_notification('I', __(fn_simple_decode_str('tupsf`npef`dibohfe')), __(fn_simple_decode_str('ufyu`tupsf`npef`dibohfe`up`gvmm')));
                fn_clean_up_addons();
                fn_clear_cache();
                Mailer::sendMail(array('to' => Registry::get(fn_simple_decode_str('tfuujoht/Dpnqboz/dpnqboz`tjuf`benjojtusbups')), 'from' => Registry::get(fn_simple_decode_str('tfuujoht/Dpnqboz/dpnqboz`tjuf`benjojtusbups')), 'subj' => __(fn_simple_decode_str('tupsf`npef`dibohfe')), 'body' => __(fn_simple_decode_str('ufyu`tupsf`npef`dibohfe`up`gvmm')), 'data' => array(), 'company_id' => Registry::get('runtime.company_id')), 'A', CART_LANGUAGE);
                fn_redirect(Registry::get('config.current_url'));
            }
    }
    unset($_SESSION[$description]);
}
$mode = fn_get_storage_data(fn_simple_decode_str('tupsf`npef'));
if (!isset($_SESSION[$description])) {
    if ($mode == fn_simple_decode_str('gsff')) {
        $_SESSION[$description] = LIC_STAT_FR;
    } elseif ($mode == fn_simple_decode_str('usjbm')) {
        $_SESSION[$description] = LIC_STAT_TR;
    } elseif ($mode == fn_simple_decode_str('gvmm')) {
        $_SESSION[$description] = LIC_STAT_FL;
    }
}
if (isset($_SESSION[$prefix . '_' . $description])) {
    $data = $_SESSION[$prefix . '_' . $description];
} else {
    $data = '';
}
if ($data == fn_simple_decode_str('MJDFOTF`JT`JOWBMJE')) {
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:utf8.php


示例11: die

* and use this program.                                                    *
*                                                                          *
****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
****************************************************************************/
use Tygh\Registry;
use Tygh\Settings;
use Tygh\Helpdesk;
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if ($mode == 'validate_request' && !empty($_REQUEST['token'])) {
        $result = 'invalid';
        if (fn_get_storage_data('hd_request_code') == trim($_REQUEST['token'])) {
            $result = 'valid';
        }
        echo $result;
        exit(0);
    } elseif ($mode == 'messages') {
        if (!empty($_REQUEST['token'])) {
            $uc_settings = Settings::instance()->getValues('Upgrade_center');
            $is_valid = fn_get_contents(Registry::get('config.resources.updates_server') . '/index.php?dispatch=validators.validate_request&token=' . $_REQUEST['token'] . '&license_key=' . $uc_settings['license_number']);
            if ($is_valid == 'valid') {
                $data = simplexml_load_string(urldecode($_REQUEST['request']));
                Helpdesk::processMessages($data->Messages);
                echo 'OK';
                exit(0);
            } else {
                return array(CONTROLLER_STATUS_NO_PAGE);
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:helpdesk_connector.php


示例12: getCategoryVersions

 protected static function getCategoryVersions()
 {
     $result = fn_get_storage_data('ebay_category_version');
     $result = json_decode($result, true);
     if (!is_array($result)) {
         $result = array();
     }
     return $result;
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:9,代码来源:Category.php


示例13: synchronizationObjects

 /**
  * Sync ebay objects
  * @param int $site_id
  * @param int $category_id
  * @return bool
  */
 public static function synchronizationObjects($site_id, $category_id)
 {
     @set_time_limit(600);
     $start_time = fn_get_storage_data('ebay_synchronization_start_time');
     if (!empty($start_time) && $start_time > strtotime('-10 minutes')) {
         $time = time();
         $current_step = fn_get_storage_data('ebay_synchronization_step');
         $count_steps = fn_get_storage_data('ebay_synchronization_step_count');
         fn_set_progress('title', __('ebay_synchronization_title'));
         fn_set_progress('parts', $count_steps);
         for ($i = 1; $i < $current_step; $i++) {
             fn_set_progress('echo', '.');
         }
         fn_set_progress('echo', fn_get_storage_data('ebay_synchronization_step_title'), false);
         while (true) {
             //TODO move logic to same function fn_get_storage_data
             Registry::del('storage_data.ebay_synchronization_step');
             Registry::del('storage_data.ebay_synchronization_step_title');
             $step = fn_get_storage_data('ebay_synchronization_step');
             if (empty($step)) {
                 return true;
             }
             if ($step != $current_step) {
                 fn_set_progress('echo', '.');
                 fn_set_progress('echo', fn_get_storage_data('ebay_synchronization_step_title'), false);
                 $current_step = $step;
             }
             if ($time < strtotime('-10 minutes')) {
                 return true;
             }
             sleep(1);
         }
         return true;
     }
     $objects = fn_ebay_get_objects_needed_synchronization($site_id, $category_id);
     if (!empty($objects)) {
         $current_step = 1;
         register_shutdown_function(function () {
             fn_set_storage_data('ebay_synchronization_start_time', null);
             fn_set_storage_data('ebay_synchronization_step_title', null);
             fn_set_storage_data('ebay_synchronization_step', null);
             fn_set_storage_data('ebay_synchronization_step_count', null);
         });
         fn_set_storage_data('ebay_synchronization_start_time', time());
         fn_set_storage_data('ebay_synchronization_step_count', count($objects));
         fn_set_storage_data('ebay_synchronization_step', $current_step);
         fn_set_progress('title', __('ebay_synchronization_title'));
         fn_set_progress('parts', count($objects));
         if (in_array('Site', $objects)) {
             fn_set_progress('echo', __('ebay_synchronization_regions'), false);
             fn_set_storage_data('ebay_synchronization_step_title', __('ebay_synchronization_regions'));
             Site::synchronization();
             fn_set_storage_data('ebay_synchronization_step', ++$current_step);
             fn_set_progress('echo', '.');
         }
         if (in_array('Category', $objects)) {
             fn_set_progress('echo', __('ebay_synchronization_categories'), false);
             fn_set_storage_data('ebay_synchronization_step_title', __('ebay_synchronization_categories'));
             Category::synchronization($site_id);
             fn_set_storage_data('ebay_synchronization_step', ++$current_step);
             fn_set_progress('echo', '.');
         }
         if (in_array('Shipping', $objects)) {
             fn_set_progress('echo', __('ebay_synchronization_shipping_services'), false);
             fn_set_storage_data('ebay_synchronization_step_title', __('ebay_synchronization_shipping_services'));
             Shipping::synchronization($site_id);
             fn_set_storage_data('ebay_synchronization_step', ++$current_step);
             fn_set_progress('echo', '.');
         }
         if (in_array('CategoryFeature', $objects)) {
             fn_set_progress('echo', __('ebay_synchronization_category_features'), false);
             fn_set_storage_data('ebay_synchronization_step_title', __('ebay_synchronization_category_features'));
             CategoryFeature::synchronization($site_id, $category_id);
             fn_set_storage_data('ebay_synchronization_step', ++$current_step);
             fn_set_progress('echo', '.');
         }
     }
     return true;
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:85,代码来源:Controller.php


示例14: fn_clean_up_addons

/**
 * Cleans up addons with incorrect snaphost
 *
 * @return bool Always true
 */
function fn_clean_up_addons()
{
    $_addons = db_get_hash_single_array("SELECT addon, status FROM ?:addons", array('addon', 'status'));
    $skipped_snapshots = fn_get_storage_data('skipped_snapshots');
    $skipped_snapshots = !empty($skipped_snapshots) ? explode(',', $skipped_snapshots) : array();
    foreach ($_addons as $addon => $status) {
        $snaphost = md5(str_rot13($addon));
        if (!fn_check_addon_snapshot($addon)) {
            if ($status == 'A') {
                fn_update_addon_status($addon, 'D');
                $skipped_snapshots[] = $snaphost;
            }
        } elseif (in_array($snaphost, $skipped_snapshots)) {
            fn_update_addon_status($addon, 'A');
            $skipped_snapshots = array_diff($skipped_snapshots, array($snaphost));
        }
    }
    $skipped_snapshots = array_unique($skipped_snapshots);
    fn_set_storage_data('skipped_snapshots', implode(',', $skipped_snapshots));
    return true;
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:26,代码来源:fn.addons.php


示例15: fn_is_expired_storage_data

/**
 * Checks is some key is expired (value of given key should be timestamp).
 *
 * @param string $key Key name
 * @param int $time_period Time period (in seconds), that should be added to the current timestamp for the future check.
 * @return boolean True, if saved timestamp is less than current timestamp, false otherwise.
 */
function fn_is_expired_storage_data($key, $time_period = null)
{
    $time = fn_get_storage_data($key);
    if ($time < TIME && $time_period) {
        fn_set_storage_data($key, TIME + $time_period);
    }
    return $time < TIME;
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:15,代码来源:fn.control.php


示例16: array

        case 'synchronization':
            return \Ebay\Controller::actionSynchronizationObjects();
            break;
        case 'clean_product_logs':
            \Ebay\ProductLogger::clean();
            return array(CONTROLLER_STATUS_OK, 'ebay.product_logs');
            break;
    }
    return array(CONTROLLER_STATUS_OK, 'ebay.manage');
}
if ($mode == 'manage') {
    $params = $_REQUEST;
    list($templates, $search) = fn_get_ebay_templates($params, Registry::get('settings.Appearance.admin_items_per_page'), DESCR_SL);
    \Ebay\Template::loadProductCount($templates);
    if (fn_get_ebay_trail_license_key() === Registry::get(str_rot13('nqqbaf.ronl.ronl_yvprafr_ahzore'))) {
        $time = fn_get_storage_data('ebay_trial_expiry_time');
        $days = 0;
        if (!empty($time)) {
            $datetime = new DateTime('@' . $time);
            $current_datetime = new DateTime();
            if ($datetime->getTimestamp() > $current_datetime->getTimestamp()) {
                $interval = $datetime->diff($current_datetime);
                $days = $interval->days;
                if ($interval->h > 0) {
                    $days++;
                }
            }
        }
        fn_set_notification('W', __('notice'), __('ebay_addon_used_trial_license', array('[ebay_license_url]' => fn_ebay_get_license_url(), '[days]' => __('ebay_addon_plural_days', array($days)))));
    }
    Tygh::$app['view']->assign('templates', $templates);
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:ebay.php


示例17: fn_delete_newsletter

    if ($mode == 'delete') {
        if (!empty($_REQUEST['newsletter_id'])) {
            fn_delete_newsletter($_REQUEST['newsletter_id']);
        }
        $suffix = '.manage';
    }
    if ($mode == 'delete_campaign') {
        if (!empty($_REQUEST['campaign_id'])) {
            fn_delete_campaigns((array) $_REQUEST['campaign_id']);
        }
        $suffix = '.campaigns';
    }
    return array(CONTROLLER_STATUS_OK, 'newsletters' . $suffix);
}
if ($mode == 'batch_send' && !empty($_REQUEST['key'])) {
    $data = fn_get_storage_data('newsletters_batch_' . $_REQUEST['key']);
    if (!empty($data)) {
        $data = @unserialize($data);
    }
    if (is_array($data)) {
        // Ger newsletter data
        $newsletter_data = array();
        foreach ($data['send_ids'] as $newsletter_id) {
            $n = array();
            foreach (fn_get_translation_languages() as $lang_code => $v) {
                $n[$lang_code] = fn_get_newsletter_data($newsletter_id, $lang_code);
                $n[$lang_code]['body_html'] = fn_rewrite_links($n[$lang_code]['body_html'], $newsletter_id, $n[$lang_code]['campaign_id']);
            }
            $newsletter_data[] = $n;
        }
        foreach (array_splice($data['recipients'], 0, Registry::get('addons.newsletters.newsletters_per_pass')) as $subscriber) {
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:31,代码来源:newsletters.php


示例18: fn_get_feedback_data

function fn_get_feedback_data($mode)
{
    $company_orders = db_get_hash_single_array("SELECT company_id, COUNT(order_id) as orders_count FROM ?:orders GROUP BY company_id", array('company_id', 'orders_count'));
    arsort($company_orders);
    $main_company_id = key($company_orders);
    $company_condition = '';
    if (fn_allowed_for('ULTIMATE')) {
        $company_condition = db_quote(" AND company_id = ?i", $main_company_id);
    }
    $fdata = array();
    $fdata['tracks']['version'] = PRODUCT_VERSION;
    $fdata['tracks']['type'] = PRODUCT_EDITION;
    $fdata['tracks']['status'] = PRODUCT_STATUS;
    $fdata['tracks']['build'] = PRODUCT_BUILD;
    $fdata['tracks']['domain'] = Registry::get('config.http_host');
    $fdata['tracks']['url'] = 'http://' . Registry::get('config.http_host') . Registry::get('config.http_path');
    $fdata['tracks']['mode'] = fn_get_storage_data('store_mode');
    $fdata['tracks']['live'] = fn_is_store_live();
    // Sales reports usage
    $fdata['general']['sales_reports'] = db_get_field("SELECT COUNT(*) FROM ?:sales_reports");
    $fdata['general']['sales_tables'] = db_get_field("SELECT COUNT(*) FROM ?:sales_reports_tables");
    $fdata['general']['layouts'] = db_get_field("SELECT COUNT(*) FROM ?:bm_layouts WHERE 1 {$company_condition}");
    $fdata['general']['locations'] = db_get_field("SELECT COUNT(*) FROM ?:bm_locations WHERE layout_id IN (SELECT layout_id FROM ?:bm_layouts WHERE is_default = 1 {$company_condition})");
    $fdata['general']['current_theme'] = db_get_field("SELECT theme_name FROM ?:bm_layouts WHERE is_default = 1 {$company_condition}");
    $fdata['general']['current_style'] = db_get_field("SELECT style_id FROM ?:bm_layouts WHERE is_default = 1 {$company_condition}");
    $fdata['general']['pages'] = db_get_field("SELECT COUNT(*) FROM ?:pages");
    if (!fn_allowed_for('ULTIMATE:FREE')) {
        /**
         * Get feedback data
         *
         * @param array $fdata Feedback data
         */
        fn_set_hook('get_feedback_data', $fdata);
        // Localizations
        $fdata['general']['localizations'] = db_get_field("SELECT COUNT(*) FROM ?:localizations WHERE status='A'");
        $fdata['general']['companies'] = db_get_field("SELECT COUNT(*) FROM ?:companies");
    }
    // Languages usage
    $fdata['languages'] = db_get_array("SELECT lang_code, status FROM ?:languages");
    // Payments info. Here we get information about how many payments are used and whether surcharges were set.
    $fdata['payments'] = db_get_array("SELECT payment_id, a.processor_id, processor_script, status, " . "IF(a_surcharge<>0 OR p_surcharge<>0, 'Y', 'N') as surcharge_exists " . "FROM ?:payments AS a LEFT JOIN ?:payment_processors USING(processor_id)");
    // Currencies info.
    $fdata['currencies'] = db_get_array("SELECT currency_code, is_primary, decimals_separator, thousands_separator, status FROM ?:currencies");
    // Settings info
    if (fn_allowed_for('ULTIMATE')) {
        $first_company_id = db_get_field("SELECT MIN(company_id) FROM ?:companies");
        if (!empty($first_company_id)) {
            $fdata['settings'] = fn_get_settings_feedback($mode, $first_company_id);
        }
    } else {
        $fdata['settings'] = fn_get_settings_feedback($mode);
    }
    // Users quantity
    $fdata['users']['customers'] = db_get_field("SELECT COUNT(*) FROM ?:users WHERE user_type='C' AND status='A'");
    $fdata['users']['admins'] = db_get_field("SELECT COUNT(*) FROM ?:users WHERE user_type='A' AND status='A'");
    $fdata['users']['affiliates'] = db_get_field("SELECT COUNT(*) FROM ?:users WHERE user_type='P' AND status='A'");
    $fdata['users']['vendors'] = db_get_field("SELECT COUNT(*) FROM ?:users WHERE user_type='V' AND status='A'");
    if (!fn_allowed_for('ULTIMATE:FREE')) {
        $fdata['users']['admin_usergroups'] = db_get_field("SELECT COUNT(*) FROM ?:usergroups WHERE type='A' AND status='A'");
        $fdata['users']['customer_usergroups'] = db_get_field("SELECT COUNT(*) FROM ?:usergroups WHERE type='C' AND status='A'");
    }
    // Taxes info
    $fdata['taxes'] = db_get_array("SELECT address_type, price_includes_tax FROM ?:taxes WHERE status='A'");
    // Shippings
    $fdata['shippings'] = db_get_array("SELECT rate_calculation, localization, a.service_id, module as carrier FROM " . "?:shippings AS a LEFT JOIN ?:shipping_services USING(service_id) WHERE a.status='A'");
    // Destinations
    $fdata['general']['destinations'] = db_get_field("SELECT COUNT(*) FROM ?:destinations WHERE status='A'");
    // Blocks
    $fdata['general']['blocks'] = db_get_field("SELECT COUNT(*) FROM ?:bm_blocks");
    $fdata['general']['block_links'] = db_get_field("SELECT COUNT(*) FROM ?:bm_snapping");
    // Images
    $fdata['general']['images'] = db_get_field("SELECT COUNT(*) FROM ?:images");
    // Product items
    $fdata['products_stat']['total'] = db_get_field("SELECT COUNT(*) as amount FROM ?:products");
    $fdata['products_stat']['prices'] = db_get_field("SELECT COUNT(*) FROM ?:product_prices");
    $fdata['products_stat']['features'] = db_get_field("SELECT COUNT(*) FROM ?:product_features WHERE status='A'");
    $fdata['products_stat']['features_values'] = db_get_field("SELECT COUNT(*) FROM ?:product_features_values");
    $fdata['products_stat']['files'] = db_get_field("SELECT COUNT(*) FROM ?:product_files");
    $fdata['products_stat']['options'] = db_get_field("SELECT COUNT(*) FROM ?:product_options");
    $fdata['products_stat']['global_options'] = db_get_field("SELECT COUNT(*) FROM ?:product_options WHERE product_id='0'");
    $fdata['products_stat']['option_variants'] = db_get_field("SELECT COUNT(*) FROM ?:product_option_variants");
    $fdata['products_stat']['options_inventory'] = db_get_field("SELECT COUNT(*) FROM ?:product_options_inventory");
    $fdata['products_stat']['configurable'] = db_get_field("SELECT COUNT(*) FROM ?:products WHERE product_type = 'C'");
    $fdata['products_stat']['edp'] = db_get_field("SELECT COUNT(*) FROM ?:products WHERE is_edp = 'Y'");
    $fdata['products_stat']['free_shipping'] = db_get_field("SELECT COUNT(*) FROM ?:products WHERE free_shipping = 'Y'");
    if (!fn_allowed_for('ULTIMATE:FREE')) {
        $fdata['products_stat']['options_exceptions'] = db_get_field("SELECT COUNT(*) FROM ?:product_options_exceptions");
        $fdata['products_stat']['filters'] = db_get_field("SELECT COUNT(*) FROM ?:product_filters WHERE status='A'");
    }
    // Promotions
    $fdata['promotions'] = db_get_array("SELECT stop, zone, status FROM ?:promotions");
    // Addons
    $fdata['addons'] = db_get_array("SELECT addon, status, priority FROM ?:addons ORDER BY addon");
    // Addon options
    $allowed_addons = array('access_restrictions', 'affiliate', 'discussion', 'gift_certificates', 'gift_registry', 'google_sitemap', 'barcode', 'polls', 'quickbooks', 'reward_points', 'rma', 'seo', 'tags');
    if (is_array($fdata['addons'])) {
        foreach ($fdata['addons'] as $k => $data) {
            if ($data['addon'] == 'suppliers') {
                $fdata['general']['suppliers'] = db_get_field("SELECT COUNT(*) FROM ?:suppliers");
            }
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:feedback.php


示例19: storeInstalledUpgrade

 protected function storeInstalledUpgrade($schema)
 {
     $files = fn_get_storage_data('collision_files');
     fn_set_storage_data('collision_files', null);
     fn_set_storage_data('collisions_hash', null);
     if (!empty($files)) {
         $files = unserialize($files);
         foreach ($files as $id => $path) {
             $files[$id] = array('file_path' => $path, 'status' => 'C');
         }
         $files = serialize($files);
     } else {
         $files = '';
     }
     $installed_pack = array('type' => $schema['type'], 'name' => $schema['name'], 'timestamp' => TIM 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fn_get_theme_path函数代码示例发布时间:2022-05-15
下一篇:
PHP fn_get_statuses函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap