<html>
<head>
<title>News</title>
<!-- Questo script e' reperibile nel sito http://www.jsdir.com -->
<script language="javascript">
//--fabiano@jsdir.com-------
//--http://www.jsdir.com--------
//--copyright © 2001-------
//-------browser sniff--------------
var isOp=(navigator.userAgent.toLowerCase().indexOf('opera') !=-1)?true:false
var isOp5=(isOp && navigator.userAgent.toLowerCase().indexOf('5') !=-1)?true:false
var nome=(navigator.appName=="Microsoft Internet Explorer")?true:false;
var wt=nome?(navigator.appVersion.split(';').toString().split(" ").toString().split(',')[4] ):null;
var isie5=((wt)>=5 && nome)?true:false;
var isie4=((wt <5 && wt >=4) && nome)?true:false;
var isNS4=(document.layers)?true:false;
var isNS6=document.getElementById && (navigator.appName=="Netscape")?true:false;
var isIE4=document.all?true:false;
var isIE5=document.getElementById && (navigator.appName=="Microsoft Internet Explorer")?true:false;
var sty=(isie4 || isie5 || isNS6)?'hidden':(isNS4)?'hide':'hidden'
var stv=(isie4 || isie5 || isNS6)?'visible':(isNS4)?'show':'visible'
//------------------------------------------------------
var ax=0;
var ay=0;
var sa=0;
var sl=0;
var muovi=0;
var muovi2=0;
var ss;
var sr;
var ll;
var lr;
var scrl=0;
var scrt=0;
var crp=0;
//-----------------
//-------------------mouse move--------------------------------
if (isNS6 || isNS4){
window.captureEvents(Event.MOUSEMOVE);
window.onmousemove=move;
}
else if (isie4 || isie5)
document.onmousemove=move;
function move(e){
if (isie4 || isie5){
sl=document.body.offsetWidth;
sa=document.body.offsetHeight;
ax=window.event.clientX;
ay=window.event.clientY;
}
else if (isNS6 || isNS4){
sl=document.table.innerWidth;
sa=document.table.innerHeight;
ax=e.pageX;
ay=e.pageY;
}
crp=(isie5 || isNS6)?document.getElementById('corpo').style:(isie4 )?document.all['corpo'].style:(isNS4)?document.layers['corpo']:null
//-----------quando deve scrollare?-----------------------
if(ay>(sa-10))
scrollasu()
else if(ay<(sa-10))
clearTimeout(sr)
//-----
if(ay<10)
scrollagiu()
else if(ay>10)
clearTimeout(ss)
}
//-----------------------scrolla----------------------------
function scrollagiu(){
muovi=muovi+1
crp.top=muovi
if(muovi>=0){
clearTimeout(ss)
muovi=muovi-1
}
ss=setTimeout('scrollagiu()',10)
}
//-------------------------------
function scrollasu(){
muovi=muovi-1
crp.top=muovi
ew=crp.height
if(muovi==ew){
clearTimeout(sr)
muovi=muovi+1
}
sr=setTimeout('scrollasu()',10)
}
</script>
<script type="text/javascript">
/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=2 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''
function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}
function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}
if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee
</script>
</head>
<body onResize="location.reload()" scroll="no" Style="height: 305px; max-height: 305px; overflow: hidden; width: 590px; border: 1px solid white">
<table id="tabella" style="height: 305px; max-height: 305px; width: 590px; overflow: hidden; border: 1px solid white">
<tr>
<td>
<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: absolute; width: 98%;">
<div id="corpo" style="position: relative; background-attachment: scroll; top: 0;">
<?php
@include("config.php");
mysql_connect($DBhost,$DBuser,$DBpass) or die("<div>Impossibile collegarsi al server</div>");
@mysql_select_db("$DBname") or die("<div>Impossibile connettersi al database $DBname</div>");
$sqlquery = "SELECT * FROM $table ORDER BY data DESC";
$result = @mysql_query($sqlquery);
$number = @mysql_numrows($result);
$i = 0;
if ($number < 1)
{
echo "<div>Non sono disponibili news</div>";
}
else
{
while ($number > $i)
{
$datarecord = @mysql_result($result,$i,"data");
$news = @mysql_result($result,$i,"news");
$data=explode('-',$datarecord);
$a=$data['0'];
$m=$data['1'];
$g=$data['2'];
echo "<p align=\"left\"><div><font id=\"data\">".$g."-".$m."-".$a.":</font> ".$news."</div></p>";
$i++;
}
}
?>
</div>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>