Beispiel #1
0
 protected function getPageList($item)
 {
     $this->actions();
     // strony
     $this->controller_name = 'stopien';
     $this->using_pages = true;
     $this->count_items = ClassSoldierRank::sqlGetCountItems('', array('id_soldier' => $item->id));
     $this->current_page = ClassTools::getValue('number_page') ? ClassTools::getValue('number_page') : '1';
     // tytul strony
     $this->tpl_title = "{$item->name} {$item->surname}: Stopień wojskowy";
     // ladowanie funkcji
     $this->load_datetimepicker = true;
     $this->load_js_functions = true;
     // pobieranie wszystkich rekordow
     $this->tpl_values['items'] = ClassSoldierRank::sqlGetAllItems($this->using_pages, $this->current_page, $this->items_on_page, '', array('id_soldier' => $item->id));
     $this->tpl_values['id_soldier'] = $item->id;
     // pobieranie aktualnego stopnia
     $this->tpl_values['actually_rank'] = ClassSoldierRank::getActuallyRank($item->id);
     // ladowanie strony z lista
     return $this->loadTemplate('/soldier/ranks');
 }
Beispiel #2
0
 public function getRanks()
 {
     $items = ClassSoldierRank::sqlGetAllItems(false, '1', '100', '', array('id_soldier' => $this->id));
     if ($items && is_array($items) && count($items) > 0) {
         return $items;
     }
     return false;
 }