24 lines
760 B
PHP
Executable File
24 lines
760 B
PHP
Executable File
<?php
|
|
echo "<pre>";
|
|
include_once 'include/ECM/EcmGoogleServices/EcmGoogleService.php';
|
|
|
|
if($_GET['logout']==1){
|
|
unset($_SESSION['access_token']);
|
|
header("Location: index.php?module=Home&action=index");
|
|
}
|
|
if($_GET['error']=='access_denied'){
|
|
unset($_SESSION['access_token']);
|
|
header("Location: index.php?module=Home&action=index");
|
|
}
|
|
$go=new EcmGoogleService();
|
|
if($go!=false){
|
|
if($go->checkLogin()==false){
|
|
if($go->logIn($_GET['code'])==true){
|
|
header("Location: index.php?module=Home&action=index");
|
|
}
|
|
} else {
|
|
header("Location: index.php?module=Home&action=index");
|
|
}
|
|
}
|
|
|
|
?>
|