Вижте как става -> http://www.jumpstyle.bulstar.info/video.php
A Трябва да е така -> http://www.jumpstyle.bulstar.info
Ето го кода на video.php
A Трябва да е така -> http://www.jumpstyle.bulstar.info
Ето го кода на video.php
Код:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
opentable(Music);
?>
<?php
include_once "config2.php";
echo '<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">';
if(!isset($_GET['page']))
{
$page = 1;
}
else
{
$page = $_GET['page'];
}
echo "<table bgcolor='white' border='1' style='border-collapse: collapse' bordercolor='#cccccc' width='765'>";
echo "<tr>";
$max_results = 20;
$from = (($page * $max_results) - $max_results);
// старт
$mysql = mysql_query("SELECT * FROM clips ORDER BY id DESC LIMIT $from, $max_results");
echo"<table border=\"0\" cellspacing=\"2\" align=\"center\"><tr>";
while($r = mysql_fetch_array($mysql))
{
$vid=$r['id'];
$title=$r['ime'];
$pic=$r['pic'];
if($pic != null)
{
echo "<td><center><a href='view.php?id=$vid' title='$title'><img src='$pic' border='0' alt='$title' width='80' height='50'></a></center></td>";
$i++;
}
else
{
echo "<td><center><a href='view.php?id=$vid' title='$title'><img src='no.jpg' border='0' alt='$title'></a></center></td>";
$i++;
}
if($i > 4)
{
echo"</tr><tr>";$i = "0";
}
}
echo"</tr></table>";
echo "<br>";
echo "<center>Страници: ";
// стоп
$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM clips"),0);
$total_pages = ceil($total_results / $max_results);
if($page > 1){
$prev = ($page - 1);
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev\"></a> ";
}
for($i = 1; $i <= $total_pages; $i++){
if(($page) == $i){
echo "$i ";
} else {
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$i\">$i</a> ";
}
}
if($page < $total_pages){
$next = ($page + 1);
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$next\"></a>";
}
echo "</center>";
?>
<?
closetable();
require_once "footer.php";
require_once "side_right.php";
?>