<?php 
 // Include main file
include_once('../libs/main.php');

// Check dependant Login
include_once('checkLogin.php');
// if(isset($_GET['type']) && $_GET['type']=="code"){
//     $client_id = "676d49fd42a77accd78272bf-m55b2clr";
//     $client_secret = trim($_REQUEST['goto_client_secret']);
//     $redirect_url = SITE_URL."x-admin/gohl.php";
//     $url = "https://marketplace.leadconnectorhq.com/oauth/chooselocation?response_type=code&client_id=".$client_id."&redirect_uri=".$redirect_url."&scope=locations.write contacts.write contacts.readonly";   
//     echo "<script type=\"text/javascript\">
//     window.open('".$url."', '_blank')
//     </script>";
// }

if(isset($_GET['code']) && $_GET['code']!=""){
    echo "<script type=\"text/javascript\">
    alert('Copy code to get access token:   ".$_GET['code']."')
    </script>";
}

exit; 
