Location: PHPKode > projects > iLP System > Release 2.2/upload/lib/templates/tpl.events.php
<?php
/**
 * iLP System Template: Ereignisse anzeigen
 * 
 * Autor:		Florian "ApoY2k" Peschka
 * Projekt:		iLP System
 * Paket:		apoy2k.ilp.wrynn.lib.tpl
 * Lizenz:		CreativeCommons (by-nc-sa)
 * Kontakt:		hide@address.com
 * Version:		2.1.2
 */
if (!isset($tpl['url'][2]) || 'show' == $tpl['url'][2])
{
	echo '<h1>'.$lang['events']['navi']['home'].'</h1>';
	
	if (!isset($tpl['events']['error']))
	{
		echo '<p>
		'.$lang['events']['home']['text'][0].'
	</p>
	<p>
		'.$lang['events']['home']['text'][1].'
	</p>
	<div class="blocklist eventList">';
	
		foreach ($tpl['events'] as $row)
		{
			echo '<a href="?ilp='.ilpUrlEncode('start;events;detail;'.$row['event_id']).'">
					<img src="images/icons/'.$row['type_icon'].'" />
					<span>
						<b>'.$row['type_name'].'</b> ('.$row['value'].')<br />
						<span class="note">'.$row['event_date'].'</span>
					</span>
				</a>';
		}
		
		echo '</div>';
	}
	
	else
	{
		echo '<div class="info">
				<h1>'.$lang['events']['error']['header'].'</h1>
				<p>
					'.$lang['events']['error']['text'].'
				</p>
			</div>';
	}
}

elseif ('detail' == $tpl['url'][2])
{
	echo '<h1><a href="?ilp='.ilpUrlEncode('start;events').'">'.$lang['events']['navi']['home'].'</a> | '.$lang['events']['navi']['details'][0].' <em>'.$tpl['event']['type_name'].'</em> '.$lang['events']['navi']['details'][1].'</h1>
		<div class="event">
			<h2><img src="images/icons/'.$tpl['event']['type_icon'].'" /> '.$tpl['event']['type_name'].' <span class="note">'.$tpl['event']['event_date'].'</span></h2>
			<p>
				<em>'.$tpl['event']['comment'].'</em>
			</p>
			<fieldset>
				<legend><img src="images/icons/cart_put.png" alt="icon" /> '.$lang['events']['loot']['header'].'</legend>';
				
	if (isset($tpl['event']['loots']))
	{
		echo '<ul>';
		foreach ($tpl['event']['loots'] as $row)
		{
			echo '<li><img src="images/icons/'.$row['char']['class'].'.png" alt="wowicon" /><img src="images/icons/'.$row['char']['class'].$row['char']['spec'].'.png" alt="wowicon" /> <a href="?ilp='.ilpUrlEncode('search;user;'.$row['looter_id']).'" rel="'.getSafeURL('http://armorylite.com/'.$_SESSION['config']['guild_region'].'/'.$_SESSION['config']['guild_realm'].'/'.$row['char']['name']).'" class="class-'.$row['char']['class'].'">'.$row['char']['name'].'</a> '.$lang['events']['loot'][0].' '.getWowheadLink($row['item_id'], $lang['tooltip_locale']).' '.$lang['events']['loot'][1].' <b>'.$row['value'].'</b> '.$lang['list']['points'].'</li>';
		}
		echo '</ul>';
	}
	
	else
	{
		echo '<span class="info">'.$lang['events']['error']['loot'].'</span>';
	}
	
	echo '</fieldset>
			<fieldset class="blocklist">
				<legend><img src="images/icons/group.png" alt="icon" /> '.$lang['events']['players']['header'].'</legend>';
				
	if (isset($tpl['event']['attends']))
	{
		foreach ($tpl['event']['attends'] as $row)
		{
			echo '<a href="?ilp='.ilpUrlEncode('search;user;'.$row['user_id']).'" rel="'.getSafeURL('http://armorylite.com/'.$_SESSION['config']['guild_region'].'/'.$_SESSION['config']['guild_realm'].'/'.$row['char']['name']).'" class="class-'.$row['char']['class'].'"><img src="images/icons/'.$row['char']['class'].'.png" alt="wowicon" /><img src="images/icons/'.$row['char']['class'].$row['char']['spec'].'.png" alt="wowicon" /> '.$row['char']['name'].' ('.$row['value'].')</a>';
		}
	}
	
	else
	{
		echo '<span class="info">'.$lang['events']['error']['players'].'</span>';
	}
	echo '</fieldset>
		</div>';
}
?>
Return current item: iLP System