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


PHP Application_Model_DbTable_DbGlobal::getAllProvince方法代码示例

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


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

示例1: FrmAddCommune

 public function FrmAddCommune($data = null)
 {
     $commune = new Zend_Dojo_Form_Element_TextBox('commune_name');
     $commune->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => 'true', 'missingMessage' => 'Invalid Module!', 'class' => 'fullside'));
     $communekh = new Zend_Dojo_Form_Element_TextBox('commune_namekh');
     $communekh->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => 'true', 'missingMessage' => 'Invalid Module!', 'class' => 'fullside'));
     $_display = new Zend_Dojo_Form_Element_FilteringSelect('display');
     $_display->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $_display_opt = array(1 => $this->tr->translate("NAME_KHMER"), 2 => $this->tr->translate("NAME_ENGLISH"));
     $_display->setMultiOptions($_display_opt);
     $_db = new Application_Model_DbTable_DbGlobal();
     $rows_provice = $_db->getAllDistrict();
     $opt_province = "";
     if (!empty($rows_provice)) {
         foreach ($rows_provice as $row) {
             $opt_province[$row['dis_id']] = $row['district_name'];
         }
     }
     $district_name = new Zend_Dojo_Form_Element_FilteringSelect('district_name');
     $district_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $district_name->setMultiOptions($opt_province);
     $_db = new Application_Model_DbTable_DbGlobal();
     $rows_provice = $_db->getAllProvince();
     $opt_province = "";
     if (!empty($rows_provice)) {
         foreach ($rows_provice as $row) {
             $opt_province[$row['province_id']] = $row['province_en_name'];
         }
     }
     $_province = new Zend_Dojo_Form_Element_FilteringSelect('province_name');
     $_province->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'filterDistrict();'));
     $_province->setMultiOptions($opt_province);
     $_province->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => 'true', 'class' => 'fullside'));
     $_arr = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status = new Zend_Dojo_Form_Element_FilteringSelect("status");
     $_status->setMultiOptions($_arr);
     $_status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => 'true', 'missingMessage' => 'Invalid Module!', 'class' => 'fullside'));
     if (!empty($data)) {
         $commune->setValue($data['commune_name']);
         // 			echo $data['commune_namekh'];exit();
         $communekh->setValue($data['commune_namekh']);
         $_display->setValue($data['displayby']);
         $district_name->setValue($data['district_id']);
         $_province->setValue($data['pro_id']);
         $_status->setValue($data['status']);
     }
     $this->addElements(array($commune, $district_name, $communekh, $_province, $_status, $_display));
     return $this;
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:49,代码来源:FrmCommune.php

