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

PHP BizSystem类代码示例

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

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



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

示例1: _dumpDatabase

 private function _dumpDatabase($filename, $dbname, $droptable)
 {
     $filename .= ".sql";
     $filename = $this->folder . DIRECTORY_SEPARATOR . $filename;
     $dbconfigList = BizSystem::getConfiguration()->getDatabaseInfo();
     $dbconfig = $dbconfigList[$dbname];
     if (strtolower($dbconfig["Driver"]) != 'pdo_mysql') {
         return;
     }
     include_once dirname(dirname(__FILE__)) . "/lib/MySQLDump.class.php";
     $backup = new MySQLDump();
     if ($droptable == 1) {
         $backup->droptableifexists = true;
     } else {
         $backup->droptableifexists = false;
     }
     if ($dbconfig["Port"]) {
         $dbHost = $dbconfig["Server"] . ":" . $dbconfig["Port"];
     } else {
         $dbHost = $dbconfig["Port"];
     }
     $dbc = $backup->connect($dbHost, $dbconfig["User"], $dbconfig["Password"], $dbconfig["DBName"], $dbconfig["Charset"]);
     if (!$dbc) {
         echo $backup->mysql_error;
     }
     $backup->dump();
     $data = $backup->output;
     file_put_contents($filename, $data);
     @chmod($filename, 0777);
     return $filename;
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:31,代码来源:BackupService.php


示例2: searchSipTrace

 public function searchSipTrace($id = null)
 {
     include_once OPENBIZ_BIN . "/easy/SearchHelper.php";
     $searchRule = "";
     foreach ($this->m_DataPanel as $element) {
         if (!$element->m_FieldName) {
             continue;
         }
         $value = BizSystem::clientProxy()->getFormInputs($element->m_Name);
         if ($element->m_FuzzySearch == "Y") {
             $value = "*{$value}*";
         }
         if ($value) {
             $searchStr = inputValToRule($element->m_FieldName, $value, $this);
             if ($searchRule == "") {
                 $searchRule .= $searchStr;
             } else {
                 $searchRule .= " AND " . $searchStr;
             }
         }
     }
     $searchRuleBindValues = QueryStringParam::getBindValues();
     $listFormObj = BizSystem::getObject($this->localListForm);
     $listFormObj->setSearchRule($searchRule, $searchRuleBindValues);
     $listFormObj->rerender();
 }
开发者ID:que273,项目名称:siremis,代码行数:26,代码来源:SipTraceSearchForm.php


示例3: render

 /**
  * Render the chart output
  *
  * @param string $objName object name which is the bizform name
  * @return void
  */
 public function render($objName)
 {
     // get the value of the control that issues the call
     $chartName = BizSystem::clientProxy()->getFormInputs("__this");
     // get the current UI bizobj
     $formObj = BizSystem::getObject($objName);
     // get the existing bizform object
     $bizDataObj = $formObj->getDataObj();
     // get chart config xml file
     $chartXmlFile = BizSystem::GetXmlFileWithPath($objName . "_chart");
     $xmlArr = BizSystem::getXmlArray($chartXmlFile);
     ob_clean();
     // get the chart section from config xml file
     foreach ($xmlArr["BIZFORM_CHART"]["CHARTLIST"]["CHART"] as $chart) {
         if (count($xmlArr["BIZFORM_CHART"]["CHARTLIST"]["CHART"]) == 1) {
             $chart = $xmlArr["BIZFORM_CHART"]["CHARTLIST"]["CHART"];
         }
         // try to match the chartName, if no chartName given, always draw the first chart defined in xml file
         if ($chartName && $chart["ATTRIBUTES"]["NAME"] == $chartName || !$chartName) {
             if ($chart["ATTRIBUTES"]["GRAPHTYPE"] == 'XY') {
                 $this->xyGraphRender($bizDataObj, $chart);
                 break;
             }
             if ($chart["ATTRIBUTES"]["GRAPHTYPE"] == 'Pie') {
                 $this->pieGraphRender($bizDataObj, $chart);
                 break;
             }
         }
     }
 }
开发者ID:que273,项目名称:siremis,代码行数:36,代码来源:chartService.php


示例4: _remoteCall

 protected function _remoteCall($method, $params = null)
 {
     $uri = $this->m_ReportServer;
     $cache_id = md5($this->m_Name . $uri . $method . serialize($params));
     $cacheSvc = BizSystem::getService(CACHE_SERVICE, 1);
     $cacheSvc->init($this->m_Name, $this->m_CacheLifeTime);
     if (substr($uri, strlen($uri) - 1, 1) != '/') {
         $uri .= '/';
     }
     $uri .= "ws.php/udc/CollectService";
     if ($cacheSvc->test($cache_id) && (int) $this->m_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:Why-Not-Sky,项目名称:cubi-ng,代码行数:31,代码来源:ErrorReportService.php


示例5: _doInsert

 /**
  * Do insert record
  *
  * @param array $inputRecord
  * @return void
  */
 protected function _doInsert($inputRecord)
 {
     $dataRec = new DataRecord(null, $this->getDataObj());
     // $inputRecord['Id'] = null; // comment it out for name PK case
     foreach ($inputRecord as $k => $v) {
         $dataRec[$k] = $v;
     }
     // or $dataRec->$k = $v;
     try {
         $dataRec->save();
     } catch (ValidationException $e) {
         $errElements = $this->getErrorElements($e->m_Errors);
         if (count($e->m_Errors) == count($errElements)) {
             $this->formHelper->processFormObjError($errElements);
         } else {
             $errmsg = implode("<br />", $e->m_Errors);
             BizSystem::clientProxy()->showErrorMessage($errmsg);
         }
         return;
     } catch (BDOException $e) {
         $this->processBDOException($e);
         return;
     }
     $this->m_ActiveRecord = null;
     $this->getActiveRecord($dataRec["Id"]);
     //$this->runEventLog();
     return $dataRec["Id"];
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:34,代码来源:NewForm.php


示例6: GoActive

 public function GoActive()
 {
     $rec = $this->readInputRecord();
     $this->setActiveRecord($rec);
     if ($rec['eula'] == "0") {
         $this->m_Errors = array("fld_eula" => 'You must agree with the license');
         $this->m_hasError = true;
         BizSystem::clientProxy()->setRPCFlag(true);
         return parent::rerender();
     }
     $appInfo = $this->getAppInfo();
     if (!$appInfo) {
         $rec['howto_active'] = 'ENTER';
     }
     switch (strtoupper($rec['howto_active'])) {
         case "ENTER":
             $this->switchForm("common.form.LicenseActiveForm");
             break;
         case "FREETRIAL":
             if ($this->getTrailLicense()) {
                 $scriptStr = 'location.reload();';
                 BizSystem::clientProxy()->runClientFunction($scriptStr);
             }
             break;
         case "PURCHASE":
             $url = $appInfo['APP_PURCHASE'];
             BizSystem::clientProxy()->redirectPage($url);
             break;
         case "WEBSITE":
             $url = $appInfo['APP_WEBSITE'];
             BizSystem::clientProxy()->redirectPage($url);
             break;
     }
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:34,代码来源:LicenseInitializeForm.php


示例7: getFromList

 public function getFromList(&$list)
 {
     $current_locale = I18n::getInstance()->getCurrentLanguage();
     $country = BizSystem::clientProxy()->getFormInputs("fld_region");
     $country = strtoupper($country);
     if (!$country) {
         $locale = explode('_', $current_locale);
         $country = strtoupper($locale[0]);
     }
     require_once 'Zend/Locale.php';
     $locale = new Zend_Locale($current_locale);
     $code2name = $locale->getTranslationList('territorytolanguage', $locale);
     $list = array();
     $i = 0;
     foreach ($code2name as $key => $value) {
         if (preg_match('/' . $country . '/', $value) || strtoupper($key) == $country) {
             $lang_list = explode(" ", $value);
             foreach ($lang_list as $lang) {
                 $list[$i]['txt'] = strtolower($key) . "_" . strtoupper($lang);
                 $list[$i]['val'] = strtolower($key) . "_" . strtoupper($lang);
                 $i++;
             }
         }
     }
     return $list;
 }
开发者ID:que273,项目名称:siremis,代码行数:26,代码来源:LanguageListbox.php


示例8: SetSearchRule

 public function SetSearchRule()
 {
     $url = $this->GetURL();
     if (!$url) {
         return;
     }
     //search cat_id from mapping table
     $mappingObj = BizSystem::GetObject($this->m_CategoryMappingDO, 1);
     //@todo: $url need to be filtered before use in database
     $records = $mappingObj->directFetch("[url]='{$url}'");
     if (count($records) == 1) {
         $cat_id = (int) $records[0]['cat_id'];
     } else {
         //if no matched, generate record from category table url_match
         $categoryObj = BizSystem::GetObject($this->m_CategoryDO, 1);
         $records = $categoryObj->directFetch();
         foreach ($records as $record) {
             $match = $record['url_match'];
             if ($match) {
                 $pattern = "/" . str_replace('/', '\\/', $match) . "/si";
                 $pattern = "@" . $match . "@si";
                 if (preg_match($pattern, "/" . $url)) {
                     $cat_id = $record['Id'];
                     //cache it into database;
                     $obj_array = array("cat_id" => $cat_id, "url" => $url);
                     $mappingObj->insertRecord($obj_array);
                     break;
                 }
             }
         }
     }
     $this->m_SearchRule = "[category_id]='{$cat_id}'";
 }
开发者ID:que273,项目名称:siremis,代码行数:33,代码来源:HelpWidgetForm.php


示例9: setValue

 /**
  * Set value of element
  *
  * @param mixed $value
  * @return string
  */
 function setValue($value)
 {
     if ($this->m_Deleteable == 'N') {
     } else {
         $delete_user_opt = BizSystem::clientProxy()->getFormInputs($this->m_Name . "_DELETE");
         if ($delete_user_opt) {
             $this->m_Value = "";
             return;
         } else {
             if (count($_FILES) > 0) {
             } else {
                 $this->m_Value = $value;
             }
         }
     }
     if (count($_FILES) > 0) {
         if (!$this->m_Uploaded) {
             $file = $_FILES[$this->m_Name];
             if (!is_dir($this->m_UploadRoot . $this->m_UploadFolder)) {
                 mkdir($this->m_UploadRoot . $this->m_UploadFolder, 0777, true);
             }
             $uploadFile = $this->m_UploadFolder . "/" . date("YmdHis") . "-" . urlencode($file['name']);
             if (move_uploaded_file($file['tmp_name'], $this->m_UploadRoot . $uploadFile)) {
                 $this->m_Value = $this->m_UploadRootURL . $uploadFile;
                 $this->m_Uploaded = true;
             }
             return $uploadFile;
         }
     }
 }
开发者ID:que273,项目名称:siremis,代码行数:36,代码来源:FileUploader.php


示例10: giveActionAccess

function giveActionAccess($where, $role_id)
{
    $db = BizSystem::dbConnection();
    try {
        if (empty($where)) {
            $sql = "SELECT * FROM acl_action";
        } else {
            $sql = "SELECT * FROM acl_action WHERE {$where}";
        }
        BizSystem::log(LOG_DEBUG, "DATAOBJ", $sql);
        $rs = $db->fetchAll($sql);
        $sql = "";
        foreach ($rs as $r) {
            $sql = "DELETE FROM acl_role_action WHERE role_id={$role_id} AND action_id={$r['0']}; ";
            BizSystem::log(LOG_DEBUG, "DATAOBJ", $sql);
            $db->query($sql);
            $sql = "INSERT INTO acl_role_action (role_id, action_id, access_level) VALUES ({$role_id},{$r['0']},1)";
            BizSystem::log(LOG_DEBUG, "DATAOBJ", $sql);
            $db->query($sql);
        }
    } catch (Exception $e) {
        echo "ERROR: " . $e->getMessage() . "" . PHP_EOL;
        return false;
    }
}
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:25,代码来源:upgrade_module.php


示例11: postLoadingModule

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


示例12: render

 /**
  * Render element, according to the mode
  *
  * @return string HTML text
  */
 public function render()
 {
     BizSystem::clientProxy()->includeCKEditorScripts();
     $elementName = $this->m_Name;
     $value = $this->getValue();
     $value = htmlentities($value, ENT_QUOTES, "UTF-8");
     $style = $this->getStyle();
     $width = $this->m_Width ? $this->m_Width : 600;
     $height = $this->m_Height ? $this->m_Height : 300;
     //$func = "onclick=\"editRichText('$elementName', $width, $height);\"";
     if (!strlen($value) > 0) {
         // fix suggested by smarques
         $value = "&nbsp;";
     }
     $type = strtolower($this->m_Mode);
     $fileBrowserPage = APP_URL . "/bin/filebrowser/browser.html";
     $languageCode = I18n::getCurrentLangCode();
     $languageCode = str_replace("_", "-", $languageCode);
     $config = $this->m_Config;
     $sHTML .= "<textarea id=\"{$elementName}\" name=\"{$elementName}\" >{$value}</textarea>\n";
     $sHTML .= "<script type=\"text/javascript\">\n";
     if ($config) {
         //remove the last commas
         $config = trim($config);
         if (substr($config, strlen($config) - 1, 1) == ',') {
             $config = substr($config, strlen($config) - 1);
         }
         $sHTML .= "Openbiz.CKEditor.init('{$elementName}',{'type':'{$type}','filebrowserBrowseUrl':'{$fileBrowserPage}','language':'{$languageCode}','height':'{$height}','width':'{$width}',{$config}});\n";
     } else {
         $sHTML .= "Openbiz.CKEditor.init('{$elementName}',{'type':'{$type}','filebrowserBrowseUrl':'{$fileBrowserPage}','language':'{$languageCode}','height':'{$height}','width':'{$width}'});\n";
     }
     $sHTML .= "</script>\n";
     return $sHTML;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:39,代码来源:CKEditor.php


示例13: render

 public function render()
 {
     BizSystem::clientProxy()->includeColorPickerScripts();
     if ($this->m_Value != null) {
         $value = $this->m_Value;
     } else {
         $value = $this->getText();
     }
     $disabledStr = $this->getEnabled() == "N" ? "READONLY=\"true\"" : "";
     $style = $this->getStyle();
     $func = $this->getFunction();
     $func_org = $func;
     $formobj = $this->GetFormObj();
     if ($formobj->m_Errors[$this->m_Name]) {
         $func .= "onchange=\"this.className='{$this->m_cssClass}'\"";
     } else {
         $func .= "onfocus=\"this.className='{$this->m_cssFocusClass}'\" onblur=\"this.className='{$this->m_cssClass}'\"";
     }
     $elementName = $this->m_Name;
     $elementTrigger = array();
     if ($value) {
         $default_color = "color: '#{$value}',";
     } else {
         $default_color = "";
         $value = $this->getDefaultValue() ? $this->getDefaultValue() : "";
     }
     switch (strtolower($this->m_Mode)) {
         case "viewonly":
             $sHTML .= "<span id=\"colorpreview_{$elementName}\" {$func_org} class=\"colorpicker_preview\" style=\"background-color:#{$value};width:98px;\" ></span>";
             $elementTrigger = array();
             break;
         case "widget":
             $config = " \n\t\t\t\t\t\t\tonShow: function (colpkr) {\n\t\t\t\t\t\t\t\tif(\$j(colpkr).css('display')=='none'){\n\t\t\t\t\t\t\t\t\t\$j(colpkr).fadeIn(300);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonHide: function (colpkr) {\n\t\t\t\t\t\t\t\t\$j(colpkr).fadeOut(300);\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t},\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tonSubmit: function(hsb, hex, rgb, el) {\n\t\t\t\t\t\t\t\t\$('{$this->m_Name}').value=hex;\n\t\t\t\t\t\t\t\t\$j('#colorpreview_{$this->m_Name}').css('backgroundColor', '#' + hex);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonChange: function (hsb, hex, rgb) {\n\t\t\t\t\t\t\t\t\$('{$this->m_Name}').value=hex;\n\t\t\t\t\t\t\t\t\$j('#colorpreview_{$this->m_Name}').css('backgroundColor', '#' + hex);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t";
             $sHTML .= "<span id=\"colorpreview_{$elementName}\" class=\"colorpicker_preview\" style=\"background-color:#{$value};\" {$func} ></span>";
             $sHTML .= "<INPUT NAME=\"" . $this->m_Name . "\" ID=\"" . $this->m_Name . "\" VALUE=\"" . $value . "\" type=\"hidden\" />";
             $elementTrigger = array("colorpreview_{$elementName}");
             break;
         case "flat":
             $config = "flat: true,\n\t\t\t\t\t\t\tonSubmit: function(hsb, hex, rgb, el) {\n\t\t\t\t\t\t\t\t\$('{$this->m_Name}').value=hex;\n\t\t\t\t\t\t\t\t\$j('#colorpreview_{$this->m_Name}').css('backgroundColor', '#' + hex);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonChange: function (hsb, hex, rgb) {\n\t\t\t\t\t\t\t\t\$('{$this->m_Name}').value=hex;\n\t\t\t\t\t\t\t\t\$j('#colorpreview_{$this->m_Name}').css('backgroundColor', '#' + hex);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t";
             $sHTML .= "<span id=\"colorpreview_{$elementName}\" class=\"colorpicker_preview\" style=\"background-color:#{$value};\" ></span>";
             $sHTML .= "<INPUT NAME=\"" . $this->m_Name . "\" ID=\"" . $this->m_Name . "\" VALUE=\"" . $value . "\" {$disabledStr} {$this->m_HTMLAttr} {$style} {$func} />";
             $sHTML .= "<div id=\"colorpicker_{$elementName}\" style=\"float:left\"></div>";
             $elementTrigger = array("colorpicker_" . $elementName);
             break;
         default:
             $config = " \n\t\t\t\t\t\t\tonShow: function (colpkr) {\n\t\t\t\t\t\t\t\tif(\$j(colpkr).css('display')=='none'){\n\t\t\t\t\t\t\t\t\t\$j(colpkr).fadeIn(300);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonHide: function (colpkr) {\n\t\t\t\t\t\t\t\t\$j(colpkr).fadeOut(300);\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t},\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tonSubmit: function(hsb, hex, rgb, el) {\n\t\t\t\t\t\t\t\t\$('{$this->m_Name}').value=hex;\n\t\t\t\t\t\t\t\t\$j('#colorpreview_{$this->m_Name}').css('backgroundColor', '#' + hex);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonChange: function (hsb, hex, rgb) {\n\t\t\t\t\t\t\t\t\$('{$this->m_Name}').value=hex;\n\t\t\t\t\t\t\t\t\$j('#colorpreview_{$this->m_Name}').css('backgroundColor', '#' + hex);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t";
             $sHTML .= "<span id=\"colorpreview_{$elementName}\" class=\"colorpicker_preview\" style=\"background-color:#{$value};\" ></span>";
             $sHTML .= "<INPUT NAME=\"" . $this->m_Name . "\" ID=\"" . $this->m_Name . "\" VALUE=\"" . $value . "\" {$disabledStr} {$this->m_HTMLAttr} {$style} {$func} />";
             $elementTrigger = array($elementName, "colorpreview_{$elementName}");
             break;
     }
     if ($this->m_Config) {
         $config .= "," . $this->m_Config;
     }
     $config = "{" . $default_color . $config . "}";
     foreach ($elementTrigger as $trigger) {
         $sHTML .= "<script>\$j('#{$trigger}').ColorPicker({$config});</script>\n";
     }
     return $sHTML;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:60,代码来源:ColorPicker.php


示例14: getSystemUserData

 public function getSystemUserData($sendContact = 1)
 {
     //sendContact = 0 ; don't send contact info
     //sendContact = 1 ; send contact info
     $contactRec = array();
     if ($sendContact) {
         $profileId = BizSystem::getUserProfile("profile_Id");
         $recArr = BizSystem::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 = DEFAULT_SYSTEM_NAME;
     $system_language = 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:Why-Not-Sky,项目名称:cubi-ng,代码行数:32,代码来源:CubiService.php


示例15: insertRecord

 public function insertRecord()
 {
     $recArr = $this->readInputRecord();
     $this->setActiveRecord($recArr);
     if (count($recArr) == 0) {
         return;
     }
     //generate fast_index
     $svcobj = BizSystem::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 (ValidationException $e) {
         $this->processFormObjError($e->m_Errors);
         return;
     }
     $this->_doInsert($recArr);
     // in case of popup form, close it, then rerender the parent form
     if ($this->m_ParentFormName) {
         $this->close();
         $this->renderParent();
     }
     $this->processPostAction();
 }
开发者ID:que273,项目名称:siremis,代码行数:29,代码来源:ContactForm.php


示例16: renderPHP

 /**
  * Render PHP template for widget object
  *
  * @param MenuWidget $widgetObj
  * @param string $tplFile
  * @return string result of rendering process
  */
 protected static function renderPHP($widgetObj, $tplFile)
 {
     $view = BizSystem::getZendTemplate();
     $view->addScriptPath(dirname($tplFile));
     $view->widget = $widgetObj->OutputAttrs();
     return $view->render($widgetObj->m_TemplateFile);
 }
开发者ID:que273,项目名称:siremis,代码行数:14,代码来源:MenuRenderer.php


示例17: getDefaultLangName

 public function getDefaultLangName($lang = null)
 {
     if ($lang == null) {
         $do = BizSystem::getObject("myaccount.do.PreferenceDO", 1);
         $rec = $do->fetchOne("[user_id]='0' AND [name]='language'");
         if ($rec) {
             $lang = $rec['value'];
         } else {
             $lang = 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 DEFAULT_LANGUAGE;
         }
     }
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:25,代码来源:localeService.php


示例18: siremisFillDB

function siremisFillDB()
{
    siremisReplaceDbConfig();
    BizSystem::log(LOG_DEBUG, "SIREMIS", "install module siremis sql - " . $_REQUEST['db1type']);
    if ($_REQUEST['db1type'] == "Pdo_Pgsql" || $_REQUEST['db1type'] == "pdo_pgsql") {
        $sqlfile = MODULE_PATH . "/ser/mod.install.siremis.pgsql.sql";
    } else {
        $sqlfile = MODULE_PATH . "/ser/mod.install.siremis.sql";
    }
    if (!file_exists($sqlfile)) {
        return true;
    }
    // Getting the SQL file content
    $query = trim(file_get_contents($sqlfile));
    if (empty($query)) {
        return true;
    }
    // $db = BizSystem::dbConnection("Serdb");
    $db = siremisConnectDB();
    include_once MODULE_PATH . "/system/lib/MySQLDumpParser.php";
    $queryArr = MySQLDumpParser::parse($query);
    foreach ($queryArr as $query) {
        try {
            $db->exec($query);
        } catch (Exception $e) {
            BizSystem::log(LOG_DEBUG, "SIREMIS", $e->getMessage());
            echo 'ERROR: ' . $e->getMessage();
            exit;
        }
    }
    return true;
}
开发者ID:que273,项目名称:siremis,代码行数:32,代码来源:siremisutil.php


示例19: putChildren

 public function putChildren($resource, $id, $childresource, $request, $response)
 {
     $roleId = $id;
     $reqArray = json_decode($request->getBody());
     $dataObj = BizSystem::getObject("system.do.AclRoleActionDO");
     // get actionIds and accessLevels from request
     foreach ($reqArray as $reqRecord) {
         $actionId = $reqRecord->Id;
         $accessLevel = $reqRecord->access_level;
         // if find the record, update it, or insert a new one
         try {
             $rs = $dataObj->directFetch("[role_id]={$roleId} AND [action_id]={$actionId}", 1);
             if (count($rs) == 1) {
                 if ($rs[0]['access_level'] != $accessLevel) {
                     // update
                     $recArr = $rs[0];
                     $recArr['access_level'] = $accessLevel;
                     $dataObj->updateRecord($recArr, $rs[0]);
                 }
             } else {
                 // insert
                 if ($accessLevel !== null && $accessLevel !== "") {
                     $recArr = array("role_id" => $roleId, "action_id" => $actionId, "access_level" => $accessLevel);
                     $dataObj->insertRecord($recArr);
                 }
             }
         } catch (BDOException $e) {
             $response->status(400);
             $response->body($e->getMessage());
         }
     }
     $response->body("Successfully update role access levels.");
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:33,代码来源:RoleRestService.php


示例20: UpdateRecord

 public function UpdateRecord()
 {
     $result = parent::UpdateRecord();
     $mappingObj = BizSystem::GetObject($this->m_CategoryMappingDO, 1);
     $Id = $this->m_RecordId;
     $mappingObj->deleteRecords("[cat_id]='{$Id}'");
     return $result;
 }
开发者ID:que273,项目名称:siremis,代码行数:8,代码来源:HelpCategoryForm.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Blade类代码示例发布时间:2022-05-23
下一篇:
PHP BitmapHandler类代码示例发布时间: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