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


PHP UserModel::fetchAll方法代码示例

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


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

示例1: includeAction

 public function includeAction()
 {
     $userInfo = Zend_Auth::getInstance()->getStorage()->read();
     $this->view->user = $userInfo->nmusergslab;
     $this->view->cduser = $userInfo->cdusergslab;
     $clientModel = new ClientModel();
     $clientData = $clientModel->fetchAll();
     $supplierModel = new SupplierModel();
     $supplierData = $supplierModel->fetchAll();
     $userModel = new UserModel();
     $selectUser = $userModel->fetchAll();
     $opernatureModel = new OpernatureModel();
     $opernatureData = $opernatureModel->fetchAll();
     $supplyModel = new SupplyModel();
     $supplyData = $supplyModel->fetchAll();
     //$supplierData
     $this->view->supplierData = $supplierData;
     $this->view->clientData = $clientData;
     $this->view->opernatureData = $opernatureData;
     $this->view->selectUser = $selectUser;
     $this->view->selectSupply = $supplyData;
 }
开发者ID:robertsonmello,项目名称:projetos,代码行数:22,代码来源:AccountentryController.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $itemModel = new SupplyModel();
     $selectSupply = $itemModel->fetchAll();
     $userModel = new UserModel();
     $selectUser = $userModel->fetchAll();
     $userInfo = Zend_Auth::getInstance()->getStorage()->read();
     //Novas...
     $this->_cdopernature = new Zend_Form_Element_Select('cdopernature');
     $this->_cdopernature->setAttrib("id", "accountentry_cdopernature");
     $this->_cdopernature->setAttrib("class", "multiple_select");
     //     $this->_cdopernature->setMultiOptions(' ');
     $this->_cdopernature->setLabel("Natureza");
     $this->_cdopernature->setDecorators($this->_decoratorsDefault);
     $this->_cdopernature->setRegisterInArrayValidator(false);
     $this->_cdopernature->setRequired(false);
     $this->_cdsupply = new Zend_Form_Element_Select('cdsupply');
     $this->_cdsupply->setAttrib("id", "accountentry_cdsupply");
     $this->_cdsupply->setAttrib("class", "multiple_select");
     foreach ($selectSupply as $value) {
         $this->_cdsupply->addMultiOption($value->cdsupply, $value->nmsupply);
     }
     $this->_cdsupply->setLabel("Item");
     $this->_cdsupply->setDecorators($this->_decoratorsRequired);
     $this->_cdsupply->setRegisterInArrayValidator(false);
     $this->_cdsupply->setRequired(true);
     $this->_cdusergslab = new Zend_Form_Element_Select('cdusergslab');
     $this->_cdusergslab->setAttrib("id", "accountentry_cdusergslab");
     $this->_cdusergslab->setAttrib("class", "multiple_select");
     foreach ($selectUser as $value) {
         $this->_cdusergslab->addMultiOption($value->cdusergslab, $value->nmusergslab);
     }
     // $this->_cdusergslab->setValue($userInfo->nmusergslab);
     $this->_cdusergslab->setDecorators($this->_decoratorsDefault);
     $this->_cdusergslab->setRegisterInArrayValidator(false);
     $this->_cdusergslab->setRequired(false);
     $this->_dtdeadline = new Zend_Form_Element_Text('dtdeadline');
     $this->_dtdeadline->setAttrib("id", "accountentry_dtdeadline");
     $this->_dtdeadline->setAttrib("class", "datepicker");
     $this->_dtdeadline->setLabel("Data de Vencimento");
     $this->_dtdeadline->setDecorators($this->_decoratorsRequired);
     $this->_dtdeadline->setRequired(true);
     $this->_dtdeadline = new Zend_Form_Element_Text('dtentrydate');
     $this->_dtdeadline->setAttrib("id", "accountentry_dtentrydate");
     $this->_dtdeadline->setAttrib("class", "datepicker");
     $this->_dtdeadline->setDecorators($this->_decoratorsRequired);
     $this->_dtdeadline->setRequired(false);
     $this->_accountcheckusergslab = new Zend_Form_Element_Text('accountcheckusergslab');
     $this->_accountcheckusergslab->setAttrib("id", "accountentry__accountcheck_cdusergslab");
     $this->_accountcheckusergslab->setAttrib("class", "datepicker");
     $this->_accountcheckusergslab->setLabel("Data de Vencimento");
     $this->_accountcheckusergslab->setDecorators($this->_decoratorsRequired);
     $this->_accountcheckusergslab->setRequired(false);
     $this->_dtaccountentrydate = new Zend_Form_Element_Text('dtaccountentrydate');
     $this->_dtaccountentrydate->setAttrib("id", "accountentry_dtaccountentrydate");
     $this->_dtaccountentrydate->setAttrib("class", "datepicker");
     $this->_dtaccountentrydate->setLabel("Data de Lançamento");
     $this->_dtaccountentrydate->setDecorators($this->_decoratorsDefault);
     $this->_dtaccountentrydate->setRequired(false);
     $this->_dttransactiondate = new Zend_Form_Element_Text('dttransactiondate');
     $this->_dttransactiondate->setAttrib("id", "accountentry_dttransactiondate");
     $this->_dttransactiondate->setAttrib("class", "datepicker");
     $this->_dttransactiondate->setLabel("Data de Compra/Venda");
     $this->_dttransactiondate->setDecorators($this->_decoratorsRequired);
     $this->_dttransactiondate->setRequired(true);
     $this->_dtinvoicedate = new Zend_Form_Element_Text('dtinvoicedate');
     $this->_dtinvoicedate->setAttrib("id", "accountentry_dtinvoicedate");
     $this->_dtinvoicedate->setAttrib("class", "datepicker");
     $this->_dtinvoicedate->setLabel("Data da NF");
     $this->_dtinvoicedate->setDecorators($this->_decoratorsDefault);
     $this->_dtinvoicedate->setRequired(false);
     $this->_idinvoiceref = new Zend_Form_Element_Text('idinvoiceref');
     $this->_idinvoiceref->setAttrib("id", "accountentry_idinvoiceref");
     $this->_idinvoiceref->setLabel("Nota Fiscal");
     $this->_idinvoiceref->setDecorators($this->_decoratorsDefault);
     $this->_idinvoiceref->setRequired(false);
     $this->_nraccountentry = new Zend_Form_Element_Text('nraccountentry');
     $this->_nraccountentry->setAttrib("id", "accountentry_nraccountentry");
     $this->_nraccountentry->setLabel("Nº Fatura/Orçamento");
     $this->_nraccountentry->setDecorators($this->_decoratorsDefault);
     $this->_nraccountentry->setRequired(false);
     $this->_vlinvoicevalue = new Zend_Form_Element_Text('vlinvoicevalue');
     $this->_vlinvoicevalue->setAttrib("id", "accountentry_vlinvoicevalue");
     $this->_vlinvoicevalue->setLabel("Valor (R\$)");
     $this->_vlinvoicevalue->setDecorators($this->_decoratorsDefault);
     $this->_vlinvoicevalue->setRequired(false);
     $this->_cdclient = new Zend_Form_Element_Text('cdclient');
     $this->_cdclient->setAttrib("id", "accountentry_cdclient");
     $this->_cdclient->setLabel("Credor");
     $this->_cdclient->setDecorators($this->_decoratorsDefault);
     $this->_cdclient->setRequired(false);
     $this->_cdsupplier = new Zend_Form_Element_Text('cdsupplier');
     $this->_cdsupplier->setAttrib("id", "accountentry_cdsupplier");
     $this->_cdsupplier->setLabel("Favorecido");
     $this->_cdsupplier->setDecorators($this->_decoratorsDefault);
     $this->_cdsupplier->setRequired(false);
     $this->_dsaccountentrydescription = new Zend_Form_Element_Textarea('dsaccountentrydescription');
     $this->_dsaccountentrydescription->setAttrib("id", "accountentry_dsaccountentrydescription");
     $this->_dsaccountentrydescription->setLabel("Descrição");
