Admin panel fixes (#62)

* Admin Panel

* fixes

-Code Clean Up
-Remove dist folder and merged into tools.
This commit is contained in:
Lee
2018-11-24 14:42:20 +00:00
committed by slawkens
parent 6dab50cbd8
commit d1e6061541
54 changed files with 604 additions and 690 deletions

View File

@@ -36,8 +36,8 @@ function verify_number($number, $name, $max_length)
?>
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>tools/jquery.datetimepicker.css"/ >
<script src="<?php echo BASE_URL; ?>tools/jquery.datetimepicker.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>tools/css/jquery.datetimepicker.css"/ >
<script src="<?php echo BASE_URL; ?>tools/js/jquery.datetimepicker.js"></script>
<?php
$id = 0;
@@ -327,7 +327,7 @@ else if ($id > 0 && isset($account) && $account->isLoaded())
value="<?php echo $account->getCustomField('web_lastlogin'); ?>"/>
</div>
</div>
<!-- nav-tabs-custom -->
<input type="hidden" name="save" value="yes"/>
<div class="box-footer">
<a href="<?php echo ADMIN_URL; ?>?p=accounts"><span class="btn btn-danger">Cancel</span></a>
@@ -349,9 +349,7 @@ else if ($id > 0 && isset($account) && $account->isLoaded())
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
<form action="<?php echo $base; ?>" method="post">
@@ -364,9 +362,7 @@ else if ($id > 0 && isset($account) && $account->isLoaded())
</div>
</form>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
<?php
if (isset($account) && $account->isLoaded()) {
$account_players = array();
@@ -377,7 +373,6 @@ else if ($id > 0 && isset($account) && $account->isLoaded())
<div class="box-header">
<h3 class="box-title">Character List:</h3>
</div>
<!-- /.box-header -->
<div class="box-body no-padding">
<table class="table table-striped">
<tbody><tr>
@@ -401,7 +396,6 @@ else if ($id > 0 && isset($account) && $account->isLoaded())
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<?php
@@ -409,55 +403,16 @@ else if ($id > 0 && isset($account) && $account->isLoaded())
};
?>
</div>
<div class="row">
<?php if (isset($accoun1t) && $account->isLoaded()) {
?>
<div class="col-md-4">
<?php
$tableToDescribe = 'accounts';
$statement = $db->query('DESCRIBE ' . $tableToDescribe);
$result = $statement->fetchAll(PDO::FETCH_ASSOC);
$val = 0;
foreach ($result as $column) {
// IF val = 2 MAKE <TR> TODO
($val == 2) ? "<tr>" : "";
?>
<td><?php echo $column['Field'] ?></td>
<td><input type="text" name="lastip" size="8" maxlength="10"
value="<?php echo $account->getCustomField($column['Field']); ?>"/></td>
<?php
echo $column['Field'] . ' - ' . $column['Type'], '<br>';
if ($val == 2) {
echo "</tr>";
$val = 1;
} else {
++$val;
}
} ?>
</div>
<?php } ?>
</div>
<script type="text/javascript">
$('#lastlogin').datetimepicker({
format: 'unixtime'
});
$('#lastlogout').datetimepicker({
format: 'unixtime'
});
$('#created').datetimepicker({
format: 'unixtime'
});
$('#web_lastlogin').datetimepicker({
format: 'unixtime'
});
$('#lastlogin').datetimepicker({ format: 'unixtime' });
$('#lastlogout').datetimepicker({ format: 'unixtime' });
$('#created').datetimepicker({ format: 'unixtime' });
$('#web_lastlogin').datetimepicker({ format: 'unixtime' });
$(document).ready(function () {
$('.input_control').change(function () {
$('input[name=pass]')[0].disabled = !this.checked;
$('input[name=pass]')[0].value = '';
}).change();
});
</script>
</script>

View File

@@ -65,7 +65,7 @@ $query = $query->fetch();
$total_houses = $query['how_much'];
$points = $db->query('SELECT `premium_points`, `' . (USE_ACCOUNT_NAME ? 'name' : 'id') . '` as `name` FROM `accounts` ORDER BY `premium_points` DESC LIMIT 10;');
$coins = $db->query('SELECT `coins`, `' . (USE_ACCOUNT_NAME ? 'name' : 'id') . '` as `name` FROM `accounts` ORDER BY `premium_points` DESC LIMIT 10;');
$twig->display('admin.statistics.html.twig', array(
'total_accounts' => $total_accounts,
@@ -79,8 +79,7 @@ $twig->display('admin.dashboard.html.twig', array(
'closed_message' => $closed_message,
'status' => $status,
'account_type' => (USE_ACCOUNT_NAME ? 'name' : 'number'),
'points' => $points,
'coins' => $coins
'points' => $points
));
function clearCache()
{

View File

@@ -45,8 +45,8 @@ $skills = array(
);
?>
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>tools/jquery.datetimepicker.css"/ >
<script src="<?php echo BASE_URL; ?>tools/jquery.datetimepicker.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>tools/css/jquery.datetimepicker.css"/ >
<script src="<?php echo BASE_URL; ?>tools/js/jquery.datetimepicker.js"></script>
<?php
$id = 0;

View File

@@ -12,8 +12,8 @@ defined('MYAAC') or die('Direct access not allowed!');
$title = "Creatures";
?>
<script type="text/javascript" src="tools/tipped.js"></script>
<link rel="stylesheet" type="text/css" href="tools/tipped.css"/>
<script type="text/javascript" src="tools/js/tipped.js"></script>
<link rel="stylesheet" type="text/css" href="tools/css/tipped.css"/>
<script>
$(document).ready(function() {
Tipped.create('.tooltip');