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


PHP Customers类代码示例

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


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

示例1: deleteAction

 /**
  * Delete a customer record
  */
 public function deleteAction()
 {
     $customersTable = new Customers();
     $customer = $customersTable->find($this->_getParam('id'))->current();
     !is_null($customer) && $customer->delete();
     $this->_redirect('/customers');
 }
开发者ID:carriercomm,项目名称:billing-6,代码行数:10,代码来源:CustomersController.php

示例2: contacts_holidays_list_BeforeShow

function contacts_holidays_list_BeforeShow(&$sender)
{
    $contacts_holidays_list_BeforeShow = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $contacts_holidays_list;
    //Compatibility
    //End contacts_holidays_list_BeforeShow
    //Custom Code @22-2A29BDB7
    // -------------------------
    // Write your own code here.
    $del_guid = CCGetFromGet("del_guid", "");
    $o = CCGetFromGet("o", "");
    if ($o == "delrecord" && strlen($del_guid) > 0) {
        global $FileName;
        $params["guid"] = $del_guid;
        $customers = new Customers();
        $customers->deleteHolidaysByGuid($params);
        $querystring = CCGetQueryString("QueryString", array("o", "del_guid"));
        //Forcing redirect
        header("Location: {$FileName}?{$querystring}");
    }
    // -------------------------
    //End Custom Code
    //Close contacts_holidays_list_BeforeShow @1-2AE37F02
    return $contacts_holidays_list_BeforeShow;
}
开发者ID:wangshipeng,项目名称:license_manager,代码行数:27,代码来源:contacts_holidays_list_events.php

示例3: getCompanyName

function getCompanyName($id)
{
    $localvars = localvars::getInstance();
    $validate = new validate();
    $customers = new Customers();
    $returnValue = "";
    if (isnull($id) && !$validate->integer($id)) {
        throw new Exception('not valid integer');
        return false;
    } else {
        $data = $customers->getRecords($id);
        $returnValue = $data[0]['companyName'];
        return $returnValue;
    }
}
开发者ID:ddavisgraphics,项目名称:TimeTrackerDemoApp_EngineAPI,代码行数:15,代码来源:index.php

示例4: fromArray

 public static function fromArray($data)
 {
     $settings = new RoleSettings();
     foreach ($data as $key => $value) {
         if (property_exists(get_class($settings), $key)) {
             if (is_array($value)) {
                 if ($key == "transactions") {
                     $settings->{$key} = Transactions::fromArray($value);
                 }
                 if ($key == "reports") {
                     $settings->{$key} = Reports::fromArray($value);
                 }
                 if ($key == "help") {
                     $settings->{$key} = Help::fromArray($value);
                 }
                 if ($key == "mobileVTAccess") {
                     $settings->{$key} = MobileVTAcces::fromArray($value);
                 }
                 if ($key == "admin") {
                     $settings->{$key} = Admin::fromArray($value);
                 }
                 if ($key == "customer") {
                     $settings->{$key} = Customers::fromArray($value);
                 }
                 if ($key == "webPosAccess") {
                     $settings->{$key} = WebPosAccess::fromArray($value);
                 }
             } else {
                 $settings->{$key} = $value;
             }
         }
     }
     return $settings;
 }
开发者ID:payhub,项目名称:payhubws-public-sdk,代码行数:34,代码来源:RoleSettings.php

