Example #1
0
}
// current session user info
global $USER;
switch (Context) {
    case 'admin':
        beginSession('R');
        $sess_id = $_SESSION['YACOMASVARS']['rootid'];
        $USER = get_record('administrador', 'id', $sess_id);
        $CFG->home_url = get_url('admin');
        $CFG->logout_url = get_url('admin/logout');
        //check for databse upgrades
        dbsetup_upgrade();
        break;
    case 'ponente':
        beginSession('P');
        $sess_id = $_SESSION['YACOMASVARS']['ponid'];
        $USER = get_record('ponente', 'id', $sess_id);
        $CFG->home_url = get_url('speaker');
        $CFG->logout_url = get_url('speaker/logout');
        break;
    case 'asistente':
        beginSession('A');
        $sess_id = $_SESSION['YACOMASVARS']['asiid'];
        $USER = get_record('asistente', 'id', $sess_id);
        $CFG->home_url = get_url('person');
        $CFG->logout_url = get_url('person/logout');
        break;
    default:
        die;
        // if unknown context
}
Example #2
0
        $t = 'R';
        $name = __('Administrador');
        break;
    case 'ponente':
        $t = 'P';
        $name = __('Ponente');
        break;
    case 'asistente':
        $t = 'A';
        $name = __('Asistente');
        break;
    default:
        // force session destroy
        header('Location: ' . get_url('logout'));
}
beginSession($t);
// ignore erros
@session_unset();
@session_destroy();
//start page
do_header();
?>

<h1><?php 
echo __('Salida de Sesión');
?>
 <?php 
echo $name;
?>
</h1>
<div class="block"></div>
function createSession($username)
{
    beginSession();
    $_SESSION["username"] = $username;
}
Example #4
0
<?php

if (empty($type)) {
    die;
}
require_once dirname(__FILE__) . '/../lib.php';
// check current session
beginSession($type);
// end session
session_unset();
session_destroy();
// show page
do_header();
if ($type == 'R') {
    $who = __('Administrador');
} elseif ($type == 'P') {
    $who = __('Ponente');
} elseif ($type == 'A') {
    $who = __('Asistente');
}
?>

<h1><?php 
echo __('Salida de Sesión');
?>
 <?php 
echo $who;
?>
</h1>

<div class="block"></div>
    $user->setFirstName($fname);
    $user->setLastName($lname);
    $user->setEmail($email);
    if (!$user->validate()) {
        $failure_messages = array();
        foreach ($user->getValidationFailures() as $failure) {
            $message = '<p><strong>Error in ' . $failure->getPropertyPath() . ' field!</strong> ' . $failure->getMessage() . '</p>';
            array_push($failure_messages, $message);
            // clear out the bad data
            $_POST[$failure->getPropertyPath()] = '';
        }
        unset($message);
    } else {
        $user->save();
        $uid = $user->getUserId();
        beginSession($uid);
        redirect();
    }
}
?>

<html>
<head>
  <?php 
include_once 'basic_includes/sheets_and_scripts.php';
?>
  <link rel="stylesheet" href="assets/css/style.css">
  <title>New User</title>
</head>
<body>
  <?php 
Example #6
0
<?php

include_once 'utils/begin.php';
beginHTML('Sauver les lettres', 'css/style.css');
beginSession();
?>
	<div class="header">
		<h1>Sauver les lettres</h1>
	</div>
	<div class="main">

	</div>
	<div class="footer">

	</div>	
<?php 
endHTML();