Si dal fil index.php, vedi il seguente codice:
Codice PHP:
<style type="text/css">
<!--
.Stile1 {color: #ffffff}
-->
</style>
<SCRIPT language="JavaScript" type="text/javascript">
function aprifinestra()
{
window.open("Informazioni.htm","Informazioni","width=550,height=620,left=10,top=10");
}
// -->
</SCRIPT>
<table width="880" border="0" align="center" cellpadding="0" cellspacing="0" id="TD_BASE">
<tr>
<td height="30" align="center" valign="middle"> </td>
</tr>
<tr>
<td height="50" align="right" valign="bottom" background="Grafica/top.png"> </a></td>
</tr>
<tr>
<td height="164" align="center" valign="top" background="Grafica/white2.png"><table width="850" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" align="right" valign="middle" class="Titolo"><div align="center"><img src="/Grafica/XVIII_CORSO.gif" width="522" height="64" vspace="10" /></div></td>
</tr>
<tr>
<td height="50" align="center" valign="middle" class="Titolo"><img src="Grafica/forum.png" width="48" height="48" hspace="20" border="0" align="absmiddle" /><em>Forum</em></td>
</tr>
</table>
<!------------------------------------------------------------------------------------>
<?php
include("connessione.php");
$server = mysql_connect($host,$user,$pass);
mysql_select_db($db,$server);
$x = $page * $aantal_per_page;
$sql = "SELECT * FROM myforum ORDER BY casuale DESC LIMIT 0, 1";
//$sql = "SELECT * FROM myforum WHERE verify = 1 ORDER BY casuale DESC LIMIT 0, 1";
$res = mysql_query($sql) or die(mysql_error());
while ($riga = mysql_fetch_array($res)) {
$id = $riga['id'];
$nome = $riga['nome'];
$replys = $riga['replys'];
$oggetto = $riga['oggetto'];
$data = $riga['data'];
}
?>
<?php
include("connessione.php");
$server = mysql_connect($host,$user,$pass);
mysql_select_db($db,$server);
$strsql = "SELECT COUNT(*) as totisc FROM myforum WHERE count = 0";
$rs = mysql_query($strsql) or die(mysql_error());
$riga = mysql_fetch_array($rs);
$totale_temi = $riga['totisc'];
?>
<?php
if (!isset($page)) $page = 0;
$aantal_per_page = 15;
include("connessione.php");
$server = mysql_connect($host,$user,$pass);
mysql_select_db($db,$server);
$x = $page * $aantal_per_page;
$sql = "SELECT * FROM myforum WHERE count = 0 AND verify = 1 ORDER BY casuale DESC LIMIT $x, $aantal_per_page";
$que1 = "SELECT * FROM myforum WHERE count = 0";
$res = mysql_query($sql) or die(mysql_error());
$out1 = mysql_query($que1) or die(mysql_error());
$num = mysql_num_rows($out1);
?>
<?php
$date=(date("d/m/Y"));
$ora=(date("H:i:d"));
?>
<link href="Forum_Stye.css" rel="stylesheet" type="text/css">
<! ------------------------------------------------------------------------------>
<div align="center">
<table width="750" border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td height="38" colspan="2" align="center" valign="middle" class="miniB"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="27%" align="left" valign="middle" bgcolor="#6F7C3C" class="miniB"><img src="Grafica/calendario.gif" width="24" height="24" hspace="10" vspace="10" align="absmiddle" /><? echo $date; ?><? echo " - "; ?><? echo $ora; ?></td>
<td width="1%" align="left" valign="middle" bgcolor="#6F7C3C" class="miniB"><div align="center"><img src="Grafica/VerticalLine.gif" width="2" height="32" /></div></td>
<td width="14%" align="left" valign="middle" bgcolor="#6F7C3C" class="td1"><a href="javascript:aprifinestra();">
<div align="center"><img src="Grafica/info.png" width="24" height="32" hspace="5" border="0" align="absmiddle" />Guida</div></td>
<td width="1%" align="left" valign="middle" bgcolor="#6F7C3C" class="td1"><div align="center"><img src="Grafica/VerticalLine.gif" width="2" height="32" /></div></td>
<td width="14%" align="center" valign="middle" bgcolor="#6F7C3C" class="td1"><a href="New_Mess.php"><img src="Grafica/new_argomento.png" width="24" height="24" hspace="5" border="0" align="absmiddle" />Nuovo </td>
<td width="1%" align="center" valign="middle" bgcolor="#6F7C3C" class="td1"><div align="center"><img src="Grafica/VerticalLine.gif" width="2" height="32" /></div></td>
<td width="1%" align="center" valign="middle" bgcolor="#6F7C3C" class="td1"><div align="center"><img src="Grafica/VerticalLine.gif" width="2" height="32" /></div></td>
<td width="27%" align="right" valign="middle" bgcolor="#6F7C3C" class="miniB"><div align="center"><img src="Grafica/argomenti.png" width="24" height="24" hspace="5" align="absmiddle" />Argomenti presenti: <? echo $totale_temi; ?></div></td>
</tr>
</table></td>
</tr>
<tr>
<td width="76%" height="20"> <a href="New_Mess.php" class="testo"><img src="Grafica/new_argomento.png" width="24" height="24" hspace="5" border="0" align="absmiddle" />Nuovo argomento</a><span class="corsivo"> |<img src="Grafica/SX.png" width="24" height="24" hspace="5" align="absmiddle" />
<?php
if ($page > 0) {
echo "<a href=\"index.php?page=" . ($page - 1) . "\">Ultimi messaggi</a> | ";
}
else {
echo "Ultimi messaggi | ";
}
$bla = 15 + 15 * $page;
if ($num > $bla) {
echo "<a href=\"index.php?page=" . ($page + 1) . "\">Messaggi precedenti</a>";
}
else {
echo "Messaggi precedenti";
}
?>
<img src="Grafica/DX.png" width="24" height="24" hspace="5" align="absmiddle" /></span></td>
<td width="24%" background="grafica/bara1.gif"><div align="right"><img src="Grafica/alert.png" width="24" height="24" hspace="5" border="0" align="absmiddle" /><span class="testo">Segnala abuso</span></a></div></td>
</tr>
<tr>
<td height="30" colspan="2" align="right" valign="middle" class="miniR"><span class="miniR"> Ultimo insert:</span> <? echo $data; ?><span class="miniN"> | </span><? echo $nome; ?><span class="miniN"> | </span><? echo $oggetto; ?></td>
</tr>
</table>
<table width="80%" border=0 align="center" cellpadding=1 cellspacing=0>
<tr><td>
<table width="750" border=1 align="center" cellpadding=3 cellspacing=0>
<tr>
<td height="20" class="testo"><span class="grasseto">Discussione</span></td>
<td width="32%" height="20" class="testo"><span class="grasseto">Autore</span></td>
<td width="9%" height="20" class="testo"><div align="center"><span class="grasseto">Repliche</span></div></td>
<td width="15%" height="20" class="testo"><div align="center"><span class="grasseto">Data</span></div></td>
</tr>
<?php
while ($riga = mysql_fetch_array($res)) {
$id = $riga['id'];
$nome = $riga['nome'];
$replys = $riga['replys'];
$oggetto = $riga['oggetto'];
$data = $riga['data'];
?>
<tr>
<td width="44%" height="20" align="left" valign="middle" nowrap class="testo"><a href="Vedo_Mess.php?id=<? echo $id; ?>"><img src="Grafica/spillo.gif" width="10" height="10" hspace="2" border="0" align="absmiddle" /><? echo $oggetto; ?></a></td>
<td height="20" align="left" valign="middle" nowrap class="testo"><img src="Grafica/user.png" width="18" height="18" hspace="4" border="0" align="absmiddle" /><? echo $nome; ?></td>
<td height="20" align="center" valign="middle" nowrap class="miniR"><? echo $replys; ?></td>
<td height="20" align="center" valign="middle" nowrap class="miniN"><img src="Grafica/mini_calendario.gif" width="24" height="17" hspace="4" align="absmiddle" /><? echo $data; ?></td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
</table>
<!-------------------------------------------------------------------------------------></td>
</tr>
<tr>
<td height="50" align="center" valign="bottom" background="Grafica/bottom.png"><table width="500" border="0" cellspacing="0" cellpadding="0">
<tr> </tr>
</table>
<span class="miniN">- Copyright © 2010 by -</span></td>
</tr>
</table>