<?php session_start(); require_once 'twitteroauth/twitteroauth.php'; require_once 'config.php'; require_once 'classes.php'; $money_class = new MoneyStuff(); $user_class = new Users(); $user_logon_data = $_SESSION['user_profile']; $content = $_SESSION['content']; $user_prof = get_object_vars($content); $user_profile = $_SESSION['user_profile']; //Retrieve data from transaction hash $hash = $_GET['id']; $transaction = $money_class->RetrieveTransaction($hash); //var_dump($transaction);die(); /* If access tokens are not available redirect to connect page. */ if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) { //User not logged //but, is user in app? $to_user_screen_name = $user_class->GetUSerScreenNameFromTwitterId($transaction['to_twitter_user_id']); $user_exists = $user_class->check_user_exists($to_user_screen_name, $transaction['to_twitter_user_id']); printf("<script>document.location.href='connect.php?message=INIT_SESSION'</script>;"); die; //Show this content in main index. User need log on. /* if($transaction['anonymous']=='1'){ $from_profile="Anonymous"; print("<a>Anonymous User</a> <br>"); print("<img src='".anonymous_profile_img."' />"."<br>"); $currency=$user_class->GetUSerCurrency($transaction['from_user_id']);