示例2: FrmAddDistrict

	public function FrmAddDistrict($data=null){
		
		$request=Zend_Controller_Front::getInstance()->getRequest();
		
		$_title = new Zend_Dojo_Form_Element_TextBox('adv_search');
		$_title->setAttribs(array('dojoType'=>$this->tvalidate,
				'onkeyup'=>'this.submit()',
				'placeholder'=>$this->tr->translate("SEARCH_DISTRICT_INFO")
		));
		$_title->setValue($request->getParam("adv_search"));
		
		
		$_status_search=  new Zend_Dojo_Form_Element_FilteringSelect('search_status');
		$_status_search->setAttribs(array('dojoType'=>$this->filter));
		$_status_opt = array(
				-1=>$this->tr->translate("ALL"),
				1=>$this->tr->translate("ACTIVE"),
				0=>$this->tr->translate("DACTIVE"));
		$_status_search->setMultiOptions($_status_opt);
		$_status_search->setValue($request->getParam("search_status"));
		
		$_btn_search = new Zend_Dojo_Form_Element_SubmitButton('btn_search');
		$_btn_search->setAttribs(array(
				'dojoType'=>'dijit.form.Button',
				'iconclass'=>'dijitIconSearch',
		
		));
		
		$district_name = new Zend_Dojo_Form_Element_TextBox('district_name');
		$district_name->setAttribs(array('dojoType'=>'dijit.form.ValidationTextBox',
				'required'=>'true','missingMessage'=>'Invalid Module!','class'=>'fullside'
				));
		
		$district_namekh = new Zend_Dojo_Form_Element_TextBox('district_namekh');
		$district_namekh->setAttribs(array('dojoType'=>'dijit.form.ValidationTextBox',
				'required'=>'true','missingMessage'=>'Invalid Module!','class'=>'fullside'
		));
		
		$code = new Zend_Dojo_Form_Element_TextBox('code');
		$code->setAttribs(array('dojoType'=>'dijit.form.ValidationTextBox',
				'required'=>'true','missingMessage'=>'Invalid Module!','class'=>'fullside'
		));
		
		$popupdistrict_name = new Zend_Dojo_Form_Element_TextBox('pop_district_name');
		$popupdistrict_name->setAttribs(array('dojoType'=>'dijit.form.ValidationTextBox',
				'required'=>'true','missingMessage'=>'Invalid Module!','class'=>'fullside'
		));
		
		$pop_district_namekh = new Zend_Dojo_Form_Element_TextBox('pop_district_namekh');
		$pop_district_namekh->setAttribs(array('dojoType'=>'dijit.form.ValidationTextBox',
				'required'=>'true','missingMessage'=>'Invalid Module!','class'=>'fullside'
		));
		
		$_display =  new Zend_Dojo_Form_Element_FilteringSelect('display');
		$_display->setAttribs(array('dojoType'=>'dijit.form.FilteringSelect','class'=>'fullside',));
		$_display_opt = array(
				1=>$this->tr->translate("NAME_KHMER"),
				2=>$this->tr->translate("NAME_EN"));
		$_display->setMultiOptions($_display_opt);

		$_db = new Application_Model_DbTable_DbGlobal();		
		$rows_province = $_db->getAllProvince();
		$opt_province = array(''=>$this->tr->translate("SELECT_PROVINCE"));
		if(!empty($rows_province))foreach($rows_province AS $row) $opt_province[$row['province_id']]=$row['province_en_name'];
		
		$_province = new Zend_Dojo_Form_Element_FilteringSelect('province_name');
		$_province->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside'
		));
		
		$_province->setMultiOptions($opt_province);
		$_province->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'required'=>'true',
				'class'=>'fullside',
				));
		$_province->setValue($request->getParam('province_name'));
		
		if(!empty($rows_province))foreach($rows_province AS $row) $opt_province[$row['province_id']]=$row['province_en_name'];
		
		$_provincess=new Zend_Dojo_Form_Element_FilteringSelect('province_names');
		$_provincess->setAttribs(array('dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'onchange'=>'filterDistrict();',
		));
		$_provincess->setMultiOptions($opt_province);
		
		
		$_arr = array(1=>$this->tr->translate("ACTIVE"),0=>$this->tr->translate("DACTIVE"));
		$_status = new Zend_Dojo_Form_Element_FilteringSelect("status");
		$_status->setMultiOptions($_arr);
		$_status->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'required'=>'true',
				'missingMessage'=>'Invalid Module!',
				'class'=>'fullside'));
		$id = new Zend_Form_Element_Hidden('id');
		if(!empty($data)){
			$id->setValue($data['dis_id']);
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:lnms,代码行数:101,代码来源:FrmDistrict.php

示例3: FrmTecher

 public function FrmTecher($_data = null)
 {
     $_enname = new Zend_Dojo_Form_Element_TextBox('en_name');
     $_enname->setAttribs(array('dojoType' => $this->tvalidate, 'required' => 'true', 'class' => 'fullside'));
     $_khname = new Zend_Dojo_Form_Element_TextBox('kh_name');
     $_khname->setAttribs(array('dojoType' => $this->tvalidate, 'required' => 'true', 'class' => 'fullside'));
     $code = new Zend_Dojo_Form_Element_TextBox('code');
     $code->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside', 'readOnly' => 'readOnly'));
     $db = new Application_Model_DbTable_DbGlobal();
     $code_num = $db->getTeacherCode();
     $code->setValue($code_num);
     $phone = new Zend_Dojo_Form_Element_TextBox('phone');
     $phone->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
     $sex = new Zend_Dojo_Form_Element_FilteringSelect('sex');
     $sex->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
     $options = array(1 => "M", 2 => "F");
     $sex->setMultiOptions($options);
     $dob = new Zend_Dojo_Form_Element_DateTextBox('dob');
     $dob->setAttribs(array('dojoType' => $this->t_date, 'class' => 'fullside'));
     $_adress = new Zend_Dojo_Form_Element_TextBox('address');
     $_adress->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
     $db = new Application_Model_DbTable_DbGlobal();
     $db->getAllProvince();
     $rows = $db->getAllProvince();
     $opt = "";
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $opt[$row['id']] = $row['province_name'];
         }
     }
     $pob = new Zend_Dojo_Form_Element_FilteringSelect('pob');
     $pob->setAttribs(array('dojoType' => $this->filter, 'class' => 'pob', 'class' => 'fullside'));
     $pob->setMultiOptions($opt);
     $_email = new Zend_Dojo_Form_Element_TextBox('email');
     $_email->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
     $_degree = new Zend_Dojo_Form_Element_FilteringSelect('degree');
     $_degree->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
     $_note = new Zend_Dojo_Form_Element_TextBox('note');
     $_note->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $_degree = new Zend_Dojo_Form_Element_FilteringSelect('degree');
     $_degree->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
     $degree_opt = $db->getAllDegree();
     $_degree->setMultiOptions($degree_opt);
     $_photo = new Zend_Form_Element_File('photo');
     $_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
     $_status->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
     $_status_opt = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status->setMultiOptions($_status_opt);
     $_submit = new Zend_Dojo_Form_Element_SubmitButton('submit');
     $_submit->setLabel("save");
     $id = new Zend_Form_Element_Hidden('id');
     if (!empty($_data)) {
         $id->setValue($_data['id']);
         $code->setValue($_data['teacher_code']);
         $_enname->setValue($_data['teacher_name_en']);
         $_khname->setValue($_data['teacher_name_kh']);
         $sex->setValue($_data['sex']);
         $phone->setValue($_data['phone']);
         $pob->setValue($_data['pob']);
         $dob->setValue($_data['dob']);
         $_adress->setValue($_data['address']);
         $_email->setValue($_data['email']);
         $_degree->setValue($_data['degree']);
         $_note->setValue($_data['note']);
         $_status->setValue($_data['status']);
     }
     $this->addElements(array($id, $_enname, $_note, $_khname, $pob, $code, $phone, $sex, $dob, $_adress, $_email, $_degree, $_photo, $_status, $_submit));
     return $this;
 }
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:69,代码来源:FrmTeacher.php

