function fetchOne($nomitem, $where_clause, $select_type) { return MAIN_CLASS::fetchOne("RUBR", $nomitem, $where_clause, $select_type); }
function fetchOne($nomitem, $where_clause, $select_type) { return MAIN_CLASS::fetchOne("MOEUVREPROTO", $nomitem, $where_clause, $select_type); }
<?php //******************************************************************** // phpaie //------------------------------------------------------------------ // Version: 0.1 // // Copyright (c) 2002 by Jean-Charles Gibier (~Le Mulot Fou~) // (http://www.phpaie.net) // (webmaster@machinbidule.com) // // Support éventuel sur www.phpaie.net //********************************************************************* // This program is free software. You can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation. //********************************************************************* session_start(); //mise à jour des variables de session require_once "../inc/classes.php"; //$local_userid est la variable identifiant localement l'utilisteur connecté dans la BdD $local_userid = MAIN_CLASS::fetchOne("INSCRIPTION, CONNECTION", "INSCRIPTION.ID_INSCRIPTION", "where INSCRIPTION.ID_INSCRIPTION = CONNECTION.ID_INSCRIPTION AND CONNECTION.CONNECTION_SID_CKEY_VCH = '" . $PHPSESSID . "'", ""); if ($local_userid <= 0) { echo "VISITEUR INCONNU. <BR>\n"; exit(0); } //VERSION en cours d'execution session_register("ID_VERSION"); $ID_VERSION = 1; setlocale(LC_TIME, "fr");
<tbody> <tr> <td width="200" height="550" valign="middle" align="justify" rowspan="3"> <div style="overflow:scroll;height:540px;width:190px;margin: 3px 3px 3px 3px"> <p align="center"><br /> <b>Organisation des données</b></p> <hr /> <table border="0" cellpadding="0" cellspacing="0" width="100%"> </table> <hr /> </div> </td> <td width="400" height="100" valign="middle" align="center"><font face="Arial" size="2"> Bonjour <?php print MAIN_CLASS::fetchOne("INSCRIPTION, CONNECTION", "INSCRIPTION.INSCRIPTION_PSEUDO_CKEY_VCH", " where INSCRIPTION.ID_INSCRIPTION = CONNECTION.ID_INSCRIPTION AND CONNECTION.CONNECTION_SID_CKEY_VCH = '" . session_id() . "'", ""); ?> , bienvenue dans votre bureau.</font></td> <td width="200" height="100" valign="middle" align="center" > </td> </tr> <tr> <td width="400" height="300" valign="middle" align="center"> <table border="0" width="400" cellspacing="0" cellpadding="0"> <tbody> <tr> <td width="200" height="150" valign="bottom" align="center"> <a href="../Employeur/employ.php" class="mainlink">Employeur</a></td> <td width="200" height="150" valign="bottom" align="center"> <a href="../Salarie/salari.php" class="mainlink">Salarié</a></td> </tr> <tr>
<?php require_once "Auth/Auth.php"; require_once "../inc/cnx_param.php"; function myOutput($username, $status) { include "authlogin.php"; } $params = array('table' => 'INSCRIPTION', 'usernamecol' => 'INSCRIPTION_PSEUDO_CKEY_VCH', 'passwordcol' => 'INSCRIPTION_PASSWORD_VCH', 'dsn' => $dsn, 'cryptType' => 'none'); $a = new Auth("DB", $params, "myOutput"); $a->logout(); $a->start(); if ($a->getAuth()) { //recupère les paramètres $vars = isset($_POST) && array_count_values($_POST) ? $_POST : $_GET; //serialize_session($id, $SID); require_once "CONNECTION_def.php"; // les champs 'username' et 'password' doivent être remplis $id = MAIN_CLASS::fetchOne("INSCRIPTION", "ID_INSCRIPTION", "where INSCRIPTION_PSEUDO_CKEY_VCH = '" . $vars['username'] . "' AND INSCRIPTION_PASSWORD_VCH = '" . $vars['password'] . "'", ""); // On note la connexion et la correspondance id <-> sid CONNECTION::staticInsertDbVars(array('ID_INSCRIPTION' => $id, 'CONNECTION_SID_CKEY_VCH' => $PHPSESSID, 'CONNECTION_HOUR_DATE' => date("y-m-d", time()))); // Go away header("Location: {$domaine}/{$fpath}/Desk/desk.php" . (isset($PHPSESSID) ? "?" . session_name() . "=" . session_id() : "")); exit; } //obliger la reconnexion a chaque test ?>