Example #1
0
 /**
  * get section select form (target branch)
  * @param int $_branch_no
  * @param string $_type
  */
 public function setSelectSection($_branch_no, $_type = null)
 {
     if ($_branch_no) {
         $db = new SectionTable();
         $where = array('section_no <> 0', 'branch_no' => (int) $_branch_no);
         $row = $db->getPairs(null, null, 0, $where);
     } else {
         $row = array();
     }
     $this->add(array('name' => ($_type == 'search' ? 'search-' : '') . 'section_no', 'type' => 'select', 'attributes' => array('id' => ($_type == 'search' ? 'search-' : '') . 'section_no'), 'options' => array('label' => 'Name', 'value_options' => $row, 'empty_option' => 'Select section')));
 }
Example #2
0
 /**
  * get section select form
  * @param array $_data
  * @return array
  */
 public function getSectionList($_data)
 {
     $branch_no = gv('branch_no', $_data);
     $where = array('branch_no' => $branch_no);
     $db = new SectionTable();
     return $db->getPairs(null, null, 0, $where);
 }
Example #3
0
 /**
  * get section select form
  * @param int $_branch_no
  * @return array
  */
 public function getSectionList($_branch_no)
 {
     if (!$_branch_no) {
         return array();
     }
     $where = array('branch_no' => (int) $_branch_no);
     $db = new SectionTable();
     return $db->getPairs(null, null, 0, $where);
 }