Esempio n. 1
0
 public function get_pro_list_all($_id, $_type, $_page, $_div)
 {
     $pagesize = 5;
     $res = $this->Program_apply->list_($_page, $pagesize, "ca.program_id =" . $_id);
     $res_cnt = $this->Program_apply->cnt("ca.program_id =" . $_id);
     $this->assigns["res_cnt"] = $res_cnt;
     $this->assigns["res"] = $res;
     $this->assigns["id"] = $_id;
     $this->assigns["div"] = $_div;
     $this->assigns["type"] = $_type;
     $this->assigns["page"] = $_page;
     $this->assigns["pagesize"] = $pagesize;
     $this->assigns["paging"] = get_paging_dot3($_page, $res_cnt, $pagesize);
 }
Esempio n. 2
0
 public function get_ap_list_all($_id, $_type, $_page, $_div)
 {
     $pagesize = 5;
     if ($_type == 'all') {
         $res = $this->Competitions_apply->list_out($_page, $pagesize, "ca.competition_id =" . $_id);
         $res_cnt = $this->Competitions_apply->cnt_out("ca.competition_id =" . $_id);
     } else {
         if ($_type == 'suc') {
             $res = $this->Competitions_apply->list_out($_page, $pagesize, "ca.status = 1 and ca.competition_id =" . $_id);
             $res_cnt = $this->Competitions_apply->cnt_out("ca.status = 1 and ca.competition_id =" . $_id);
         } else {
             if ($_type == 'pre') {
                 $res = $this->Competitions_apply->list_out($_page, $pagesize, "ca.status = 0 and ca.competition_id =" . $_id);
                 $res_cnt = $this->Competitions_apply->cnt_out("ca.status = 0 and ca.competition_id =" . $_id);
             } else {
                 if ($_type == 'rej') {
                     $res = $this->Competitions_apply->list_out($_page, $pagesize, "ca.status = 2 and ca.competition_id =" . $_id);
                     $res_cnt = $this->Competitions_apply->cnt_out("ca.status = 2 and ca.competition_id =" . $_id);
                 }
             }
         }
     }
     for ($i = 0; $i < sizeof($res); $i++) {
         $res[$i]["score"] = $this->Competitions_scoring->get_tot_score($res[$i]["id"]);
     }
     $this->assigns["res_cnt"] = $res_cnt;
     $this->assigns["res"] = $res;
     $this->assigns["id"] = $_id;
     $this->assigns["div"] = $_div;
     $this->assigns["type"] = $_type;
     $this->assigns["page"] = $_page;
     $this->assigns["pagesize"] = $pagesize;
     $this->assigns["paging"] = get_paging_dot3($_page, $res_cnt, $pagesize);
 }