• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP LBApplication类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了LBApplication类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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));
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:7,代码来源:DefaultController.php


示例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 '&nbsp;&nbsp;<a id="user" href="' . $this->createUrl('/' . LBApplication::getCurrentlySelectedSubscription() . '/lbCustomer/' . $model->lb_quotation_customer_id . '-' . $custoemr_name) . '"><i class="icon-search"></i></a>';
} else {
    echo '&nbsp;&nbsp;<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) {
开发者ID:heartshare,项目名称:linxbooks,代码行数:31,代码来源:_form.php


示例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)));
 }
开发者ID:keyeMyria,项目名称:linxbooks,代码行数:13,代码来源:DefaultController.php


示例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 '';
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:21,代码来源:AccountProfile.php


示例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)
            {
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:31,代码来源:index.php


示例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 '&nbsp;';
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))));
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:21,代码来源:index.php


示例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 />';
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:31,代码来源:_page_header.php


示例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',);
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:88,代码来源:AccountController.php


示例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;
 }
开发者ID:nhuhtlb,项目名称:linxbooks,代码行数:6,代码来源:DefaultController.php


示例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 
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:31,代码来源:_form_view_payment.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)));
 }
开发者ID:keyeMyria,项目名称:linxbooks,代码行数:21,代码来源:DefaultController.php


示例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)));
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:11,代码来源:DefaultController.php


示例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));
 }
开发者ID:nhuhtlb,项目名称:linxbooks,代码行数:17,代码来源:DefaultController.php


示例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;
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:15,代码来源:Account.php


示例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();
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:31,代码来源:createPayment.php


示例16:

<script language="javascript">
$(document).ready(function(){
	$('#contactable').contactable({
	    subject: 'I need help',
		url: '<?php 
echo Yii::app()->createUrl('site/contact');
?>
',
		name: 'Name',
		email: 'Email',
		dropdownTitle: 'Topic',
		dropdownOptions: ['General', 'Bug Report', 'Feature Request'],
		message: 'Message',
		submit: 'Send',
	});

	$("#linx-menu-item-selected-subscription").html(
			'<?php 
echo LBApplication::getShortName($selected_subscription_label, false, 10);
?>
');
                

        // very simple to use!
        $('.dropdown-toggle').dropdownHover().dropdown();

});
</script>
</body>
</html>
开发者ID:nhuhtlb,项目名称:linxbooks,代码行数:30,代码来源:main.php


示例17: checkModules

 public function checkModules($module_name, $per_value, $created_by = false)
 {
     $user_id = Yii::app()->user->id;
     $canAdd = BasicPermission::model()->checkPerModule($module_name, 'add');
     $canEditOwn = BasicPermission::model()->checkPerModule($module_name, 'update own');
     $canEditAll = BasicPermission::model()->checkPerModule($module_name, 'update all');
     $canDeleteOwn = BasicPermission::model()->checkPerModule($module_name, 'delete own');
     $canDeleteAll = BasicPermission::model()->checkPerModule($module_name, 'delete all');
     $canViewOwn = BasicPermission::model()->checkPerModule($module_name, 'view own');
     $canViewAll = BasicPermission::model()->checkPerModule($module_name, 'view all');
     $canListOwn = BasicPermission::model()->checkPerModule($module_name, 'list own');
     $canListAll = BasicPermission::model()->checkPerModule($module_name, 'list all');
     $ownSub = AccountSubscription::model()->checkIsSubscriptionOwner(LBApplication::getCurrentlySelectedSubscription());
     $result = false;
     if ($ownSub) {
         $result = true;
         if ($per_value == "list") {
             $result = FALSE;
         }
     } else {
         if ($per_value == "add") {
             $result = $canAdd;
         } else {
             if ($per_value == "update") {
                 if ($canEditAll) {
                     $result = true;
                 } elseif ($canEditOwn && $user_id == $created_by) {
                     $result = true;
                 }
             } else {
                 if ($per_value == "delete") {
                     if ($canDeleteAll) {
                         $result = true;
                     } elseif ($canDeleteOwn && $user_id == $created_by) {
                         $result = true;
                     }
                 } else {
                     if ($per_value == "view") {
                         if ($canViewAll) {
                             $result = true;
                         } elseif ($canViewOwn && $user_id == $created_by) {
                             $result = true;
                         }
                     } else {
                         if ($per_value == "list") {
                             $result = -1;
                             if ($canListAll) {
                                 $result = false;
                             } else {
                                 if ($canListOwn) {
                                     $result = Yii::app()->user->id;
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return $result;
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:61,代码来源:BasicPermission.php


示例18: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new UserSubscription('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['UserSubscription'])) {
         $model->attributes = $_GET['UserSubscription'];
     }
     LBApplication::renderPartial($this, 'admin', array('model' => $model));
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:13,代码来源:UserSubscriptionController.php


示例19: actionupdateComment

 public function actionupdateComment()
 {
     $description = false;
     if (isset($_POST['id_comment'])) {
         $id_commment = $_POST['id_comment'];
     }
     if (isset($_POST['description'])) {
         $description = $_POST['description'];
     }
     $model = LbComment::model()->findByPk($id_commment);
     $model->lb_comment_description = $description;
     $date = date('Y-m-d');
     $model->lb_comment_date = $date;
     if ($model->update()) {
         $response = array();
         $response['success'] = YES;
         $response['lb_comment_description'] = nl2br($model->lb_comment_description);
         $response['lb_comment_date'] = $model->lb_comment_date;
         LBApplication::renderPlain($this, array('content' => CJSON::encode($response)));
     }
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:21,代码来源:DefaultController.php


示例20: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new AccountSubscription();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['AccountSubscription'])) {
         //			$model->attributes=$_POST['AccountSubscription'];
         //			if($model->save())
         //				$this->redirect(array('view','id'=>$model->account_subscription_id));
         //                    if (isset($_GET['package_id']))
         //                    {
         $package_id = 4;
         // check if this user is already subscribe to this package
         //			if (AccountSubscription::model()->isAlreadySubscribedToPackage($package_id))
         //			{
         //				$this->redirect(array('accountTeamMember/admin'));
         //			}
         // add subscription
         $accountSubscription = new AccountSubscription();
         $accountSubscription->account_id = Yii::app()->user->id;
         $accountSubscription->account_subscription_package_id = $package_id;
         $accountSubscription->account_subscription_start_date = date('Y-m-d H:i:s');
         $accountSubscription->account_subscription_status_id = ACCOUNT_SUBSCRIPTION_STATUS_ACTIVE;
         $accountSubscription->subscription_name = $_POST['AccountSubscription']['subscription_name'];
         if ($accountSubscription->save()) {
             LBApplication::setCurrentlySelectedSubscription($accountSubscription->account_subscription_id);
         }
         $this->redirect(array('accountTeamMember/admin'));
         //                        }
         //                        // no package id, go to home
         //                        $this->redirect(array('project/index'));
     }
     $this->render('create', array('model' => $model));
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:38,代码来源:AccountSubscriptionController.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP LBFactory类代码示例发布时间:2022-05-23
下一篇:
PHP LANG类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap