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


PHP OSCOM::callDB方法代码示例

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


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

示例1: execute

 public static function execute($data)
 {
     if (!empty($data['password'])) {
         $data['password'] = osc_encrypt_string(trim($data['password']));
     }
     return OSCOM::callDB('Admin\\Administrators\\Save', $data);
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:7,代码来源:save.php

示例2: execute

 public static function execute($id = null, $data)
 {
     if (is_numeric($id)) {
         $data['id'] = $id;
     }
     return OSCOM::callDB('Admin\\Countries\\Save', $data);
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:7,代码来源:save.php

示例3: execute

 public static function execute($module)
 {
     $class = 'osCommerce\\OM\\Core\\Site\\Admin\\Module\\Service\\' . $module;
     if (class_exists($class)) {
         $OSCOM_SM = new $class();
         $OSCOM_SM->install();
         $sm = explode(';', MODULE_SERVICES_INSTALLED);
         if (isset($OSCOM_SM->depends)) {
             if (is_string($OSCOM_SM->depends) && ($key = array_search($OSCOM_SM->depends, $sm)) !== false) {
                 if (isset($sm[$key + 1])) {
                     array_splice($sm, $key + 1, 0, $module);
                 } else {
                     $sm[] = $module;
                 }
             } elseif (is_array($OSCOM_SM->depends)) {
                 foreach ($OSCOM_SM->depends as $depends_module) {
                     if (($key = array_search($depends_module, $sm)) !== false) {
                         if (!isset($array_position) || $key > $array_position) {
                             $array_position = $key;
                         }
                     }
                 }
                 if (isset($array_position)) {
                     array_splice($sm, $array_position + 1, 0, $module);
                 } else {
                     $sm[] = $module;
                 }
             }
         } elseif (isset($OSCOM_SM->precedes)) {
             if (is_string($OSCOM_SM->precedes)) {
                 if (($key = array_search($OSCOM_SM->precedes, $sm)) !== false) {
                     array_splice($sm, $key, 0, $module);
                 } else {
                     $sm[] = $module;
                 }
             } elseif (is_array($OSCOM_SM->precedes)) {
                 foreach ($OSCOM_SM->precedes as $precedes_module) {
                     if (($key = array_search($precedes_module, $sm)) !== false) {
                         if (!isset($array_position) || $key < $array_position) {
                             $array_position = $key;
                         }
                     }
                 }
                 if (isset($array_position)) {
                     array_splice($sm, $array_position, 0, $module);
                 } else {
                     $sm[] = $module;
                 }
             }
         } else {
             $sm[] = $module;
         }
         $data = array('key' => 'MODULE_SERVICES_INSTALLED', 'value' => implode(';', $sm));
         if (OSCOM::callDB('Admin\\Configuration\\EntrySave', $data)) {
             Cache::clear('configuration');
             return true;
         }
     }
     return false;
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:60,代码来源:install.php

示例4: execute

 public static function execute($data)
 {
     if (!empty($data['password'])) {
         $data['password'] = Hash::get(trim($data['password']));
     }
     return OSCOM::callDB('Admin\\Customers\\Save', $data);
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:7,代码来源:save.php

示例5: execute

 public static function execute($data)
 {
     if (OSCOM::callDB('Admin\\Configuration\\EntrySave', $data)) {
         Cache::clear('configuration');
         return true;
     }
     return false;
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:8,代码来源:saveEntry.php

示例6: execute

 public static function execute($data)
 {
     if ($OSCOM_PDO = PDO::initialize($data['server'], $data['username'], $data['password'], null, $data['port'], $data['class'])) {
         Registry::set('PDO', $OSCOM_PDO);
         OSCOM::callDB('Setup\\Install\\CreateDB', array('database' => $data['database']));
     }
     return PDO::initialize($data['server'], $data['username'], $data['password'], $data['database'], $data['port'], $data['class']);
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:8,代码来源:checkDB.php

示例7: execute

 public static function execute($data)
 {
     $result = OSCOM::callDB('Admin\\Login\\GetAdmin', array('username' => $data['username']));
     if (!empty($result)) {
         return osc_validate_password($data['password'], $result['user_password']);
     }
     return false;
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:8,代码来源:isValidCredentials.php

示例8: execute

 public static function execute($pageset = 1)
 {
     $data = array('batch_pageset' => $pageset, 'batch_max_results' => MAX_DISPLAY_SEARCH_RESULTS);
     if (!is_numeric($data['batch_pageset']) || floor($data['batch_pageset']) != $data['batch_pageset']) {
         $data['batch_pageset'] = 1;
     }
     return OSCOM::callDB('Admin\\Administrators\\GetAll', $data);
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:8,代码来源:getAll.php

示例9: execute

 public static function execute($id, $modules, $mode = Administrators::ACCESS_MODE_ADD)
 {
     $data = array('id' => $id, 'modules' => $modules, 'mode' => $mode);
     if (in_array('0', $data['modules'])) {
         $data['modules'] = array('*');
     }
     return OSCOM::callDB('Admin\\Administrators\\SavePermissions', $data);
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:8,代码来源:setAccessLevels.php

示例10: execute

 public static function execute($search, $pageset = 1)
 {
     $data = array('keywords' => $search, 'batch_pageset' => $pageset, 'batch_max_results' => MAX_DISPLAY_SEARCH_RESULTS);
     if (!is_numeric($data['batch_pageset']) || floor($data['batch_pageset']) != $data['batch_pageset']) {
         $data['batch_pageset'] = 1;
     }
     return OSCOM::callDB('Admin\\Currencies\\Find', $data);
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:8,代码来源:find.php

示例11: execute

 public static function execute($email_address, $customer_id = null)
 {
     $data = array('email_address' => $email_address);
     $result = OSCOM::callDB('Admin\\Customers\\Get', $data);
     if (isset($customer_id)) {
         return $result['customers_id'] != $customer_id;
     }
     return !empty($result);
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:9,代码来源:emailAddressExists.php

示例12: execute

 public static function execute($id)
 {
     $data = array('id' => $id);
     if (Languages::get($id, 'code') != DEFAULT_LANGUAGE && OSCOM::callDB('Admin\\Languages\\Delete', $data)) {
         Cache::clear('languages');
         return true;
     }
     return false;
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:9,代码来源:delete.php

示例13: execute

 public static function execute($id)
 {
     $data = array('id' => $id);
     if (OSCOM::callDB('Admin\\Currencies\\Delete', $data)) {
         Cache::clear('currencies');
         return true;
     }
     return false;
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:9,代码来源:delete.php

示例14: execute

 public static function execute($group)
 {
     $data = array('group' => $group);
     if (OSCOM::callDB('Admin\\Languages\\DeleteGroup', $data)) {
         Cache::clear('languages');
         return true;
     }
     return false;
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:9,代码来源:deleteGroup.php

示例15: execute

 public static function execute($username, $key = null)
 {
     $data = array('username' => $username);
     $result = OSCOM::callDB('Admin\\Login\\GetAdmin', $data);
     if (isset($key)) {
         $result = $result[$key] ?: null;
     }
     return $result;
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:9,代码来源:getAdmin.php


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