Каталог за филми
Много от нас събират любимите си филми на най различни носители, но някой път става халс при търсенето.Дали имате този филм, къде се намира и т.н. С този каталог лесно ще картотекиране вашите филми в най различни категории.Ще можете да добавяте към всеки филм най различна информация за него.Единствено трябва да имате време и желание и ще си направите един страхотен каталог за филми.



Изтегли Каталог за филми

Демо в картинки

Отворете файла config.php и попълнете следните неща:
$host = "localhost";
$user = "потребителя на бд";
$password = "паролата за бд";
$db = "името на бд";
$ip = "вашият ип адрес за да имате достъп само вие до админ панела";


Структура:


category.php
config.php
index.php
movies.php
print.php
print-oblojka.php
search.php

admin
/admin/del.php
/admin/edit.php
/admin/index.php
/admin/open.php
/admin/write.php

files
/files/javascript.js
/files/print1.css
/files/print.css
/files/print.js
/files/style.css

images
/images/badstar.gif
/images/delete.gif
/images/edit.gif
/images/print.gif
/images/star.gif


config.php
<?php
$host = "";
$user = "";
$password = "";
$db = "";
$ip = "";
?>


db.sql
CREATE TABLE `filmi` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`kategoriq` varchar(255) collate cp1251_bulgarian_ci NOT NULL default '',
`seriq` char(1) collate cp1251_bulgarian_ci NOT NULL default '',
`nomer` varchar(10) collate cp1251_bulgarian_ci NOT NULL default '',
`zaglaviebg` text collate cp1251_bulgarian_ci NOT NULL,
`zaglavieus` text collate cp1251_bulgarian_ci NOT NULL,
`poster` text collate cp1251_bulgarian_ci NOT NULL,
`wreme` text collate cp1251_bulgarian_ci NOT NULL,
`godina` text collate cp1251_bulgarian_ci NOT NULL,
`dyrjawa` text collate cp1251_bulgarian_ci NOT NULL,
`rejis` text collate cp1251_bulgarian_ci NOT NULL,
`roli` text collate cp1251_bulgarian_ci NOT NULL,
`link` text collate cp1251_bulgarian_ci NOT NULL,
`reiting` text collate cp1251_bulgarian_ci NOT NULL,
`nositel` text collate cp1251_bulgarian_ci NOT NULL,
`broinositeli` text collate cp1251_bulgarian_ci NOT NULL,
`rezume` mediumtext collate cp1251_bulgarian_ci NOT NULL,
`dopylnitelno` mediumtext collate cp1251_bulgarian_ci NOT NULL,
`c1` smallint(1) unsigned NOT NULL default '0',
`c2` smallint(1) unsigned NOT NULL default '0',
`c3` smallint(1) unsigned NOT NULL default '0',
`c4` smallint(1) unsigned NOT NULL default '0',
`c5` smallint(1) unsigned NOT NULL default '0',
`c6` smallint(1) unsigned NOT NULL default '0',
`c7` smallint(1) unsigned NOT NULL default '0',
`c8` smallint(1) unsigned NOT NULL default '0',
`c9` smallint(1) unsigned NOT NULL default '0',
`c10` smallint(1) unsigned NOT NULL default '0',
`c11` smallint(1) unsigned NOT NULL default '0',
`c12` smallint(1) unsigned NOT NULL default '0',
`c13` smallint(1) unsigned NOT NULL default '0',
`c14` smallint(1) unsigned NOT NULL default '0',
`c15` smallint(1) unsigned NOT NULL default '0',
`c16` smallint(1) unsigned NOT NULL default '0',
`c17` smallint(1) unsigned NOT NULL default '0',
`c18` smallint(1) unsigned NOT NULL default '0',
`c19` smallint(1) unsigned NOT NULL default '0',
`c20` smallint(1) unsigned NOT NULL default '0',
`c21` smallint(1) unsigned NOT NULL default '0',
`c22` smallint(1) unsigned NOT NULL default '0',
`c23` smallint(1) unsigned NOT NULL default '0',
`c24` smallint(1) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_bulgarian_ci AUTO_INCREMENT=0 ;