示例4: FrmAddClient

 public function FrmAddClient($data = null)
 {
     $_group = new Zend_Dojo_Form_Element_CheckBox('is_group');
     $_group->setAttribs(array('dojoType' => 'dijit.form.CheckBox', 'onchange' => 'getGroupCode();'));
     $_group_code = new Zend_Dojo_Form_Element_TextBox('group_code');
     $_group_code->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readonly' => 'readonly', 'style' => 'color:red;'));
     // 		$db = new Application_Model_DbTable_DbGlobal();
     // 		$id_client = $db->getNewClientId();
     $_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
     $_branch_id->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $db = new Application_Model_DbTable_DbGlobal();
     $rows = $db->getAllBranchName();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['br_id']] = $row['displayby'] == 1 ? $row['branch_namekh'] : $row['branch_nameen'];
         }
     }
     $_branch_id->setMultiOptions($options);
     $_member = new Zend_Dojo_Form_Element_FilteringSelect('group_id');
     $_member->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $db = new Application_Model_DbTable_DbGlobal();
     $rows = $db->getClientByType();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['client_id']] = $row['name_en'];
         }
     }
     $_member->setMultiOptions($options);
     $_namekh = new Zend_Dojo_Form_Element_TextBox('name_kh');
     $_namekh->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
     $id_client = $db->getNewClientId();
     $_clientno = new Zend_Dojo_Form_Element_TextBox('client_no');
     $_clientno->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readonly' => 'readonly', 'style' => 'color:red;'));
     $_clientno->setValue($id_client);
     $_nameen = new Zend_Dojo_Form_Element_TextBox('name_en');
     $_nameen->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
     $_sex = new Zend_Dojo_Form_Element_FilteringSelect('sex');
     $_sex->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = array(1 => "Male", 2 => "Femail");
     $_sex->setMultiOptions($opt);
     $_situ_status = new Zend_Dojo_Form_Element_FilteringSelect('situ_status');
     $_situ_status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt_status = $db->getAllSituation();
     $_situ_status->setMultiOptions($opt_status);
     $_province = new Zend_Dojo_Form_Element_FilteringSelect('province');
     $_province->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $rows = $db->getAllProvince();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['province_id']] = $row['province_en_name'];
         }
     }
     $_province->setMultiOptions($options);
     $_district = new Zend_Dojo_Form_Element_FilteringSelect('district');
     $rows = $db->getAllDistrict();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['dis_id']] = $row['district_name'];
         }
     }
     $_district->setMultiOptions($options);
     $_district->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'popupCheckDistrict();'));
     $_commune = new Zend_Dojo_Form_Element_FilteringSelect('commune');
     $rows = $db->getCommune();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['com_id']] = $row['commune_name'];
         }
     }
     $_commune->setMultiOptions($options);
     $_commune->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'popupCheckCommune();'));
     $_village = new Zend_Dojo_Form_Element_FilteringSelect('village');
     $_village->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true', 'onchange' => 'popupCheckVillage();'));
     $rows = $db->getVillage();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['vill_id']] = $row['village_name'];
         }
     }
     $_village->setMultiOptions($options);
     $_house = new Zend_Dojo_Form_Element_TextBox('house');
     $_house->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside'));
     $_street = new Zend_Dojo_Form_Element_TextBox('street');
     $_street->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
     $_id_type = new Zend_Dojo_Form_Element_FilteringSelect('id_type');
     $_id_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true'));
     $rows = $db->GetAllIDType();
     $_id_type->setMultiOptions($rows);
     $_id_no = new Zend_Dojo_Form_Element_TextBox('id_no');
     $_id_no->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
     $_phone = new Zend_Dojo_Form_Element_TextBox('phone');
     $_phone->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $_spouse = new Zend_Dojo_Form_Element_TextBox('spouse');
     $_spouse->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:currencyms,代码行数:101,代码来源:FrmClient.php

