public function index()
 {
     //用户app下载地址连接
     if (isios()) {
         //$down_url = app_conf("APPLE_PATH");
         $down_url = $GLOBALS['db']->getOne("select val from " . DB_PREFIX . "m_config where code = 'ios_down_url'");
     } else {
         //$down_url = app_conf("ANDROID_PATH");
         $down_url = $GLOBALS['db']->getOne("select val from " . DB_PREFIX . "m_config where code = 'android_filename'");
     }
     app_redirect($down_url);
 }
Beispiel #2
0
function output($data)
{
    header("Content-Type:text/html; charset=utf-8");
    $r_type = intval($_REQUEST['r_type']);
    //返回数据格式类型; 0:base64;1;json_encode;2:array
    $data['act'] = ACT;
    $data['act_2'] = ACT_2;
    //print_r($r_type);exit;
    if ($GLOBALS['request']['from'] == "wap") {
        //$data['config']=$GLOBALS['m_config'];
        //$data['config']['index_logo']=get_abs_img_root($GLOBALS['m_config']['index_logo']);
        //$data['city_name']=strim($GLOBALS['request']['city_name']);//城市名称
        //$data['email']=addslashes($GLOBALS['request']['email']);//用户名或邮箱
        //var_dump($user_agent);
        if (isios()) {
            // $down_url = app_conf("BIZ_APPLE_PATH");
            $down_url = $GLOBALS['db']->getOne("select val from " . DB_PREFIX . "m_config where code = 'ios_down_url'");
        } else {
            //$down_url = app_conf("BIZ_ANDROID_PATH");
            $down_url = $GLOBALS['db']->getOne("select val from " . DB_PREFIX . "m_config where code = 'android_filename'");
        }
        $data['mobile_btns_download'] = $down_url;
        //$data['mobile_btns_download']= get_domain().APP_ROOT.'/../downapp.php';
        $data['f_link_data'] = get_link_list();
    }
    if ($r_type == 0) {
        echo base64_encode(json_encode($data));
    } else {
        if ($r_type == 1) {
            print_r(json_encode($data));
        } else {
            if ($r_type == 2) {
                print_r($data);
            }
        }
    }
    exit;
}