本文整理汇总了PHP中Accounts类的典型用法代码示例。如果您正苦于以下问题:PHP Accounts类的具体用法?PHP Accounts怎么用?PHP Accounts使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Accounts类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: getTotal
public function getTotal($from_date, $to_date)
{
$sum = 0;
$criteria = new CDbCriteria();
$criteria->condition = "type = :type";
$criteria->params = array(':type' => $this->id);
$accounts = Accounts::model()->findAll($criteria);
foreach ($accounts as $account) {
$sum += $account->getTotal($from_date, $to_date);
}
return $sum;
}
开发者ID:hkhateb,项目名称:linet3,代码行数:12,代码来源:Acctype.php
示例17: create
public function create()
{
$account = new Accounts();
$account->account_name = date("mdYGis");
if ($account->save(false)) {
$user = new Users();
$user->user_name = $this->user_name;
$user->user_lastname = $this->user_lastname;
$user->user_email = strtolower($this->user_email);
$user->user_admin = 1;
$user->user_active = 1;
$user->user_accountManager = 1;
$user->account_id = $account->primaryKey;
$passBeforeMD5 = $this->user_password;
$user->user_password = md5($this->user_password);
if ($user->save(false)) {
/*$auth=Yii::app()->authManager;
$auth->assign('SuperUser',$user->primaryKey, 'return !Yii::app()->user->isGuest;', 'N;');
$str = Yii::app()->controller->renderPartial('//templates/account/registration',array(
'user' => $user,
'passBeforeMD5' => $passBeforeMD5,
'applicationName' => Yii::app()->name,
'applicationUrl' => "http://".$_SERVER['SERVER_NAME'].Yii::app()->request->baseUrl,
),true);
$subject = Yii::t('email','NewAccountRegistration');
Yii::import('application.extensions.phpMailer.yiiPhpMailer');
$mailer = new yiiPhpMailer;
$mailer->Ready($subject, $str, array('name'=>$user->CompleteName,'email'=>$user->user_email), Emails::PRIORITY_NORMAL);
*/
return true;
} else {
return false;
}
} else {
return false;
}
}
开发者ID:lanzelotik,项目名称:celestic-community,代码行数:40,代码来源:RegisterForm.php
示例18: rote
function rote($login, $a)
{
switch (array_shift($a)) {
case 'account':
require 'Accounts.php';
$ctr = new Accounts($login);
$res = $ctr->process($a, $_GET, $_POST);
echo is_string($res) ? $res : json_encode($res);
break;
case 'utils':
require 'Utils.php';
$ctr = new Utils($login);
$res = $ctr->process($a, $_GET);
echo is_string($res) ? $res : json_encode($res);
break;
case 'server_url':
$out = new stdClass();
$out->success = $_SERVER['SERVER_NAME'];
echo json_encode($out);
break;
case 'LOG':
echo json_encode(error_log(date("Y-m-d H:i:s") . "\r\n" . file_get_contents("php://input"), 3, '../logs/app_log' . Login::getId() . '.log'));
break;
case 'ERROR':
echo json_encode(error_log(date("Y-m-d H:i:s") . "\r\n" . file_get_contents("php://input"), 3, '../logs/app_error' . Login::getId() . '.log'));
break;
case 'EMAIL':
$headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
echo json_encode(error_log(date("Y-m-d H:i:s") . "\r\n" . file_get_contents("php://input"), 1, '[email protected]', $headers));
break;
case 'save_file':
$file_name = explode('/', $_GET['file_name'])[0];
echo file_put_contents('../data/' . $file_name, file_get_contents("php://input"));
break;
case 'login':
$res = $this->login->process($a, $_GET);
echo is_string($res) ? $res : json_encode($res);
break;
}
}
开发者ID:vladvaldtitov,项目名称:dsuper,代码行数:40,代码来源:Router.php
示例19: cancelSessions
public function cancelSessions()
{
unset($_SESSION['payAccountID']);
unset($_SESSION['payBillerID']);
unset($_SESSION['payBillerCode']);
unset($_SESSION['payBillerName']);
unset($_SESSION['payBillerNickname']);
unset($_SESSION['payCustomerRef']);
$accounts = new Accounts();
$accounts->userID = $_SESSION['userID'];
$accountIDs = $accounts->getAccountIDs();
foreach ($accountIDs as $aID) {
unset($_SESSION['paySelectedAccount' . $aID]);
}
$billers = new Billers();
$billers->userID = $_SESSION['userID'];
$billerIDs = $billers->getBillerIDs();
foreach ($billerIDs as $bID) {
unset($_SESSION['paySelectedBiller' . $bID]);
}
if (isset($_SESSION['payAmount'])) {
unset($_SESSION['payAmount']);
}
if (isset($_SESSION['payDate'])) {
unset($_SESSION['payDate']);
}
if (isset($_SESSION['payAccount'])) {
unset($_SESSION['payAccount']);
}
if (isset($_SESSION['payStatus'])) {
unset($_SESSION['payStatus']);
}
if (isset($_SESSION['payConf'])) {
unset($_SESSION['payConf']);
}
if (isset($_SESSION['payCreated'])) {
unset($_SESSION['payCreated']);
}
}
开发者ID:s3444261,项目名称:assignment2,代码行数:39,代码来源:Payment.php
示例20: findByPk
public function findByPk($id, $condition = '', $params = array())
{
$model = parent::findByPk($id, $condition = '', $params = array());
if ($model !== null) {
$incomeMap = UserIncomeMap::model()->findByPk(array('user_id' => Yii::app()->user->id, 'itemVatCat_id' => $model->itemVatCat_id));
if ($incomeMap !== null) {
$model->vat = Accounts::model()->getSrcTax($incomeMap->account_id);
} else {
$model->vat = 0;
}
}
return $model;
}
开发者ID:hkhateb,项目名称:linet3,代码行数:13,代码来源:Item.php
注:本文中的Accounts类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论