//.........这里部分代码省略.........
开发者ID:robertsonmello,项目名称:projetos,代码行数:101,代码来源:AccountentryForm.php

示例3: expertregisterAction

 public function expertregisterAction()
 {
     $account = $this->getRequest()->getParam('account');
     $password = $this->getRequest()->getParam('password');
     $name = $this->getRequest()->getParam('name');
     $content = $this->getRequest()->getParam('context');
     $work = $this->getRequest()->getParam('work');
     $code = $this->getRequest()->getParam('surecode');
     if ($code == $_SESSION["validcode"]) {
         $User = new UserModel();
         if ($User->ifRegister($account)) {
             $set = array('account' => $account, 'password' => $password, 'name' => $name, 'email' => $account, 'type' => 2);
             //在注册用户的时候顺带着要建一个用户个人信息
             if ($User->insert($set) > 0) {
                 $where = "email='{$account}'";
                 $result = $User->fetchAll($where)->toArray();
                 $info = array('userid' => $result[0][id], 'sex' => 'M', 'name' => $result[0][name], 'sheng' => '北京市', 'shi' => '北京市', 'xian' => '东城区', 'birth' => '1994-5-29', 'interest' => '跑步');
                 $userinfo = new userinfoModel();
                 $expert = array('info' => $content, 'userid' => $result[0][id], 'work' => $work, 'concern' => 0, 'image' => '/WebOne/public/image/initial.png');
                 $expertinfo = new expertinfoModel();
                 if ($userinfo->insert($info) > 0 && $expertinfo->insert($expert) > 0) {
                     //注册账号成功
                     $this->render('ok');
                 }
             } else {
                 $this->view->info = '1';
                 $this->_forward('error');
             }
         } else {
             $this->view->info = '2';
             //账号已经创建
             $this->_forward('error');
         }
     } else {
         $this->view->info = '3';
         $this->render('error');
         //验证码输入错误
     }
 }
