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

PHP fn_get_schema函数代码示例

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

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



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

示例1: fn_yandex_metrika_sync_goals

/**
 * Common functions
 */
function fn_yandex_metrika_sync_goals()
{
    $oauth_token = Settings::instance()->getValue('auth_token', 'rus_yandex_metrika');
    $counter_number = Settings::instance()->getValue('counter_number', 'rus_yandex_metrika');
    if (empty($oauth_token) || empty($counter_number)) {
        return false;
    }
    $goals_scheme = fn_get_schema('rus_yandex_metrika', 'goals');
    $selected_goals = Settings::instance()->getValue('collect_stats_for_goals', 'rus_yandex_metrika');
    $client = new RestClient('https://api-metrika.yandex.ru/');
    $ext_goals = array();
    $res = $client->get("/counter/{$counter_number}/goals.json", array('oauth_token' => $oauth_token));
    if (!empty($res['goals'])) {
        foreach ($res['goals'] as $goal) {
            $ext_goals[$goal['name']] = $goal;
        }
    }
    foreach ($goals_scheme as $goal_name => $goal) {
        $ext_goal_name = '[auto] ' . $goal['name'];
        if (!empty($ext_goals[$ext_goal_name])) {
            if (empty($selected_goals[$goal_name]) || $selected_goals[$goal_name] == 'N') {
                $client->delete("/counter/{$counter_number}/goal/" . $ext_goals[$ext_goal_name]['id'] . "?oauth_token={$oauth_token}");
            }
        } else {
            if (!empty($selected_goals[$goal_name]) && $selected_goals[$goal_name] == 'Y') {
                $goal['name'] = $ext_goal_name;
                $client->post("/counter/{$counter_number}/goals?oauth_token={$oauth_token}", array('goal' => $goal));
            }
        }
    }
    return true;
}
开发者ID:askzap,项目名称:ask-zap,代码行数:35,代码来源:func.php


