本文整理汇总了PHP中LBApplication类的典型用法代码示例。如果您正苦于以下问题:PHP LBApplication类的具体用法?PHP LBApplication怎么用?PHP LBApplication使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LBApplication类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionAjaxLoadFormViewPayment
function actionAjaxLoadFormViewPayment()
{
//LBApplication::renderPartial($this, '_form_view_payment', array());
$model = new LbPayment();
$lbInvoiceModel = new LbInvoice();
LBApplication::renderPartial($this, '_form_view_payment', array('model' => $model, 'lbInvoiceModel' => $lbInvoiceModel));
}
示例2: function
$("#hidden-quotation-customer-id").val(newValue);
}', 'onShown' => 'js: function() {
var $tip = $(this).data("editableContainer").tip();
var dropdown = $tip.find("select");
$(dropdown).bind("change", function(e){
onChangeCustomerDropdown(e,' . $model->lb_record_primary_key . ');
});
}', 'options' => array('sourceCache' => false), 'htmlOptions' => array('id' => 'LbInvoice_quotation_customer_id_' . $model->lb_record_primary_key)));
$custoemr_id = 0;
$custoemr_name = "";
if ($model->lb_quotation_customer_id) {
$custoemr_id = $model->lb_quotation_customer_id;
$custoemr_name = str_replace(' ', '-', $model->customer->lb_customer_name);
}
if ($custoemr_id > 0) {
echo ' <a id="user" href="' . $this->createUrl('/' . LBApplication::getCurrentlySelectedSubscription() . '/lbCustomer/' . $model->lb_quotation_customer_id . '-' . $custoemr_name) . '"><i class="icon-search"></i></a>';
} else {
echo ' <a id="user"><i class="icon-search"></i></a>';
}
?>
</div>
</div>
<div id="container-quotation-customer-address">
<div class="field-label-left"><?php
echo Yii::t('lang', 'Billing Address');
?>
:</div>
<div class="field-value-left">
<?php
$this->widget('editable.EditableField', array('type' => 'select', 'model' => $model, 'attribute' => 'lb_quotation_customer_address_id', 'emptytext' => 'Choose address', 'url' => $model->getActionURLNormalized('ajaxUpdateField'), 'source' => $this->createUrl('/lbCustomerAddress/default/dropdownJSON', array('allow_add' => YES, 'quotation_id' => $model->lb_record_primary_key)), 'placement' => 'right', 'display' => 'js: function(value, sourceData) {
示例3: actiondropdownJSONCategory
public function actiondropdownJSONCategory($vendor_id = false, $vendor_invoice_id = false)
{
$vendor_id = isset($_GET['vendor_id']) ? $_GET['vendor_id'] : 0;
$quotation_id = isset($_GET['vendor_invoice_id']) ? $_GET['vendor_invoice_id'] : 0;
$category_arr = SystemList::model()->getItemsForListCode('expenses_category', LbVendor::LB_QUERY_RETURN_TYPE_DROPDOWN_ARRAY);
$category_arr = SystemList::model()->findAll('system_list_code = "expenses_category"');
$ordered_results = array();
$ordered_results[0] = array('value' => '0', 'text' => 'Choose category') + $ordered_results;
foreach ($category_arr as $value) {
$ordered_results[] = array('value' => $value['system_list_item_id'], 'text' => $value['system_list_item_name']);
}
LBApplication::renderPlain($this, array('content' => CJSON::encode($ordered_results)));
}
示例4: getFullName
/**
* GET FULL NAME
*
* @param number $account_id
* @return string|Ambigous <string, string>
*/
public function getFullName($account_id = 0)
{
$model = $this;
if ($account_id > 0) {
$profile = AccountProfile::model()->getProfile($account_id);
if ($profile) {
$model = $profile;
}
}
$name = $model->account_profile_given_name . " " . $model->account_profile_surname . ".";
if (trim($name) != '.') {
return LBApplication::encodeToUTF8($name);
}
return '';
}
示例5: array
<?php
$this->widget('bootstrap.widgets.TbTabs', array('type' => 'pills', 'encodeLabel' => false, 'tabs' => array(array('id' => 'tab1', 'label' => '<strong>' . Yii::t('lang', 'package') . '</strong>', 'content' => LBApplication::renderPartial($this, 'paypal.views.creditCard.index', array('value' => $subscription), true), 'active' => true), array('id' => 'tab2', 'label' => '<strong>' . Yii::t('lang', 'Subcriptions') . '</strong>', 'content' => 'Loading....', 'active' => false), array('id' => 'tab3', 'label' => '<strong>' . Yii::t('lang', 'User Subcription') . '</strong>', 'content' => 'Loading.....', 'active' => false)), 'events' => array('shown' => 'js:loadContent')));
?>
<script type="text/javascript">
function loadContent(e){
var tabId = e.target.getAttribute("href");
var ctUrl = '';
if(tabId == '#tab2') {
ctUrl = '<?php
echo $this->createUrl('/paypal/subscription/admin');
?>
';
} else if(tabId == '#tab3') {
ctUrl = '<?php
echo $this->createUrl('/paypal/userSubscription/admin');
?>
';
}
if(ctUrl != '') {
$.ajax({
url : ctUrl,
type : 'POST',
dataType : 'html',
cache : false,
success : function(html)
{
示例6: array
<?php
/* @var $this DefaultController */
// echo $model->lb_record_primary_key;
$m = $this->module->id;
$canView = BasicPermission::model()->checkModules($m, 'view');
if (!$canView) {
echo "Have no permission to see this record";
return;
}
echo '<div id="lb-container-header">';
echo '<div class="lb-header-right" ><h3>Report</h3></div>';
echo '<div class="lb-header-left">';
echo ' ';
echo '</div>';
echo '</div><br>';
$tab = "all";
if (isset($_GET['tab'])) {
$tab = $_GET['tab'];
}
$this->widget('bootstrap.widgets.TbTabs', array('type' => 'tabs', 'encodeLabel' => false, 'tabs' => array(array('id' => 'tab1', 'label' => '<strong>' . Yii::t('lang', 'Aging Report') . '</strong>', 'content' => LBApplication::renderPartial($this, '_form_aging_report', array(), true), 'active' => $tab == "aging_report" || $tab == "all" ? true : false), array('id' => 'tab2', 'label' => '<strong>' . Yii::t('lang', 'Cash Receipt') . '</strong>', 'content' => $this->renderPartial('_form_cash_receipt', array(), true), 'active' => $tab == "cash_receipt" ? true : false), array('id' => 'tab3', 'label' => '<strong>' . Yii::t('lang', 'Invoice Journal') . '</strong>', 'content' => $this->renderPartial('_form_invoice_journal', array(), true), 'active' => $tab == "invoice_journal" ? true : false), array('id' => 'tab4', 'label' => '<strong>' . Yii::t('lang', 'GST Report') . '</strong>', 'content' => $this->renderPartial('_form_gst_report', array(), true), 'active' => $tab == "gst_report" ? true : false), array('id' => 'tab5', 'label' => '<strong>' . Yii::t('lang', 'Sales Report') . '</strong>', 'content' => $this->renderPartial('_form_sale_report', array(), true), 'active' => $tab == "sales_report" ? true : false), array('id' => 'tab6', 'label' => '<strong>' . Yii::t('lang', 'Customer Statements') . '</strong>', 'content' => $this->renderPartial('_form_customer_statements', array(), true), 'active' => $tab == "customer_statement" ? true : false))));
示例7: array_diff
<?php
/* @var $this LbInvoiceController */
/* @var $model LbInvoice */
/* @var $ownCompany LbCustomer */
// header container div
echo '<div id="invoice-header-container" class="container-header" style="position: relative">';
//echo $model->lb_vendor_company_id;
echo '<div id="logo_wrapper" style="overflow:hidden;text-align: center;">';
// $company = (isset($model->owner) ? $model->lb_vendor_company_id : '');
$folder = 'images/logo/';
// $model=LbVendor::model()->findByPk($id);
$company = $model->lb_vd_invoice_company_id;
$path = YII::app()->baseUrl . "/images/logo/";
$filename = '';
$file_arr = array_diff(scandir($folder), array('.', '..'));
$subcription = LBApplication::getCurrentlySelectedSubscription();
foreach ($file_arr as $key => $file) {
$file_name = explode('.', $file);
$file_name_arr = explode('_', $file_name[0]);
// print_r($file_name_arr);
if ($file_name_arr[0] == $subcription && $file_name_arr[1] == $company) {
echo "<img src='" . $path . $file . "' style='max-height:120px' />";
}
}
$this->widget('ext.EAjaxUpload.EAjaxUpload', array('id' => 'uploadFile', 'config' => array('action' => $this->createUrl('uploadLogo', array('id' => $model->lb_record_primary_key, 'sub_cription' => $subcription, 'company_id' => $company)), 'allowedExtensions' => array("jpeg", "jpg", "gif", "png"), 'sizeLimit' => 10 * 1024 * 1024, 'minSizeLimit' => 1 * 1024, 'multiple' => true, 'onComplete' => "js:function(id, fileName, responseJSON){\n \$('#uploadFile .qq-upload-list').html('');\n //\$('#logo_wrapper img').attr('src','" . $path . "'+fileName);\n window,location.reload(true);\n }")));
echo '</div>';
//echo '<h3 id="po-number-container">'.$model->getDisplayPOStatus($model->lb_vendor_status).'</h3>';
echo '<div id="invoice-basic-info-container" style="float: left;width:36%;">';
echo '<h3 id="po-number-container">';
$this->widget('editable.EditableField', array('type' => 'text', 'model' => $model, 'attribute' => 'lb_vd_invoice_no', 'url' => LbVendor::model()->getActionURLNormalized('AjaxUpdateFieldVD'), 'placement' => 'right'));
echo '</h3><br />';
示例8: actionCreate
/**
* Creates a new model.
* If creation is successful, the browser will be redirected to the 'view' page.
*/
public function actionCreate()
{
// if user is already logged in
// redirect to dash board
if (!Yii::app()->user->isGuest) {
$this->redirect(array('project/index'));
}
$model = new Account();
//$companyModel = new Company();
//$companyContactModel = new CompanyContact();
$accountSubscriptionModel = new AccountSubscription();
$accountProfile = new AccountProfile();
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
/**
* Process form's submission
* param's name must be in this format, e.g. "Account[account_email]"
*/
if (isset($_POST['Account'])) {
$model->attributes = $_POST['Account'];
$model->account_id = null;
//$companyModel->attributes = $_POST['Company'];
//$companyContactModel->attributes = $_POST['CompanyContact'];
$accountSubscriptionModel->attributes = $_POST['AccountSubscription'];
$accountProfile->attributes = $_POST['AccountProfile'];
/**
$model->account_company_name = $companyModel->company_name;
$model->account_contact_surname = $companyContactModel->contact_surname;
$model->account_contact_given_name = $companyContactModel->contact_given_name;
$model->account_subscription_package_id = $accountSubscriptionModel->account_subscription_package_id;
**/
// SAVE ACCOUNT
//$model->account_password = $model->hashPassword($model->account_password);
$model->account_status = ACCOUNT_STATUS_ACTIVATED;
// ACCOUNT_STATUS_NOT_ACTIVATED;
$save_result = '';
// save user account record to database
$save_result = $model->save();
if ($save_result) {
// create/update subscription record
$accountSubscriptionModel->account_id = $model->account_id;
$accountSubscriptionModel->account_subscription_start_date = date('Y-m-d H:i');
$accountSubscriptionModel->account_subscription_status_id = 1;
$accountSubscriptionModel->save();
// create account profile
$accountProfile->account_id = $model->account_id;
$accountProfile->account_profile_preferred_display_name = $accountProfile->account_profile_given_name . ' ' . $accountProfile->account_profile_surname;
$accountProfile->save();
/**
// create company record
$companyModel->company_master_account_id = $model->account_id;
$companyModel->company_is_master = COMPANY_IS_MASTER;
// save company record to database,
// if successful, create contact record
if ($companyModel->save()) {
// create contact record
$companyContactModel->contact_email1 = $model->account_email;
$companyContactModel->company_id = $companyModel->company_id;
$companyContactModel->account_id = $model->account_id;
// save contact record to database
$companyContactModel->save();
}**/
// notify user through email
$model->sendSuccessfulSignupEmailNotification();
}
// redirect to view
if ($save_result) {
//$this->redirect(array('view','id'=>$model->account_id));
$this->redirect(Yii::app()->baseUrl . '/product/signup-success.php');
}
}
/**
* otherwise just show creation form
*/
$active_subscription_packages = SubscriptionPackage::getActivePackages();
$active_subscription_package_names = array();
foreach ($active_subscription_packages as $item) {
$active_subscription_package_names[$item->subscription_package_id] = $item->subscription_package_name;
}
$data = array('model' => $model, 'accountProfileModel' => $accountProfile, 'accountSubscriptionModel' => $accountSubscriptionModel, 'active_subscription_packages' => $active_subscription_package_names);
LBApplication::render($this, 'create', $data);
//$this->render('create',);
}
示例9: getSubscriptionId
public static function getSubscriptionId()
{
$subcription_id = LBApplication::getCurrentlySelectedSubscription();
// Truyen tham so subcription_id cua he thong tich hop vao day.
return $subcription_id;
}
示例10:
// print_r($invoice_total);
?>
<h5 style="margin: 20px 0px 5px 0px;font-weight: bold;">
<span>
<input class="pdf_checkbox" name="<?php
echo $data_invocie->lb_record_primary_key;
?>
" type="checkbox" value="<?php
echo $data_invocie->lb_record_primary_key;
?>
" />
</span>
<span style="text-decoration: underline;">
<?php
echo LBApplication::workspaceLink($data_invocie->lb_vd_invoice_no);
?>
</span>
<sapn style="margin-left: 65px;color: #000000; font-weight: normal">Total: <?php
echo $invoice_total->lb_vendor_last_outstanding;
?>
</span>
</h5>
<table border="0" width="100%" class="items table table-bordered">
<thead>
<tr>
<th width="250" class="lb-grid-header"><?php
echo Yii::t('lang', 'Amount Paid');
?>
</th>
<th width="150" class="lb-grid-header"><?php
示例11: actionajaxDeletePayment
function actionajaxDeletePayment()
{
if (isset($_GET['id'])) {
$payment_item_id = $_GET['id'];
}
//delete payment item
$payment = LbPaymentItem::model()->deleteByPk($payment_item_id);
$invoice_id = $_GET['invoice_id'];
$invoiceTotal = LbInvoiceTotal::model()->getInvoiceTotal($invoice_id);
$taxRecord['paid'] = $invoiceTotal->calculateInvoicetotalPaid($invoice_id);
$taxRecord['outstanding'] = $invoiceTotal->calculateInvoiceTotalOutstanding();
if ($invoiceTotal->calculateInvoiceTotalOutstanding() <= 0) {
$taxRecord['status'] = 'I_PAID';
} else {
$taxRecord['status'] = 'Open';
}
//update invoice total
// if($payment->delete())
// echo 'success';
LBApplication::renderPlain($this, array('content' => CJSON::encode($taxRecord)));
}
示例12: actionAddressLinesJSON
/**
* return the address lines in json format
*
* @param unknown $id
*/
public function actionAddressLinesJSON($id)
{
$model = $this->loadModel($id);
$address_lines = $model->formatAddressLines();
LBApplication::renderPartial($this, '//layouts/plain_ajax_content', array('content' => CJSON::encode($address_lines)));
}
示例13: actionajaxQuickCreateCurrency
public function actionajaxQuickCreateCurrency()
{
$invoice_id = isset($_REQUEST['invoice_id']) ? $_REQUEST['invoice_id'] : '';
// $model = LbInvoice::model()->findByPk($invoice_id);
$model = $this->loadModel($invoice_id);
$GeneraModel = new LbGenera();
if (isset($_POST['LbGenera'])) {
$GeneraModel->attributes = $_POST['LbGenera'];
if ($GeneraModel->save()) {
$model->lb_invoice_currency = $GeneraModel->lb_record_primary_key;
$model->save();
}
LBApplication::renderPlain($this, array('content' => CJSON::encode($GeneraModel)));
return true;
}
LBApplication::renderPartial($this, '_form_currency', array('model' => $model, 'GeneraModel' => $GeneraModel));
}
示例14: validateEmail
public function validateEmail()
{
if (LBApplication::isValidEmail($this->account_email) !== false) {
// find if this email is used by other account already or not
$account = Account::model()->find('account_id != :account_id AND account_email = :account_email', array(':account_id' => $this->account_id, ':account_email' => $this->account_email));
if ($account != null && $account->account_id > 0) {
$this->addError('account_email', 'This email is already used.');
} else {
return true;
}
} else {
$this->addError('account_email', 'This email is not a valid email: ' . $this->account_email);
}
return false;
}
示例15: array
}
?>
<div class="accordion-group">
<div class="accordion-heading" id="view_payment">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#form_view_payment">
<i></i>
<span style="color: #6E8900;font-size: 20px; font-weight: bold"><?php
echo Yii::t('lang', 'View Payment');
?>
</span>
</a>
</div>
<div id="form_view_payment" class="accordion-body collapse">
<div class="accordion-inner">
<?php
LBApplication::renderPartial($this, '_view_payment', array('customer_id' => $customer_id));
?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
// Style accodtion icon
//$('a:active i').addClass("icon-minus-sign");
//$('.accordion-body.in.collapse i').addClass("icon-plus-sign");
$('#new_payment i').addClass('icon-minus-sign');
$('#view_payment i').addClass('icon-plus-sign');
$('#form_new_payment').on('show', function () {
$('#new_payment i').removeClass();