Bravo List
Register
Go Back   > Bravo List > Torrents Trackers > YSE
Reply
  #1  
Old 27-03-13, 23:48
mat22's Avatar
mat22 mat22 is offline
Senior Member
 
Join Date: Jun 2009
Latvia
Posts: 119
Default Movies show all years
Hello!
First I wanted to ask in chat but then I decided that this might be easier and faster. So I got this code in one part of my website:
Code:
$current_year = '2013';
$where = $current_year; //Default
if($_GET["year"] == '00'){
$where = '2000';
}
if($_GET["year"] == '01'){
$where = '2001';
}
if($_GET["year"] == '02'){
$where = '2002';
}
if($_GET["year"] == '03'){
$where = '2003';
}
if($_GET["year"] == '04'){
$where = '2004';
}
if($_GET["year"] == '05'){
$where = '2005';
}
if($_GET["year"] == '06'){
$where = '2006';
}
if($_GET["year"] == '07'){
$where = '2007';
}
if($_GET["year"] == '08'){
$where = '2008';
}
if($_GET["year"] == '09'){
$where = '2009';
}
if($_GET["year"] == '10'){
$where = '2010';
}
if($_GET["year"] == '11'){
$where = '2011';
}
if($_GET["year"] == '12'){
$where = '2012';
}
if($_GET["year"] == '13'){
$where = '2013';
}
And then I have this:
Code:
<select name=\"year\">
<option value=\"00\">2000</option>
<option value=\"01\">2001</option>
<option value=\"02\">2002</option>
<option value=\"03\">2003</option>
<option value=\"04\">2004</option>
<option value=\"05\">2005</option>
<option value=\"06\">2006</option>
<option value=\"07\">2007</option>
<option value=\"08\">2008</option>
<option value=\"09\">2009</option>
<option value=\"10\">2010</option>
<option value=\"11\">2011</option>
<option value=\"12\">2012</option>
<option value=\"13\">2013</option>
</select>&nbsp;&nbsp;<input class=\"btn\" type=\"submit\" value=\"Submit\" />
All is good but only thing is - how to modify this code so I can have an option "All years" so it shows stuff from all years not just one? By the way it's for part of website that's called "Movies" where there are all best movies from year 2000 until now.

Edit
Forgot to mention that it would be nice to see them sorted by year (2013 first, then 2012, 2011 etc.) when showing all. I added query below:
Code:
$res = mysql_query("SELECT premieres.id, premieres.name, premieres.year, premieres.genre, premieres.descr, premieres.imdb, premieres.imdb_rating, premieres.uploaded, premieres.url, premieres.poster, premieres.owner, premieres.ori_name, users.username, users.class FROM premieres LEFT JOIN users ON premieres.owner = users.id WHERE year = '$where' ORDER BY id DESC $limit");
Now it sorts them by ID. When I take away this year thing and edit it to
Code:
ORDER BY year
it shows only movies from 2013th and some from 2012th but not all because I have about 3 pages of them filled when sorting by ID but when by year - only 1 page showing.

Last edited by mat22; 28-03-13 at 00:12.
Reply With Quote
  #2  
Old 28-03-13, 18:39
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 1,989
Default
that query you have well only show torrents for ONE Year
this well help your code a little

PHP Code:
$where ''//Default
if(isset($_GET["year"]))
{
$where 'WHERE year = \'20'$_GET["year"] . '\'';

and change
PHP Code:
$res mysql_query("SELECT premieres.id, premieres.name, premieres.year, premieres.genre, premieres.descr, premieres.imdb, premieres.imdb_rating, premieres.uploaded, premieres.url, premieres.poster, premieres.owner, premieres.ori_name, users.username, users.class FROM premieres LEFT JOIN users ON premieres.owner = users.id " $where " ORDER BY id DESC $limit"); 
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Managerô forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #3  
Old 28-03-13, 19:29
mat22's Avatar
mat22 mat22 is offline
Senior Member
 
Join Date: Jun 2009
Latvia
Posts: 119
Default
I know it shows only one year. The thing is - I want to make it show one year but if user chooses - all years. Like where I have options for years I want an option "All" and then get all movies to show up when they choose it. I can make it show all years by just removing or commenting out all parts about year. I added full php file as an attachment so you can see what I have there. Problem isn't that it's showing only one year - problem is that I can't get it to show all years (and when I do that one year thingy isn't working).

