Aller au contenu

MAHBOUB

IT Guy
  • Compteur de contenus

    1
  • Inscription

  • Dernière visite

Profile Information

  • Genre
    Homme

MAHBOUB's Achievements

  1. Chers messieurs , je vous prie de m aider à corriger l errer suivante : J ai bien installé sur mon site un script de petites annonces (sans base de donées) et j ai bien rempli le formulaire , tout ça marche bien , et le site s affiche bien .sauf quand je veux accéder à l administration , il me donne le message d erreur suivant ( Parse error: syntax error, unexpected $end .....)et moi je ne sais rien en php pour corriger cet erreur .et maintenant je vous prie chers monsieurs de me corriger les codes et voici le code de la page ou se trouve l erreur .Veuillez s il vous plait me corriger et me souligner ou il ya un manque et je vous remercie fortement . <?php include "../annonce/admin.php"; $passwordadmin = strip_tags(htmlspecialchars(addslashes(trim($_POST['mpasse1'])))); $loginadmin = strip_tags(htmlspecialchars(addslashes(trim($_POST['adminvalide'])))); if ($mpasse == $passwordadmin && $login == $loginadmin) { echo (' <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="fr"> <head> <title>Administration</title> <META name="description" content="validation annonce"> <META name="keywords" content="annonce gratuite"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" media="screen" href="../images/style.css" type="text/css"> <meta name="robots" content="noindex, nofollow"> <script language="javascript"> function toutcocher() { for(i=0;i<document.myform.length;i++) { if(document.myform.elements.type=="checkbox") document.myform.elements.checked=true; } } </script> <script type="text/javascript"> <!-- function verif_formulaire2() { if(document.form2.searchmoteur.value == "") { alert("Veuillez entrer un mot-clé!"); document.form2.searchmoteur.focus(); return false; } if(document.form2.regionmoteur.value == "") { alert("Veuillez entrer votre region!"); document.form2.regionmoteur.focus(); return false; } if(document.form2.categoriemoteur.value == "") { alert("Veuillez entrer votre catégorie!"); document.form2.categoriemoteur.focus(); return false; } } //--> </script> </head> <body> <br><br><br> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="800" align="center"> <TR valign="middle"> <TD width="35"></TD> <TD height="40"><img src="../images/logo.gif" border="0" height="25" width="158"></TD> <TD align="right"><font class="lienh">La référence en la matière<br>Service de petite annonce gratuite</font></TD> <TD width="35"></TD> </TR> </table> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="800" align="center"> <TR> <TD class="c01"></TD> <TD class="ce"></TD> <TD class="cee1"></TD> <TD class="cee"></TD> <TD class="c02"></TD> </TR> </table> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="800" align="center"> <TR valign="top"> <TD class="alo"></TD> <TD class="ace1"><b>Recherche un mot clé</b></TD> <TD class="aace1"></TD> <TD class="ace2"><img src="../images/puce.png" border="0" valign="middle"><a href="../index.html" class="ace2liens">INDEX</a><img src="../images/trans.gif" height="1" width="40" border="0"><img src="../images/puce.png" border="0" valign="middle"><a href="../depose-annonce.php" class="ace2liens">DEPOSER UNE ANNONCE</a><img src="../images/trans.gif" height="1" width="40" border="0"><img src="../images/puce.png" border="0" valign="middle"><a href="../aide.html" class="ace2liens">AIDE</a><img src="../images/trans.gif" height="1" width="40" border="0"><img src="../images/puce.png" border="0" valign="middle"><a href="../contact.html" class="ace2liens">CONTACT</a></TD> <TD class="ali"></TD> </TR> </table> <form method="GET" name="form2" action="../annonce/moteur.php" onSubmit="return verif_formulaire2()"> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="800" align="center"> <TR VALIGN="middle"> <TD class="pp1"></TD> <TD class="pp2"><img src="../images/trans.gif" height="0" width="4" border="0"><input id="searchmoteur" name="searchmoteur" class="int" value="Que recherchez-vous ?"> <img src="../images/trans.gif" height="0" width="27" border="0"><font color="#f8941c"><b>Region:</b></font><img src="../images/trans.gif" height="0" width="10" border="0"><select id="regionmoteur" name="regionmoteur" class="int"> <option value="France" > Toute la France</option> <option value="Alsace" > Alsace</option> <option value="Aquitaine" > Aquitaine</option> <option value="Auvergne" > Auvergne</option> <option value="Basse-Normandie" > Basse Normandie</option> <option value="Bourgogne" > Bourgogne</option> <option value="Bretagne" > Bretagne</option> <option value="Centre" > Centre</option> <option value="Champagne-Ardenne" > Champagne Ardenne</option> <option value="Corse" > Corse</option> <option value="Franche-Comte" >Franche Comte</option> <option value="Haute-Normandie" >Haute Normandie</option> <option value="Ile-de-France" >Ile de France</option> <option value="Languedoc-Roussillon" >Languedoc Roussillon</option> <option value="Limousin" >Limousin</option> <option value="Lorraine" >Lorraine</option> <option value="Midi-Pyrenees" >Midi Pyrenees</option> <option value="Nord-Pas-de-Calais" >Nord Pas de Calais</option> <option value="Pays-de-la-Loire" >Pays de la Loire</option> <option value="Picardie" >Picardie</option> <option value="Poitou-Charentes" >Poitou Charentes</option> <option value="Provence-Alpes-Cote-d-Azur" >Provence Alpes Cote d Azur</option> <option value="Rhone-Alpes">Rhone-Alpes</option></select> <img src="../images/trans.gif" height="0" width="30" border="0"><font color="#8dc53e"><b>Catégorie:</b></font><img src="../images/trans.gif" height="0" width="10" border="0"> <select id="categoriemoteur" name="categoriemoteur" class="int"> <optgroup label=Véhicule> <option value="voiture"> Voiture</option> <option value="moto"> Moto</option> <option value="quad"> Quad</option> <option value="bateau"> Bateau</option> <option value="caravane"> Caravane</option> <option value="remorque"> Remorque</option> <option value="jet-ski"> Jet ski</option> <option value="scooter"> Scooter</option> <option value="agricole"> Agricole </optgroup> <optgroup label=Immobilier> <option value="vente-maison"> Vente maison</option> <option value="appartement"> Appartement</option> <option value="location"> Location</option> <option value="terrain"> Terrain</option> <option value="etang"> Etang</option> <option value="mobil-home"> Mobil Home </optgroup> <optgroup label=Multimédia> <option value="informatique"> Informatique</option> <option value="telephonie"> Téléphonie </option> <option value="television"> Télévision</option> <option value="chaine-hifi"> Chaine hifi</option> <option value="jeu-video"> Jeu vidéo</option> <option value="dvd-film"> Dvd film </option> <option value="livre"> Livre</option> <option value="musique"> Musique</option> <option value="photo-video"> Photo & Vidéo </optgroup> <optgroup label=Maison> <option value="electromenager"> Electroménager</option> <option value="ameublement"> Ameublement</option> <option value="decoration"> Décoration</option> <option value="bricolage"> Bricolage</option> <option value="jardinage"> Jardinage</option> <option value="bijoux"> Bijoux</option> <option value="equipement-bebe"> Equipement bébé</option> <option value="vetement"> Vêtements & Accessoires</optgroup> <optgroup label=Divers> <option value="chien"> Chien </option> <option value="chat"> Chat </option> <option value="emploi"> Emploi </option> <option value="service"> Service</option> <option value="jouet"> Jouet</option> <option value="billetterie"> Billetterie </option> <option value="voyage"> Voyage</option> <option value="autre"> Autre</optgroup> </select> <input type="submit" value="" class="submit"></TD> <TD class="pp3"></TD> </TR> </table> </form> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="800" align="center"> <TR valign="top"> <TD class="lo"></TD> <TD class="rien">Partie Administrateur :<br><br><br>Valider ou supprimer les annonces => Total annonce créée : '); include "../annonce/compteur.txt"; echo ('<br><br><form name="myform" action="../annonce/valider.php" method="GET"> <input type="hidden" name="adminvalide" value="'.$_POST['adminvalide'].'"> <input type="hidden" name="mpasse1" value="'.$_POST['mpasse1'].'"> <br><br>'); $adminvalide = strip_tags(htmlspecialchars(addslashes(trim($_POST['adminvalide'])))); $passwordadmin = strip_tags(htmlspecialchars(addslashes(trim($_POST['mpasse1'])))); $loginadmin = strip_tags(htmlspecialchars(addslashes(trim($_POST['adminvalide'])))); if ($page ==""){$page = 1 ;} $dir2 = opendir('En-attente/annonce/'); $tableau = array(); $i=0; while ($File = readdir($dir2)){ if($File != "." && $File != ".." && $File != "" && $File != ".htaccess" && $File != "moteur.php" && $File != "index.php" && $File != "index.html") { $tableau[] = 'En-attente/annonce/'.$File.''; } $i++; } closedir($dir2); rsort($tableau); $Max = count($tableau); $pagemin = $page*$nbsujet-$nbsujet; $nbpage = $Max/$nbsujet; $nbpage = ceil($nbpage); if ($page == $nbpage) {$pagemax = $Max;} else {$pagemax = $page*$nbsujet;} if ($Max != 0){ for($i = $pagemin; $i != $pagemax; $i++){ include "$tableau[$i]"; } } $nbpage = $Max/$nbsujet; $nbpage = ceil($nbpage); $nbpage2 = $nbpage +1 ; echo '<input class="boutonsub" type="button" value="Cocher tout pour valider" onclick="toutcocher();"> <input type="submit" name="envoye" value="Valider" class="boutonsub"> <input type="reset" value="reset" class="boutonsub"> <br><br><br'; for ($i = 1 ; $i <= $nbpage ; $i++) { if ($i < ($page-10) ) $i = $page - 10; if ($i >= $page + 10 AND $i <= $nbpage - 10) echo "..."; if ($i > ($page+4) ) $i = $nbpage ; if ($i == $page ) echo '<b>['.$i.']<b></font>&nbsp;&nbsp;'; else echo '<a href=valide.php?adminvalide='.$_POST['adminvalide'].'&mpasse1=.$_POST['mpasse1].'&page='.$i.'><b>'.$i.'</b></a>&nbsp;&nbsp;'; } echo '<p><br><br></p> </TD> <TD class="li"></TD> </TR> </TR> </table> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="800" align="center"> <TR valign="top"> <TD class="c03"></TD> <TD class="ce2"></TD> <TD class="c04"></TD> </TR> </TABLE> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="800" align="center"> <TR valign="top"> <TD class="lo1"></TD> <TD class="ce3"><img src="../images/trans.gif" height="20" width="2" border="0"><FONT class="about">About FR</font><br><img src="../images/trans.gif" height="15" width="2" border="0"><li><a href="#" class="lien">Condition d\'utilisation</a><br><li><a href="#" class="lien">Contactez-nous</a><br><li><a href="#" class="lien">Aide</a><br><li><a href="#" class="lien">Qui sommes nous ?</a><br><li><a href="http://www.frogannonce.fr" class="lien">Petite annonce gratuite</a></TD> <TD class="ce9"><img src="../images/trans.gif" height="20" width="2" border="0"><FONT class="about">Partenaires</font><br><img src="../images/trans.gif" height="15" width="2" border="0"><li><a href="http://www.frogannonce.fr" class="lien">Petite annonce gratuite</a></TD> <TD class="ce33"></TD> <TD class="ce99"><img src="../images/trans.gif" height="10" width="10" border="0"><br>2011 © Tous droits réservés</TD> <TD class="li1"></TD> </TR> </TABLE> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="800" align="center"> <TR> <TD class="cb1"></TD> <TD class="ce4"></TD> <TD class="cb2"></TD> </TR> </TABLE> <br><br><br> </body> </html>'; } else { echo "<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'> <html lang='fr'> <head> <title>Validation d\'Annonce</title> <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'> <link href='../images/style.css' media='screen' rel='stylesheet' type='text/css'> <meta name='robots' content='noindex, nofollow'> <script type='text/javascript'> <!-- function verif_formulaire() { if(document.form1.adminvalide.value == '') { alert('Veuillez entrer votre Login!'); document.form1.adminvalide.focus(); return false; } if(document.form1.mpasse1.value == '') { alert('Veuillez entrer votre Password!'); document.form1.mpasse1.focus(); return false; } } //--> </script> </head> <body leftmargin='0' topmargin='3' marginwidth='0' marginheight='0'> <br><br> <table width='760' border='0' align='center' cellpadding='0' cellspacing='0' bgcolor='#ffffff' style='border: solid 1px #cad7e4;'> <tr> <td width='19'>&nbsp;</td> <td width='721'><center><font style='font-family: Tahoma, Geneva, sans-serif;font-size: 12px;color:#3b5963;'>Validation des Annonces</font></center></td> <td width='19'>&nbsp;</td> </tr> </table><br> <table width='760' border='0' align='center' cellpadding='0' cellspacing='0' bgcolor='#ffffff' style='border: solid 1px #cad7e4;'> <tr> <td width='19'>&nbsp;</td> <td width='721'><form name='form1' method='post' action='valide.php' onSubmit='return verif_formulaire()'> <table width='700' border='0' align='center' cellpadding='0' cellspacing='0'> <tr> <td colspan='2'><center><font align='center' style='font-family: Tahoma, Geneva, sans-serif;font-size: 12px;color:#3b5963;'>Administration du service d'annonce</font></center></td> </tr> <tr> <td width='90'>&nbsp;</td> <td width='170'>&nbsp;</td> </tr> <tr> <td><font style='font-family: Tahoma, Geneva, sans-serif;font-size: 12px;color:#3b5963;'>Login :</font></td> <td><input name='adminvalide' type='text' id='adminvalide'></td> </tr> <tr> <td><font style='font-family: Tahoma, Geneva, sans-serif;font-size: 12px;color:#3b5963;'>Mot de passe :</font></td> <td><input name='mpasse1' type='text' id='mpasse1'></td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td><input type='submit' value='Envoyer'></td> </tr> </table> <p>&nbsp; </p> </form></td> <td width='19'>&nbsp;</td> </tr> </table> </body> </html>"; } ?>
×
×
  • Créer...