<?php

/**
 * $Author ：PHPYUN开发团队
 *
 * 官网: http://www.phpyun.com
 *
 * 版权所有 2009-2021 宿迁鑫潮信息技术有限公司，并保留所有权利。
 *
 * 软件声明：未经授权前提下，不得用于商业运营、二次开发以及任何形式的再次发布。
 */

class register_controller extends wxapp_controller
{
	function regmoblie_action(){
        $data	=	array(
            'moblie'	=>	$_POST['moblie'],
        );
        $registerM	=	$this->MODEL('register');
        $return 	= 	$registerM->regMoblie($data);

        $this -> render_json($return['errcode'],$return['msg'],$return['data']);
    }
    function regemail_action(){
        $data	=	array(
            'email'	=>	$_POST['email'],
        );
        $registerM	=	$this->MODEL('register');
        $return 	= 	$registerM->regMoblie($data);
        $this -> render_json($return['errcode'],$return['msg'],$return['data']);
    }
    function writtenoff_action(){
        $data	=	array(
            'zyuid'		=>	$_POST['zyuid'],
            'pw'		=>	$_POST['pw'],
            'mobile'	=>	$_POST['mobile'],
            'email'		=>	$_POST['email'],
        );
        $registerM	=	$this->MODEL('register');
        $return 	= 	$registerM->writtenOff($data);

        $this -> render_json($return['errcode'],$return['msg'],'');
    }
	function getCon_action(){
		if($this->config['reg_moblie']){				
			$type = '2';
		}else if($this->config['reg_email']){
			$type = '3';
		}else{
			$type = '1';
		}
		$data	=	array(
			'type'					=>	$type,
			'reg_email'				=>	$this->config['reg_email'],
			'reg_moblie'			=>	$this->config['reg_moblie'],
			'reg_user'				=>	$this->config['reg_user'],
			'reg_passconfirm'		=>	$this->config['reg_passconfirm'],
			'code_kind'				=>	$this->config['code_kind'],
			'reg_real_name_check'	=>	$this->config['reg_real_name_check'],
			'reg_passconfirm'		=>	$this->config['reg_passconfirm'],
			
			'reg_namemaxlen' 		=>  $this->config['sy_reg_namemaxlen'],
            'reg_nameminlen'		=>  $this->config['sy_reg_nameminlen'],
       		'reg_name_sp'    		=>  $this->config['reg_name_sp'],
            'reg_name_zm'    		=>  $this->config['reg_name_zm'],
            'reg_name_num'   		=>  $this->config['reg_name_num'],
            'reg_name_han'   		=>  $this->config['reg_name_han'],

            'reg_pw_sp'    			=>  $this->config['reg_pw_sp'],
            'reg_pw_zm'    			=>  $this->config['reg_pw_zm'],
            'reg_pw_num'   			=>  $this->config['reg_pw_num'],
			'sy_freewebtel'         =>  $this->config['sy_freewebtel']
		);
		$this -> render_json(1,'',$data);
	}
}
?>