public function manageDisaster()
 {
     $disaster = M("InfoDisaster");
     $dist_id = session("dist_id");
     $disadata = $disaster->where("disa_dist='{$dist_id}'")->select();
     foreach ($disadata as &$value) {
         $value["disa_dist"] = getDistrictNameById($value["disa_dist"]);
         $value["disa_situ"] = getDisaSituById($value["disa_situ"]);
         $value["disa_status_id"] = $value["disa_status"];
         $value["disa_status"] = getDisasterStatus($value["disa_status"]);
         $value["disa_begindate"] = date("Y-m-d", strtotime($value["disa_begindate"]));
         $value["disa_enddate"] = date("Y-m-d", strtotime($value["disa_enddate"]));
     }
     $this->assign("disadata", $disadata);
     $this->display();
 }
 public function uncheckDisaster()
 {
     $disater = M("InfoDisaster");
     $disadata = $disater->where("disa_status=2")->select();
     foreach ($disadata as &$value) {
         $value["disa_dist"] = getDistrictNameById($value["disa_dist"]);
         $value["disa_status"] = getDisasterStatus($value["disa_status"]);
         $value["disa_situ"] = getDisaSituById($value["disa_situ"]);
         $value["disa_begindate"] = date("Y-m-d", strtotime($value["disa_begindate"]));
         $value["disa_enddate"] = date("Y-m-d", strtotime($value["disa_enddate"]));
     }
     $disalist = $this->getDisasterData();
     $ricedata["disa_number"] = count($disalist);
     $wavedata = $this->getWaveRice();
     $ricedata["wave_number"] = count($wavedata);
     $this->assign("wavedata", $wavedata);
     $this->assign("disalist", $disalist);
     $this->assign("ricedata", $ricedata);
     $this->assign("disasterdata", $disadata);
     $this->display();
 }