本文整理汇总了PHP中fn_allowed_for函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_allowed_for函数的具体用法?PHP fn_allowed_for怎么用?PHP fn_allowed_for使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fn_allowed_for函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: fn_api_auth_routines
function fn_api_auth_routines($request, $auth)
{
$status = true;
$user_login = !empty($request['user_login']) ? trim($request['user_login']) : '';
$password = !empty($request['password']) ? $request['password'] : '';
$field = 'email';
$condition = '';
if (fn_allowed_for('ULTIMATE')) {
if (Registry::get('settings.Stores.share_users') == 'N' && AREA != 'A') {
$condition = fn_get_company_condition('?:users.company_id');
}
}
$user_data = db_get_row("SELECT * FROM ?:users WHERE {$field} = ?s" . $condition, $user_login);
if (empty($user_data)) {
$user_data = db_get_row("SELECT * FROM ?:users WHERE {$field} = ?s AND user_type IN ('A', 'V', 'P')", $user_login);
}
if (!empty($user_data)) {
$user_data['usergroups'] = fn_get_user_usergroups($user_data['user_id']);
}
if (!empty($user_data['status']) && $user_data['status'] == 'D') {
fn_set_notification('E', __('error'), __('error_account_disabled'));
$status = false;
}
$salt = isset($user_data['salt']) ? $user_data['salt'] : '';
return array($status, $user_data, $user_login, $password, $salt);
}
开发者ID:drahosistvan,项目名称:cscart-api-auth,代码行数:26,代码来源:func.php
示例2: content_55ccecdc1c5410_56810922
function content_55ccecdc1c5410_56810922($_smarty_tpl)
{
fn_preload_lang_vars(array('comments_and_reviews', 'discussion_title_product'));
if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && fn_allowed_for("ULTIMATE") || fn_allowed_for("MULTIVENDOR")) {
?>
<?php
echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("comments_and_reviews"), 'target' => "#discussion_product_setting"), 0);
?>
<div id="discussion_product_setting" class="in collapse">
<fieldset>
<?php
$_smarty_tpl->tpl_vars['no_hide_input'] = new Smarty_variable(false, null, 0);
?>
<?php
if (fn_allowed_for("ULTIMATE")) {
?>
<?php
$_smarty_tpl->tpl_vars['no_hide_input'] = new Smarty_variable(true, null, 0);
?>
<?php
}
?>
<?php
echo $_smarty_tpl->getSubTemplate("addons/discussion/views/discussion_manager/components/allow_discussion.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('prefix' => "product_data", 'object_id' => $_smarty_tpl->tpl_vars['product_data']->value['product_id'], 'object_type' => "P", 'title' => __("discussion_title_product"), 'no_hide_input' => $_smarty_tpl->tpl_vars['no_hide_input']->value), 0);
?>
</fieldset>
</div>
<?php
}
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:33,代码来源:be8f093c8db2988ee1f4adf0a4b3297dbf6e8b75.tygh.detailed_content.post.tpl.php
示例3: fn_twg_exim_get_product_mobile_url
/**
* Gets mobile product url
*
* @param $product_id
* @param string $lang_code
* @return bool
*/
function fn_twg_exim_get_product_mobile_url($product_id, $lang_code = '')
{
$company_id = 0;
$company_url = '';
if (fn_allowed_for('ULTIMATE')) {
if (Registry::get('runtime.company_id')) {
$company_id = Registry::get('runtime.company_id');
} else {
$company_id = db_get_field('SELECT company_id FROM ?:products WHERE product_id = ?i', $product_id);
}
$company_url = '&company_id=' . $company_id;
} else {
$company_url = '';
}
$settings = TwigmoSettings::get('customer_connections.' . $company_id);
$use_twg = !empty($settings['access_id']) && ($settings['use_for_phones'] == 'Y' || $settings['use_for_tablets'] == 'Y');
if ($use_twg && fn_twg_use_https_for_customer($company_id)) {
$protocol = 'https';
} else {
$protocol = 'http';
}
$url = fn_url('products.view?product_id=' . $product_id . $company_url, 'C', $protocol, $lang_code);
fn_set_hook('exim_get_product_url', $url, $product_id, $options, $lang_code);
return $url;
}
开发者ID:askzap,项目名称:ultimate,代码行数:32,代码来源:products.functions.php
示例4: create
public function create($params)
{
$status = Response::STATUS_BAD_REQUEST;
$data = array();
$valid_params = true;
unset($params['category_id']);
if (empty($params['feature_type'])) {
$data['message'] = __('api_required_field', array('[field]' => 'feature_type'));
$valid_params = false;
}
if (empty($params['description'])) {
$data['message'] = __('api_required_field', array('[field]' => 'description'));
$valid_params = false;
}
if (fn_allowed_for('ULTIMATE')) {
if (empty($params['company_id']) && Registry::get('runtime.company_id') == 0) {
$data['message'] = __('api_need_store');
$valid_params = false;
}
}
if ($valid_params) {
$feature_id = fn_update_product_feature($params, 0);
if ($feature_id) {
$status = Response::STATUS_CREATED;
$data = array('feature_id' => $feature_id);
}
}
return array('status' => $status, 'data' => $data);
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:29,代码来源:Features.php
示例5: fn_google_analytics_get_tracking_code
/**
* Gets Google Analytics tracking code
*
* @param mixed $company_id Company identifier to get code for
* @return string Google Analytics tracking code
*/
function fn_google_analytics_get_tracking_code($company_id = null)
{
if (!fn_allowed_for('ULTIMATE')) {
$company_id = null;
}
return Settings::instance()->getValue('tracking_code', 'google_analytics', $company_id);
}
开发者ID:askzap,项目名称:ultimate,代码行数:13,代码来源:func.php
示例6: fn_exim_check_discount
/**
* The function checks if an entered percentage discount for the lower limit value equal to 1 to be greater than 0
*
* @param array $product_info Product information
* @param string $lang_code 2-letter language code
* @param bool $skip_record Skip or not current record
* @return bool false if the record should be skipped or the "lower_limit" value of the currect record
*/
function fn_exim_check_discount($product_info, $lang_code, $skip_record)
{
if (!isset($product_info['percentage_discount'])) {
$product_info['percentage_discount'] = 0;
}
if (!isset($product_info['lower_limit'])) {
$skip_record = true;
}
if (!fn_allowed_for('ULTIMATE:FREE')) {
if (!isset($product_info['usergroup_id'])) {
$skip_record = true;
}
$usergroup_id = fn_get_usergroup_id($product_info['usergroup_id'], $lang_code);
}
if ($product_info['lower_limit'] == 1 && $product_info['percentage_discount'] > 0) {
if (!fn_allowed_for('ULTIMATE:FREE')) {
if ($usergroup_id == 0) {
$skip_record = true;
}
}
if (fn_allowed_for('ULTIMATE:FREE')) {
$skip_record = true;
}
}
return $skip_record ? false : $product_info['lower_limit'];
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:34,代码来源:qty_discounts.functions.php
示例7: fn_get_data_feeds_company_condition
function fn_get_data_feeds_company_condition($field)
{
if (fn_allowed_for('ULTIMATE')) {
return fn_get_company_condition($field);
}
return '';
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:7,代码来源:func.php
示例8: fn_retargeting_get_domain_api_key
function fn_retargeting_get_domain_api_key($company_id = null)
{
if (!fn_allowed_for('ULTIMATE')) {
$company_id = null;
}
return Settings::instance()->getValue('retargeting_domain_api', 'google_analytics');
}
开发者ID:retargeting,项目名称:CsCart,代码行数:7,代码来源:func.php
示例9: fn_update_product_filter
function fn_update_product_filter($filter_data, $filter_id, $lang_code = DESCR_SL)
{
if (fn_allowed_for('ULTIMATE') && Registry::get('runtime.company_id')) {
if (!empty($filter_id) && !fn_check_company_id('product_filters', 'filter_id', $filter_id)) {
fn_company_access_denied_notification();
return false;
}
if (!empty($filter_id)) {
unset($filter_data['company_id']);
}
}
// Parse filter type
if (strpos($filter_data['filter_type'], 'FF-') === 0 || strpos($filter_data['filter_type'], 'RF-') === 0 || strpos($filter_data['filter_type'], 'DF-') === 0) {
$filter_data['feature_id'] = str_replace(array('RF-', 'FF-', 'DF-'), '', $filter_data['filter_type']);
$filter_data['feature_type'] = db_get_field("SELECT feature_type FROM ?:product_features WHERE feature_id = ?i", $filter_data['feature_id']);
} else {
$filter_data['field_type'] = str_replace(array('R-', 'B-'), '', $filter_data['filter_type']);
$filter_fields = fn_get_product_filter_fields();
}
if (!empty($filter_id)) {
db_query('UPDATE ?:product_filters SET ?u WHERE filter_id = ?i', $filter_data, $filter_id);
db_query('UPDATE ?:product_filter_descriptions SET ?u WHERE filter_id = ?i AND lang_code = ?s', $filter_data, $filter_id, $lang_code);
} else {
$filter_data['filter_id'] = $filter_id = db_query('INSERT INTO ?:product_filters ?e', $filter_data);
foreach (fn_get_translation_languages() as $filter_data['lang_code'] => $_d) {
db_query("INSERT INTO ?:product_filter_descriptions ?e", $filter_data);
}
}
fn_set_hook('update_product_filter', $filter_data, $filter_id, $lang_code);
return $filter_id;
}
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:product_filters.php
示例10: content_55ddd1046dc013_62905884
function content_55ddd1046dc013_62905884($_smarty_tpl)
{
if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && fn_allowed_for("ULTIMATE") || fn_allowed_for("MULTIVENDOR")) {
echo $_smarty_tpl->getSubTemplate("addons/seo/common/seo_name_field.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('object_data' => $_smarty_tpl->tpl_vars['category_data']->value, 'object_name' => "category_data", 'object_id' => $_smarty_tpl->tpl_vars['category_data']->value['category_id'], 'object_type' => "c"), 0);
?>
<?php
}
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:9,代码来源:35424ca15545d05ee5d64d9a9864634e116c5dc0.tygh.detailed_content.post.tpl.php
示例11: content_55ddd1047662f0_40149126
function content_55ddd1047662f0_40149126($_smarty_tpl)
{
if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && fn_allowed_for("ULTIMATE") || !fn_allowed_for("ULTIMATE")) {
echo $_smarty_tpl->getSubTemplate("addons/discussion/views/discussion_manager/components/discussion.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('object_company_id' => 0), 0);
?>
<?php
}
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:9,代码来源:6fbe643c85ba181e3b67384534dbe412b298eec6.tygh.tabs_content.post.tpl.php
示例12: content_55deab25405fb7_75452475
function content_55deab25405fb7_75452475($_smarty_tpl)
{
if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && fn_allowed_for("ULTIMATE") || fn_allowed_for("MULTIVENDOR")) {
echo $_smarty_tpl->getSubTemplate("addons/seo/common/seo_name_field.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('object_data' => $_smarty_tpl->tpl_vars['var']->value, 'object_name' => "feature_data[variants][" . (string) $_smarty_tpl->tpl_vars['num']->value . "]", 'hide_title' => true, 'object_id' => $_smarty_tpl->tpl_vars['var']->value['variant_id'], 'object_type' => "e"), 0);
?>
<?php
}
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:9,代码来源:4005f5f12d55d51d2e109638507278622d8979a6.tygh.extended_feature.post.tpl.php
示例13: fn_rus_unisender_update_profile
function fn_rus_unisender_update_profile($action, $user_data, $current_user_data)
{
if ($action == 'add') {
if (fn_allowed_for('MULTIVENDOR') || fn_allowed_for('ULTIMATE') && Registry::get('runtime.company_id')) {
$arr_id = array($user_data['user_id']);
fn_add_users_to_unisender($arr_id, false);
}
}
}
开发者ID:ambient-lounge,项目名称:site,代码行数:9,代码来源:func.php
示例14: content_55ccecdc585c28_55038452
function content_55ccecdc585c28_55038452($_smarty_tpl)
{
if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && fn_allowed_for("ULTIMATE") || fn_allowed_for("MULTIVENDOR")) {
echo $_smarty_tpl->getSubTemplate("addons/discussion/views/discussion_manager/components/discussion.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('object_company_id' => $_smarty_tpl->tpl_vars['product_data']->value['company_id']), 0);
?>
<?php
}
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:9,代码来源:c502ae7630f54240471c6475fdc9aa69a5bc8b6e.tygh.tabs_extra.post.tpl.php
示例15: content_55e352de43f7e3_67540535
function content_55e352de43f7e3_67540535($_smarty_tpl)
{
if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && fn_allowed_for("ULTIMATE") || fn_allowed_for("MULTIVENDOR")) {
echo $_smarty_tpl->getSubTemplate("addons/seo/common/seo_name_field.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('object_data' => $_smarty_tpl->tpl_vars['page_data']->value, 'object_name' => "page_data", 'object_id' => $_smarty_tpl->tpl_vars['page_data']->value['page_id'], 'object_type' => "a"), 0);
?>
<?php
}
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:9,代码来源:dfecb5e64052323e33e73efb7eb562fc2c71e24c.tygh.detailed_content.post.tpl.php
示例16: fn_banners_delete_company
/**
* Hook for deleting store banners
*
* @param int $company_id Company id
*/
function fn_banners_delete_company(&$company_id)
{
if (fn_allowed_for('ULTIMATE')) {
$bannser_ids = db_get_fields("SELECT banner_id FROM ?:banners WHERE company_id = ?i", $company_id);
foreach ($bannser_ids as $banner_id) {
fn_delete_banner_by_id($banner_id);
}
}
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:14,代码来源:func.php
示例17: content_55e61f9b350876_29772139
function content_55e61f9b350876_29772139($_smarty_tpl)
{
if ($_smarty_tpl->tpl_vars['view_uri']->value && $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && fn_allowed_for("ULTIMATE") || fn_allowed_for("MULTIVENDOR")) {
echo $_smarty_tpl->getSubTemplate("addons/seo/common/seo_name_field.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('object_data' => $_smarty_tpl->tpl_vars['product_data']->value, 'object_name' => "product_data", 'object_id' => $_smarty_tpl->tpl_vars['product_data']->value['product_id'], 'object_type' => "p", 'share_dont_hide' => true), 0);
?>
<?php
}
}
开发者ID:AlanIsrael0,项目名称:market,代码行数:9,代码来源:4dc6c7a8281fbbd71da27983f0460c95f0356e10.tygh.update_seo.pre.tpl.php
示例18: getExtraCondition
public function getExtraCondition($params)
{
$condition = [];
$table_name = $this->getTableName();
$company_id = 0;
if (fn_allowed_for('ULTIMATE') && ($company_id = Registry::get('runtime.company_id'))) {
$condition[] = db_quote("{$table_name}.company_id = ?i", $company_id);
}
return $condition;
}
开发者ID:vsguts,项目名称:cscart_models,代码行数:10,代码来源:PartnerExample.php
示例19: content_55e61f9b8a37e7_20520187
function content_55e61f9b8a37e7_20520187($_smarty_tpl)
{
if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && fn_allowed_for("ULTIMATE") || fn_allowed_for("MULTIVENDOR")) {
?>
<?php
echo $_smarty_tpl->getSubTemplate("addons/discussion/views/discussion_manager/components/new_discussion_popup.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('object_company_id' => $_smarty_tpl->tpl_vars['product_data']->value['company_id']), 0);
?>
<?php
}
}
开发者ID:AlanIsrael0,项目名称:market,代码行数:11,代码来源:442b09ff0bef453b29b2dbb4528374301bfaa270.tygh.tabs_extra.post.tpl.php
示例20: get
/**
* Gets cached SEO name
* @param string $name cached object (name or path)
* @param string $object_type object type
* @param mixed $object_id object_id/dispatch
* @param integer $company_id company ID
* @param string $lang_code language code
* @param string $area current working area
* @return string cached name
*/
public static function get($name, $object_type, $object_id, $company_id, $lang_code, $area = AREA)
{
if (fn_allowed_for('MULTIVENDOR')) {
$company_id = 0;
}
$key = $lang_code . '_' . $object_id . '_' . $object_type . '_' . $company_id;
if ($object_type == 's') {
return self::getStatic($key, $lang_code, $area);
}
return isset(self::$cache[$key][$name]) ? self::$cache[$key][$name] : null;
}
开发者ID:askzap,项目名称:ultimate,代码行数:21,代码来源:SeoCache.php
注:本文中的fn_allowed_for函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论