Location: PHPKode > projects > TVEz - Media Library > tvez-0.2.1/html/menu/portlets/movie_total.php
<?php

# ------------------------------------------------------------------------------
#
# Shows the toal movies found for a search
#
# ------------------------------------------------------------------------------
#
# 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/01/19 19:06:38 $
# $Revision: 1.3 $
# $Author: eheim $
#
# ------------------------------------------------------------------------------

$search = (isset($_REQUEST['search'])) ? $_REQUEST['search'] : "";
$field = (isset($_REQUEST['field'])) ? $_REQUEST['field'] : "";
$order = (isset($_REQUEST['order'])) ? $_REQUEST['order'] : "";
$genres = (isset($_REQUEST['genres'])) ? $_REQUEST['genres'] : "";

$search=urldecode($search);
$query = generate_query($order,$genres,$search,$field);
list($movie_total,$movies) = query_db($query);


#global $movie_total;
if ($movie_total) {
	$maStr = ($movie_total != 1) ? localize_string("movies") : localize_string("title");
	$content = "<b>".$movie_total." ".localize_string("==1== found",$maStr).".</b>\n";
} else {
	$content = "<b>".localize_string("No movies found").".</b>\n";
}

	menu(localize_string("Search Result"),"<div align=center>$content</div>");

?>
Return current item: TVEz - Media Library