| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 | <?php/** * 问答显示逻辑 * @author cp */class AdminLogic extends BaseLogic {	private $categorydao;	private $questiondao;	private $creditdao;	private $answerdao;	private $messagedao;	private $examinedao;	function __construct() {		Doo::loadModel ( 'CategoryDao' );		Doo::loadModel ( 'QuestionDao' );		Doo::loadModel ( 'CreditDao' );		Doo::loadModel ( 'AnswerDao' );		Doo::loadModel ( 'MessageDao' );				$this->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) {	}}?>
 |