Location: PHPKode > projects > PowerMovieList > powermovielist-0_14_beta/templates/list/poster-tables.tpl
{* powermovielist list default template
 * $Id: poster-tables.tpl,v 1.6 2005/12/07 16:43:39 niko Exp $ *}
{* 
Don't modify this file, make a copy of it and save it under a different name, you can select the template then in the design-config.
More Information about the syntax on http://smarty.php.net/manual/en/.

If you created a cool template, please send it to us!
www.powermovielist.com


NOTES about caching (if enabled):
This page will be cached by the great smarty. But as this page is really dynamic, especially
the displayed entries and the header (sort-image, links etc) this items will not be cached!
This is done with the smarty-function insert - it has the special behavior that the output from
the calls won't be cached!
So make sure that you use them the same way in your templates as you see it here!
*}
<html>
<head>
  <link REL="shortcut icon" HREF="image/divx.ico">
  <title>PowerMovieList - {$ActiveList.title}</title>
  <meta http-equiv="Content-Type" content="text/html; charset={$lang.LngCharSet}">
  <link rel="stylesheet" href="css/{if $ActiveList.designcss}{$ActiveList.designcss}{else}default.css{/if}"> 
</head>
<body>
{include file="head.tpl"}
{include file="announcments.tpl"}
{include file="head_filter.tpl"}
<table width="100%" border="0" cellpadding="5" cellspacing="1" class="tblback">
  <tr class=row1> 
    <td width="{if $ActiveList.showchars}20%{else}100%{/if}" height="27" align="left"> <b>    
    {if $AnzFound == 0}
        {$lang.strSqlNothingFound}
    {else}
        {$AnzFound} {$lang.strSqlFound}
        {if $AnzFound != $AnzGes}
          ({$lang.strSqlFrom} {$AnzGes})
				{/if}
    {/if}
		</b></td>
{if $ActiveList.showchars}
{* the characters (can be switched of in config) *}
    <td width="60%" align="center"><b><font size="2">	
	{if $sDisplay.Char != ""}<a href='{$CharUrl}Char='>{$lang.strFormatAll}</a>{/if}
	{if $sDisplay.Char != "0"}<a href='{$CharUrl}Char=0'>0-9</a> {else}0-9 {/if}
  {foreach item=Chr from=$Chars}	
		{if $sDisplay.Char != $Chr}<a href='{$CharUrl}Char={$Chr}'>{$Chr} </a>{else}{$Chr} {/if}
  {/foreach}
</font></b></td>
    <td width="20%" align="center">&nbsp;</td>
{/if}
  </tr>
</table>
<br>
{if $Nums}
<table width="100%" border="0" cellspacing="1" cellpadding="1" class="tblback">
  <tr class=row1><td colspan='{$PropShown}' align='center'><b><font size='2'>
		{foreach item=Num from=$Nums}	
			{if $Num.page == -1}
				{$Num.text}
			{else}
				<a href='{$NumUrl}&Page={$Num.page}'>{$Num.text}</a> 
			{/if}	
		{/foreach}
	</font></b></td></tr>
</table>
{/if}

{* first geht the PropID of the poster (if one exists *}
{assign var="PosterPropID" value="0"} {*std-val*}
{foreach item=Prop from=$PropAll}	
	{if $Prop.Name|default:"" == "Poster"}
		{assign var="PosterPropID" value=$Prop.ID}
	{/if}
{/foreach}

{assign var="GlobalArg" value=$CFG.GlobalArg}
{cycle values="row1,row2" print=false advance=false}
{foreach item=MovieID key=kMovie from=$MovieIDs}
      <td valign="top">
	{assign var="DownloadLink" value="<a href='popup.php$GlobalArg&ID=$MovieID' onClick=\"var popup=window.open(this.href,'infopopup','scrollbars=yes,resizable=yes,width=400,height=500'); popup.focus(); return false\">"}
  <table width="30%" border="0" cellspacing="1" cellpadding="1" class="tblback" align='center'>

	{if $PosterPropID != 0} {* is there a poster-property? *}
		{assign var="PosterDisplayed" value="0"}
	{else}
	  {assign var="PosterDisplayed" value="1"} {*if no "Poster" property exists, don't display it (set it to allready dispalyed)*}
	{/if}

	{foreach item=Prop from=$PropAll}	
	  {assign var="Url" value=""}	  
		{if $Prop.ShowInList && ($ActiveUserRights >= $Prop.RequiredRights || ($Prop.RequiredRights == -1 && $ActiveUser.name != "Guest"))}
		  {* process URL *}
		  {if $Prop.Url == "Info"}
				{assign var="Url" value="$DownloadLink"}
			{elseif $Prop.Url != ""}
				{assign var="Url" value=$Prop.Url|replace:"\$ID":$MovieID|replace:"\$Active":$Active}
        {assign var="Url" value="<a href='$Url'>"}
			{/if}
			<tr class='{cycle}'>
				{if $PosterDisplayed == "0"} {* if poster was not displayed for this one entry, display it now *}
					<td rowspan='100'><img src="{GetMovieProp MovieID=$MovieID PropID=$PosterPropID Style="normal"}"></td>
					{assign var="PosterDisplayed" value="1"}
				{/if}
				<td align='right'><b>{$Prop.ListHeader}:</b></td>
				<td{if $Prop.ListProperties} {$Prop.ListProperties}{/if}>
					{if $Prop.PropType == 13}
						{$Url}
						{$MovieNrs.$kMovie}
						{if $Url}</a>{/if}
					{else}			  
						{$Url}
						{GetMovieProp MovieID=$MovieID PropID=$Prop.ID}
						{if $Url}</a>{/if}
					{/if}
        </td>
			</tr>
		{/if}
  {/foreach}
	{if $ActiveUserRights >= 4}
		<tr class='{cycle}'>
		  <td align='right'><b>admin:</b></td>
			<td>
			  <a href="editentry.php{$CFG.GlobalArg}action=delete&ID={$MovieID}" onclick="return confirm('{$lang.strDeleteEntrySure}')">
			  <img src='image/edit/del.png' width='13' height='13' border='0' alt='delete'></a>
			  <a href="editentry.php{$CFG.GlobalArg}action=edit&ID={$MovieID}">
			  <img src='image/edit/edit.png' width='15' height='13' border='0' alt='edit'></a>
			</td>
		</tr>
	{/if}
	</table>
   </td>

{/foreach}
Return current item: PowerMovieList