* * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ require("inc/nocache.inc.php"); require("inc/html.inc.php"); if (file_exists("inc/conf.inc.php")) { include("inc/conf.inc.php"); } if (!defined("CONF_INC_LOADED") && file_exists("./install/install.php")) { header("Location: ./install/install.php"); exit; } // Gestion des rapports d'erreurs error_reporting(E_ALL ^ E_NOTICE); $nc += 0; if ($PUBLIC && $ztFrom == "profil" && $ztAction == "INSERT") { include("inc/fonctions.inc.php"); // Recuperation des Saisies $rsProfil[0] = ($AUTO_UPPERCASE == true) ? strtoupper($ztNom) : ucfirst(strtolower($ztNom)); $rsProfil[1] = ucfirst($ztPrenom); $rsProfil[2] = $ztLogin; $rsProfil[3] = $zlInterface; $rsProfil[4] = $zlHeureDebut; $rsProfil[5] = $zlHeureFin; if ($rdTelephone != "N") $rdTelephone = "O"; $rsProfil[6] = $rdTelephone; $rsProfil[7] = $zlPlanning+0; if ($rdPartage=="2" && empty($ztPartage)) $rdPartage = "0"; $rsProfil[8] = $rdPartage+0; $rsProfil[9] = $ztEmail; if (($zlAffectation=="2" && empty($ztPartage)) || ($zlAffectation=="3" && empty($ztAffecte))) $zlAffectation = "0"; $rsProfil[10] = $zlAffectation+0; if ($ckAlertEmail!="O") $ckAlertEmail = "N"; elseif (empty($rsProfil[9]) || !$rsProfil[10]) $ckAlertEmail="N"; $rsProfil[11] = $ckAlertEmail; if ($zlPrecision!="2") $zlPrecision = "1"; $rsProfil[12] = $zlPrecision; $rsProfil[13] = ""; for ($i=1; $i<8; $i++) $rsProfil[13] .= ${"bt".$i} + 0; $rsProfil[14] = $zlDureeNote; if ($rdRappel != 2) { $rsProfil[15] = 0; $rsProfil[16] = 1; $rsProfil[17] = 0; } else { $rsProfil[15] = $zlRappelDelai; $rsProfil[16] = $zlRappelType; $rsProfil[17] = $ckRappelEmail; } if ($rsProfil[17] != 1) $rsProfil[17] = 0; if ($zlFormatNom!="1") $zlFormatNom = "0"; $rsProfil[18] = $zlFormatNom; if ($zlMenuDispo!="9") $zlMenuDispo = "8"; $rsProfil[19] = $zlMenuDispo; $rsProfil[20] = $ztCodeURL; if ($rdBarree != "N") $rdBarree = "O"; $rsProfil[21] = $rdBarree; // Format d'affichage des noms d'utilisateurs dans les listes en cas de retour sur la page de creation de compte suite a une erreur $FORMAT_NOM_UTIL = ($rsProfil[18] == "0") ? "util_nom, ' ', util_prenom" : "util_prenom, ' ', util_nom"; // Verifie si le login choisi n'est pas deja utilise $DB_CX->DbQuery("SELECT util_id FROM ${PREFIX_TABLE}utilisateur WHERE util_login='".$rsProfil[2]."'"); if (!$DB_CX->DbNumRows()) { $DB_CX->DbQuery("INSERT INTO ${PREFIX_TABLE}utilisateur (util_nom, util_prenom, util_login, util_passwd, util_interface, util_debut_journee, util_fin_journee, util_telephone_vf, util_planning, util_partage_planning, util_email, util_autorise_affect, util_alert_affect, util_precision_planning, util_semaine_type, util_duree_note, util_rappel_delai, util_rappel_type, util_rappel_email, util_format_nom, util_menu_dispo, util_url_export, util_note_barree) VALUES ('".$rsProfil[0]."', '".$rsProfil[1]."', '".$rsProfil[2]."', '".$ztPasswdMD5."',".$rsProfil[3].",".$rsProfil[4].",".$rsProfil[5].",'".$rsProfil[6]."',".$rsProfil[7].",'".$rsProfil[8]."','".$rsProfil[9]."','".$rsProfil[10]."','".$rsProfil[11]."','".$rsProfil[12]."','".$rsProfil[13]."','".$rsProfil[14]."',".$rsProfil[15].",".$rsProfil[16].",".$rsProfil[17].",'".$rsProfil[18]."','".$rsProfil[19]."','".$rsProfil[20]."','".$rsProfil[21]."')"); if ($DB_CX->DbAffectedRows()>0) { $idUser = $DB_CX->DbInsertID(); $DB_CX->DbQuery("INSERT INTO ${PREFIX_TABLE}calepin_groupe (cgr_util_id, cgr_nom) VALUES (".$idUser.", 'Non classé')"); // Partage du planning en consultation : si partage selectif uniquement if ($rsProfil[8]==2) { $tabPartage = explode("+", $ztPartage); for ($i=0;$iDbQuery("INSERT INTO ${PREFIX_TABLE}planning_partage VALUES (".$idUser.",".$tabPartage[$i].")"); } // Partage du planning en modification if ($rsProfil[10]==3) {// Si affectation selective uniquement $tabAffecte = explode("+", $ztAffecte); for ($i=0;$iDbQuery("INSERT INTO ${PREFIX_TABLE}planning_affecte VALUES (".$idUser.",".$tabAffecte[$i].")"); } elseif ($rsProfil[10]==2) {// Si consultation basee sur la liste du partage if ($rsProfil[8]!=2) $rsProfil[10]=$rsProfil[8]; else { for ($i=0;$iDbQuery("INSERT INTO ${PREFIX_TABLE}planning_affecte VALUES (".$idUser.",".$tabPartage[$i].")"); } } if ($COOKIE_AUTH) { // Envoi d'un cookie temporaire + connexion automatique setcookie($COOKIE_NOM, $rsProfil[2].":".$ztPasswdMD5.":0", time()+86400*$COOKIE_DUREE, "/", "", 0); Header("location: phenix.php"); exit; } else $msg = 15; } else { $nc = 1; $msg = 16; } } else { $nc = 1; $msg = 3; } } elseif (!isset($msg) && !$nc) { // Identification depuis le cookie if ($COOKIE_AUTH && (!empty($_COOKIE[$COOKIE_NOM]) || !empty($HTTP_COOKIE_VARS[$COOKIE_NOM]))) { if (!empty($_COOKIE) && isset($_COOKIE[$COOKIE_NOM])) $tabLog = explode(":",$_COOKIE[$COOKIE_NOM]); elseif (!empty($HTTP_COOKIE_VARS) && isset($HTTP_COOKIE_VARS[$COOKIE_NOM])) $tabLog = explode(":",$HTTP_COOKIE_VARS[$COOKIE_NOM]); // Connexion automatique choisie par l'utilisateur if ($tabLog[2]==1) { Header("location: phenix.php"); exit; } } } entete_page(); if ($nc != 1) { // On n'est pas dans le cas d'une creation de compte ?>

 
Phenix v
 
