<commit_before><?php
/**
 * Created by PhpStorm.
 * User: yyq
 * Date: 2016-07-20
 * Time: 11:49
 */
Class Notlogin extends CI_Controller{
    public function index()
    {
        $this->load->library('session');
        $openid=$this->session->userdata('openid');
        if($openid==null){//openid 为空
            $code =$this->input->get("code");
            if($code==""){
                $authurl= "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx33d5ca90782fb6b7&redirect_uri=http://www.vkaifu.com/v2/cashier/registe&response_type=code&scope=snsapi_base&state=cashier_register#wechat_redirect";
                header("Location:".$authurl);
            }else{
                $this->load->helper("auth");
                $auth=new Auth();
                $openid= $auth->getopenid($this->config->item('appid'),$this->config->item('appsecret'),$code);
                if($openid==""){
                    show_error("获取openid失败");
                }else{
                    $this->session->set_userdata("openid",$openid);
                }
                $data['openid']=$openid;
            }
        }else{
            $data['openid']=$openid;
        }
        echo $openid;
        $this->load->helper("tools");
        $tools=new Tools();
        $url="http://".$this->config->item('serverip')."/notlogin?openid=".$openid;
        $loginresult=$tools->httpget($url);
        header('location:'.$loginresult);
    }
}<commit_msg>'修改bug'<commit_after><?php
/**
 * Created by PhpStorm.
 * User: yyq
 * Date: 2016-07-20
 * Time: 11:49
 */
Class Notlogin extends CI_Controller{
    public function index()
    {
        $this->load->library('session');
        $openid=$this->session->userdata('openid');
        if($openid==null){//openid 为空
            $code =$this->input->get("code");
            if($code==""){
                $authurl= "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx33d5ca90782fb6b7&redirect_uri=http://www.vkaifu.com/v2/cashier/registe&response_type=code&scope=snsapi_base&state=cashier_register#wechat_redirect";
                header("Location:".$authurl);
            }else{
                $this->load->helper("auth");
                $auth=new Auth();
                $openid= $auth->getopenid($this->config->item('appid'),$this->config->item('appsecret'),$code);
                if($openid==""){
                    show_error("获取openid失败");
                }else{
                    $this->session->set_userdata("openid",$openid);
                }
                $data['openid']=$openid;
            }
        }else{
            $data['openid']=$openid;
        }
       
        if ($openid!=""){
            $this->load->helper("tools");
            $tools=new Tools();
            $url="http://".$this->config->item('serverip')."/notlogin?openid=".$openid;
            $loginresult=$tools->httpget($url);
            header('location:'.$loginresult);
        }else{
            echo $openid;
        }

    }
}
{'fraction_non_alphanumeric': 0.18691275167785235, 'fraction_numerical': 0.016107382550335572, 'mean_word_length': 2.0480572597137012, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1541000', 'n_tokens_mistral': 995, 'n_tokens_neox': 948, 'n_words': 99}