Location: PHPKode > projects > Comic > comic.html.php
<?php
// ---------------------------------------------
// |     Comic COMPONENT    			|
// |                                        	|
// |         Copyright (C) 2005 Rdemont       	|
// |                                        	|
// |           All rights reserved          	|
// ---------------------------------------------
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// Please note that the GPL states that any headers in files and
// Copyright notices as well as credits in headers, source files
// and output (screens, prints, etc.) can not be removed.
// You can extend them with your own credits, though...
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//
// The "GNU General Public License" (GPL) is available at
// http://www.gnu.org/copyleft/gpl.html.
//-----------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
// Autorisation d'accès
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
//--------------------------------------------------------------------------------------------------

class HTML_comic {
	function show()
	{


	}

	function help()
	{
		$option = "com_comic";	
		global $my,$database,$templateName;
		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/menu.html.php");
	}
	
	
	function adminMenu()
	{
		$option = "com_comic";	
		global $my,$database,$templateName;
		include_once("templates/".$templateName."/header.html.php");		
		include_once("templates/".$templateName."/menu.html.php");
	}
	
	function searchMenu()
	{
		$option = "com_comic";	
		global $my,$database,$templateName;
		include_once("templates/".$templateName."/header.html.php");		
		include_once("templates/".$templateName."/searchMenu.html.php");
	}	

	function serieList($rows)
	{
		$option = "com_comic";	
		global $my,$database,$templateName;		
		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/storyList.html.php");
	}

	function serieEdit($id,$row)
	{
		$option = "com_comic";
		global $my,$database,$templateName;					
		$name = "";
		$numberOfVolume = "";
		$genre_FK = 0;
		if ($row != null)
		{
			$name = $row->Name;
			$numberOfVolume = $row->NumberOfVolume;
			$genre_FK = $row->genre_FK;			
		}

		$query="SELECT id,name FROM #__comicGenre";
		$database->setQuery($query);
		$genreRows = $database->loadObjectList();			


		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/storyEdit.html.php");			
	}
	
	function comicList($rows,$serieid,$artistid,$publisherid,$list,$page)
	{
		$option = "com_comic";	
		global $my,$database,$templateName;		
		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/comicList.html.php");			

	}
	
	function comicEdit($id,$row,$serieid)
	{
		$option = "com_comic";
		global $my,$database,$templateName;					
		$serie_FK = $serieid;
		$publisher_PK = 0;
		$owner_FK = $my->id;
		$title = "";
		$price = "";
		$imagePath = "";
		$description = "";
		$volumeNumber = "1";
		$parutionDate = "";		

		if ($row != null)
		{
			$serie_FK = $row->serie_FK;
			$publisher_FK = $row->publisher_PK;
			$owner_FK = $row->owner_FK;
			$title = $row->title;
			$price = $row->price;
			$imagePath = $row->imagePath;
			$description = $row->description;
			$volumeNumber = $row->volumeNumber;
			$parutionDate = $row->parutionDate;		

			$query="SELECT id,artist_FK,artistType_FK FROM #__comicAlbumArtist WHERE album_FK =".$id;
			$database->setQuery($query);
			$albumArtistRows = $database->loadObjectList();			

		}	
		if ((!isset($serieid)) || ($serieid=="") || ($serieid==0))
		{
			$query="SELECT id,Name FROM #__comicSerie ";
			$database->setQuery($query);
			$serieRows = $database->loadObjectList();					
		}
			
		//publisherList
		$query="SELECT id,Name FROM #__comicPublisher ";
		$database->setQuery($query);
		$publisherRows = $database->loadObjectList();			

		$query="SELECT id,name FROM #__comicArtist ";
		$database->setQuery($query);
		$artistRows = $database->loadObjectList();			

		$query="SELECT id,name FROM #__comicArtistType ";
		$database->setQuery($query);
		$typeArtistRows = $database->loadObjectList();			
		

		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/comicEdit.html.php");			
	}


	function comicView($id,$row,$serieid)
	{
		$option = "com_comic";
		global $my,$database,$templateName;

		$query="SELECT albumArtist.description,Artist.name AS artistName,Artist.website,type.name AS typeName FROM #__comicAlbumArtist albumArtist";
		$query.=" INNER JOIN #__comicArtist AS Artist ON Artist.id = albumArtist.artist_FK";
		$query.=" INNER JOIN #__comicArtistType AS type ON type.id = albumArtist.artistType_FK";	
		$query.=" WHERE albumArtist.album_FK = ".$id;
		$database->setQuery($query);
		$artistRows = $database->loadObjectList();			
		
		
		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/comicView.html.php");			
	}

	function publisherList($rows)
	{
		$option = "com_comic";	
		global $my,$database,$templateName;		
		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/publisherList.html.php");
	}

	function publisherEdit($id,$row)
	{
		$option = "com_comic";
		global $my,$database,$templateName;					
		$name = "";
		$website = "";
		if ($row != null)
		{
			$name = $row->name;
			$website = $row->website;	
		}

		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/publisherEdit.html.php");			
	}
	

	function artistList($rows)
	{
		$option = "com_comic";	
		global $my,$database,$templateName;		
		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/artistList.html.php");
	}

	function artistEdit($id,$row)
	{
		$option = "com_comic";
		global $my,$database,$templateName;					
		$name = "";
		$website = "";
		$shortDescription = "";
		$description = "";				
		if ($row != null)
		{
			$name = $row->name;
			$website = $row->website;	
			$shortDescription = $row->shortDescription;	
			$description = $row->description;							
		}

		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/artistEdit.html.php");			
	}


	function artistTypeList($rows)
	{
		$option = "com_comic";	
		global $my,$database,$templateName;		
		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/artistTypeList.html.php");
	}

	function artistTypeEdit($id,$row)
	{
		$option = "com_comic";
		global $my,$database,$templateName;					
		$name = "";
		if ($row != null)
		{
			$name = $row->name;
		}

		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/artistTypeEdit.html.php");			
	}


	function genreList($rows)
	{
		$option = "com_comic";	
		global $my,$database,$templateName;		
		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/genreList.html.php");
	}

	function genreEdit($id,$row)
	{
		$option = "com_comic";
		global $my,$database,$templateName;					
		$name = "";
		if ($row != null)
		{
			$name = $row->name;
		}

		include_once("templates/".$templateName."/header.html.php");
		include_once("templates/".$templateName."/genreEdit.html.php");			
	}

	
}
?>
Return current item: Comic