Exemplo n.º 1
0
 public function FrmSetServicePrice($data = null)
 {
     $_db = new Application_Model_DbTable_DbGlobal();
     $_year = $this->_year;
     $_session = $this->_session;
     $_batch = new Zend_Dojo_Form_Element_NumberTextBox("batch");
     $_batch->setAttribs(array('dojoType' => $this->t_num, 'required' => 'true', 'class' => 'fullside'));
     // 		$this->_year->setAttribs(array(
     // 				'data-dojo-Type'=>$this->tvalidate,
     // 				'data-dojo-props'=>"regExp:'[0-5]{1}',
     // 				'required':true,'class':'fullside',
     // 				'invalidMessage':'អាចបញ្ជូលពី 1 ដល់  5'"));
     $_degree = new Zend_Dojo_Form_Element_FilteringSelect('degree');
     $_degree->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'Onchange' => 'CheckDegree()'));
     $arr_opt = $_db->getAllDegree();
     $_degree->setMultiOptions($arr_opt);
     $_remark = new Zend_Dojo_Form_Element_TextBox('remark');
     $_remark->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
     $rows = $_db->getAllFecultyName();
     array_unshift($rows, array('dept_id' => -1, 'en_name' => "Add New"));
     $opt = "";
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $opt[$row['dept_id']] = $row['en_name'];
         }
     }
     $_faculty = new Zend_Dojo_Form_Element_FilteringSelect("faculty");
     $_faculty->setMultiOptions($opt);
     $_faculty->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside', 'onchange' => 'showPopupDept()'));
     $_term = new Zend_Dojo_Form_Element_FilteringSelect("payment_term");
     $opt_term = $_db->getAllPaymentTerm();
     $_term->setMultiOptions($opt_term);
     $_term->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside'));
     $_create_date = new Zend_Dojo_Form_Element_DateTextBox("create_date");
     $_create_date->setAttribs(array('dojoType' => $this->date, 'required' => 'true', 'class' => 'fullside'));
     $_create_date->setValue(date("Y-m-d"));
     $_rank = new Zend_Dojo_Form_Element_FilteringSelect("rank");
     $opt_rank = $_db->getAllMention();
     $_rank->setMultiOptions($opt_rank);
     $_rank->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside'));
     $this->addElements(array($_degree, $_faculty, $_batch, $_year, $_session, $_term, $_remark, $_rank, $_create_date));
     return $this;
 }
Exemplo n.º 2
0
 public function FrmStudentRequest($data = null)
 {
     $_degree = $this->_degree;
     $_khname = $this->_khname;
     $_enname = $this->_enname;
     $_phone = $this->_phone;
     $_batch = $this->_batch;
     $_year = $this->_year;
     $_session = $this->_session;
     $_dob = $this->_dob;
     $_pay_date = $this->_pay_date;
     $_remark = $this->_remark;
     $_reciept_no = new Zend_Dojo_Form_Element_TextBox('reciept_no');
     $_reciept_no->setAttribs(array('dojoType' => $this->t_num, 'class' => 'fullside', 'dojoType' => $this->t_num, 'required' => 'true', 'class' => 'fullside'));
     $_studid = new Zend_Dojo_Form_Element_TextBox('stu_id');
     $_studid->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
     $_pob = new Zend_Dojo_Form_Element_TextBox('pob');
     $_pob->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
     $_cur_add = new Zend_Dojo_Form_Element_TextBox('current_add');
     $_cur_add->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
     $_fee = new Zend_Dojo_Form_Element_NumberTextBox('payment_paid');
     $_fee->setAttribs(array('dojoType' => $this->t_num, 'required' => 'true', 'class' => 'fullside'));
     $_db = new Application_Model_DbTable_DbGlobal();
     $rows = $_db->getAllFecultyName();
     //$rows = $_db->getGlobalDb('SELECT en_name,dept_id FROM rms_dept WHERE is_active=1 AND en_name !="" ');
     $opt = array();
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $opt[$row['dept_id']] = $row['en_name'];
         }
     }
     $_dept = new Zend_Dojo_Form_Element_FilteringSelect("dept");
     $_dept->setMultiOptions($opt);
     $_dept->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside'));
     $rows = $_db->getAllstudentRequest();
     $re_opt = array();
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $re_opt[$row['service_id']] = $row['title'];
         }
     }
     $_request = new Zend_Dojo_Form_Element_FilteringSelect("request_id");
     $_request->setMultiOptions($re_opt);
     $_request->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside'));
     $_save = new Zend_Dojo_Form_Element_Button('$this->tr->translate("SAVE_PAYMENT")');
     $_save->setAttribs(array('dojoType' => 'dijit.form.Button'));
     $_save->setValue("save");
     $this->addElements(array($_reciept_no, $_pay_date, $_pob, $_khname, $_enname, $_studid, $_dob, $_degree, $_phone, $_dept, $_batch, $_year, $_session, $_fee, $_cur_add, $_remark, $_request, $_save));
     return $this;
 }