示例5: FrmaddGuide

 public function FrmaddGuide($data = null)
 {
     $pob = new Zend_Dojo_Form_Element_TextBox('pob');
     $pob->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $att_file = new Zend_Form_Element_File('att_file');
     $att_file->setAttribs(array('class' => 'fullside'));
     $_dob = new Zend_Dojo_Form_Element_DateTextBox('dob_client');
     $_dob->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $_dob->setValue(date("Y-m-d"));
     $nationality = new Zend_Dojo_Form_Element_TextBox('nationality');
     $nationality->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $_email = new Zend_Dojo_Form_Element_TextBox('email');
     $_email->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $db = new Application_Model_DbTable_DbGlobal();
     $_namekh = new Zend_Dojo_Form_Element_TextBox('name_kh');
     $_namekh->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
     $id_client = $db->getDriverCode();
     $_clientno = new Zend_Dojo_Form_Element_TextBox('client_no');
     $_clientno->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readonly' => 'readonly', 'style' => 'color:red;'));
     $_clientno->setValue($id_client);
     $_nameen = new Zend_Dojo_Form_Element_ValidationTextBox('name_en');
     $_nameen->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
     $_sex = new Zend_Dojo_Form_Element_FilteringSelect('sex');
     $_sex->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt_status = $db->getVewOptoinTypeByType(1, 1);
     unset($opt_status[-1]);
     unset($opt_status['']);
     $_sex->setMultiOptions($opt_status);
     $_phone = new Zend_Dojo_Form_Element_TextBox('phone');
     $_phone->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $normalprice = new Zend_Dojo_Form_Element_NumberTextBox('cnormalprice');
     $normalprice->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $otprice = new Zend_Dojo_Form_Element_NumberTextBox('cotprice');
     $otprice->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $pnormalprice = new Zend_Dojo_Form_Element_NumberTextBox('pnormalprice');
     $pnormalprice->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $potprice = new Zend_Dojo_Form_Element_NumberTextBox('potprice');
     $potprice->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $photo = new Zend_Form_Element_File('photo');
     $photo->setAttribs(array());
     $national_id = new Zend_Dojo_Form_Element_TextBox('national_id');
     $national_id->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $experience = new Zend_Dojo_Form_Element_TextBox('experience');
     $experience->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $publicholiday = new Zend_Dojo_Form_Element_NumberTextBox('poblicholiday_price');
     $publicholiday->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $weekend_price = new Zend_Dojo_Form_Element_NumberTextBox('weekend_price');
     $weekend_price->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $experience_num = new Zend_Dojo_Form_Element_NumberTextBox('experience_number');
     $experience_num->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $p_popublicholiday = new Zend_Dojo_Form_Element_NumberTextBox('ppoblicholiday_price');
     $p_popublicholiday->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $p_weekend = new Zend_Dojo_Form_Element_NumberTextBox('pweekend_price');
     $p_weekend->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $monthly_price = new Zend_Dojo_Form_Element_NumberTextBox('monthly_price');
     $monthly_price->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $_id = new Zend_Form_Element_Hidden("id");
     $_desc = new Zend_Dojo_Form_Element_TextBox('desc');
     $_desc->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'style' => 'width:96%;min-height:30px;'));
     $lang = new Zend_Dojo_Form_Element_TextBox('lang');
     $lang->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'style' => 'width:96%;min-height:50px;'));
     $_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
     $_status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = array(1 => "Active", 0 => "Deactive");
     $_status->setMultiOptions($opt);
     $_type = new Zend_Dojo_Form_Element_FilteringSelect('type');
     $_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $_status_opt = array(1 => $this->tr->translate("Guide"), 2 => $this->tr->translate("Driver"), 3 => $this->tr->translate("Both"));
     $_status_opt = $db->getVewOptoinTypeByType(8, 1, null, 1);
     $_type->setMultiOptions($_status_opt);
     $address = new Zend_Dojo_Form_Element_TextBox('home');
     $address->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $groupnum = new Zend_Dojo_Form_Element_TextBox('group');
     $groupnum->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $streetnum = new Zend_Dojo_Form_Element_TextBox('street');
     $streetnum->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $commune = new Zend_Dojo_Form_Element_TextBox('commune');
     $commune->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $district = new Zend_Dojo_Form_Element_TextBox('district');
     $district->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $province = new Zend_Dojo_Form_Element_FilteringSelect('province');
     $province->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = $db->getAllProvince(1);
     $province->setMultiOptions($opt);
     $id_card = new Zend_Dojo_Form_Element_TextBox('id_card');
     $id_card->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $issued_date = new Zend_Dojo_Form_Element_DateTextBox('issued_date');
     $issued_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $issued_date->setValue(date("Y-m-d"));
     $registered_date = new Zend_Dojo_Form_Element_DateTextBox('registered_date');
     $registered_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $registered_date->setValue(date("Y-m-d"));
     $expired_date = new Zend_Dojo_Form_Element_DateTextBox('expired_date');
     $expired_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $expired_date->setValue(date("Y-m-d"));
     $_email = new Zend_Dojo_Form_Element_TextBox('email');
     $_email->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'style' => 'color:red;'));
     ///////////////////////
     $citynormalprice = new Zend_Dojo_Form_Element_NumberTextBox('citynormalprice');
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:lynacr,代码行数:101,代码来源:FrmClient.php

