Aller au contenu

Spill

Membre
  • Compteur de contenus

    6
  • Inscrit(e) le

  • Dernière visite

Réputation sur la communauté

0 Neutre
  1. Bonjour , je essaye de creer un site web en XHTML , CSS , PHP et MySQL . En fait c'est ma première fois que je fais les <div> en css. Je suis en train de me casser la tête sur le sujet de colonnes et je voudrais vous demander de l'aide . Voici le projet du site : 1 ère colonne (assez petite) - menu 2 ème colonne (moyenne) - contenu 3 ème colonne (assez petite) - encore un menu que j'appelle menu_2 Voici ce que je voudrais faire : 1.) Si il y a plus de contenu (en hauteur) dans 2 que dans 1 et 3 - les menus doivent rallonger la partie verte (qui est le fond du menu) a facon que entre le menu et le pied de la page le blanc n'appairaisse pas . 2.) Si il y a moins de contenu (en hauteur) ou pas du tout dans 2 - je veudrais que c'est les menus qui indiquent la hauteur ( en fait ce sera la hauteur minimale que doit prendre la page du site . Pour les normes de XHTML , CSS et PHP (pas encore inclus) ne vous inquiétez pas - j'ai recamment appris le XHTML car avant et au debut de creation de cette page web je ne connaissais que du HTML alors je vais faire analyser par un vailidateur du code . En fait avec les menus - je cherche un peu a faire comme ici --> http://www.simy.pl/ Voici le code : index.htm <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" > <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-2" /> <meta name="author" content="Patrick Mazur" /> <meta http-equiv="reply-to" content="patrick.mazur_AT_skynet.be" /> <meta name="description" content="Sims Puissance - strona o grze The Sims 2 i jej dodatkach ." /> <meta name="copyright" content="Patrick Mazur" /> <meta http-equiv="content-language" content="pl" /> <meta name="robots" content="ALL" /> <meta name="distribution" content="GLOBAL" /> </head> <title>Sims Puissance - tutaj wasze marzenia staj si realne !!!</title> <link rel="stylesheet" media="screen" type="text/css" title="Simowe lato 2006" href="css.css" /> <body> <!-- L'en-tete --> <div id="en_tete"> </div> <!-- Le top_panel --> <div id="top_panel"> <img src="images/pole_reklama.PNG" width="250" height="100" border="0" alt="Reklama" title=""/> <p>Google i banery . </p> </div> <!-- Les menus --> <div id="menu"> <div class="element_menu"> <table width="194"> <tr> <td height="33" background="images/tlo_menu.png"> <center><img src="images/news.jpg" width="44" height="44" border="0" alt=""/> <img src="images/news.jpg" width="44" height="44" border="0" alt=""/> <img src="images/stv.jpg" width="46" height="44" border="0" alt=""/></center> </td> </tr> <tr> <td height="32" background="images/plan_dzial_1.png" ></td> </tr> <tr> <td height="32" background="images/tlo_menu.png" style="padding-left: 80; padding-right: 80; padding-top: 0; padding-bottom: 0"> <a href="page1.htm" class="dzial_menu">~ Strona G¢wna</a> <br><a href="page2.htm" class="dzial_menu">~ Chat</a> <br><a href="page3.htm" class="dzial_menu"><font color="#009900"><b>~ FORUM</b></font></a> <br><a href="page1.htm" class="dzial_menu">~ Ekipa strony</a> <br><a href="page2.htm" class="dzial_menu">~ Aktualne konkursy i akcje</a> <br><a href="page2.htm" class="dzial_menu">~ Aktualne ogoszenia</a> <br><a href="page3.htm" class="dzial_menu">~ Historia strony</a> <br><a href="page1.htm" class="dzial_menu">~ Wspom¢rz stron za darmo</a> </td> </tr> <tr> <td height="32" background="images/plan_dzial_2.png" ></td> </tr> <tr> <td height="32" background="images/tlo_menu.png"> <a href="page4.html" class="dzial_menu">~ Parcele</a> <br><a href="page6.html" class="dzial_menu">~ Simy</a> <br><a href="page4.html" class="dzial_menu">~ Podogi</a> <br><a href="page5.html" class="dzial_menu">~ Tapety</a> <br><a href="page6.html" class="dzial_menu">~ Ubrania</a> <br><a href="page4.html" class="dzial_menu">~ Przedmioty</a> <br><a href="page4.html" class="dzial_menu">~ Pokrycie terenu</a> <br><a href="page5.html" class="dzial_menu">~ Geneotyp</a> <br><a href="page6.html" class="dzial_menu">~ Cas!.package</a> <br><a href="page4.html" class="dzial_menu">~ Zawody</a> <br><a href="page6.html" class="dzial_menu">~ Panele do gry</a> </td> </tr> <tr> <td height="32" background="images/plan_dzial_3.png" ></td> </tr> <tr> <td height="32" background="images/tlo_menu.png"> <span class="zestaw_menu">||Tw¢rz swoje wasne||</span> <br><a href="page1.htm" class="dzial_menu">~ Ubrania</a> <br><a href="page2.htm" class="dzial_menu">~ Karnacje</a> <br><a href="page3.htm" class="dzial_menu">~ Okolice</a> <br><a href="page1.htm" class="dzial_menu">~ Cas!.package</a> <br><a href="page2.htm" class="dzial_menu">~ Zawody</a> <br><span class="zestaw_menu">||Zmie€ jak chcesz||</span> <br><a href="page1.htm" class="dzial_menu">~ Muzyk w grze</a> <br><a href="page2.htm" class="dzial_menu">~ Programy telewizyjne</a> <br><a href="page3.htm" class="dzial_menu">~ Gry w konsoli i automacie</a> <br><a href="page2.htm" class="dzial_menu">~ Kolor panelu w grze</a> <br><span class="zestaw_menu">||Zbuduj co chcesz||</span> <br><a href="page1.htm" class="dzial_menu">~ Gara§</a> <br><a href="page2.htm" class="dzial_menu">~ Most</a> <br><a href="page3.htm" class="dzial_menu">~ Piwnic</a> <br><a href="page1.htm" class="dzial_menu">~ Piramid</a> <br><a href="page1.htm" class="dzial_menu">~ Domek na drzewie</a> <br><a href="page2.htm" class="dzial_menu">~ Taras na drzewie</a> <br><a href="page3.htm" class="dzial_menu">~ Pod og w mozaike</a> <br><a href="page1.htm" class="dzial_menu">~ Chi€ski dach</a> <br><span class="zestaw_menu">||Po§yteczne sztuczki||</span> <br><a href="page1.htm" class="dzial_menu">~ Sortowanie downloadu</a> <br><a href="page1.htm" class="dzial_menu">~ Wiosenne porzdki</a> </td> </tr> <tr> <td height="32" background="images/plan_dzial_4.png" ></td> </tr> <tr> <td height="32" background="images/tlo_menu.png"> <a href="page2.htm" class="dzial_menu">~ Orginalne pomysy</a> <br><span class="zestaw_menu">||Filmy||</span> <br><a href="page3.htm" class="dzial_menu">~ ¡ycie marzen</a> <br><span class="zestaw_menu">||My Sim Page||</span> <br><a href="http://thesims2.ea.com/mysimpage/mysimpage.php?user_id=2011252" target="blank" class="dzial_menu">~ Spill Sim Page</a> <br><span class="nieaktywne">~ Mtex Sim Page</span> <br><span class="zestaw_menu">||Grafika||</span> <br><a href="page3.htm" class="dzial_menu">~ Tapety na pulpit</a> <br><a href="page1.htm" class="dzial_menu">~ Ikony dla Windows</a> <br><a href="page1.htm" class="dzial_menu">~ Tapety na kom¢rki</a> <br><span class="zestaw_menu">||R¢§ne||</span> <br><a href="page1.htm" class="dzial_menu">~ Sonda§e</a> </td> </tr> </table> </div> </div> </div> <div id="menu_2"> <div class="element_menu_2"> <table width="194" > <tr> <td height="32" background="images/tlo_menu.png"> <center><img src="images/news.jpg" width="44" height="44" border="0" /> <img src="images/news.jpg" width="44" height="44" border="0" /> <img src="images/stv.jpg" width="46" height="44" border="0" /></center> </td> </tr> <tr> <td height="32" background="images/plan_dzial_5.png" ></td> </tr> <tr> <td height="32" background="images/tlo_menu.png"> <span class="zestaw_menu_2">||Pene wersje||</span> <br><a href="page1.html" class="dzial_menu_2">The Sims 2 ~</a> <br><a href="page1.html" class="dzial_menu_2">The Sims 3 ~</a> <br><span class="zestaw_menu_2">||Dodatki do The Sims 2||</span> <br><a href="page2.html" class="dzial_menu_2">Na Studiach ~</a> <br><a href="page1.html" class="dzial_menu_2">Nocne ¡ycie ~</a> <br><a href="page2.html" class="dzial_menu_2">Wasny Biznes ~</a> <br><a href="page2.html" class="dzial_menu_2">Zwierzaki ~</a> <br><span class="zestaw_menu_2">||Zestawy Akcesori||</span> <br><a href="page1.html" class="dzial_menu_2">Zestaw Šwiteczny ~</a> <br><a href="page3.html" class="dzial_menu_2">Rozrywka Rodzinna ~</a> <br><a href="page3.html" class="dzial_menu_2">Glamour Life Stuff ~</a> </td> </tr> <tr> <td height="32" background="images/plan_dzial_6.png" ></td> </tr> <tr> <td height="32" background="images/tlo_menu.png"> <span class="zestaw_menu_2">||Pene wersje||</span> <br><a href="page1.html" class="dzial_menu_2">The Sims 2 ~</a> <br><a href="page1.html" class="dzial_menu_2">The Sims 3 ~</a> <br><span class="zestaw_menu_2">||Dodatki do The Sims 2||</span> <br><a href="page2.html" class="dzial_menu_2">Na Studiach ~</a> <br><a href="page1.html" class="dzial_menu_2">Nocne ¡ycie ~</a> <br><a href="page2.html" class="dzial_menu_2">Wasny Biznes ~</a> <br><a href="page2.html" class="dzial_menu_2">Pets ~</a> <br><span class="zestaw_menu_2">||Zestawy Akcesori||</span> <br><a href="page1.html" class="dzial_menu_2">Zestaw Šwiteczny ~</a> <br><a href="page3.html" class="dzial_menu_2">Rozrywka Rodzinna ~</a> <br><a href="page3.html" class="dzial_menu_2">Glamour Life Stuff ~</a> </td> </tr> <tr> <td height="32" background="images/plan_dzial_7.png" ></td> </tr> <tr> <td height="32" background="images/tlo_menu.png"> <a href="page2.html" class="dzial_menu_2">Ogr¢d Zosi ~</a> <br><a href="page2.html" class="dzial_menu_2">W drog po przygody ~</a> <br><a href="page2.html" class="dzial_menu_2">Pocztek wszystkiego ~</a> </td> </tr> <tr> <td height="32" background="images/plan_dzial_8.png" ></td> </tr> <tr> <td height="32" background="images/tlo_menu.png"> <a href="page2.html" class="dzial_menu_2">Muzyczny panel ~</a> <br><a href="page2.html" class="dzial_menu_2">Pochodzenie ~</a> </td> </tr> <tr> <td height="32" background="images/plan_dzial_9.png" ></td> </tr> <tr> <td height="32" background="images/tlo_menu.png"> <span class="zestaw_menu_2">||Kody||</span> <br><a href="page2.html" class="dzial_menu_2">The Sims 2 + dodatki ~</a> <br><a href="page2.html" class="dzial_menu_2">Sims City 4 + Rush Hour ~</a> <br><span class="zestaw_menu_2">||Na Studiach||</span> <br><a href="page1.html" class="dzial_menu_2">Granty ~</a> <br><a href="page2.html" class="dzial_menu_2">Kierunki edukacji ~</a> <br><a href="page2.html" class="dzial_menu_2">Szczeble pracy ~</a> <br><span class="zestaw_menu_2">||Organizacja||</span> <br><a href="page1.html" class="dzial_menu_2">Randki ~</a> <br><a href="page3.html" class="dzial_menu_2">Przyj ~</a> <br><a href="page1.html" class="dzial_menu_2">Urodzin ~</a> <br><a href="page3.html" class="dzial_menu_2">Idealnego §ycia ~</a> <br><a href="page1.html" class="dzial_menu_2">Przeprowadzki ~</a> <br><a href="page3.html" class="dzial_menu_2">Wesela ~</a> <br><a href="page1.html" class="dzial_menu_2">Imprezy Noworocznej ~</a> <br><a href="page3.html" class="dzial_menu_2">Rocznicy lubu ~</a> <br><span class="zestaw_menu_2">||Relacje||</span> <br><a href="page1.html" class="dzial_menu_2">Przyjacielstwo ~</a> <br><a href="page1.html" class="dzial_menu_2">Wrogo ~</a> <br><a href="page1.html" class="dzial_menu_2">Milo ~</a> <br><a href="page1.html" class="dzial_menu_2">Nienawi ~</a> <br><span class="zestaw_menu_2">||Wicej||</span> <br><a href="page3.html" class="dzial_menu_2">Wampiryzm ~</a> <br><a href="page3.html" class="dzial_menu_2">Zombie ~</a> <br><a href="page3.html" class="dzial_menu_2">FAQ ~</a> </td> </tr> </table> </div> </div> <!-- Le rentrée corps --> <div id="rentrée_corps"> </div> <!-- Le corps --> <div id="corps"> <p> <b> Oto Zawartosc aktualnie oglodanej strony .</b> <br>Linia nr°2 <br>Linia nr°3 <br>Linia nr°2<br /><br>Linia nr°2<br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br /><br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br /><br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2<br>Linia nr°2 </p> </div> <!-- La sortie du corps --> <div id="sortie_corps"> </div> <!-- Le pied de page --> <div id="pied_de_page"> </div> </body> </html> css.css body { width: 990px; height: 1241px; margin: auto; margin-top: 2px; margin-bottom: 2px; background-image: url("images/fond.png"); } /* L'en-tete */ #en_tete { width: 990px; height: 251px; background-image: url("images/logo_top.png"); background-repeat: no-repeat; margin-bottom: 0px; } /* Le panel de haut (qui se trouve en haut, espace de publicite) */ #top_panel { padding: 10px; text-align: center; color: #000000; background-color: #FFFFFF; background-image: url("images/kolor_panel.png"); background-repeat: repeat-100; border: 0px solid black; } /* Le menu */ #menu { float: left; width: 194px; height: 890px; } .element_menu { background-color: background-repeat: repeat-200; border: 0px solid black; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; height: 900px; } /* Quelques effets sur les menus */ .element_menu h3 { font size="12"; color: #006600; font-family: Arial, "Arial Black", "Times New Roman", Times, serif; text-align: center; } .element_menu ul { padding: 0px; padding-left: 0px; margin: 0px; margin-bottom: 0px; } #menu_2 { float: right; width: 194px; height: 890px; text-align: right; padding: 0px; } .element_menu_2 { background-color: #D9FFD9; background-repeat: repeat-200; border: 0px solid black; margin-bottom: 0px; height: 900px; padding-right: 0px; } /* Quelques effets sur les menus */ .element_menu_2 h3 { color: #000000; font-family: Arial, "Arial Black", "Times New Roman", Times, serif; text-align: center; } .element_menu_2 ul { padding: 0px; padding-left: 0px; margin: 0px; margin-bottom: 0px; } /* Le rentrée du corps */ #rentrée_corps { width: 594px; height: 30px; margin-left: 193px; margin-right: 193px; margin-bottom: 0px; padding: 0px; color: #000000; background-color: #FFFFFF; background-image: url(""); background-repeat: repeat-1; background-image: url("images/wejscie_strona.png"); background-repeat: repeat-1; border: 0px solid black; } /* Le corps de la page */ #corps { margin-left: 193px; margin-right: 193px; margin-bottom: 0px; padding: 25px; display: block; color: #000000; background-color: #FFFFFF; background-image: url("images/kolor_strona.png"); background-repeat: repeat-10; border: 0px solid black; } #corps h1 { color: #B3B3B3; text-align: center; font-family: Arial, "Arial Black", "Times New Roman", Times, serif; } #corps h2 { height: 30px; background-image: url("images/titre.png"); background-repeat: no-repeat; padding-left: 30px; color: #B3B3B3; text-align: left; } /* La sortie du corps */ #sortie_corps { width: 594px; height: 30px; margin-left: 193px; margin-right: 193px; margin-bottom: 0px; padding: 0px; clear: both; color: #000000; background-color: #FFFFFF; background-image: url(""); background-repeat: repeat-1; background-image: url("images/wyjscie_strona.png"); background-repeat: repeat-1; border: 0px solid black; } /* Le pied de page (qui se trouve tout en bas, en general pour les copyrights) */ #pied_de_page { width: 990px; height: 60px; clear: both; text-align: center; color: #000000; background-image: url("images/copyright.png"); background-repeat: repeat-1; border: 0px solid black; } a {font-family: VERDANA;color: #000000;text-decoration: NONE;} body {font-family: TAHOMA;font-size: 11PX;text-decoration: NONE;} a:hover {font-family: VERDANA;font-size: 8;font-style: NORMAL;cursor: HAND;font-weight: 400;border-color: #000000;color: #339900;text-decoration: UNDERLINE;} a:link {font-family: VERDANA;color: #000000;text-decoration: NONE;} a:vlink {font-family: VERDANA;border-style: SOLID;color: #000000;text-decoration: NONE;} a:visited {font-family: VERDANA;font-size: 8;font-style: NORMAL;cursor: HAND;color: #000000;text-decoration: NONE;} table { border-collapse: collapse; border: 0; } .zestaw_menu { padding-left: 7px; color: #009900; font-weight: bold; } .zestaw_menu_2 { padding-right: 7px; color: #009900; font-weight: bold; } .dzial_menu { padding-left: 3px; } .dzial_menu_2 { padding-right: 3px; } .nieaktywne { padding-left: 3px; text-decoration: line-through; } Edit modérateur : Merci d'utiliser la balise "codebox" pour les codes SUPER longs !!
  2. Ca affiche une erreur . Parse error: parse error in c:\documents and settings\utilisateur\mes documents\testsphp\rediger_news.php on line 61 Ligne 61 : else
  3. Merci , le dernier problème : sur rediger news ça n'affiche rien . Ou dois-je écrire mes news ?
  4. rediger_news.php - rien s'affiche - que du blanc news.php - while ($donnees = mysql_fetch_array($retour)) modifier_news.php - if ($modif==1) { Zone de titre : <td width="339" align="center" bgcolor="#D5B13F" class="textePRINCIPAL"><input name="titre2" type="text" id="titre2" value="<?php echo $table3['titre']; ?> " size="40"></td> moderer_news.php - La ligne 44 n'existe pas .
  5. rediger_news.php - rien s'affiche - que du blanc news.php - Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\documents and settings\utilisateur\mes documents\testsphp\news.php on line 17 modifier_news.php - En haut : Notice: Undefined variable: modif in c:\documents and settings\utilisateur\mes documents\testsphp\modifier_news.php on line 41 Zone de titre : <br /><b>Notice</b>: Undefined variable: table3 in <b>c:\documents and settings\utilisateur\mes documents\testsphp\modifier_news.php</b> on line <b>62</b><br /> moderer_news.php - Parse error: parse error in c:\documents and settings\utilisateur\mes documents\testsphp\moderer_news.php on line 44
  6. Bonjour , je possède un script de news . Mais il ne marche pas (sinon , que ferais-je ici ?) Voici le script de news tirée de http://g.carneus-design.com/news.php pour l'instant , je veut qu'il marche tout simplement et après je vais le coller dans le script de mon site . Le problème - chaque page contient une erreur . Pour le login , mot de passe , base ça marche . news.php <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" /> <meta name="author" content="[ Autor dokumentu ]" /> <meta name="description" content="[ Opis dokumentu ]" /> <meta name="generator" content="EdHTML" /> <title>news</title> </head> <body> <?php mysql_connect("localhost", "root", ""); // Connexion a MySQL $retour = mysql_query('SELECT * FROM news_puissance'); while ($donnees = mysql_fetch_array($retour)) { } echo ''.$donnees['titre'].'<br><img src="images/'.$donnees['image'].'"/><br>'; echo ''.$donnees['contenu'].'<br><br>'; echo $donnees['auteur']; ?> </body> </html> rediger_news.php <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" /> <meta name="author" content="[ Autor dokumentu ]" /> <meta name="description" content="[ Opis dokumentu ]" /> <meta name="generator" content="EdHTML" /> <title>Rediger news</title> <script language="JavaScript" type="text/JavaScript"> function addText(instext) { var mess = document.forum.contenu; //IE support if (document.selection) { mess.focus(); sel = document.selection.createRange(); sel.text = instext; document.forum.focus(); } //MOZILLA/NETSCAPE support else if (mess.selectionStart || mess.selectionStart == "0") { var startPos = mess.selectionStart; var endPos = mess.selectionEnd; var chaine = mess.value; mess.value = chaine.substring(0, startPos) + instext + chaine.substring(endPos, chaine.length); mess.selectionStart = startPos + instext.length; mess.selectionEnd = endPos + instext.length; mess.focus(); } else { mess.value += instext; mess.focus(); } } </script> </head> <body> <?php mysql_connect("localhost", "root", ""); // Connexion a MySQL if (isset($_POST['envoyer']) && $_POST['envoyer'] == 'Envoyer') { if (empty($_POST['titre']) || empty($_POST['contenu'])) { $erreur = 'Vous devez remplir tout les champs !'; } else { if ($lien_image != "none") { $dest_image = "images/".$_FILES['lien_image']['name']; $image = $_FILES['lien_image']['name']; $source_file=stripslashes($lien_image); $res_copy=copy($source_file , $dest_image); } $sql = mysql_query('INSERT INTO news_puissance VALUES("","'.$_POST['titre'].'", "'.$pseudo.'", "'.$_POST['contenu'].'", "'.$image.'")') or die('Erreur SQL !'.$sql.'<br>'.mysql_error()); echo 'Votre news est en ligne !'; } } ?> </body> </html> moderer_news.php <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" /> <meta name="author" content="[ Autor dokumentu ]" /> <meta name="description" content="[ Opis dokumentu ]" /> <meta name="generator" content="EdHTML" /> <title>Moderer news</title> </head> <body> <?php if (isset($_GET['supprimer_news'])) { mysql_query('DELETE FROM news_puissance WHERE id=' . $_GET['supprimer_news']); } ?> <table border="1" cellspacing="0"> <tr> <th width="80">Supprimer</th> <th width="30">Lien</th> <th width="6">Titre</th> <th width="132">Modifier</th> </tr> <?php $retour = mysql_query("SELECT * FROM news_puissance ORDER BY id DESC"); while ($donnees = mysql_fetch_array($retour)) { ?> <tr> <td><?php echo '<a href="moderer_news.php?supprimer_news=' . $donnees['id'] . '">'; ?>Supprimer</a></td> <td><div align="center"><?php echo stripslashes($donnees['page']); ?></div></td> <td><?php echo stripslashes($donnees['titre']); ?></td> <td><?php echo '<a href="modifier_news.php?id=' . $donnees['id'] . '">'; ?>Modifier</td> </tr> } </body> </html> modifier_news.php <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" /> <meta name="author" content="[ Autor dokumentu ]" /> <meta name="description" content="[ Opis dokumentu ]" /> <meta name="generator" content="EdHTML" /> <title>Modifier news</title> <script language="JavaScript" type="text/JavaScript"> function addText(instext) { var mess = document.forum.contenu; //IE support if (document.selection) { mess.focus(); sel = document.selection.createRange(); sel.text = instext; document.forum.focus(); } //MOZILLA/NETSCAPE support else if (mess.selectionStart || mess.selectionStart == "0") { var startPos = mess.selectionStart; var endPos = mess.selectionEnd; var chaine = mess.value; mess.value = chaine.substring(0, startPos) + instext + chaine.substring(endPos, chaine.length); mess.selectionStart = startPos + instext.length; mess.selectionEnd = endPos + instext.length; mess.focus(); } else { mess.value += instext; mess.focus(); } } </script> </head> <body> <?php if ($modif==1) { if (empty($_POST['titre2']) || empty($_POST['contenu2'])) { $erreur = 'Vous devez remplir tout les champs !'; } else { if ($lien_image != "none") { $dest_image = "images/".$_FILES['lien_image']['name']; $image = $_FILES['lien_image']['name']; $source_file=stripslashes($lien_image); $res_copy=copy($source_file , $dest_image); } $sql = mysql_query('UPDATE news_puissance SET titre="'.$_POST['titre2'].'", contenu="'.$_POST['contenu2'].'" WHERE id='.$idarticle.', image="'.$image.'"') or die('Erreur SQL !'.$sql.'<br>'.mysql_error()); } } ?> <form name="forum" method="post" action="modifier_news.php?modif=1&id="> <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#333333"> <tr> <td width="90" align="center" bgcolor="#DEBA42" class="texteTITRE">Titre :</td> <td width="339" align="center" bgcolor="#D5B13F" class="textePRINCIPAL"><input name="titre2" type="text" id="titre2" value="<?php echo $table3['titre']; ?> " size="40"></td> </tr> <tr> <td align="center" valign=top bgcolor="#FFFFFF" class="textePRINCIPAL2"> </td> <td align="center" bgcolor="#FFFFFF" class="textePRINCIPAL"><textarea name="contenu2" cols="40" rows="10" id="contenu2"> </textarea></td> </tr> <tr> <td></td><td><input type="file" name="lien_image" enctype="multipart/form-data"></td></tr> <tr> <td colspan="2" align="center" bgcolor="#D5B13F" class="textePRINCIPAL"><input type="submit" name="envoyer" value="Envoyer" ></td> </tr> </table> </form> </body> </html> EDIT : Merci d'utiliser codebox et non code pour les codes longs
×
×
  • Créer...