示例5: customers

 public function customers()
 {
     $registry = Shineisp_Registry::getInstance();
     $translator = $registry->Zend_Translate;
     $this->view->customers = Customers::getList($translator->translate('Select the customer ...'), array(array('where' => 'u.status_id = ?', 'params' => Statuses::id('active', 'customers'))));
     return $this->view->render('partials/customers.phtml');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:7,代码来源:Customers.php

示例6: isValid

 public function isValid($value)
 {
     $customer = Customers::getCustomerbyEmail($value);
     if (isset($customer[0])) {
         $this->_error(self::ALREADYUSED);
         return false;
     } else {
         return true;
     }
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:10,代码来源:Email.php

示例7: customerloginAction

 public function customerloginAction()
 {
     $response['code'] = 'Invalid ID or password.';
     $email = $this->getRequest()->getParam('email');
     $password = $this->getRequest()->getParam('password');
     $Customer = Customers::setCustomerLogin($email, $password);
     if ($Customer) {
         $Customer->setLastLogin();
         $_SESSION['Customer'] = $Customer;
         $response['code'] = 'SUCCESS';
     }
     echo json_encode($response);
 }
开发者ID:hoaitn,项目名称:base-zend,代码行数:13,代码来源:AjaxController.php

示例8: getAll

 public function getAll($uuid)
 {
     $customers = Customers::findWithUuid($uuid);
     if (empty($customers)) {
         throw new Shineisp_Api_Exceptions(400006, ":: 'uuid' not valid");
         exit;
     }
     $id = $customers['customer_id'];
     $services = Products::getAllServicesByCustomerID($id, 'o.order_id, oi.detail_id as detail_id, pd.name as productname, 
     DATE_FORMAT(oi.date_start, "%d/%m/%Y") AS date_start, DATE_FORMAT(oi.date_end, "%d/%m/%Y") AS date_end, 
     DATEDIFF(oi.date_end, CURRENT_DATE) AS daysleft, oi.price as price, oi.autorenew as autorenew, oi.uuid as uuid, s.status as status');
     return $services;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:13,代码来源:Ordersitems.php

示例9: actionIndex

 public function actionIndex()
 {
     if (Helper::checkRoute('index')) {
         $searchModel = new ProvinceSearch();
         $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
         if (Yii::$app->request->post('hasEditable')) {
             $ID = \Yii::$app->request->post('editableKey');
             $model = Customers::findOne($ID);
             $out = Json::encode(['output' => '', 'message' => '']);
             // fetch the first entry in posted data (there should
             // only be one entry anyway in this array for an
             // editable submission)
             // - $posted is the posted data for Book without any indexes
             // - $post is the converted array for single model validation
             $post = [];
             $posted = current($_POST['Customers']);
             $post['Customers'] = $posted;
             // load model like any single model validation
             if ($model->load($post)) {
                 // can save model or do something before saving model
                 $model->save();
                 // custom output to return to be displayed as the editable grid cell
                 // data. Normally this is empty - whereby whatever value is edited by
                 // in the input by user is updated automatically.
                 $output = '';
                 // specific use case where you need to validate a specific
                 // editable column posted when you have more than one
                 // EditableColumn in the grid view. We evaluate here a
                 // check to see if buy_amount was posted for the Book model
                 if (isset($posted['CUST_KD_ALIAS'])) {
                     // $output =  Yii::$app->formatter->asDecimal($model->EMP_NM, 2);
                     $output = $model->CUST_KD_ALIAS;
                 }
                 // similarly you can check if the name attribute was posted as well
                 // if (isset($posted['name'])) {
                 //   $output =  ''; // process as you need
                 // }
                 $out = Json::encode(['output' => $output, 'message' => '']);
                 // return ajax json encoded response and exit
                 echo $out;
                 return;
             }
         }
         return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
     } else {
         Yii::$app->user->logout();
         $this->redirect(array('/site/login'));
         //
     }
 }
开发者ID:adem-team,项目名称:advanced,代码行数:50,代码来源:ProvinsiCustomersCrmController.php

示例10: getEntity

 /**
  * Get an order, first checking if the current user can view it.
  */
 protected function getEntity($id)
 {
     // Fetch the order from the ID.
     $order = Orders::getInstance()->findEntity($id);
     // Find the customer whom the order belongs to.
     $orderCustomerId = $order->getCustomer()->getId();
     if ($orderCustomerId != Customers::getCurrent()->getId()) {
         // A 'not found' exception is thrown instead of the expected 'not
         // authorised' to prevent order enumeration from malicious users.
         throw new NotFoundException('The current customer cannot use this order.');
     }
     // Everything looks fine, return the order.
     return $order;
 }
开发者ID:eix,项目名称:catalog,代码行数:17,代码来源:Orders.php

示例11: filter

 public static function filter($input, $limit = 24)
 {
     return Customers::where(function ($query) use($input) {
         if (array_key_exists('name', $input) && strlen($input['name'])) {
             $query->where('name', 'LIKE', "%" . $input['name'] . "%");
         }
         if (array_key_exists('address', $input) && strlen($input['address'])) {
             $query->where('address', 'LIKE', "%" . $input['address'] . "%");
         }
         if (array_key_exists('contact', $input) && strlen($input['contact'])) {
             $query->where('contact', 'LIKE', "%" . $input['contact'] . "%");
         }
     })->orderBy('name', 'asc')->paginate($limit);
 }
开发者ID:nurulimamnotes,项目名称:point-of-sale,代码行数:14,代码来源:Customers.php

示例12: init

 public function init()
 {
     // Set the custom decorator
     $this->addElementPrefixPath('Shineisp_Decorator', 'Shineisp/Decorator/', 'decorator');
     $translate = Shineisp_Registry::get('Zend_Translate');
     $this->addElement('text', 'invoice_date', array('filters' => array('StringTrim'), 'required' => true, 'label' => $translate->_('Date'), 'decorators' => array('Bootstrap'), 'class' => 'form-control date', 'dateformat' => Settings::getJsDateFormat()));
     $this->addElement('select', 'order_id', array('label' => $translate->_('Order No.'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->getElement('order_id')->setAllowEmpty(false)->setMultiOptions(Orders::getList(true));
     $this->addElement('select', 'customer_parent_id', array('label' => $translate->_('Invoice destination'), 'decorators' => array('Bootstrap'), 'class' => 'form-control', 'disable' => 'true'));
     $this->getElement('customer_parent_id')->setAllowEmpty(true)->setMultiOptions(Customers::getList(true));
     $this->addElement('text', 'number', array('filters' => array('StringTrim'), 'required' => true, 'label' => $translate->_('Sequential number'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('text', 'formatted_number', array('filters' => array('StringTrim'), 'required' => false, 'label' => $translate->_('Invoice number'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('textarea', 'note', array('filters' => array('StringTrim'), 'label' => $translate->_('Private Notes'), 'decorators' => array('Bootstrap'), 'class' => 'col-lg-12 form-control wysiwyg'));
     $this->addElement('hidden', 'invoice_id');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:15,代码来源:InvoicesForm.php

示例13: init

 public function init()
 {
     // Set the custom decorator
     $this->addElementPrefixPath('Shineisp_Decorator', 'Shineisp/Decorator/', 'decorator');
     $translate = Shineisp_Registry::get('Zend_Translate');
     $this->addElement('text', 'subject', array('filters' => array('StringTrim'), 'required' => false, 'decorators' => array('Bootstrap'), 'label' => $translate->_('Subject'), 'class' => 'form-control'));
     $this->addElement('text', 'datetime', array('filters' => array('StringTrim'), 'label' => $translate->_('Date'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('textarea', 'note', array('filters' => array('StringTrim'), 'class' => 'col-lg-12 form-control wysiwyg'));
     $this->addElement('select', 'sendemail', array('label' => $translate->_('Send Email'), 'description' => $translate->_('Send an email to the customer.'), 'decorators' => array('Bootstrap'), 'class' => 'form-control', 'multioptions' => array('1' => $translate->_('Yes'), '0' => $translate->_('No'))));
     $this->addElement('select', 'category_id', array('decorators' => array('Bootstrap'), 'label' => $translate->_('Category'), 'class' => 'form-control'));
     $this->getElement('category_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(TicketsCategories::getList());
     $this->addElement('select', 'customer_id', array('decorators' => array('Bootstrap'), 'label' => $translate->_('Customer'), 'class' => 'form-control'));
     $this->getElement('customer_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(Customers::getList());
     $this->addElement('select', 'category', array('decorators' => array('Bootstrap'), 'label' => $translate->_('Category'), 'class' => 'form-control'));
     $this->getElement('category')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(TicketsCategories::getList());
     $this->addElement('select', 'order_id', array('decorators' => array('Bootstrap'), 'label' => $translate->_('Order reference'), 'class' => 'form-control'));
     $this->getElement('order_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(Orders::getList(true));
     $this->addElement('select', 'sibling_id', array('decorators' => array('Bootstrap'), 'label' => $translate->_('Relationships'), 'class' => 'form-control'));
     $this->getElement('sibling_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false);
     $this->addElement('select', 'user_id', array('decorators' => array('Bootstrap'), 'label' => $translate->_('Operator'), 'class' => 'form-control'));
     $this->getElement('user_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(AdminUser::getList());
     #->setMultiOptions(AdminUser::getUserbyRoleID(AdminRoles::getIdRoleByName('operator')));
     $this->addElement('select', 'status_id', array('decorators' => array('Bootstrap'), 'label' => $translate->_('Status'), 'class' => 'form-control'));
     $this->getElement('status_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(Statuses::getList('tickets'));
     // If the browser client is an Apple client hide the file upload html object
     if (false == Shineisp_Commons_Utilities::isAppleClient()) {
         $MBlimit = Settings::findbyParam('adminuploadlimit');
         $Types = Settings::findbyParam('adminuploadfiletypes', 'Admin');
         if (empty($MBlimit)) {
             $MBlimit = 1;
         }
         if (empty($Types)) {
             $Types = "zip,jpg";
         }
         $Byteslimit = Shineisp_Commons_Utilities::MB2Bytes($MBlimit);
         $file = $this->createElement('file', 'attachments', array('label' => $translate->_('Attachment'), 'decorators' => array('File', array('ViewScript', array('viewScript' => 'partials/file.phtml', 'placement' => false))), 'description' => $translate->_('Select the document to upload. Files allowed are (%s) - Max %s', $Types, Shineisp_Commons_Utilities::formatSizeUnits($Byteslimit)), 'data-classButton' => 'btn btn-primary', 'data-input' => 'false', 'class' => 'filestyle'));
         $file->addValidator('Extension', false, $Types)->addValidator('Size', false, $Byteslimit)->addValidator('Count', false, 1);
         $this->addElement($file);
     } else {
         $this->addElement('hidden', 'attachments');
     }
     $this->addElement('hidden', 'ticket_id');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:43,代码来源:TicketsForm.php

示例14: addSchedule

 static function addSchedule($inputs)
 {
     $introVisit = new IntroVisit();
     $introVisit['customer_id'] = $inputs['customerId'];
     $introVisit->student_id = $inputs['studentIdIntroVisit'];
     $introVisit->class_id = $inputs['eligibleClassesCbx'];
     $introVisit->batch_id = $inputs['introbatchCbx'];
     //$introVisit->status             = 'ACTIVE/SCHEDULED';
     $introVisit->franchisee_id = Session::get('franchiseId');
     $introVisit->iv_date = date('Y-m-d', strtotime($inputs['introVisitTxtBox']));
     $introVisit->created_by = Session::get('userId');
     $introVisit->created_at = date("Y-m-d H:i:s");
     $introVisit->save();
     $customerObj = Customers::find($inputs['customerId']);
     if ($customerObj) {
         $customerObj->stage = "IV SCHEDULED";
         $customerObj->save();
     }
     return $introVisit;
 }
开发者ID:Headrun-php,项目名称:TLG,代码行数:20,代码来源:IntroVisit.php

示例15: init

 public function init()
 {
     // Set the custom decorator
     $this->addElementPrefixPath('Shineisp_Decorator', 'Shineisp/Decorator/', 'decorator');
     $translate = Shineisp_Registry::get('Zend_Translate');
     $this->addElement('text', 'paymentdate', array('filters' => array('StringTrim'), 'required' => true, 'label' => $translate->_('Payment date'), 'decorators' => array('Bootstrap'), 'class' => 'form-control date', 'dateformat' => Settings::getJsDateFormat()));
     $this->addElement('text', 'reference', array('filters' => array('StringTrim'), 'label' => $translate->_('Transaction Reference'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('text', 'income', array('filters' => array('StringTrim'), 'label' => $translate->_('Income'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('text', 'outcome', array('filters' => array('StringTrim'), 'label' => $translate->_('Expense'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('select', 'confirmed', array('filters' => array('StringTrim'), 'label' => $translate->_('Does the Transaction has been confirmed?'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->getElement('confirmed')->setAllowEmpty(false)->setMultiOptions(array('0' => "No, it has been not", '1' => "Yes, it has been"));
     $this->addElement('select', 'bank_id', array('decorators' => array('Bootstrap'), 'label' => 'Method of Payments', 'class' => 'form-control'));
     $this->getElement('bank_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(Banks::getList());
     $this->addElement('select', 'order_id', array('decorators' => array('Bootstrap'), 'label' => 'Order', 'class' => 'form-control'));
     $this->getElement('order_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(Orders::getList());
     $this->addElement('select', 'customer_id', array('decorators' => array('Bootstrap'), 'label' => 'Customer', 'class' => 'form-control'));
     $this->getElement('customer_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(Customers::getList());
     $this->addElement('textarea', 'description', array('filters' => array('StringTrim'), 'label' => $translate->_('Description'), 'id' => 'description', 'rows' => '3', 'decorators' => array('Bootstrap'), 'class' => 'col-lg-12 form-control'));
     $this->addElement('hidden', 'payment_id');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:20,代码来源:PaymentsForm.php


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