<?php
/**
* iLP System Template: Systemeinstellungen
*
* 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['system']['navi']['home'].'</h1>
<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('system;do').'" id="systemform">
<fieldset>
<legend><img src="../images/icons/world.png" alt="icon" /> '.$lang['system']['settings']['language'].'</legend>
<div class="inputGroup">
<div class="inputName">
<label for="system_lang_system">
'.$lang['system']['settings']['lang_system'].'
</label>
</div>
<div class="inputField">
<select name="system_lang_system" id="system_lang_system" size="1">';
foreach ($tpl['system']['lang_array'] as $key => $row)
{
echo '<option value="'.$key.'"';
if ($key == $_SESSION['config']['locale']) echo ' selected="selected"';
echo '>'.$row.'</option>';
}
echo '</select>
<div class="inputDesc">
<label for="system_lang_system">
'.$lang['system']['settings']['lang_systemnote'].'
</label>
</div>
</div>
</div>
<div class="inputGroup">
<div class="inputName">
<label for="system_tooltip_locale">
'.$lang['system']['settings']['lang_tooltip'].'
</label>
</div>
<div class="inputField">
<select name="system_tooltip_locale" id="system_tooltip_locale" size="1">';
foreach ($tpl['system']['tooltip_locale_array'] as $key => $row)
{
echo '<option value="'.$key.'"';
if ($key == $_SESSION['config']['lang_tooltip']) echo ' selected="selected"';
echo '>'.$row.'</option>';
}
echo '</select>
<div class="inputDesc">
<label for="system_tooltip_locale">
'.$lang['system']['settings']['lang_tooltipnote'].'
</label>
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend><img src="../images/icons/user_gray.png" alt="icon" /> '.$lang['system']['settings']['guild'].'</legend>
<div class="inputGroup">
<div class="inputName">
<label for="system_guild_name">
'.$lang['system']['settings']['guild_name'].'
</label>
</div>
<div class="inputField">
<input type="text" name="system_guild_name" id="system_guild_name" value="'.$_SESSION['config']['guild_name'].'" />
<div class="inputDesc">
<label for="system_guild_name">
'.$lang['system']['settings']['guild_namenote'].'
</label>
</div>
</div>
</div><div class="inputGroup">
<div class="inputName">
<label for="system_guild_realm">
'.$lang['system']['settings']['guild_realm'].'
</label>
</div>
<div class="inputField">
<input type="text" name="system_guild_realm" id="system_guild_realm" value="'.$_SESSION['config']['guild_realm'].'" />
<div class="inputDesc">
<label for="system_guild_realm">
'.$lang['system']['settings']['guild_realmnote'].'
</label>
</div>
</div>
</div>
<div class="inputGroup">
<div class="inputName">
<label for="system_guild_region">
'.$lang['system']['settings']['guild_region'].'
</label>
</div>
<div class="inputField">
<select name="system_guild_region" id="system_guild_region" size="1">';
foreach ($tpl['system']['region_array'] as $key => $row)
{
echo '<option value="'.$key.'"';
if ($key == $_SESSION['config']['guild_region']) echo ' selected="selected"';
echo '>'.$row.'</option>';
}
echo '</select>
<div class="inputDesc">
<label for="system_guild_region">
'.$lang['system']['settings']['guild_regionnote'].'
</label>
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend><img src="../images/icons/cart.png" alt="icon" /> '.$lang['system']['list'].'</legend>
<div class="inputGroup">
<div class="inputName">
<label for="system_list_slots">
'.$lang['system']['settings']['list_slots'].'
</label>
</div>
<div class="inputField">
<input type="text" name="system_list_slots" id="system_list_slots" value="'.$_SESSION['config']['default_slots'].'" />
<div class="inputDesc">
<label for="system_list_slots">
'.$lang['system']['settings']['list_slotsnote'].'
</label>
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend><img src="../images/icons/newspaper.png" alt="icon" /> '.$lang['system']['settings']['display'].'</legend>
<div class="inputGroup">
<div class="inputName">
<label for="sytem_display_loots">
'.$lang['system']['settings']['display_loots'].'
</label>
</div>
<div class="inputField">
<input type="text" name="system_display_loots" id="system_display_loots" value="'.$_SESSION['config']['last_loots'].'" />
<div class="inputDesc">
<label for="system_display_loots">
'.$lang['system']['settings']['display_lootsnote'].'
</label>
</div>
</div>
</div>
<div class="inputGroup">
<div class="inputName">
<label for="sytem_display_events">
'.$lang['system']['settings']['display_events'].'
</label>
</div>
<div class="inputField">
<input type="text" name="system_display_events" id="system_display_events" value="'.$_SESSION['config']['last_events'].'" />
<div class="inputDesc">
<label for="system_display_events">
'.$lang['system']['settings']['display_eventsnote'].'
</label>
</div>
</div>
</div>
</fieldset>
<div>
<input type="submit" value="'.$lang['system']['save'].'" />
</div>
</form>';
}
// Logfile anzeigen
elseif (isset($tpl['url'][1]) && 'log' == $tpl['url'][1])
{
echo '<h1>'.$lang['system']['log']['header'].'</h1>
<form method="post" action="?ilp='.ilpUrlEncode('system;log;filter').'" id="logform">
<fieldset>
<legend><img src="../images/icons/script_gear.png" alt="icon" /> '.$lang['system']['log']['order'].'</legend>
<div class="inputGroup">
<div class="inputName">
<label for="show_time_start">
'.$lang['system']['log']['showtime'].'
</label>
</div>
<div class="inputField">
<input type="text" name="show_time_start" id="show_time_start" value="'.$tpl['show_time_start'].'" /> â <input type="text" name="show_time_stop" id="show_time_stop" value="'.$tpl['show_time_stop'].'" />
<select name="show_time_bool" id="show_time_bool" size="1">
<option value="1"';
if ($tpl['show_time_bool'] == 1) echo ' selected="selected"';
echo '>'.$lang['system']['log']['show'].'</option>
<option value="0"';
if ($tpl['show_time_bool'] == 0) echo ' selected="selected"';
echo '>'.$lang['system']['log']['shownot'].'</option>
</select>
<div class="inputDesc">
<label for="show_time_start">
'.$lang['system']['log']['datenote'].'
</label>
</div>
</div>
</div>
<div class="inputGroup">
<div class="inputName">
<label for="show_actor">
'.$lang['system']['log']['showactor'].'
</label>
</div>
<div class="inputField">
<select name="show_actor" id="show_actor">
<option value="*"';
if ($tpl['show_actor'] == '*') echo ' selected="selected"';
echo '>'.$lang['system']['log']['all'].'</option>';
foreach ($tpl['chars'] as $row)
{
echo '<option value="'.$row['user_id'].'"';
if ($tpl['show_actor'] == $row['user_id']) echo ' selected="selected"';
echo '>'.$row['char']['name'].'</option>';
}
echo '</select>
<select name="show_actor_bool" id="show_actor_bool" size="1">
<option value="1"';
if ($tpl['show_actor_bool'] == 1) echo ' selected="selected"';
echo '>'.$lang['system']['log']['show'].'</option>
<option value="0"';
if ($tpl['show_actor_bool'] == 0) echo ' selected="selected"';
echo '>'.$lang['system']['log']['shownot'].'</option>
</select>
</div>
</div>
<div class="inputGroup">
<div class="inputName">
<label for="show_victim">
'.$lang['system']['log']['showvictim'].'
</label>
</div>
<div class="inputField">
<select name="show_victim" id="show_victim">
<option value="*"';
if ($tpl['show_victim'] == '*') echo ' selected="selected"';
echo '>'.$lang['system']['log']['all'].'</option>';
foreach ($tpl['chars'] as $row)
{
echo '<option value="'.$row['user_id'].'"';
if ($tpl['show_victim'] == $row['user_id']) echo ' selected="selected"';
echo '>'.$row['char']['name'].'</option>';
}
echo '</select>
<select name="show_victim_bool" id="show_victim_bool" size="1">
<option value="1"';
if ($tpl['show_victim_bool'] == 1) echo ' selected="selected"';
echo '>'.$lang['system']['log']['show'].'</option>
<option value="0"';
if ($tpl['show_victim_bool'] == 0) echo ' selected="selected"';
echo '>'.$lang['system']['log']['shownot'].'</option>
</select>
</div>
</div>
<div class="inputGroup">
<div class="inputName">
<label for="show_action">
'.$lang['system']['log']['showaction'].'
</label>
</div>
<div class="inputField">
<select name="show_action" id="show_action" size="1">
<option value="*"';
if ($tpl['show_action'] == '*') echo ' selected="selected"';
echo '>'.$lang['system']['log']['all'].'</option>';
foreach ($tpl['actions'] as $key => $row)
{
echo '<option value="'.$key.'"';
if ($tpl['show_action'] == $key) echo ' selected="selected"';
echo '>'.$row.'</option>';
}
echo '</select>
<select name="show_action_bool" id="show_action_bool" size="1">
<option value="1"';
if ($tpl['show_action_bool'] == 1) echo ' selected="selected"';
echo '>'.$lang['system']['log']['show'].'</option>
<option value="0"';
if ($tpl['show_action_bool'] == 0) echo ' selected="selected"';
echo '>'.$lang['system']['log']['shownot'].'</option>
</select>
</div>
</div>
<div class="inputGroup">
<div class="inputName">
<label for="show_maxlogs">
'.$lang['system']['log']['maxlogs'].'
</label>
</div>
<div class="inputField">
<input type="text" name="show_maxlogs" id="show_maxlogs" value="'.$tpl['show_maxlogs'].'" />
<div class="inputDesc">
<label for="show_maxlogs">
'.$lang['system']['log']['maxlogsnote'].'
</label>
</div>
</div>
</div>
</fieldset>
<div>
<input type="submit" value="'.$lang['system']['log']['refresh'].'" />
</div>
</form>
<br />
<table cellpadding="0" cellspacing="1">
<thead>
<tr>
<th>
'.$lang['system']['log']['date'].'
</th>
<th>
'.$lang['system']['log']['actor'].'
</th>
<th>
'.$lang['system']['log']['victim'].'
</th>
<th>
'.$lang['system']['log']['action'].'
</th>
<th>
'.$lang['system']['log']['values'].'
</th>
</tr>
</thead>
<tbody>';
if (isset($tpl['log']))
{
foreach ($tpl['log'] as $row)
{
echo '<tr>
<td>'.$row['date'].'</td>
<td>
<a href="?ilp='.ilpUrlEncode('search;user;'.$row['actor']).'" rel="'.getSafeURL('http://armorylite.com/'.$_SESSION['config']['guild_region'].'/'.$_SESSION['config']['guild_realm'].'/'.$row['actor_char']['name']).'" class="class-'.$row['actor_char']['class'].'">'.$row['actor_char']['name'].'</a>
</td>
<td>
<a href="?ilp='.ilpUrlEncode('search;user;'.$row['victim']).'" rel="'.getSafeURL('http://armorylite.com/'.$_SESSION['config']['guild_region'].'/'.$_SESSION['config']['guild_realm'].'/'.$row['victim_char']['name']).'" class="class-'.$row['victim_char']['class'].'">'.$row['victim_char']['name'].'</a>
</td>
<td>'.$lang['log'][$row['action']].'</td>
<td>';
foreach ($row['values'] as $key => $value)
{
echo '<b>'.$key.':</b> '.$value.'<br />';
}
echo '</td>
</tr>';
}
}
else
{
echo '<tr>
<td colspan="5">
<span class="info">'.$lang['system']['log']['error'].'</span>
</td>
</tr>';
}
echo '</tbody>
</table>';
}
// Caches löschen
elseif ('caches' == $tpl['url'][1])
{
if (isset($tpl['url'][2]) && 'playercache' == $tpl['url'][2])
{
echo '<h1><a href="?ilp='.ilpUrlEncode('system;caches').'">'.$lang['system']['caches']['header'].'</a> | '.$lang['system']['caches']['deleteplayercache'].'</h1>
<form method="post" action="?ilp='.ilpUrlEncode('system;caches').'">
<fieldset>
<legend><img src="../images/icons/hourglass.png" alt="icon" /> '.$lang['system']['caches']['deleteplayercache'].'</legend>
<div id="progressBox">
<span id="progressBar"></span>
</div>
<div id="progressStatus" class="note">
<span class="warning">
'.$lang['system']['caches']['wait'].'
</span>
</div>
</fieldset>
<div id="submit">
</div>
</form>';
}
else
{
echo '<h1>'.$lang['system']['caches']['header'].'</h1>
<p>
'.$lang['system']['caches']['text'].'
</p>
<form method="post" action="?ilp='.ilpUrlEncode('system;caches;itemcache').'">
<fieldset>
<legend><img src="../images/icons/script_lightning.png" /> '.$lang['system']['caches']['deleteitemcache'].'</legend>
<p>
'.$lang['system']['caches']['itemcache'].'
</p>
</fieldset>
<div>
<input type="submit" value="'.$lang['system']['caches']['deleteitemcache'].'" />
</div>
</form>
<br />
<form method="post" action="?ilp='.ilpUrlEncode('system;caches;playercache').'" id="progressForm">
<input type="hidden" name="users" value="'.$tpl['users'].'" />
<fieldset>
<legend><img src="../images/icons/script_lightning.png" /> '.$lang['system']['caches']['deleteplayercache'].'</legend>
<p>
'.$lang['system']['caches']['playercache'].'
<noscript>
<span class="warning">'.$lang['system']['caches']['scripterror'].'</span>
</noscript>
</p>
</fieldset>
</form>';
}
}
?>