示例6: FrmAddVillage

 public function FrmAddVillage($data = null)
 {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $_title = new Zend_Dojo_Form_Element_TextBox('adv_search');
     $_title->setAttribs(array('dojoType' => $this->tvalidate, 'onkeyup' => 'this.submit()', 'placeholder' => $this->tr->translate("SEARCH_VILLAGE_INFO")));
     $_title->setValue($request->getParam("adv_search"));
     $_status_search = new Zend_Dojo_Form_Element_FilteringSelect('search_status');
     $_status_search->setAttribs(array('dojoType' => $this->filter));
     $_status_opt = array(-1 => $this->tr->translate("ALL"), 1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status_search->setMultiOptions($_status_opt);
     $_status_search->setValue($request->getParam("search_status"));
     $_btn_search = new Zend_Dojo_Form_Element_SubmitButton('btn_search');
     $_btn_search->setAttribs(array('dojoType' => 'dijit.form.Button', 'iconclass' => 'dijitIconSearch'));
     $village_name = new Zend_Dojo_Form_Element_ValidationTextBox('village_name');
     $village_name->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => 'true', 'missingMessage' => 'Invalid Module!', 'class' => 'fullside'));
     $village_namekh = new Zend_Dojo_Form_Element_ValidationTextBox('village_namekh');
     $village_namekh->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => 'true', 'missingMessage' => 'Invalid Module!', 'class' => 'fullside'));
     $_db = new Application_Model_DbTable_DbGlobal();
     $rows_provice = $_db->getCommune();
     $opt_commune = "";
     if (!empty($rows_provice)) {
         foreach ($rows_provice as $row) {
             $opt_commune[$row['com_id']] = $row['commune_name'];
         }
     }
     $commune_name = new Zend_Dojo_Form_Element_FilteringSelect('commune_name');
     $commune_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $commune_name->setMultiOptions($opt_commune);
     $commune_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => 'true', 'class' => 'fullside'));
     $popup_commune_name = new Zend_Dojo_Form_Element_FilteringSelect('popup_commune_name');
     $popup_commune_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $popup_commune_name->setMultiOptions($opt_commune);
     $rows_provice = $_db->getAllDistrict();
     $opt_province = array($this->tr->translate("SELECT_DISTRICT"));
     if (!empty($rows_provice)) {
         foreach ($rows_provice as $row) {
             $opt_province[$row['dis_id']] = $row['district_name'];
         }
     }
     $district_name = new Zend_Dojo_Form_Element_FilteringSelect('district_name');
     $district_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $_display = new Zend_Dojo_Form_Element_FilteringSelect('display');
     $_display->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $_display_opt = array(1 => $this->tr->translate("NAME_KHMER"), 2 => $this->tr->translate("NAME_EN"));
     $_display->setMultiOptions($_display_opt);
     $district_name->setMultiOptions($opt_province);
     $district_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => 'true', 'class' => 'fullside'));
     $rows_provice = $_db->getAllDistrict();
     $opt_province = array($this->tr->translate("SELECT_DISTRICT"));
     if (!empty($rows_provice)) {
         foreach ($rows_provice as $row) {
             $opt_province[$row['dis_id']] = $row['district_name'];
         }
     }
     $district_name = new Zend_Dojo_Form_Element_FilteringSelect('district_name');
     $district_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $district_name->setMultiOptions($opt_province);
     $district_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => 'true', 'class' => 'fullside'));
     $rows_provice = $_db->getAllProvince();
     $opt_province = array($this->tr->translate("SELECT_PROVINCE"));
     if (!empty($rows_provice)) {
         foreach ($rows_provice as $row) {
             $opt_province[$row['province_id']] = $row['province_en_name'];
         }
     }
     $_province = new Zend_Dojo_Form_Element_FilteringSelect('province_name');
     $_province->setMultiOptions($opt_province);
     $_province->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => 'true', 'class' => 'fullside', 'onchange' => 'filterDistrict();', 'invalidMessage' => false));
     $_province->setValue($request->getParam("province_name"));
     $_arr = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status = new Zend_Dojo_Form_Element_FilteringSelect("status");
     $_status->setMultiOptions($_arr);
     $_status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => 'true', 'missingMessage' => 'Invalid Module!', 'class' => 'fullside'));
     $_fromdate = new Zend_Dojo_Form_Element_DateTextBox('from_date');
     $_fromdate->setAttribs(array('dojoType' => $this->date, 'class' => 'fullside', 'onchange' => 'CalculateDate();'));
     $_date = $request->getParam("start_date");
     if (empty($_date)) {
         $_date = date('Y-m-01');
     }
     $_fromdate->setValue($_date);
     $_todate = new Zend_Dojo_Form_Element_DateTextBox('to_date');
     $_todate->setAttribs(array('dojoType' => $this->date, 'class' => 'fullside'));
     $_date = $request->getParam("end_date");
     if (empty($_date)) {
         $_date = date("Y-m-d");
     }
     $_todate->setValue($_date);
     $id = new Zend_Form_Element_Hidden('id');
     if (!empty($data)) {
         $id->setValue($data['vill_id']);
         $village_name->setValue($data['village_name']);
         $village_namekh->setValue($data['village_namekh']);
         $_display->setValue($data['displayby']);
         $_province->setValue($data['pro_id']);
         $district_name->setValue($data['dis_id']);
         $commune_name->setValue($data['commune_id']);
         $_status->setValue($data['status']);
     }
     $this->addElements(array($_fromdate, $_todate, $_btn_search, $_status_search, $_title, $id, $commune_name, $popup_commune_name, $village_name, $district_name, $_province, $_status, $village_namekh, $_display));
     return $this;
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:lynacr,代码行数:101,代码来源:FrmVillage.php

