Changeset 1939

Show
Ignore:
Timestamp:
09/09/07 22:49:56 (1 year ago)
Author:
azerttyu
Message:

edition de checkid
cf commit [1806],[1804]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • alternc/trunk/bureau/class/config.php

    r1645 r1939  
    6767} 
    6868 
     69$error = ""; 
    6970 
    7071/* PHPLIB inclusions : */ 
     
    7273/* Server Domain Name */ 
    7374$host=getenv("HTTP_HOST"); 
     75 
     76/* Custom PHP debugger */  
     77require_once($root."class/error_handler.php");  
     78$queryCount = 0; 
    7479 
    7580/* Global variables (AlternC configuration) */ 
     
    7984require_once($root."class/functions.php"); 
    8085require_once($root."class/variables.php"); 
     86 
     87$tempsDebut = microtimeFloat();  
    8188 
    8289// Redirection si appel à https://(!fqdn)/ 
     
    144151/* Check the User identity (if required) */ 
    145152if (!defined('NOCHECK')) { 
    146   if (!$mem->checkid()) { 
     153  $fields = array ( 
     154        "username"  => array ("request", "string", ""),  
     155        "password"  => array ("request", "string", ""),  
     156        "restrictip" => array ("request", "integer", 0),                 
     157  ); 
     158  getFields($fields);  
     159   
     160  if (!$mem->checkid($username,$password,$restrictip)) { 
    147161    $error=$err->errstr(); 
    148162    include("index.php"); 
  • alternc/trunk/bureau/class/m_mem.php

    r1533 r1939  
    162162   * @return TRUE si la session est correcte, FALSE sinon. 
    163163   */ 
    164   function checkid() { 
    165     global $db,$err,$session,$username,$password,$cuid,$restrictip
     164  function checkid($username, $password, $restrictip) { 
     165    global $db,$err,$session,$cuid
    166166    if ($username && $password) { 
    167167      return $this->login($username,$password,$restrictip);