PHPDoctor


fb_ofuz_login_verification.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


/** 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 **/

    $pageTitle = 'Ofuz :: Login';
    $Author = 'SQLFusion LLC';
    $Keywords = 'Keywords for search engine';
    $Description = 'Description for search engine';
    $background_color = 'white';
    include_once('config.php');
    include_once 'facebook_client/facebook.php';
    include_once 'class/OfuzFacebook.class.php';
    include_once('includes/header.inc.php');
    
    $facebook = new Facebook(FACEBOOK_API_KEY, FACEBOOK_APP_SECRET);
    $do_ofuz_fb =  new OfuzFacebook($facebook);
    $do_ofuz_fb->sessionPersistent("do_ofuz_fb", "logout.php", OFUZ_TTL);
    $_SESSION['do_ofuz_fb']->isLoggedInFacebook();
    if($_SESSION['do_ofuz_fb']->fb_uid){
        $name = $_SESSION['do_ofuz_fb']->getFbUserName($_SESSION['do_ofuz_fb']->fb_uid);
        $fname = $name["first_name"];
        $lname = $name["last_name"];
        $work = $_SESSION['do_ofuz_fb']->getWorkHistory($_SESSION['do_ofuz_fb']->fb_uid);
        $work_detail = $work[0];
        $work_history = @$work_detail["work_history"];
        if(is_array($work_history)){
            $position =  $work_history[0]["position"];
            $company =  $work_history[0]["company_name"];
        }else{$company = '';$position='';}
    }


?>


if($application_layer_protocol == "https") {
?>

} else {
?>

}
?>




', _('If you already have a username and password at Ofuz please sign in below to connect your facebook account to Ofuz.'),'
', _('Otherwise just provide us with your email address to create a new account.'); ?>
$loginForm_fb = new User(); $loginForm_fb->sessionPersistent("do_User_login", "logout.php", 36000); // if ($_GET['message']) { ?> ?>

$loginFormEmail_fb = new User(); $loginFormEmail_fb->sessionPersistent("do_User_login_email", "logout.php", 36000); $e_new_fb_reg = new Event("do_User_login_email->eventRegNewFbUser"); $e_new_fb_reg->setLevel(20); $e_new_fb_reg->addParam("fbuid",$_SESSION['do_ofuz_fb']->fb_uid); $e_new_fb_reg->addParam("fname",$fname); $e_new_fb_reg->addParam("lname",$lname); $e_new_fb_reg->addParam("comp",$company); $e_new_fb_reg->addParam("position",$position); $e_new_fb_reg->addParam("errPage","fb_ofuz_login_verification.php"); echo $e_new_fb_reg->getFormHeader(); echo $e_new_fb_reg->getFormEvent(); echo _('Your email address: ').'
'; echo '
'; //echo '
'; //echo '
'; echo ''; echo '
'; ?>
if(!$_SESSION['do_ofuz_fb']->getUserExtendedPermissions("email")){ //echo ' Allow Sending Email Notification'; $style = 'style="display:block;"'; }else{ $style = 'style="display:block;"'; } echo '
'; echo _('Otherwise, sign in here to link your Facebook and Ofuz accounts:'),'

'; $_SESSION['do_User_login']->formFBLoginVerification("index.php",$_SERVER['PHP_SELF'],$_SESSION['do_ofuz_fb']->fb_uid); ?>

PHPDoctor