CREATE TABLE `janr` (
`id` smallint(5) unsigned NOT NULL auto_increment,
`name` varchar(60) collate cp1251_bulgarian_ci NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_bulgarian_ci AUTO_INCREMENT=25 ;

INSERT INTO `janr` VALUES(1, 'Комедия');
INSERT INTO `janr` VALUES(2, 'Трилър');
INSERT INTO `janr` VALUES(3, 'Романтичен');
INSERT INTO `janr` VALUES(4, 'Късометражен');
INSERT INTO `janr` VALUES(5, 'Ужаси');
INSERT INTO `janr` VALUES(6, 'Психо');
INSERT INTO `janr` VALUES(7, 'Мистерия');
INSERT INTO `janr` VALUES(8, 'Исторически');
INSERT INTO `janr` VALUES(9, 'Документален');
INSERT INTO `janr` VALUES(10, 'Семеен');
INSERT INTO `janr` VALUES(11, 'Приключенски');
INSERT INTO `janr` VALUES(12, 'Еротичeн');
INSERT INTO `janr` VALUES(13, 'Драма');
INSERT INTO `janr` VALUES(14, 'Уестърн');
INSERT INTO `janr` VALUES(15, 'Екшън');
INSERT INTO `janr` VALUES(16, 'Музикален');
INSERT INTO `janr` VALUES(17, 'Криминален');
INSERT INTO `janr` VALUES(18, 'Анимация');
INSERT INTO `janr` VALUES(19, 'Фантастика');
INSERT INTO `janr` VALUES(20, 'Детски');
INSERT INTO `janr` VALUES(21, 'Сериал');
INSERT INTO `janr` VALUES(22, 'Военен');
INSERT INTO `janr` VALUES(23, 'Пародия');
INSERT INTO `janr` VALUES(24, 'Друг');


index.php
<?php @include("./config.php"); @mysql_connect($host,$user,$password); @mysql_select_db($db); @mysql_query("SET CHARACTER SET cp1251") or die( "<center>Попълнете данните от файл config.php !</center>");?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="bg" xml:lang="bg" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Филмов каталог</title>
<meta name="Generator" content="notepad++" />
<meta name="Author" content="Productions Staf Networks - Bulgaria. All rights reserved." />
<meta name="Owner" content="Stanislav Dimov" />
<meta name="Рobots" content="index, follow" />
<meta name="Revisit-After" content="1 days" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link href="./files/style.css" rel="StyleSheet" type="text/css" />
</head>
<body>
<table align="center" border="1" class="table1" cellpadding="8">
<tr>
<td colspan="2" align="center">
<table align="center" class="table" border="1" width="600">
<tr>
<td colspan="2" class="edno" height="25" align="left">
Каталог - Филми
</td>
</tr>
<tr>
<td colspan="6" align="center">
<br />
<form action="search.php" method="get">
<input type="text" name="s" />
<input style="font-weight: bold; border: solid #666666 1px;" value="Търси" type="submit" />
</form>
<br />
<?php
echo " <table width=\"100%\" align=\"center\">
<tr>
<td colspan=\"8\" align=\"center\" class=\"dve\">
Жанрове
</td>
</tr>
<tr>";
$i="0";
$nared="8";
$query="SELECT * FROM janr";
$result=@mysql_query($query);
while ( $red = @mysql_fetch_array( $result )){
$ime = $red[name];
$id = $red[id];
$imeto1 = $red[imeto];
$i++;
$width=ceil(100/$nared);
echo "
<td align=\"center\">
<a href=\"category.php?id=$id\" class=\"a\">$ime</a>
</td>";
if ($i==$nared)
{echo "
</tr>
<tr>";$i=0;}}
echo "
<td colspan=\"8\">
</td>
</tr>
</table>
</td>
</tr>";

$query = " SELECT * FROM `filmi` order by id desc" . " LIMIT 1";
$result = @mysql_query($query) or die('Error, query failed');
while($row = mysql_fetch_array($result)){
if (strlen($row[zaglaviebg])>50)
{$totchki1='...';}
else
{$totchki1='';}
$kratko1 = substr($row[zaglaviebg],0,50);
if (strlen($row[rezume])>650)
{$totchki='...';}
else
{$totchki='';}
$kratko = substr($row[rezume],0,650);
echo ("
<tr>
<td valign=\"top\" width=\"150\">
<table cellpadding=\"10\" align=\"center\">
<tr>
<td class=\"dve\">
<img src=\"./images/$row[poster]\" width=\"150\" class=\"border\" alt=\"\" />
</td>
</tr>
</table>
</td>
<td valign=\"top\" width=\"450\">
<table width=\"100%\">
<tr>
<td align=\"center\" width=\"100%\" class=\"dve\">
$kratko1 $totchki1
</td>
<td class=\"dve\">
<a href=\"movies.php?id=$row[id]\" class=\"a\">INFO</a>
</td>
</tr>
<tr>
<td colspan=\"2\" align=\"left\">
<b>$row[zaglaviebg]</b><br />
($row[zaglavieus])<br /><br />
<b>Резюме:</b> $kratko $totchki
</td>
</tr>
</table>
</td>
</tr>");}?>
<tr>
<td colspan="2" class="dve" align="center">
Админ панел
</td>
</tr>
<tr>
<td colspan="2" align="center">
<br />
<a href="./admin/write.php" class="a">Добави нова информация в каталога</a> <br /><br />
<a href="./admin/index.php" class="a">Редактирай информацията в каталога</a>
<br /><br />
<form action="print.php" method="get">
<select name="0">
<option selected="selected" value="">Индекс каталог от филми:</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
<input style="font-weight: bold; border: solid #666666 1px;" value="Напред" type="submit" />
</form>
<br />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
Created by <a href="http://psnbg.com/" class="a">PSN BG</a> | 2008 | valid <a rel="nofollow" href="http://validator.w3.org/check?uri=referer" class="a">XHTML 1.0</a> and <a rel="nofollow" href="http://jigsaw.w3.org/css-validator/check/referer" class="a">CSS</a>
</td>
</tr>
</table>
</body>
</html>


category.php
<?php $id2 = $_GET['id']; @include("./config.php"); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="bg" xml:lang="bg" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Филмов каталог</title>
<meta name="Generator" content="notepad++" />
<meta name="Author" content="Productions Staf Networks - Bulgaria. All rights reserved." />
<meta name="Owner" content="Stanislav Dimov" />
<meta name="Рobots" content="index, follow" />
<meta name="Revisit-After" content="1 days" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link href="./files/style.css" rel="StyleSheet" type="text/css" />
</head>
<body>
<table align="center" border="1" class="table1" cellpadding="8" >
<tr>
<td colspan="2" align="center">
<table align="center" class="table" width="600">
<tr>
<td colspan="2" class="edno" height="25" align="left" width="100%">
Каталог - Филми
</td>
</tr>
<tr>
<td colspan="6" align="center">
<br />
<form action="search.php" method="get">
<input type="text" name="s" />
<input style="font-weight: bold; border: solid #666666 1px;" value="Търси" type="submit" />
</form>
<br />
<?php
@mysql_connect($host,$user,$password);
@mysql_select_db($db);
@mysql_query("SET CHARACTER SET cp1251") or die( "Не мога да избера БД");
echo " <table width=\"100%\" align=\"center\">
<tr>
<td colspan=\"8\" align=\"center\" class=\"dve\">
Жанрове
</td>
</tr>
<tr>";
$i = "0";
$nared = "8";
$query = "SELECT * FROM janr";
$result = @mysql_query($query);
while ( $red = @mysql_fetch_array( $result )){
$ime = $red[name];
$id = $red[id];
$imeto1 = $red[imeto];
$i++;
$width = ceil(100/$nared);
echo "
<td align=\"center\">
<a href=\"category.php?id=$id\" class=\"a\">$ime</a>
</td>";
if ($i == $nared) {echo "</tr><tr>";$i = 0;}
}
echo "
<td colspan=\"8\">
</td>
</tr>
</table>
</td>
</tr>";
$id3 = ("c$id2");
$broinastranica = 5;
$pageNum = 1;
if(isset($_GET['page'])){$pageNum = $_GET['page'];}
$redove = ($pageNum - 1) * $broinastranica ;
$edit =$_GET['id'];
$query = " SELECT * FROM `filmi` WHERE `$id3` = '1' order by id desc" . " LIMIT $redove, $broinastranica";
$result = @mysql_query($query) or die('');
while($row = @mysql_fetch_array($result)){
if (strlen($row[zaglaviebg])>50)
{$totchki1 ='...';}
else
{$totchki1 ='';}
$kratko1 = substr($row[zaglaviebg],0,50);
if (strlen($row[rezume])>650)
{$totchki ='...';}
else
{$totchki ='';}
$kratko = substr($row[rezume],0,650);
echo ("
<tr>
<td valign=\"top\" width=\"150\">
<table cellpadding=\"10\" align=\"center\">
<tr>
<td class=\"dve\">
<img src=\"./images/$row[poster]\" width=\"150\" class=\"border\" alt=\"\" />
</td>
</tr>
</table>
</td>
<td valign=\"top\" width=\"450\">
<table align=\"center\" width=\"100%\">
<tr>
<td width=\"100%\" class=\"dve\">
<center>
$kratko1 $totchki1
</center>
</td>
<td class=\"dve\">
<a href=\"movies.php?id=$row[id]\" class=\"a\">INFO</a>
</td>
</tr>
<tr>
<td colspan=\"2\" align=\"left\">
<b>$row[zaglaviebg]</b><br />
($row[zaglavieus])<br /><br />
<b>Резюме:</b> $kratko $totchki
</td>
</tr>
</table>
</td>
</tr>");}
$query = "SELECT COUNT(id) AS numrows FROM `filmi` WHERE $id3 = '1' order by id desc";
$result = mysql_query($query) or die("Сайтът не може да се свърже към базата данни 3");
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$numrows = $row['numrows'];
$maxPage = ceil($numrows/$broinastranica);
$self = ("category.php?id=$id2");
if ($pageNum > 1){
$page = $pageNum - 1;
$predishna = "<a href=\"$self&page=$page\" class=\"a\">Предишна</a> ";
$parva = "<a href=\"$self&page=1\" class=\"a\">Първа</a> ";}
else{
$predishna = '';
$parva = '';}
if ($pageNum < $maxPage){
$page = $pageNum + 1;
$sledvashta = " <a href=\"$self&page=$page\" class=\"a\">Следваща</a>";
$posledna = " <a href=\"$self&page=$maxPage\" class=\"a\">Последна</a>";}
else{
$sledvashta = '';
$posledna = '';}
echo ("
<tr>
<td colspan=\"2\" align=\"center\" class=\"dve\">");
echo $parva . $predishna . $sledvashta . $posledna;
?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<a href="index.php" class="a">Начална страница</a>
</td>
<td align="right">
Created by <a href="http://psnbg.com/" class="a">PSN BG</a> | 2008 | valid <a rel="nofollow" href="http://validator.w3.org/check?uri=referer" class="a">XHTML 1.0</a> and <a rel="nofollow" href="http://jigsaw.w3.org/css-validator/check/referer" class="a">CSS</a>
</td>
</tr>
</table>
</body>
</html>


movies.php
<?php $getid = $_GET['id']; if($getid == ''){exit;} @include("./config.php");
$connection = @mysql_connect($host,$user,$password);
@mysql_select_db($db);
@mysql_query("SET CHARACTER SET cp1251") or die( "Не мога да избера БД");
$sql = "SELECT * FROM filmi WHERE id = '$getid'";
$result = mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result)) {
$kategoriq = $sql -> kategoriq;
$seriq = $sql -> seriq;
$nomer = $sql -> nomer;
$zaglaviebg = $sql -> zaglaviebg;
$zaglavieus = $sql -> zaglavieus;
$poster = $sql -> poster;
$wreme = $sql -> wreme;
$godina = $sql -> godina;
$dyrjawa = $sql -> dyrjawa;
$link = $sql -> link;
$reiting = $sql -> reiting;
$rejis = $sql -> rejis;
$roli = $sql -> roli;
$rezume = $sql -> rezume;
$dopylnitelno = $sql -> dopylnitelno;
$nositel = $sql -> nositel;
$broinositeli = $sql -> broinositeli;
$c1 = $sql -> c1;
$c2 = $sql -> c2;
$c3 = $sql -> c3;
$c4 = $sql -> c4;
$c5 = $sql -> c5;
$c6 = $sql -> c6;
$c7 = $sql -> c7;
$c8 = $sql -> c8;
$c9 = $sql -> c9;
$c10 = $sql -> c10;
$c11 = $sql -> c11;
$c12 = $sql -> c12;
$c13 = $sql -> c13;
$c14 = $sql -> c14;
$c15 = $sql -> c15;
$c16 = $sql -> c16;
$c17 = $sql -> c17;
$c18 = $sql -> c18;
$c19 = $sql -> c19;
$c20 = $sql -> c20;
$c21 = $sql -> c21;
$c22 = $sql -> c22;
$c23 = $sql -> c23;
$c24 = $sql -> c24;
}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="bg" xml:lang="bg" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Филмов каталог</title>
<meta name="Generator" content="notepad++" />
<meta name="Author" content="Productions Staf Networks - Bulgaria. All rights reserved." />
<meta name="Owner" content="Stanislav Dimov" />
<meta name="Рobots" content="index, follow" />
<meta name="Revisit-After" content="1 days" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link href="./files/style.css" rel="StyleSheet" type="text/css" />
</head>
<body>
<table align="center" class="table1" cellpadding="8">
<tr>
<td colspan="2">
<table align="center" class="table" border="0" width="600">
<tr>
<td colspan="2" class="edno" height="25">
Каталог - Филми
</td>
</tr>
<tr>
<td valign="top" width="150">
<table cellpadding="10" align="center">
<tr>
<td class="dve">
<a href="./images/<?php echo $poster; ?>" class="a"><img src="./images/<?php echo $poster; ?>" width="150" class="border" alt="No IMG !" /></a>
</td>
</tr>
<tr>
<td>
<b>::. Носител:</b> <?php echo $nositel; ?><br />
<b>::. Брой:</b> <?php echo $broinositeli; ?>
<br /><a href="print-oblojka.php?id=<?php echo $getid; ?>" class="a"><img src="./images/print.gif" border="0" alt="No IMG !" /></a>
</td>
</tr>
</table>
</td>
<td valign="top" width="450">
<table align="center" width="100%">
<tr>
<td width="100%" class="dve">
<center><?php echo $zaglaviebg; ?> / <?php echo $zaglavieus; ?></center>
</td>
<td class="dve"><?php echo$kategoriq?>/<?php echo $seriq; ?>/<?php echo $nomer; ?> </td>
</tr>
<tr>
<td colspan="2">
<b><?php echo $zaglaviebg; ?></b><br />
(<?php echo $zaglavieus; ?>)<br /><br />
<b>::. Държава:</b> <?php echo $dyrjawa; ?><br />
<b>::. Година:</b> <?php echo $godina; ?><br />
<b>::. Времетраене:</b> <?php echo $wreme; ?> минути<br /><br />
<b>::. Жанрове:</b> <?php
if(strpos($c1, "1") !== false){print('<a href="category.php?id=1" class="a">Комедия</a> ');};
if(strpos($c2, "1") !== false){print('<a href="category.php?id=2" class="a">Трилър</a> ');};
if(strpos($c3, "1") !== false){print('<a href="category.php?id=3" class="a">Романтичен</a> ');};
if(strpos($c4, "1") !== false){print('<a href="category.php?id=4" class="a">Късометражен</a> ');};
if(strpos($c5, "1") !== false){print('<a href="category.php?id=5" class="a">Ужаси</a> ');};
if(strpos($c6, "1") !== false){print('<a href="category.php?id=6" class="a">Психо</a> ');};
if(strpos($c7, "1") !== false){print('<a href="category.php?id=7" class="a">Мистерия</a> ');};
if(strpos($c8, "1") !== false){print('<a href="category.php?id=8" class="a">Исторически</a> ');};
if(strpos($c9, "1") !== false){print('<a href="category.php?id=9" class="a">Документален</a> ');};
if(strpos($c10, "1") !== false){print('<a href="category.php?id=10" class="a">Семеен</a> ');};
if(strpos($c11, "1") !== false){print('<a href="category.php?id=11" class="a">Приключенски</a> ');};
if(strpos($c12, "1") !== false){print('<a href="category.php?id=12" class="a">Еротичeн</a> ');};
if(strpos($c13, "1") !== false){print('<a href="category.php?id=13" class="a">Драма</a> ');};
if(strpos($c14, "1") !== false){print('<a href="category.php?id=14" class="a">Уестърн</a> ');};
if(strpos($c15, "1") !== false){print('<a href="category.php?id=15" class="a">Екшън</a> ');};
if(strpos($c16, "1") !== false){print('<a href="category.php?id=16" class="a">Музикален</a> ');};
if(strpos($c17, "1") !== false){print('<a href="category.php?id=17" class="a">Криминален</a> ');};
if(strpos($c18, "1") !== false){print('<a href="category.php?id=18" class="a">Анимация</a> ');};
if(strpos($c19, "1") !== false){print('<a href="category.php?id=19" class="a">Фантастика</a> ');};
if(strpos($c20, "1") !== false){print('<a href="category.php?id=20" class="a">Детски</a> ');};
if(strpos($c21, "1") !== false){print('<a href="category.php?id=21" class="a">Сериал</a> ');};
if(strpos($c22, "1") !== false){print('<a href="category.php?id=22" class="a">Военен</a> ');};
if(strpos($c23, "1") !== false){print('<a href="category.php?id=23" class="a">Пародия</a> ');};
if(strpos($c24, "1") !== false){print('<a href="category.php?id=24" class="a">Друг</a> ');};
?><br /><br />
<b>::. IMDB:</b> <a href="<?php echo $link; ?>" class="a"><?php echo $link; ?>
</a><br />
<b>::. Рейтинг:</b> <?php
if(strpos($reiting, "1") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (1/10) Трагичен");};
if(strpos($reiting, "2") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (2/10) Аматьорски");};
if(strpos($reiting, "3") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (3/10) Среден");};
if(strpos($reiting, "4") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (4/10) Недовършен");};
if(strpos($reiting, "5") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (5/10) Добър");};
if(strpos($reiting, "6") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (6/10) Много добър");};
if(strpos($reiting, "7") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (7/10) Отличен");};
if(strpos($reiting, "8") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (8/10) Професионален");};
if(strpos($reiting, "9") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (9/10) Изключителен");};
if(strpos($reiting, "0") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /> (10/10) Върховен");};
?><br /><br />
<b>::. Режисьор:</b> <?php echo $rejis; ?><br />
<b>::. В ролите:</b> <?php echo $roli; ?><br /><br />
<b>::. Резюме:</b> <?php echo $rezume; ?><br />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<br /><?php echo $dopylnitelno; ?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<a href="index.php" class="a">Начална страница</a>
</td>
<td align="right">
Created by <a href="http://psnbg.com/" class="a">PSN BG</a> | 2008 | valid <a rel="nofollow" href="http://validator.w3.org/check?uri=referer" class="a">XHTML 1.0</a> and <a rel="nofollow" href="http://jigsaw.w3.org/css-validator/check/referer" class="a">CSS</a>
</td>
</tr>
</table>
</body>
</html>


print.php
<?php @include("./config.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="bg" xml:lang="bg" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Филмов каталог</title>
<meta name="Generator" content="notepad++" />
<meta name="Author" content="Productions Staf Networks - Bulgaria. All rights reserved." />
<meta name="Owner" content="Stanislav Dimov" />
<meta name="Рobots" content="index, follow" />
<meta name="Revisit-After" content="1 days" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link href="./files/print.css" rel="StyleSheet" type="text/css" />
<script src="./files/print.js" type="text/javascript"></script>
</head>
<body>
<table align="center" >
<tr>
<td colspan="3">
<center><b>КАТАЛОГ ФИЛМИ ИНДЕКС</b></center><br />
</td>
</tr>
<?php
@mysql_connect($host,$user,$password);
@mysql_select_db($db);
@mysql_query("SET CHARACTER SET cp1251") or die( "Не мога да избера БД");
$c = $_GET['0'];
if ($c == "1")
{$vid = "1";}
elseif ($c == "2")
{$vid = "2";}
elseif ($c == "3")
{$vid = "3";}
elseif ($c == "4")
{$vid = "4";}
elseif ($c == "5")
{$vid = "5";}
elseif ($c == "6")
{$vid = "6";}
elseif ($c == "7")
{$vid = "7";}
elseif ($c == "8")
{$vid = "8";}
elseif ($c == "9")
{$vid = "9";}
elseif ($c == "10")
{$vid = "10";}
$query = "SELECT * FROM `filmi` WHERE `kategoriq` = '$vid'";
$result = @mysql_query($query);
$num = @mysql_num_rows($result);
@mysql_close();
if($num>0){
$i=0;
while ($i < $num)
{
$kategoriq = mysql_result($result,$i,"kategoriq");
$seriq = mysql_result($result,$i,"seriq");
$nomer = mysql_result($result,$i,"nomer");
$zaglaviebg = mysql_result($result,$i,"zaglaviebg");
$zaglavieus = mysql_result($result,$i,"zaglavieus");
?>
<tr>
<td > <?php echo$kategoriq?>/<?php echo $seriq; ?>/<?php echo $nomer; ?>
</td>
<td > <?php echo $zaglaviebg; ?>
</td>
<td> <?php echo $zaglavieus; ?>
</td>
</tr>
<?php $i++;}} ?>
<tr>
<td colspan="3">
<br />
</td>
</tr>
</table>
</body>
</html>


print-oblojka.php
<?php $getid = $_GET['id']; if($getid == ''){exit;} @include("./config.php");
$connection = @mysql_connect($host,$user,$password);
@mysql_select_db($db);
@mysql_query("SET CHARACTER SET cp1251") or die( "Не мога да избера БД");
$sql = "SELECT * FROM filmi WHERE id = '$getid'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result)) {
$kategoriq = $sql -> kategoriq;
$seriq = $sql -> seriq;
$nomer = $sql -> nomer;
$zaglaviebg = $sql -> zaglaviebg;
$zaglavieus = $sql -> zaglavieus;
$poster = $sql -> poster;
$wreme = $sql -> wreme;
$godina = $sql -> godina;
$dyrjawa = $sql -> dyrjawa;
$reiting = $sql -> reiting;
$rejis = $sql -> rejis;
$roli = $sql -> roli;
$rezume = $sql -> rezume;
$nositel = $sql -> nositel;
$broinositeli = $sql -> broinositeli;
$c1 = $sql -> c1;
$c2 = $sql -> c2;
$c3 = $sql -> c3;
$c4 = $sql -> c4;
$c5 = $sql -> c5;
$c6 = $sql -> c6;
$c7 = $sql -> c7;
$c8 = $sql -> c8;
$c9 = $sql -> c9;
$c10 = $sql -> c10;
$c11 = $sql -> c11;
$c12 = $sql -> c12;
$c13 = $sql -> c13;
$c14 = $sql -> c14;
$c15 = $sql -> c15;
$c16 = $sql -> c16;
$c17 = $sql -> c17;
$c18 = $sql -> c18;
$c19 = $sql -> c19;
$c20 = $sql -> c20;
$c21 = $sql -> c21;
$c22 = $sql -> c22;
$c23 = $sql -> c23;
$c24 = $sql -> c24;
if (strlen($zaglaviebg)>40)
{$totchki1 = '...';}
else
{$totchki1 = '';}
$kratko1 = substr($zaglaviebg,0,40);
if (strlen($rezume)>335)
{$totchkii = '...';}
else
{$totchkii = '';}
$kratkoi = substr($rezume,0,335);

if (strlen($roli)>100)
{$totchki1r = '... и др.';}
else
{$totchki1r = '';}
$kratko1r = substr($roli,0,100);
}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="bg" xml:lang="bg" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Филмов каталог</title>
<meta name="Generator" content="notepad++" />
<meta name="Author" content="Productions Staf Networks - Bulgaria. All rights reserved." />
<meta name="Owner" content="Stanislav Dimov" />
<meta name="Рobots" content="index, follow" />
<meta name="Revisit-After" content="1 days" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link href="./files/print1.css" rel="StyleSheet" type="text/css" />
<script src="./files/print.js" type="text/javascript"></script>
</head>
<body>
<table align="center" class="table1" cellpadding="8" width="420">
<tr>
<td colspan="2" >
<table align="center" class="table" border="1" width="420">
<tr>
<td colspan="2" >
<table>
<tr>
<td width="100%" class="dve">
<center><?php echo $kratko1; echo $totchki1;?></center>
</td>
<td class="dve">
<?php echo$kategoriq?>/<?php echo $seriq; ?>/<?php echo $nomer; ?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" width="150">
<table cellpadding="10" align="center" border="0" width="150">
<tr>
<td class="dve">
<img src="./images/<?php echo $poster; ?>" width="150" class="border" alt="No IMG !" />
</td>
</tr>
</table>
</td>
<td valign="top" width="280">
<table align="center" width="100%">
<tr>
<td colspan="2" >
<b><?php echo $zaglaviebg; ?></b><br />
(<?php echo $zaglavieus; ?>)<br /><br />
<b>::. Носител:</b> <?php echo $nositel; ?><br />
<b>::. Брой:</b> <?php echo $broinositeli; ?><br /><br />
<b>::. Държава:</b> <?php echo $dyrjawa; ?><br />
<b>::. Година:</b> <?php echo $godina; ?><br />
<b>::. Времетраене:</b> <?php echo $wreme; ?> минути<br /><br />
<b>::. Режисьор:</b> <?php echo $rejis; ?><br />
<b>::. В ролите:</b> <?php echo $kratko1r; echo $totchki1r; ?><br /><br />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<b>::. Рейтинг:</b> <?php
if(strpos($reiting, "1") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (1/10) Трагичен");};
if(strpos($reiting, "2") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (2/10) Аматьорски");};
if(strpos($reiting, "3") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (3/10) Среден");};
if(strpos($reiting, "4") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (4/10) Недовършен");};
if(strpos($reiting, "5") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (5/10) Добър");};
if(strpos($reiting, "6") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (6/10) Много добър");};
if(strpos($reiting, "7") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (7/10) Отличен");};
if(strpos($reiting, "8") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (8/10) Професионален");};
if(strpos($reiting, "9") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/badstar.gif\" alt=\"\" /> (9/10) Изключителен");};
if(strpos($reiting, "0") !== false){print("<img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /><img src=\"images/star.gif\" alt=\"\" /> (10/10) Върховен");};
?><br /><br />
<b>::. Жанрове:</b> <?php
if(strpos($c1, "1") !== false){print('Комедия ');};
if(strpos($c2, "1") !== false){print('Трилър ');};
if(strpos($c3, "1") !== false){print('Романтичен ');};
if(strpos($c4, "1") !== false){print('Късометражен ');};
if(strpos($c5, "1") !== false){print('Ужаси ');};
if(strpos($c6, "1") !== false){print('Психо ');};
if(strpos($c7, "1") !== false){print('Мистерия ');};
if(strpos($c8, "1") !== false){print('Исторически ');};
if(strpos($c9, "1") !== false){print('Документален ');};
if(strpos($c10, "1") !== false){print('Семеен ');};
if(strpos($c11, "1") !== false){print('Приключенски ');};
if(strpos($c12, "1") !== false){print('Еротичeн ');};
if(strpos($c13, "1") !== false){print('Драма ');};
if(strpos($c14, "1") !== false){print('Уестърн ');};
if(strpos($c15, "1") !== false){print('Екшън ');};
if(strpos($c16, "1") !== false){print('Музикален ');};
if(strpos($c17, "1") !== false){print('Криминален ');};
if(strpos($c18, "1") !== false){print('Анимация ');};
if(strpos($c19, "1") !== false){print('Фантастика ');};
if(strpos($c20, "1") !== false){print('Детски ');};
if(strpos($c21, "1") !== false){print('Сериал ');};
if(strpos($c22, "1") !== false){print('Военен ');};
if(strpos($c23, "1") !== false){print('Пародия ');};
if(strpos($c24, "1") !== false){print('Друг ');};
?><br /><br />
<b>::. Резюме:</b> <?php echo $kratkoi; echo $totchkii; ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>


search.php
<?php @include("./config.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="bg" xml:lang="bg" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Филмов каталог</title>
<meta name="Generator" content="notepad++" />
<meta name="Author" content="Productions Staf Networks - Bulgaria. All rights reserved." />
<meta name="Owner" content="Stanislav Dimov" />
<meta name="Рobots" content="index, follow" />
<meta name="Revisit-After" content="1 days" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link href="./files/style.css" rel="StyleSheet" type="text/css" />
</head>
<body>
<table align="center" border="1" class="table1" cellpadding="8">
<tr>
<td colspan="2" align="center">
<table align="center" class="table" border="1" width="600">
<tr>
<td colspan="2" class="edno" height="25" align="left" width="100%">
Каталог - Филми
</td>
</tr><?php
@mysql_connect($host,$user,$password);
@mysql_select_db($db);
@mysql_query("SET CHARACTER SET cp1251") or die( "Не мога да избера БД");
$search=$_GET['s'];
$query="SELECT * FROM `filmi` WHERE `zaglaviebg` rlike '$search' or `zaglavieus` rlike '$search'";
$result=@mysql_query($query);
$num=@mysql_num_rows($result);
@mysql_close();
if($num>0){
$i=0;
while ($i < $num)
{
$id=mysql_result($result,$i,"id");
$zaglaviebg=mysql_result($result,$i,"zaglaviebg");
$poster=mysql_result($result,$i,"poster");
$zaglavieus=mysql_result($result,$i,"zaglavieus");
$rezume=mysql_result($result,$i,"rezume");
if (strlen($zaglaviebg)>50)
{$totchki1='...';}
else
{$totchki1='';}
$kratko1 = substr($zaglaviebg,0,50);
if (strlen($rezume)>650)
{$totchki='...';}
else
{$totchki='';}
$kratko = substr($rezume,0,650);?>
<tr>
<td valign="top" width="150">
<table cellpadding="10" align="center">
<tr>
<td class="dve">
<img src="./images/<?php echo $poster; ?>" width="150" class="border" alt="No IMG !" />
</td>
</tr>
</table>
</td>
<td valign="top" width="450">
<table align="center" width="100%">
<tr>
<td width="100%" class="dve" align="left">
<center><?php echo $kratko1; ?> <?php echo $totchki1; ?></center>
</td>
<td class="dve"><a href="movies.php?id=<?php echo $id; ?>" class="a">INFO</a>
</td>
</tr>
<tr>
<td colspan="2" align="left">
<b><?php echo $zaglaviebg; ?></b><br />
(<?php echo $zaglavieus; ?>)<br /><br />
<b>Резюме:</b> <?php echo $kratko; ?> <?php echo $totchki; ?>
</td>
</tr>
</table>
</td>
</tr><?php $i++;}}else {echo "
<tr>
<td valign=\"top\" width=\"600\" align=\"center\">
<br /><b>Нищо не е намерено!</b><br /><br />
Опитайте отново с други изисквания.<br /><br />
</td>
</tr>";}?>
</table>
</td>
</tr>
<tr>
<td>
<a href="index.php" class="a">Начална страница</a>
</td>
<td align="right">
Created by <a href="http://psnbg.com/" class="a">PSN BG</a> | 2008 | valid <a rel="nofollow" href="http://validator.w3.org/check?uri=referer" class="a">XHTML 1.0</a> and <a rel="nofollow" href="http://jigsaw.w3.org/css-validator/check/referer" class="a">CSS</a>
</td>
</tr>
</table>
</body>
</html>


/admin/del.php
<?php
$id=$_GET['id'];
include("../config.php");
$ipaddress = getenv("REMOTE_ADDR");
if ($ipaddress!=$ip)
{exit;}
@mysql_connect($host,$user,$password);
@mysql_select_db($db);
@mysql_query("SET CHARACTER SET cp1251") or die( "Не мога да избера БД");
$query ="DELETE FROM filmi WHERE id='$id'";
mysql_query($query);
header("Location: index.php");
?>


/admin/edit.php
<?php
$edit = $_POST['edit'];
$id = $_POST['id'];
@include("../config.php");
$ipaddress = getenv("REMOTE_ADDR");
if ($ipaddress!=$ip)
{exit;}
@mysql_connect($host,$user,$password);
@mysql_select_db($db);
@mysql_query("SET CHARACTER SET cp1251") or die( "Не мога да избера БД");
$query = "UPDATE `filmi` SET `kategoriq`='{$_POST['kategoriq']}', `seriq`='{$_POST['seriq']}', `nomer`='{$_POST['nomer']}', `zaglaviebg`='{$_POST['zaglaviebg']}', `poster`='{$_POST['file']}', `zaglavieus`='{$_POST['zaglavieus']}', `wreme`='{$_POST['wreme']}', `godina`='{$_POST['godina']}', `dyrjawa`='{$_POST['dyrjawa']}', `rejis`='{$_POST['rejis']}', `roli`='{$_POST['roli']}', `link`='{$_POST['link']}', `rezume`='{$_POST['rezume']}', `dopylnitelno`='{$_POST['dopylnitelno']}', `nositel`='{$_POST['nositel']}', `broinositeli`='{$_POST['broinositeli']}', `c1`='{$_POST['1']}', `c2`='{$_POST['2']}', `c3`='{$_POST['3']}', `c4`='{$_POST['4']}', `c5`='{$_POST['5']}', `c6`='{$_POST['6']}', `c7`='{$_POST['7']}', `c8`='{$_POST['8']}', `c9`='{$_POST['9']}', `c10`='{$_POST['10']}', `c11`='{$_POST['11']}', `c12`='{$_POST['12']}', `c13`='{$_POST['13']}', `c14`='{$_POST['14']}', `c15`='{$_POST['15']}', `c16`='{$_POST['16']}', `c17`='{$_POST['17']}', `c18`='{$_POST['18']}', `c19`='{$_POST['19']}', `c20`='{$_POST['20']}', `c21`='{$_POST['21']}', `c22`='{$_POST['22']}', `c23`='{$_POST['23']}', `c24`='{$_POST['24']}', `reiting`='{$_POST['reiting']}' WHERE `id`={$_POST['id']} ";
@mysql_query ('SET NAMES CP1251');
@mysql_query($query);
@mysql_close();
@header("Location: index.php");
?>


/admin/index.php
<?php @include("../config.php"); $ipaddress = getenv("REMOTE_ADDR");
if ($ipaddress!=$ip)
{exit;}?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="bg" xml:lang="bg" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Филмов каталог</title>
<meta name="Generator" content="notepad++" />
<meta name="Author" content="Productions Staf Networks - Bulgaria. All rights reserved." />
<meta name="Owner" content="Stanislav Dimov" />
<meta name="Рobots" content="index, follow" />
<meta name="Revisit-After" content="1 days" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link href="../files/style.css" rel="StyleSheet" type="text/css" />
</head>
<body>
<table align="center" class="table1" cellpadding="8" border="1" width="600">
<tr>
<td colspan="2">
<table align="center" class="table" border="1" width="100%" >
<tr>
<td class="edno" height="25" colspan="2">
Админ панел
</td>
</tr>
<?php
@mysql_connect($host,$user,$password);
@mysql_select_db($db);
@mysql_query("SET CHARACTER SET cp1251") or die( "Не мога да избера БД");
$broinastranica = 18;
$pageNum = 1;
if(isset($_GET['page']))
{
$pageNum = $_GET['page'];
}
$redove = ($pageNum - 1) * $broinastranica ;
$query = " SELECT * FROM `filmi` order by `id` desc" . " LIMIT $redove, $broinastranica";
$result = @mysql_query($query) or die('Error, query failed');
while($row = @mysql_fetch_array($result))
{
echo ' <tr>
<td style="border-top:1px solid #999999;">
'.substr($row['zaglaviebg'],0 , 40).' / '.substr($row['zaglavieus'],0 , 40).'
</td>
<td align="right" width="51" style="border-top:1px solid #999999;">
<a onclick="return confirmSubmit()" href="del.php?id='.$row['id'].'"><img src="../images/delete.gif" alt="" border="0" /></a> <a href="open.php?id='.$row['id'].'"><img src="../images/edit.gif" alt="" border="0" /></a>
</td>
</tr>';
}

$query = "SELECT COUNT(id) AS numrows FROM `filmi`";
$result = mysql_query($query) or die("Сайтът не може да се свърже към базата данни 3");
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$numrows = $row['numrows'];


$maxPage = ceil($numrows/$broinastranica);

$self = ("index.php?0=1");

if ($pageNum > 1)
{
$page = $pageNum - 1;
$predishna = "<a href=\"$self&page=$page\" class=\"a\">Предишна</a> ";

$parva = "<a href=\"$self&page=1\" class=\"a\">Първа</a> ";
}
else
{
$predishna = ' ';
$parva = ' ';
}

if ($pageNum < $maxPage)
{
$page = $pageNum + 1;
$sledvashta = " <a href=\"$self&page=$page\" class=\"a\">Следваща</a>";

$posledna = " <a href=\"$self&page=$maxPage\" class=\"a\">Последна</a>";
}
else
{
$sledvashta = ' ';
$posledna = ' ';
}
echo ("
<tr>
<td colspan=\"2\" align=\"center\" class=\"dve\">");
echo $parva . $predishna . $sledvashta . $posledna;

?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<a href="../index.php" class="a">Начална страница</a>
</td>
<td align="right">
Created by <a href="http://psnbg.com/" class="a">PSN BG</a> | 2008 | valid <a rel="nofollow" href="http://validator.w3.org/check?uri=referer" class="a">XHTML 1.0</a> and <a rel="nofollow" href="http://jigsaw.w3.org/css-validator/check/referer" class="a">CSS</a>
</td>
</tr>
</table>
</body>
</html>


/admin/open.php
<?php
$id = $_GET['id'] ;
if ($id == '')
{exit;}
@include("../config.php");
$ipaddress = getenv("REMOTE_ADDR");
if ($ipaddress!=$ip)
{exit;}
@mysql_connect($host,$user,$password);
@mysql_select_db($db);
@mysql_query("SET CHARACTER SET cp1251") or die( "Не мога да избера БД");
$query = "SELECT * from filmi where id like '$id' ";
$result = @mysql_query($query) or die('Error, query failed');
@mysql_close();
$kategoriq = @mysql_result($result,0,"kategoriq");
$seriq = @mysql_result($result,0,"seriq");
$nomer = @mysql_result($result,0,"nomer");
$zaglaviebg = @mysql_result($result,0,"zaglaviebg");
$zaglavieus = @mysql_result($result,0,"zaglavieus");
$poster = @mysql_result($result,0,"poster");
$wreme = @mysql_result($result,0,"wreme");
$godina = @mysql_result($result,0,"godina");
$dyrjawa = @mysql_result($result,0,"dyrjawa");
$link = @mysql_result($result,0,"link");
$reiting = @mysql_result($result,0,"reiting");
$rejis = @mysql_result($result,0,"rejis");
$roli = @mysql_result($result,0,"roli");
$nositel = @mysql_result($result,0,"nositel");
$broinositeli = @mysql_result($result,0,"broinositeli");
$rezume = @mysql_result($result,0,"rezume");
$dopylnitelno = @mysql_result($result,0,"dopylnitelno");
$c1 = @mysql_result($result,0,"c1");
$c2 = @mysql_result($result,0,"c2");
$c3 = @mysql_result($result,0,"c3");
$c4 = @mysql_result($result,0,"c4");
$c5 = @mysql_result($result,0,"c5");
$c6 = @mysql_result($result,0,"c6");
$c7 = @mysql_result($result,0,"c7");
$c8 = @mysql_result($result,0,"c8");
$c9 = @mysql_result($result,0,"c9");
$c10 = @mysql_result($result,0,"c10");
$c11 = @mysql_result($result,0,"c11");
$c12 = @mysql_result($result,0,"c12");
$c13 = @mysql_result($result,0,"c13");
$c14 = @mysql_result($result,0,"c14");
$c15 = @mysql_result($result,0,"c15");
$c16 = @mysql_result($result,0,"c16");
$c17 = @mysql_result($result,0,"c17");
$c18 = @mysql_result($result,0,"c18");
$c19 = @mysql_result($result,0,"c19");
$c20 = @mysql_result($result,0,"c20");
$c21 = @mysql_result($result,0,"c21");
$c22 = @mysql_result($result,0,"c22");
$c23 = @mysql_result($result,0,"c23");
$c24 = @mysql_result($result,0,"c24");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="bg" xml:lang="bg" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Филмов каталог</title>
<meta name="Generator" content="notepad++" />
<meta name="Author" content="Productions Staf Networks - Bulgaria. All rights reserved." />
<meta name="Owner" content="Stanislav Dimov" />
<meta name="Рobots" content="index, follow" />
<meta name="Revisit-After" content="1 days" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link href="../files/style.css" rel="StyleSheet" type="text/css" />
<script src="../files/javascript.js" type="text/javascript"></script>
</head>
<body>
<br />
<table class="table1" align="center" border="0" cellpadding="8" cellspacing="0" width="770">
<tr>
<td colspan="2">
<form method="post" name="edit" action="edit.php">
<input type="hidden" name="id" value="<?php echo $id ?>" />
<table border="1" class="table" align="center">
<tr>
<td colspan="4" align="center" class="dve">
Добавяне на нова информация
</td>
</tr>
<tr>
<td>Категория</td>
<td>
<select name="kategoriq" >
<option selected="selected" value="<? echo $kategoriq ?>"><? echo $kategoriq ?></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
Серия
<select name="seriq">
<option selected="selected" value="<? echo $seriq ?>"><? echo $seriq ?></option>
<option value="A">А</option>
<option value="Б">Б</option>
<option value="В">В</option>
<option value="Г">Г</option>
<option value="Д">Д</option>
<option value="Е">Е</option>
<option value="Ж">Ж</option>
<option value="З">З</option>
<option value="И">И</option>
<option value="Й">Й</option>
<option value="К">К</option>
<option value="Л">Л</option>
<option value="М">М</option>
<option value="Н">Н</option>
<option value="О">О</option>
<option value="П">П</option>
<option value="Р">Р</option>
<option value="С">С</option>
<option value="Т">Т</option>
<option value="У">У</option>
<option value="Ф">Ф</option>
<option value="Х">Х</option>
<option value="Ц">Ц</option>
<option value="Ч">Ч</option>
<option value="Ш">Ш</option>
<option value="Щ">Щ</option>
<option value="Ъ">Ъ</option>
<option value="Ь">Ь</option>
<option value="Ю">Ю</option>
<option value="Я">Я</option>
</select>
Номер
<input type="text" name="nomer" size="16" maxlength="8" value="<? echo $nomer ?>" />
</td>
<td rowspan="8">Резюме</td>
<td rowspan="8">
<textarea rows="13" cols="57" name="rezume"><? echo $rezume ?></textarea>
</td>
</tr>
<tr>
<td>Заглавие BG</td>
<td>
<input type="text" name="zaglaviebg" size="56" value="<? echo $zaglaviebg ?>" /></td>
</tr>
<tr>
<td>Заглавие US</td>
<td>
<input type="text" name="zaglavieus" size="56" value="<? echo $zaglavieus ?>" />
</td>
</tr>
<tr>
<td>Постер</td>
<td>
<input name="file" type="text" size="56" value="<? echo $poster ?>" /></td>
</tr>
<tr>
<td>Времетраене</td>
<td>
<input type="text" name="wreme" size="16" maxlength="14" value="<? echo $wreme ?>" />
минути Година
<select name="godina">
<option value="<? echo $godina ?>"><? echo $godina ?></option>
<option value="2010">2010</option><option value="2009">2009</option><option value="2008">2008</option><option value="2007">2007</option><option value="2006">2006</option><option value="2005">2005</option><option value="2004">2004</option><option value="2003">2003</option><option value="2002">2002</option><option value="2001">2001</option><option value="2000">2000</option><option value="1999">1999</option><option value="1998">1998</option><option value="1997">1997</option><option value="1996">1996</option><option value="1995">1995</option><option value="1994" >1994</option><option value="1993">1993</option><option value="1992">1992</option><option value="1991">1991</option><option value="1990">1990</option><option value="1989">1989</option><option value="1988">1988</option><option value="1987">1987</option><option value="1986">1986</option><option value="1985">1985</option><option value="1984">1984</option><option value="1983">1983</option><option value="1982">1982</option><option value="1981">1981</option><option value="1980">1980</option><option value="1979">1979</option><option value="1978">1978</option><option value="1977">1977</option><option value="1976">1976</option><option value="1975">1975</option><option value="1974">1974</option><option value="1973">1973</option><option value="1972">1972</option><option value="1971">1971</option><option value="1970">1970</option><option value="1969">1969</option><option value="1968">1968</option><option value="1967">1967</option><option value="1966">1966</option><option value="1965">1965</option><option value="1964">1964</option><option value="1963">1963</option><option value="1962">1962</option><option value="1961">1961</option><option value="1960">1960</option><option value="1959">1959</option><option value="1958">1958</option><option value="1957">1957</option><option value="1956">1956</option><option value="1955">1955</option><option value="1954">1954</option><option value="1953">1953</option><option value="1952">1952</option><option value="1951">1951</option><option value="1950">1950</option><option value="1949">1949</option><option value="1948">1948</option><option value="1947">1947</option><option value="1946">1946</option><option value="1945">1945</option><option value="1944">1944</option><option value="1943">1943</option><option value="1942">1942</option><option value="1941">1941</option><option value="1940">1940</option><option value="1939">1939</option><option value="1938">1938</option><option value="1937">1937</option><option value="1936">1936</option><option value="1935">1935</option><option value="1934">1934</option><option value="1933">1933</option><option value="1932">1932</option><option value="1931">1931</option><option value="1930">1930</option><option value="1929">1929</option><option value="1928">1928</option><option value="1927">1927</option><option value="1926">1926</option><option value="1925">1925</option><option value="1924">1924</option><option value="1923">1923</option><option value="1922">1922</option><option value="1921">1921</option><option value="1920">1920</option>
</select>
</td>
</tr>
<tr>
<td>Държава</td>
<td>
<input type="text" name="dyrjawa" size="56" value="<? echo $dyrjawa ?>" />
</td>
</tr>
<tr>
<td>Режиьор</td>
<td>
<input type="text" name="rejis" size="56" value="<? echo $rejis ?>" />
</td>
</tr>
<tr>
<td>В ролите</td>
<td>
<textarea rows="2" cols="53" name="roli" ><? echo $roli ?></textarea>
</td>
</tr>
<tr>
<td>Линк IMDb</td>
<td>
<input type="text" name="link" size="16" value="<? echo $link ?>" />
Рейтинг
<select name="reiting">
<option selected="selected" value="<?php
if(strpos($reiting, "1") !== false){print("1");};
if(strpos($reiting, "2") !== false){print("2");};
if(strpos($reiting, "3") !== false){print("3");};
if(strpos($reiting, "4") !== false){print("4");};
if(strpos($reiting, "5") !== false){print("5");};
if(strpos($reiting, "6") !== false){print("6");};
if(strpos($reiting, "7") !== false){print("7");};
if(strpos($reiting, "8") !== false){print("8");};
if(strpos($reiting, "9") !== false){print("9");};
if(strpos($reiting, "0") !== false){print("0");};
?>">
<?php
if(strpos($reiting, "1") !== false){print("Трагичен: 1");};
if(strpos($reiting, "2") !== false){print("Аматьорски: 2");};
if(strpos($reiting, "3") !== false){print("Среден:3");};
if(strpos($reiting, "4") !== false){print("Недовършен: 4");};
if(strpos($reiting, "5") !== false){print("Добър: 5");};
if(strpos($reiting, "6") !== false){print("Много добър: 6");};
if(strpos($reiting, "7") !== false){print("Отличен: 7");};
if(strpos($reiting, "8") !== false){print("Професионален: 8");};
if(strpos($reiting, "9") !== false){print("Изключителен: 9");};
if(strpos($reiting, "0") !== false){print("Върховен: 10");};
?>
</option>
<option value="0">Върховен: 10</option>
<option value="9">Изключителен: 9</option>
<option value="8">Професионален: 8</option>
<option value="7">Отличен: 7</option>
<option value="6">Много добър: 6</option>
<option value="5">Добър: 5</option>
<option value="4">Недовършен: 4</option>
<option value="3">Среден:3</option>
<option value="2">Аматьорски: 2</option>
<option value="1">Трагичен: 1</option>
</select>
</td>
<td rowspan="3">Друго</td>
<td rowspan="3">
<input style="font-weight: bold; border: solid #666666 1px;" type="button" name="bold" value="B " onclick="javascript: BBTag('','bold','dopylnitelno','form')" />
<input style="font-style: italic; border: solid #666666 1px;" type="button" name="italic" value="I " onclick="javascript: BBTag('[i]','italic','dopylnitelno','form')" />
<input style="text-decoration: underline; border: solid #666666 1px;" type="button" name="underline" value="U " onclick="javascript: BBTag('[u]','underline','dopylnitelno','form')" />
<input style="text-decoration: underline; border: solid #666666 1px;" type="button" name="center" value="CENTER " onclick="javascript: BBTag('[center]','center','dopylnitelno','form')" />
<input style="text-decoration: underline; border: solid #666666 1px;" type="button" name="url" value="URL " onclick="javascript: BBTag('[url]','url','dopylnitelno','form')" />
<input style="text-decoration: underline; border: solid #666666 1px;" type="button" name="img" value="IMG " onclick="javascript: BBTag('[img]','img','dopylnitelno','form')" />
<textarea rows="13" cols="57" name="dopylnitelno"><? echo $dopylnitelno ?></textarea>
</td>
</tr>
<tr>
<td>Жанрове</td>
<td>
<table width="302" border="0" >
<tr>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c1, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="1" value="1" />Комедия
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c2, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="2" value="1" />Трилър
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c3, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="3" value="1" />Романтичен
</td>
</tr>
<tr>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c4, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="4" value="1" />Късометражен
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c5, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="5" value="1" />Ужаси
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c6, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="6" value="1" />Психо
</td>
</tr>
<tr>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c7, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="7" value="1" />Мистерия
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c8, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="8" value="1" />Исторически
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c9, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="9" value="1" />Документален
</td>
</tr>
<tr>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c10, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="10" value="1" />Семеен
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c11, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="11" value="1" />Приключенски
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c12, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="12" value="1" />Еротичeн
</td>
</tr>
<tr>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c13, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="13" value="1" />Драма
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c14, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="14" value="1" />Уестърн
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c15, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="15" value="1" />Екшън
</td>
</tr>
<tr>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c16, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="16" value="1" />Музикален
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c17, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="17" value="1" />Криминален
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c18, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="18" value="1" />Анимация
</td>
</tr>
<tr>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c19, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="19" value="1" />Фантастика
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c20, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="20" value="1" />Детски
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c21, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="21" value="1" />Сериал
</td>
</tr>
<tr>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c22, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="22" value="1" />Военен
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c23, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="23" value="1" />Пародия
</td>
<td width="1"><input style="border: 0px;" <?php
if(strpos($c24, "1") !== false){print("checked=\"checked\"");};?> type="checkbox" name="24" value="1" />Друг
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>Носител</td>
<td>
<select name="nositel">
<option value="<? echo $nositel ?>"><? echo $nositel ?></option>
<option value="CD">CD</option>
<option value="DVD">DVD</option>
<option value="Касета">Касета</option>
<option value="Друг">Друг</option>
</select>
Брой носители <input type="text" name="broinositeli" size="16" maxlength="8" value="<? echo $broinositeli ?>" />
</td>
</tr>
<tr>
<td colspan="4" align="center" class="dve">
<input style="font-weight: bold; border: solid #666666 1px;" name="submit" type="submit" value="Изпрати" />
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td>
<a href="index.php" class="a">Админ панел</a>
</td>
<td align="right">
Created by <a href="http://psnbg.com/" class="a">PSN BG</a> | 2008 | valid <a rel="nofollow" href="http://validator.w3.org/check?uri=referer" class="a">XHTML 1.0</a> and <a rel="nofollow" href="http://jigsaw.w3.org/css-validator/check/referer" class="a">CSS</a>
</td>
</tr>
</table>
</body>
</html>


/admin/write.php
<?php @include("../config.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="bg" xml:lang="bg" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Филмов каталог</title>
<meta name="Generator" content="notepad++" />
<meta name="Author" content="Productions Staf Networks - Bulgaria. All rights reserved." />
<meta name="Owner" content="Stanislav Dimov" />
<meta name="Рobots" content="index, follow" />
<meta name="Revisit-After" content="1 days" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link href="../files/style.css" rel="StyleSheet" type="text/css" />
<script src="../files/javascript.js" type="text/javascript"></script>
</head>
<body>
<?php
$ipaddress = getenv("REMOTE_ADDR");
if ($ipaddress!=$ip)
{exit;}
@mysql_connect($host,$user,$password);
@mysql_select_db($db);
@mysql_query("SET CHARACTER SET cp1251") or die( "Не мога да избера БД");
if(isset($_POST['submit'])){
$kategoriq = htmlspecialchars($_POST['kategoriq']);
$seriq = htmlspecialchars($_POST['seriq']);
$nomer = htmlspecialchars($_POST['nomer']);
$zaglaviebg = htmlspecialchars($_POST['zaglaviebg']);
$zaglavieus = htmlspecialchars($_POST['zaglavieus']);
$wreme = htmlspecialchars($_POST['wreme']);
$godina = htmlspecialchars($_POST['godina']);
$dyrjawa = htmlspecialchars($_POST['dyrjawa']);
$rejis = htmlspecialchars($_POST['rejis']);
$roli = htmlspecialchars($_POST['roli']);
$link = htmlspecialchars($_POST['link']);
$reiting = htmlspecialchars($_POST['reiting']);
$nositel = htmlspecialchars($_POST['nositel']);
$broinositeli = htmlspecialchars($_POST['broinositeli']);
$rezume = htmlspecialchars($_POST['rezume']);
$dopylnitelno = htmlspecialchars($_POST['dopylnitelno']);
$kat1 = $_POST['1'];
$kat2 = $_POST['2'];
$kat3 = $_POST['3'];
$kat4 = $_POST['4'];
$kat5 = $_POST['5'];
$kat6 = $_POST['6'];
$kat7 = $_POST['7'];
$kat8 = $_POST['8'];
$kat9 = $_POST['9'];
$kat10 = $_POST['10'];
$kat11 = $_POST['11'];
$kat12 = $_POST['12'];
$kat13 = $_POST['13'];
$kat14 = $_POST['14'];
$kat15 = $_POST['15'];
$kat16 = $_POST['16'];
$kat17 = $_POST['17'];
$kat18 = $_POST['18'];
$kat19 = $_POST['19'];
$kat20 = $_POST['20'];
$kat21 = $_POST['21'];
$kat22 = $_POST['22'];
$kat23 = $_POST['23'];
$kat24 = $_POST['24'];
$file = $_FILES['file']['name'];
$tmp_file = $_FILES['file']['tmp_name'];
$size = $_FILES['file']['size'];
$dopylnitelno1 = htmlspecialchars($dopylnitelno);
$post_no_html = $dopylnitelno;
$bbcode_regex = array(
0 => '/\[b\](.+?)\[\/b\]/s',
1 => '/\[i\](.+?)\[\/i\]/s',
2 => '/\[u\](.+?)\[\/u\]/s',
3 => '/\[code\](.+?)\[\/code\]/s',
4 => '/\[url\=(.+?)\](.+?)\[\/url\]/s',
5 => '/\[img\](.+?)\[\/img\]/s',
6 => '/\[center\](.+?)\[\/center\]/s');
$bbcode_replace = array(
0 => '<b>$1</b>',
1 => '<i>$1</i>',
2 => '<u>$1</u>',
3 => '<table><tr><td class="dve">$1</td></tr></table>',
4 => '<a href="$1">$2</a>',
5 => '<img src="$1" alt="" />',
6 => '<center>$1</center>');
ksort($bbcode_regex);
ksort($bbcode_replace);
$post_bbcode_treated = preg_replace($bbcode_regex, $bbcode_replace, $dopylnitelno1);
$dopylnitelno = nl2br($post_bbcode_treated);
$poster="../images/".basename($file);
if(file_exists($poster)) {echo "<center>Файла съществува !<br /><br /><a href=\"../index.php\" class=\"a\">Начална страница</a></center></body></html>";exit;}
if(empty($kategoriq) or empty($seriq) ) {echo "<center>Имате празни полета !<br /><br /><a href=\"../index.php\" class=\"a\">Начална страница</a></center></body></html>";exit;}
if($size==0) {echo "<center>Файла е повреден !<br /><br /><a href=\"../index.php\" class=\"a\">Начална страница</a></center></body></html>";exit;}
if($size>999999) {echo "<center>Файла е много голям !<br /><br /><a href=\"../index.php\" class=\"a\">Начална страница</a></center></body></html>";exit;}
$extensions = array("gif","jpg","jpeg","png");
$extension_file = end(explode(".",$file));
$extension_file = strtolower($extension_file);
if(!in_array($extension_file,$extensions)) {echo "<center>Този файл е не позволен ! Може да качвате само gif, jpg, jpeg, png !<br /><br /><a href=\"../index.php\" class=\"a\">Начална страница</a></center></body></html>";exit;}
$upload = move_uploaded_file ($tmp_file,$poster);
if($upload){$q = mysql_query("INSERT INTO `filmi` (`kategoriq`, `seriq`,`nomer`, `zaglaviebg`, `zaglavieus`, `poster`, `wreme`, `godina`, `dyrjawa`, `rejis`, `roli`, `link`, `reiting`, `nositel`, `broinositeli`, `rezume`, `dopylnitelno`, `c1`,`c2`, `c3`, `c4`, `c5`, `c6`,`c7`, `c8`, `c9`, `c10`, `c11`,`c12`, `c13`, `c14`, `c15`, `c16`,`c17`, `c18`, `c19`, `c20`, `c21`, `c22`, `c23`, `c24`) VALUES ('$kategoriq', '$seriq', '$nomer', '$zaglaviebg', '$zaglavieus', '$file', '$wreme', '$godina', '$dyrjawa', '$rejis', '$roli', '$link', '$reiting', '$nositel', '$broinositeli', '$rezume', '$dopylnitelno', '$kat1', '$kat2', '$kat3', '$kat4', '$kat5', '$kat6', '$kat7', '$kat8', '$kat9', '$kat10', '$kat11', '$kat12', '$kat13', '$kat14', '$kat15', '$kat16', '$kat17', '$kat18', '$kat19', '$kat20', '$kat21', '$kat22', '$kat23', '$kat24')");
if($q) {echo "<center>Заявката е добавена !<br /><br /><a href=\"../index.php\" class=\"a\">Начална страница</a></center></body></html>";} else{echo "<center>Имате грешка <br /><br /><a href=\"../index.php\" class=\"a\">Начална страница</a>!</center></body></html>";exit;}}}else{
?>
<br />
<table class="table1" align="center" border="0" cellpadding="8" cellspacing="0" width="770">
<tr>
<td colspan="2">
<form action="" method="post" enctype ="multipart/form-data" name="form">
<table border="1" class="table" align="center">
<tr>
<td colspan="4" align="center" class="dve">
Добавяне на нова информация
</td>
</tr>
<tr>
<td>Категория</td>
<td>
<select name="kategoriq" >
<option selected="selected" value=""></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
Серия
<select name="seriq">
<option selected="selected" value=""></option>
<option value="A">А</option>
<option value="Б">Б</option>
<option value="В">В</option>
<option value="Г">Г</option>
<option value="Д">Д</option>
<option value="Е">Е</option>
<option value="Ж">Ж</option>
<option value="З">З</option>
<option value="И">И</option>
<option value="Й">Й</option>
<option value="К">К</option>
<option value="Л">Л</option>
<option value="М">М</option>
<option value="Н">Н</option>
<option value="О">О</option>
<option value="П">П</option>
<option value="Р">Р</option>
<option value="С">С</option>
<option value="Т">Т</option>
<option value="У">У</option>
<option value="Ф">Ф</option>
<option value="Х">Х</option>
<option value="Ц">Ц</option>
<option value="Ч">Ч</option>
<option value="Ш">Ш</option>
<option value="Щ">Щ</option>
<option value="Ъ">Ъ</option>
<option value="Ь">Ь</option>
<option value="Ю">Ю</option>
<option value="Я">Я</option>
</select>
Номер
<input type="text" name="nomer" size="16" maxlength="8" />
</td>
<td rowspan="8">Резюме</td>
<td rowspan="8">
<textarea rows="13" cols="57" name="rezume"></textarea>
</td>
</tr>
<tr>
<td>Заглавие BG</td>
<td>
<input type="text" name="zaglaviebg" size="56" /></td>
</tr>
<tr>
<td>Заглавие US</td>
<td>
<input type="text" name="zaglavieus" size="56" />
</td>
</tr>
<tr>
<td>Постер</td>
<td>
<input name="file" type="file" size="36" /></td>
</tr>
<tr>
<td>Времетраене</td>
<td>
<input type="text" name="wreme" size="16" maxlength="14" />
минути Година
<select name="godina">
<option selected="selected" value=""></option>
<option value="2010">2010</option><option value="2009">2009</option><option value="2008">2008</option><option value="2007">2007</option><option value="2006">2006</option><option value="2005">2005</option><option value="2004">2004</option><option value="2003">2003</option><option value="2002">2002</option><option value="2001">2001</option><option value="2000">2000</option><option value="1999">1999</option><option value="1998">1998</option><option value="1997">1997</option><option value="1996">1996</option><option value="1995">1995</option><option value="1994" >1994</option><option value="1993">1993</option><option value="1992">1992</option><option value="1991">1991</option><option value="1990">1990</option><option value="1989">1989</option><option value="1988">1988</option><option value="1987">1987</option><option value="1986">1986</option><option value="1985">1985</option><option value="1984">1984</option><option value="1983">1983</option><option value="1982">1982</option><option value="1981">1981</option><option value="1980">1980</option><option value="1979">1979</option><option value="1978">1978</option><option value="1977">1977</option><option value="1976">1976</option><option value="1975">1975</option><option value="1974">1974</option><option value="1973">1973</option><option value="1972">1972</option><option value="1971">1971</option><option value="1970">1970</option><option value="1969">1969</option><option value="1968">1968</option><option value="1967">1967</option><option value="1966">1966</option><option value="1965">1965</option><option value="1964">1964</option><option value="1963">1963</option><option value="1962">1962</option><option value="1961">1961</option><option value="1960">1960</option><option value="1959">1959</option><option value="1958">1958</option><option value="1957">1957</option><option value="1956">1956</option><option value="1955">1955</option><option value="1954">1954</option><option value="1953">1953</option><option value="1952">1952</option><option value="1951">1951</option><option value="1950">1950</option><option value="1949">1949</option><option value="1948">1948</option><option value="1947">1947</option><option value="1946">1946</option><option value="1945">1945</option><option value="1944">1944</option><option value="1943">1943</option><option value="1942">1942</option><option value="1941">1941</option><option value="1940">1940</option><option value="1939">1939</option><option value="1938">1938</option><option value="1937">1937</option><option value="1936">1936</option><option value="1935">1935</option><option value="1934">1934</option><option value="1933">1933</option><option value="1932">1932</option><option value="1931">1931</option><option value="1930">1930</option><option value="1929">1929</option><option value="1928">1928</option><option value="1927">1927</option><option value="1926">1926</option><option value="1925">1925</option><option value="1924">1924</option><option value="1923">1923</option><option value="1922">1922</option><option value="1921">1921</option><option value="1920">1920</option>
</select>
</td>
</tr>
<tr>
<td>Държава</td>
<td>
<input type="text" name="dyrjawa" size="56" />
</td>
</tr>
<tr>
<td>Режиьор</td>
<td>
<input type="text" name="rejis" size="56" />
</td>
</tr>
<tr>
<td>В ролите</td>
<td>
<textarea rows="2" cols="53" name="roli" ></textarea>
</td>
</tr>
<tr>
<td>Линк IMDb</td>
<td>
<input type="text" name="link" size="16" />
Рейтинг
<select name="reiting">
<option selected="selected" value=""></option>
<option value="0">Върховен: 10</option>
<option value="9">Изключителен: 9</option>
<option value="8">Професионален: 8</option>
<option value="7">Отличен: 7</option>
<option value="6">Много добър: 6</option>
<option value="5">Добър: 5</option>
<option value="4">Недовършен: 4</option>
<option value="3">Среден:3</option>
<option value="2">Аматьорски: 2</option>
<option value="1">Трагичен: 1</option>
</select>
</td>
<td rowspan="3">Друго</td>
<td rowspan="3">
<input style="font-weight: bold; border: solid #666666 1px;" type="button" name="bold" value="B " onclick="javascript: BBTag('','bold','dopylnitelno','form')" />
<input style="font-style: italic; border: solid #666666 1px;" type="button" name="italic" value="I " onclick="javascript: BBTag('[i]','italic','dopylnitelno','form')" />
<input style="text-decoration: underline; border: solid #666666 1px;" type="button" name="underline" value="U " onclick="javascript: BBTag('[u]','underline','dopylnitelno','form')" />
<input style="text-decoration: underline; border: solid #666666 1px;" type="button" name="center" value="CENTER " onclick="javascript: BBTag('[center]','center','dopylnitelno','form')" />
<input style="text-decoration: underline; border: solid #666666 1px;" type="button" name="url" value="URL " onclick="javascript: BBTag('[url]','url','dopylnitelno','form')" />
<input style="text-decoration: underline; border: solid #666666 1px;" type="button" name="img" value="IMG " onclick="javascript: BBTag('[img]','img','dopylnitelno','form')" />
<textarea rows="13" cols="57" name="dopylnitelno"></textarea>
</td>
</tr>
<tr>
<td>Жанрове</td>
<td>
<?php
echo "
<table width=\"302\" border=\"0\" >
<tr>";
$i = "0";
$nared = "3";
$query = "SELECT * FROM janr";
$result = @mysql_query($query);
while ( $red = @mysql_fetch_array( $result )){
$ime = $red[name];
$id = $red[id];
$imeto1 = $red[imeto];
$i++;
$width = ceil(100/$nared);
echo "
<td width=\"1\"><input style=\"border: 0px;\" type=\"checkbox\" name=\"$id\" value=\"1\" />$ime
</td>";
if ($i == $nared){
echo "
</tr>
<tr>";
$i = 0;}}
echo "
<td colspan=\"3\">
</td>
</tr>
</table>";
?>
</td>
</tr>
<tr>
<td>Носител</td>
<td>
<select name="nositel">
<option selected="selected" value=""></option>
<option value="CD">CD</option>
<option value="DVD">DVD</option>
<option value="Касета">Касета</option>
<option value="Друг">Друг</option>
</select>
Брой носители <input type="text" name="broinositeli" size="16" maxlength="8" />
</td>
</tr>
<tr>
<td colspan="4" align="center" class="dve">
<input style="font-weight: bold; border: solid #666666 1px;" name="submit" type="submit" value="Изпрати" />
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td>
<a href="../index.php" class="a">Начална страница</a>
</td>
<td align="right">
Created by <a href="http://psnbg.com/" class="a">PSN BG</a> | 2008 | valid <a rel="nofollow" href="http://validator.w3.org/check?uri=referer" class="a">XHTML 1.0</a> and <a rel="nofollow" href="http://jigsaw.w3.org/css-validator/check/referer" class="a">CSS</a>
</td>
</tr>
</table>
<?php } ?>
</body>
</html>


/files/javascript.js

function BBTag(tag,s,text,form){
switch(tag)
{

case '':
if (document.forms[form].elements[s].value=="B ")
{
document.forms[form].elements[text].value = document.forms[form].elements[text].value+"";
document.forms[form].elements[s].value="B*";
}
else
{
document.forms[form].elements[text].value = document.forms[form].elements[text].value+"
";
document.forms[form].elements[s].value="B ";
}
break;
case '[i]':
if (document.forms[form].elements[s].value=="I ")
{
document.forms[form].elements[text].value = document.forms[form].elements[text].value+"[i]";
document.forms[form].elements[s].value="I*";
}
else
{
document.forms[form].elements[text].value = document.forms[form].elements[text].value+"[/i]";
document.forms[form].elements[s].value="I ";
}
break;
case '[u]':
if (document.forms[form].elements[s].value=="U ")
{
document.forms[form].elements[text].value = document.forms[form].elements[text].value+"[u]";
document.forms[form].elements[s].value="U*";
}
else
{
document.forms[form].elements[text].value = document.forms[form].elements[text].value+"[/u]";
document.forms[form].elements[s].value="U ";
}
break;

case '[center]':
if (document.forms[form].elements[s].value=="CENTER ")
{
document.forms[form].elements[text].value = document.forms[form].elements[text].value+"[center]";
document.forms[form].elements[s].value="CENTER*";
}
else
{
document.forms[form].elements[text].value = document.forms[form].elements[text].value+"[/center]";
document.forms[form].elements[s].value="CENTER ";
}
break;

case '[url]':
if (document.forms[form].elements[s].value=="URL ")
{
document.forms[form].elements[text].value = document.forms[form].elements[text].value+"[url=]";
document.forms[form].elements[s].value="URL*";
}
else
{
document.forms[form].elements[text].value = document.forms[form].elements[text].value+"[/url]";
document.forms[form].elements[s].value="URL ";
}
break;


case '[img]':
if (document.forms[form].elements[s].value=="IMG ")
{
document.forms[form].elements[text].value = document.forms[form].elements[text].value+"[img]";
document.forms[form].elements[s].value="IMG*";
}
else
{
document.forms[form].elements[text].value = document.forms[form].elements[text].value+"[/img]";
document.forms[form].elements[s].value="IMG ";
}
break;
}
document.forms[form].elements[text].focus();
}


/files/print1.css

body {
font-family : tahoma, arial, helvetica, sans-serif;
font-size : 8pt;
color : #000000;
}
table.table1 {
border : 1px solid #000000;
}
table.table {
border : 1px solid #000000;
}
td {
font-size : 8pt;
border : 0 solid #000000;
}
td.dve {
font-weight : bold;
color : #000000;
background-color : #cdcdcd;
border : 1px solid #969696;
}
img.border {
border-style : solid;
border-color : #000000;
border-width : 1px;
}


/files/print.css
body {
font-family : tahoma, arial, helvetica, sans-serif;
font-size : 8pt;
color : #000000;
}
table {
border-collapse : collapse;
}
td {
font-size : 8pt;
border : 1px solid #000000;
}


/files/print.js
if (window.print) {
document.write('<form><input style="font-weight: bold; border: solid #666666 1px;" type="button" name="print" value="Print" '
+ 'onClick="javascript:window.print()" /></form>');
}


style.css

body {
font-family : tahoma, arial, helvetica, sans-serif;
font-size : 8pt;
background-color : #666666;
color : #000000;
}
table.table1 {
background-color : #ffffff;
border : 1px solid #000000;
}
table.table {
background-color : #f2f2f2;
border : 1px solid #3c3c3c;
}
td {
border : 0 solid #000000;
}
td.edno {
font-weight : bold;
color : #000000;
background-color : #cdcdcd;
border : 1px solid #969696;
font-size : 13px;
}
td.dve {
font-weight : bold;
color : #000000;
background-color : #cdcdcd;
border : 1px solid #969696;
}
div.bbcode {
font-weight : bold;
color : #000000;
background-color : #cdcdcd;
border : 1px solid #969696;
}
img.border {
border-style : solid;
border-color : #5b5b5b;
border-width : 1px;
}
input, select, textarea {
font-family : tahoma, arial, helvetica, sans-serif;
font-size : 8pt;
border : 1px solid #cdcdcd;
}
p {
border-style : solid;
border-color : #cdcdcd;
border-width : 0;
}
strong {
text-decoration : none;
color : #000000;
}
a:link, a:visited {
text-decoration : none;
color : #000000;
}
a:hover {
color : #000000;
text-decoration : none;
}
a.a:link, a.a:visited {
text-decoration : none;
color : #555555;
}
a.a:hover {
color : #adadad;
text-decoration : none;
}



/images/edit.gif

/images/delete.gif

/images/star.gif

/images/badstar.gif

/images/print.gif



При проблеми пишете в форума, не спамете в коментарите !!!





/ Трябва да сте регистриран за да напишете коментар /
От: Marty
6:45 15-09-2009
имам проблем с файла /admin/write.php имам грешка


Parse error: syntax error, unexpected T_VARIABLE in /home/usera/public_html/movies/admin/write.php on line 1
От: admin
9:56 15-09-2009
Здрасти Marty.
Имаше проблем с урока . Не беше пълен.
Възстанових го и сега е пълен.
Опитай пак.
От: jefriii
0:41 27-10-2009
не не е пълен пак дава грешка
От: Pupe64etoo_92
14:51 26-05-2010
Aдмин панела не работи
От: kriss
20:00 15-06-2010
голяма играчка е паднала но резултатът е добър
ПП: има гадна грешка в write.php on line1 :((
От: kriss
20:39 15-06-2010
голяма играчка е паднала но резултатът е добър
ПП: има гадна грешка в write.php on line1 :((
От: Indestrcutible
11:19 03-07-2010
Всичко си работи :)
От: IzKuFeLiQqQqQ
19:03 08-11-2010
в write.php променете

на

и би трябвало да тръгне o_O
1