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


PHP AgileSellerManager::get_entity_access方法代码示例

本文整理汇总了PHP中AgileSellerManager::get_entity_access方法的典型用法代码示例。如果您正苦于以下问题:PHP AgileSellerManager::get_entity_access方法的具体用法?PHP AgileSellerManager::get_entity_access怎么用?PHP AgileSellerManager::get_entity_access使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AgileSellerManager的用法示例。


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

示例1: addSqlAssociation

 public static function addSqlAssociation($table, $alias, $inner_join = true, $on = null, $force_not_default = false)
 {
     $sql = parent::addSqlAssociation($table, $alias, $inner_join, $on, $force_not_default);
     if (!Module::isInstalled('agilemultipleshop')) {
         return $sql;
     }
     $eaccess = AgileSellerManager::get_entity_access($table);
     if ($eaccess['owner_table_type'] == AgileSellerManager::OWNER_TABLE_UNKNOWN) {
         return $sql;
     }
     $xr_table = $eaccess['owner_xr_table'];
     $include_shared = '';
     if (!$eaccess['is_exclusive']) {
         $include_shared = ',0';
     }
     if (Shop::$id_shop_owner > 0) {
         $join = $inner_join ? 'INNER JOIN ' : 'LEFT JOIN ';
         if ($table == 'feature') {
             $join = 'LEFT JOIN ';
         }
         if ($eaccess['owner_table_type'] == AgileSellerManager::OWNER_TABLE_DEFINED) {
             $sql .= $join . _DB_PREFIX_ . $table . '_owner ' . $table . '_owner ON (' . $alias . '.id_' . $table . '=' . $table . '_owner.id_' . $table . ' AND IFNULL(' . $table . '_owner.id_owner,0) IN (' . Shop::$id_shop_owner . $include_shared . '))';
         } else {
             $sql .= $join . _DB_PREFIX_ . 'object_owner ' . $table . '_object_owner ON (' . $table . '_object_owner.entity=\'' . $table . '\' AND ' . $alias . '.id_' . $table . '= ' . $table . '_object_owner.id_object AND IFNULL(' . $table . '_object_owner.id_owner,0) IN (' . Shop::$id_shop_owner . $include_shared . '))';
         }
     }
     return $sql;
 }
开发者ID:evilscripts,项目名称:gy,代码行数:28,代码来源:Shop.php