示例2: generate

 /**
  * Generates menu items from scheme
  * @param  array $request request params
  * @return array menu items
  */
 public function generate($request)
 {
     $menu = fn_get_schema('menu', 'menu', 'php');
     $this->_request = $request;
     $actions = array();
     foreach ($menu as $group => &$menu_data) {
         // Get static section
         foreach ($menu_data as $root => &$items) {
             $items['items'] = $this->_processItems($items['items'], $root, '');
             if (empty($items['items'])) {
                 unset($menu[$group][$root]);
                 continue;
             }
         }
     }
     unset($items, $menu_data);
     $menu['top'] = $this->_sort($menu['top']);
     $menu['central'] = $this->_sort($menu['central']);
     $menu = $this->_getSettingsSections($menu);
     fn_preload_lang_vars($this->_lang_cache);
     $selected = $this->_selected;
     /**
      * Changes generated menu items
      *
      * @param  array $request request params
      * @param array $menu items
      * @param array $actions items Action value, if exists. See: fn_get_route
      * @param array $this->selected Menu item, selected by the dispatch
      */
     fn_set_hook('backend_menu_generate_post', $request, $menu, $actions, $this->_selected);
     return array($menu, $actions, $this->_selected);
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:37,代码来源:BackendMenu.php


示例3: updateLangObjects

 /**
  * @param $tpl_var
  * @param $value
  * @return bool true
  */
 public static function updateLangObjects($tpl_var, &$value)
 {
     static $translation_mode, $init = false, $schema;
     if (!$init) {
         $translation_mode = Registry::get('runtime.customization_mode.translation');
         $init = true;
     }
     if ($translation_mode) {
         if (empty($schema)) {
             $schema = fn_get_schema('translate', 'schema');
         }
         $controller = Registry::get('runtime.controller');
         $mode = Registry::get('runtime.mode');
         if (!empty($schema[$controller][$mode])) {
             foreach ($schema[$controller][$mode] as $var_name => $var) {
                 if ($tpl_var == $var_name && self::isAllowToTranslateLanguageObject($var)) {
                     self::prepareLangObjects($value, $var['dimension'], $var['fields'], $var['table_name'], $var['where_fields'], isset($var['inner']) ? $var['inner'] : '', isset($var['unescape']) ? $var['unescape'] : '');
                 }
             }
         }
         foreach ($schema['any']['any'] as $var_name => $var) {
             if ($tpl_var == $var_name && self::isAllowToTranslateLanguageObject($var)) {
                 self::prepareLangObjects($value, $var['dimension'], $var['fields'], $var['table_name'], $var['where_fields'], isset($var['inner']) ? $var['inner'] : '', isset($var['unescape']) ? $var['unescape'] : '');
             }
         }
     }
     return true;
 }
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:33,代码来源:Helper.php


示例4: sanitizeObjectData

 /**
  * Performs securing object data basing on rule list related to object type. Rule list is specified at schema file.
  * Note that this function checks setting about whether HTML should be sanitized or not.
  * If no, field rule "ACTION_SANITIZE_HTML" will be omitted and no modifications to field data will be made.
  *
  * @param string $object_type  Object type specified at schema file
  * @param array  &$object_data Array with object data passed by reference
  *
  * @return void
  */
 public static function sanitizeObjectData($object_type, array &$object_data)
 {
     $schema = fn_get_schema('security', 'object_sanitization');
     if (isset($schema[$object_type][self::SCHEMA_SECTION_FIELD_RULES])) {
         $object_data = self::sanitizeData($object_data, $schema[$object_type][self::SCHEMA_SECTION_FIELD_RULES], self::shouldSanitizeUserHtml() ? array() : array(self::ACTION_SANITIZE_HTML));
     }
 }
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:17,代码来源:SecurityHelper.php


示例5: fn_settings_variants_addons_rus_yandex_metrika_collect_stats_for_goals

/**
 * Get predefined goals
 */
function fn_settings_variants_addons_rus_yandex_metrika_collect_stats_for_goals()
{
    $goals_scheme = fn_get_schema('rus_yandex_metrika', 'goals');
    $goals = array();
    foreach ($goals_scheme as $goal_key => $goal) {
        $goals[$goal_key] = $goal['name'];
    }
    return $goals;
}
开发者ID:askzap,项目名称:ask-zap,代码行数:12,代码来源:variants.functions.post.php


示例6: __construct

 /**
  * Create new last view instance object
  *
  * @param  string $area Area identifier
  * @return void
  */
 public function __construct($area = AREA)
 {
     $schema_name = fn_get_area_name($area);
     $this->_controller = Registry::get('runtime.controller');
     $this->_mode = Registry::get('runtime.mode');
     $this->_action = Registry::get('runtime.action');
     $common_schema = fn_get_schema('last_view', $schema_name);
     $this->_schema = !empty($common_schema[$this->_controller]) ? $common_schema[$this->_controller] : array();
     $this->_auth =& $_SESSION['auth'];
 }
开发者ID:askzap,项目名称:ultimate,代码行数:16,代码来源:ACommon.php


示例7: fn_br_get_static_data_owner_link

/**
 * Gets static data owner link
 *
 * @param string $section Static data section
 * @return array breadcrumb link data
 */
function fn_br_get_static_data_owner_link($section)
{
    $result = array();
    $section = empty($section) ? 'C' : $section;
    $schema = fn_get_schema('static_data', 'schema');
    $section_data = $schema[$section];
    if (!empty($section_data['owner_object']['return_url']) && !empty($section_data['owner_object']['return_url_text'])) {
        $result = array('link' => $section_data['owner_object']['return_url'], 'title' => __($section_data['owner_object']['return_url_text']));
    }
    return $result;
}
开发者ID:askzap,项目名称:ultimate,代码行数:17,代码来源:backend.functions.php


示例8: fn_rus_edost_install

function fn_rus_edost_install()
{
    $services = fn_get_schema('edost', 'services', 'php', true);
    foreach ($services as $service) {
        $service_id = db_query('INSERT INTO ?:shipping_services ?e', $service);
        $service['service_id'] = $service_id;
        foreach (Languages::getAll() as $service['lang_code'] => $lang_data) {
            db_query('INSERT INTO ?:shipping_service_descriptions ?e', $service);
        }
    }
}
开发者ID:ambient-lounge,项目名称:site,代码行数:11,代码来源:func.php


示例9: sanitizeObjectData

 /**
  * Performs securing object data basing on rule list related to object type. Rule list is specified at schema file.
  * Note that this function checks setting about whether HTML should be sanitized or not.
  * If no, field rule "ACTION_SANITIZE_HTML" will be omitted and no modifications to field data will be made.
  *
  * @param string $object_type Object type specified at schema file
  * @param array  &$object_data Array with object data passed by reference
  *
  * @return void
  */
 public static function sanitizeObjectData($object_type, array &$object_data)
 {
     $schema = fn_get_schema('security', 'object_sanitization');
     $auth =& \Tygh::$app['session']['auth'];
     if (isset($schema[$object_type][self::SCHEMA_SECTION_FIELD_RULES])) {
         $object_data = self::sanitizeData($object_data, $schema[$object_type][self::SCHEMA_SECTION_FIELD_RULES], self::shouldSanitizeUserHtml() ? array() : array(self::ACTION_SANITIZE_HTML), $changed);
         if ($changed && self::shouldSanitizeUserHtml() && $auth['area'] == 'A') {
             fn_set_notification('N', __('notice'), __('text_entered_html_was_sanitized'), 'K');
         }
     }
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:21,代码来源:SecurityHelper.php


示例10: fn_settings_variants_addons_price_list_price_list_sorting

function fn_settings_variants_addons_price_list_price_list_sorting()
{
    $schema = fn_get_schema('price_list', 'schema');
    if (!empty($schema['fields'])) {
        foreach ($schema['fields'] as $field => $field_info) {
            if (!empty($field_info['sort_by'])) {
                $fields[$field] = $field_info['title'];
            }
        }
    }
    return $fields;
}
开发者ID:askzap,项目名称:ultimate,代码行数:12,代码来源:func.php


示例11: 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


示例12: fn_import_yml2_option

function fn_import_yml2_option($yml_option_type)
{
    static $options_type_codes = null;
    if (!isset($options_type_codes)) {
        $options_type = fn_get_schema('yml', 'options_type');
        foreach ($options_type as $type_code => $type_data) {
            $options_type_codes[$type_data['value']] = $type_code;
        }
    }
    $option_type_code = false;
    if (isset($options_type_codes[$yml_option_type])) {
        $option_type_code = $options_type_codes[$yml_option_type];
    }
    return $option_type_code;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:15,代码来源:product_yml_options.functions.php


示例13: fn_price_list_info

function fn_price_list_info()
{
    $schema = fn_get_schema('price_list', 'schema');
    if (empty($schema)) {
        // workaround to avoid notices when installing addon
        return;
    }
    $storefront_url = fn_get_storefront_url(fn_get_storefront_protocol());
    if (fn_allowed_for('ULTIMATE')) {
        if (Registry::get('runtime.company_id') || Registry::get('runtime.simple_ultimate')) {
        } else {
            $storefront_url = '';
        }
    }
    if (!empty($storefront_url)) {
        return __('price_list.text_regenerate', array('[buttons]' => fn_price_list_generate_buttons($schema), '[links]' => fn_price_list_generate_links($schema, $storefront_url)));
    } else {
        return __('price_list.text_select_storefront');
    }
}
开发者ID:ambient-lounge,项目名称:site,代码行数:20,代码来源:func.php


示例14: fn_search_get_customer_objects

function fn_search_get_customer_objects()
{
    $schema = fn_get_schema('search', 'schema');
    $data = array();
    $objects = Registry::get('settings.General.search_objects');
    fn_set_hook('customer_search_objects', $schema, $objects);
    if (AREA == 'A') {
        $objects['orders'] = 'Y';
        $objects['users'] = 'Y';
        $objects['pages'] = 'Y';
    }
    foreach ($schema as $object => $object_data) {
        if (!empty($object_data['default']) && $object_data['default'] == true) {
            continue;
        }
        if (!empty($objects[$object]) && $objects[$object] == 'Y') {
            $data[$object] = $object_data['title'];
        }
    }
    return $data;
}
开发者ID:arpad9,项目名称:bygmarket,代码行数:21,代码来源:fn.search.php


示例15: _getDestinationCode

 /**
  * Gets numeric representation of Country/Region/City
  *
  * @param  array $destination Country, Region, City of geographic place
  * @return int   Numeric representation
  */
 private function _getDestinationCode($destination)
 {
     $cities = fn_get_schema('edost', 'cities');
     $regions = fn_get_schema('edost', 'regions');
     $countries = fn_get_schema('edost', 'countries');
     $origination = $this->_shipping_info['package_info']['origination']['country'];
     $result = '';
     if ($destination['country'] != 'RU' || $origination != 'RU') {
         $result = !empty($countries[$destination['country']]) ? $countries[$destination['country']] : '';
     } else {
         if (Registry::get('addons.rus_cities.status') == 'A') {
             if (preg_match('/^[a-zA-Z]+$/', $destination['city'])) {
                 $lang_code = 'en';
             } else {
                 $lang_code = 'ru';
             }
             $condition = db_quote(" d.lang_code = ?s AND d.city = ?s AND c.status = ?s", $lang_code, $destination['city'], 'A');
             if (!empty($destination['state'])) {
                 $condition .= db_quote(" AND c.state_code = ?s", $destination['state']);
             }
             if (!empty($destination['country'])) {
                 $condition .= db_quote(" AND c.country_code = ?s", $destination['country']);
             }
             $result = db_get_field("SELECT c.city_code FROM ?:rus_city_descriptions as d LEFT JOIN ?:rus_cities as c ON c.city_id = d.city_id WHERE ?p", $condition);
         }
         if (empty($result)) {
             $result = !empty($cities[$destination['city']]) ? $cities[$destination['city']] : '';
             if ($result == '') {
                 $alt_city = $destination['city'] . ' (' . fn_get_state_name($destination['state'], $destination['country'], 'RU') . ')';
                 if (!empty($cities[$alt_city])) {
                     $result = $cities[$alt_city];
                 }
             }
             if ($result == '') {
                 $result = !empty($regions[$destination['state']]) ? $regions[$destination['state']] : '';
             }
         }
     }
     return $result;
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:46,代码来源:Edost.php


示例16: generate

 /**
  * Generates menu items from scheme
  * @param  array $request request params
  * @return array menu items
  */
 public function generate($request)
 {
     $menu = fn_get_schema('menu', 'menu', 'php');
     $this->_request = $request;
     $actions = array();
     foreach ($menu as $group => &$menu_data) {
         // Get static section
         foreach ($menu_data as $root => &$items) {
             $items['items'] = $this->_processItems($items['items'], $root, '');
             if (empty($items['items'])) {
                 unset($menu[$group][$root]);
                 continue;
             }
         }
     }
     unset($items, $menu_data);
     $menu['top'] = $this->_sort($menu['top']);
     $menu['central'] = $this->_sort($menu['central']);
     $menu = $this->_getSettingsSections($menu);
     fn_preload_lang_vars($this->_lang_cache);
     return array($menu, $actions, $this->_selected);
 }
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:27,代码来源:BackendMenu.php


示例17: fn_promotion_get_schema

/**
 * Get promotion schema
 *
 * @param string $type schema type (conditions, bonuses)
 * @return array schema of definite type
 */
function fn_promotion_get_schema($type = '')
{
    static $schema = array();
    if (empty($schema)) {
        $schema = fn_get_schema('promotions', 'schema');
    }
    return !empty($type) ? $schema[$type] : $schema;
}
开发者ID:askzap,项目名称:ultimate,代码行数:14,代码来源:fn.promotions.php


示例18: fn_get_company_condition

/**
 * Gets part of SQL-query with codition for company_id field.
 *
 * @staticvar array $sharing_schema Local static cache for sharing schema
 * @param string $db_field Field name (usually table_name.company_id)
 * @param bool $add_and Include or not AND keyword berofe condition.
 * @param mixed $company_id Company ID for using in SQL condition.
 * @param bool $show_admin Include or not company_id == 0 in condition (used in the MultiVendor Edition)
 * @param bool $force_condition_for_area_c Used in the MultiVendor Edition. By default, SQL codition should be empty in the customer area. But in some cases,
 * this condition should be enabled in the customer area. If <i>$force_condition_for_area_c</i> is set, condtion will be formed for the customer area.
 * @return string Part of SQL query with company ID condition
 */
function fn_get_company_condition($db_field = 'company_id', $add_and = true, $company_id = '', $show_admin = false, $force_condition_for_area_c = false)
{
    if (fn_allowed_for('ULTIMATE')) {
        // Completely remove company condition for sharing objects
        static $sharing_schema;
        if (empty($sharing_schema) && Registry::get('addons_initiated') === true) {
            $sharing_schema = fn_get_schema('sharing', 'schema');
        }
        // Check if table was passed
        if (strpos($db_field, '.')) {
            list($table, $field) = explode('.', $db_field);
            $table = str_replace('?:', '', $table);
            // Check if the db_field table is in the schema
            if (isset($sharing_schema[$table])) {
                return '';
            }
        } else {
            return '';
        }
        if (Registry::get('runtime.company_id') && !$company_id) {
            $company_id = Registry::get('runtime.company_id');
        }
    }
    if ($company_id === '') {
        $company_id = Registry::ifGet('runtime.company_id', '');
    }
    $skip_cond = AREA == 'C' && !$force_condition_for_area_c && !fn_allowed_for('ULTIMATE');
    if (!$company_id || $skip_cond) {
        $cond = '';
    } else {
        $cond = $add_and ? ' AND' : '';
        // FIXME 2tl show admin
        if ($show_admin && $company_id) {
            $cond .= " {$db_field} IN (0, {$company_id})";
        } else {
            $cond .= " {$db_field} = {$company_id}";
        }
    }
    return $cond;
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:52,代码来源:fn.companies.php


示例19: registerBlockCacheIfNeeded

 /**
  * Registers block cache
  *
  * @param string $cache_name   Cache name
  * @param array  $block_schema Block schema data
  * @param array  $block_data   Block data from DB
  *
  * @return bool Whether cache have been registered or not
  */
 public static function registerBlockCacheIfNeeded($cache_name, $block_schema, $block_data)
 {
     // @TODO: remove Registry calls and use RenderManager::$_location instead. This method should be non-static.
     $dispatch = Registry::get('runtime.controller') . '.' . Registry::get('runtime.mode');
     // Use parameters for current dispatch with fallback to common params
     if (!empty($block_schema['cache_overrides_by_dispatch'][$dispatch])) {
         $cache_params = $block_schema['cache_overrides_by_dispatch'][$dispatch];
     } elseif (!empty($block_schema['cache'])) {
         $cache_params = $block_schema['cache'];
     } else {
         return false;
     }
     $cookie_data = fn_get_session_data();
     $cookie_data['all'] = $cookie_data;
     $callable_handlers_variables = compact('block_schema', 'block_data');
     $disable_cache = false;
     // Check conditions that disable block caching
     if (!empty($cache_params['disable_cache_when'])) {
         $disable_cache |= self::findHandlerParamsAtData($cache_params['disable_cache_when'], 'request_handlers', $_REQUEST);
         $disable_cache |= self::findHandlerParamsAtData($cache_params['disable_cache_when'], 'session_handlers', $_SESSION);
         $disable_cache |= self::findHandlerParamsAtData($cache_params['disable_cache_when'], 'cookie_handlers', $cookie_data);
         $disable_cache |= self::findHandlerParamsAtData($cache_params['disable_cache_when'], 'auth_handlers', $_SESSION['auth']);
         // Disable cache if any of callable handlers returns true
         if (!empty($cache_params['disable_cache_when']['callable_handlers'])) {
             self::execCallableHandlers(function ($handler_name, $handler_result) use(&$disable_cache) {
                 $disable_cache |= $handler_result;
             }, (array) $cache_params['disable_cache_when']['callable_handlers'], $callable_handlers_variables);
         }
     }
     if ($disable_cache) {
         return false;
     }
     // Generate suffix to cache key using dependencies specified at schema
     $cache_key_suffix = '';
     $generate_additional_level = function ($param_name, $param_value) use(&$cache_key_suffix) {
         $cache_key_suffix .= '|' . $param_name . '=' . md5(serialize($param_value));
     };
     self::findHandlerParamsAtData($cache_params, 'request_handlers', $_REQUEST, $generate_additional_level);
     self::findHandlerParamsAtData($cache_params, 'session_handlers', $_SESSION, $generate_additional_level);
     self::findHandlerParamsAtData($cache_params, 'cookie_handlers', $cookie_data, $generate_additional_level);
     self::findHandlerParamsAtData($cache_params, 'auth_handlers', $_SESSION['auth'], $generate_additional_level);
     if (!empty($cache_params['callable_handlers'])) {
         self::execCallableHandlers($generate_additional_level, (array) $cache_params['callable_handlers'], $callable_handlers_variables);
     }
     $cache_key_suffix .= '|path=' . Registry::get('config.current_path');
     $cache_key_suffix .= Embedded::isEnabled() ? '|embedded' : '';
     $cache_key_suffix = empty($cache_key_suffix) ? '' : md5($cache_key_suffix);
     $default_update_handlers = fn_get_schema('block_manager', 'block_cache_properties');
     if (isset($cache_params['update_handlers']) && is_array($cache_params['update_handlers'])) {
         $handlers = array_merge($cache_params['update_handlers'], $default_update_handlers['update_handlers']);
     } else {
         $handlers = $default_update_handlers['update_handlers'];
     }
     $cache_level = isset($cache_params['cache_level']) ? $cache_params['cache_level'] : Registry::cacheLevel('html_blocks');
     Registry::registerCache($cache_name, $handlers, $cache_level . '__' . $cache_key_suffix);
     // Check conditions that trigger block cache regeneration
     $regenerate_cache = false;
     if (!empty($cache_params['regenerate_cache_when'])) {
         $regenerate_cache |= self::findHandlerParamsAtData($cache_params['regenerate_cache_when'], 'request_handlers', $_REQUEST);
         $regenerate_cache |= self::findHandlerParamsAtData($cache_params['regenerate_cache_when'], 'session_handlers', $_SESSION);
         $regenerate_cache |= self::findHandlerParamsAtData($cache_params['regenerate_cache_when'], 'cookie_handlers', $cookie_data);
         $regenerate_cache |= self::findHandlerParamsAtData($cache_params['regenerate_cache_when'], 'auth_handlers', $_SESSION['auth']);
         // Regenerate cache if any of callable handlers returns true
         if (!empty($cache_params['regenerate_cache_when']['callable_handlers'])) {
             self::execCallableHandlers(function ($handler_name, $handler_result) use(&$regenerate_cache) {
                 $regenerate_cache |= $handler_result;
             }, (array) $cache_params['regenerate_cache_when']['callable_handlers'], $callable_handlers_variables);
         }
     }
     if ($regenerate_cache) {
         Registry::del($cache_name);
     }
     return true;
 }
开发者ID:arpad9,项目名称:bygmarket,代码行数:83,代码来源:RenderManager.php


示例20: fn_get_simple_countries

        Tygh::$app['view']->assign('company_id', $company_id);
        Tygh::$app['view']->assign('company_name', $company_data['company']);
        Tygh::$app['view']->assign('companies', $companies);
        Tygh::$app['view']->assign('search', $search);
        Tygh::$app['view']->assign('countries', fn_get_simple_countries(true, CART_LANGUAGE));
        Tygh::$app['view']->assign('states', fn_get_all_states());
    } elseif ($mode == 'balance') {
        list($payouts, $search, $total) = fn_companies_get_payouts($_REQUEST, Registry::get('settings.Appearance.admin_elements_per_page'));
        Tygh::$app['view']->assign('payouts', $payouts);
        Tygh::$app['view']->assign('search', $search);
        Tygh::$app['view']->assign('total', $total);
    }
}
if (fn_allowed_for('ULTIMATE')) {
    if ($mode == 'get_object_share') {
        $sharing_schema = fn_get_schema('sharing', 'schema');
        $view = Tygh::$app['view'];
        if (!empty($_REQUEST['object_id']) && !empty($_REQUEST['object'])) {
            $schema = $sharing_schema[$_REQUEST['object']];
            $view->assign('selected_companies', fn_ult_get_object_shared_companies($_REQUEST['object'], $_REQUEST['object_id']));
            $owner = db_get_row('SELECT * FROM ?:' . $schema['table']['name'] . ' WHERE ' . $schema['table']['key_field'] . ' = ?s', $_REQUEST['object_id']);
            $owner_id = isset($owner['company_id']) ? $owner['company_id'] : '';
            $view->assign('result_ids', $_REQUEST['result_ids']);
            $view->assign('object_id', $_REQUEST['object_id']);
            $view->assign('owner_id', $owner_id);
            $view->assign('object', $_REQUEST['object']);
            $view->assign('schema', $schema);
            if (!empty($schema['no_item_text'])) {
                $view->assign('no_item_text', __($schema['no_item_text']));
            }
            $view->display('views/companies/components/share_object.tpl');
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:companies.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP fn_get_selected_product_options_info函数代码示例发布时间:2022-05-15
下一篇:
PHP fn_get_rel_dir函数代码示例发布时间: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