par
jenny06 » 05 févr. 2007, 18:18
Il vient du fichier d'avant je suppose.
En faite j'ai un formulaire de base qui contient un bouton et lorsqu'on clique dessus, on rentre sur le formulaire que je vous ai envoyer au dessus
Voici le fichier de base :
<?
require("include/secure.php");
require("include/comvar.php");
//include("include/inversionDate.inc.php");
$strSQL="SELECT * FROM categorie order by idCategorie desc, nomCategorie desc";
$result = mysql_query($strSQL);
?>
<html>
<head>
<title>Gestion des Categories / Sous-Categories</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT langage="javascript">
<!--
function etesVousSure(arg){
aux=confirm("Voulez vous vraiment supprimer cette categorie");
if (aux) {
str ="supprimerCategorie.php?idCategorie="+arg;
MM_goToURL("self", str);
};
}
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
//-->
</script>
<link href="CSS/ADENA1.css" rel="stylesheet" type="text/css">
<link href="CSS/Nouveau%20dossier.css" rel="stylesheet" type="text/css">
</head>
<link rel="stylesheet" href="perseX.css" type="text/css">
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0">
<table width="101%" height="74" border="0" cellpadding="0" cellspacing="0" class="ADENA4">
<tr>
<td width="18%" height="74" class="TITRE"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="186" height="74">
<param name=movie value="images/adena.swf">
<param name=quality value=high>
<embed src="images/adena.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="186" height="74">
</embed> </object> </td>
<td width="82%" class="TITRE">Gestion des Categories / Sous-Categories</td>
</tr>
</table>
<p>
<table width="973" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="1883" height="40
" align="center" valign="middle" class="ggg"><a href="index.php" class="ggg">Menu
Général</a> </td>
</tr>
<tr>
<td width="1255" height="40" align="center" valign="middle" class="ADENA">
<div align="center"><img src="images/deco.jpg" width="970" height="40"></div></td>
</tr>
<tr>
<td height="40" align="center" valign="middle" bordercolor="#FFFFFF" bgcolor="#669ACC">
<form name="lien" action="insertCategorie.php" method="post">
<input type="submit" name="link" value="Ajouter une Categorie" class="bouton">
</form>
</td>
</tr>
</table>
<!-- MISE EN FORME -->
<table align="center" bordercolor="#425065" border=1 cellpadding="0" cellspacing="0">
<td height="159" valign="middle" bordercolor="#FFFFFF" bgcolor="#669ACC">
<!-- MISE EN FORME -->
<table width="800" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#669ACC">
<tr class="spe">
<td width="175" height="20" colspan="2">
<div align="center" class="ADENA"><b>Categorie</b></div>
</td>
<td width="350" height="20" colspan="3">
<div align="center" class="ADENA"><b>Traitement</b></div>
</td>
</tr>
<?
while ($myrow = mysql_fetch_array($result)) {
?>
<tr>
<td width="80" height="58" bgcolor="#81ADC8" colspan="2">
<div align="center" class="ggg" ><b><font size="2">
<?
printf("%s", $myrow["nomCategorie"]);
?>
</b></div>
</td>
<!--<td width="320" height="58" bgcolor="#FFFFFF" bg>
<div align="left" class="ggg"><b><font size="2">
<?
// printf("%s", $myrow["nomSousCategorie"]);
?>
</b></div>
</td>-->
<td height="48" bgcolor="#FFFFFF">
<div align="center"><a href="<?php printf("editCategorie.php?idCategorie=%s", $myrow["idCategorie"])?>">
</a><a href="#"><img src="images/modifier.gif" width="24" height="31" border="0" onClick="MM_goToURL('self', 'editCategorie.php?idCategorie=<?php printf("%s", $myrow["idCategorie"])?>')" alt="Modifier la Categorie"></a></div>
</td>
<td height="48" bgcolor="#FFFFFF">
<div align="center"><a href="javascript:etesVousSure(<?php printf("%s", $myrow["idCategorie"]); ?>)">
</a><a href="#"><img src="images/supprimer.gif" width="24" height="31" border="0" onClick="MM_callJS('etesVousSure(<?php printf("%s", $myrow["idCategorie"]); ?>)')" alt="Supprimer la Categorie"></a></div>
</td>
<td height="48" bgcolor="#FFFFFF">
<div align="center"><form name="lien" action="insertSousCategorie.php" method="post">
<input type="submit" name="link" value="Ajouter une Sous Categorie" class="bouton">
</form>
</div>
</td>
</tr>
<?
if($myrow["nomSousCategorie"]!='')
{?>
<tr>
<td width="80"> </td>
<td width="80" height="58" bgcolor="#81ADC8">
<div align="center" class="ggg"><b><font size="2">
<?
printf("%s", $myrow["nomSousCategorie"]);
?>
</b></div>
</td>
<!--<td width="320" height="58" bgcolor="#FFFFFF" bg>
<div align="left" class="ggg"><b><font size="2">
<?
// printf("%s", $myrow["nomSousCategorie"]);
?>
</b></div>
</td>-->
<td height="48" bgcolor="#FFFFFF">
<div align="center"><a href="<?php printf("editCategorie.php?idSousCategorie=%s", $myrow["idSousCategorie"])?>">
</a><a href="#"><img src="images/modifier.gif" width="24" height="31" border="0" onClick="MM_goToURL('self', 'editSousCategorie.php?nomCategorie=<?php printf("%s", $myrow["idCategorie"])?>')" alt="Modifier la Sous Categorie"></a></div>
</td>
<td height="48" bgcolor="#FFFFFF">
<div align="center"><a href="javascript:etesVousSure(<?php printf("%s", $myrow["idSousCategorie"]); ?>)">
</a><a href="#"><img src="images/supprimer.gif" width="24" height="31" border="0" onClick="MM_callJS('etesVousSure(<?php printf("%s", $myrow["idCategorie"]); ?>)')" alt="Supprimer la Sous Categorie"></a></div>
</td>
</tr>
<?php }
}
?>
</table>
<br>
</td>
</table>
<br>
<center>
<table width="973" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="1883" height="40" align="center" valign="middle" class="ggg">
<a href="index.php" class="ggg">Menu Général</a> </td>
</tr>
</table>
</center>
</body>
</html>
Vous comprenez mieux ?
Il vient du fichier d'avant je suppose.
En faite j'ai un formulaire de base qui contient un bouton et lorsqu'on clique dessus, on rentre sur le formulaire que je vous ai envoyer au dessus
Voici le fichier de base :
[php]
<?
require("include/secure.php");
require("include/comvar.php");
//include("include/inversionDate.inc.php");
$strSQL="SELECT * FROM categorie order by idCategorie desc, nomCategorie desc";
$result = mysql_query($strSQL);
?>
<html>
<head>
<title>Gestion des Categories / Sous-Categories</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT langage="javascript">
<!--
function etesVousSure(arg){
aux=confirm("Voulez vous vraiment supprimer cette categorie");
if (aux) {
str ="supprimerCategorie.php?idCategorie="+arg;
MM_goToURL("self", str);
};
}
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
//-->
</script>
<link href="CSS/ADENA1.css" rel="stylesheet" type="text/css">
<link href="CSS/Nouveau%20dossier.css" rel="stylesheet" type="text/css">
</head>
<link rel="stylesheet" href="perseX.css" type="text/css">
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0">
<table width="101%" height="74" border="0" cellpadding="0" cellspacing="0" class="ADENA4">
<tr>
<td width="18%" height="74" class="TITRE"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="186" height="74">
<param name=movie value="images/adena.swf">
<param name=quality value=high>
<embed src="images/adena.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="186" height="74">
</embed> </object> </td>
<td width="82%" class="TITRE">Gestion des Categories / Sous-Categories</td>
</tr>
</table>
<p>
<table width="973" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="1883" height="40
" align="center" valign="middle" class="ggg"><a href="index.php" class="ggg">Menu
Général</a> </td>
</tr>
<tr>
<td width="1255" height="40" align="center" valign="middle" class="ADENA">
<div align="center"><img src="images/deco.jpg" width="970" height="40"></div></td>
</tr>
<tr>
<td height="40" align="center" valign="middle" bordercolor="#FFFFFF" bgcolor="#669ACC">
<form name="lien" action="insertCategorie.php" method="post">
<input type="submit" name="link" value="Ajouter une Categorie" class="bouton">
</form>
</td>
</tr>
</table>
<!-- MISE EN FORME -->
<table align="center" bordercolor="#425065" border=1 cellpadding="0" cellspacing="0">
<td height="159" valign="middle" bordercolor="#FFFFFF" bgcolor="#669ACC">
<!-- MISE EN FORME -->
<table width="800" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#669ACC">
<tr class="spe">
<td width="175" height="20" colspan="2">
<div align="center" class="ADENA"><b>Categorie</b></div>
</td>
<td width="350" height="20" colspan="3">
<div align="center" class="ADENA"><b>Traitement</b></div>
</td>
</tr>
<?
while ($myrow = mysql_fetch_array($result)) {
?>
<tr>
<td width="80" height="58" bgcolor="#81ADC8" colspan="2">
<div align="center" class="ggg" ><b><font size="2">
<?
printf("%s", $myrow["nomCategorie"]);
?>
</b></div>
</td>
<!--<td width="320" height="58" bgcolor="#FFFFFF" bg>
<div align="left" class="ggg"><b><font size="2">
<?
// printf("%s", $myrow["nomSousCategorie"]);
?>
</b></div>
</td>-->
<td height="48" bgcolor="#FFFFFF">
<div align="center"><a href="<?php printf("editCategorie.php?idCategorie=%s", $myrow["idCategorie"])?>">
</a><a href="#"><img src="images/modifier.gif" width="24" height="31" border="0" onClick="MM_goToURL('self', 'editCategorie.php?idCategorie=<?php printf("%s", $myrow["idCategorie"])?>')" alt="Modifier la Categorie"></a></div>
</td>
<td height="48" bgcolor="#FFFFFF">
<div align="center"><a href="javascript:etesVousSure(<?php printf("%s", $myrow["idCategorie"]); ?>)">
</a><a href="#"><img src="images/supprimer.gif" width="24" height="31" border="0" onClick="MM_callJS('etesVousSure(<?php printf("%s", $myrow["idCategorie"]); ?>)')" alt="Supprimer la Categorie"></a></div>
</td>
<td height="48" bgcolor="#FFFFFF">
<div align="center"><form name="lien" action="insertSousCategorie.php" method="post">
<input type="submit" name="link" value="Ajouter une Sous Categorie" class="bouton">
</form>
</div>
</td>
</tr>
<?
if($myrow["nomSousCategorie"]!='')
{?>
<tr>
<td width="80"> </td>
<td width="80" height="58" bgcolor="#81ADC8">
<div align="center" class="ggg"><b><font size="2">
<?
printf("%s", $myrow["nomSousCategorie"]);
?>
</b></div>
</td>
<!--<td width="320" height="58" bgcolor="#FFFFFF" bg>
<div align="left" class="ggg"><b><font size="2">
<?
// printf("%s", $myrow["nomSousCategorie"]);
?>
</b></div>
</td>-->
<td height="48" bgcolor="#FFFFFF">
<div align="center"><a href="<?php printf("editCategorie.php?idSousCategorie=%s", $myrow["idSousCategorie"])?>">
</a><a href="#"><img src="images/modifier.gif" width="24" height="31" border="0" onClick="MM_goToURL('self', 'editSousCategorie.php?nomCategorie=<?php printf("%s", $myrow["idCategorie"])?>')" alt="Modifier la Sous Categorie"></a></div>
</td>
<td height="48" bgcolor="#FFFFFF">
<div align="center"><a href="javascript:etesVousSure(<?php printf("%s", $myrow["idSousCategorie"]); ?>)">
</a><a href="#"><img src="images/supprimer.gif" width="24" height="31" border="0" onClick="MM_callJS('etesVousSure(<?php printf("%s", $myrow["idCategorie"]); ?>)')" alt="Supprimer la Sous Categorie"></a></div>
</td>
</tr>
<?php }
}
?>
</table>
<br>
</td>
</table>
<br>
<center>
<table width="973" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="1883" height="40" align="center" valign="middle" class="ggg">
<a href="index.php" class="ggg">Menu Général</a> </td>
</tr>
</table>
</center>
</body>
</html>
[/php]
Vous comprenez mieux ?