示例7: FrmAddClient


//.........这里部分代码省略.........
// 		$opt_client_d_type= $db->getVewOptoinTypeByType(23,1);
// 		$client_d_type->setMultiOptions($opt_client_d_type);
		
// 		$join_d_type = new Zend_Dojo_Form_Element_FilteringSelect('join_d_type');
// 		$join_d_type->setAttribs(array(
// 				'dojoType'=>'dijit.form.FilteringSelect',
// 				'class'=>'fullside',
// 		));
// 		$join_d_type->setMultiOptions($opt_client_d_type);
		
// 		$guarantor_d_type = new Zend_Dojo_Form_Element_FilteringSelect('guarantor_d_type');
// 		$guarantor_d_type->setAttribs(array(
// 				'dojoType'=>'dijit.form.FilteringSelect',
// 				'class'=>'fullside',
// 		));
// 		$guarantor_d_type->setMultiOptions($opt_client_d_type);
		
		$guarantor_address = new Zend_Dojo_Form_Element_TextBox('guarantor_address');
		$guarantor_address->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
		));
		
		///////////////////////////////////
		
		$_province = new Zend_Dojo_Form_Element_FilteringSelect('province');
		$_province->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'onchange'=>'filterDistrict();',
				
		));
		
		$rows =  $db->getAllProvince();
		$options=array($this->tr->translate("SELECT_PROVINCE")); //array(''=>"------Select Province------",-1=>"Add New");
		if(!empty($rows))foreach($rows AS $row) $options[$row['province_id']]=$row['province_en_name'];
		$_province->setMultiOptions($options);
// 		$_province->setValue($request->getParam('province'));
		
		
		$_district = new Zend_Dojo_Form_Element_FilteringSelect('district');
// 		$rows =  $db->getAllDistrict();
// 		$options=array(''=>"------Select------",-1=>"Add New");
// 		if(!empty($rows))foreach($rows AS $row) $options[$row['dis_id']]=$row['district_name'];
// 		$_district->setMultiOptions($options);
		$_district->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'onchange'=>'popupCheckDistrict();'
		));
		
		$_commune = new Zend_Dojo_Form_Element_FilteringSelect('commune');
// 		$rows =  $db->getCommune();
		$options=array(''=>"------Select------",-1=>"Add New");
// 		if(!empty($rows))foreach($rows AS $row) $options[$row['com_id']]=$row['commune_name'];
		$_commune->setMultiOptions($options);
		$_commune->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'onchange'=>'popupCheckCommune();'
		));
		
		$_village = new Zend_Dojo_Form_Element_FilteringSelect('village');
		$_village->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
开发者ID:samlanh,项目名称:lnms,代码行数:67,代码来源:FrmClient.php

