Forum de discussions pour les webmasters et les web developpeurs. (PHP, SQL, XHTML, JavaScript, Référencement, Positionnement,...)
Vous n'êtes pas identifié.
Bonsoir,
j'ai fait dès efforts concernant la validation xhtml au lieux d'avoir 30 erreurs j'en n'ait plus que 11 mes la je bloque je n'arrive plus !
Voici la page ou il y a 11 xhtml http://www.aqua-annuaire.fr/site-2-web.htm et le lien W3C http://validator.w3.org/check?uri=http% … -2-web.htm !
Voici le code de la page infosite :
<?php
include("bdd_utilisable.php");
include("moteur_utilisable.php");
mysql_connect("$db_server", "$db_user_login", "$db_user_pass") or die("Connexion impossible");
mysql_select_db("$db_name");
$nom_annuaire = $PMA_infos['titre_site'];
// on crée la requete SQL
$id = htmlentities($_GET['id']);
$sql = "SELECT * FROM $T_sites WHERE id=$id";
// on envoie la requête
$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
$row = mysql_fetch_assoc($req);
//on cherchre la catégorie
$sql2 = "SELECT cat_name FROM $T_categories WHERE id=".$row['id_cat']."";
$req2 = mysql_query($sql2) or die('<meta http-equiv="Refresh" content="0;URL=./erreur/404.php">');
$row2 = mysql_fetch_assoc($req2);
$categ = htmlspecialchars($row2['cat_name']);
?>
<?php
//préparation URLs
$site = $row['url'];
$site2 = eregi_replace("http://","",$site);
$site3 = eregi_replace("www.","",$site2);
$url_rss = $row['url_rss'];
// titrage aléatoire
$nbtitres=3;
$title[1]=$row['titre'];
$title[2]=$row['titre2'];
$title[3]=$row['titre3'];
srand((double)microtime()*32000);
$titre_aleatoire=rand(1,$nbtitres);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<title>Infos sur <?php if (($row['titre2']) && ($row['titre3']) != '') { echo $title[$titre_aleatoire]; } else { echo $row['titre']; } ?>. Catégorie <?php echo $categ; ?></title>
<meta http-equiv="content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Fiche du site: <?php echo $row['description']; ?>" />
<link type="text/css" href="utilisable.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="style_fr.css"/>
<link rel="shortcut icon" type="image/x-icon" href="favicon.Ico" />
<link rel="alternate" type="application/rss+xml" title="rss" href="http://www.aqua-annuaire.fr/nouveaux.php?output=rss" />
<script type="text/javascript" src="js_utilisable.js"></script>
<script src="http://maps.google.com/maps?file=api&v=2&key=<?php echo $key ?>" type="text/javascript"></script>
<script src="http://www.aqua-annuaire.fr/gmap.js?file=api&v=2&key=<?php echo $key ?>" type="text/javascript"></script>
</head>
<body onunload="GUnload()">
<div id="pub">
<script type="text/javascript" src="http://imp.tradedoubler.com/imp?type(js)pool(268026)a(1515822)" charset="ISO-8859-1"></script>
<div id="ombre"></div>
</div>
<div id="header">
<a href="/"><img src="images/header.jpg" alt="Annuaire généraliste francophone" title="Annuaire généraliste francophone" /></a>
</div>
<div class="menu_h">
<div class="menu_h2">
<?php include "menu_haut.php"; ?>
</div>
</div>
<div id="centre">
<?php
//affichage du formulaire pour le moteur de recherche
$mots = isset($_REQUEST['mots']) ? $_REQUEST['mots'] : '';
if (ereg ("(www\.)?[a-z0-9]{1,1}[._a-z0-9-]*[a-z0-9]{1,1}\.[a-z]{2,4}$", $mots, $regs)) {
$mots = eregi_replace("http://","",$mots);
$mots = eregi_replace("www.","",$mots);
$mots = eregi_replace("\.[a-z]{2,4}","",$mots);
$mots=trim($mots);
} else {
$mots=trim($mots);
}
if (empty($mots))
{
$value = "";
$erase = " onfocus=\"if (!erased_annuaire)this.value = ''; erased_annuaire = true;\"";
}
else
{
$value = stripslashes(htmlspecialchars($mots));
$erase = "";
}
//formulaire pour afficher le moteur de recherche interne a Annuaire Utilisable
?>
<form id="form" action="recherche.php" method="post">
<div>
<input type="hidden" name="action" value="seek" />
<input type="hidden" name="nb_results2show" value="10" />
<input type="hidden" name="booleen" value="AND" />
<input type="text" name="mots" size="30" maxlength="100" value="<?php echo $value; ?>"<?php echo $erase; ?> style="padding-top:0px; padding-left:20px; background-image: url('images/loupe.jpg'); background-repeat: no-repeat;" />
<input type="submit" value="Rechercher" class="button_make_search_annuaire" />
</div>
</form>
<div style="clear:right;"></div>
<div id="ligne"></div>
<table style="width:100%;margin:0;">
<!-- CENTRE -->
<tr>
<td class="arbo_annuaire" style="text-align:left;">
<div style="display:inline;float:left;text-align:right;padding:0px;padding-right:10px;margin:0px;margin-top:2px;">
<img <?php
if($key && $row['adresse_proprio'] != '' && $row['ville_proprio'] != '' && $row['pays_proprio'] != ''){
echo "onload=\"javascript:display_gmap('".str_replace("'","\'",$row['adresse_proprio']).",".str_replace("'","\'",$row['ville_proprio']).",".$row['pays_proprio']."','carte')\"";
}
?> src="<?php if ($row['url_image']) {echo $row['url_image']; } else {echo "images/image_sites.gif";} ?>" width="120" height="90" alt="<?php echo $row['titre']; ?>" />
</div>
<em><strong>Titre du site </strong></em>: <a href="<?php echo $row['url']; ?>" onclick="window.open(this.href); return false;"><?php if (($row['titre2']) && ($row['titre3']) != '') { echo $title[$titre_aleatoire]; } else { echo $row['titre']; } ?></a><br />
<em><strong>URL</strong></em> : <a href="<?php echo $row['url']; ?>" onclick="window.open(this.href); return false;"><?php echo $row['url']; ?></a><br />
<?php //Mise en format france de la date
$tab_date=explode("-",$row['date_validation']);
$date_francaise=$tab_date[2]."/".$tab_date[1]."/".$tab_date[0];
?>
<em><strong>Ajouté le</strong></em> : <?php echo $date_francaise; ?><br />
<em><strong>Dans la catégorie </strong></em> : <a href="<?php echo $row['id_cat'].'-'.$categ; ?>.html" title="<?php echo $categ; ?>"><?php echo $categ; ?></a><br />
<em><strong>Description du site</strong></em> :<br /> <?php echo $row['description']; ?>
<br /><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top">
<?php
if($key && $row['adresse_proprio'] != '' && $row['ville_proprio'] != '' && $row['pays_proprio'] != ''){
?>
<strong>Carte et plan: <?php echo $row['titre']; ?></strong>
<div id="carte" style="width:390px;height:300px;"></div>
<?php
}
else{
echo "<div id=\"annonce_parrainage_list_annuaire\">
<script type=\"text/javascript\"><!--
google_ad_client = \"pub-4569128370061072\";
/* 120x240, créé le 14/06/08 */
google_ad_slot = \"2134348264\";
google_ad_width = 120;
google_ad_height = 240;
google_cpa_choice = \"\"; // on file
//-->
</script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
</script>
</div>
<div id=\"annonce_carre1_list_annuaire\">
<script type=\"text/javascript\"><!--
google_ad_client =\"pub-4569128370061072\";
/* 300x250, date de création 14/06/08 */
google_ad_slot =\"5258874514\";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
</script>
</div>";
}
?>
</td>
</tr>
</table>
<br />
<em><strong>Flux RSS et dernières News</strong></em> :<br />
<div class="three">
<?php
if ($url_rss == True)
{
$nombre_limite = 10;
require_once($_SERVER['DOCUMENT_ROOT'].'/feedparser.php');
echo FeedParser($row['url_rss'],$nombre_limite,80);
}else{
echo "<ul>Ce site ne propose aucun flux RSS </ul>";
}
?></div>
<br />
<strong><em>Référencement et popularité </em></strong> :
<div class="three">
<ul>
<li>Google : <?php echo $blG; ?> > <a href="http://www.google.fr/search?hl=fr&q=link%3A<?php echo $site; ?>&btnG=Recherche+Google&meta=" onclick="window.open(this.href); return false;">Pages liées</a> | <a href="http://www.google.fr/search?hl=fr&newwindow=1&q=info%3A<?php echo $site; ?>&meta=" onclick="window.open(this.href); return false;">Infos Google</a> | <a href="http://www.google.com/search?sourceid=navclient&q=cache:<?php echo $site; ?>" onclick="window.open(this.href); return false;">Cache Google</a> | <a href="http://www.google.com/search?hl=fr&newwindow=1&q=site%3A<?php echo $site; ?>&meta=" onclick="window.open(this.href); return false;">Pages indexées</a> </li>
<li>MSN : <?php echo $blM; ?> > <a href="http://search.msn.fr/results.aspx?q=link%3A<?php echo $site; ?>&FORM=QBHL" onclick="window.open(this.href); return false;">Pages liées</a> | <a href="http://search.msn.fr/results.aspx?q=site%3A<?php echo $site; ?>&FORM=QBRE" onclick="window.open(this.href); return false;">Pages indexées</a></li>
<li>Yahoo : <?php echo $blY; ?> > <a href="http://search.yahoo.com/search?p=link%3Ahttp%3A%2F%2F<?php echo $site2; ?>&ei=UTF-8&fr=sfp&n=20&fl=0&x=wrt" onclick="window.open(this.href); return false;">Pages liées</a> | <a href="http://search.yahoo.com/search?p=site%3A<?php echo $site2; ?>&ei=UTF-8&fr=sfp&n=20&fl=0&x=wrt" onclick="window.open(this.href); return false;">Pages indexées</a></li>
</li>
</ul>
</div>
</td></tr></table>
<?php
// on ferme la connexion à mysql
//mysql_close($req);
?>
</div>
<!-- FOOTER -->
<!-- publicite-->
<div id="pied">
<?php include "adsense.php"; ?>
</div>
<!-- Partenaires -->
<div id="partenaires">
<?php include "partenaires.php"; ?>
</div>
<div class="menu_h">
<div class="menu_h2">
<?php include "footer.php"; ?>
</div>
<br />
<div style="text-align:center;">previews url by <a href='http://www.surfinvest.com'>Référencement Surfinvest</a></div>
<br />
<!-- STATS GOOGLE ANALYTICS -->
<?php
if ($key_analytics && ($page_courante != 'infosite.php' || ($page_courante == 'infosite.php' && !$row['ville_proprio'] && !$row['pays_proprio'])))
{
?>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? " https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("<?php echo $key_analytics ?>");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<?php
}
?>
<!-- Fin du Footer --></div>
</body>
</html>Cordialement,
romain
Hors ligne
Je ne vois pas de target dans la page !
Cordialement,
romain
Hors ligne
Les target proviennent des scripts de Zone-Webmasters.net (Flux RSS et dernières News
. Donc au niveau du rendu ![]()
Tu as le choix, soit tu fais un script qui va supprimer les target soit tu demandes à Crocxx de le faire ![]()
Hors ligne
exacte il restai les target dans la page rss que j'ai pu modifier maintenant il me reste plus que 9 erreur !
Cordialement,
romain
Hors ligne
C'est ce que j'ai fait et mes il me reste 9 erreur voici le lien w3c http://validator.w3.org/check?uri=http% … -2-web.htm !
Cordialement,
romain
Hors ligne
Merci beaucoup Crocxx, maintenant il me reste 1 seul erreur souligne en rouge
1 - Error Line 52, Column 13: there is no attribute "onload".<img onload="javascript:display_gmap('Lebon,Paris,France','carte')" src="images
P.S: Via cette page : http://www.aqua-annuaire.fr/site-64-web.htm
2 - Et aussi une autre erreur trouvez : (erreur soulignez en rouge)
Line 94, Column 6: character data is not allowed here.
<ul>Ce site ne propose aucun flux RSS </ul></div>
Line 94, Column 44: end tag for "ul" which is not finished.
<ul>Ce site ne propose aucun flux RSS </ul></div>
Cordialement,
romain
Dernière modification par romain35 (05-07-2008 00:25:23)
Hors ligne
Bonjour,
je n'ait toujours pas réussi à régler le problème pour les dernières erreurs qu'il reste !
Cordialement,
romain
Hors ligne
Dans des <ul> tu doit normalement avoir des <li>
Pour le onLoad je ne sait pas trop mais tu peu utiliser la syntaxe window.onload = function() pour ne pas avoir de onLoad dans ta balise.
Hors ligne
Bonsoir,
j'ai fait ce code mes cela ne fonctionne pas peut être est je fait une erreur !
<?php
if($key && $row['adresse_proprio'] != '' && $row['ville_proprio'] != '' && $row['pays_proprio'] != ''){
echo "window.onload = function(javascript:display_gmap)('".str_replace("'","\'",$row['adresse_proprio']).",".str_replace("'","\'",$row['ville_proprio']).",".$row['pays_proprio']."','carte')\"";
}
?>Cordialement,
romain
Hors ligne
window.onload ne s'utilise pas comme onLoad il faut que tu fasse un script à part et tu met un truc comme ça:
<script type="text/javascript">
<!--
window.onload = function()
{
display_gmap('Lebon,Paris,France','carte');
}
->
</script>Hors ligne