本文整理汇总了PHP中LBApplication::render方法的典型用法代码示例。如果您正苦于以下问题:PHP LBApplication::render方法的具体用法?PHP LBApplication::render怎么用?PHP LBApplication::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LBApplication
的用法示例。
在下文中一共展示了LBApplication::render方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionCreate
public function actionCreate()
{
$model = new LbPayment();
$lbInvoiceModel = new LbInvoice();
$customer_id = 0;
if (isset($_GET['id']) && $_GET['id'] != "") {
$customer_id = $_GET['id'];
}
LBApplication::render($this, 'create', array('model' => $model, 'lbInvoiceModel' => $lbInvoiceModel, 'customer_id' => $customer_id));
}
示例2: actionIndex
public function actionIndex()
{
$taxModel = LbTax::model()->getTaxes();
$list = UserList::model()->getList();
$translate = Translate::model()->search();
$translate = new Translate('search');
$translate->unsetAttributes();
// clear any default values
if (isset($_GET['Translate'])) {
$translate->attributes = $_GET['Translate'];
}
LBApplication::render($this, 'index', array('taxModel' => $taxModel, 'list' => $list, 'translate' => $translate));
// $this->render('index');
}
示例3: actionCreate
/**
* Creates a new model.
* If creation is successful, the browser will be redirected to the 'view' page.
*/
public function actionCreate()
{
$model = new LbCustomerAddress();
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
$customer_id = $_REQUEST['customer_id'];
if (isset($_POST['LbCustomerAddress'])) {
$model->attributes = $_POST['LbCustomerAddress'];
$model->lb_customer_id = $customer_id;
if ($model->save()) {
Yii::app()->request->redirect(Yii::app()->createUrl('lbCustomer/default/view', array('id' => $customer_id)));
}
}
LBApplication::render($this, 'create', array('model' => $model, 'customer_id' => $customer_id));
}
示例4: actionUpdateTax
public function actionUpdateTax($id)
{
$model = LbTax::model()->findByPk($id);
if (isset($_POST['LbTax'])) {
$model->attributes = $_POST['LbTax'];
$lbtax_arr = $_POST['LbTax'];
if (!($tax = LbTax::model()->IsNameTax($lbtax_arr['lb_tax_name'], $id))) {
LBApplication::render($this, '_form_update_tax', array('model' => $model, 'error' => 'Tax Name Exist'));
} else {
if ($model->save()) {
$this->redirect($this->createUrl('/' . LBApplication::getCurrentlySelectedSubscription() . '/configuration'));
}
}
}
LBApplication::render($this, '_form_update_tax', array('model' => $model, 'error' => ''));
}
示例5: ActionCreateAddress
public function ActionCreateAddress($id)
{
$addressModel = LbCustomerAddress();
LBApplication::render($this, '_form_new_address', array('addressModel' => $addressModel));
}
示例6: actionDashboard
public function actionDashboard()
{
LBApplication::render($this, 'dashboard', array());
}
示例7: actionListPayment
public function actionListPayment()
{
LBApplication::render($this, 'form_list_payment', array());
}
示例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: actionDashboard
/**
* Display info dasdboard.
*/
public function actionDashboard()
{
$model = new LbInvoice('search');
$model->unsetAttributes();
// clear any default values
$invoiceModel = new LbQuotation();
if (isset($_GET['LbInvoice'])) {
$model->attributes = $_GET['LbInvoice'];
}
LBApplication::render($this, 'dashboard', array('model' => $model, 'quotationModel' => $invoiceModel));
}
示例10: actionListEx
function actionListEx()
{
$model = new LbExpenses();
LBApplication::render($this, 'listExpenses.php', array('model' => $model));
}
示例11: actionAjaxQuickCreateTax
public function actionAjaxQuickCreateTax($id)
{
$model = new LbTax();
$submission_type = isset($_GET['form_type']) ? $_GET['form_type'] : 'default';
$quotationModel = LbQuotation::model()->findByPk($id);
if (isset($_POST['LbTax'])) {
$model->attributes = $_POST['LbTax'];
$lbtax_arr = $_POST['LbTax'];
if (!LbTax::model()->IsNameTax($lbtax_arr['lb_tax_name'])) {
$error['error'] = "Tax Name Exist.";
LBApplication::renderPlain($this, array('content' => CJSON::encode($error)));
return false;
}
if ($model->save()) {
$result['yes'] = true;
if ($submission_type == 'ajax') {
// auto add this tax item into this invoice
$quotaitonTax = new LbQuotationTax();
if ($quotaitonTax->addTaxToQuotation($id, $model)) {
$this->actionAjaxUpdateTaxs($id);
}
// print json result of this quotation item
//LBApplication::renderPlain($this, array('content'=>CJSON::encode($result)));
return true;
}
}
}
$submission_details = array();
$submission_details["type"] = $submission_type;
LBApplication::render($this, '_form_tax', array('model' => $model, 'quotationModel' => $quotationModel, 'submission_details' => $submission_details));
}
示例12: actionDashboard
public function actionDashboard()
{
$model = new LbContracts();
LBApplication::render($this, 'dashboard', array('model' => $model));
}
示例13: actionaddPayment
public function actionaddPayment()
{
$model = new LbPaymentVendor();
$lbInvoiceModel = new LbInvoice();
$customer_id = 0;
if (isset($_GET['id']) && $_GET['id'] != "") {
$customer_id = $_GET['id'];
}
// $this->render('createPayment',array(
// 'model'=>$model,
// 'customer_id'=>$customer_id
// ));
LBApplication::render($this, 'createPayment', array('model' => $model, 'customer_id' => $customer_id));
}
示例14: actionAssignInvoice
public function actionAssignInvoice()
{
$expenses_id = isset($_REQUEST['expenses_id']) ? $_REQUEST['expenses_id'] : 0;
$expensesModel = LbExpenses::model()->findByPk($expenses_id);
$invoiceModel = new LbInvoice('search');
$invoiceModel->unsetAttributes();
if (isset($_GET['LbInvoice'])) {
$invoiceModel->attributes = $_GET['LbInvoice'];
}
$invoice_id = Yii::app()->request->getParam('invoice_id');
if (isset($invoice_id) && is_array($invoice_id) && count($invoice_id) > 0) {
foreach ($invoice_id as $invoice) {
if ($invoice > 0) {
if (isset($expenses_id) && $expenses_id > 0) {
$expensesInvoice = new LbExpensesInvoice();
$expensesInvoice->lb_expenses_id = $expenses_id;
$expensesInvoice->lb_invoice_id = $invoice;
$expensesInvoice->save();
}
}
}
}
LBApplication::render($this, '_assign_invoice', array('invoiceModel' => $invoiceModel, 'expensesModel' => $expensesModel));
}
示例15: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
$model = new AccountInvitation('search');
$model->unsetAttributes();
// clear any default values
$model->account_invitation_master_id = Yii::app()->user->id;
if (isset($_GET['AccountInvitation'])) {
$model->attributes = $_GET['AccountInvitation'];
}
LBApplication::render($this, 'admin', array('model' => $model));
/**
$this->render('admin',array(
'model'=>$model,
));**/
}