Exemplo n.º 3
0
 public function getAllFacultyOption()
 {
     $_db = new Application_Model_DbTable_DbGlobal();
     $rows = $_db->getAllFecultyName();
     array_unshift($rows, array('dept_id' => -1, 'en_name' => "Add New"));
     $options = '';
     if (!empty($rows)) {
         foreach ($rows as $value) {
             $options .= '<option value="' . $value['dept_id'] . '" >' . htmlspecialchars($value['en_name'], ENT_QUOTES) . '</option>';
         }
     }
     return $options;
 }
Exemplo n.º 4
0
 public function frmSearchTutionFee($_data = null)
 {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $_title = new Zend_Dojo_Form_Element_TextBox('fee_code');
     $_title->setAttribs(array('dojoType' => $this->text, 'placeholder' => $this->tr->translate("SEARCH_BY_CODE")));
     $_title->setValue($request->getParam('title'));
     $_batch = new Zend_Dojo_Form_Element_TextBox('batch');
     $_batch->setAttribs(array('dojoType' => $this->text, 'placeholder' => $this->tr->translate("SEARCH_BY_BATCH")));
     $_batch->setValue($request->getParam('title'));
     $_status = new Zend_Dojo_Form_Element_FilteringSelect('status_search');
     $_status->setAttribs(array('dojoType' => $this->filter));
     $_status_opt = array(-1 => $this->tr->translate("ALL_STATUS"), 1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status->setMultiOptions($_status_opt);
     $_status->setValue($request->getParam("status_search"));
     $db = new Application_Model_DbTable_DbGlobal();
     $rows = $db->getAllFecultyName();
     $opt = array(-1 => $this->tr->translate("CHOOSE"));
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $opt[$row['dept_id']] = $row['en_name'];
         }
     }
     $_faculty = new Zend_Dojo_Form_Element_FilteringSelect('faculty');
     $_faculty->setAttribs(array('dojoType' => $this->filter));
     $_faculty->setMultiOptions($opt);
     $_faculty->setValue($request->getParam("faculty"));
     $row = $db->getAllDegree();
     //$row=array(-1=>$this->tr->translate("CHOOSE"));
     $_degree = new Zend_Dojo_Form_Element_FilteringSelect('degree');
     $_degree->setAttribs(array('dojoType' => $this->filter));
     $_degree->setMultiOptions($row);
     $row = $db->getAllMention();
     array_unshift($row, array(-1 => $this->tr->translate("CHOOSE")));
     $_metion = new Zend_Dojo_Form_Element_FilteringSelect('metion');
     $_metion->setAttribs(array('dojoType' => $this->filter));
     $_metion->setMultiOptions($row);
     $this->addElements(array($_degree, $_batch, $_faculty, $_title, $_status, $_metion));
     if (!empty($_data)) {
     }
     return $this;
 }