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


PHP Accounts类代码示例

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


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

示例1: buildDocumentModel

 function buildDocumentModel()
 {
     global $app_strings;
     try {
         $model = parent::buildDocumentModel();
         $this->generateEntityModel($this->focus, 'Potentials', 'potential_', $model);
         $entity = new Accounts();
         if ($this->focusColumnValue('related_to')) {
             $entity->retrieve_entity_info($this->focusColumnValue('related_to'), 'Accounts');
         }
         $this->generateEntityModel($entity, 'Accounts', 'account_', $model);
         $entity = new Contacts();
         if ($this->focusColumnValue('contact_id')) {
             $entity->retrieve_entity_info($this->focusColumnValue('contact_id'), 'Contacts');
         }
         $this->generateEntityModel($entity, 'Contacts', 'contact_', $model);
         $this->generateUi10Models($model);
         $this->generateRelatedListModels($model);
         $model->set('potential_no', $this->focusColumnValue('potential_no'));
         $model->set('potential_owner', getUserFullName($this->focusColumnValue('assigned_user_id')));
         return $model;
     } catch (Exception $e) {
         echo '<meta charset="utf-8" />';
         if ($e->getMessage() == $app_strings['LBL_RECORD_DELETE']) {
             echo $app_strings['LBL_RECORD_INCORRECT'];
             echo '<br><br>';
         } else {
             echo $e->getMessage();
             echo '<br><br>';
         }
         return null;
     }
 }
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:33,代码来源:PotentialsPDFController.php

示例2: cancelSessions

 public function cancelSessions()
 {
     unset($_SESSION['accountID']);
     unset($_SESSION['toID']);
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     $accountIDs = $accounts->getAccountIDs();
     foreach ($accountIDs as $aID) {
         unset($_SESSION['transferSelectedAccount' . $aID]);
     }
     $accountPayees = new AccountPayees();
     $accountPayees->userID = $_SESSION['userID'];
     $toIDs = $accountPayees->getToIDs();
     foreach ($toIDs as $tID) {
         unset($_SESSION['transferSelectedAccountPayee' . $tID]);
     }
     if (isset($_SESSION['transferAmount'])) {
         unset($_SESSION['transferAmount']);
     }
     if (isset($_SESSION['transferDescription'])) {
         unset($_SESSION['transferDescription']);
     }
     if (isset($_SESSION['transferRemitter'])) {
         unset($_SESSION['transferRemitter']);
     }
     if (isset($_SESSION['transferDate'])) {
         unset($_SESSION['transferDate']);
     }
 }
开发者ID:s3444261,项目名称:assignment2,代码行数:29,代码来源:Transfer.php

示例3: create

 function create($name, $description = '')
 {
     $roomId = $this->db->insert('rooms', array('name' => $name, 'description' => $description, 'activity' => 0, 'locked' => 0, 'guest' => 0, 'deleted' => 0));
     // admin always has access
     $accounts = new Accounts();
     $admin = $accounts->getAdmin();
     $this->db->insert('user_permissions', array('room' => $roomId, 'user' => $admin['id']));
 }
开发者ID:radekstepan,项目名称:Clubhouse,代码行数:8,代码来源:Room.php

示例4: setAccountSelected

 public function setAccountSelected($accountID)
 {
     $accounts = new Accounts();
     $accountIDs = $accounts->getAccountIDs();
     foreach ($accountIDs as $aID) {
         unset($_SESSION['paySelectedAccount' . $aID]);
     }
     $_SESSION['paySelectedAccount' . $accountID] = 'selected="selected"';
 }
开发者ID:s3444261,项目名称:assignment2,代码行数:9,代码来源:Paymentamt.php

示例5: setAccountSelected

 public function setAccountSelected($accountID)
 {
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     $accountIDs = $accounts->getAccountIDs();
     foreach ($accountIDs as $aID) {
         unset($_SESSION['transferSelectedAccount' . $aID]);
     }
     $_SESSION['transferSelectedAccount' . $accountID] = 'selected="selected"';
 }
开发者ID:s3444261,项目名称:assignment2,代码行数:10,代码来源:CheckTransfer.php

示例6: getNetBalance

 public function getNetBalance()
 {
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     $nb = number_format($accounts->getNetBalance(), 2);
     if ($nb >= 0) {
         $nb = $nb . ' CR';
     } else {
         $nb = $nb . ' DR';
     }
     return $nb;
 }
开发者ID:s3444261,项目名称:assignment2,代码行数:12,代码来源:Summary.php