P.S. Maybe I didn't understand your idea cuz sometimes I'm stupid like that. Sorry, if it's like talking to a brick wall (and I often feel it is).:D
Attached Files
File Type: php filmas.php (7.3 KB, 3 views)
Reply With Quote
  #4  
Old 28-03-13, 19:53
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 1,989
Default
Here let me do it for you
PHP Code:
<?
require_once("include/bittorrent.php");
dbconn();
loggedinorreturn();

/* --- Ieslēdzam, ja gribam izvēlēties gadus --- */
$where = 'WHERE year = \'2013\''; //Default
if(isset($_GET["year"]))
{
    if($_GET["year"] == 'all')
    {
        $whwere ='';
    }
    else
    {
        $where = 'WHERE year = \'20'. $_GET["year"] . '\'';
    }
}
/* --- End --- */


$res1 = mysql_query("SELECT COUNT(*) FROM premieres " . $where); 
/* --- Aizvietojam ar $res1 = mysql_query("SELECT COUNT(*) FROM premieres"); ja negribam gada izvēli --- */


$row1 = mysql_fetch_array($res1);
$count = $row1[0];
$limit = 16;
list($pagertop, $pagerbottom, $limit) = pager($limit, $count, "/filmas.php?", array('nopage' => true));

stdhead($tracker_lang['movies']);

?>
<style>
.wrapper { white-space: nowrap; }
.wrapper .field { 
    width: 175px;
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
}
.wrapper .field:hover { 
    position: relative;    
    overflow: visible; }
