Location: PHPKode > projects > iLP System > Release 2.2/upload/_backend/lib/templates/tpl.reqs.php
<?php
/**
 * iLP System Template: 
 * 
 * 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['url'][1]))
{
	echo '<h1>'.$lang['reqs']['navi']['show'].'</h1>
	<table border="0" cellpadding="0" cellspacing="1" class="reqtable">
			<thead>
				<tr>
					<th>
						'.$lang['reqs']['sent_date'].'
					</th>
					<th>
						'.$lang['reqs']['sent_by'].'
					</th>
					<th>
						'.$lang['reqs']['type'].'
					</th>
				</tr>
			</thead>
			<tbody>';
	
	if (isset($tpl['reqs']))
	{
		foreach ($tpl['reqs'] as $row)
		{
			echo '
				<tr>
					<td>'.$row['date_sent'].'</td>
					<td><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['sent_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></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('reqs;edit;'.$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="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>';
		}
	}
	else
	{
		echo '<tr>
			<td colspan="3">
				<span class="info">'.$lang['reqs']['error'].'</span>
			</td>
		</tr>';
	}
		echo '</tbody>
		</table>
		<h2>Legende</h2>
		<ul>
			<li><img src="../images/icons/email.png" alt="icon" /> <a class="status">'.$lang['reqs']['info']['sent'].'</a></li>
			<li><img src="../images/icons/email_open.png" alt="icon" /> <a class="status_open">'.$lang['reqs']['info']['read'].'</a></li>
			<li><img src="../images/icons/email_edit.png" alt="icon" /> <a class="status_edit">'.$lang['reqs']['info']['edit'].'</a></li>
		</ul>';
}

// Details einer Anfrage anzeigen & bearbeiten
elseif (isset($tpl['url'][1]) && 'edit' == $tpl['url'][1])
{
	echo '<h1><a href="?ilp='.ilpUrlEncode('reqs').'">'.$lang['reqs']['navi']['show'].'</a> | '.$lang['reqs']['navi']['details'].'</h1>
		<form action="">
			<fieldset>
				<legend><img src="../images/icons/email.png" alt="icon" /> '.$lang['reqs']['navi']['details'].'</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">
						<label>
							'.$lang['reqs']['sent_by'].'
						</label>
					</div>
					<div class="inputField">
						<span><img src="../images/icons/'.$tpl['req']['char']['class'].'.png" alt="wowicon" /><img src="../images/icons/'.$tpl['req']['char']['class'].$tpl['req']['char']['spec'].'.png" alt="wowicon" /> <a href="?ilp='.ilpUrlEncode('search;user;'.$tpl['req']['sent_id']).'" rel="'.getSafeURL('http://armorylite.com/'.$_SESSION['config']['guild_region'].'/'.$_SESSION['config']['guild_realm'].'/'.$tpl['req']['char']['name']).'" class="class-'.$tpl['req']['char']['class'].'">'.$tpl['req']['char']['name'].'</a></span>
					</div>
				</div>
				<div class="inputGroup">
					<div class="inputName">
						'.$lang['reqs']['detail']['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>';
	
	if ('0000-00-00' == $tpl['req']['date_edit'])
	{
		echo '<div id="errorMessage" class="warning">
			<h1><img src="../images/icons/error.png" alt="icon" /> '.$lang['error']['header'].'</h1>
			<ul>
				<li><span class="note">'.$lang['error']['note'].'</span></li>
			</ul>
		</div>
		<form method="post" action="?ilp='.ilpUrlEncode('reqs;edit;do').'" id="editreqform">
			<input type="hidden" name="editreq_req_id" id="editreq_req_id" value="'.$tpl['url'][2].'" />
			<fieldset>
				<legend><img src="../images/icons/email_edit.png" alt="icon" /> '.$lang['reqs']['detail']['edit_req'].'</legend>
				<div class="inputGroup">
					<div class="inputName">
						<label for="editreq_message">
							'.$lang['reqs']['detail']['answer'].'
						</label>
					</div>
					<div class="inputField">
						<textarea rows="10" cols="45" name="editreq_message" id="editreq_message"></textarea>
						<div class="inputDesc">
							<label for="editreq_message">
								'.$lang['reqs']['detail']['answernote'].'
							</label>
						</div>
					</div>
				</div>
			</fieldset>
			<div>
				<input type="submit" value="'.$lang['reqs']['detail']['edit_req'].'" />
			</div>
		</form>';
	}
}
?>
Return current item: iLP System