示例7: assertAccountCreated

 protected function assertAccountCreated()
 {
     $lead = Accounts::model()->findByAttributes(array('name' => 'testAccount'));
     $this->assertTrue($lead !== null);
     X2_TEST_DEBUG_LEVEL > 1 && println('account created');
     return $lead;
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:7,代码来源:WebLeadFormTest.php

示例8: calc

 private function calc($account_type)
 {
     $criteria = new CDbCriteria();
     $criteria->condition = "type = :type";
     $criteria->params = array(':type' => $account_type);
     $accounts = Accounts::model()->findAll($criteria);
     $sum = 0;
     $data = array();
     $data[] = array("id" => '', 'name' => Acctype::model()->getName($account_type), 'neg' => '', 'pos' => '', 'sum' => '', 'id6111' => '');
     $total = array("id" => '', 'name' => Yii::t("app", "Total"), 'neg' => 0, 'pos' => 0, 'sum' => 0, 'id6111' => '');
     foreach ($accounts as $account) {
         //echo $this->from_date.":00<br>";
         $sum = $account->getTotal($this->from_date . ":00", $this->to_date . ":00");
         $neg = $account->getNeg($this->from_date . ":00", $this->to_date . ":00");
         $pos = $account->getPos($this->from_date . ":00", $this->to_date . ":00");
         $total['sum'] += $sum;
         $total['neg'] += $neg;
         $total['pos'] += $pos;
         if ($sum != 0 || $neg != 0 || $pos != 0) {
             $data[] = array('id' => $account->id, 'name' => $account->name, 'neg' => $neg, 'pos' => $pos, 'sum' => $sum, 'id6111' => $account->id6111);
         }
     }
     $data[] = $total;
     return $data;
 }
开发者ID:hkhateb,项目名称:linet3,代码行数:25,代码来源:FormReportBalance.php

示例9: calc

 private function calc($account_type)
 {
     $criteria = new CDbCriteria();
     $criteria->condition = "type = :type";
     $criteria->params = array(':type' => $account_type);
     $accounts = Accounts::model()->findAll($criteria);
     $sum = 0;
     $data = array();
     $stime = "00:00:01";
     $etime = "23:59:59";
     $from_date = "01/01/{$this->year} {$stime}";
     $to_date = "31/12/{$this->year} {$etime}";
     foreach ($accounts as $account) {
         $sum = $account->getTotal($from_date, $to_date);
         if ($sum != 0) {
             $accounty = array('id' => $account->id, 'name' => $account->name, 'sum' => $sum, 'id6111' => $account->id6111);
             for ($x = 1; $x <= 12; $x++) {
                 if ($x <= 9) {
                     $a = "0{$x}";
                 } else {
                     $a = $x;
                 }
                 $last = 31;
                 while (!checkdate($x, $last, $this->year)) {
                     $last--;
                 }
                 $accounty[$x] = $account->getTotal("01/{$a}/{$this->year} {$stime}", "{$last}/{$a}/{$this->year} {$etime}");
             }
             $data[] = $accounty;
         }
     }
     return $data;
 }
开发者ID:hkhateb,项目名称:linet3,代码行数:33,代码来源:FormMincout.php

示例10: createAction

 public function createAction()
 {
     $this->view->disable();
     $status = "OK";
     $params = json_decode(file_get_contents('php://input'));
     $model = Accounts::findFirst("name='{$params->name}'");
     if ($model == null) {
         $model = new Accounts();
         $model->group = $params->group;
         $model->name = $params->name;
         $model->email = $params->email;
         $model->pm = $params->pm;
         $model->save();
     }
     echo json_encode(array("status" => $status));
 }
开发者ID:vietdh85,项目名称:vh-utility,代码行数:16,代码来源:AccountsController.php

示例11: UpdateAccount

 public function UpdateAccount()
 {
     $account = Accounts::model()->findByPk(Yii::app()->user->getAccountid());
     $model = new TimezoneForm();
     $model->timezone = $account->timezone_id;
     $model->account_id = $account->account_id;
     return $model;
 }
开发者ID:lanzelotik,项目名称:celestic-community,代码行数:8,代码来源:TimezoneForm.php

示例12: loadModel

 public function loadModel($id)
 {
     $model = Accounts::model()->visible()->with('role_groups')->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
开发者ID:thehiddennepali,项目名称:Sample-Code,代码行数:8,代码来源:AccountsController.php

示例13: getSrcTax

 public function getSrcTax($id)
 {
     $model = Accounts::model()->findByPk($id);
     if ($model === null) {
         return false;
     } else {
         return $model->src_tax;
     }
 }
开发者ID:hkhateb,项目名称:linet3,代码行数:9,代码来源:Accounts.php

示例14: actionIndex

 public function actionIndex()
 {
     Yii::import("application.models.*");
     set_time_limit(0);
     $accounts = Accounts::model()->findAll();
     foreach ($accounts as $currentValue) {
         $currentValue->checkWebsiteStatus();
     }
 }
开发者ID:branJakJak,项目名称:dienSiSystem,代码行数:9,代码来源:WebsiteCheckerCommand.php

示例15: masterAdmin

 public static function masterAdmin()
 {
     $result = false;
     $reader = Accounts::model()->findAll();
     if (count($reader) > 0) {
         $result = true;
     }
     return $result;
 }
开发者ID:lanzelotik,项目名称:celestic-community,代码行数:9,代码来源:AppTools.php


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