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


PHP SessionManager::GetUsername方法代码示例

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


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

示例1: footer

    public function footer()
    {
        echo '
				<div class="invfoot">
			      <div class="signature">
			        <p>Report Pulled By: <b>' . SessionManager::GetUsername() . '</b></p>
			      </div>
			      <div class="row" style="line-height:13px;font-size:10px;border-top: 2px solid #e4e4e4;padding-top:5px">
			        <div class="col-md-4 text-left">Copyright © ' . date('Y') . ' ' . $this->company->name . '</div>
			        <div class="col-md-8 text-right">Momentum ERP by <br><a href="#">QET Systems Ltd</a> [www.qet.co.ke]
			      </div> 
			    </div>			    
			   </div>
			  </div>
			</div>
			</div>
			<script type="text/javascript">
			  //window.print();
			  //window.onfocus=function(){ window.close();}
			</script>
			</body>
			</html>';
    }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:23,代码来源:reports.php

示例2: update

 public function update()
 {
     try {
         $sql = 'UPDATE payments SET cashier = "' . SessionManager::GetUsername() . '", datetime = "' . $this->date . '", stamp = ' . $this->stamp . ' WHERE id = ' . $this->id;
         DatabaseHandler::Execute($sql);
         return true;
     } catch (Exception $e) {
         return false;
     }
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:10,代码来源:DomainSCM.php

示例3: __construct

 function __construct($id, $txTypeName, $txId, $amount, $description, $date, $stamp)
 {
     $this->id = $id;
     $this->type = $txTypeName;
     $this->transactionId = $txId;
     $this->amount = $amount;
     $this->description = $description;
     $this->date = $date;
     $this->stamp = $stamp;
     $this->user = SessionManager::GetUsername();
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:11,代码来源:Accounting.php

示例4: __construct

 function __construct($quoteId, $date, $clientId, $amount, $tax, $total, $user)
 {
     $this->id = $quoteId;
     $this->transactionId = $quoteId;
     $this->date = $date;
     $this->type = 'Quotation';
     $this->party = Client::GetClient($clientId);
     $this->amount = floatval($amount);
     $this->tax = floatval($tax);
     $this->total = floatval($total);
     $this->description = 'Quotation for ' . $this->party->name;
     if (is_null($user)) {
         $this->user = SessionManager::GetUsername();
     } else {
         $this->user = $user;
     }
     $this->lineItems = QuotationLine::GetQuoteItems($quoteId);
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:18,代码来源:DomainAccounting.php

示例5: RecoverAdvance

    public static function RecoverAdvance($empid, $month)
    {
        try {
            $employee = Employee::GetEmployee(intval($empid));
            $descr = "Advance recovered from " . $month . " salary.";
            //$d = explode('/', $date);
            //$month = $d[1].'/'.$d[2];
            $sql2 = 'SELECT * FROM advances_and_loans WHERE party_id = ' . $empid . ' and type = "Salary Advance" ORDER BY id DESC LIMIT 0,1';
            $entry = DatabaseHandler::GetRow($sql2);
            if (!empty($entry)) {
                $amount = $entry['balance'];
            } else {
                $amount = 0.0;
            }
            $amount = floatval($amount);
            if ($amount != 0.0) {
                $ledger = Account::GetAccount('PAYROLL');
                $sql = 'INSERT INTO advances_and_loans (party_id, month, type, effect, amount, ledger_id, balance, description) VALUES 
				(' . $employee->id . ', "' . $month . '", "Salary Advance", "cr", ' . $amount . ', ' . $ledger->ledgerId . ', 0.00, "Advance recovered from ' . $month . ' salary.")';
                DatabaseHandler::Execute($sql);
                $sqlb = 'SELECT * FROM payroll_entries WHERE party_id = ' . $empid . ' ORDER BY id DESC LIMIT 0,1';
                $latest = DatabaseHandler::GetRow($sqlb);
                $ladgerac = Account::GetAccount('LOANS AND ADVANCES');
                $sqla = 'INSERT INTO payroll_entries (party_id, month, type, effect, amount, ledger_id,description) VALUES 
				(' . $employee->id . ', "' . $month . '", "Salary Advance", "dr", ' . $amount . ', ' . $ladgerac->ledgerId . ', "Salary Advance for ' . $month . '.")';
                DatabaseHandler::Execute($sqla);
                $sql2 = 'SELECT * FROM payroll_entries WHERE party_id = ' . $empid . ' ORDER BY id DESC LIMIT 0,1';
                $entry = DatabaseHandler::GetRow($sql2);
                Logger::Log('Payroll', 'Passed', 'Salary advance for employee id: ' . $employee->id . ' for ' . $month . ' recovered');
                //return new PayrollTX($payment, 'Salary Payment');
                $txtype = AdvancesAndLoans::Recover($ledger->ledgerId, 'Advance Recovery');
                $tx = PayrollTX::Initialize($entry, $txtype, 'payroll_entries');
                $tx->post();
                $sql = 'UPDATE advances_and_loans SET tx_id = ' . $tx->transactionId . ', user = "' . SessionManager::GetUsername() . '", datetime = "' . $tx->date . '", stamp = ' . $tx->stamp . ' WHERE id = ' . $latest['id'];
                DatabaseHandler::Execute($sql);
            } else {
            }
        } catch (Exception $e) {
            Logger::Log('Payroll', 'Failed', 'Salary advance for employee id: ' . $employee->id . ' for ' . $month . ' could not be recovered');
        }
    }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:41,代码来源:DomainHRM.php


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