Utilisateur 
Mot de passe  
Identification via un cookie   
   

Phenix [phenix.gapi.fr]
© Stéphane TEIL 2005-2007
Une version plus récente de Phenix (".$latest_version.")
est disponible sur http://phenix.gapi.fr/

"; } } } } elseif ($PUBLIC) { //Demande de creation d'un nouveau compte echo (" \n"); message($msg); echo ("
\n"); include("skins/4.php"); // Style par defaut if (!$msg) { $rsProfil[3] = 4; // Interface par defaut : Petrole $rsProfil[4] = 9; // Debut de journee par defaut : 09h00 $rsProfil[5] = 18; // Fin de journee par defaut : 18h00 $rsProfil[6] = "O"; // Formatage automatique des numeros de telephone : O -> OUI, N -> NON $rsProfil[7] = 0; // Planning par defaut : quotidien $rsProfil[8] = 0; // Pas de partage de planning par defaut $rsProfil[10] = 0; // Affectation des notes par defaut : tout le monde $rsProfil[13] = "1111111"; // Jours selectionnes par defaut pour le planning mensuel : tous les jours (dans l'ordre du lundi au dimanche, 0 pour deselectionner) $rsProfil[14] = 1; // Duree moyenne d'une note par defaut : 1->15mn, 2->30mn, 3->45mn, 4->1heure $rsProfil[15] = 5; // Delai par defaut pour le rappel lors de la creation d'une note (de 1 a 59) $rsProfil[16] = 1; // Type par defaut pour le rappel lors de la creation d'une note : 1->Minute, 2->Heure, 3->Jour $rsProfil[17] = 0; // Rappel des notes par mail (si adresse indiquee par l'utilisateur) : 0->Non, 1->Oui $rsProfil[18] = 0; // Format d'affichage des noms dans l'application : 0 -> NOM Prenom, 1 -> Prenom NOM $rsProfil[19] = 8; // Module charge par defaut sur le menu Disponibilites : 8 -> Hebdomadaire, 9 -> Quotidien $rsProfil[20] = ""; // Code pour l'export iCal distant (il sera genere de facon aleatoire) $rsProfil[21] = "O"; // Note terminee, affichee barree : O -> OUI, N -> NON // Format d'affichage des noms d'utilisateurs dans les listes en fonction du choix definit ci-dessus $FORMAT_NOM_UTIL = ($rsProfil[18] == "0") ? "util_nom, ' ', util_prenom" : "util_prenom, ' ', util_nom"; } include("agenda_profil.php"); echo ("
 
\n"); } ?>