le 09/03/2010 à 14:31
probleme d'affichage des données
vive LA GLOBULE :)
ça marche parfaitement.
gros gros........merci
ça marche parfaitement.
gros gros........merci
<?php
session_start();
if (!isset($_SESSION['login'])) {
header ('Location: ../xxxx/connexion_admin.php');
exit();
}
?>
<?php
session_start();
/****************************/
require_once('../config.php');
require_once('../fonctions.php');
/****************************/
// Nous affichons notre tableau des commandes
$entete = array('Clients','Societé','Date d\'inscription');
echo'<div align="center" ><p><strong>Liste de des clients enregistées sur xxxxx</strong></p><br /><br />';
echo'<table width="900" height="40" border="1" align="center" bgcolor=#FF0000>
<colgroup>
<col style="width: 400px">
<col style="width: 300px">
<col style="width: 200px">
</colgroup>
<tr>
<th scope="col">'.$entete[0].'</th>
<th scope="col">'.$entete[1].'</th>
<th scope="col">'.$entete[2].'</th>
</tr>
</table>';
$result = mysql_query("SELECT nom, prenom, societe,date_insc FROM membres");
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
/****Modification de la date : Américan vers Europe**********/
$date_inscrip = $row[3];
$date_inscrip = preg_replace('!^([0-9]{4})+-([0-9]{2})+-([0-9]{2})$!', '$3/$2/$1', $date_inscrip); #Modifiation de la date
$row[3] = $date_inscrip ;
/***************************************************************/
echo'<table width="900" height="40" border="1" align="center" >
<colgroup>
<col style="width: 400px">
<col style="width: 300px">
<col style="width: 200px">
</colgroup>
<tr>
<th scope="col" ><a href="http://xxxxxxx/aff_client.php">'.$row[0].' '.$row[1].'</a></th>
<th scope="col" >'.$row[2].'</th>
<th scope="col" >'.$row[3].'</th>
</tr>
</table>';
//printf("ID : %s Nom : %s", $row[0], $row[1]);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>xxxxxx : affcicher membres</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
p {
color:red;
}
-->
</style>
</head>
<body>
<?php
include_once('../bas_sans.php');
?>
</body>
</html>
<?php
session_start();
if (!isset($_SESSION['login'])) {
header ('Location: ../xxxx/connexion_admin.php');
exit();
}
?>
<?php
session_start();
/****************************/
require_once('../config.php');
require_once('../fonctions.php');
/****************************/
echo'<div align="center" ><r><strong>Profil du client</strong></r><br /><br />';
$result = mysql_query("SELECT nom, prenom, date_insc,pseudo,societe,email,siret,adresse,code_postale,ville,pays,telephone,mobile,fax,societe_livraison,adresse_livraison,code_postale_livraison,ville_livraison,pays_livraison FROM membres");
/******************************/
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
/****Modification de la date : Américan vers Europe**********/
$date_inscrip = $row[3];
$date_inscrip = preg_replace('!^([0-9]{4})+-([0-9]{2})+-([0-9]{2})$!', '$3/$2/$1', $date_inscrip); #Modifiation de la date
$row[3] = $date_inscrip ;
/***************************************************************/
// Nous affichons notre tableau des commandes
$entete = array('Nom','Prenom','Date d\'inscription','Pseudo','Societé','E-mail','Siret','Adresse de factoration','Tél fixe','Tél mobile','Fax','Adresse de livraison');
/****************************************************************/
echo'<table width="700" height="20" border="1" align="center" >
<colgroup>
<col style="width: 200px">
<col style="width: 500px">
</colgroup>
<tr><th scope="col"><p>'.$entete[0].'</p></th><th>'.$row[0].'</th></tr>
<tr><th scope="col"><p>'.$entete[1].'</p></th><th >'.$row[1].'</th></tr>
<tr><th scope="col"><p>'.$entete[2].'</p></th><th>'.$row[2].'</th></tr>
<tr><th scope="col"><p>'.$entete[3].'</p></th><th>'.$row[3].'</th></tr>
<tr><th scope="col"><p>'.$entete[4].'</p></th><th>'.$row[4].'</th></tr>
<tr><th scope="col"><p>'.$entete[5].'</p></th><th>'.$row[5].'</th></tr>
<tr><th scope="col"><p>'.$entete[6].'</p></th><th>'.$row[6].'</th></tr>
<tr><th scope="col"><p>'.$entete[7].'</p></th><th>'.$row[7].'<br/>'.$row[8].' '.$row[9].' '.$row[10].'</th></tr>
<tr><th scope="col"><p>'.$entete[8].'</p></th><th>'.$row[11].'</th></tr>
<tr><th scope="col"><p>'.$entete[9].'</p></th><th>'.$row[12].'</th></tr>
<tr><th scope="col"><p>'.$entete[10].'</p></th><th>'.$row[13].'</th></tr>
<tr><th scope="col"><p>'.$entete[11].'</p></th><th>'.$row[14].'<br/>'.$row[15].'<br/>'.$row[16].' '.$row[17].' '.$row[18].'</th></tr>
</table>';
//printf("ID : %s Nom : %s", $row[0], $row[1]);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>xxxx : Profil du client</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
p {
color:blue;
}
-->
r {
color:red;
}
</style>
</head>
<body>
<?php
include_once('../bas_sans.php');
?>
</body>
</html>
<html>
<head>
<title>Connexion Administration</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
p {
color:red;
}
<!--
#cont {
border : 1px solid green;
height : 600px;
width : 600px;
}
#centrer {
height : 200px;
width : 200px;
margin : auto;
}
-->
</style>
</head>
<body>
<!----------------------------------------------------->
<br /><table width="520" border="0" align="center">
<tr>
<td colspan="2" class="menu">Connexion à l'interface Administration</td>
</tr>
</table>
<br /><br />
<FIELDSET id="centrer" style="width:560px;"><LEGEND class="Style6">Connexion Administrateur</LEGEND>
<BR>
<script language="JavaScript">
function test(form) {
var p_login = false;/**/
var p_passwrd = false;
var probleme = false;
var login = form.elements["login"].value;
var pass = form.elements["pass"].value;
if (login == "" && pass != "")/*si le login seul qui n'est pas saisie*/
{p_login = true;}
if (login != "" && pass == "")/*si le passwrd seul qui n'est pas saisie*/
{p_passwrd = true;}
if (login == "" && pass == "")/*si le passwrd et le login qui ne sont pas saisies*/
{probleme = true;}
if (p_login)/*saisir un login*/
{
alert('Veuillez saisir votre login !');
return false;
}
if (p_passwrd)/*saisir un paswwrd*/
{
alert('Veuillez saisir votre password !');
return false;
}
if (probleme)/*saisir un login et un passwrd*/
{
alert('Veuillez saisir votre login et votre password !');
return false;
}
}
</script><form name="autom" method="POST" action=".xxxx.php" onSubmit="return test(this)">
<table align="center">
<tr><td><span >Login : </span></td><td><input type="text" name="login" value="<?php if (isset($_POST['login'])) echo htmlentities(trim($_POST['login'])); ?>"></td></tr>
<tr><td><span >Mot de passe : </span></td><td><input type="password" name="pass" value="<?php if (isset($_POST['pass'])) echo htmlentities(trim($_POST['pass'])); ?>"></td></tr>
<tr><td> </td><td><input type="submit" name="connexion" value="Connexion"></td></tr>
</table>
</form>
<a href="http://xxxxx/index.html">Retour à l'acceuil</a>
</FIELDSET>
<?php
session_start();
require_once('config.php');
require_once('fonctions.php');
$titre_page='Gestion des commandes clients';
include_once('haut_color.php');
?>
<div align="center" class="Style1">
<div class="Style2">Mes commandes </div>
</div>
<p> </p>
<p> </p>
<?php
/***/
// Nous affichons notre tableau des commandes
$entete = array('N° Commande','Date commande','Client','Fichier','Q','Etat','Date livraison','Expédition');
echo'<table width="876" height="37" border="1" align="center" bgcolor=#FF0000>
<colgroup>
<col width=140px>
<col width=140px>
<col width=200px>
<col width=200px>
<col width=140px>
<col width=140px>
<col width=140px>
<col width=280px>
</colgroup>
<tr>
<th scope="col">'.$entete[0].'</th>
<th scope="col">'.$entete[1].'</th>
<th scope="col">'.$entete[2].'</th>
<th scope="col">'.$entete[3].'</th>
<th scope="col">'.$entete[4].'</th>
<th scope="col">'.$entete[5].'</th>
<th scope="col">'.$entete[6].'</th>
<th scope="col">'.$entete[7].'</th>
</tr>
</table>';
$result = mysql_query("SELECT ref_com, date_com, client, fichier_com, Q, etat, date_livraison, expedition FROM commandes");
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
echo'<table width="876" height="37" border="1" align="center" >
<colgroup>
<col width=235px>
<col width=210px>
<col width=270px>
<col width=203px>
<col width=250px>
<col width=100px>
<col width=140px>
<col width=240px>
</colgroup>
<tr>
<th scope="col" >'.$row[0].'</th>
<th scope="col" >'.$row[1].'</th>
<th scope="col" >'.$row[2].'</th>
<th scope="col" >'.$row[3].'</th>
<th scope="col" >'.$row[4].'</th>
<th scope="col" >'.$row[5].'</th>
<th scope="col" >'.$row[6].'</th>
<th scope="col" >'.$row[7].'</th>
</tr>
</table>';
}
?>
<?php
include_once('bas.php');
?>