Mi restituisce un pop up completamente bianco.
Codice pagina news:
Codice PHP:
<?PHP
$query_tot= mysql_query("SELECT * FROM News_Home");
$i=-1;
while(list($ID, $Titolo, $Testo, $Giorno, $Immagine) = mysql_fetch_row($query_tot)){
$Vett_ID[]=$ID;
$i++;
}
//se non punto ad una news specifica
if (!isset($IDN)){
//se è la prima volta che visualizzo l'archivio punto all'ultima
if (isset($count)){
//controllo se sono andato avanti o indietro
if($T==Succ){
$count++; //successivo, quindi avanti, quindi +1
}elseif($T==Prec){
$count--; //precendente, quindi indietro, quindi -1
}else{
$count=$i;
session_register('count');
}
} else {
$count=$i;
session_register('count');
}
$query= mysql_query("SELECT * FROM News_Home WHERE ID='$Vett_ID[$count]'");
}else{
$query= mysql_query("SELECT * FROM News_Home WHERE ID='$IDN'");
}
list($ID, $Titolo, $Testo, $Giorno, $Immagine) = mysql_fetch_row($query);
?>
<tr>
<td width="180" height="16" align="center" valign="top" class="Sottotitolo01_nero">[img]../interfaccia/spacer.gif[/img]<? print $Titolo ?></td>
</tr>
<tr>
<td height="110" valign="top" bgcolor="#000000">[img]<? print $Immagine ?>[/img]</td>
</tr>
<tr>
<td height="5" valign="top">[img]../interfaccia/spacer.gif[/img]</td>
</tr>
<tr>
<td height="25" align="center" valign="middle" class="Didascalia01_norm_nero"><?
function tagliaStringa($stringa) {
# CONFIGURAZIONE
# imposto il numero massimo di caratteri da visualizzare
# esclusi i (...) finali
$maxCaratteri = 45;
# SCRIPT
# salvo il numero di caratteri della stringa passata
$caratteri = strlen($stringa);
# controllo se $caratteri è maggiore di $maxCaratteri
if($caratteri > $maxCaratteri) {
return substr($stringa, 0, $maxCaratteri).'[url="#"]..(Leggi Tutto)[/url]';
} else {
return $stringa.'[url="#"]..(Leggi Tutto)[/url]';
}
}
$risultato = tagliaStringa($Testo);
echo "$risultato"; ?>
Codice pop up:
Codice PHP:
<?
session_start();
// Restrizione d'accesso
header("Expires: Sat, 11 Sep 1976 08:00:00 GMT"); // Date in the past
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); // always modified
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Pragma: no-cache"); // HTTP/1.0
include "vars.php";
$sqlconn= mysql_connect($dbhost,$dbutente,$dbpass);
mysql_select_db ($database, $sqlconn);
$res = mysql_query("SELECT * FROM News_Home") or die (mysql_error());
$ID = $_GET['ID'];
$res = mysql_query("SELECT * FROM News_Home WHERE ID='$ID'") or die (mysql_error());
while ($elenco = mysql_fetch_array($res)) {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Evento Odierno</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.Stile1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
}
body {
background-color: #FFdd02;
}
-->
</style>
<link href="txtstyle.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="5" topmargin="0" marginwidth="0" marginheight="0">
<table width="400" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="180" rowspan="3" valign="top">[img]<? echo $elenco['Immagine']; ?>[/img]</td>
<td width="6" height="19" valign="top" bgcolor="#000000">[img]interfaccia/spacer.gif[/img]</td>
<td width="214" align="left" valign="middle" bgcolor="#000000">[b]<span class="Sottotitolo01_bianco">Titolo della news </span>[/b]</td>
</tr>
<tr>
<td height="19" valign="top"></td>
<td align="left" valign="middle" class="Corpotesto01_bold_nero"><span class="Corpotesto01_norm_nero"><?php echo $elenco['Titolo']; ?></span></td>
</tr>
<tr>
<td height="72"></td>
<td></td>
</tr>
<tr align="center" valign="middle" bgcolor="#000000">
<td height="19" colspan="3" class="Sottotitolo01_bianco">Testo della news </td>
</tr>
<tr align="left" valign="top" bgcolor="#000000">
<td height="104" colspan="3" bgcolor="#FFDD02"><?php echo $elenco['Testo']; ?> <? } ?></td>
</tr>
</table>
</body>
</html>
Non capisco.