private function showItems($year, $month, $day) { $this->load->library('jdf'); if (!checkdate($month, $day, $year)) { show_error("data_wrong", 400); return; } $week = getWholeWeek($year, $month, $day); $item = new Item(); $item->where("start >= ", getSaturday($year, $month, $day)); $item->where("end < ", getSaturday($year, $month, $day + 7)); $item->where("user_id", $this->session->getStudentId()); $item->get(); $items = $this->setFormat($item); $this->load->view("item/get", array("items" => $items, "week" => $week)); }
function getWholeWeek() { $this->load->library("jdf"); echo "<meta charset='utf-8'>"; var_dump(getWholeWeek(1394, 05, 17)); /* * date:1394/5/18 * startTime:11:0 */ }