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

PHP Openbiz\Openbiz类代码示例

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

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



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

示例1: send

 public function send($mobile, $content, $schedule = null)
 {
     $providerInfo = $this->_getProviderInfo();
     $CorpID = $providerInfo['username'];
     $Pwd = $providerInfo['password'];
     if ($schedule == "0000-00-00 00:00:00") {
         $schedule = '';
     } else {
         $schedule = date('YmdHis', strtotime($schedule));
     }
     $mobile_log = $mobile;
     $content_log = $content;
     $mobile = urlencode($mobile);
     $content = urlencode(iconv("UTF-8", "GBK", $content));
     $url = $this->url . "BatchSend?CorpID={$CorpID}&Pwd={$Pwd}&Mobile={$mobile}&Content={$content}&Cell=&SendTime={$schedule}";
     $result = file_get_contents($url);
     preg_match("/\">(.*?)<\\/int/si", $result, $match);
     $result = (int) $match[1];
     if ($result < 0) {
         Openbiz::getService(LOG_SERVICE)->log(LOG_ERR, "SMS", "sendMessage: " . $content . " TCLK:" . $mobile . ':' . $result['msg']);
         return false;
     } else {
         $this->HitMessageCounter();
         $this->_log($mobile_log, $content_log, $schedule);
         return true;
     }
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:27,代码来源:SPtclk.php


示例2: getSystemUserData

 public function getSystemUserData($sendContact = 1)
 {
     //sendContact = 0 ; don't send contact info
     //sendContact = 1 ; send contact info
     $contactRec = array();
     if ($sendContact) {
         $profileId = Openbiz::$app->getUserProfile("profile_Id");
         $recArr = Openbiz::getObject("contact.do.ContactDO")->fetchById($profileId);
         $contactRec['name'] = $recArr['display_name'];
         $contactRec['company'] = $recArr['company'];
         $contactRec['email'] = $recArr['email'];
         $contactRec['mobile'] = $recArr['mobile'];
         $contactRec['phone'] = $recArr['phone'];
     }
     $system_uuid = $this->getSystemUuid();
     $system_name = OPENBIZ_DEFAULT_SYSTEM_NAME;
     $system_language = OPENBIZ_DEFAULT_LANGUAGE;
     $system_url = SITE_URL;
     $system_cubi_ver = $this->getVersion();
     $system_openbiz_ver = BizSystem::getVersion();
     $system_port = $_SERVER['SERVER_PORT'];
     $system_admin = $_SERVER['SERVER_ADMIN'];
     $internal_ip_address = $_SERVER['SERVER_ADDR'];
     if (function_exists("ioncube_server_data")) {
         $server_data = ioncube_server_data();
     } else {
         $server_data = "";
     }
     $systemRec = array("internal_ipaddr" => $internal_ip_address, "language" => $system_language, "system_name" => $system_name, "system_uuid" => $system_uuid, "system_url" => $system_url, "system_admin" => $system_admin, "system_port" => $system_port, "system_cubi_ver" => $system_cubi_ver, "system_openbiz_ver" => $system_openbiz_ver, "system_server_data" => $server_data);
     $params = array("contact_data" => $contactRec, "system_data" => $systemRec);
     return $params;
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:32,代码来源:CubiService.php


示例3: fetchData

 public function fetchData()
 {
     $result = Openbiz::getService("payment.lib.PaymentService")->getReturnData($_GET['type']);
     $txn_id = $result['txn_id'];
     $verify = Openbiz::getService("payment.lib.PaymentService")->validateNotification($_GET['type'], $txn_id);
     return $result;
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:7,代码来源:FinishedForm.php


示例4: postLoadingModule

 public function postLoadingModule($moduelLoader)
 {
     $roleRec = Openbiz::getObject("system.do.RoleDO")->fetchOne("[name]='Collaboration Admin'");
     $adminRoleId = $roleRec['Id'];
     $roleRec = Openbiz::getObject("system.do.RoleDO")->fetchOne("[name]='Data Manager'");
     $managerRoleId = $roleRec['Id'];
     $roleRec = Openbiz::getObject("system.do.RoleDO")->fetchOne("[name]='Data Assigner'");
     $assignerRoleId = $roleRec['Id'];
     //set up acls for Data assigner
     $actionList = Openbiz::getObject("system.do.AclActionDO")->directfetch("[module]='common' AND [resource]='data_assign'");
     foreach ($actionList as $actionRec) {
         $actionId = $actionRec["Id"];
         $aclRecord = array("role_id" => $assignerRoleId, "action_id" => $actionId, "access_level" => 1);
         Openbiz::getObject("system.do.AclRoleActionDO")->insertRecord($aclRecord);
         $aclRecord = array("role_id" => $managerRoleId, "action_id" => $actionId, "access_level" => 1);
         Openbiz::getObject("system.do.AclRoleActionDO")->insertRecord($aclRecord);
     }
     //set up acls for Data manager
     $actionList = Openbiz::getObject("system.do.AclActionDO")->directfetch("[module]='common' AND [resource]='data_manage'");
     foreach ($actionList as $actionRec) {
         $actionId = $actionRec["Id"];
         $aclRecord = array("role_id" => $managerRoleId, "action_id" => $actionId, "access_level" => 1);
         Openbiz::getObject("system.do.AclRoleActionDO")->insertRecord($aclRecord);
     }
     //delete data manage permission from admin
     $actionRec = Openbiz::getObject("system.do.AclActionDO")->fetchOne("[module]='common' AND [resource]='data_manage' AND [action]='manage'");
     $actionId = $actionRec['Id'];
     Openbiz::getObject("system.do.AclRoleActionDO", 1)->deleteRecords("[role_id]='{$adminRoleId}' AND [action_id]='{$actionId}'");
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:29,代码来源:CommonLoadHandler.php


示例5: parseName

 protected function parseName($name)
 {
     $svcobj = Openbiz::getService("service.chineseService");
     if ($svcobj->isChinese($name)) {
         $fast_index = $svcobj->Chinese2Pinyin($name);
     } else {
         $fast_index = $recArr['display_name'];
     }
     $nameArr['fast_index'] = substr($fast_index, 0, 1);
     $nameArr['display_name'] = $name;
     if ($svcobj->isChinese($name)) {
         //chinese name
         switch (mb_strlen($name, 'UTF-8')) {
             case 5:
             case 4:
                 $nameArr['last_name'] = mb_substr($name, 0, 2, 'UTF-8');
                 $nameArr['first_name'] = mb_substr($name, 2, mb_strlen($name, 'UTF-8') - 1, 'UTF-8');
                 break;
             default:
                 $nameArr['last_name'] = mb_substr($name, 0, 1, 'UTF-8');
                 $nameArr['first_name'] = mb_substr($name, 1, mb_strlen($name, 'UTF-8') - 1, 'UTF-8');
                 break;
         }
     } else {
         //english name
         if (preg_match("/(\\S*?)\\s(\\S*)/si", $name, $match)) {
             $nameArr['last_name'] = $match[1];
             $nameArr['first_name'] = $match[2];
         }
     }
     return $nameArr;
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:32,代码来源:InitializeProfileForm.php


示例6: Finish

 public function Finish()
 {
     $recArr = $this->readInputRecord();
     if (count($recArr) == 0) {
         return;
     }
     $user_id = Openbiz::$app->getUserProfile("Id");
     $contactImportDO = Openbiz::getObject("contact.do.ContactImportDO");
     //process data operation
     $data_operation = $recArr['data_operation'];
     switch ($data_operation) {
         case "0":
             break;
         case "1":
             $contactImportDO->deleteRecords("[user_id]='{$user_id}' AND [selected]='1'");
             break;
         case "2":
             $contactImportDO->deleteRecords("[user_id]='{$user_id}'");
             break;
     }
     if ($this->parentFormName) {
         $this->close();
         $this->renderParent();
     }
     $this->processPostAction();
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:26,代码来源:ContactGrabberFinishForm.php


示例7: _remoteCall

 protected function _remoteCall($method, $params = null)
 {
     $uri = $this->reportServer;
     $cache_id = md5($this->objectName . $uri . $method . serialize($params));
     $cacheSvc = Openbiz::getService(CACHE_SERVICE, 1);
     $cacheSvc->init($this->objectName, $this->cacheLifeTime);
     if (substr($uri, strlen($uri) - 1, 1) != '/') {
         $uri .= '/';
     }
     $uri .= "ws.php/udc/CollectService";
     if ($cacheSvc->test($cache_id) && (int) $this->cacheLifeTime > 0) {
         $resultSetArray = $cacheSvc->load($cache_id);
     } else {
         try {
             $argsJson = urlencode(json_encode($params));
             $query = array("method={$method}", "format=json", "argsJson={$argsJson}");
             $httpClient = new HttpClient('POST');
             foreach ($query as $q) {
                 $httpClient->addQuery($q);
             }
             $headerList = array();
             $out = $httpClient->fetchContents($uri, $headerList);
             $cats = json_decode($out, true);
             $resultSetArray = $cats['data'];
             $cacheSvc->save($resultSetArray, $cache_id);
         } catch (Exception $e) {
             $resultSetArray = array();
         }
     }
     return $resultSetArray;
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:31,代码来源:ErrorReportService.php


示例8: insertToParent

 public function insertToParent()
 {
     $recArr = $this->readInputRecord();
     $this->setActiveRecord($recArr);
     if (count($recArr) == 0) {
         return;
     }
     //generate fast_index
     $svcobj = Openbiz::getService("service.chineseService");
     if ($svcobj->isChinese($recArr['first_name'])) {
         $fast_index = $svcobj->Chinese2Pinyin($recArr['first_name']);
     } else {
         $fast_index = $recArr['first_name'];
     }
     $recArr['fast_index'] = substr($fast_index, 0, 1);
     if (!$recArr['company']) {
         $recArr['company'] = 'N/A';
     }
     try {
         $this->ValidateForm();
     } catch (Openbiz\Validation\Exception $e) {
         $this->processFormObjError($e->errors);
         return;
     }
     $recId = $this->_doInsert($recArr);
     $selIds[] = $recId;
     // if no parent elem or picker map, call AddToParent
     if (!$this->parentFormElemName) {
         $this->addToParent($selIds);
     }
     // if has parent elem and picker map, call JoinToParent
     if ($this->parentFormElemName && $this->pickerMap) {
         $this->joinToParent($selIds);
     }
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:35,代码来源:ContactPickerForm.php


示例9: insertRecord

 public function insertRecord()
 {
     $recArr = $this->readInputRecord();
     $this->setActiveRecord($recArr);
     if (count($recArr) == 0) {
         return;
     }
     try {
         $this->ValidateForm();
     } catch (Openbiz\Validation\Exception $e) {
         $this->processFormObjError($e->errors);
         return;
     }
     $repo_uri = $recArr['repository_uri'];
     $svc = Openbiz::getService("market.lib.PackageService");
     $repoInfo = $svc->discoverRepository($repo_uri);
     $recArr['repository_uid'] = $repoInfo['_repo_uid'];
     $recArr['repository_name'] = $repoInfo['_repo_name'];
     $this->_doInsert($recArr);
     // in case of popup form, close it, then rerender the parent form
     if ($this->parentFormName) {
         $this->close();
         $this->renderParent();
     }
     $this->processPostAction();
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:26,代码来源:RepositoryForm.php


示例10: exportCSV

 public function exportCSV()
 {
     $eventlogSvc = Openbiz::getService(OPENBIZ_EVENTLOG_SERVICE);
     $eventlogSvc->exportCSV();
     $this->runEventLog();
     return true;
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:7,代码来源:EventLogForm.php


示例11: Cleanup

 public function Cleanup()
 {
     $searchRule = "[app_id]=0 OR [install_state]!='OK'";
     Openbiz::getObject($this->marketInstalledDO)->deleteRecords($searchRule);
     $this->notices = array("cleanup" => $this->getMessage("MSG_CLEANUP"));
     $this->rerender();
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:7,代码来源:ApplicationsListForm.php


示例12: insertRecord

 public function insertRecord()
 {
     $recArr = $this->readInputRecord();
     $this->setActiveRecord($recArr);
     if (count($recArr) == 0) {
         return;
     }
     //generate fast_index
     $svcobj = Openbiz::getService("service.chineseService");
     if ($svcobj->isChinese($recArr['first_name'])) {
         $fast_index = $svcobj->Chinese2Pinyin($recArr['first_name']);
     } else {
         $fast_index = $recArr['first_name'];
     }
     $recArr['fast_index'] = substr($fast_index, 0, 1);
     try {
         $this->ValidateForm();
     } catch (Openbiz\Validation\Exception $e) {
         $this->processFormObjError($e->errors);
         return;
     }
     $this->_doInsert($recArr);
     // in case of popup form, close it, then rerender the parent form
     if ($this->parentFormName) {
         $this->close();
         $this->renderParent();
     }
     $this->processPostAction();
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:29,代码来源:ContactFormGrouping.php


示例13: getDefaultLangName

 public function getDefaultLangName($lang = null)
 {
     if ($lang == null) {
         $do = Openbiz::getObject("myaccount.do.PreferenceDO", 1);
         $rec = $do->fetchOne("[user_id]='0' AND [name]='language'");
         if ($rec) {
             $lang = $rec['value'];
         } else {
             $lang = OPENBIZ_DEFAULT_LANGUAGE;
         }
     }
     $current_locale = I18n::getCurrentLangCode();
     //require_once('Zend/Locale.php');
     $locale = new \Zend_Locale($current_locale);
     $display_name = \Zend_Locale::getTranslation($lang, 'language', $locale);
     if ($display_name) {
         return $display_name;
     } else {
         if ($lang) {
             return $lang;
         } else {
             return OPENBIZ_DEFAULT_LANGUAGE;
         }
     }
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:25,代码来源:localeService.php


示例14: ExportCSV

 public function ExportCSV()
 {
     $excelSvc = Openbiz::getService(EXCEL_SERVICE);
     $excelSvc->renderCSV($this->objectName);
     $this->runEventLog();
     return true;
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:7,代码来源:LogForm.php


示例15: render

 public function render()
 {
     $sHTML = "";
     if (Openbiz::getService('system.lib.ModuleService')->isModuleInstalled('oauth')) {
         $do = Openbiz::getObject('oauth.do.OauthProviderDO');
         $recArr = $do->directFetch("[status]=1", 30);
         $recArr = $recArr->toArray();
         if ($this->redirectURL) {
             $this->redirectURL = Expression::evaluateExpression($this->redirectURL, $this);
             $url_append .= "redirect_url=" . urlencode($this->redirectURL) . "&";
         }
         if ($this->assocURL) {
             $this->assocURL = Expression::evaluateExpression($this->assocURL, $this);
             $url_append .= "assoc_url=" . urlencode($this->assocURL) . "&";
         }
         if (count($recArr)) {
             $sHTML .= "<span class=\"oauth_bar\" {$style}>";
             foreach ($recArr as $oauthProvider) {
                 $url = OPENBIZ_APP_URL . "/ws.php/oauth/callback/login/type_" . $oauthProvider['type'] . '/';
                 if ($url_append) {
                     $url .= '?' . $url_append;
                 }
                 $sHTML .= "<a id=\"oauth_" . $oauthProvider['type'] . "\" title=\"" . $oauthProvider['type'] . "\"   href=\"{$url}\" style=\"\"></a>";
             }
             $sHTML .= "</span>";
         }
     }
     return $sHTML;
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:29,代码来源:OauthLogin.php


示例16: UpdateRecord

 public function UpdateRecord()
 {
     $result = parent::UpdateRecord();
     $mappingObj = Openbiz::getObject($this->categoryMappingDO, 1);
     $Id = $this->recordId;
     $mappingObj->deleteRecords("[cat_id]='{$Id}'");
     return $result;
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:8,代码来源:HelpCategoryForm.php


示例17: getDefaultRoleID

 public function getDefaultRoleID()
 {
     $roleRec = Openbiz::getObject("system.do.RoleDO")->fetchOne("[default]='1'", "[Id] DESC");
     if ($roleRec) {
         $Id = $roleRec['Id'];
     }
     return (int) $Id;
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:8,代码来源:SystemService.php


示例18: getSelectFrom

 public function getSelectFrom()
 {
     $formname = $this->getFormObj()->parentFormName;
     if (!$formname) {
         $formname = "extend.widget.ExtendSettingListEditForm";
     }
     return Openbiz::getObject($formname)->parentFormElementMeta['ATTRIBUTES']['ACCESSSELECTFROM'];
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:8,代码来源:AccessLabel.php


示例19: getDefaultMainForm

 public function getDefaultMainForm(&$xmlArr)
 {
     $formObj = Openbiz::getObject("contact.widget.ViewSelectorLeftWidget");
     $targetForm = $formObj->getViewMode();
     $newForm = array("ATTRIBUTES" => array("NAME" => $targetForm), "VALUE" => null);
     $newArr = array($xmlArr, $newForm);
     return $newArr;
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:8,代码来源:ContactListView.php


示例20: Report

 public function Report()
 {
     //send an email to admin includes error messages;
     $system_uuid = Openbiz::getService("system.lib.CubiService")->getSystemUUID();
     $report = array("system_uuid" => $system_uuid, "error_info" => $this->errors["system"], "server_info" => $_SERVER, "php_version" => phpversion(), "php_extension" => get_loaded_extensions());
     $reportId = Openbiz::getObject("common.lib.ErrorReportService")->report($report);
     $this->notices = array("status" => "REPORTED", "report_id" => $reportId);
     $this->ReRender();
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:9,代码来源:ErrorForm.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP OpenCloud\Rackspace类代码示例发布时间:2022-05-23
下一篇:
PHP economyapi\EconomyAPI类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap