<?php
/*
　* @$Id
　* @
　* @Ver: 2.0
　* @Create: 2009-11-18 8:10
　* @Modify: 
　* @Author: CPWEB http://www.cpweb.net.cn
　* @Copyright (C) 2008 www.cpweb.net.cn. All Rights Reserved.
　* @License CPWEB is free software and use is subject to license terms
　*/
class FeedbackAction extends GlobalAction 
{
	function _initialize(){
		parent::_initialize();
		$this->cpweb_model='module';
	}
	public function index()
	{
		$this->cpweb_find['map']['hidden']=0;
		$this->cpweb_find['map']['hits']=array('gt',0);
		$this->cpweb_list();
		$this->cpweb_display('Feedback:index');
	}
	public function writes()
	{
		$seccode=trim($_POST['seccode']);
		if(md5($seccode)!=Session::get('cpweb'))$this->error('验证码错误!!!');
		$Feedback=D("Feedback");
        if($Feedback->create()) { 
            if($Feedback->add()){ 
            	$this->assign('jumpUrl',__URL__);
				$this->success(L('_OPERATION_SUCCESS_'));
            }else{ 
                $this->error(L(_INSERTFAIL)); 
            } 
        }else{ 
            $this->error($Feedback->getError()); 
        }
	}
}
?>