die('Please go to LinkedIn Apps page https://www.linkedin.com/secure/developer?newapp= , ' . 'create an application, and in the line ' . $application_line . ' set the client_id to Consumer key and client_secret with Consumer secret. ' . 'The Callback URL must be ' . $client->redirect_uri) . ' Make sure you enable the ' . 'necessary permissions to execute the API calls your application needs.'; } /* API permissions */ $client->scope = $linkedinScope; if ($success = $client->Initialize()) { if ($success = $client->Process()) { if (strlen($client->authorization_error)) { $client->error = $client->authorization_error; $success = false; } elseif (strlen($client->access_token)) { $success = $client->CallAPI('http://api.linkedin.com/v1/people/~:(id,email-address,first-name,last-name,location,picture-url,public-profile-url,formatted-name)', 'GET', array('format' => 'json'), array('FailOnAccessError' => true), $user); } } $success = $client->Finalize($success); } if ($client->exit) { exit; } if ($success) { $user_id = $db->checkUser($user); $_SESSION['loggedin_user_id'] = $user_id; $_SESSION['user'] = $user; } else { $_SESSION["err_msg"] = $client->error; } header("location:index.php"); exit; ?>
set_include_path(ROOT."/includes/"); //include basic classes include("classDB.php"); include("classOutput.php"); $out= new output(); //include api classes include("api/classApi.php"); include("api/classApiInfo.php"); include("api/classWalletJournal.php"); include("api/classCharacterInfo.php"); include("api/classCharacterName.php"); include("api/classCharacterID.php"); //set Settings $db=new DB(); $settings=$db->getSettings(); define("REFID",@$settings['lastID']); define("apiK",@$settings['apiK']); define("vCode",@$settings['vCode']); define("characterID",@$settings['characterID']); //makesure you are still in the database if(isset($_SESSION['LOGGED_IN'])&&$_SESSION['LOGGED_IN']) $db->checkUser(); $lottoNum=@$settings['lottoNum']; ?>