示例2: getXRObjectID

 public static function getXRObjectID($table, $objid)
 {
     ${"GLOBALS"}["wvxhfsz"] = "xr_objid";
     $sxhuthfjzxd = "table";
     $klqcsqjco = "eaccess";
     $tddeevgtif = "xr_objid";
     ${${"GLOBALS"}["tcmttublc"]} = AgileSellerManager::get_entity_access(${$sxhuthfjzxd});
     ${${"GLOBALS"}["wvxhfsz"]} = intval(Tools::getValue("id_" . ${$klqcsqjco}["owner_xr_table"]));
     if (${$tddeevgtif} == 0) {
         $eekhmedqt = "table";
         $czzvtmvbqe = "xr_objid";
         ${"GLOBALS"}["cjaqbfsnkr"] = "sql";
         $nhazfhbzy = "table";
         $gqoaxc = "eaccess";
         $gymblt = "objid";
         ${${"GLOBALS"}["cjaqbfsnkr"]} = "SELECT id_" . ${$gqoaxc}["owner_xr_table"] . " FROM " . _DB_PREFIX_ . ${$nhazfhbzy} . " WHERE id_" . ${$eekhmedqt} . "=" . ${$gymblt};
         ${$czzvtmvbqe} = Db::getInstance()->getValue(${${"GLOBALS"}["iikyewhoyyrc"]});
     }
     return ${${"GLOBALS"}["xmoknveemxo"]};
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:20,代码来源:AgileSellerManager.php

示例3: assign_entity_owner

 private function assign_entity_owner()
 {
     global $cookie;
     if (!Module::isInstalled('agilemultipleseller')) {
         return true;
     }
     if (isset($_GET['status' . $this->table])) {
         return true;
     }
     $eaccess = AgileSellerManager::get_entity_access($this->table);
     if ($eaccess['owner_table_type'] == AgileSellerManager::OWNER_TABLE_UNKNOWN) {
         return true;
     }
     include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/agilemultipleseller.php";
     global $cookie;
     if (empty($eaccess['owner_xr_table'])) {
         $is_seller = $cookie->profile == (int) Configuration::get('AGILE_MS_PROFILE_ID');
         if ($is_seller and (Tools::getValue('controller') == 'AdminCarrierWizard' or isset($_GET['submitAdd' . $this->table]) or isset($_POST['submitAdd' . $this->table]) or isset($_POST['submitAdd' . $this->table . 'AndStay']) or isset($_POST['import']) and $_POST['import'] = 1 and isset($_POST['csv']))) {
             $id_seller = $cookie->id_employee;
         } elseif (isset($_POST['id_seller'])) {
             $id_seller = intval($_POST['id_seller']);
         } else {
             $id_seller = 0;
         }
         AgileSellerManager::assignObjectOwner($this->table, $this->id, $id_seller);
     }
     return true;
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:28,代码来源:ObjectModel.php

示例4: agilemultipleseller_list_override

 protected function agilemultipleseller_list_override()
 {
     global $cookie;
     if (!Module::isInstalled('agilemultipleseller')) {
         return;
     }
     $eaccess = AgileSellerManager::get_entity_access($this->table);
     if ($eaccess['owner_table_type'] == AgileSellerManager::OWNER_TABLE_UNKNOWN) {
         return;
     }
     if ($eaccess['owner_table_type'] == AgileSellerManager::OWNER_TABLE_DEFINED) {
         if (empty($eaccess['owner_xr_table'])) {
             $this->_join = $this->_join . '	LEFT JOIN `' . _DB_PREFIX_ . $this->table . '_owner` ao ON (a.`id_' . $this->table . '`=ao.`id_' . $this->table . '`)';
         } else {
             $this->_join = $this->_join . '	LEFT JOIN `' . _DB_PREFIX_ . $this->correct_table_name($eaccess['owner_xr_table']) . '`xr ON (a.`id_' . $eaccess['owner_xr_table'] . '`=xr.`id_' . $eaccess['owner_xr_table'] . '`)' . '	LEFT JOIN `' . _DB_PREFIX_ . $eaccess['owner_xr_table'] . '_owner` ao ON (xr.`id_' . $eaccess['owner_xr_table'] . '`=ao.`id_' . $eaccess['owner_xr_table'] . '`)';
         }
     } else {
         if (empty($eaccess['owner_xr_table'])) {
             $this->_join = $this->_join . '	LEFT JOIN `' . _DB_PREFIX_ . 'object_owner` ao ON (a.`id_' . $this->table . '`=ao.`id_object` AND `entity`=\'' . $this->table . '\')';
         } else {
             $this->_join = $this->_join . '	LEFT JOIN `' . _DB_PREFIX_ . $this->correct_table_name($eaccess['owner_xr_table']) . '`xr ON (a.`id_' . $eaccess['owner_xr_table'] . '`=xr.`id_' . $eaccess['owner_xr_table'] . '`)' . '	LEFT JOIN `' . _DB_PREFIX_ . 'object_owner` ao ON (xr.`id_' . $eaccess['owner_xr_table'] . '`=ao.`id_object` AND ao.`entity`= \'' . $eaccess['owner_xr_table'] . '\')';
         }
     }
     $this->_join = $this->_join . ' LEFT JOIN `' . _DB_PREFIX_ . 'sellerinfo` ams ON (ao.`id_owner` = ams.`id_seller`)';
     $this->_join = $this->_join . ' LEFT JOIN `' . _DB_PREFIX_ . 'sellerinfo_lang` amsl ON (ams.`id_sellerinfo` = amsl.`id_sellerinfo` AND amsl.id_lang=' . intval($cookie->id_lang) . ')';
     if ($this->is_seller) {
         $cond_for_shared = 'OR IFNULL(ao.id_owner,0)=0';
         if ($eaccess['is_exclusive']) {
             $cond_for_shared = '';
         }
         $this->_where = $this->_where . ' AND (IFNULL(ao.id_owner,0)=' . intval($cookie->id_employee) . ' ' . $cond_for_shared . ')';
     } else {
         $this->fields_list['seller'] = array('title' => $this->l('Seller'), 'width' => 90, 'filter_key' => 'amsl!company');
     }
 }
开发者ID:evilscripts,项目名称:gy,代码行数:35,代码来源:AdminController.php

示例5: getXRObjectID

 public static function getXRObjectID($table, $objid)
 {
     $qjtuntb = "eaccess";
     ${"GLOBALS"}["udhwfquxhsl"] = "xr_objid";
     $hkubickdw = "eaccess";
     ${$qjtuntb} = AgileSellerManager::get_entity_access(${${"GLOBALS"}["nezfvjcg"]});
     ${"GLOBALS"}["vkhmrz"] = "xr_objid";
     ${${"GLOBALS"}["vkhmrz"]} = intval(Tools::getValue("id_" . ${$hkubickdw}["owner_xr_table"]));
     if (${${"GLOBALS"}["udhwfquxhsl"]} == 0) {
         $yoihrfysgop = "sql";
         ${"GLOBALS"}["vjihywdcwl"] = "sql";
         ${"GLOBALS"}["uspxujlqtrl"] = "xr_objid";
         ${$yoihrfysgop} = "SELECT id_" . ${${"GLOBALS"}["kcjdsssurq"]}["owner_xr_table"] . " FROM " . _DB_PREFIX_ . ${${"GLOBALS"}["nezfvjcg"]} . " WHERE id_" . ${${"GLOBALS"}["nezfvjcg"]} . "=" . ${${"GLOBALS"}["ehlykwtwk"]};
         ${${"GLOBALS"}["uspxujlqtrl"]} = Db::getInstance()->getValue(${${"GLOBALS"}["vjihywdcwl"]});
     }
     return ${${"GLOBALS"}["prsdhmrd"]};
 }
开发者ID:evilscripts,项目名称:gy,代码行数:17,代码来源:AgileSellerManager.php

示例6: getXRObjectID

 public static function getXRObjectID($table, $objid)
 {
     ${"GLOBALS"}["gjsldcsuosv"] = "table";
     ${"GLOBALS"}["iexqirhvm"] = "xr_objid";
     ${"GLOBALS"}["dwyebyplbfs"] = "xr_objid";
     ${${"GLOBALS"}["hpfczl"]} = AgileSellerManager::get_entity_access(${${"GLOBALS"}["gjsldcsuosv"]});
     $cgygcjbu = "xr_objid";
     ${${"GLOBALS"}["iexqirhvm"]} = intval(Tools::getValue("id_" . ${${"GLOBALS"}["hpfczl"]}["owner_xr_table"]));
     if (${$cgygcjbu} == 0) {
         ${"GLOBALS"}["okuhkisnlh"] = "objid";
         $fnmuppw = "table";
         ${"GLOBALS"}["pgwxphopifrw"] = "eaccess";
         $bwkguxnzjd = "table";
         ${${"GLOBALS"}["qgysnkscmqt"]} = "SELECT id_" . ${${"GLOBALS"}["pgwxphopifrw"]}["owner_xr_table"] . " FROM " . _DB_PREFIX_ . ${$bwkguxnzjd} . " WHERE id_" . ${$fnmuppw} . "=" . ${${"GLOBALS"}["okuhkisnlh"]};
         ${${"GLOBALS"}["qekdagrd"]} = Db::getInstance()->getValue(${${"GLOBALS"}["qgysnkscmqt"]});
     }
     return ${${"GLOBALS"}["dwyebyplbfs"]};
 }
开发者ID:evilscripts,项目名称:gy,代码行数:18,代码来源:AgileSellerManager.php

示例7: getXRObjectID

 public static function getXRObjectID($table, $objid)
 {
     $eaccess = AgileSellerManager::get_entity_access($table);
     $xr_objid = intval(Tools::getValue('id_' . $eaccess['owner_xr_table']));
     if ($xr_objid == 0) {
         $sql = 'SELECT id_' . $eaccess['owner_xr_table'] . ' FROM ' . _DB_PREFIX_ . $table . ' WHERE id_' . $table . '=' . $objid;
         $xr_objid = Db::getInstance()->getValue($sql);
     }
     return $xr_objid;
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:10,代码来源:AgileSellerManager.php


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