.wrapper .field span { background: #ffffff; }
</style>
<script src="js/glossy.js" language="javascript" type="Text/JavaScript"></script>
<?

/* --- Lai ieslēgtu gada izvēli --- */
print("<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr>
<td class='block' width='14' align='left'><img src='themes/".$ss_uri."/images/mala_kreisaa.png' width='14' height='24'></td>
<td class='block' width='100%' align='center' valign='middle' background='themes/".$ss_uri."/images/vidus.png'><font class='block-title' valign='bottom'><strong>".$tracker_lang['cur_sense']."$where".$tracker_lang['sense_movies']."</strong></font></td>
<td class='block' width='15' align='right'><img src='themes/".$ss_uri."/images/mala_labaa.png' width='14' height='24'>
</td></tr>");
print("<table width=\"100%\" class=\"main\" cellpadding=\"4\">");
print("<tr><td>");
if(get_user_class() >= UC_MODERATOR){
print("<center><a href=\"addfilmas.php\">Pievienot jaunu filmu</a></center>"); }
print("<form method=\"get\" action=\"filmas.php\"><p align=\"center\">".$tracker_lang['gads_izvele']."&nbsp;<select name=\"year\">
<option value=\"00\">2000</option>
<option value=\"01\">2001</option>
<option value=\"02\">2002</option>
<option value=\"03\">2003</option>
<option value=\"04\">2004</option>
<option value=\"05\">2005</option>
<option value=\"06\">2006</option>
<option value=\"07\">2007</option>
<option value=\"08\">2008</option>
<option value=\"09\">2009</option>
<option value=\"10\">2010</option>
<option value=\"11\">2011</option>
<option value=\"12\">2012</option>
<option value=\"13\">2013</option>
<option value=\"14\">2014</option>
<option value=\"15\">2015</option>
<option value=\"16\">2016</option>
<option value=\"17\">2017</option>
<option value=\"18\">2018</option>
<option value=\"19\">2019</option>
<option value=\"20\">2020</option>
</select>&nbsp;&nbsp;<input class=\"btn\" type=\"submit\" value=\"".$tracker_lang['sp_gatavs']."\" /></p></form>");
print("</td></tr>");
print("</table>");
/* --- End --- */

print("<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr>
<td class='block' width='14' align='left'><img src='themes/".$ss_uri."/images/mala_kreisaa.png' width='14' height='24'></td>
<td class='block' width='100%' align='center' valign='middle' background='themes/".$ss_uri."/images/vidus.png'><font class='block-title' valign='bottom'><strong>".$tracker_lang['new_movies']."</strong></font></td>
<td class='block' width='15' align='right'><img src='themes/".$ss_uri."/images/mala_labaa.png' width='14' height='24'>
</td></tr>");
print("<table width=\"100%\" class=\"main\" cellpadding=\"4\">");
print("<tr>");

$res = mysql_query("SELECT premieres.id, premieres.name, premieres.year, premieres.genre, premieres.descr, premieres.imdb, premieres.imdb_rating, premieres.uploaded, premieres.url, premieres.poster, premieres.owner, premieres.ori_name, users.username, users.class FROM premieres LEFT JOIN users ON premieres.owner = users.id WHERE year = '$where' ORDER BY id DESC $limit");
if(mysql_num_rows($res) > 0){
while($arr = mysql_fetch_array($res))
{
$id = $arr['id'];
$name = $arr['name'];
$ori_name = $arr['ori_name'];
$year = $arr['year'];
$genre = $arr['genre'];
$imdb = $arr['imdb'];
$imdb_rating = $arr['imdb_rating'];
$lang = $arr['lang'];
$year = $arr['year'];
$descr = $arr['descr'];
$uploaded = $arr['uploaded'];
$url = $arr['url'];

$search_name = preg_replace("/[^-_a-z0-9]+/i", "+", $ori_name);
$poster = "<a href=\"http://filebitz.org/browse.php?c25=1&c26=1&c24=1&c41=1&c47=1&c23=1&search=$search_name\"><img src=\"$arr[poster]\" width=\"170\" height=\"228\" border=\"0\" class=\"glossy\" title=\"".htmlspecialchars_uni($descr)."\"></a>";

$shortname = myTruncate($ori_name, 25, " ");
$shortname2 = myTruncate($name, 25, " ");

print("<td align=\"center\" colspan=\"3\" border=\"0\" width=\"175\"><div align=\"center\"><hr><a href=\"http://filebitz.org/browse.php?c25=1&c26=1&c24=1&c41=1&c47=1&c23=1&search=$search_name\" title=\"$name\"><b><u>$shortname2</u></b></a>
<br><small><a href=\"http://filebitz.org/browse.php?c25=1&c26=1&c24=1&c41=1&c47=1&c23=1&search=$search_name\" title=\"$ori_name\"><b><a href=\"#\" title=\"$ori_name\">$shortname</b></a></small>
<hr><p>$poster</p>
<hr><div class=\"wrapper\"><span class=\"field\"><span><b>".$tracker_lang['genrei']."</b>: <font color=\"red\">$genre</font></span></span></div>
<br><b>".$tracker_lang['my_year']."</b>: <font color=\"red\">$year</font>
<br><a href=$imdb><img src=\"pic/filmas/imdb.png\" align=absmiddle alt=IMDB title=IMDB width=35 height=35/></a>
&nbsp;&nbsp;&nbsp;&nbsp;<a href=$url><img src=\"pic/filmas/youtube.png\" alt=YouTube align=absmiddle title=YouTube width=50 height=17/></a>
<br><b>IMDB Rating:</b> <fony color=\"red\">$imdb_rating/10</font>");

if(get_user_class() >= UC_MODERATOR || $CURUSER['id'] == $arr['owner']){
print("<br><a href=\"takefilmas.php?p=delete&id=$id\"><b title=\"Dzēst filmu\"><span style=\"color: #CC3333;\"><small>[Dzēst]</small></span></b></a>&nbsp;&nbsp<a href=\"filmasedit.php?id=$id\"><b title=\"Rediģēt filmu\"><span style=\"color: #CC3333;\"><small>[Rediģēt]</small></span></b></a>");
}
print("<p></p></div>");
++$pre[$res];
if ($pre[$res] <=3 ){
print('</td>');
}else{
print('</td></tr>');
$pre[$res] = 0;
}
}
print("<tr><td class=\"index\" colspan=\"12\">");
print("<center>". $pagerbottom ."</center>");
print("</td></tr>");
}else{
print("<center>Nav nevienas filmas...</center>");
}
print("</table></table></table>");

stdfoot();

?>
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Managerô forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #5  
Old 28-03-13, 20:00
mat22's Avatar
mat22 mat22 is offline
Senior Member
 
Join Date: Jun 2009
Latvia
Posts: 119
Default
Yeah this gives me error.
Attached Thumbnails
error.png  
Reply With Quote
  #6  
Old 28-03-13, 20:07
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 1,989
Default
try this
PHP Code:
<?
require_once("include/bittorrent.php");
dbconn();
loggedinorreturn();

/* --- Ieslēdzam, ja gribam izvēlēties gadus --- */
$where = "WHERE year = 2013"; //Default
if(isset($_GET["year"]))
{
    if($_GET["year"] == 'all')
    {
        $where ='';
    }
    else
    {
        $where = 'WHERE year = 20'. $_GET["year"];
    }
}
/* --- End --- */


$res1 = mysql_query("SELECT COUNT(*) FROM premieres " . $where); 
/* --- Aizvietojam ar $res1 = mysql_query("SELECT COUNT(*) FROM premieres"); ja negribam gada izvēli --- */


$row1 = mysql_fetch_array($res1);
$count = $row1[0];
$limit = 16;
list($pagertop, $pagerbottom, $limit) = pager($limit, $count, "/filmas.php?", array('nopage' => true));

stdhead($tracker_lang['movies']);

?>
<style>
.wrapper { white-space: nowrap; }
.wrapper .field { 
    width: 175px;
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
}
.wrapper .field:hover { 
    position: relative;    
    overflow: visible; }
.wrapper .field span { background: #ffffff; }
</style>
<script src="js/glossy.js" language="javascript" type="Text/JavaScript"></script>
<?

/* --- Lai ieslēgtu gada izvēli --- */
print("<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr>
<td class='block' width='14' align='left'><img src='themes/".$ss_uri."/images/mala_kreisaa.png' width='14' height='24'></td>
<td class='block' width='100%' align='center' valign='middle' background='themes/".$ss_uri."/images/vidus.png'><font class='block-title' valign='bottom'><strong>".$tracker_lang['cur_sense']."$where".$tracker_lang['sense_movies']."</strong></font></td>
<td class='block' width='15' align='right'><img src='themes/".$ss_uri."/images/mala_labaa.png' width='14' height='24'>
</td></tr>");
print("<table width=\"100%\" class=\"main\" cellpadding=\"4\">");
print("<tr><td>");
if(get_user_class() >= UC_MODERATOR){
print("<center><a href=\"addfilmas.php\">Pievienot jaunu filmu</a></center>"); }
print("<form method=\"get\" action=\"filmas.php\"><p align=\"center\">".$tracker_lang['gads_izvele']."&nbsp;<select name=\"year\">
<option value=\"00\">2000</option>
<option value=\"01\">2001</option>
<option value=\"02\">2002</option>
<option value=\"03\">2003</option>
<option value=\"04\">2004</option>
<option value=\"05\">2005</option>
<option value=\"06\">2006</option>
<option value=\"07\">2007</option>
<option value=\"08\">2008</option>
<option value=\"09\">2009</option>
<option value=\"10\">2010</option>
<option value=\"11\">2011</option>
<option value=\"12\">2012</option>
<option value=\"13\">2013</option>
<option value=\"14\">2014</option>
<option value=\"15\">2015</option>
<option value=\"16\">2016</option>
<option value=\"17\">2017</option>
<option value=\"18\">2018</option>
<option value=\"19\">2019</option>
<option value=\"20\">2020</option>
</select>&nbsp;&nbsp;<input class=\"btn\" type=\"submit\" value=\"".$tracker_lang['sp_gatavs']."\" /></p></form>");
print("</td></tr>");
print("</table>");
/* --- End --- */

print("<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr>
<td class='block' width='14' align='left'><img src='themes/".$ss_uri."/images/mala_kreisaa.png' width='14' height='24'></td>
<td class='block' width='100%' align='center' valign='middle' background='themes/".$ss_uri."/images/vidus.png'><font class='block-title' valign='bottom'><strong>".$tracker_lang['new_movies']."</strong></font></td>
<td class='block' width='15' align='right'><img src='themes/".$ss_uri."/images/mala_labaa.png' width='14' height='24'>
</td></tr>");
print("<table width=\"100%\" class=\"main\" cellpadding=\"4\">");
print("<tr>");

$res = mysql_query("SELECT premieres.id, premieres.name, premieres.year, premieres.genre, premieres.descr, premieres.imdb, premieres.imdb_rating, premieres.uploaded, premieres.url, premieres.poster, premieres.owner, premieres.ori_name, users.username, users.class FROM premieres LEFT JOIN users ON premieres.owner = users.id WHERE year = '$where' ORDER BY id DESC $limit");
if(mysql_num_rows($res) > 0){
while($arr = mysql_fetch_array($res))
{
$id = $arr['id'];
$name = $arr['name'];
$ori_name = $arr['ori_name'];
$year = $arr['year'];
$genre = $arr['genre'];
$imdb = $arr['imdb'];
$imdb_rating = $arr['imdb_rating'];
$lang = $arr['lang'];
$year = $arr['year'];
$descr = $arr['descr'];
$uploaded = $arr['uploaded'];
$url = $arr['url'];

$search_name = preg_replace("/[^-_a-z0-9]+/i", "+", $ori_name);
$poster = "<a href=\"http://filebitz.org/browse.php?c25=1&c26=1&c24=1&c41=1&c47=1&c23=1&search=$search_name\"><img src=\"$arr[poster]\" width=\"170\" height=\"228\" border=\"0\" class=\"glossy\" title=\"".htmlspecialchars_uni($descr)."\"></a>";

$shortname = myTruncate($ori_name, 25, " ");
$shortname2 = myTruncate($name, 25, " ");

print("<td align=\"center\" colspan=\"3\" border=\"0\" width=\"175\"><div align=\"center\"><hr><a href=\"http://filebitz.org/browse.php?c25=1&c26=1&c24=1&c41=1&c47=1&c23=1&search=$search_name\" title=\"$name\"><b><u>$shortname2</u></b></a>
<br><small><a href=\"http://filebitz.org/browse.php?c25=1&c26=1&c24=1&c41=1&c47=1&c23=1&search=$search_name\" title=\"$ori_name\"><b><a href=\"#\" title=\"$ori_name\">$shortname</b></a></small>
<hr><p>$poster</p>
<hr><div class=\"wrapper\"><span class=\"field\"><span><b>".$tracker_lang['genrei']."</b>: <font color=\"red\">$genre</font></span></span></div>
<br><b>".$tracker_lang['my_year']."</b>: <font color=\"red\">$year</font>
<br><a href=$imdb><img src=\"pic/filmas/imdb.png\" align=absmiddle alt=IMDB title=IMDB width=35 height=35/></a>
&nbsp;&nbsp;&nbsp;&nbsp;<a href=$url><img src=\"pic/filmas/youtube.png\" alt=YouTube align=absmiddle title=YouTube width=50 height=17/></a>
<br><b>IMDB Rating:</b> <fony color=\"red\">$imdb_rating/10</font>");

if(get_user_class() >= UC_MODERATOR || $CURUSER['id'] == $arr['owner']){
print("<br><a href=\"takefilmas.php?p=delete&id=$id\"><b title=\"Dzēst filmu\"><span style=\"color: #CC3333;\"><small>[Dzēst]</small></span></b></a>&nbsp;&nbsp<a href=\"filmasedit.php?id=$id\"><b title=\"Rediģēt filmu\"><span style=\"color: #CC3333;\"><small>[Rediģēt]</small></span></b></a>");
}
print("<p></p></div>");
++$pre[$res];
if ($pre[$res] <=3 ){
print('</td>');
}else{
print('</td></tr>');
$pre[$res] = 0;
}
}
print("<tr><td class=\"index\" colspan=\"12\">");
print("<center>". $pagerbottom ."</center>");
print("</td></tr>");
}else{
print("<center>Nav nevienas filmas...</center>");
}
print("</table></table></table>");

stdfoot();

?>
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Managerô forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #7  
Old 28-03-13, 20:11
mat22's Avatar
mat22 mat22 is offline
Senior Member
 
Join Date: Jun 2009
Latvia
Posts: 119
Default
Now it's showing that there isn't any movie added.
Reply With Quote
  #8  
Old 28-03-13, 20:13
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 1,989
Default
In the data base how dose it have the years listed?
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Managerô forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #9  
Old 28-03-13, 20:16
mat22's Avatar
mat22 mat22 is offline
Senior Member
 
Join Date: Jun 2009
Latvia
Posts: 119
Default
Full year. 2012, 2013, 2000 etc.
Reply With Quote
  #10  
Old 28-03-13, 20:29
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 1,989
Default
sory missed the second query
PHP Code:
<?
require_once("include/bittorrent.php");
dbconn();
loggedinorreturn();

/* --- Ieslēdzam, ja gribam izvēlēties gadus --- */
$where = "WHERE year = 2013"; //Default
if(isset($_GET["year"]))
{
    if($_GET["year"] == 'all')
    {
        $whwere ='';
    }
    else
    {
        $where = 'WHERE year = 20'. $_GET["year"];
    }
}
/* --- End --- */


$res1 = mysql_query("SELECT COUNT(*) FROM premieres " . $where); 
/* --- Aizvietojam ar $res1 = mysql_query("SELECT COUNT(*) FROM premieres"); ja negribam gada izvēli --- */


$row1 = mysql_fetch_array($res1);
$count = $row1[0];
$limit = 16;
list($pagertop, $pagerbottom, $limit) = pager($limit, $count, "/filmas.php?", array('nopage' => true));

stdhead($tracker_lang['movies']);

?>
<style>
.wrapper { white-space: nowrap; }
.wrapper .field { 
    width: 175px;
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
}
.wrapper .field:hover { 
    position: relative;    
    overflow: visible; }
.wrapper .field span { background: #ffffff; }
</style>
<script src="js/glossy.js" language="javascript" type="Text/JavaScript"></script>
<?

/* --- Lai ieslēgtu gada izvēli --- */
print("<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr>
<td class='block' width='14' align='left'><img src='themes/".$ss_uri."/images/mala_kreisaa.png' width='14' height='24'></td>
<td class='block' width='100%' align='center' valign='middle' background='themes/".$ss_uri."/images/vidus.png'><font class='block-title' valign='bottom'><strong>".$tracker_lang['cur_sense']."$where".$tracker_lang['sense_movies']."</strong></font></td>
<td class='block' width='15' align='right'><img src='themes/".$ss_uri."/images/mala_labaa.png' width='14' height='24'>
</td></tr>");
print("<table width=\"100%\" class=\"main\" cellpadding=\"4\">");
print("<tr><td>");
if(get_user_class() >= UC_MODERATOR){
print("<center><a href=\"addfilmas.php\">Pievienot jaunu filmu</a></center>"); }
print("<form method=\"get\" action=\"filmas.php\"><p align=\"center\">".$tracker_lang['gads_izvele']."&nbsp;<select name=\"year\">
<option value=\"00\">2000</option>
<option value=\"01\">2001</option>
<option value=\"02\">2002</option>
<option value=\"03\">2003</option>
<option value=\"04\">2004</option>
<option value=\"05\">2005</option>
<option value=\"06\">2006</option>
<option value=\"07\">2007</option>
<option value=\"08\">2008</option>
<option value=\"09\">2009</option>
<option value=\"10\">2010</option>
<option value=\"11\">2011</option>
<option value=\"12\">2012</option>
<option value=\"13\">2013</option>
<option value=\"14\">2014</option>
<option value=\"15\">2015</option>
<option value=\"16\">2016</option>
<option value=\"17\">2017</option>
<option value=\"18\">2018</option>
<option value=\"19\">2019</option>
<option value=\"20\">2020</option>
</select>&nbsp;&nbsp;<input class=\"btn\" type=\"submit\" value=\"".$tracker_lang['sp_gatavs']."\" /></p></form>");
print("</td></tr>");
print("</table>");
/* --- End --- */

print("<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr>
<td class='block' width='14' align='left'><img src='themes/".$ss_uri."/images/mala_kreisaa.png' width='14' height='24'></td>
<td class='block' width='100%' align='center' valign='middle' background='themes/".$ss_uri."/images/vidus.png'><font class='block-title' valign='bottom'><strong>".$tracker_lang['new_movies']."</strong></font></td>
<td class='block' width='15' align='right'><img src='themes/".$ss_uri."/images/mala_labaa.png' width='14' height='24'>
</td></tr>");
print("<table width=\"100%\" class=\"main\" cellpadding=\"4\">");
print("<tr>");

$res = mysql_query("SELECT premieres.id, premieres.name, premieres.year, premieres.genre, premieres.descr, premieres.imdb, premieres.imdb_rating, premieres.uploaded, premieres.url, premieres.poster, premieres.owner, premieres.ori_name, users.username, users.class FROM premieres LEFT JOIN users ON premieres.owner = users.id $where ORDER BY id DESC $limit");
if(mysql_num_rows($res) > 0){
while($arr = mysql_fetch_array($res))
{
$id = $arr['id'];
$name = $arr['name'];
$ori_name = $arr['ori_name'];
$year = $arr['year'];
$genre = $arr['genre'];
$imdb = $arr['imdb'];
$imdb_rating = $arr['imdb_rating'];
$lang = $arr['lang'];
$year = $arr['year'];
$descr = $arr['descr'];
$uploaded = $arr['uploaded'];
$url = $arr['url'];

$search_name = preg_replace("/[^-_a-z0-9]+/i", "+", $ori_name);
$poster = "<a href=\"http://filebitz.org/browse.php?c25=1&c26=1&c24=1&c41=1&c47=1&c23=1&search=$search_name\"><img src=\"$arr[poster]\" width=\"170\" height=\"228\" border=\"0\" class=\"glossy\" title=\"".htmlspecialchars_uni($descr)."\"></a>";

$shortname = myTruncate($ori_name, 25, " ");
$shortname2 = myTruncate($name, 25, " ");

print("<td align=\"center\" colspan=\"3\" border=\"0\" width=\"175\"><div align=\"center\"><hr><a href=\"http://filebitz.org/browse.php?c25=1&c26=1&c24=1&c41=1&c47=1&c23=1&search=$search_name\" title=\"$name\"><b><u>$shortname2</u></b></a>
<br><small><a href=\"http://filebitz.org/browse.php?c25=1&c26=1&c24=1&c41=1&c47=1&c23=1&search=$search_name\" title=\"$ori_name\"><b><a href=\"#\" title=\"$ori_name\">$shortname</b></a></small>
<hr><p>$poster</p>
<hr><div class=\"wrapper\"><span class=\"field\"><span><b>".$tracker_lang['genrei']."</b>: <font color=\"red\">$genre</font></span></span></div>
<br><b>".$tracker_lang['my_year']."</b>: <font color=\"red\">$year</font>
<br><a href=$imdb><img src=\"pic/filmas/imdb.png\" align=absmiddle alt=IMDB title=IMDB width=35 height=35/></a>
&nbsp;&nbsp;&nbsp;&nbsp;<a href=$url><img src=\"pic/filmas/youtube.png\" alt=YouTube align=absmiddle title=YouTube width=50 height=17/></a>
<br><b>IMDB Rating:</b> <fony color=\"red\">$imdb_rating/10</font>");

if(get_user_class() >= UC_MODERATOR || $CURUSER['id'] == $arr['owner']){
print("<br><a href=\"takefilmas.php?p=delete&id=$id\"><b title=\"Dzēst filmu\"><span style=\"color: #CC3333;\"><small>[Dzēst]</small></span></b></a>&nbsp;&nbsp<a href=\"filmasedit.php?id=$id\"><b title=\"Rediģēt filmu\"><span style=\"color: #CC3333;\"><small>[Rediģēt]</small></span></b></a>");
}
print("<p></p></div>");
++$pre[$res];
if ($pre[$res] <=3 ){
print('</td>');
}else{
print('</td></tr>');
$pre[$res] = 0;
}
}
print("<tr><td class=\"index\" colspan=\"12\">");
print("<center>". $pagerbottom ."</center>");
print("</td></tr>");
}else{
print("<center>Nav nevienas filmas...</center>");
}
print("</table></table></table>");

stdfoot();

?>
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Managerô forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
The Following User Says Thank You to joeroberts For This Useful Post:
mat22 (28-03-13)
Reply

Tags
movies , show , years

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 11:19. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2017, vBulletin Solutions Inc.