Sie sind auf Seite 1von 4

<? include ("blocks/bd.

php");
$result = mysql_query("SELECT title,meta_d,meta_k,text FROM settings WHERE
page='index'",$db);

if(!$result)
{
echo "<p>Cai?in ia auai?eo aaiiuo ec aacu ia i?ioae. Iaieoeoa ia yoii
aaieieno?aoi?o gheorghitavv@yahoo.com. <br> <strong>Eia ioeaee:</strong></p>";
exit(mysql_error());
}

if (mysql_num_rows($result) > 0)
{
$myrow = mysql_fetch_array($result);
}

else
{
echo "<p>Eioi?iaoey ii cai?ino ia ii?ao auou ecaea?aia a oaaeeoa iao
caienae.</p>";
exit();
}

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="description" content="<?php echo $myrow['meta_d']; ?> ">
<meta name="keywords" content="<?php echo $myrow['meta_k']; ?> ">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title><?php echo $myrow['title']; ?></title>

<link href='style.css' rel='stylesheet' type='text/css'>


</head>

<body>

<table width="98%" border="0" align="center" cellspacing="0"


cellpadding="0">

<? include("blocks/header.php"); ?>

</table><br><br>

<table width="98%" border="0" align="center" cellspacing="0" cellpadding="0">

<tr>
<? include("blocks/lefttd.php"); ?>
<? include("blocks/center1.php"); ?>

<td valign="top">
<?php echo $myrow['text']; ?>

<table width="700" border="0" align="center" cellspacing="0" cellpadding="0">


<?php
$result77 = mysql_query("SELECT str FROM options", $db);
$myrow77 = mysql_fetch_array($result77);
$num = $myrow77["str"];
// Ecaeaeaai ec URL oaeouo? no?aieoo
@$page = $_GET['page'];
// Ii?aaaeyai iauaa ?enei niiauaiee a aaca aaiiuo
$result00 = mysql_query("SELECT COUNT(*) FROM data");
$temp = mysql_fetch_array($result00);
$posts = $temp[0];
// Iaoiaei iauaa ?enei no?aieo
$total = (($posts - 1) / $num) + 1;
$total = intval($total);
// Ii?aaaeyai ia?aei niiauaiee aey oaeouae no?aieou
$page = intval($page);
// Anee cia?aiea $page iaiuoa aaeieou eee io?eoaoaeuii
// ia?aoiaei ia ia?ao? no?aieoo
// A anee neeoeii aieuoia, oi ia?aoiaei ia iineaai??
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
// Au?eneyai ia?eiay n eaeiai iiia?a
// neaaoao auaiaeou niiauaiey
$start = $page * $num - $num;
// Auae?aai $num niiauaiee ia?eiay n iiia?a $start

$result = mysql_query("SELECT img,id,view,rating,q_vote FROM data ORDER BY id desc


LIMIT $start, $num",$db);

if(!$result)
{
echo "<p>Cai?in ia auai?eo aaiiuo ec aacu ia i?ioae. Iaieoeoa ia yoii
aaieieno?aoi?o gheorghitavv@yahoo.com. <br> <strong>Eia ioeaee:</strong></p>";
exit(mysql_error());
}

if (mysql_num_rows($result) > 0)
{
$myrow = mysql_fetch_array($result);
$col=0;
do
{
$r = $myrow["rating"]/$myrow["q_vote"];
$r = intval($r);
if($col==4) { echo "<tr>";}
if($col==8) { echo "<tr>";}
printf ("<td><table align='center' class='post' border='0'>
<tr>
<td class='frame'>
<p align='center' class='ccc'><a href='view_post.php?id=$myrow[id]'><img
src='$myrow[img]' width='130' height='100'border='0'></a></p>
</tr>

<tr>
<td><p class='post_view'>I?iniio?ia: $myrow[view]
&nbsp;&nbsp;&nbsp;&nbsp; ?aeoeia: <img src='img/$r.gif'</p></td>
</tr></table></td>");
if($col==7) { echo "</tr>";}
if($col==12) { echo "</tr>";}
$col++;
}
while ($myrow = mysql_fetch_array($result));

// I?iaa?yai io?iu ee no?aeee iacaa


if ($page != 1) $pervpage = '<a href=index.php?page=1>Prima</a> | <a
href=index.php?page='. ($page - 1) .'>Precedenta</a> | ';
// I?iaa?yai io?iu ee no?aeee aia?aa
if ($page != $total) $nextpage = ' | <a href=index.php?page='. ($page +
1) .'>Urmatoarea</a> | <a href=index.php?page=' .$total. '>Ultima</a>';

// Iaoiaei aaa aee?aeoea noaieou n iaieo e?aaa, anee iie anou


if($page - 5 > 0) $page5left = ' <a href=index.php?page='. ($page - 5) .'>'. ($page
- 5) .'</a> | ';
if($page - 4 > 0) $page4left = ' <a href=index.php?page='. ($page - 4) .'>'. ($page
- 4) .'</a> | ';
if($page - 3 > 0) $page3left = ' <a href=index.php?page='. ($page - 3) .'>'. ($page
- 3) .'</a> | ';
if($page - 2 > 0) $page2left = ' <a href=index.php?page='. ($page - 2) .'>'. ($page
- 2) .'</a> | ';
if($page - 1 > 0) $page1left = '<a href=index.php?page='. ($page - 1) .'>'. ($page
- 1) .'</a> | ';

if($page + 5 <= $total) $page5right = ' | <a href=index.php?page='. ($page +


5) .'>'. ($page + 5) .'</a>';
if($page + 4 <= $total) $page4right = ' | <a href=index.php?page='. ($page +
4) .'>'. ($page + 4) .'</a>';
if($page + 3 <= $total) $page3right = ' | <a href=index.php?page='. ($page +
3) .'>'. ($page + 3) .'</a>';
if($page + 2 <= $total) $page2right = ' | <a href=index.php?page='. ($page +
2) .'>'. ($page + 2) .'</a>';
if($page + 1 <= $total) $page1right = ' | <a href=index.php?page='. ($page +
1) .'>'. ($page + 1) .'</a>';

// Auaia iai? anee no?aieo aieuoa iaiie

if ($total > 1)
{
Error_Reporting(E_ALL & ~E_NOTICE);
echo "<div class=\"pstrnav\">";
echo $pervpage.$page5left.$page4left.$page3left.$page2left.$page1left.'<b>'.
$page.'</b>'.$page1right.$page2right.$page3right.$page4right.$page5right.$nextpage;
echo "</div>";
}

else
{
echo "<p>Eioi?iaoey ii cai?ino ia ii?ao auou ecaea?aia a oaaeeoa iao
caienae.</p>";
exit();
}
?>
</table>

<? include("blocks/center2.php"); ?>


</tr>
</table><br>

</td>
<? include("blocks/center2.php"); ?>

</tr>
</table><br /><br /><br /><br />

<table width="98%" border="0" align="center" cellspacing="0"


cellpadding="0" bgcolor="#FFFFFF">

<? include ("blocks/footer.php"); ?>

</table>

<table width="98%" border="0" align="center" cellpadding="0" cellspacing=


"0">

<? include("blocks/bard.php"); ?>

</table>

</body>
</html>

Das könnte Ihnen auch gefallen