%PDF- %PDF-
Direktori : /home/dordingu/public_html/volos/ |
Current File : /home/dordingu/public_html/volos/main.php |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>VOLOS</title> <link href="volos.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .volosgigslink { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #777777; } .volosgigs { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #666666; text-decoration:none; } .volosheader { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #666666; } --> </style> <script type="text/javascript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> </head> <body onload="MM_preloadImages('images/myspaceo.png','images/facebooko.png','images/reverbo.png','images/twittero.png')"> <div align="center"> <? include('topbar.inc.php'); ?> </div> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0" > <tr> <td height="75" align="right" valign="middle" class="topbar"> </td> </tr> <tr><td class="textbackground"> <table width="700" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="500" align="left" valign="top"><p><strong> <?php setlocale (LC_TIME, 'is_IS'); echo "<table width=100%>"; echo "<tr><td align=left>"; $show_news_template="templates/news.html"; $date_format="d/m/Y"; $show_news="5"; include_once("news/database.inc.php"); if (($show_news!="all")) { if (isset($start) && !$prev) { $start_row=$start; $start=$start+$show_news; } else if (!$start && !$prev) { $start=0; $start_row=0; } if ($prev) { $start_row=$prev; $start=$prev-$show_news; } if (!$end) { $end=$show_news; } $limit="Limit $start,$end"; } $sql="select count(*) from volos_news"; $result=mysql_query($sql,$db); $myrow=mysql_fetch_array($result); $num_rows=$myrow[0]; $theid = $_GET['frett']; $data = fread(fopen($show_news_template, "r"), filesize($show_news_template)); $sql="select n_id, UNIX_TIMESTAMP(n_date) as my_date ,n_title, news, showorhide, pic_link, n_pic, n_newstype, n_reporter, newssource from volos_news order by n_date desc,n_id desc $limit"; $result=@mysql_query($sql,$db); while ($myrow=mysql_fetch_array($result)) { $n_id=$myrow["n_id"]; $n_date=date($date_format,$myrow["my_date"]); $news=$myrow["news"]; $pic_link=$myrow["pic_link"]; $news_hold=explode("\n",$news); $picture=$myrow["n_pic"]; $n_newstype=$myrow["n_newstype"]; $n_reporter=$myrow["n_reporter"]; $dagsetning=strftime("%e. %B %Y %a.", $myrow["my_date"]);; $newssource=$myrow["newssource"]; $topic=$myrow["n_title"]; for ($i=0;$i<count($news_hold);$i++) { $hold_word=explode(" ",$news_hold[$i]); for ($n=0;$n<count($hold_word);$n++) { if (substr($hold_word[$n],0,4)=="http") { $hold_word[$n]="<a href=".$hold_word[$n]." target=_new>".$hold_word[$n]."</a>"; } else if (substr($hold_word[$n],0,4)=="www.") { $hold_word[$n]="<a href='http://$hold_word[$n]' target=_new>".$hold_word[$n]."</a>"; } else if (strpos($hold_word[$n],"@")) { $hold_word[$n]="<a href=\"mailto:$hold_word[$n]\" target=_new>$hold_word[$n]</a>"; } } $news_hold[$i]=implode(" ",$hold_word); } $news=implode("\n",$news_hold); $news=nl2br($news); $hold=$data; $hold=str_replace("{start_date}",$dagsetning,$hold); $hold=str_replace("{end_date}",$end_date,$hold); $hold=str_replace("{news}",$news."</i></i></b></b></s>",$hold); $hold=str_replace("{news_number}",$n_id,$hold); $hold=str_replace("{topic}",$topic,$hold); $hold=str_replace("{n_reporter}",$n_reporter,$hold); $hold=str_replace("{newssource}",$newssource,$hold); if ($picture) { if ($pic_link) { $hold=str_replace("{picture}","<a href=\"$pic_link\" target=_new><img src=frettamyndir/".$picture." align=\"right\" border=0></a>",$hold); } else { $hold=str_replace("{picture}","<img align=\"right\" border=\"0\" src=\"frettamyndir/".$picture."\">",$hold); } } else { $hold=str_replace("{picture}","",$hold); } echo utf8_encode($hold); } echo "</td></tr>"; echo "<tr><td align=left>"; $stop=$start+$show_news; if ($stop>$num_rows) { $stop=$num_rows; } $start_point=$start+1; $showing="<span class=\"volosgigs\">Fréttir $start_point - $stop af $num_rows</span><br>"; echo $showing; if ($start!=0) { echo " <a href=\"index.php?prev=$start\" class=\"volosgigs\">[Nýja og nýlegar fréttir]</a> "; } if ($num_rows> $stop ) { echo " <a href=\"index.php?start=$start\" class=\"linkbartext\">[Eldri fréttir]</a> "; } echo "</font></td></tr>"; echo "</table>"; ?> </strong></p> <p class="style5"> </p></td> <td width="200" align="center" valign="top"><table width="100%" border="0" cellspacing="10" cellpadding="0"> <tr> <td align="center"><p><strong><span class="volosheader">Tónleikar</span></strong></p> <p class="volosgigs"> <?php include_once("news/database.inc.php"); $show_news_template="templates/gigs.html"; $date_format="d/m/Y"; $sql="select n_id,UNIX_TIMESTAMP(n_date) as my_date,n_title_eng, news_english, pic_link,n_pic from volos_gigs where CURRENT_DATE < n_date OR CURRENT_DATE = n_date order by n_date asc,n_id desc limit 0,50"; $result=mysql_query($sql,$db); $check = mysql_num_rows($result); $count = 0; $ofset = 200; if ($check==0) { echo "Engir tónleikar á næstunni<BR>"; } else { while (($myrow=mysql_fetch_array($result)) && ($count < 5)) { $dagsetning=utf8_encode(strftime("%e. %B %Y %a.", $myrow["my_date"])); if (strlen($myrow[news_english]) > $ofset) { $spacepos = strpos($myrow[news_english], " " , $ofset); $abstract = substr($myrow[news_english], 0 , $spacepos); $abstract = "$abstract <a href=/tonl.php?n_id=$myrow[n_id] class=\"volosgigslink\"> <I>meira..</i></a>"; } else { $abstract = "$myrow[news_english]"; } $n_date=date($date_format,$myrow["my_date"]); echo "<P class=\"volosgigs\">"; echo "<strong>".$dagsetning."</strong><BR> "; echo "<a href=tonl.php?n_id=$myrow[n_id] class=\"volosgigs\">\n"; echo utf8_encode($myrow[n_title_eng])."</a><BR>"; echo utf8_encode($abstract); echo "</P>"; } } ?> </p></td> </tr> </table><p> </p> </td> </tr> </table> </td> </tr> <tr> <td height="75" align="right" valign="top" class="botnbar"><table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td align="center"><a href="http://www.myspace.com/volosice" target="_blank" onmouseover="MM_swapImage('Myspace','','images/myspaceo.png',1)" onmouseout="MM_swapImgRestore()"><img src="images/myspace.png" alt="Myspace" name="Myspace" width="93" height="35" border="0" id="Myspace" /></a><a href="http://www.facebook.com/pages/Volos/56836441989" target="_blank" onmouseover="MM_swapImage('Facebook','','images/facebooko.png',1)" onmouseout="MM_swapImgRestore()"><img src="images/facebook.png" alt="Facebook" name="Facebook" width="89" height="35" border="0" id="Facebook" /></a><a href="http://www.reverbnation.com/volos" target="_blank" onmouseover="MM_swapImage('Reverb','','images/reverbo.png',1)" onmouseout="MM_swapImgRestore()"><img src="images/reverb.png" alt="Reverb Nation" name="Reverb" width="41" height="35" border="0" id="Reverb" /></a> <a href="https://twitter.com/VolosIce" target="_blank" onmouseover="MM_swapImage('Twitter','','images/twittero.png',1)" onmouseout="MM_swapImgRestore()"><img src="images/twitter.png" alt="Twitter" name="Twitter" width="87" height="35" border="0" id="Twitter" /></a></td> </tr> </table></td> </tr> </table> </body> </html>