Parse error:syntax error,unexpected T_VARIABLE,expecting ',' or ';'

Résolu/Fermé
xred123 - 21 sept. 2019 à 05:49
 xred123 - 21 sept. 2019 à 07:55
Bonjour,

Je ne m'y connais pas beaucoup en informatique mais pourriez-vous m'aider?j'essaie de mettre des variables pour un lien.J'ai bien essayé de mettre un script ligne 236 de struct_blog.php mais ça m'indique l'erreur Parse error:syntax error,unexpected,T_VARIABLE expecting ',' or ';' in C:\program files etc...C'est certainement facile mais je ne connais pas les variables.


<?php /*
Blogator-script | http://www.blogator-script.com | ***@***
Copyright 2005, 2006 Samuel TOLLEC pour SAMTEK



This file is part of Blogator-script.

Blogator-script is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Blogator-script is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Blogator-script; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */

include('compt_visit.php');
if (isset($_POST['id_sond'])) {
include('compt_votes.php');
}
include("recup_param.php");
$sql_membre=mysql_query("SELECT id_membre, pseudo, date_naiss, genre_mb, pays, dept, url_photo, tri, theme
FROM membre M JOIN blog B ON M.id_membre = B.id_m WHERE id_blog = $id_blog");
$membre = mysql_fetch_array($sql_membre);
$id_membre=$membre[0];
$pseudo=$membre[1];
include('traite_ch.php');
$pseudo_ph=replace($pseudo);
$date_naiss=$membre[2];
$genre_mb=$membre[3];
$pays=$membre[4];
$dept0=$membre[5];
$sql_blog=mysql_query("SELECT nom_blog, description, date_crea, date_maj, is_adult, id_son 
FROM blog WHERE id_blog = $id_blog");
$blog = mysql_fetch_array($sql_blog);
$nom_blog=$blog[0];
$nom_blogM=strtoupper($nom_blog);
$description=$blog[1];
$desc_titr=substr($description, 0, 100);
$date_crea=$blog[2];
$date_crea=format_date($date_crea);
$date_maj=$blog[3];
$date_maj=format_date($date_maj);
$adulte=$blog[4];
$id_son=$blog[5];
$sql_count_a=mysql_query("SELECT COUNT(*) FROM article WHERE id_blogE = $id_blog");
$sql_all_blog=mysql_query("SELECT nom_blog FROM blog WHERE id_m = $id_membre AND nom_blog NOT LIKE '$nom_blog' ORDER BY nom_blog");
$nb_blg = mysql_num_rows($sql_all_blog);
$sql_count_r=mysql_query("SELECT COUNT(*) FROM commentaire, article WHERE id_blogE = $id_blog AND commentaire.id_artE = article.id_art");
$sql_liens=mysql_query("SELECT blog_lien FROM liens WHERE id_blogE = $id_blog ORDER BY rang");
mysql_close($connect);
list($annee, $mois, $jour) = explode('-', $date_naiss);
$today['mois'] = date('n');
$today['jour'] = date('j');
$today['annee'] = date('Y');
$annees = $today['annee'] - $annee;
if ($today['mois'] <= $mois) {
  if ($mois == $today['mois']) {
    if ($jour > $today['jour']) {
    $annees--;
    }
  } else {
  $annees--;
  }
}
$adr_urlM = strtoupper($adr_url);	
$nom_scriptM = strtoupper($nom_script);
function format_date($date) {
list($annee,$mois,$reste) = explode('-',$date);
list($jour,$heure) = explode(' ',$reste);
$date = "$jour/$mois/$annee à $heure";
return $date; 
} 

if ($dept0 != '') {
$dept = "<br /><img src=\"$adr_url/_blogadata/graph/menuarrow.gif\" border=\"0\" width=\"8\" height=\"9\"> département $dept0";
} else {
$dept='';
}
$url_photo0=$membre[6];
if ($url_photo0 != '') {
$size=GetImageSize("$adr_abs/_blogadata/photo_membre/$pseudo_ph-$id_membre.jpg");
$w = $size[0] + 30; $h = $size[1] + 30;
$url_photo = "<a href=\"javascript: openwindow_ph('$adr_url/_blogadata/include/cadre_ph_mb.php?adr=$adr_url&photo=$pseudo_ph-$id_membre.jpg',$w,$h)\">$url_photo0<br />Cliquez pour agrandir</a>";
} else {
$url_photo="<img src=\"$adr_url/_blogadata/graph/no_ph.gif\" border=\"0\">";
}
switch ($genre_mb) {
case 'homme': $gif = 'garcon1.gif'; break;
case 'femme': $gif = 'fille1.gif'; break;
case 'groupe': $gif = 'groupe1.gif'; break;
}
$gif_alt = ucfirst($genre_mb);
$img_mb = "<img src=\"$adr_url/_blogadata/graph/$gif\" border=\"0\" width=\"32\" height=\"32\" title=\"$gif_alt\">";
$tri=$membre[7];
$theme=$membre[8];
//
if ($nb_blg == 0) {
$blogs_url = "$pseudo n'a pas d'autres blogs";
} else {
$a=0;
$blogs_url="Ses autres blogs :<br />";
  while ($all_blog = mysql_fetch_array($sql_all_blog)) {
  $a++;
    if ($adr_abs_sd == '') {
  	$blogs="$adr_url/".$all_blog[0];
  	} else {
  	$blogs="http://".$all_blog[0].".$adr_urlS";
  	}
    if ($a < $nb_blg) {
    $sep = " <b style=\"font-size: 15px\">|</b> ";
	} else {
	$sep = "";
	}
  $blogs_url .= "\n<a href=\"$blogs\" target=\"_blank\">".$all_blog[0]."</a>$sep";
  }
}
//
$count_a=mysql_result($sql_count_a, 0);
if ($count_a > 1) {
$art=" articles";
} else {
$art=" article";
}
//
$count_r=mysql_result($sql_count_r, 0);
if ($count_r > 1) {
$rq=" remarques";
} else {
$rq=" remarque";
} 
$nb_pages = ceil($count_a / $nb_art_p);
if ($nb_pages > 1) {
$pg=" pages";
} else {
$pg=" page";
}
//
if ($adr_abs_sd == '') {
$adr_blog = "$adr_url/$nom_blog";
} else {
$adr_blog = "http://$nom_blog.$adr_urlS";
$adr_blog2 = "$adr_url_sd/$nom_blog";
$adr_blog2=wordwrap($adr_blog2,60,"<br />",1);
} 
$adr_blog=wordwrap($adr_blog,60,"<br />",1); ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php echo "<title>$nom_blogM sur $nom_scriptM : Le blog venu du futur - $desc_titr</title>
<meta name=\"description\" content=\"$description\" />
<meta name=\"keywords\" content=\"$nom_blog, Blogator-script, Blogator, blog, blogs, weblog, weblogs, multimedia, blog gratuit\" />";
if ($theme != 0) {  
print "\n<link rel=\"stylesheet\" href=\"$adr_url/_blogadata/css/theme$theme.css\" type=\"text/css\" media=\"all\" />";
} else {
include("connect.php");
include("theme_perso.php");
mysql_close($connect);
}  
switch($theme) {
case 0: $hr_color="#$bordure"; $des_c="#$fd_principal"; $font_c=$fd_principal; $font2_c=$fd_tableau; $txt_c=$tableau; $url_c=$liens; break;
case 1: $hr_color='#C0C0C0'; $des_c='#F8F8F8'; $font_c='F5F5F5'; $font2_c='FFFAFA'; $txt_c='696969'; $url_c='FF0000'; break;
case 2: $hr_color='#00FF7F'; $des_c='#020202'; $font_c='000000'; $font2_c='696969'; $txt_c='98FB98'; $url_c='00BFFF'; break;
case 3: $hr_color='#D7D7D7'; $des_c='#BAFDFD'; $font_c='BCFFFF'; $font2_c='EAFFFF'; $txt_c='000000'; $url_c='9900CC'; break;
case 4: $hr_color='#FF1495'; $des_c='#DEFDFD'; $font_c='E0FFFF'; $font2_c='FFFFFF'; $txt_c='000000'; $url_c='FF7F50'; break;
case 5: $hr_color='#FF1495'; $des_c='#FDFD97'; $font_c='FFFF99'; $font2_c='FFFFCC'; $txt_c='000000'; $url_c='993399'; break;
case 6: $hr_color='#000000'; $des_c='#F2000C'; $font_c='F0000A'; $font2_c='D3D3D3'; $txt_c='000000'; $url_c='000000'; break;
case 7: $hr_color='#000000'; $des_c='#0067CE'; $font_c='0066CC'; $font2_c='003366'; $txt_c='C782FF'; $url_c='FFFF00'; break;
}
echo "<script language=\"JavaScript1.2\">"; 
if ($adulte == 1 && !isset($_GET['page'])) {
echo "\nchoix=confirm(\"****** ATTENTION AVERTISSEMENT ! VOUS ENTREZ SUR UN BLOG POUR ADULTES ******\\nSi vous êtes majeur dans votre pays (+ de 18 ans en France) et averti du caractère érotique voire pornographique de ce site cliquez sur [OK], sinon cliquez sur [Annuler].\\nParents, il est de votre devoir de protéger vos enfants en les surveillant et en installant un filtrage parental.\\n\\n****** CAUTION WARNING ! YOU ENTER IN AN ADULT BLOG ******\\nIf you're of age in your country and informed of the erotic indeed pornographic content of this site click [OK], otherwise click [Cancel].\\nParents you must protect yours children by watching them and installing web filters.\");
if (choix==false) {
document.location=\"$adr_url\";
}";
} ?>
function openwindow(url)
{
  window.open(url, '', 'width=600,height=400,scrollbars=yes,resizable=yes');
}
function openwindow_ph(url,w,h)
{
  window.open(url, '', 'width='+w+',height='+h+',scrollbars=yes,resizable=yes');
}
function sond(msg) {
var choix = confirm(msg); 
  if (choix) {
  return true;
  } else {
  return false; 
  }
}
</script>
</head>
<body marginwidth="10" marginheight="10" topmargin="10" bottommargin="10" leftmargin="10" rightmargin="10">
<table border="0" width="100%" height="100%" bgcolor="white" cellpadding="0" cellspacing="0">
	<tr valign="top">
<!-- colonne gauche -->
		<td width="35%" rowspan="2">
<table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0" class="panel">
      	<tr valign="top">
      		<td width="13" height="13"><img src="<?php echo $adr_url; ?>/_blogadata/graph/corner-hg.gif" border="0" width="13" height="13" /></td>
      		<td></td>
      		<td width="13" height="13"></td>
      	</tr>
      	<tr>
      		<td width="13" height="13"></td>
			<td valign="top" align="center">
<!-- contenu colonne gauche -->
<h3><a href="<?php echo $adr_url; ?>/inscription_blog.php" title="Créer un compte en moins d'une minute..." target="_blank">Je crée mon <?php echo $nom_script; ?> gratuit !</a></h3>
<table border="0" width="215" cellspacing="0" bgcolor="white" style="border: #FFFFFF 1px solid; -moz-border-radius: 5px">
	<tr align="center">
		<td><span class="lib_noir"><?php echo "<a href=\"$adr_url\" title=\"Cliquez pour revenir à l'accueil $nom_script ou pour créer un compte !\">"; ?><img src="<?php echo $adr_url; ?>/_blogadata/graph/logo.png" border="0" width="215" height="70" alt="<?php echo $adr_urlM; ?>" /></a><br />
 Le blog venu du </span><span class="lib_rouge">futur </span></td>
	</tr>
</table>
<br /><p style="font-family: Verdana; font-weight: bold; font-size: 10px">
<?php echo $adr_blog; 
if (isset($adr_blog2)) { 
echo "<br />$adr_blog2";
} 
echo "</p>";
if ($id_son != NULL) { ?>
<br /><table border="0" class="desc" width="100%">
  	<tr align="center" class="tab_titr">
		<td colspan="2">AUDIO BLOG</td>
  	</tr>
  	<tr align="center">
  		<td colspan="2" style="font-size: 9px">
		<a href="<?php echo $adr_url/_blogadata/multimedia/s$id_son-nom_blog ?>.mp3">cliquez sur ce lien pour ecouter de la musique</a> 
		</td>
  	</tr>
</table>
<?php } ?>
<br /><table border="0" class="desc" width="100%">
  	<tr align="center" class="tab_titr">
		<td colspan="2">INFOS BLOG</td>
  	</tr>
	<tr align="center">
		<td colspan="2">
<?php $file_check="./photo_blog.jpg";
if (file_exists($file_check)) {
echo "<img src=\"photo_blog.jpg\" border=\"0\" alt=\"$nom_blog\">";
} else {
echo "<img src=\"$adr_url/_blogadata/graph/no_illus.gif\" border=\"0\" alt=\"$nom_blog\">";
} ?>
  	 	</td>
  	</tr>
	<tr>
  		<td colspan="2" class="titr2">Message du créateur :</td>
  	</tr>
  	<tr>
  		<td colspan="2"><pre><?php $desc=wordwrap($description,40,"\n",1); echo $desc; ?></pre><br /></td>
  	</tr>
</table>
<br /><table border="0" class="desc" width="100%">
  	<tr align="center" class="tab_titr">
		<td colspan="2">STATS BLOG</td>
  	</tr>
  	<tr>
  		<td align="right" width="45%">Lancé le </td>
  		<td width="55%"><?php echo $date_crea; ?></td>
  	</tr>
  	<tr>
  		<td align="right">Modifié le</td>
  		<td><?php echo $date_maj; ?></td>
  	</tr>
  	<tr>
  		<td align="right"><?php echo $nb_pages; ?></td>
  		<td><?php echo $pg; ?></td>
  	</tr>
  	<tr>
  		<td align="right"><?php echo $count_a; ?></td>
  		<td><?php echo $art; ?></td>
  	</tr>
  	<tr>
  		<td align="right"><?php echo $count_r; ?></td>
  		<td><?php echo $rq; ?></td>
  	</tr>
</table>
<br /><table border="0" class="desc" width="100%">
  	<tr align="center" class="tab_titr">
		<td>RECOMMANDER BLOG</td>
  	</tr>
  	<tr align="center">
  		<td><br /><form><input type="button" value="Faire connaître par e-mail" name="mail_mod" class="bouton1" style= "width: 200px" onmouseover="this.style.color='red'" onmouseout="this.style.color='#696969'" onclick="window.open(<?php print "'$adr_url/_blogadata/include/mail_mod.php?nom_blog=$nom_blog&theme=$theme&id_blg=$id_blog'"; ?>, 'Recommander', 'width=640,height=480,scrollbars=yes,resizable=yes');" /></form></td>
  	</tr>
</table>
<br /><table border="0" class="desc" width="100%">
  	<tr align="center" class="tab_titr">
		<td>LIENS BLOG</td>
  	</tr>
  	<tr>
  		<td><table border="0" align="center">
<?php $vide = TRUE; 
while ($liens=mysql_fetch_array($sql_liens)) {
$vide = FALSE;
  if ($adr_abs_sd == '') {
  $blog_lien="$adr_url/".$liens[0];
  } else {
  $blog_lien="http://".$liens[0].".$adr_urlS";
  }
$lien="<a href=\"$blog_lien\" target=\"_blank\">".$liens[0]."</a>";
echo "\t<tr>
\t\t<td>$lien</td>
\t</tr>\n";
} 
if ($vide == TRUE) {
echo "\t<tr class=\"blogaliens\">
\t\t<td>Pas encore de blogaliens</td>
\t</tr>\n";
} ?>
        </table></td>
  	</tr>
</table>
<!-- fin contenu colonne gauche -->
			</td>
			<td width="13" height="13"></td>
      	</tr>
      	<tr valign="bottom">
      		<td width="13" height="13"><img src="<?php echo $adr_url; ?>/_blogadata/graph/corner-bg.gif" border="0" width="13" height="13" /></td>
      		<td>
<table border="0" align="right" class="panel" cellpadding="5">
	<tr>
		<td align="right" valign="bottom">Weblogs par Blogator-script<br /><a href="http://www.blogator-script.com" title="Le blog venu du futur" target="_blank">www.blogator-script.com</a>
		<br />© 2006 <a href="http://www.samtek.fr" target="_blank">SAMTEK</a> - <a href="http://www.blogator.net" target="_blank">Blogator</a></td>	
	</tr>
</table>			
			</td>
      		<td width="13" height="13"></td>
      	</tr>
</table>		
		</td>
<!-- fin colonne gauche -->
<!-- haut gauche -->		
		<td width="32%" height="200">
<table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0" class="panel" style="border-left: white 1px solid">
      	<tr valign="top">
      		<td width="13" height="13"></td>
      		<td></td>
      		<td width="13" height="13"></td>
      	</tr>
      	<tr>
      		<td width="13" height="13"></td>
			<td><?php echo $nom_scriptM; if ($theme != 0 && $theme != 2 && $theme != 6 && $theme != 7) { 
			echo " <img src=\"$adr_url/_blogadata/graph/cercle.gif\" border=\"0\" width=\"18\" height=\"18\" align=\"baseline\">";
			} ?> 
			Connexion avec <?php echo "$pseudo $img_mb établie
			<hr noshade color=\"$hr_color\" />$blogs_url"; ?></td>
			<td width="13" height="13"></td>
      	</tr>
      	<tr valign="bottom">
      		<td width="13" height="13"></td>
      		<td></td>
      		<td width="13" height="13"></td>
      	</tr>
</table>		
		</td>
<!-- fin haut gauche -->
<!-- haut droit -->			
		<td width="33%" height="200">
<table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0" class="panel" style="border-left: white 1px solid">
      	<tr valign="top">
      		<td width="13" height="13"></td>
      		<td></td>
      		<td width="13" height="13"><img src="<?php echo $adr_url; ?>/_blogadata/graph/corner-hd.gif" border="0" width="13" height="13" /></td>
      	</tr>
      	<tr>
      		<td width="13" height="13">
			<td><table border="0" class="panel">
       	<tr align="center">
       		<td rowspan="2"><?php echo "$url_photo"; ?></td>
			<td class="titr2">Infos sur <?php echo $pseudo; ?> :</td>
       	</tr>
       	<tr>
       		<td valign="top"><img src="<?php echo $adr_url; ?>/_blogadata/graph/menuarrow.gif" border="0" width="8" height="9" /> <?php echo $genre_mb; 
			if ($genre_mb != 'groupe') {
			print "<br /><img src=\"$adr_url/_blogadata/graph/menuarrow.gif\" border=\"0\" width=\"8\" height=\"9\"> $annees ans";
			} ?><br /><img src="<?php echo $adr_url; ?>/_blogadata/graph/menuarrow.gif" border="0" width="8" height="9" /> <?php echo "$pays$dept"; ?></td>
       	</tr>
       </table>
			</td>
			<td width="13" height="13"></td>
      	</tr>
      	<tr valign="bottom">
      		<td width="13" height="13"></td>
      		<td></td>
      		<td width="13" height="13"></td>
      	</tr>
</table>
		</td>
<!-- fin haut droit -->
	</tr>
	<tr valign="top">
<!-- colonne principale -->
		<td colspan="2">
<table border="0" width="100%" height="1000" cellpadding="0" cellspacing="0" class="blog">
      	<tr valign="top">
      		<td width="13" height="13"></td>
      		<td></td>
      		<td width="13" height="13"></td>
      	</tr>
      	<tr>
      		<td width="13" height="13"></td>
			<td align="center" valign="top">
<?php include('articles.php'); ?>
			</td>
			<td width="13" height="13"></td>
      	</tr>
      	<tr valign="bottom">
      		<td width="13" height="13"></td>
      		<td></td>
      		<td width="13" height="13"><img src="<?php echo $adr_url; ?>/_blogadata/graph/corner-bd.gif" border="0" width="13" height="13" /></td>
      	</tr>
</table>
		</td>
<!-- fin colonne principale -->
	</tr>
</table>
</body>
</html>



Configuration: Windows / Chrome 76.0.3809.132

3 réponses

jordane45 Messages postés 38326 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 2 décembre 2024 4 712
21 sept. 2019 à 06:34
Bonjour
Dans le message d'erreur est indiqué un numéro de ligne il faut que tu regardes à cette ligne là ou éventuellement une ligne au-dessus voir s'il ne manque pas des quotes ou un point virgule...,

tu peux également nous coller la ligne concernée dans la discussion plutôt que de nous coller le script complet qui est imbuvable...
0