public function order_source()  
     {  
        $useragent  = strtolower($_SERVER["HTTP_USER_AGENT"]);  
        // 微信  
        $is_weixin  = strripos($useragent,'micromessenger');  
        if($is_weixin){  
            //echo '微信';  exit;
            echo '<script language="javascript" type="text/javascript"> window.location.href="https://www.xxx.com"; </script>';
            exit;
        }
        // iphone  
        $is_iphone  = strripos($useragent,'iphone');  
        if($is_iphone){
            $this->display("Codes/ios");
            echo '<script language="javascript" type="text/javascript"> window.location.href="https://www.xxx.com"; </script>';
            exit;
        }
        // android  
        $is_android    = strripos($useragent,'android');  
        if($is_android){  
            $this->display("Codes/android");
            echo '<script language="javascript" type="text/javascript"> window.location.href="https://www.xxx.com"; </script>';
            exit;
        }    
        // ipad  
        $is_ipad    = strripos($useragent,'ipad');  
        if($is_ipad){  
            echo 'ipad';  exit;
        }  
        // ipod  
        $is_ipod    = strripos($useragent,'ipod');  
        if($is_ipod){  
            echo 'ipod';  exit;
        }  
        // pc电脑  
        $is_pc = strripos($useragent,'windows nt');  
        if($is_pc){  
            echo 'pc';  exit;
        }  
        echo 'other';  
    }