/** * Admin can manage all the notices here. */ public function manage_notice() { eval(ADMIN); // show the list of a year $year = $_GET["year"]; if (!isset($_GET["year"])) { $year = ContestModel::getCurrentYear(); } $cond["time"] = array("like", "{$year}%"); $noticelist = DBModel::getByFields("cernet_notice", $cond, true, 'time DESC'); $this->assign("noticelist", $noticelist); // show the year list $yearlist = DBModel::sqlquery("cernet_notice", "SELECT LEFT(time, 4) FROM `cernet_notice` GROUP BY LEFT(time, 4)"); $this->assign("yearlist", $yearlist); // dump($yearlist); $this->assign("less", __FUNCTION__ . ".less"); eval(NDSP); }