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


PHP BizSystem::GetProfileName方法代码示例

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


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

示例1: ShareRecord

 public function ShareRecord()
 {
     $prtForm = $this->m_ParentFormName;
     if (!$prtForm) {
         return;
     }
     $prtFormObj = BizSystem::GetObject($prtForm);
     $recId = $this->m_ParentRecordId;
     $dataObj = $prtFormObj->getDataObj();
     $dataRec = $dataObj->fetchById($recId);
     $recArr = $this->readInputRecord();
     $DataRec = $dataRec;
     $DataRecOld = $dataRec;
     $currentRecord = $DataRecOld->toArray();
     //notice users has new shared data
     //test if changed a new owner
     if ($recArr['notify_user']) {
         $data = $this->fetchData();
         $data['app_index'] = APP_INDEX;
         $data['app_url'] = APP_URL;
         $data['operator_name'] = BizSystem::GetProfileName(BizSystem::getUserProfile("Id"));
         $emailSvc = BizSystem::getService(USER_EMAIL_SERVICE);
         if ($DataRec['owner_id'] != $recArr['owner_id']) {
             $emailSvc->DataAssignedEmail($recArr['owner_id'], $data);
         }
         //test if changes for group level visiable
         if ($recArr['group_perm'] >= 1) {
             $group_id = $recArr['group_id'];
             $userList = $this->_getGroupUserList($group_id);
             foreach ($userList as $user_id) {
                 $emailSvc->DataSharingEmail($user_id, $data);
             }
         }
         //test if changes for other group level visiable
         if ($recArr['other_perm'] >= 1) {
             $groupList = $this->_getGroupList();
             foreach ($groupList as $group_id) {
                 if ($recArr['group_id'] == $group_id) {
                     continue;
                 }
                 $userList = $this->_getGroupUserList($group_id);
                 foreach ($userList as $user_id) {
                     $emailSvc->DataSharingEmail($user_id, $data);
                 }
             }
         }
     }
     if (isset($recArr['group_perm'])) {
         $DataRec['group_perm'] = $recArr['group_perm'];
     }
     if (isset($recArr['other_perm'])) {
         $DataRec['other_perm'] = $recArr['other_perm'];
     }
     if (isset($recArr['group_id'])) {
         $DataRec['group_id'] = $recArr['group_id'];
     }
     if (isset($recArr['owner_id'])) {
         $DataRec['owner_id'] = $recArr['owner_id'];
     }
     if (isset($recArr['create_by'])) {
         $DataRec['create_by'] = $recArr['create_by'];
         $DataRec['update_by'] = $recArr['create_by'];
         $DataRec['update_time'] = date('Y-m-d H:i:s');
     }
     $DataRec->save();
     $inputRecord = $recArr;
     //$prtFormObj->getDataObj()->updateRecord($newDataRec,$dataRec);
     //save change log
     $postFields = $_POST;
     $elem_mapping = array();
     foreach ($postFields as $elem_name => $value) {
         $elem = $this->m_DataPanel->get($elem_name);
         $fld_name = $elem->m_FieldName;
         if ($elem) {
             $elem_mapping[$fld_name] = $elem;
         }
     }
     $logDO = $dataObj->getRefObject($this->m_LogDO);
     if ($logDO) {
         $cond_column = $logDO->m_Association['CondColumn'];
         $cond_value = $logDO->m_Association['CondValue'];
         if ($cond_column) {
             $type = $cond_value;
         }
         $foreign_id = $currentRecord['Id'];
         $logRecord = array();
         foreach ($inputRecord as $fldName => $fldVal) {
             $oldVal = $currentRecord[$fldName];
             if ($oldVal == $fldVal) {
                 continue;
             }
             if ($oldVal === null || $fldVal === null) {
                 continue;
             }
             $elem = $elem_mapping[$fldName]->m_XMLMeta;
             if (!$elem) {
                 $elem = $this->m_DataPanel->getByField($fldName)->m_XMLMeta;
             }
             $logRecord[$fldName] = array('old' => $oldVal, 'new' => $fldVal, 'element' => $elem);
         }
//.........这里部分代码省略.........
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:101,代码来源:DataSharingForm.php

示例2: SendEmailToContact

 public function SendEmailToContact($template_name, $recipient_contact_id, $data)
 {
     //init email info
     $template = $this->m_Tempaltes[$template_name]["TEMPLATE"];
     $subject = $this->m_Tempaltes[$template_name]["TITLE"];
     $sender = $this->m_Tempaltes[$template_name]["EMAILACCOUNT"];
     //render the email tempalte
     $data['app_index'] = APP_INDEX;
     $data['app_url'] = APP_URL;
     $data['operator_name'] = BizSystem::GetProfileName($data['create_by']);
     $data['operator_email'] = BizSystem::GetProfileEmail($data['create_by']);
     $data['refer_url'] = SITE_URL;
     //prepare recipient info
     $userObj = BizSystem::getObject("contact.do.ContactSystemDO");
     $userData = $userObj->directFetch("[Id]='" . $recipient_contact_id . "'", 1);
     if (!count($data)) {
         return false;
     }
     $userData = $userData[0];
     $recipient['email'] = $userData['email'];
     $recipient['name'] = $userData['display_name'];
     $data['contact_display_name'] = $userData['display_name'];
     $tplFile = BizSystem::getTplFileWithPath($template, "email");
     $content = $this->renderEmail($data, $tplFile);
     if ($userData['email'] == '') {
         //if no email address , then do nothing
         return;
     }
     //send it to the queue
     $result = $this->sendEmail($sender, $recipient, $subject, $content);
     return $result;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:32,代码来源:userEmailService.php

示例3: ShareRecord

 public function ShareRecord()
 {
     $prtForm = $this->m_ParentFormName;
     $prtFormObj = BizSystem::GetObject($prtForm);
     $recId = $this->m_RecordId;
     $dataObj = $prtFormObj->getDataObj();
     $dataRec = $dataObj->fetchById($recId);
     $recArr = $this->readInputRecord();
     $DataRec = $dataRec;
     //notice users has new published data
     //test if changed a new owner
     if ($recArr['notify_user'] && $recArr['group_perm']) {
         $data = $this->fetchData();
         $data['app_index'] = APP_INDEX;
         $data['app_url'] = APP_URL;
         $data['operator_name'] = BizSystem::GetProfileName(BizSystem::getUserProfile("Id"));
         $emailSvc = BizSystem::getService(USER_EMAIL_SERVICE);
         //test if changes for group level visiable
         if ($recArr['group_perm'] >= 1) {
             $group_id = $recArr['group_id'];
             $userList = $this->_getGroupUserList($group_id);
             foreach ($userList as $user_id) {
                 $emailSvc->DataPublishEmail($user_id, $data);
             }
         }
         //test if changes for other group level visiable
         if ($recArr['other_perm'] >= 1) {
             $groupList = $this->_getGroupList();
             foreach ($groupList as $group_id) {
                 $userList = $this->_getGroupUserList($group_id);
                 foreach ($userList as $user_id) {
                     $emailSvc->DataPublishEmail($user_id, $data);
                 }
             }
         }
     }
     if (isset($recArr['group_perm'])) {
         $DataRec['group_perm'] = $recArr['group_perm'];
     }
     if (isset($recArr['other_perm'])) {
         $DataRec['other_perm'] = $recArr['other_perm'];
     }
     if (isset($recArr['group_id'])) {
         $DataRec['group_id'] = $recArr['group_id'];
     }
     if (isset($recArr['owner_id'])) {
         $DataRec['owner_id'] = $recArr['owner_id'];
     }
     if ($DataRec['group_perm'] == '0') {
         $DataRec['other_perm'] = '0';
     }
     $DataRec->save();
     //$prtFormObj->getDataObj()->updateRecord($newDataRec,$dataRec);
     if ($recArr['update_ref_data']) {
         if ($dataObj->m_ObjReferences->count()) {
             $this->_casacadeUpdate($dataObj, $recArr);
         }
     }
     if ($this->m_ParentFormName) {
         $this->close();
         $this->renderParent();
     }
     $this->processPostAction();
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:64,代码来源:DataPublishingForm.php


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