コード例 #1
0
ファイル: ControllerSoldiers.php プロジェクト: s9271/SEW3
 protected function getSearchDefinition()
 {
     $form_values = array('class' => 'ClassSoldier', 'controller' => $this->search_controller, 'form' => array('id_soldier' => array('class' => 'table_id', 'type' => 'text'), 'name' => array('class' => 'table_name', 'type' => 'text'), 'surname' => array('class' => 'table_surname', 'type' => 'text'), 'mail' => array('class' => 'table_mail', 'type' => 'text'), 'phone' => array('class' => 'table_phone', 'type' => 'text'), 'pesel' => array('class' => 'table_pesel', 'type' => 'text'), 'id_status' => array('class' => 'table_status', 'type' => 'select', 'options' => ClassSoldierStatus::sqlGetAllItemsNameById(NULL, false, true)), 'actions' => array('class' => 'table_akcje')));
     return $form_values;
 }
コード例 #2
0
ファイル: ClassSoldier.php プロジェクト: s9271/SEW3
 public static function sqlGetAllItems($using_pages = false, $current_page = '1', $items_on_page = '5', $controller_search = '', array $custom_where = array())
 {
     if ($sql = parent::sqlGetAllItems($using_pages, $current_page, $items_on_page, $controller_search, $custom_where)) {
         foreach ($sql as $key => $val) {
             // Nazwa statusu
             $sql[$key]['status_name'] = ClassSoldierStatus::sqlGetItemNameByIdParent($val['id_status']);
         }
     }
     return $sql;
 }