Is_Login(); // 权限校验 $this->Is_Power(); } /** * [Index 配置列表] * @author Devil * @blog http://gong.gg/ * @version 0.0.1 * @datetime 2016-12-06T21:31:53+0800 */ public function Index() { // 配置信息 $data = M('Config')->getField('only_tag,name,describe,value,error_tips'); $this->assign('data', $data); $type = I('type', 'email'); $this->assign('nav_type', $type); if($type == 'email') { $this->display('Index'); } else { $this->display('Message'); } } /** * [Save 配置数据保存] * @author Devil * @blog http://gong.gg/ * @version 0.0.1 * @datetime 2017-01-02T23:08:19+0800 */ public function Save() { $this->MyConfigSave(); } /** * [EmailTest 邮件测试] * @author Devil * @blog http://gong.gg/ * @version 0.0.1 * @datetime 2017-03-10T15:30:10+0800 */ public function EmailTest() { // 验证码公共基础参数 $verify_param = array( 'expire_time' => MyC('common_verify_expire_time'), 'time_interval' => MyC('common_verify_time_interval'), ); $obj = new \My\Email($verify_param); $email_param = array( 'email' => I('email'), 'content' => L('email_test_email_send_content'), 'title' => MyC('home_site_name').' - '.L('common_operation_test'), ); // 发送 if($obj->SendHtml($email_param)) { $this->ajaxReturn(L('common_send_success')); } else { $this->ajaxReturn(L('common_send_error').'['.$obj->error.']', -100); } } } ?>