Location: PHPKode > projects > iLP System > Release 2.2/upload/lib/templates/tpl.reqs.php
<?php
/**
 * iLP System Template: Anfragen 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.1
 */
if (!isset($tpl['reqs']['error']))
{
	if (!isset($tpl['url'][2]))
	{
		echo '<h1>'.$lang['reqs']['navi']['home'].'</h1>
		<p>
			'.$lang['reqs']['home']['text'].'
		</p>
		<table border="0" cellpadding="0" cellspacing="1" class="reqtable">
			<thead>
				<tr>
					<th>
						'.$lang['reqs']['sent_date'].'
					</th>
					<th>
						'.$lang['reqs']['type'].'
					</th>
				</tr>
			</thead>
			<tbody>';
		foreach ($tpl['reqs'] as $row)
		{
			echo '
				<tr>
					<td>'.$row['date_sent'].'</td>
					<td><img src="images/icons/email'.$row['status']['icon'].'.png" alt="icon" title="'.$row['status']['desc'].'" /> <a class="status'.$row['status']['icon'].'" href="?ilp='.ilpUrlEncode('start;reqs;detail;'.$row['req_id']).'">'.$row['req_type'].'</a><br />';
			if (1 == $row['req_type_id'])
			{
				echo '<span class="note">'.getWowheadLink($row['req_values']['old_item_id'], $lang['tooltip_locale']).' -&gt; '.getWowheadLink($row['req_values']['item_id'], $lang['tooltip_locale']).'</span>';
			}
			elseif (2 == $row['req_type_id'])
			{
				echo '<span class="note"><a href="?ilp='.ilpUrlEncode('search;user;'.$row['req_values']['user_id']).'" rel="'.getSafeURL('http://armorylite.com/'.$_SESSION['config']['guild_region'].'/'.$_SESSION['config']['guild_realm'].'/'.$row['req_values']['old_name']).'" class="class-'.$row['req_values']['old_class'].'">'.$row['req_values']['old_name'].'</a> -&gt; <a href="?ilp='.ilpUrlEncode('search;user;'.$row['req_values']['user_id']).'" rel="'.getSafeURL('http://armorylite.com/'.$_SESSION['config']['guild_region'].'/'.$_SESSION['config']['guild_realm'].'/'.$row['req_values']['new_name']).'" class="class-'.$row['req_values']['new_class'].'">'.$row['req_values']['new_name'].'</a></span>';
			}
			echo '</td>
				</tr>';
		}
		echo '</tbody>
		</table>
		<h2>Legende</h2>
		<ul>
			<li><img src="images/icons/email.png" alt="icon" /> <a class="status">'.$lang['reqs']['home']['sent'].'</a></li>
			<li><img src="images/icons/email_open.png" alt="icon" /> <a class="status_open">'.$lang['reqs']['home']['read'].'</a></li>
			<li><img src="images/icons/email_edit.png" alt="icon" /> <a class="status_edit">'.$lang['reqs']['home']['edit'].'</a></li>
		</ul>';
	}
	
	// Details einer Anfrage anzeigen
	elseif ('detail' == $tpl['url'][2])
	{
		echo '<h1><a href="?ilp='.ilpUrlEncode('start;reqs').'">'.$lang['reqs']['navi']['home'].'</a> | '.$lang['reqs']['navi']['details'].'</h1><form action="">
				<fieldset>
					<legend><img src="images/icons/email.png" alt="icon" /> '.$lang['reqs']['detail']['show'].'</legend>
					<div class="inputGroup">
						<div class="inputName">
							'.$lang['reqs']['detail']['type'].'
						</div>
						<div class="inputField">
							<span>
								'.$tpl['req']['req_type_name'].'
							</span>
						</div>
					</div>
					<div class="inputGroup">
						<div class="inputName">
							'.$lang['reqs']['detail']['values'].'
						</div>
						<div class="inputField">';
		if (1 == $tpl['req']['req_type'])
		{
			echo '<span>
								'.$lang['reqs']['detail']['old_item'].': '.getWowheadLink($tpl['req']['req_values']['old_item_id']).'<br />
								'.$lang['reqs']['detail']['new_item'].': '.getWowheadLink($tpl['req']['req_values']['item_id']).'
							</span>';
		}
		elseif (2 == $tpl['req']['req_type'])
		{
			echo '<span>
								'.$lang['reqs']['detail']['old_char'].': <img src="images/icons/'.$tpl['req']['req_values']['old_class'].'.png" alt="wowicon" /><img src="images/icons/'.$tpl['req']['req_values']['old_class'].$tpl['req']['req_values']['old_spec'].'.png" alt="wowicon" /> <a href="?ilp='.ilpUrlEncode('search;user;'.$tpl['req']['req_values']['user_id']).'" rel="'.getSafeURL('http://armorylite.com/'.$_SESSION['config']['guild_region'].'/'.$_SESSION['config']['guild_realm'].'/'.$tpl['req']['req_values']['old_name']).'" class="class-'.$tpl['req']['req_values']['old_class'].'">'.$tpl['req']['req_values']['old_name'].'</a><br /><br />
								'.$lang['reqs']['detail']['new_char'].': <img src="images/icons/'.$tpl['req']['req_values']['new_class'].'.png" alt="wowicon" /><img src="images/icons/'.$tpl['req']['req_values']['new_class'].$tpl['req']['req_values']['new_spec'].'.png" alt="wowicon" /> <a href="?ilp='.ilpUrlEncode('search;user;'.$tpl['req']['req_values']['user_id']).'" rel="'.getSafeURL('http://armorylite.com/'.$_SESSION['config']['guild_region'].'/'.$_SESSION['config']['guild_realm'].'/'.$tpl['req']['req_values']['new_name']).'" class="class-'.$tpl['req']['req_values']['new_class'].'">'.$tpl['req']['req_values']['new_name'].'</a>
							</span>';
		}
		echo '</div>
					</div>
					<div class="inputGroup">
						<div class="inputName">
							<label for="reqdelete_date_sent">
								'.$lang['reqs']['sent_date'].'
							</label>
						</div>
						<div class="inputField">
							<span>
								'.$tpl['req']['date_sent'].'
							</span>
						</div>
					</div>
					<div class="inputGroup">
						<div class="inputName">
							'.$lang['list']['req']['message'].'
						</div>
						<div class="inputField">
							<span>
								'.$tpl['req']['req_msg'].'
							</span>
						</div>
					</div>';
		if ('0000-00-00' != $tpl['req']['date_read'])
		{
			if ('0000-00-00' != $tpl['req']['date_edit'])
			{
				echo '</fieldset>
			</form>
			<form action="">
				<fieldset>
					<legend><img src="images/icons/email_edit.png" alt="icon" /> '.$lang['reqs']['detail']['edit']['head'].'</legend>
					<div class="inputGroup">
						<div class="inputName">
							'.$lang['reqs']['detail']['edit']['date'].'
						</div>
						<div class="inputField">
							<span>
								'.$tpl['req']['date_edit'].'
							</span>
						</div>
					</div>
					<div class="inputGroup">
						<div class="inputName">
							'.$lang['reqs']['detail']['edit']['by'].'
						</div>
						<div class="inputField">
							<span>
								<img src="images/icons/'.$tpl['req']['edit_name']['char']['class'].'.png" alt="wowicon" /><img src="images/icons/'.$tpl['req']['edit_name']['char']['class'].$tpl['req']['edit_name']['char']['spec'].'.png" alt="wowicon" /> <a href="?ilp='.ilpUrlEncode('search;user;'.$tpl['req']['edit_name']['id']).'" rel="'.getSafeURL('http://armorylite.com/'.$_SESSION['config']['guild_region'].'/'.$_SESSION['config']['guild_realm'].'/'.$tpl['req']['edit_name']['char']['name']).'" class="class-'.$tpl['req']['edit_name']['char']['class'].'">'.$tpl['req']['edit_name']['char']['name'].'</a>
							</span>
						</div>
					</div>
					<div class="inputGroup">
						<div class="inputName">
							'.$lang['reqs']['detail']['edit']['msg'].'
						</div>
						<div class="inputField">
							<span>
								'.$tpl['req']['req_answer'].'
							</span>
						</div>
					</div>';
			}
			else
			{
				echo '</fieldset>
					</form>
					<form action="">
						<fieldset>
							<legend><img src="images/icons/email_open.png" alt="icon" /> '.$lang['reqs']['detail']['read']['head'].'</legend>
							<div class="inputGroup">
								<div class="inputName">
									'.$lang['reqs']['detail']['read']['date'].'
								</div>
								<div class="inputField">
									<span>
										'.$tpl['req']['date_read'].'
									</span>
								</div>
							</div>
							<div class="inputGroup">
								<div class="inputName">
									'.$lang['reqs']['detail']['read']['by'].'
								</div>
								<div class="inputField">
									<span>
										<img src="images/icons/'.$tpl['req']['read_name']['char']['class'].'.png" alt="wowicon" /><img src="images/icons/'.$tpl['req']['read_name']['char']['class'].$tpl['req']['read_name']['char']['spec'].'.png" alt="wowicon" /> <a href="?ilp='.ilpUrlEncode('search;user;'.$tpl['req']['read_name']['id']).'" rel="'.getSafeURL('http://armorylite.com/'.$_SESSION['config']['guild_region'].'/'.$_SESSION['config']['guild_realm'].'/'.$tpl['req']['read_name']['char']['name']).'" class="class-'.$tpl['req']['read_name']['char']['class'].'">'.$tpl['req']['read_name']['char']['name'].'</a>
									</span>
								</div>
							</div>';
			}
		}
		echo '</fieldset>
			</form>';
	}
}

else
{
	echo '<div class="info">
			<h1>'.$lang['reqs']['info']['header'].'</h1>
			<p>
				'.$lang['reqs']['info']['text'].'
			</p>
		</div>';
}
?>
Return current item: iLP System