Пример #1
0
<?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 **/
/**
 * Main event Controler
 * This is an instance of the Event controler that will be managing the execution of the events and set the next url
 * @see EventControler
 * @package RadriaSiteTemplate
 * @author Philippe Lewicki  <*****@*****.**>
 * @copyright  SQLFusion LLC 2001-2007
 * @version 4.0
 */
include_once "config.php";
include_once 'includes/ofuz_check_access.script.inc.php';
//  "start event control" ;
$eventControler = new EventControler($conx);
$eventControler->setMyDbPath($cfg_local_mydbdir);
$eventControler->addparam("dbc", $conx);
$eventControler->addparam("doSave", "yes");
$eventControler->setMessagePage("message.php");
//  If you want to secure your site to only authorize request with local referer
//  comment the line bellow.
//  Notes: doesn't work with ssl or some IE version and Ajax
$eventControler->setCheckReferer(false);
$eventControler->addallvars();
$eventControler->listenEvents($_REQUEST['mydb_events']);
//$eventControler->doForward() ;
echo $eventControler->doOutput();
Пример #2
0
 * @version 1.3
 */
//session_start();
require_once 'config.php';
require_once 'Zend/OpenId/Consumer.php';
$eventControler = new EventControler($GLOBALS['conx']);
$eventControler->setLogRun(true);
$eventControler->setMyDbPath($cfg_local_mydbdir);
$eventControler->setMessagePage("message.php");
$eventControler->setCheckReferer(false);
//echo $_SESSION['openid_userclass'];
if (!isset($_SESSION['openid_userclass'])) {
    $eventControler->setUrlNext("index.php");
    $eventControler->doForward();
    exit;
} else {
    $cur_userclass = $_SESSION['openid_userclass'];
}
$eventControler->setLog("\n--- OpenId Call back --");
$eventControler->setLog("\n userclass:" . $_SESSION['openid_userclass']);
$eventControler->setLog("\n openid_mode:" . $_GET['openid_mode']);
$events = array();
$events[50] = $cur_userclass . "->eventCheckOpenIdCallBack";
$events[40] = "mydb.gotoPage";
if (isset($_GET['openid_mode'])) {
    $eventControler->addParam("goto", "sess_test2.php");
    $eventControler->listenEvents($events);
    $eventControler->doForward();
    //echo $eventControler->getUrlNext();
}
//unset($_SESSION['openid_userclass']);