public function index_o($_page = 1) { $pagesize = 3; $res = $this->Event->list_($_page, $pagesize, '', 1); $len_res = sizeof($res); for ($i = 0; $i < $len_res; $i++) { if ($res[$i]["state"] == 1) { $tmp_s = $res[$i]["date"] . " " . $res[$i]["start"]; $tmp_e = $res[$i]["date"] . " " . $res[$i]["end"]; $tmp_c = date("Y-m-d H:i"); if ($tmp_c > $tmp_e) { $res[$i]["state_expand"] = "end"; } else { if ($tmp_c > $tmp_s && $tmp_c < $tmp_e) { $res[$i]["state_expand"] = "ing"; } else { $res[$i]["state_expand"] = "before"; } } } } $res_cnt = $this->Event->cnt(); $this->assigns["c_res"] = $this->Event->get_by_date(date("Y/m/d")); $this->assigns["res"] = $res; $this->assigns["page"] = $_page; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); }
public function qna($_page = 1) { $_pagesize = 10; $category = $this->Faq->list_category(1, 1000, 2); $w = ""; if ($_REQUEST["q"] && $_REQUEST["category"]) { $w = $w . "cat = " . $_REQUEST["category"] . " and (title like '%" . $_REQUEST["q"] . "%' or content like '%" . $_REQUEST["q"] . "%' or name like '%" . $_REQUEST["q"] . "%')"; $this->assigns["q"] = $_REQUEST["q"]; $this->assigns["c"] = $_REQUEST["category"]; } else { if ($_REQUEST["category"]) { $w = $w . "cat = " . $_REQUEST["category"]; $this->assigns["c"] = $_REQUEST["category"]; } } if ($_REQUEST["me"]) { if ($w != "") { $w = $w . " and "; } $w = $w . "f.user_id = " . $_SESSION["s"]["id"]; } $qna = $this->Faq->list_(2, $_page, $_pagesize, $w); $qna_c = $this->Faq->cnt($w, 2); $this->assigns["category"] = $category; $this->assigns["qna"] = $qna; $this->assigns["qna_c"] = $qna_c; $this->assigns["page"] = $_page; $this->assigns["pagesize"] = $_pagesize; $this->assigns["paging"] = get_paging_dot2($_page, $qna_c, $_pagesize); $this->assigns["me"] = $_REQUEST["me"]; if ($_SESSION["msg"]) { $this->assigns_layout["msg"] = $_SESSION["msg"]; unset($_SESSION["msg"]); } }
public function index($_page = 1) { $this->assigns_layout["gnb_left"] = "startup"; $pagesize = 10; $where = ''; if ($_REQUEST["sort"]) { $where = $_REQUEST["sort"] . "=" . $_REQUEST["order"]; } if ($_REQUEST['order'] == 99) { $where = ''; } if ($_REQUEST["search"]) { if ($where != '') { $where = $where . " and "; } $where = '(name like "%' . $_REQUEST["search"] . '%" or bio like "%' . $_REQUEST["search"] . '%" or addr like "%' . $_REQUEST["search"] . '%")'; } $res = $this->Startup->list_($_page, $pagesize, $where); $res_cnt = $this->Startup->cnt($where); $this->assigns["res"] = $res; $this->assigns["page"] = $_page; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); $this->assigns["search"] = $_REQUEST["search"]; $this->assigns["order"] = $_REQUEST["order"]; $this->assigns["sort"] = $_REQUEST["sort"]; }
public function index($_page = 1) { $this->assigns_layout["gnb_left"] = "event"; $pagesize = 10; $where = ''; if (!$_REQUEST["sort"]) { $_REQUEST["sort"] = "state"; $_REQUEST["order"] = 0; } $where = "e." . $_REQUEST["sort"] . "=" . $_REQUEST["order"]; if ($_REQUEST['order'] == 99) { $where = ''; } if ($_REQUEST["search"]) { if ($where != '') { $where = $where . " and "; } $where = $where . '(title like "%' . $_REQUEST["search"] . '%" or contents like "%' . $_REQUEST["search"] . '%" or m.name like "%' . $_REQUEST["search"] . '%" or s.name like "%' . $_REQUEST["search"] . '%" or e.space_etc like "%' . $_REQUEST["search"] . '%")'; } $order = 'e.date DESC'; if ($_REQUEST["order_e"]) { $order = "ss " . $_REQUEST["order_e"]; } $res = $this->Event->list_($_page, $pagesize, $where, '', $order); $len_res = sizeof($res); for ($i = 0; $i < $len_res; $i++) { if ($res[$i]["state"] == 1) { $tmp_s = $res[$i]["date"] . " " . $res[$i]["start"]; $tmp_e = $res[$i]["date"] . " " . $res[$i]["end"]; $tmp_c = date("Y-m-d H:i"); if ($tmp_c > $tmp_e) { $res[$i]["state_expand"] = "end"; } else { if ($tmp_c > $tmp_s && $tmp_c < $tmp_e) { $res[$i]["state_expand"] = "ing"; } else { $res[$i]["state_expand"] = "before"; } } } } $res_cnt = $this->Event->cnt_($where); $this->assigns["res"] = $res; $this->assigns["page"] = $_page; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); $this->assigns["search"] = $_REQUEST["search"]; $this->assigns["order"] = $_REQUEST["order"]; $this->assigns["sort"] = $_REQUEST["sort"]; $this->assigns["order_t"] = $_REQUEST["order_t"]; $this->assigns["order_e"] = 'DESC'; if ($_REQUEST["order_e"]) { $this->assigns["order_e"] = $_REQUEST["order_e"]; } }
public function index($_page = 1) { $this->assigns_layout["gnb_left"] = "notice"; $pagesize = 10; $res = $this->Notice->list_($_page, $pagesize); $res_cnt = $this->Notice->cnt(); $this->assigns["res"] = $res; $this->assigns["page"] = $_page; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); }
public function index($_page = 1) { $this->assigns_layout["gnb_left"] = "contents"; $pagesize = 10; if ($_REQUEST["sort"] && array_key_exists("order", $_REQUEST)) { $where = $_REQUEST["sort"] . "=" . $_REQUEST["order"]; if ($_REQUEST['order'] == 99) { $where = ''; } } $res = $this->Content->list_($_page, $pagesize, $where); $res_cnt = $this->Content->cnt($where); $this->assigns["res"] = $res; $this->assigns["page"] = $_page; $this->assigns["pagesize"] = $pagesize; $this->assigns["res_cnt"] = $res_cnt; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); $this->assigns["order"] = $_REQUEST["order"]; }
public function index($_page = 1) { $this->assigns_layout["gnb_left"] = "membership"; $pagesize = 10; $where = ''; if ($_REQUEST["sort"]) { $where = $_REQUEST["sort"] . " = " . $_REQUEST["order"]; } if ($_REQUEST["order"] == 3) { $where = "m.state = " . $_REQUEST["order"]; } if ($_REQUEST['order'] == 99) { $where = ''; } if ($_REQUEST["search"]) { // $where = '(m.name like "%'.$_REQUEST["search"].'%" or m.ids like "%'.$_REQUEST["search"].'%" or referee like "%'.$_REQUEST["search"].'%")'; $res = $this->Recommend->list_search($_page, $pagesize, $_REQUEST['search']); $res_cnt = $this->Recommend->cnt_search($_REQUEST['search']); } else { $res = $this->Recommend->list_($_page, $pagesize, $where); $res_cnt = $this->Recommend->cnt($where); } $len_res = sizeof($res); for ($i = 0; $i < $len_res; $i++) { if ($res[$i]["rec_com"]) { $res[$i]["com"] = $this->Startup->get($res[$i]["rec_com"]); } if ($res[$i]["rec_mem"]) { $res[$i]["mem"] = $this->Members->get($res[$i]["rec_mem"]); } } $this->assigns["res"] = $res; $this->assigns["search"] = $_REQUEST["search"]; $this->assigns["order"] = $_REQUEST["order"]; $this->assigns["sort"] = $_REQUEST["sort"]; $this->assigns["page"] = $_page; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); }
public function index($_page = 1) { $this->assigns_layout["gnb_left"] = "bz"; $pagesize = 10; $where = 'user_id_bz IS NOT NULL'; $order = 'id DESC'; if (!array_key_exists("order", $_REQUEST)) { $_REQUEST["order"] = 99; } if ($_REQUEST["sort"] && $_REQUEST["sort"] != 'status_bz') { $order = $_REQUEST["sort"] . " " . $_REQUEST["order"]; } if ($_REQUEST["sort"] && $_REQUEST["sort"] == 'status_bz') { if ($_REQUEST["order"] != 99) { $where = $where . " and status_bz = " . $_REQUEST["order"]; } } if ($_REQUEST["search"]) { $where = $where . " and (name like '%" . $_REQUEST["search"] . "%' or des_ele like '%" . $_REQUEST["search"] . "%'" . " or startup_name like '%" . $_REQUEST["search"] . "%')"; } $res = $this->Startup_service->list_('', $where, $order, $_page, $pagesize); for ($i = 0; $i < sizeof($res); $i++) { $res[$i]["u"] = $this->Members->get($res[$i]["user_id_bz"]); if ($res[$i]["startup_id"]) { $res[$i]["c"] = $this->Startup->get($res[$i]["startup_id"]); } } $res_cnt = $this->Startup_service->cnt($where); $this->assigns["res"] = $res; $this->assigns["res_cnt"] = $res_cnt; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); $this->assigns["page"] = $_page; $this->assigns["pagesize"] = $pagesize; $this->assigns["sort"] = $_REQUEST["sort"]; $this->assigns["order"] = $_REQUEST["order"]; $this->assigns["search"] = $_REQUEST["search"]; }
public function index($_page = 1) { $this->assigns_layout["gnb_left"] = "recruit"; $pagesize = 10; $where = ''; $c_where = ''; if ($_REQUEST["sort"]) { $where = "r." . $_REQUEST["sort"] . "=" . $_REQUEST["order"]; $c_where = $_REQUEST["sort"] . "=" . $_REQUEST["order"]; } if ($_REQUEST['order'] == 99) { $where = ''; $c_where = ''; } if ($_REQUEST["search"]) { if ($where != '') { $where = $where . " and "; } if ($c_where != '') { $c_where = $c_where . " and "; } $where = $where . '(title like "%' . $_REQUEST["search"] . '%" or contents like "%' . $_REQUEST["search"] . '%" )'; $c_where = $c_where . '(title like "%' . $_REQUEST["search"] . '%" or contents like "%' . $_REQUEST["search"] . '%" )'; } $res = $this->Recruit->list_s_($_page, $pagesize, $where); $len_res = sizeof($res); for ($i = 0; $i < $len_res; $i++) { $res[$i]["sector"] = $this->Recruit_opt->get_detail($res[$i]["rid"], 7); } $res_cnt = $this->Recruit->cnt('', $c_where); $this->assigns["res"] = $res; $this->assigns["page"] = $_page; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); $this->assigns["search"] = $_REQUEST["search"]; $this->assigns["order"] = $_REQUEST["order"]; $this->assigns["sort"] = $_REQUEST["sort"]; }
public function applied_list($_id, $_page = 1) { header("Location: /benefit/applied_list/" . $_id . "/" . $_page); if (!$_SESSION["s"]) { $_SESSION["msg"] = "로그인 후 이용하실 수 있습니다."; header("Location: /"); } if (!$_id) { header("Location: /error_404"); } $pagesize = 10; $sort = $_REQUEST["sort"]; if (!$sort) { $sort = 1; } $res = $this->Program->get($_id); $where = "ca.program_id = " . $_id; $list = $this->Program_apply->list_out($_page, $pagesize, $where, ""); for ($i = 0; $i < sizeof($list); $i++) { $u = $this->Members->get($list[$i]["user_id"]); $list[$i]["ids"] = $u["ids"]; $list[$i]["name"] = $u["name"]; $list[$i]["memail"] = $u["email"]; $list[$i]["bio"] = $u["bio"]; $list[$i]["picture"] = $u["picture"]; } // dashboard $_sDate = str_replace(".", "-", substr($res["a_start"], 0, 10)); $_eDate = str_replace(".", "-", substr($res["a_end"], 0, 10)); if ($_eDate > date("Y-m-d")) { $_eDate = date("Y-m-d"); } $term = dateDiff($_eDate, $_sDate, "-"); // echo $term; for ($d = 0; $d < $term + 1; $d++) { $day = date("Y-m-d", strtotime("+{$d} day", strtotime($_sDate))); $d_list[$d]["day"] = str_replace("-", ".", $day); $d_list[$d]["all"] = $this->Program_apply->cnt_out("ca.date_created like '" . $day . "%' and ca.program_id = " . $_id); } $this->assigns["d_list"] = array_reverse($d_list); $this->assigns["alig"] = $_REQUEST["alig"]; $list_cnt = $this->Program_apply->cnt_out($where); $this->assigns["res"] = $res; $this->assigns["list"] = $list; $this->assigns["page"] = $_page; $this->assigns["pagesize"] = $pagesize; $this->assigns["list_cnt"] = $list_cnt; $this->assigns["list_cnt_reject"] = $this->Program_apply->cnt_out("ca.status = 2 and ca.program_id = " . $_id); $this->assigns["paging"] = get_paging_dot2($_page, $list_cnt, $pagesize); $this->assigns["sort"] = abs($sort); $this->assigns["tab"] = $_REQUEST["tab"]; $this->assigns["m_list"] = $this->Program->get_list(1, 5, "c.user_id = " . $_SESSION["s"]["id"]); $this->assigns["a_list"] = $this->Program_apply->list_all(1, 5, "ca.user_id = " . $_SESSION["s"]["id"]); if ($_SESSION["s"]["id"] != $res["user_id"]) { header("Location: /error_404"); } }
public function locker_month_already($_page = 1, $_date = '') { $pagesize = 10; if (!$_date) { $time = time(); $_date = date('Y-m', strtotime("-1 month", $time)); } $res = $this->Locker_month->get_by_month($_page, $pagesize, $_date, 'l.state = 1'); $res_cnt = $this->Locker_month->get_cnt($_date, 'state = 1'); $len_size = sizeof($res); for ($i = 0; $i < $len_size; $i++) { if ($res[$i]["membership"]) { $t = $this->Recommend->get_detail($res[$i]["mid"]); $res[$i]["mbs_date"] = $t["date_edited"]; } $cnt_m = $this->Entrance->get_cnt_by_user($res[$i]["mid"], "date_in like '" . $_date . "%'"); $res[$i]["cnt"] = $cnt_m; $cnt_a = $this->Entrance->get_cnt_by_user($res[$i]["mid"]); $res[$i]["cnt_a"] = $cnt_a; } $this->assigns["res"] = $res; $this->assigns["res_cnt"] = $res_cnt; $this->assigns["date"] = $_date; $this->assigns["page"] = $_page; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); }
public function examiner_list($_page = 1) { $this->assigns_layout["gnb_left"] = "competition_pool"; $pagesize = 10; $where = 'ce.public = 1'; $res = $this->Competitions_examiner->list_outer($_page, $pagesize, $where); $len_res = sizeof($res); for ($i = 0; $i < $len_res; $i++) { $res[$i]["com"] = $this->Startup_member->get_by_user($res[$i]["user_id"]); $comp = $this->Competitions_examiner->get_by_user($res[$i]["user_id"], '', 1); $last = sizeof($comp); if ($last) { $lastt = $last - 1; $res[$i]["comp"] = $comp[0]["subject"] . " - 외 " . $lastt . "건"; if ($last == 1) { $res[$i]["comp"] = $comp[0]["subject"]; } } } $res_cnt = $this->Competitions_examiner->cnt_outer($where); $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); $this->assigns["res"] = $res; $this->assigns["res_cnt"] = $res_cnt; $this->assigns["page"] = $_page; $this->assigns["pagesize"] = $pagesize; if ($_SESSION["msg"]) { $this->assigns["msg"] = $_SESSION["msg"]; unset($_SESSION["msg"]); } }
public function event($_id = '') { $this->assigns_layout["tpl"] = "event"; $res = $this->Event->get($_id); if (!$_id || !$res) { header("Location: /lounge"); } $users = $this->Event_reserve->list_('', '', "er.state = 1 and e.id = " . $_id); $comments = $this->Board->list_(Board_model::EVENT_TYPE, $_id, $_page = 1, $_pagesize = 10); for ($i = 0; $i < sizeof($comments); $i++) { if ($_id == 0 && $comments[$i]["p_id"] > 0) { $e = $this->Event->get($comments[$i]["p_id"]); $comments[$i]["p_name"] = $e["title"]; } $comments[$i]["comm"] = $this->Board->get_comment($_type = 3, $comments[$i]["id"]); $comments[$i]["like"] = $this->Board->get_like_cnt($comments[$i]["id"]); $comments[$i]["is_like"] = $this->Board->get_like_this($comments[$i]["id"], $_SESSION["s"]["id"]); } $this->assigns["comments"] = $comments; $this->assigns["paging"] = get_paging_dot2($_page, $comments_cnt, $_pagesize); $this->assigns["page"] = $_page; $this->assigns["res"] = $res; $this->today(); $this->assigns["users"] = $users; $this->assigns["star"] = $this->Event->get_average_star($_id); $this->assigns["tw"] = $this->Member_ext->get_by_user_id_type($_SESSION["s"]["id"], Member_ext_model::TWITTER_TYPE); $this->assigns["fb"] = $this->Member_ext->get_by_user_id_type($_SESSION["s"]["id"], Member_ext_model::FACEBOOK_TYPE); $this->assigns["id"] = $_id; $this->assigns["check"] = $this->Event->check_star($_id, $_SESSION["s"]["id"]); $this->assigns_layout["og_url"] = "http://dcamp.kr/lounge/event/" . $_id; }
public function list_($_page = 1) { $this->assigns_layout["gnb_left"] = "list_"; $pagesize = 10; $res = $this->Space->list_($_page, $pagesize, 'visible < 2'); $res_cnt = $this->Space->cnt('visible < 2'); $this->assigns["res"] = $res; $this->assigns["page"] = $_page; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); }
public function qna_category($_page = 1) { $this->assigns_layout["gnb"] = "qna"; $this->assigns_layout["gnb_title"] = "Q&A"; $this->assigns_layout["gnb_left"] = "qna_c"; $_pagesize = 10; $res = $this->Faq->list_category($_page, $_pagesize, 2, '', 'id ASC'); $res_c = $this->Faq->cnt_category(2); $this->assigns["res"] = $res; $this->assigns["res_c"] = $res_c; $this->assigns["page"] = $_page; $this->assigns["pagesize"] = $_pagesize; $this->assigns["paging"] = get_paging_dot2($_page, $res_c, $_pagesize); if ($_SESSION["msg"]) { $this->assigns["msg"] = $_SESSION["msg"]; unset($_SESSION["msg"]); } }
public function applied_list($_id, $_page = 1) { if (!$_SESSION["s"]) { $_SESSION["msg"] = "로그인 후 이용하실 수 있습니다."; header("Location: /"); } if (!$_id) { header("Location: /error_404"); } $examiner = $this->Competitions_examiner->get_by_comp_user_ex($_id, $_SESSION["s"]["id"], "c.ex_confirm = 1 and ce.status = 1"); $op = $this->Competitions_examiner->operator_check($_id, $_SESSION["s"]["id"]); $pagesize = 10; $sort = $_REQUEST["sort"]; if (!$sort) { $sort = 1; } $res = $this->Competitions->get($_id); $where = "ca.competition_id = " . $_id; if ($_SESSION["s"]["id"] != $res["user_id"] && $examiner) { $where = $where . " and ca.status = 1"; } if ($_REQUEST["search"]) { $where = $where . " and (f_name like '%" . $_REQUEST["search"] . "%' or f_team like '%" . $_REQUEST["search"] . "%')"; } if ($_REQUEST["alig"] == "up") { $_sort = "score ASC"; } else { if ($_REQUEST["alig"] == "down") { $_sort = "score DESC"; } } if ($_SESSION["s"]["id"] == $res["user_id"] || $op) { $list = $this->Competitions_apply->list_info($_page, $pagesize, $where, "", $_sort); } else { if ($examiner) { $list = $this->Competitions_apply->list_info_by_user($_page, $pagesize, $where, $_SESSION["s"]["id"], $_sort); } } for ($i = 0; $i < sizeof($list); $i++) { $u = $this->Members->get($list[$i]["user_id"]); $list[$i]["ids"] = $u["ids"]; $list[$i]["name"] = $u["name"]; $list[$i]["memail"] = $u["email"]; $list[$i]["bio"] = $u["bio"]; $list[$i]["picture"] = $u["picture"]; } // dashboard $_sDate = str_replace(".", "-", $res["date_s"]); $_eDate = str_replace(".", "-", $res["date_e"]); if ($_eDate > date("Y-m-d")) { $_eDate = date("Y-m-d"); } $term = dateDiff($_eDate, $_sDate, "-"); // echo $term; for ($d = 0; $d < $term + 1; $d++) { $day = date("Y-m-d", strtotime("+{$d} day", strtotime($_sDate))); $d_list[$d]["day"] = str_replace("-", ".", $day); $d_list[$d]["all"] = $this->Competitions_apply->cnt_out("ca.date_created like '" . $day . "%' and ca.competition_id = " . $_id); $d_list[$d]["rej"] = $this->Competitions_apply->cnt_out("ca.status = 2 and ca.date_created like '" . $day . "%' and ca.competition_id = " . $_id); } $this->assigns["d_list"] = array_reverse($d_list); $this->assigns["alig"] = $_REQUEST["alig"]; $list_cnt = $this->Competitions_apply->cnt_out($where); $this->assigns["res"] = $res; $this->assigns["list"] = $list; $this->assigns["page"] = $_page; $this->assigns["pagesize"] = $pagesize; $this->assigns["list_cnt"] = $list_cnt; $this->assigns["list_cnt_reject"] = $this->Competitions_apply->cnt_out("ca.status = 2 and ca.competition_id = " . $_id); $this->assigns["paging"] = get_paging_dot2($_page, $list_cnt, $pagesize); $this->assigns["sort"] = abs($sort); $this->sub(); $this->assigns["tab"] = $_REQUEST["tab"]; $this->assigns["m_list"] = $this->Competitions->get_list(1, 5, "c.user_id = " . $_SESSION["s"]["id"]); $this->assigns["e_list"] = $this->Competitions_examiner->list_all(1, 5, "ce.user_id = " . $_SESSION["s"]["id"]); $this->assigns["a_list"] = $this->Competitions_apply->list_all(1, 5, "ca.user_id = " . $_SESSION["s"]["id"]); $this->assigns["op"] = $op; $this->assigns["ex"] = $examiner; $this->assigns["search"] = $_REQUEST["search"]; $this->get_process($res); if ($_SESSION["s"]["id"] != $res["user_id"] && !$examiner && !$op) { header("Location: /error_404"); } }
public function m_apply_all($_page = 1) { $m = $this->Office_mento->check_mento($_SESSION["s"]["id"]); if ($m) { $_pagesize = 10; $res = $this->Office_hours_apply->list_by_mentor($m["id"], $_page, $_pagesize); $res_cnt = $this->Office_hours_apply->list_by_mentor_cnt($m["id"]); for ($i = 0; $i < sizeof($res); $i++) { $res[$i]["i"] = $this->Office_hours_apply->get_by_mento_last($m["id"], $res[$i]["user_id"]); $res[$i]["url"] = $this->Members->get($res[$i]["i"]["user_id"]); $res[$i]["suc"] = $this->Office_hours_apply->cnt_w_mento('', 'a.status = 1 and a.user_id = ' . $res[$i]["user_id"] . " and h.mento_id = " . $m["id"]); $res[$i]["tot"] = $this->Office_hours_apply->cnt_w_mento('', 'a.user_id = ' . $res[$i]["user_id"] . " and h.mento_id = " . $m["id"]); } $this->assigns["res"] = $res; $this->assigns["res_cnt"] = $res_cnt; $this->assigns["page"] = $_page; $this->assigns["pagesize"] = $_pagesize; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $_pagesize); } }
public function mentor($_page = 1) { // memto list $this->assigns_layout["gnb_left"] = "mento"; $pagesize = 10; $res = $this->Office_mento->list_($_page, $pagesize); for ($i = 0; $i < sizeof($res); $i++) { if ($res[$i]["user_id"]) { $m = $this->Members->get($res[$i]["user_id"]); $res[$i]["ids"] = $m["ids"]; } } $res_cnt = $this->Office_mento->cnt(); $this->assigns["res"] = $res; $this->assigns["res_cnt"] = $res_cnt; $this->assigns["page"] = $_page; $this->assigns["pagesize"] = $pagesize; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); }
public function search($cat = "event", $_page = 1) { $og["url"] = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; $og["title"] = "검색 – '드림뱅크' 은행권청년창업재단"; if ($_REQUEST['key']) { $og["title"] = "검색 – '" . $_REQUEST["key"] . "'"; } $og["description"] = "D.CAMP – '드림뱅크' 은행권청년창업재단"; $og["image"] = 'http://' . $_SERVER['SERVER_NAME'] . '/img/dcamp.png'; $this->assigns_layout["og"] = $og; $pagesize = 20; $this->layout = 'default'; $this->assigns["key"] = $_REQUEST["key"]; $this->assigns["cat"] = $_REQUEST["cat"]; //count $event_cnt = $this->Event->get_by_search_cnt($_REQUEST["key"]); $challenge_cnt = $this->Competitions->get_by_search_cnt($_REQUEST["key"]); $office_hours_cnt = $this->Office_hours->get_by_search_cnt($_REQUEST["key"]); $recruit_cnt = $this->Recruit->get_by_search_cnt($_REQUEST["key"]); $benefit_cnt = $this->Program->get_by_search_cnt($_REQUEST["key"]); $blog_cnt = $this->Content->get_by_search_cnt($_REQUEST["key"], 'c.en = 0 and c.state = 1 and cc.hidden = 0'); $showcase_cnt = $this->Startup_service->get_by_search_cnt($_REQUEST["key"], 'status_bz = 1 and user_id_bz IS NOT NULL and img1 is not null and img1 != "" and des_ele is not null and des_ele != "" and des_pro is not null and des_pro != "" '); $startup_cnt = $this->Startup->get_by_search_cnt($_REQUEST["key"]); $people_cnt = $this->Members->get_by_search_cnt($_REQUEST["key"]); //resource if ($_REQUEST["key"]) { if ($cat == "event") { $event = $this->Event->search($_page, $pagesize, $_REQUEST["key"]); $this->assigns["event"] = $event; $res_cnt = $event_cnt; } else { if ($cat == "challenge") { $challenge = $this->Competitions->search($_page, $pagesize, $_REQUEST["key"]); $this->assigns["challenge"] = $challenge; $res_cnt = $challenge_cnt; } else { if ($cat == "office_hours") { $office_hours = $this->Office_hours->search($_page, $pagesize, $_REQUEST["key"]); $this->assigns["office_hours"] = $office_hours; $res_cnt = $office_hours_cnt; } else { if ($cat == "recruit") { $recruit = $this->Recruit->search($_page, $pagesize, $_REQUEST["key"]); $this->assigns["recruit"] = $recruit; $res_cnt = $recruit_cnt; } else { if ($cat == "benefit") { $benefit = $this->Program->search($_page, $pagesize, $_REQUEST["key"]); $this->assigns["benefit"] = $benefit; $res_cnt = $benefit_cnt; } else { if ($cat == "blog") { $blog = $this->Content->search($_page, $pagesize, $_REQUEST["key"], 'c.en = 0 and c.state = 1 and cc.hidden = 0'); $this->assigns["blog"] = $blog; $res_cnt = $blog_cnt; } else { if ($cat == "showcase") { $showcase = $this->Startup_service->search($_page, $pagesize, $_REQUEST["key"], 'status_bz = 1 and user_id_bz IS NOT NULL and img1 is not null and img1 != "" and des_ele is not null and des_ele != "" and des_pro is not null and des_pro != "" '); $this->assigns["showcase"] = $showcase; $res_cnt = $showcase_cnt; } else { if ($cat == "startup") { $startup = $this->Startup->search($_page, $pagesize, $_REQUEST["key"]); $this->assigns["startup"] = $startup; $res_cnt = $startup_cnt; } else { if ($cat == "people") { $people = $this->Members->search($_page, $pagesize, $_REQUEST["key"]); $this->assigns["people"] = $people; $res_cnt = $people_cnt; } } } } } } } } } $loc = $this->Code->get_by_key('local'); if ($people) { for ($i = 0; $i < sizeof($people); $i++) { $people[$i]["lc"] = $this->Member_local->get_by_member($people[$i]["id"]); $people[$i]["sk"] = $this->Member_skill->get_by_member($people[$i]["id"]); $people[$i]["in"] = $this->Member_interist->get_by_member($people[$i]["id"]); $people[$i]["com"] = $this->Startup_member->get_by_user($people[$i]["id"]); $people[$i]["education"] = $this->Member_education->list_($people[$i]["id"]); $res_lo = $this->Member_local->get_by_member($people[$i]["id"]); $loc_t = ""; for ($l = 0; $l < sizeof($loc); $l++) { for ($ll = 0; $ll < sizeof($res_lo); $ll++) { if ($loc[$l]["id"] == $res_lo[$ll]["local_id"]) { $loc_t = $loc_t . $loc[$l]['_value'] . ", "; } } } $in = $this->Member_interist->get_by_member_c($people[$i]["id"]); $inv = $this->Code->get_by_key('inv'); $inv_t = ""; for ($v = 0; $v < sizeof($inv); $v++) { for ($vv = 0; $vv < sizeof($in); $vv++) { if ($inv[$v]["id"] == $in[$vv]["interist_id"]) { $inv_t = $inv_t . $inv[$v]['_value'] . ", "; } } } $people[$i]["inv"] = $inv_t; $people[$i]["local"] = $loc_t; $people[$i]["sk"] = $this->Member_skill->get_by_member_c($people[$i]["id"]); } } if ($startup) { for ($j = 0; $j < sizeof($startup); $j++) { $startup[$j]["bi"] = $this->Startup_bussiness->get_by_member($startup[$j]["id"]); $startup[$j]["te"] = $this->Startup_tech->get_by_member($startup[$j]["id"]); $startup[$j]["lo"] = $this->Startup_local->get_by_member($startup[$j]["id"]); } } if ($recruit) { for ($r = 0; $r < sizeof($recruit); $r++) { $recruit[$r]["inv"] = $this->Recruit_opt->get_detail($recruit[$r]["id"], 7); } } $this->assigns["event_cnt"] = $event_cnt; $this->assigns["challenge_cnt"] = $challenge_cnt; $this->assigns["office_hours_cnt"] = $office_hours_cnt; $this->assigns["recruit_cnt"] = $recruit_cnt; $this->assigns["benefit_cnt"] = $benefit_cnt; $this->assigns["blog_cnt"] = $blog_cnt; $this->assigns["showcase_cnt"] = $showcase_cnt; $this->assigns["startup_cnt"] = $startup_cnt; $this->assigns["people_cnt"] = $people_cnt; $this->assigns["all_cnt"] = $event_cnt + $challenge_cnt + $office_hours_cnt + $recruit_cnt + $benefit_cnt + $blog_cnt + $showcase_cnt + $startup_cnt + $people_cnt; $this->assigns["cat"] = $cat; $this->assigns["page"] = $_page; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); } }
public function get_oh_apply_list_de($_type, $_id, $_page, $_admin = 0) { $_pagesize = 5; $oh = $this->Office_hours->get($_id); if ($oh["mid"] == $_SESSION["s"]["id"] || ($_SESSION["s"]["per"] & $this->settings->permission1) == $this->settings->permission1) { if ($_type == 1) { $res = $this->Office_hours_apply->list_u($_id, $_page, $_pagesize); $res_c = $this->Office_hours_apply->cnt($_id); } else { if ($_type == 2) { $res = $this->Office_hours_apply->list_u($_id, $_page, $_pagesize, 'status > 0'); $res_c = $this->Office_hours_apply->cnt($_id, 'status > 0'); } else { if ($_type == 3) { $res = $this->Office_hours_apply->list_u($_id, $_page, $_pagesize, 'status = 0'); $res_c = $this->Office_hours_apply->cnt($_id, 'status = 0'); } } } $this->assigns["res"] = $res; $this->assigns["res_c"] = $res_c; $this->assigns["paging"] = get_paging_dot2($_page, $res_c, $_pagesize); $this->assigns["page"] = $_page; $this->assigns["id"] = $_id; $this->assigns["type"] = $_type; $this->assigns["admin"] = $_admin; } }
public function pass($_page = '') { $this->assigns_layout["gnb_left"] = "pass"; if (!$_page) { $_page = 1; } $pagesize = 10; $res_cnt = $this->Entrance->cnt(date("Y-m-d"), "pass IS NOT NULL and pass != 0"); $this->assigns["res"] = $this->Entrance->list_($_page, $pagesize, date("Y-m-d"), "pass IS NOT NULL and pass != 0"); $this->assigns["page"] = $_page; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); }
public function grade_list($_page = 1) { if (($_SESSION["s"]["per"] & $this->settings->permission1) != $this->settings->permission1) { header("Location: /"); } $this->assigns_layout["gnb_left"] = "grade"; $pagesize = 10; $res = $this->Member_grade->list_($_page, $pagesize); $res_cnt = $this->Member_grade->cnt(); $this->assigns["res"] = $res; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); }
public function edit_rsv2($_page = 1) { $this->assigns_layout["sideb"] = "rsv2"; if ($this->Code->check("rep2", $_SESSION["s"]["id"])) { $pagesize = 10; $where = 's.type = 3'; $order = 'sr.id DESC'; $res = $this->Space_reserve->list_($_page, $pagesize, $where, $order); $res_cnt = $this->Space_reserve->cnt($where); $this->assigns["res"] = $res; $this->assigns["res_cnt"] = $res_cnt; $this->assigns["page"] = $_page; $this->assigns["pagesize"] = $pagesize; $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); if ($_SESSION["msg"]) { $this->assigns_layout["msg"] = $_SESSION["msg"]; unset($_SESSION["msg"]); } } else { $_SESSION["msg"] = "권한이 없는 접근입니다."; header("Location: /"); } }
public function applied_list($_id, $_page = 1) { if (!$_SESSION["s"]) { $_SESSION["msg"] = "로그인 후 이용하실 수 있습니다."; header("Location: /"); } if (!$_id) { header("Location: /error_404"); } $examiner = $this->Competitions_examiner->get_by_comp_user($_id, $_SESSION["s"]["id"]); $pagesize = 10; $sort = $_REQUEST["sort"]; if (!$sort) { $sort = 1; } $res = $this->Competitions->get($_id); $where = "ca.competition_id = " . $_id; if ($_SESSION["s"]["id"] != $res["user_id"] && $examiner) { $where = $where . " and ca.status = 1"; } // $list = $this->Competitions_apply->list_($_page, $pagesize, $where); // for ($i=0; $i<sizeof($list); $i++) { // if ($_SESSION["s"]["id"] == $res["user_id"]) { // $list[$i]["score"] = $this->Competitions_scoring->get_tot_score($list[$i]["id"]); // } else if ($examiner) { // $list[$i]["score"] = $this->Competitions_scoring->get_tot_score($list[$i]["id"], $_SESSION["s"]["id"]); // } // } /////// if ($_REQUEST["alig"] == "up") { $_sort = "score ASC"; } else { if ($_REQUEST["alig"] == "down") { $_sort = "score DESC"; } } if ($_SESSION["s"]["id"] == $res["user_id"]) { $list = $this->Competitions_apply->list_info($_page, $pagesize, $where, "", $_sort); } else { if ($examiner) { $list = $this->Competitions_apply->list_info_by_user($_page, $pagesize, $where, $_SESSION["s"]["id"], $_sort); } } for ($i = 0; $i < sizeof($list); $i++) { $u = $this->Members->get($list[$i]["user_id"]); $list[$i]["ids"] = $u["ids"]; $list[$i]["name"] = $u["name"]; $list[$i]["memail"] = $u["email"]; $list[$i]["bio"] = $u["bio"]; $list[$i]["picture"] = $u["picture"]; } // if ( ! $_REQUEST["alig"]) $_REQUEST["alig"] = "up"; $this->assigns["alig"] = $_REQUEST["alig"]; /////// $list_cnt = $this->Competitions_apply->cnt($where); $this->assigns["res"] = $res; $this->assigns["list"] = $list; $this->assigns["page"] = $_page; $this->assigns["pagesize"] = $pagesize; $this->assigns["list_cnt"] = $list_cnt; $this->assigns["paging"] = get_paging_dot2($_page, $list_cnt, $pagesize); $this->assigns["sort"] = abs($sort); $this->sub(); $this->assigns["m_list"] = $this->Competitions->get_list(1, 5, "c.user_id = " . $_SESSION["s"]["id"]); $this->assigns["e_list"] = $this->Competitions_examiner->list_all(1, 5, "ce.user_id = " . $_SESSION["s"]["id"]); $this->assigns["a_list"] = $this->Competitions_apply->list_all(1, 5, "ca.user_id = " . $_SESSION["s"]["id"]); if ($_SESSION["s"]["id"] != $res["user_id"] && !$examiner) { header("Location: /error_404"); } }
public function get_reception($_id, $_page) { $pagesize = 5; $where = "ca.competition_id = " . $_id; if ($_REQUEST["search"]) { $where = $where . " and (f_name like '%" . $_REQUEST["search"] . "%' or f_team like '%" . $_REQUEST["search"] . "%')"; } $res = $this->Competitions_apply->list_info($_page, $pagesize, $where); for ($i = 0; $i < sizeof($res); $i++) { $u = $this->Members->get($res[$i]["user_id"]); $res[$i]["name"] = $u["name"]; } $res_cnt = $this->Competitions_apply->cnt($where); $this->assigns["paging"] = get_paging_dot2($_page, $res_cnt, $pagesize); $this->assigns["res"] = $res; $this->assigns["page"] = $_page; $this->assigns["cid"] = $_id; $this->assigns["r"] = $this->Competitions->get($_id); }
public function get_lounge_timeline($_type, $_id, $_page, $_pagesize = 10) { if ($_id) { $comments = $this->Board->list_($_type, $_id, $_page, $_pagesize); } else { $comments = $this->Board->list_in(0, $_page, $_pagesize = 10, "p_type in (3, 6, 7, 8, 9, 10)"); } for ($i = 0; $i < sizeof($comments); $i++) { if ($comments[$i]["p_type"] == 3 && $comments[$i]["p_id"] > 0 && !$_id) { $e = $this->Event->get($comments[$i]["p_id"]); $comments[$i]["p_name"] = $e["title"]; } else { if ($comments[$i]["p_type"] == 6) { $e = $this->Content->get($comments[$i]["p_id"]); $comments[$i]["p_name"] = $e["subject"]; } else { if ($comments[$i]["p_type"] == 7) { $e = $this->Competitions->get($comments[$i]["p_id"]); $comments[$i]["p_name"] = $e["subject"]; } else { if ($comments[$i]["p_type"] == 8) { $e = $this->Office_hours->get_detail($comments[$i]["p_id"]); $comments[$i]["p_name"] = $e["subject"]; } else { if ($comments[$i]["p_type"] == 9) { $e = $this->Program->get($comments[$i]["p_id"]); $comments[$i]["p_name"] = $e["title"]; } else { if ($comments[$i]["p_type"] == 10) { $e = $this->Startup_service->get($comments[$i]["p_id"]); $comments[$i]["p_name"] = $e["name"]; } } } } } } $comments[$i]["comm"] = $this->Board->get_comment($comments[$i]["p_type"], $comments[$i]["id"]); $comments[$i]["like"] = $this->Board->get_like_cnt($comments[$i]["id"]); $comments[$i]["is_like"] = $this->Board->get_like_this($comments[$i]["id"], $_SESSION["s"]["id"]); } if ($_id < 1) { $where = "b.user_id = m.id and p_type = " . $_type . " AND depth = '0'"; } else { $where = "b.user_id = m.id and p_id = " . $_id . " AND p_type = " . $_type . " AND depth = '0'"; } $comments_cnt = $this->Board->cnt($where, "members m, board b"); $this->assigns["id"] = $_id; $this->assigns["comments"] = $comments; $this->assigns["paging"] = get_paging_dot2($_page, $comments_cnt, $_pagesize); $this->assigns["page"] = $_page; }