Naviguation dans :  Perl  JavaScript  Détail  - load.cgi?Appel=identAdmin
 présentée :  par cas d'appel   par traitements 
Retour à l'accueil
  
   
 Requêtes 

 load – Admin 

 submit 

Requêtes de Ça-déménage.com
Accès professionnel
Appel de la requête
 
 
 Bibliothèque CaD 

 Base 

 Identification 

Bibliothèque de Ça-déménage.com
Accès aux bases
Gestion des identifications
 


 idtEcrire  Ecrit un identifiant
Syntaxe idtEcrire(From,IDENT,AUTH)
Paramètres 
nom  type  Description 
From  IN Cas d'appel
IDENT  IN Identifiant
Perl : scalaire passé par référence – JavaScript : tableau à 1 élément
AUTH  IN Mot de passe
Perl : scalaire passé par référence – JavaScript : tableau à 1 élément
retourne  OUT  0 : Traitement correct
non nul : Erreur de traitement
Fonctions util. 
 wsFile Fonction d'accès aux fichiers
 Trace Retourne l'enregistrement de trace du client (user agent)


Code Perl 

sub idtEcrire {local($From,$IDENT,$AUTH) = @_; 
 if (index($$AUTH,"/#")!=-1) {return 1};
 local $x = ""; 
 $x = (($$AUTH eq "")?'//':'').'/#T(Identification):'.$$IDENT.'/#T(Authentification):'.$$AUTH;
 local $Out = &Trace('Compte',$x); if (&wsFile("write",$From,$$IDENT,"Id",\$Out)!=0) {return 100}; 
 return 0;
}
Code JavaScript 

function idtEcrire(From,IDENT,AUTH) { 
 if (AUTH[0].indexOf("/#")!=-1) {return 1};
 var x = ""; 
 x = ((AUTH[0]=="")?'//':'')+'/#T(Identification):'+IDENT[0]+'/#T(Authentification):'+AUTH[0];
 var Out = Array(Trace('Compte',x)); if (wsFile("write",From,IDENT[0],"Id",Out)!=0) {return 100}; 
 return 0;
}