示例8: FrmCustomer

 public function FrmCustomer($data = null)
 {
     $_dob = new Zend_Form_Element_Text('dob_client');
     $_dob->setValue(date("d-m-Y"));
     $_dob->setAttribs(array('class' => 'fullside', "style" => "width:100%"));
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $db = new Application_Model_DbTable_DbGlobal();
     $_namekh = new Zend_Form_Element_Text('name_kh');
     $_namekh->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_clientno = new Zend_Form_Element_Text('client_no');
     $_clientno->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $id_client = $db->getNewClientId();
     $_clientno->setValue($id_client);
     $_nameen = new Zend_Form_Element_Text('name_en');
     $_nameen->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_sex = new Zend_Form_Element_Select('sex');
     $_sex->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $opt_status = $db->getVewOptoinTypeByType(1, 1);
     unset($opt_status[-1]);
     unset($opt_status['']);
     $_sex->setMultiOptions($opt_status);
     $_situ_status = new Zend_Form_Element_Select('status');
     $_situ_status->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $home = new Zend_Form_Element_Text('home');
     $home->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $group_num = new Zend_Form_Element_Text('group_num');
     $group_num->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $i_group_num = new Zend_Form_Element_Text('igroup_num');
     $i_group_num->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $country = new Zend_Form_Element_Select('country');
     $country->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $row = $db->getAllCountry();
     $opt_country = array();
     if (!empty($row)) {
         foreach ($row as $rs) {
             $opt_country[$rs['id']] = $rs['country_name'];
         }
     }
     $country->setMultiOptions($opt_country);
     $state = new Zend_Form_Element_Text('state');
     $state->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $commune = new Zend_Form_Element_Text('commune');
     $commune->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $district = new Zend_Form_Element_Text('district');
     $district->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $icommune = new Zend_Form_Element_Text('zip');
     $icommune->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $city = new Zend_Form_Element_Text('city');
     $city->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $province = new Zend_Form_Element_Select('province');
     $province->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $opt = $db->getAllProvince(1);
     $province->setMultiOptions($opt);
     $_street = new Zend_Form_Element_Text('street');
     $_street->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $address1 = new Zend_Form_Element_Text('address1');
     $address1->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_id_type = new Zend_Form_Element_Select('id_type');
     $_id_type->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $address = new Zend_Form_Element_Text('address');
     $address->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_phone = new Zend_Form_Element_Text('phone');
     $_phone->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $photo = new Zend_Form_Element_File('photo');
     $photo->setAttribs(array());
     $job = new Zend_Form_Element_Text('job');
     $job->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $national_id = new Zend_Form_Element_Text('national_id');
     $national_id->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $email = new Zend_Form_Element_Text('email');
     $email->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $iemail = new Zend_Form_Element_Text('iemail');
     $iemail->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $fax = new Zend_Form_Element_Text('fax');
     $fax->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $balance = new Zend_Form_Element_Text('balance');
     $balance->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_id = new Zend_Form_Element_Hidden("id");
     $_desc = new Zend_Form_Element_Text('desc');
     $_desc->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_status = new Zend_Form_Element_Select('status');
     $_status->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_status_opt = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status->setMultiOptions($_status_opt);
     $_title = new Zend_Form_Element_Select('title');
     $_title->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_status_opt = array(1 => $this->tr->translate("Mr."), 2 => $this->tr->translate("Ms"), 3 => $this->tr->translate("Miss"));
     $_title->setMultiOptions($_status_opt);
     $customer_type = new Zend_Form_Element_Select('customer_type');
     $customer_type->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;'));
     $_status_opt = array(1 => $this->tr->translate("Self"), 2 => $this->tr->translate("Agency"));
     $customer_type->setMultiOptions($_status_opt);
     $nationality = new Zend_Form_Element_Text('nationality');
     $nationality->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $company_name = new Zend_Form_Element_Text('company_name');
     $company_name->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $passport = new Zend_Form_Element_Text('passport');
     $passport->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $p_issuedate = new Zend_Form_Element_Text('pissue_date');
     $p_issuedate->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:lynacr,代码行数:101,代码来源:FrmBooking.php

示例9: addPartner

 public function addPartner($data = NULL)
 {
     $_db = new Application_Model_DbTable_DbGlobal();
     $id = new Zend_Form_Element_Hidden('id');
     /* Form Elements & Other Definitions Here ... */
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $_title = new Zend_Dojo_Form_Element_TextBox('adv_search');
     $_title->setAttribs(array('dojoType' => $this->tvalidate, 'onkeyup' => 'this.submit()', 'placeholder' => $this->tr->translate("SEARCH INFO")));
     $_title->setValue($request->getParam("adv_search"));
     $_status_search = new Zend_Dojo_Form_Element_FilteringSelect('status_search');
     $_status_search->setAttribs(array('dojoType' => $this->filter));
     $_status_opt = array(-1 => $this->tr->translate("ALL"), 1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status_search->setMultiOptions($_status_opt);
     $_status_search->setValue($request->getParam("status_search"));
     $_btn_search = new Zend_Dojo_Form_Element_SubmitButton('btn_search');
     $_btn_search->setAttribs(array('dojoType' => 'dijit.form.Button', 'iconclass' => 'dijitIconSearch'));
     //////-------------------------------
     $mainbranch = new Zend_Dojo_Form_Element_FilteringSelect('main_branch');
     $mainbranch->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect'));
     $db = new Partner_Model_DbTable_DbPartner();
     $opt = $db->getNamePartnerparent(null, 1);
     $mainbranch->setMultiOptions($opt);
     $mainbranch->setValue($request->getParam('main_branch'));
     $rows_provice = $_db->getAllProvince();
     $opt_province = "";
     $opt_province = array('-1' => "------Select Province------");
     if (!empty($rows_provice)) {
         foreach ($rows_provice as $row) {
             $opt_province[$row['id']] = $row['name'];
         }
     }
     $province_name = new Zend_Dojo_Form_Element_FilteringSelect('province_name');
     $province_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'onchange' => 'filterDistrict();'));
     $province_name->setMultiOptions($opt_province);
     $province_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => 'true'));
     //------------------------------------------------------------------------
     $branchname = new Zend_Dojo_Form_Element_ValidationTextBox('branch_name');
     $branchname->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => true));
     $cade_number = new Zend_Dojo_Form_Element_TextBox('cade_number');
     $cade_number->setAttribs(array('dojoType' => 'dijit.form.TextBox'));
     $partnername = new Zend_Dojo_Form_Element_TextBox('partner_name');
     $partnername->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'Required' => true));
     $photo = new Zend_Form_Element_File('photo');
     $photo->setAttribs(array());
     $id_accournnumber = $db->getNewAccountNumber(1);
     $accournnumber = new Zend_Dojo_Form_Element_TextBox('account_number');
     $accournnumber->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'readonly' => 'readonly', 'style' => 'color:red;'));
     $accournnumber->setValue($id_accournnumber);
     $Address = new Zend_Dojo_Form_Element_TextBox('address');
     $Address->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox'));
     $homenumber = new Zend_Dojo_Form_Element_TextBox('home_number');
     $homenumber->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox'));
     $groupnumber = new Zend_Dojo_Form_Element_TextBox('group_number');
     $groupnumber->setAttribs(array('dojoType' => 'dijit.form.TextBox'));
     $streetnumber = new Zend_Dojo_Form_Element_TextBox('street_number');
     $streetnumber->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox'));
     $communnumber = new Zend_Dojo_Form_Element_ValidationTextBox('commun_number');
     $communnumber->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => true));
     $phonenumber = new Zend_Dojo_Form_Element_TextBox('phone_number');
     $phonenumber->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox'));
     $faxnumber = new Zend_Dojo_Form_Element_TextBox('fax_number');
     $faxnumber->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox'));
     $salephone = new Zend_Dojo_Form_Element_TextBox('sele_phone');
     $salephone->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox'));
     $status = new Zend_Dojo_Form_Element_FilteringSelect('status');
     $status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect'));
     $opt = array(1 => 'ប្រើប្រាស់', 0 => 'មិនបានប្រើប្រាស់');
     $status->setMultiOptions($opt);
     $note = new Zend_Dojo_Form_Element_SimpleTextarea('note');
     $note->setAttribs(array('dojoType' => 'dijit.form.SimpleTextarea'));
     $money_usa = new Zend_Dojo_Form_Element_NumberTextBox('money_usa');
     $money_usa->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'required' => true));
     $money_usa->setValue(0);
     $money_bath = new Zend_Dojo_Form_Element_NumberTextBox('money_bath');
     $money_bath->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'Required' => true));
     $money_bath->setValue(0);
     $money_real = new Zend_Dojo_Form_Element_NumberTextBox('money_riel');
     $money_real->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'Required' => true));
     $money_real->setValue(0);
     $status_getmoney = new Zend_Dojo_Form_Element_FilteringSelect('status_getmoney');
     $status_getmoney->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect'));
     $opt_status = array(1 => 'ដៃគូមេ', 2 => 'ដៃគូកូន');
     $status_getmoney->setMultiOptions($opt_status);
     $status_tran = new Zend_Dojo_Form_Element_FilteringSelect('tran_type');
     $status_tran->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect'));
     $status_option = array(1 => 'ប្រើប្រាស់សាច់ប្រាក់', 2 => 'ទូទាត់ខាងក្រៅ');
     $status_tran->setMultiOptions($status_option);
     $date = new Zend_Dojo_Form_Element_DateTextBox('date');
     $date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox'));
     $date->setValue(date('Y-m-d'));
     $from_date = new Zend_Dojo_Form_Element_DateTextBox('start_date');
     $from_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'required' => 'true', 'class' => 'fullside', 'onchange' => 'CalculateDate();'));
     $_date = $request->getParam("start_date");
     if (empty($_date)) {
         $_date = date('Y-m-01');
     }
     $from_date->setValue($_date);
     $to_date = new Zend_Dojo_Form_Element_DateTextBox('end_date');
     $to_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'required' => 'true', 'class' => 'fullside'));
     $_date = $request->getParam("end_date");
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:currencyms,代码行数:101,代码来源:FrmPartner.php

示例10: getAllProvinceOption

 /**
  * Generate navigation for use global
  * @author channy
  * @param $url current of action
  * @param $frm form for use cover of control 
  * @param $limit number of limit record
  * @return $record_count number of record
  */
 public function getAllProvinceOption()
 {
     $_db = new Application_Model_DbTable_DbGlobal();
     $rows = $_db->getAllProvince();
     $options = '<option value="-1" >' . htmlspecialchars('Please Select Province', ENT_QUOTES) . '</option>';
     if (!empty($rows)) {
         foreach ($rows as $value) {
             $options .= '<option value="' . $value['id'] . '" >' . htmlspecialchars($value['province_name'], ENT_QUOTES) . '</option>';
         }
     }
     return $options;
 }
开发者ID:samlanh,项目名称:lynacr,代码行数:20,代码来源:GlobalClass.php


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