开发者ID:WebBigDoLeaf,项目名称:WebOne,代码行数:39,代码来源:LoginController.php

示例4: autousersearchAction

 public function autousersearchAction()
 {
     $user = $this->_request->getParam('q');
     $userModel = new UserModel();
     $userData = $userModel->fetchAll('nmusergslab like "%' . $user . '%"');
     if (!$userData) {
         echo "<ul id='sug2'>";
         foreach ($userData as $row) {
             echo '<li onClick="fill2(\'' . $row->idusergslab . '\', \'' . $row->nmusergslab . '\');"><a href="javascript:void(0);">' . $row->nmusergslab . '</a></li>';
         }
         echo "</ul>";
     }
 }
开发者ID:robertsonmello,项目名称:projetos,代码行数:13,代码来源:TreatmentController.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $covenantModel = new CovenantModel();
     $selectCovenant = $covenantModel->fetchAll();
     $arrayCovenant = array();
     $arrayCovenant['0'] = "Selecione";
     foreach ($selectCovenant as $selCVNT) {
         $arrayCovenant[$selCVNT->cdcovenant] = $selCVNT->nmcovenant;
     }
     $responsibleModel = new UserModel();
     $selectUser = $responsibleModel->fetchAll();
     $arrayResponsible = array();
     $userInfo = Zend_Auth::getInstance()->getStorage()->read();
     $nmcollectionplaceModel = new CompanyModel();
     $selectCompany = $nmcollectionplaceModel->fetchAll();
     $arraynmcollectionplace = array();
     $arraynmcollectionplace['0'] = "Selecione";
     foreach ($selectCompany as $cdplace) {
         $arraynmcollectionplace[$cdplace->cdcompanyparent] = $cdplace->nmfantasyname;
     }
     //        $departmentModel = new DepartmentModel();
     //        $selectDepartment = $departmentModel->fetchAll();
     //        $arrayDepartment = array();
     //        $arrayDepartment['0'] = "Selecione";
     //        foreach($selectDepartment as $selDP){
     //            $arrayDepartment[$selDP->cddepartment] = $selDP->nmdepartment;
     //        }
     $departmentModel = new DepartmentModel();
     $selectDepartment = $departmentModel->fetchAll();
     $arrayDepartment = array();
     $arrayDepartment['0'] = "Selecione";
     foreach ($selectDepartment as $selDP) {
         $arrayDepartment[$selDP->cddepartment] = $selDP->nmdepartment;
     }
     $this->_fgcdcovenant = new Zend_Form_Element_Select('cdcovenant');
     $this->_fgcdcovenant->setAttrib("id", "controltbilling_select");
     //        $this->_fgcdcovenant->setAttrib("class", "check_multiple_select");
     $this->_fgcdcovenant->setMultiOptions($arrayCovenant);
     $this->_fgcdcovenant->setLabel("Convênio");
     $this->_fgcdcovenant->setDecorators($this->_decoratorsDefault);
     $this->_fgcdcovenant->setRegisterInArrayValidator(true);
     $this->_fgcdcovenant->setRequired(true);
     // select do convenio para a página biilingdata
     $this->_fgcdcovenantdata = new Zend_Form_Element_Select('fgcdcovenantdata');
     $this->_fgcdcovenantdata->setAttrib("id", "controltbillingdata_fgcdcovenantdata");
     $this->_fgcdcovenantdata->setAttrib("class", "nmbillingcss");
     $this->_fgcdcovenantdata->setMultiOptions($arrayCovenant);
     $this->_fgcdcovenantdata->setLabel("Convênios");
     $this->_fgcdcovenantdata->setDecorators($this->_decoratorsDefault);
     $this->_fgcdcovenantdata->setRegisterInArrayValidator(true);
     $this->_fgcdcovenantdata->setRequired(true);
     $this->_nmcollectionplace = new Zend_Form_Element_Select('nmcollectionplace');
     $this->_nmcollectionplace->setAttrib("id", "controltbilling_select");
     //        $this->_nmcollectionplace->setMultiOptions($arrayDocumentData);
     $this->_nmcollectionplace->setMultiOptions($arraynmcollectionplace);
     $this->_nmcollectionplace->setLabel("Posto de Coleta");
     $this->_nmcollectionplace->setDecorators($this->_decoratorsDefault);
     $this->_nmcollectionplace->setRegisterInArrayValidator(true);
     $this->_nmcollectionplace->setRequired(true);
     $this->_nmdepartment = new Zend_Form_Element_Select('nmdepartment');
     $this->_nmdepartment->setAttrib("id", "controltbilling_select");
     //        $this->_nmdepartment->setAttrib("class", "check_multiple_select");
     $this->_nmdepartment->setMultiOptions($arrayDepartment);
     $this->_nmdepartment->setLabel("Setor");
     $this->_nmdepartment->setDecorators($this->_decoratorsDefault);
     $this->_nmdepartment->setRegisterInArrayValidator(true);
     $this->_nmdepartment->setRequired(true);
     $this->_fgstatus = new Zend_Form_Element_Select('fgstatus');
     $this->_fgstatus->setAttrib("id", "controltbilling_select");
     $this->_fgstatus->setMultiOptions(array("0" => "Selecione", "1" => "Ativo", "2" => "Inativo"));
     $this->_fgstatus->setLabel("Status");
     $this->_fgstatus->setDecorators($this->_decoratorsDefault);
     $this->_fgstatus->setRegisterInArrayValidator(true);
     $this->_fgstatus->setRequired(true);
     $this->_nmpacient = new Zend_Form_Element_Text('nmpacient');
     $this->_nmpacient->setAttrib("id", "controllbilling_nmpacient");
     $this->_nmpacient->setAttrib("onkeyup", "lookup(this.value);");
     $this->_nmpacient->setAttrib("onblur", "fill();");
     $this->_nmpacient->setAttrib("autocomplete", "off");
     $this->_nmpacient->setAttrib("size", "50");
     $this->_nmpacient->setLabel("Paciente");
     $this->_nmpacient->setDecorators($this->_decoratorsDefault);
     $this->_nmpacient->setRequired(false);
     $this->_responsible = new Zend_Form_Element_Select('responsible');
     $this->_responsible->setAttrib("id", "controltbilling_select");
     $this->_responsible->setAttrib("class", "controlbilling_responsible");
     //        $this->_fgcdcovenant->setAttrib("class", "check_multiple_select");
     $this->_responsible->setLabel("Responsável");
     $arrayResponsible['0'] = "Selecione";
     foreach ($selectUser as $userLog) {
         /*   if ($userInfo->idusergslab == $userLog->idusergslab) {
              $arrayResponsible[$userLog->idusergslab] = $userLog->nmusergslab;
              } */
         $arrayResponsible[$userLog->idusergslab] = $userLog->nmusergslab;
     }
     $this->_responsible->setMultiOptions($arrayResponsible);
     $this->_responsible->setValue($userInfo);
     $this->_responsible->setDecorators($this->_decoratorsDefault);
     $this->_responsible->setRegisterInArrayValidator(true);
