<?php
# ------------------------------------------------------------------------------
#
# Title only view for movies
#
# ------------------------------------------------------------------------------
#
# Copyright (C) 2003 Christian Eheim and Alex Pachikov
#
# This file is part of TVEz (tvez.sourceforge.net).
#
# TVEz is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# TVEz is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with TVEz; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ------------------------------------------------------------------------------
#
# Created on 02/12/2003 by Christian Eheim (hide@address.com)
#
# LAST MODIFIED:
# $Date: 2004/08/27 02:23:45 $
# $Revision: 1.6 $
# $Author: eheim $
#
# ------------------------------------------------------------------------------
global $rating;
$movie_number=1;
if ($movie_total)
foreach ($movies as $movie) {
$movie["path"] = urlencode($movie["path"]);
$movie['title'] = preg_replace("/\"/","",$movie['title']);
# ---------------------------------------------------------
# Title only
# ---------------------------------------------------------
$title_rows = 3;
$percent = floor(100/$title_rows);
$tmod = ($movie_number);
$tf = ceil($movie_total/$title_rows);
$tmod = $tmod%$tf;
if ($rating) echo '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
if ($movie_number == 1) echo '
<table border="0" cellpadding="4" cellspacing="0" width="100%"><tr><td valign="top" width="'.$percent.'%" style="height: 100%;">
';
echo "
<p>";
if (isset($_SESSION['tvezAccess']) || !$LOGIN_ENABLED)
echo "<a href=\"player/plcontrol.php?tvst=play ".$movie["path"]."\" target=\"playlist\"><img src=\"images/right.gif\" border=\"0\" alt=\"Play\" title=\"".localize_string("Play '==1=='",$movie["title"])."\"></a>";
echo " <a href=\"".$_SERVER['PHP_SELF']."?content=movies&page=movies&field=id&search=".$movie["id"]."&view=small\" title=\"".localize_string("Small Image View")."\">".$movie["title"]."</a>
";
# ---------------------------------------------------------
# Rating System
# ---------------------------------------------------------
if ($rating) {
if ($movie["votes"])
$avg = round($movie["points"]/$movie["votes"],1);
else
$avg = 0;
echo "
<span class=\"year\"> ($avg)</span>
";
# Unfortunately, this takes forever
/*
echo "
<select name=castvote[".$movie['id']."] onchange=\"javascript: if( confirm('Your vote is being submitted. Changes will take effect next time you reload the movie info.')) this.form.submit()\">
<option>--</option>
";
for ($j=1;$j<11;$j++)
echo "<option value=$j>$j</option>\n";
echo "
</select>
";
*/
}
if ( ($tmod == 0) && ($movie_number != $movie_total)) echo "\n</td><td valign=\"top\" width=\"".$percent."%\">\n";
elseif ($movie_number == $movie_total) {
echo "
</td></tr></table>
";
}
if ($rating) echo "</form>\n";
$movie_number++;
}
?>