<?php /** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/ // Copyright 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com /** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/ include_once "config.php"; require_once 'class/GoogleContactImport.class.php'; $gci_contact = new GoogleContactImport(); $gci_contact->id_user = $_SESSION['do_User']->iduser; if (isset($_SESSION['sessionToken'])) { //$gci_contact->uEmail = $_POST['email']; $gci_contact->processAuth(); $gci_contact->syncOfuzToGmail(); if ($gci_contact->status_code_desc == "") { $status_code_desc = $gci_contact->getStatusDescription(208); } else { $status_code_desc = $gci_contact->status_code_desc; } header("Location:sync.php?msg=" . $status_code_desc); } else { if ($_POST['action'] == "export") { $gci_contact->uEmail = $_POST['email']; $gci_contact->processAuth(); } else { if (isset($_GET['token']) && isset($_SESSION["uEmail"])) { //$gci_contact->uEmail = $_POST['email']; $gci_contact->processAuth(); $gci_contact->syncOfuzToGmail(); if ($gci_contact->status_code_desc == "") { $status_code_desc = $gci_contact->getStatusDescription(208); } else {
<?php /** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/ // Copyright 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com /** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/ //session_start(); include_once "config.php"; require_once 'class/GoogleContactImport.class.php'; $gci_contact = new GoogleContactImport(); $gci_contact->id_user = $_SESSION['do_User']->iduser; //without storing SESSION TOKEN in table if (isset($_SESSION['sessionToken'])) { //$gci_contact->uEmail = $_POST['email']; $gci_contact->processAuth(); $gci_contact->retrieveUserContacts(); //rebuilding the userXX_contact table $contact_view = new ContactView(); $contact_view->setUser($_SESSION['do_User']->iduser); $contact_view->rebuildContactUserTable(); //$contacts = $gci_contact->retrieveContactsPhotos(); exit(); if ($gci_contact->status_code_desc == "") { $status_code_desc = $gci_contact->getStatusDescription(207); } else { $status_code_desc = $gci_contact->status_code_desc; } if ($_SESSION["page_from"] == 'reg') { header("Location:import_contacts.php?message=" . $status_code_desc); } else { header("Location:sync.php?msg=" . $status_code_desc); } } else {