//.........这里部分代码省略.........
开发者ID:robertsonmello,项目名称:projetos,代码行数:101,代码来源:ControlbillingForm.php

示例6: editAction

 public function editAction()
 {
     $cdexamination = $this->_request->getParam('cdexamination');
     $modelMaterial = new MaterialModel();
     //$materialData = $modelMaterial->fetchAll();
     //   $materialData = $modelMaterial->fetchAll($modelMaterial->getMaterialNotInExamination($cdexamination));
     //         print_r('ei'); die;
     //   $this->view->materialData = $materialData;
     $departmentModel = new DepartmentModel();
     $departmentsData = $departmentModel->fetchAll($departmentModel->getAllActiveDepartment());
     $this->view->departmentsData = $departmentsData;
     $timeFrameModel = new TimeframeModel();
     $timeFrameData = $timeFrameModel->fetchAll($timeFrameModel->getAllTimeFrames());
     $this->view->timeFrameData = $timeFrameData;
     $examinationModel = new ExaminationModel();
     $examinationData = $examinationModel->fetchRow($examinationModel->getByExamination($cdexamination));
     $this->view->examinationData = $examinationData;
     $userModel = new UserModel();
     $userData = $userModel->fetchAll();
     $this->view->userData = $userData;
     $examinationRevisionModel = new ExaminationrevisionModel();
     $examinationRevisionData = $examinationRevisionModel->fetchRow($examinationRevisionModel->getByExaminationRevision($cdexamination));
     //      print_r($examinationRevisionData); die;
     $this->view->examinationRevisionData = $examinationRevisionData;
     //var_dump($examinationData);
     //die();
 }
开发者ID:robertsonmello,项目名称:projetos,代码行数:27,代码来源:ExaminationController.php


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