%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/dordingu/www/vidtvo/
Upload File :
Create Path :
Current File : /home/dordingu/www/vidtvo/main.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>L&iacute;sa og Valli &aacute; alnetinu!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="F2F1C3" text="333027" link="035F06" vlink="069C0A" alink="#FF0000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<p align="center">&nbsp;</p>
<p align="center"><font face="Verdana, Arial, Helvetica, sans-serif">...A&eth;als&iacute;&eth;an...</font></p>
<p align="center"><font color="#FFFFFF"><strong>
<?php

echo "<table width=100%>";
echo "<tr><td align=left>";
include("news/news.inc");
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 vidtvo_main";
$result=mysql_query($sql,$db);
$myrow=mysql_fetch_array($result);
$num_rows=$myrow[0];	

$data = fread(fopen($show_vidtvo_main, "r"), filesize($show_vidtvo_main));


$sql="select n_id,UNIX_TIMESTAMP(n_date) as my_date, maintext, maintitle, pic_link,n_pic,skrifadaf from vidtvo_main 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"]);
	$maintext=$myrow["maintext"];
	$pic_link=$myrow["pic_link"];
	$news_hold=explode("\n",$maintext);
	$picture=$myrow["n_pic"];
	$skrifadaf=$myrow["skrifadaf"];
	$maintitle=$myrow["maintitle"];
	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 (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);	
		}
	$maintext=implode("\n",$news_hold);	
	$maintext=nl2br($maintext);
	
	
	$hold=$data;

	$hold=str_replace("{date}",$n_date,$hold);
	$hold=str_replace("{maintext}",$maintext,$hold);
	$hold=str_replace("{number}",$n_id,$hold);
 	$hold=str_replace("{maintitle}",$maintitle,$hold);

        if ($picture)
		{
		if ($pic_link)
			{
			$hold=str_replace("{picture}","<a href=\"$pic_link\" target=_new><img  src=news/upload/".$picture." align=\"middle\" border=0></a>",$hold);
			}
		else
			{
			$hold=str_replace("{picture}","<img align=\"middle\" border=\"0\" src=\"news/upload/".$picture."\">",$hold);
			}	
		}
	else
		{
		$hold=str_replace("{picture}","",$hold);
		}
	if ($file)
		{		
		$hold=str_replace("{file}","<a href=\"news/upload/".$file." \"target=_new>$file</a>",$hold);
		}
	else
		{
		$hold=str_replace("{file}","",$hold);
		}	
	
	echo $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="<Center># $start_point<br></Center>";
echo "<br><br>";
echo $showing;
if ($start!=0)
	{
	
	
	echo "<Center><a href=main.php?prev=$start>Latest News</a></Center>";
	
	}
if ($num_rows> $stop )
	{
	
	echo "<Center><a href=main.php?start=$start>More news..</a></Center>";
	}
	
echo "</td></tr>";
echo "</table>";



?>
</strong></font></p>
</body>
</html>

Zerion Mini Shell 1.0