messagedao = new MessageDao (); $this->categorydao = new CategoryDao (); $this->questiondao = new QuestionDao (); $this->creditdao = new CreditDao (); $this->answerdao = new AnswerDao (); Doo::loadModel ( 'ExamineDao' ); $this->examinedao = new ExamineDao (); } /** * 获取审批列表 */ function get_examine_list() { $list = $this->examinedao->get_examine_list (); $list = $this->_format_question_data ( $list ); Doo::loadClass ( 'XDeode' ); $XDeode = new XDeode ( 5 ); foreach ( $list as $key => $value ) { $list [$key] ['idKey'] = $XDeode->encode ( $value ['id'] ); } return $list; } /** * 清空审批列表 */ function examine_clear() { $this->examinedao->examine_clear (); } function get_examine($idKey = "") { Doo::loadClass ( 'XDeode' ); $XDeode = new XDeode ( 5 ); $idKey = $XDeode->decode ( $idKey ); if (! is_numeric ( $idKey )) return array (); $list = $this->examinedao->get_examine ($idKey); return $list; } function examine_delete($idKey){ Doo::loadClass ( 'XDeode' ); $XDeode = new XDeode ( 5 ); $idKey = $XDeode->decode ( $idKey ); if (! is_numeric ( $idKey )) return 0; return $this->examinedao->examine_delete ($idKey); } /** * 格式化问题数据 * @param unknown_type $data */ function _format_question_data($data = array(), $type = "index", $time_type = "Y-m-d H:i:s") { foreach ( $data as $key => $value ) { $data [$key] ['time'] = my_date_format2 ( $value ['time'], $time_type ); $data [$key] ['status'] = format_question_status ( $value ['status'], $type ); } return $data; } /** * 实现接口 (non-PHPdoc) * @see BaseLogic::format_email_content() */ protected function format_email_content($html_templete, $templete_name, $qid, $aid) { } /** * 获取还未审批的数量 * * @return int */ function get_unapproved_num() { $count = $this->examinedao->count(array( 'where' => 'isdelete = 0', )); return $count; } } ?>