Пример #1
0
<?php

session_start();
error_reporting(E_ALL);
ini_set('display_errors', 'On');
require '../../inc/config.php';
require PATH_INC . '/class_user.php';
require '../dbconn.php';
#var_dump(FB_APPID); //fb app id
#var_dump(FB_SECRET); //fb app secret
dbconn::checkmobile();
$user_id = User::getId();
//使用者編號
$memberloginkey = false;
$is_new_user = isset($_SESSION['is_new_user']) ? $_SESSION['is_new_user'] : 0;
if (!empty($user_id)) {
    $memberloginkey = true;
    $userdata = dbconn::getUserById($user_id);
    $userfbdata = dbconn::getFBUserById($user_id);
    dbconn::insertMem($user_id, $is_new_user);
    $oldtripname = dbconn::checktripname($user_id);
} else {
    //強制設定登入後導回頁面
    $_SESSION['login:next:tag'] = 'event';
    $_SESSION['login:next'] = "/event/BuBuTripName/?final=1#secondPage";
}
/*
$user_pic = User::getPic(); //使用者圖片
$user_name = User::getName(); //使用者名稱
var_dump($user_id);
var_dump($user_pic);