本文整理汇总了PHP中fn_get_company_condition函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_get_company_condition函数的具体用法?PHP fn_get_company_condition怎么用?PHP fn_get_company_condition使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fn_get_company_condition函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: fn_get_gift_certificate_company_condition
function fn_get_gift_certificate_company_condition($field)
{
if (fn_allowed_for('ULTIMATE')) {
return fn_get_company_condition($field);
}
return '';
}
开发者ID:arpad9,项目名称:bygmarket,代码行数:7,代码来源:func.php
示例2: 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
示例3: fn_get_google_sitemap_company_condition
function fn_get_google_sitemap_company_condition($field)
{
if (fn_allowed_for('ULTIMATE')) {
return fn_get_company_condition($field);
}
return '';
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:7,代码来源:func.php
示例4: 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
示例5: fn_get_discussion_company_condition
function fn_get_discussion_company_condition($field)
{
if (fn_allowed_for('ULTIMATE')) {
return fn_get_company_condition($field);
}
return '';
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:7,代码来源:func.php
示例6: fn_get_promotions
/**
* Get promotions
*
* @param array $params array with search params
* @param int $items_per_page
* @param string $lang_code
* @return array list of promotions in first element, filtered parameters in second
*/
function fn_get_promotions($params, $items_per_page = 0, $lang_code = CART_LANGUAGE)
{
// Init filter
$params = LastView::instance()->update('promotions', $params);
// Set default values to input params
$default_params = array('page' => 1, 'items_per_page' => $items_per_page, 'get_hidden' => true);
$params = array_merge($default_params, $params);
// Define fields that should be retrieved
$fields = array("?:promotions.*", "?:promotion_descriptions.name", "?:promotion_descriptions.detailed_description", "?:promotion_descriptions.short_description");
// Define sort fields
$sortings = array('name' => "?:promotion_descriptions.name", 'priority' => "?:promotions.priority", 'zone' => "?:promotions.zone", 'status' => "?:promotions.status");
$condition = $join = $group = '';
$condition .= fn_get_company_condition('?:promotions.company_id');
$statuses = array('A');
if (!empty($params['get_hidden'])) {
$statuses[] = 'H';
}
if (!empty($params['promotion_id'])) {
$condition .= db_quote(' AND ?:promotions.promotion_id IN (?n)', $params['promotion_id']);
}
if (!empty($params['active'])) {
$condition .= db_quote(" AND IF(from_date, from_date <= ?i, 1) AND IF(to_date, to_date >= ?i, 1) AND status IN (?a)", TIME, TIME, $statuses);
}
if (fn_allowed_for('ULTIMATE:FREE')) {
$params['zone'] = 'catalog';
}
if (!empty($params['zone'])) {
$condition .= db_quote(" AND ?:promotions.zone = ?s", $params['zone']);
}
if (!empty($params['coupon_code'])) {
$condition .= db_quote(" AND (CONCAT(LOWER(?:promotions.conditions_hash), ';') LIKE ?l OR CONCAT(LOWER(?:promotions.conditions_hash), ';') LIKE ?l)", "%coupon_code={$params['coupon_code']};%", "%auto_coupons={$params['coupon_code']};%");
}
if (!empty($params['coupons'])) {
$condition .= db_quote(" AND ?:promotions.conditions_hash LIKE ?l", "%coupon_code=%");
}
if (!empty($params['auto_coupons'])) {
$condition .= db_quote(" AND ?:promotions.conditions_hash LIKE ?l", "%auto_coupons=%");
}
$join .= db_quote(" LEFT JOIN ?:promotion_descriptions ON ?:promotion_descriptions.promotion_id = ?:promotions.promotion_id AND ?:promotion_descriptions.lang_code = ?s", $lang_code);
fn_set_hook('get_promotions', $params, $fields, $sortings, $condition, $join);
$sorting = db_sort($params, $sortings, 'name', 'desc');
$limit = '';
if (!empty($params['items_per_page'])) {
$params['total_items'] = db_get_field("SELECT COUNT(*) FROM ?:promotions {$join} WHERE 1 {$condition} {$group}");
$limit = db_paginate($params['page'], $params['items_per_page'], $params['total_items']);
}
if (!empty($params['simple'])) {
return db_get_hash_single_array("SELECT ?:promotions.promotion_id, ?:promotion_descriptions.name FROM ?:promotions {$join} WHERE 1 {$condition} {$group} {$sorting} {$limit}", array('promotion_id', 'name'));
} else {
$promotions = db_get_hash_array('SELECT ' . implode(', ', $fields) . " FROM ?:promotions {$join} WHERE 1 {$condition} {$group} {$sorting} {$limit}", 'promotion_id');
}
if (!empty($params['expand'])) {
foreach ($promotions as $k => $v) {
$promotions[$k]['conditions'] = !empty($v['conditions']) ? unserialize($v['conditions']) : array();
$promotions[$k]['bonuses'] = !empty($v['bonuses']) ? unserialize($v['bonuses']) : array();
}
}
return array($promotions, $params);
}
开发者ID:askzap,项目名称:ultimate,代码行数:67,代码来源:fn.promotions.php
示例7: getCompanyCondition
public function getCompanyCondition($db_field)
{
$company_id = $this->_company_id;
if (!$this->_company_id) {
$company_id = '';
}
return fn_get_company_condition($db_field, true, $company_id);
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:8,代码来源:CompanySingleton.php
示例8: getList
/**
* Return list of product menus
* @static
* @param string $condition SQL condition
* @param string $lang_code
* @return array List of product menus sorted by position by menu_id
*/
public static function getList($condition = '', $lang_code = CART_LANGUAGE)
{
/**
* Prepare params for sql query before get menus list
* @param string $lang_code
*/
fn_set_hook('get_menus_pre', $join, $condition, $lang_code);
$menus = db_get_hash_array("SELECT * FROM ?:menus " . "LEFT JOIN ?:menus_descriptions " . "ON ?:menus.menu_id = ?:menus_descriptions.menu_id " . "?p " . "WHERE ?:menus_descriptions.lang_code = ?s ?p ?p", 'menu_id', $join, $lang_code, fn_get_company_condition('?:menus.company_id'), $condition);
/**
* Process menus list after sql query
* @param array $menus Array of menus data
* @param string $lang_code
*/
fn_set_hook('get_menus_post', $menus, $lang_code);
return $menus;
}
开发者ID:askzap,项目名称:ultimate,代码行数:23,代码来源:Menu.php
示例9: fn_get_seo_company_condition
function fn_get_seo_company_condition($field, $object_type = '', $company_id = null)
{
$condition = '';
if (fn_allowed_for('ULTIMATE')) {
if ($company_id == null && Registry::get('runtime.company_id')) {
$company_id = Registry::get('runtime.company_id');
}
// Disable companies in for shared objects
if (!empty($object_type)) {
if (fn_get_seo_vars($object_type, 'not_shared')) {
$condition = fn_get_company_condition($field, true, $company_id, true);
}
} else {
$condition = fn_get_company_condition($field, false, $company_id);
$condition = !empty($condition) ? " AND ({$condition} OR {$field} = 0)" : '';
}
}
return $condition;
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:19,代码来源:func.php
示例10: fn_lv_get_product_default_navigation
/**
* Gets products default navigation
*
* @param array $params Request params
* @return array navigation data
*/
function fn_lv_get_product_default_navigation($params)
{
if (empty($params['product_id'])) {
return false;
}
$update_data = array();
$product_id = $params['product_id'];
if (fn_allowed_for('ULTIMATE') && Registry::get('runtime.company_id')) {
$company_condition = fn_get_company_condition('c.company_id');
$category_id = db_get_field("SELECT c.category_id, IF(pc.link_type = ?s, 1, 0) as is_main FROM ?:categories AS c LEFT JOIN ?:products_categories AS pc ON c.category_id = pc.category_id WHERE pc.product_id = ?i {$company_condition} ORDER BY is_main DESC", 'M', $product_id);
} else {
$category_id = db_get_field("SELECT category_id FROM ?:products_categories WHERE product_id = ?i AND link_type = ?s", $product_id, 'M');
}
if (empty($category_id)) {
return false;
}
$search_params = array('cid' => $category_id, 'get_conditions' => true);
list($fields, $join, $condition) = fn_get_products($search_params);
$sorting = "ORDER BY descr1.product asc";
// get product position in full list
db_query("SET @r = 0;");
$product_position = db_get_field("SELECT a.row FROM (SELECT products.product_id, @r := @r + 1 as row FROM ?:products as products {$join} WHERE 1 {$condition} GROUP BY products.product_id {$sorting}) AS a WHERE a.product_id = ?i", $product_id);
$items_per_page = Registry::get('settings.Appearance.products_per_page');
if (empty($product_position) || empty($items_per_page)) {
return false;
}
$page = ceil($product_position / $items_per_page);
$limit = db_paginate($page, $items_per_page);
$stored_items_ids[$page] = db_get_fields("SELECT SQL_CALC_FOUND_ROWS products.product_id FROM ?:products as products {$join} WHERE 1 {$condition} GROUP BY products.product_id {$sorting} {$limit}");
$total_items = db_get_found_rows();
$total_pages = ceil($total_items / $items_per_page);
unset($search_params['get_conditions']);
$update_data['params'] = serialize($search_params);
$update_data['view_results'] = array('items_ids' => $stored_items_ids, 'total_pages' => $total_pages, 'items_per_page' => $items_per_page, 'total_items' => $total_items);
$update_data['view_results'] = serialize($update_data['view_results']);
return $update_data;
}
开发者ID:askzap,项目名称:ultimate,代码行数:43,代码来源:frontend.functions.php
示例11: fn_get_promotions
/**
* Get promotions
*
* @param array $params array with search params
* @param int $items_per_page
* @param string $lang_code
* @return array list of promotions in first element, filtered parameters in second
*/
function fn_get_promotions($params, $items_per_page = 0, $lang_code = CART_LANGUAGE)
{
// Init filter
$params = fn_init_view('promotions', $params);
// Set default values to input params
$params['page'] = empty($params['page']) ? 1 : $params['page'];
// default page is 1
$params['get_hidden'] = !isset($params['get_hidden']) ? true : $params['get_hidden'];
// always get hidden promotions
// Define fields that should be retrieved
$fields = array("?:promotions.*", "?:promotion_descriptions.name", "?:promotion_descriptions.detailed_description", "?:promotion_descriptions.short_description");
// Define sort fields
$sortings = array('name' => "?:promotion_descriptions.name", 'priority' => "?:promotions.priority", 'zone' => "?:promotions.zone", 'status' => "?:promotions.status");
$directions = array('asc' => 'asc', 'desc' => 'desc');
if (empty($params['sort_order']) || empty($directions[$params['sort_order']])) {
$params['sort_order'] = 'desc';
}
if (empty($params['sort_by']) || empty($sortings[$params['sort_by']])) {
$params['sort_by'] = 'name';
}
$sorting = (is_array($sortings[$params['sort_by']]) ? implode(' ' . $directions[$params['sort_order']] . ', ', $sortings[$params['sort_by']]) : $sortings[$params['sort_by']]) . " " . $directions[$params['sort_order']];
// Reverse sorting (for usage in view)
$params['sort_order'] = $params['sort_order'] == 'asc' ? 'desc' : 'asc';
$condition = $join = $group = '';
$condition .= fn_get_company_condition('?:promotions.company_id');
$statuses = array('A');
if (!empty($params['get_hidden'])) {
$statuses[] = 'H';
}
if (!empty($params['promotion_id'])) {
$condition .= db_quote(' AND ?:promotions.promotion_id IN (?n)', $params['promotion_id']);
}
if (!empty($params['active'])) {
$condition .= db_quote(" AND IF(from_date, from_date <= ?i, 1) AND IF(to_date, to_date >= ?i, 1) AND status IN (?a)", TIME, TIME, $statuses);
}
if (!empty($params['zone'])) {
$condition .= db_quote(" AND ?:promotions.zone = ?s", $params['zone']);
}
if (!empty($params['coupon_code'])) {
$condition .= db_quote(" AND ?:promotions.conditions_hash LIKE ?l", "%{$params['coupon_code']}%");
// FIXME, more smart rules
}
if (!empty($params['coupons'])) {
$condition .= db_quote(" AND ?:promotions.conditions_hash LIKE ?l", "%coupon_code=%");
// FIXME
}
if (!empty($params['auto_coupons'])) {
$condition .= db_quote(" AND ?:promotions.conditions_hash LIKE ?l", "%auto_coupons=%");
}
$join .= db_quote(" LEFT JOIN ?:promotion_descriptions ON ?:promotion_descriptions.promotion_id = ?:promotions.promotion_id AND ?:promotion_descriptions.lang_code = ?s", $lang_code);
fn_set_hook('get_promotions', $params, $fields, $sortings, $condition, $join);
$limit = '';
if (!empty($items_per_page)) {
$total = db_get_field("SELECT COUNT(*) FROM ?:promotions {$join} WHERE 1 {$condition} {$group}");
$limit = fn_paginate($params['page'], $total, $items_per_page);
}
if (!empty($params['simple'])) {
return db_get_hash_single_array("SELECT ?:promotions.promotion_id, ?:promotion_descriptions.name FROM ?:promotions {$join} WHERE 1 {$condition} {$group} ORDER BY {$sorting} {$limit}", array('promotion_id', 'name'));
} else {
$promotions = db_get_hash_array('SELECT ' . implode(', ', $fields) . " FROM ?:promotions {$join} WHERE 1 {$condition} {$group} ORDER BY {$sorting} {$limit}", 'promotion_id');
}
if (!empty($params['expand'])) {
foreach ($promotions as $k => $v) {
$promotions[$k]['conditions'] = !empty($v['conditions']) ? unserialize($v['conditions']) : array();
$promotions[$k]['bonuses'] = !empty($v['bonuses']) ? unserialize($v['bonuses']) : array();
}
}
return array($promotions, $params);
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:77,代码来源:fn.promotions.php
示例12: fn_get_ult_company_condition
function fn_get_ult_company_condition($db_field = 'company_id', $and = true, $company_id = '', $show_admin = false, $area_c = false)
{
return fn_allowed_for('ULTIMATE') ? fn_get_company_condition($db_field, $and, $company_id, $show_admin, $area_c) : '';
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:4,代码来源:fn.companies.php
示例13: fn_add_breadcrumb
fn_add_breadcrumb(__('catalog'));
$root_categories = fn_get_subcategories(0);
foreach ($root_categories as $k => $v) {
$root_categories[$k]['main_pair'] = fn_get_image_pairs($v['category_id'], 'category', 'M');
}
Tygh::$app['view']->assign('root_categories', $root_categories);
} elseif ($mode == 'view') {
$_statuses = array('A', 'H');
$_condition = fn_get_localizations_condition('localization', true);
$preview = fn_is_preview_action($auth, $_REQUEST);
if (!$preview) {
$_condition .= ' AND (' . fn_find_array_in_set($auth['usergroup_ids'], 'usergroup_ids', true) . ')';
$_condition .= db_quote(' AND status IN (?a)', $_statuses);
}
if (fn_allowed_for('ULTIMATE')) {
$_condition .= fn_get_company_condition('?:categories.company_id');
}
$category_exists = db_get_field("SELECT category_id FROM ?:categories WHERE category_id = ?i ?p", $_REQUEST['category_id'], $_condition);
if (!empty($category_exists)) {
// Save current url to session for 'Continue shopping' button
$_SESSION['continue_url'] = "categories.view?category_id={$_REQUEST['category_id']}";
// Save current category id to session
$_SESSION['current_category_id'] = $_SESSION['breadcrumb_category_id'] = $_REQUEST['category_id'];
// Get subcategories list for current category
Tygh::$app['view']->assign('subcategories', fn_get_subcategories($_REQUEST['category_id']));
// Get full data for current category
$category_data = fn_get_category_data($_REQUEST['category_id'], CART_LANGUAGE, '*', true, false, $preview);
$category_parent_ids = fn_explode('/', $category_data['id_path']);
array_pop($category_parent_ids);
if (!empty($category_data['meta_description']) || !empty($category_data['meta_keywords'])) {
Tygh::$app['view']->assign('meta_description', $category_data['meta_description']);
开发者ID:arpad9,项目名称:bygmarket,代码行数:31,代码来源:categories.php
示例14: db_quote
// Ajax content
if ($mode == 'get_suppliers_list') {
$params = $_REQUEST;
$condition = '';
$pattern = !empty($params['pattern']) ? $params['pattern'] : '';
$start = !empty($params['start']) ? $params['start'] : 0;
$limit = (!empty($params['limit']) ? $params['limit'] : 10) + 1;
if (AREA == 'C') {
$condition .= " AND ?:suppliers.status = 'A' ";
}
if (isset($params['exclude_supplier_id'])) {
$condition .= db_quote(" AND ?:suppliers.supplier_id != ?i", intval($params['exclude_supplier_id']));
}
if (isset($params['company_id']) || Registry::get('runtime.company_id')) {
$copmpany_id = isset($params['company_id']) ? intval($params['company_id']) : Registry::get('runtime.company_id');
$condition .= fn_get_company_condition("?:suppliers.company_id", true, $copmpany_id);
}
$suppliers = db_get_hash_array("SELECT ?:suppliers.supplier_id as value, ?:suppliers.name FROM ?:suppliers WHERE 1 ?p AND ?:suppliers.name LIKE ?l ORDER BY ?:suppliers.name LIMIT ?i, ?i", 'value', $condition, $pattern . '%', $start, $limit);
if (!$start) {
array_unshift($suppliers, array('value' => 0, 'name' => '-' . __('none') . '-'));
}
if (defined('AJAX_REQUEST') && sizeof($suppliers) < $limit) {
Tygh::$app['ajax']->assign('completed', true);
} else {
array_pop($suppliers);
}
Tygh::$app['view']->assign('objects', $suppliers);
Tygh::$app['view']->assign('id', $params['result_ids']);
Tygh::$app['view']->display('common/ajax_select_object.tpl');
exit;
}
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:suppliers.post.php
示例15: fn_attachments_check_permission
/**
* Checks permission to work with the attachment
*
* @param array $request Array of query parameters
* @return bool Permission to work with attachment
*/
function fn_attachments_check_permission($request)
{
/**
* Changes input parameters for attachment permission check
*
* @param array $request Array of query parameters
*/
fn_set_hook('attachments_check_permission_pre', $request);
$permission = false;
if (!empty($request['object_type']) && !empty($request['object_id'])) {
$table = "products";
$field = "product_id";
$condition = "AND {$field} = {$request['object_id']} " . fn_get_company_condition("?:{$table}.company_id");
/**
* Checks permission to work with the attachment
*
* @param array $request Array of query parameters
* @param string $table Table to perform check
* @param string $field SQL field to be selected in an SQL-query
* @param string $condition String containing SQL-query condition prepended with a logical operator (AND or OR)
*/
fn_set_hook('attachments_check_permission', $request, $table, $field, $condition);
$object_id = db_get_field("SELECT ?f FROM ?:?f WHERE 1 ?p", $field, $table, $condition);
if (!empty($object_id)) {
$permission = true;
}
}
/**
* Changes result of attachment permission check
*
* @param array $request Array of query parameters
*/
fn_set_hook('attachments_check_permission_post', $request, $permission);
return $permission;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:41,代码来源:func.php
示例16: fn_set_notification
}
}
}
}
if (!empty($updated_products)) {
fn_set_notification('N', __('notice'), __('options_have_been_applied_to_products'));
}
}
$suffix = ".apply";
}
if ($mode == 'update') {
fn_trusted_vars('option_data', 'regexp');
if (fn_allowed_for('MULTIVENDOR')) {
$option_data = array();
if (!empty($_REQUEST['option_id'])) {
$condition = fn_get_company_condition('?:product_options.company_id');
$option_data = db_get_row("SELECT * FROM ?:product_options WHERE option_id = ?i {$condition}", $_REQUEST['option_id']);
if (empty($option_data)) {
fn_set_notification('W', __('warning'), __('access_denied'));
return array(CONTROLLER_STATUS_REDIRECT, 'product_options.manage');
}
}
$_REQUEST['option_data'] = array_merge($option_data, $_REQUEST['option_data']);
fn_set_company_id($_REQUEST['option_data']);
}
$option_id = fn_update_product_option($_REQUEST['option_data'], $_REQUEST['option_id'], DESCR_SL);
if (!empty($_REQUEST['object']) && $_REQUEST['object'] == 'product') {
// FIXME (when assigning page and current url will be removed from ajax)
return array(CONTROLLER_STATUS_OK, $_SERVER['HTTP_REFERER'] . '&selected_section=options');
}
$suffix = ".manage";
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:31,代码来源:product_options.php
示例17: 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. *
****************************************************************************/
//
// $Id: attachments.php 10229 2010-07-27 14:21:39Z 2tl $
//
if (!defined('AREA')) {
die('Access denied');
}
if (defined('COMPANY_ID')) {
$permission = false;
if (!empty($_REQUEST['object_type']) && $_REQUEST['object_type'] == 'product' && !empty($_REQUEST['object_id'])) {
$product_id = db_get_field("SELECT product_id FROM ?:products WHERE product_id = ?i " . fn_get_company_condition(), $_REQUEST['object_id']);
if (!empty($product_id)) {
$permission = true;
}
}
if (!$permission) {
fn_set_notification('W', fn_get_lang_var('warning'), fn_get_lang_var('access_denied'));
if (defined('AJAX_REQUEST')) {
exit;
} else {
return array(CONTROLLER_STATUS_DENIED);
}
}
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
//
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:attachments.php
示例18: fn_get_sitemap_links
/**
* Get sitemap links
*
* @param int $section_id Section identifier
* @return array $links
*/
function fn_get_sitemap_links($section_id)
{
$links_fields = array('link_id', 'link_href', 'section_id', 'status', 'position', 'link_type', 'description', 'object as link');
$links_tables = array('?:sitemap_links');
$links_left_join = array(db_quote("?:common_descriptions ON ?:common_descriptions.object_id = ?:sitemap_links.link_id AND ?:common_descriptions.object_holder = 'sitemap_links' AND ?:common_descriptions.lang_code = ?s", DESCR_SL));
$links_condition = array(db_quote('section_id = ?i', $section_id));
$company_condition = fn_get_company_condition('?:sitemap_links.company_id', false);
if (!empty($company_condition)) {
$links_condition[] = $company_condition;
}
fn_set_hook('sitemap_get_links', $links_fields, $links_tables, $links_left_join, $links_condition);
$links = db_get_array('SELECT ' . implode(', ', $links_fields) . ' FROM ' . implode(', ', $links_tables) . ' LEFT JOIN ' . implode(', ', $links_left_join) . ' WHERE ' . implode(' AND ', $links_condition) . ' ORDER BY position, link');
return $links;
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:20,代码来源:fn.cms.php
示例19: fn_hybrid_auth_get_user_data
function fn_hybrid_auth_get_user_data($auth_data)
{
$condition = db_quote('?:hybrid_auth_users.identifier = ?s', $auth_data->identifier);
if (fn_allowed_for('ULTIMATE')) {
if (Registry::get('settings.Stores.share_users') == 'N' && AREA != 'A') {
$condition .= fn_get_company_condition('?:users.company_id');
}
}
$join = 'JOIN ?:hybrid_auth_users ON ?:hybrid_auth_users.user_id = ?:users.user_id';
return db_get_row("SELECT ?:users.user_id, password FROM ?:users ?p WHERE ?p", $join, $condition);
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:11,代码来源:func.php
示例20: fn_yml_get_price_lists
function fn_yml_get_price_lists($price_ids = array())
{
$condition = '';
if (!empty($price_ids)) {
$condition .= db_quote(" AND param_id IN (?a)", $price_ids);
}
$condition .= fn_get_company_condition('?:yml_param.company_id');
$price_lists = db_get_hash_array("SELECT param_id, param_key, param_data, status, company_id FROM ?:yml_param WHERE param_type = 'price_list' {$condition}", 'param_id');
foreach ($price_lists as $price_id => $price_data) {
$price_lists[$price_id]['param_data'] = unserialize($price_data['param_data']);
}
return $price_lists;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:13,代码来源:func.php
注:本文中的fn_get_company_condition函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论