# HG changeset patch # User robert # Date 1482928963 0 # Node ID 7a532f1e0f078ad87a639d3f964a3b717f1acc2e # Parent 5f4560ac65b796366ee01f2f57af708f3799eb62 original diff -r 5f4560ac65b7 -r 7a532f1e0f07 uk/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uk/index.php Wed Dec 28 12:42:43 2016 +0000 @@ -0,0 +1,293 @@ +DetectSmartphone(); + $iPad = $uagent_obj->DetectIpad(); + + $proceed = true; + $launchScript = ""; + + //print_r($_SERVER); + if (isset($_SERVER['HTTP_REFERER']) || isset($_GET['facebook'])) + { + $pos = strpos($_SERVER['HTTP_REFERER'], "apps.facebook.com"); + if($pos !== false || isset($_GET['facebook'])) + { + //we are in facebook canvas so react appropriately + include_once '../facebook.php'; + + $facebook = new Facebook(array( + 'appId' => '128245333876633', + 'secret' => 'f51afc7e04289db62448edd8b70d83bf', + 'cookie' => true, + 'domain' => 'yournextpresent.com' + )); + + $session = $facebook->getSession(); + + if (!$session) { + $proceed = false; + $url = $facebook->getLoginUrl(array( + 'canvas' => 1, + 'fbconnect' => 0, + 'req_perms' => 'email,user_birthday,publish_stream' + )); + + echo ""; + } + else + { + $launchScript = ""; + } + } + } + echo ""; + if($proceed) + { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + + if(isset($_GET['_escaped_fragment_'])) { + $isbn = $_GET['_escaped_fragment_']; + if($isbn == ""){ + echo ""; + + echo "YourNextRead: Book Recommendations (UK)"; + echo "