In parole povere il codice è questo:
Codice PHP:
<html>
<head>
<meta http-equiv="Content-Language" content="it">
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" bgcolor="#eeeeee">
<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="109">
<?php
$myoutput = "";
$INFO = array();
//require_once ROOT_PATH . "sources/ipsclass.php";
//require ROOT_PATH . "conf_global.php";
require "conf_global.php";
require ROOT_PATH."/sources/lib/func_ligaa.php";
$func = new func_ligaa ();
$myipsclass = new ipsclass();
$myipsclass->vars = $INFO;
$myipsclass->init_db_connection();
$cancelletto="#";
$IPBHTML = "";
$ROWCAL = "";
$myipsclass->DB->query("Select * From ibf_ligaa_calendario where data !='01/01/1900' order by idcomp");
while ($riga = $myipsclass->DB->fetch_row()){
$arr_giornata = split ('[/.-]', $riga['data']);
$giornata = strtotime($arr_giornata[2]."/".$arr_giornata[1]."/".$arr_giornata[0]);
$now = strtotime("now");
if ($now <= $giornata){
$arr_idsqd1 = $func->getinfoclan($riga['idsqd1']);
$arr_idsqd2 = $func->getinfoclan($riga['idsqd2']);
$sqd1 = $arr_idsqd1['TAG'];
$sqd2 = $arr_idsqd2['TAG'];
$ngiornata = $riga['giornata'];
$arrmappa = $func->get_dati_mappa($riga['idmappa']);
$mappa = $arrmappa['nome'];
$data = $riga['data'];
$serie = $riga['idcomp'];
$ROWCAL .= <<<EOF
<tr>
<td width=2% align=left>$serie</td>
<td width=25% align=center>[b]$sqd1[/b]</td>
<td width=2%>vs</td>
<td width=25% align=center>[b]$sqd2[/b]</td>
</tr>
EOF;
}
}
$IPBHTML .= <<<EOF
<td width=23%>
<table border=0 width=100% class="ipbtable" cellspacing="1" cellpadding="1">
<tr><td colspan=2>[b]Giornata n° $ngiornata[/b]</td><td colspan=10 align=right>[b]$mappa[/b]</td></tr>
<tr><th colspan=4 align=left>$data</th></tr>
EOF;
$IPBHTML .= $ROWCAL;
$IPBHTML .= <<<EOF
</table></td>
EOF;
echo $IPBHTML;
?>
</td>
</tr>
<tr>
</tr>
</table>
</body>
</html>
Noterete $serie = $riga['idcomp']; che viene visualizzato come numero 14 o 15 nel portale http://www.ligaa.org nel blocco di sinistra clanwar della settimana, siccome si tratta di due campionati separati vorrei fare in modo tale che appaia al posto di 14 la lettera A e al posto di 15 la lettera B, ho provato così ma non funziona
Codice PHP:
<tr>
<td width=2%>
<?php
if ( $serie = 14 ){
echo "[b]<font color=green>A</font>[/b]";
}else if ( $serie = 15 ){
echo "[b]<font color=brown>B</font>[/b]";
}
?>
</td>
<td width=25% align=center>[b]$sqd1[/b]</td>
<td width=2%>vs</td>
<td width=25% align=center>[b]$sqd2[/b]</td>
<td width=2%></td>
</tr>
Come devo fare? :master: