<?php
/**************************************************************************
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
@Authors: Ryan Thompson(hide@address.com)
***************************************************************************/
include("./data.php");
$service['add_header'] = TRUE;
include("../config.inc.php");
include($here. "/class.admin.php");
$admin = new admin;
echo $layout->page_header;
echo $layout->service_header($text['service_name'], $admin->nav_buttons());
?>
<br />
<table style="width:500px" align="center">
<caption class="list_header"><?php echo $text['user_management'];?></caption>
<tr><td class="list_dark"><?php echo $O->create_link('/admin/user_add.php', $text['create_user_account'], 'list_dark')?></td></tr>
<tr>
<form action="user_edit.php" action="get">
<td width="500" class="list_light">
<?php echo $text['manage_user_account']?>
<select name="user">
<?php
$sql = "SELECT user_id, username FROM o_users WHERE user_id != 1";
$db->query($sql);
while($db->fetch_results())
{
echo "<option value=\"{$db->record['user_id']}\">{$db->record['username']}</option>\n";
}
?>
</select>
<input type="submit" name="update" value="Edit" class="button1">
</td>
</form>
</tr>
<tr>
<td class="list_dark"><?php echo $O->create_link('/admin/user_list.php', $text['list_user_accounts'], 'list_dark')?></td>
</tr>
<tr>
<td class="list_light"><?php echo $O->create_link('/admin/group_add.php', $text['create_group_account'], 'list_light')?></td>
</tr>
<tr>
<form action="group_edit.php" action="get">
<td class="list_dark">
<?php echo $text['manage_group_account'];?>
<select name="manage_group">
<?php
$sql = "SELECT group_id, group_name FROM o_groups";
$db->query($sql);
while($db->fetch_results())
{
echo "<option value=\"{$db->record['group_id']}\">{$db->record['group_name']}</option>\n";
}
?>
</select>
<input type="submit" name="update" value="Edit" class="button1">
</td>
</form>
</tr>
<tr>
<td class="list_light"><?php echo $O->create_link('/admin/user_defaults.php', $text['update_user_defaults'], 'list_light')?></td>
</tr>
</table>
<br />
<table style="width:500px" align="center">
<tr>
<caption class="list_header"><?php echo $text['session_management']?></caption>
</tr>
<tr>
<td class="list_light"><?php echo $O->create_link('/admin/sessions.php', $text['list_sessions'], 'list_light')?></td>
</tr>
<tr>
<td class="list_dark"><?php echo $O->create_link('/admin/clear_sessions.php', $text['clear_sessions'], 'list_dark')?></td>
</tr>
</table>
<br />
<table style="width:500px" align="center">
<tr>
<caption class="list_header"><?php echo $text['service_management']?></caption>
</tr>
<?php
$sql = "SELECT * FROM o_services";
$db->query($sql);
while($db->fetch_results())
{
if($class == 'list_dark')
{
$class = 'list_light';
} else {
$class = 'list_dark';
}
echo "<tr>\n";
echo "<td class=\"$class\">";
include($O->dir ."/{$db->record['location']}/data.php");
echo $O->create_link("/admin/update_service.php?s={$db->record['code']}", $service['name'], $class);
echo "</td>\n";
echo "</tr>\n";
}
?>
</table>
<br />
<table style="width:500px" align="center">
<caption class="list_header"><?php echo $text['system_management']?></caption>
<tr>
<td class="list_light" colspan="2"><?php echo $O->create_link('/settings.php', $text['edit_settings'], 'list_light')?></td>
</tr>
<tr>
<td class="list_dark"><?php echo $O->create_link('/config', $text['re-config'], 'list_dark')?></td>
</tr>
<tr>
<td class="list_light"><?php echo $O->create_link('/admin/plugin_manager.php', $text['plugin_manager'], 'list_light')?></td>
</tr>
<tr>
<td class="list_dark"><?php echo $O->create_link('/admin/holidays.php', $text['holiday_manager'], 'list_dark')?></td>
</tr>
<tr>
<td class="list_light"><?php echo $O->create_link('/admin/language_manager.php', $text['language_manager'], 'list_light')?></td>
</tr>
<tr>
<td class="list_dark"><?php echo $O->create_link('/admin/stats.php', $text['statistics'], 'list_dark')?></td>
</tr>
<tr>
<td class="list_light"><?php
$sql = "SELECT value FROM o_settings WHERE setting_id='10'";
$db->query($sql);
$db->fetch_results();
if($db->record['value'] == 'FALSE')
{
echo $O->create_link('/admin/lock.php?lo=lock', $text['lock'], 'list_light');
} else {
echo $O->create_link('/admin/lock.php?lo=unlock', $text['unlock'], 'list_light');
}
?></td>
</table>
<br />
<?php
echo $layout->create_footer();
?>