Un novato responde:
Bueno he estado analizando y hay unos cuantos } que no tienen compañero
es decir estan cerrando algo que no esta abierto
le pondre numero a alos que abren y cierran
eje
if ($x=3)
{//1
echo "nada";
}//1
el uno abierto y cerrado
TE RECOMIENDO SIEMPRE QUE USES {} EN LOS IF Y EN LOS ELSE
EJEMPLO
if ($hora >= 12 )
{
echo "Es PM";
}
else
{
echo "Es Am";
}
asi sabras donde inicia y termina cada cosa
////////////////////////////////////////////////
Código PHP:
<?php
if ($isDisabled)
{ //1
if (($j + ($i % 2)) % 2 == 0)
echo ("class='disabled-dark' bgcolor='#444444'>");
else
echo ("class='disabled-light' bgcolor='#BBBBBB'>");
} //1
else
{ //2
$p = mysql_query("select showHL from players where playerID = '".$_SESSION['playerID']."'");
$row = mysql_fetch_array($p);
$showHLight = $row[0];
if ($showHLight == '1')
{//3
$p = mysql_query("select showHLcolor from players where playerID = '".$_SESSION['playerID']."'");
$row = mysql_fetch_array($p);
$showHLcolor = $row[0];
if (($i == $history[$numMoves]['fromRow'] && $j == $history[$numMoves]['fromCol']) ||
($i == $history[$numMoves]['toRow'] && $j == $history[$numMoves]['toCol']))
$cor = "bgcolor='".$showHLcolor."'";
else
{//4
if (($j + ($i % 2)) % 2 == 0)
$cor = "class='enabled-dark' bgcolor='#955F22'";
else
$cor = "class='enabled-light' bgcolor='#E3C58C'";
} //4
echo ("$cor>");
} //3
else
{//5
if (($j + ($i % 2)) % 2 == 0)
echo ("class='enabled-dark' bgcolor='#955F22'>");
else
echo ("class='enabled-light' bgcolor='#E3C58C'>");
} //5
}//2
//#772222
//#CCBBBB
if (($j + ($i % 2)) % 2 == 0)
echo ("class='enabled-dark' bgcolor='#955F22'>");
else
echo ("class='enabled-light' bgcolor='#E3C58C'>");
// --> } ESTE QUE PONES AQUI NO ESTA CERRANDO A NINGUNO
/* if disabled or not player's turn, can't click pieces */
if (!$isDisabled && $isPlayersTurn)
{ //6
echo ("<a href='javascript:squareClicked($CFG_CONFIRM_MOVE, $i, $j, ");
if ($board[$i][$j] == 0)
echo ("true,\"".$MSG_LANG["youdontplaywith"]."\",\"$MSG_LANG[confirmmove]\")'>");
else
echo ("false,\"".$MSG_LANG["youdontplaywith"]."\",\"$MSG_LANG[confirmmove]\")'>");
} //6
echo ("<img name='pos$i-$j' src='images/pieces/".$_SESSION['pref_theme']."/");
/* if position is empty... */
if ($board[$i][$j] == 0)
{//7
/* draw empty square */
$tmpALT="blank";
}//7
else
{ //8
/* draw correct piece */
if ($board[$i][$j] & BLACK)
$tmpALT = "black_";
else
$tmpALT = "white_";
$tmpALT .= getPieceName($board[$i][$j]);
}//8
echo($tmpALT.".gif' height='".$_SESSION['pref_boardSize']."' width='".$_SESSION['pref_boardSize']."' border='0' alt='".$tmpALT."'>");
299 if (!$isDisabled && $isPlayersTurn)
echo ("</a>");
echo ("</td>\n");
// ERROR---> } ESTE TAMPOCO TIENE A QUIEN CERRAR
echo ("</tr>\n");
//ERROR ---> } ESTE TAMPOCO TIENE A QUIEN CERRAR
echo ("</table>\n\n");
309 // ERROR---> } ESTE TAMPOCO TIENE A QUIEN CERRAR
?>