mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
Align standalone cms pages with Admin LTE #584
This commit is contained in:
parent
b9690e16f8
commit
9a8f57d675
@ -72,29 +72,48 @@ if ($ui->escaped('email', 'post') != '') {
|
||||
die('IP banned');
|
||||
}
|
||||
|
||||
$logs = array();
|
||||
$xmllogs = array();
|
||||
|
||||
$gsprache = getlanguagefile('general', $user_language, 0);
|
||||
$sprache = getlanguagefile('gserver', $user_language, 0);
|
||||
$ipvalue = '111.111.111.111:27015';
|
||||
|
||||
if ($ui->ipport('serveraddress', 'post') or ($ui->ip('ip', 'get') and $ui->port('po', 'get'))) {
|
||||
|
||||
if ($ui->ipport('serveraddress', 'post')) {
|
||||
|
||||
$serveraddress = $ui->ipport('serveraddress', 'post');
|
||||
$adresse_awk = explode(':', $serveraddress);
|
||||
|
||||
$ip = $adresse_awk[0];
|
||||
$port = $adresse_awk[1];
|
||||
|
||||
} else if ($ui->ip('ip', 'get') and $ui->port('po', 'get')) {
|
||||
|
||||
$ip = $ui->ip('ip', 'get');
|
||||
$port = $ui->port('po', 'get');
|
||||
|
||||
$serveraddress = $ip . ':' . $port;
|
||||
}
|
||||
|
||||
if (isset($serveraddress)) {
|
||||
$ipvalue = $serveraddress;
|
||||
}
|
||||
|
||||
if (isset($ip) and isset($port)) {
|
||||
|
||||
$placeholders = array('%%', '%ad%', '%add%', '%dl%', '%del%', '%md%', '%mod%', '%ri%', '%start%', '%restart%', '%stop%', '%upd%', '%fail%', '%ok%', '%psw%', '%cfg%', '%import%', '%reinstall%', '%backup%', '%use%');
|
||||
$replace = array('', $gsprache->add, $gsprache->add, $gsprache->del, $gsprache->del, $gsprache->mod, $gsprache->mod, $gsprache->reinstall, $gsprache->start, $gsprache->start, $gsprache->stop, $gsprache->update,'','', $sprache->password, $sprache->config, $gsprache->import, $sprache->reinstall, $gsprache->backup, $gsprache->use);
|
||||
$placeholders2 = array('%modules%', '%voserver%', '%gserver%', '%user%', '%fastdl%', '%master%', '%user%', '%root%', '%addon%', '%settings%', '%vserver%', '%ticket_subject%', '%reseller%', '%virtual%', '%eac%', '%resync%', '%virtualimage%', '%template%', '%voserver%', '%emailsettings%', '%dns%', '%tsdns%', '%pmode%', '%file%', '%webmaster%', '%webvhost%');
|
||||
$replace2 = array($gsprache->modules, $gsprache->voiceserver, $gsprache->gameserver, $gsprache->user, $gsprache->fastdownload, $gsprache->master, $gsprache->user, $gsprache->root, $gsprache->addon2, $gsprache->settings, $gsprache->virtual, $gsprache->support, $gsprache->reseller, $gsprache->hostsystem,'Easy Anti Cheat', $sprache->resync, $gsprache->virtual . ' ' . $gsprache->template, $gsprache->template, $gsprache->voiceserver,'E-Mail '.$gsprache->settings, 'TSDNS', 'TSDNS', $sprache->protect, $gsprache->file, $gsprache->webspace . ' ' . $gsprache->master, $gsprache->webspace);
|
||||
|
||||
|
||||
$query = $sql->prepare("SELECT g.`protected`,g.`psince`,g.`queryName`,g.`queryNumplayers`,g.`queryMaxplayers`,g.`queryMap`,u.`cname`,t.`description` FROM `gsswitch` g INNER JOIN `userdata` u ON g.`userid`=u.`id` INNER JOIN `serverlist` s ON g.`serverid`=s.`id` INNER JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE g.`serverip`=? AND g.`port`=? LIMIT 1");
|
||||
$query->execute(array($ip, $port));
|
||||
$logs = array();
|
||||
$xmllogs = array();
|
||||
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$protected = $row['protected'];
|
||||
$customer = $row['cname'];
|
||||
$psince = $row['psince'];
|
||||
@ -103,45 +122,38 @@ if ($ui->ipport('serveraddress', 'post') or ($ui->ip('ip', 'get') and $ui->port(
|
||||
$maxplayers = $row['queryMaxplayers'];
|
||||
$map = $row['queryMap'];
|
||||
$type = $row['description'];
|
||||
$query = $sql->prepare("SELECT `useraction`,`logdate` FROM `userlog` WHERE `logdate`>? AND `username`=? AND `useraction` LIKE ?");
|
||||
$query->execute(array($psince, $customer,'%'.$serveraddress.'%'));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$logentry = explode(" ", $row['useraction']);
|
||||
if (($logentry[1] == '%gserver%' or $logentry[1] == '%addon%') and ($logentry[0] != '%resync%' and $logentry[0] != '%mod%')) {
|
||||
if ($default_language == 'de') {
|
||||
$time=explode(' ', $row['logdate']);
|
||||
$time2=explode('-', $time[0]);
|
||||
$time3 = $time2[2] . '.' . $time2[1] . '.' . $time2[0] . ' ' . $time[1];
|
||||
} else {
|
||||
$time3 = $row['logdate'];
|
||||
}
|
||||
$placeholders1 = array('%start%', '%stop%', ' ' . $serveraddress, ' %gserver%');
|
||||
$placeholders2 = array('%start%', '%stop%', '%addon%', '%del%', '%add%', ' %ok%', ' ' . $serveraddress,' %gserver%');
|
||||
$replace2 = array('(Re)Start', 'Stop', 'Addon', 'Delete', 'Add', '', '', '');
|
||||
$replacedpics=str_replace($placeholders1, '', $row['useraction']);
|
||||
$replacedwords=str_replace($placeholders2, $replace2, $row['useraction']);
|
||||
if (!empty($replacedpics)) {
|
||||
if ($logentry[1] == '%gserver%') {
|
||||
$logs[] = $replacedpics . ': ' . $time3;
|
||||
}
|
||||
$xmllogs[$time3] = $replacedwords;
|
||||
|
||||
$since = (isset($default_language) and $default_language == 'de') ? date('d.m.Y H:i:s', strtotime($psince)) : $psince;
|
||||
|
||||
if ($protected == 'Y') {
|
||||
|
||||
$query2 = $sql->prepare("SELECT `useraction`,`logdate` FROM `userlog` WHERE `logdate` > ? AND `useraction` LIKE ? ORDER BY `logdate`");
|
||||
$query2->execute(array($row['psince'], '%' . $ipvalue . '%'));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$iconName = 'refresh';
|
||||
|
||||
if (strpos($row2['useraction'], '%stop%') !== false) {
|
||||
$iconName = 'stop';
|
||||
} else if (strpos($row2['useraction'], '%add%') !== false or strpos($row2['useraction'], '%ad%') !== false) {
|
||||
$iconName = 'plus-circle';
|
||||
} else if (strpos($row2['useraction'], '%del%') !== false or strpos($row2['useraction'], '%dl%') !== false) {
|
||||
$iconName = 'trash';
|
||||
} else if (strpos($row2['useraction'], '%start%') !== false or strpos($row2['useraction'], '%restart%') !== false) {
|
||||
$iconName = 'play-circle';
|
||||
}
|
||||
|
||||
$replacedUserAction = str_replace($placeholders2, $replace2, str_replace($placeholders, $replace, $row2['useraction']));
|
||||
|
||||
$logs[date('Y-m-d', strtotime($row2['logdate']))][date('H:i:s', strtotime($row2['logdate']))][$iconName] = $replacedUserAction;
|
||||
|
||||
$xmllogs[$row2['logdate']] = $replacedUserAction;
|
||||
}
|
||||
}
|
||||
$since = ($default_language == 'de') ? date('d.m.Y H:i:s',strtotime($psince)) : $psince;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isset($protected)) {
|
||||
$imgName = '64_protected_unknown';
|
||||
$imgAlt = 'unknown';
|
||||
} else if ($protected == 'N') {
|
||||
$imgName = '64_unprotected';
|
||||
$imgAlt = 'unprotected';
|
||||
} else if ($protected == 'Y') {
|
||||
$imgName = '64_protected';
|
||||
$imgAlt = 'protected';
|
||||
}
|
||||
|
||||
if ($ui->ipport('serveraddress', 'post')) {
|
||||
|
||||
if (isset($page_include)) {
|
||||
|
@ -1,55 +1,90 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php if(isset($header)) echo $header; ?>
|
||||
<title><?php if(isset($title)) echo $title; ?></title>
|
||||
<link rel="shortcut icon" href="images/favicon.png" type="image/png" />
|
||||
<meta name="robots" content="noindex" />
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<?php if(isset($header)) echo $header;?>
|
||||
<title><?php if(isset($title)) echo $title;?></title>
|
||||
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
|
||||
<link rel="shortcut icon" href="images/favicon.png" type="image/png">
|
||||
<meta name="robots" content="noindex">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo (isset($rSA['favicon'])) ? $rSA['favicon'] : 'images/favicon.ico';?>" />
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/2.3.2/js/bootstrap.min.js"></script>
|
||||
<style type="text/css">
|
||||
body { padding-top: 40px;padding-bottom: 40px;background-color: #f5f5f5;}
|
||||
.form-signin { max-width: 600px;padding: 19px 29px 69px;margin: 0 auto 30px;background-color: #fff;border: 1px solid #e5e5e5;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05); -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);box-shadow: 0 1px 2px rgba(0,0,0,.05);}
|
||||
.form-signin .form-signin-heading,
|
||||
.form-signin { margin-bottom: 10px;}
|
||||
.form-signin input[type="text"],
|
||||
.form-signin input[type="password"] { margin-bottom: 15px;padding: 7px 9px;}
|
||||
</style>
|
||||
|
||||
<!-- bootstrap -->
|
||||
<link href="css/default/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- font Awesome -->
|
||||
<link href="css/default/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Theme style -->
|
||||
<link href="css/default/AdminLTE.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<?php echo implode('',$htmlExtraInformation['css']);?>
|
||||
|
||||
<?php echo implode('',$htmlExtraInformation['js']);?>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<form class="form-signin" action="protectioncheck.php" method="post">
|
||||
<h2 class="form-signin-heading"><?php echo $sprache->protect;?></h2>
|
||||
<div class="control-group <?php if(isset($protected) and $protected=='Y'){ echo 'success'; }else{ echo 'error';}?>">
|
||||
<div class="controls">
|
||||
<label class="control-label" for="inputIP"></label>
|
||||
<div class="input-prepend input-append">
|
||||
<span class="add-on"><i class="fa fa-shield"></i></span>
|
||||
<input class="input-block-level" id="inputIP" type="text" name="serveraddress" value="<?php echo $ipvalue ?>" maxlength="22" required >
|
||||
<button class="btn btn-primary" type="submit"><i class="icon-search icon-white"></i></button>
|
||||
|
||||
<body class="login-page" <?php echo implode(' ',$htmlExtraInformation['body']);?>>
|
||||
|
||||
<div class="login-box">
|
||||
|
||||
<div class="login-box-body">
|
||||
|
||||
<p class="login-box-msg"><?php echo $sprache->protect;?></p>
|
||||
|
||||
<form action="protectioncheck.php" method="post">
|
||||
<div class="input-group has-<?php if(isset($protected) and $protected=='Y'){ echo 'success'; }else{ echo 'error';}?>">
|
||||
<span class="input-group-addon">
|
||||
<i class="fa fa-shield"></i>
|
||||
</span>
|
||||
<input class="form-control" type="text" name="serveraddress" value="<?php echo $ipvalue ?>" maxlength="22" required >
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-flat"><i class="fa fa-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if(isset($protected) and $protected=="Y"){ ?>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th><?php echo $sprache->since.' '.$since;?></th>
|
||||
</tr>
|
||||
<?php foreach($logs as $log) { ?>
|
||||
<tr>
|
||||
<td><?php echo $log;?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<div class="login-box-body">
|
||||
|
||||
<p class="login-box-msg"><?php echo $sprache->since.' '.$since;?></p>
|
||||
|
||||
<ul class="timeline">
|
||||
|
||||
<?php foreach($logs as $date => $dateLog) { ?>
|
||||
<!-- timeline time label -->
|
||||
<li class="time-label">
|
||||
<span class="bg-red"><?php echo $date;?></span>
|
||||
</li>
|
||||
<!-- /.timeline-label -->
|
||||
<?php foreach($dateLog as $time => $timeLog) { ?>
|
||||
<?php foreach($timeLog as $actionType => $log) { ?>
|
||||
<!-- timeline item -->
|
||||
<li>
|
||||
<!-- timeline icon -->
|
||||
<i class="fa fa-<?php echo $actionType;?> bg-blue"></i>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> <?php echo $time;?></span>
|
||||
|
||||
<div class="timeline-body">
|
||||
<?php echo $log;?>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<!-- END timeline item -->
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user