mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
#30 admin voice statistics
This commit is contained in:
parent
0d80dd4069
commit
af1aced62a
40
web/ajax.php
40
web/ajax.php
@ -243,37 +243,14 @@ if ($ui->smallletters('w', 9, 'get') == 'datatable') {
|
|||||||
|
|
||||||
die;
|
die;
|
||||||
|
|
||||||
} else if (isset($admin_id) and $pa['voiceserverStats'] and $ui->smallletters('d', 15, 'get') == 'adminvoicestats' and $ui->st('w', 'get')) {
|
} else if (isset($user_id) and $pa['usertickets'] and $ui->w('d', 20, 'get') == 'userTicketCategories' and $ui->id('topicName', 10, 'get')) {
|
||||||
|
|
||||||
$data = array();
|
require_once(EASYWIDIR . '/stuff/ajax/userpanel_ticket_category.php');
|
||||||
|
die;
|
||||||
|
|
||||||
if ($ui->st('w', 'get') == 'us') {
|
} else if (isset($admin_id) and $pa['voiceserverStats'] and $ui->w('d', 15, 'get') == 'adminVoiceStats' and $ui->st('w', 'get')) {
|
||||||
$query = $sql->prepare("SELECT u.`id`,u.`cname`,u.`vname`,u.`name` FROM `userdata` u INNER JOIN `voice_server` v ON u.`id`=v.`userid` AND v.`active`='Y' WHERE u.`resellerid`=? GROUP BY u.`id`");
|
|
||||||
$query->execute(array($resellerLockupID));
|
|
||||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
|
||||||
$data[] = '<option value=' . $row['id'] . '>' . trim($row['cname'] . ' ' . $row['vname'] . ' ' . $row['name']) . '</option>';
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if ($ui->st('w', 'get') == 'se') {
|
|
||||||
|
|
||||||
$query = $sql->prepare("SELECT v.`id`,v.`ip`,v.`port`,v.`dns`,m.`usedns` FROM `voice_server` v INNER JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`resellerid`=? ORDER BY v.`ip`,v.`port`");
|
|
||||||
$query->execute(array($resellerLockupID));
|
|
||||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
|
||||||
$data[] = '<option value=' . $row['id'] . '>' . $row['ip'] . ':' . $row['port'] . '</option>';
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if ($ui->st('w', 'get') == 'ma') {
|
|
||||||
|
|
||||||
$query = $sql->prepare("SELECT `id`,`ssh2ip` FROM `voice_masterserver` WHERE `resellerid`=? AND `active`='Y' ORDER BY `ssh2ip`");
|
|
||||||
$query->execute(array($resellerLockupID));
|
|
||||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
|
||||||
$data[] = '<option value=' . $row['id'] . '>' . $row['ssh2ip'] . '</option>';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once IncludeTemplate($template_to_use, 'ajax_admin_voice_stats.tpl', 'ajax');
|
|
||||||
|
|
||||||
|
require_once(EASYWIDIR . '/stuff/ajax/admin_voice_stats.php');
|
||||||
die;
|
die;
|
||||||
|
|
||||||
} else if (isset($user_id) and $pa['voiceserverStats'] and $ui->smallletters('d', 14, 'get') == 'uservoicestats' and $ui->st('w', 'get')) {
|
} else if (isset($user_id) and $pa['voiceserverStats'] and $ui->smallletters('d', 14, 'get') == 'uservoicestats' and $ui->st('w', 'get')) {
|
||||||
@ -281,12 +258,7 @@ if ($ui->smallletters('w', 9, 'get') == 'datatable') {
|
|||||||
require_once(EASYWIDIR . '/stuff/ajax/userpanel_voice_stats.php');
|
require_once(EASYWIDIR . '/stuff/ajax/userpanel_voice_stats.php');
|
||||||
die;
|
die;
|
||||||
|
|
||||||
} else if (isset($user_id) and $pa['usertickets'] and $ui->w('d', 20, 'get') == 'userTicketCategories' and $ui->id('topicName', 10, 'get')) {
|
} else if ($pa['voiceserverStats'] and ((isset($user_id) and $ui->w('d', 14, 'get') == 'voiceUserStats') or (isset($admin_id) and $ui->w('d', 15, 'get') == 'voiceAdminStats'))) {
|
||||||
|
|
||||||
require_once(EASYWIDIR . '/stuff/ajax/userpanel_ticket_category.php');
|
|
||||||
die;
|
|
||||||
|
|
||||||
} else if (isset($user_id) and $pa['voiceserverStats'] and $ui->w('d', 14, 'get') == 'voiceUserStats') {
|
|
||||||
|
|
||||||
require_once(EASYWIDIR . '/stuff/ajax/stats_voicestats.php');
|
require_once(EASYWIDIR . '/stuff/ajax/stats_voicestats.php');
|
||||||
die;
|
die;
|
||||||
|
@ -41,7 +41,8 @@ if (!isset($admin_id) or $main != 1 or (isset($admin_id) and !$pa['voiceserver']
|
|||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sprache = getlanguagefile('traffic',$user_language,$reseller_id);
|
$sprache = getlanguagefile('traffic', $user_language, $reseller_id);
|
||||||
|
$voSprache = getlanguagefile('voice', $user_language, $reseller_id);
|
||||||
|
|
||||||
if ($ui->w('action', 4, 'post') and !token(true)) {
|
if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||||
|
|
||||||
@ -50,199 +51,159 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
|||||||
} else if ($pa['voiceserverStats']) {
|
} else if ($pa['voiceserverStats']) {
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
|
$freeSlots = 0;
|
||||||
|
$usedSlots = 0;
|
||||||
|
$freeTraffic = 0;
|
||||||
|
$fileTraffic = 0;
|
||||||
|
$kind = 'al';
|
||||||
|
$selectedID = 0;
|
||||||
|
|
||||||
$display = $sprache->total;
|
|
||||||
|
|
||||||
if (!$ui->st('kind', 'post') or $ui->st('kind', 'post') == 'al') {
|
$display = $sprache->total;
|
||||||
|
|
||||||
$kind = 'al';
|
$dateRange = ($ui->escaped('dateRange', 'post')) ? $ui->escaped('dateRange', 'post') : date('m/d/Y', strtotime("-6 days")) . ' - ' . date('m/d/Y');
|
||||||
$whichdata = '';
|
$accuracy = (in_array($ui->st('accuracy', 'post'), array('da', 'mo'))) ? $ui->st('accuracy', 'post') : 'da';
|
||||||
|
|
||||||
} else if ($ui->id('what', 30, 'post') and $ui->st('kind', 'post') == 'us') {
|
@list($startDate, $endDate) = explode('-', str_replace(' ', '', $dateRange));
|
||||||
|
@list($startMonth, $startDay, $startYear) = explode('/', $startDate);
|
||||||
|
@list($endMonth, $endDay, $endYear) = explode('/', $endDate);
|
||||||
|
$menuStart = round((strtotime("{$endYear}-{$endMonth}-{$endDay}") - strtotime("{$startYear}-{$startMonth}-{$startDay}")) / 86400);
|
||||||
|
|
||||||
$kind = 'us';
|
if ($ui->id('masterID', 10, 'post')) {
|
||||||
$extra = $sprache->user;
|
|
||||||
|
|
||||||
$whichdata = '&distro=' . $ui->id('what', 30, 'post');
|
$selectedID = $ui->id('masterID', 10, 'post');
|
||||||
|
|
||||||
$query = $sql->prepare("SELECT u.`id`,u.`cname`,u.`vname`,u.`name` FROM `userdata` u INNER JOIN `voice_server` v ON u.`id`=v.`userid` AND v.`active`='Y' WHERE u.`resellerid`=? GROUP BY u.`id`");
|
$query = $sql->prepare("SELECT SUM(`slots`) AS `s`,SUM(`usedslots`) AS `u`,SUM(`maxtraffic`) AS `m`,SUM(`filetraffic`) AS `f` FROM `voice_server` WHERE `masterserver`=? AND `resellerid`=?");
|
||||||
$query->execute(array($reseller_id));
|
$query->execute(array($ui->id('masterID', 10, 'post'), $resellerLockupID));
|
||||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
|
||||||
if ($ui->id('what', 30, 'post') == $row['id']) {
|
|
||||||
$data[] = '<option value=' . $row['id'] . ' selected="selected">' . trim($row['cname'] . ' ' . $row['vname'] . ' ' . $row['name']).'</option>';
|
|
||||||
} else {
|
|
||||||
$data[] = '<option value=' . $row['id'] . '>' . trim($row['cname'] . ' ' . $row['vname'] . ' ' . $row['name']) . '</option>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$query = $sql->prepare("SELECT `cname` FROM `userdata` WHERE `accounttype`='r' AND `id`=? AND `resellerid`=? LIMIT 1");
|
} else if ($ui->id('userID', 10, 'post')) {
|
||||||
$query->execute(array($ui->id('what', 30, 'post'),$reseller_id));
|
|
||||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
|
||||||
$display = $extra . ' ' . $row['cname'];
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if ($ui->id('what', 30, 'post') and $ui->st('kind', 'post') == 'se') {
|
$selectedID = $ui->id('userID', 10, 'post');
|
||||||
|
|
||||||
$kind = 'se';
|
$query = $sql->prepare("SELECT SUM(`slots`) AS `s`,SUM(`usedslots`) AS `u`,SUM(`maxtraffic`) AS `m`,SUM(`filetraffic`) AS `f` FROM `voice_server` WHERE `userid`=? AND `resellerid`=? LIMIT 1");
|
||||||
$whichdata = '&shorten=' . $ui->id('what', 30, 'post');
|
$query->execute(array($ui->id('userID', 10, 'post'), $resellerLockupID));
|
||||||
|
|
||||||
$query = $sql->prepare("SELECT v.`id`,v.`ip`,v.`port`,v.`dns`,m.`usedns` FROM `voice_server` v INNER JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`id`=? AND v.`resellerid`=? AND v.`active`='Y' AND m.`active`='Y' LIMIT 1");
|
} else if ($ui->id('serverID', 10, 'post')) {
|
||||||
$query->execute(array($ui->id('what', 30, 'post'),$reseller_id));
|
|
||||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
|
||||||
$display = $sprache->server . ' ' . $row['ip'] . ':' . $row['port'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$query = $sql->prepare("SELECT v.`id`,v.`ip`,v.`port`,v.`dns`,m.`usedns` FROM `voice_server` v INNER JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`resellerid`=? AND v.`active`='Y' AND m.`active`='Y' ORDER BY v.`ip`,v.`port`");
|
$selectedID = $ui->id('serverID', 10, 'post');
|
||||||
$query->execute(array($reseller_id));
|
|
||||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
|
||||||
$server = $row['ip'] . ':' . $row['port'];
|
|
||||||
if ($ui->id('what', 30, 'post') == $row['id']) {
|
|
||||||
$data[] = '<option value='. $row['id'] .' selected="selected">' . $server . '</option>';
|
|
||||||
} else {
|
|
||||||
$data[] = '<option value=' . $row['id'] . '>' . $server . '</option>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if ($ui->id('what', 30, 'post') and $ui->st('kind', 'post') == 'ma') {
|
$query = $sql->prepare("SELECT `slots` AS `s`,`usedslots` AS `u`,`maxtraffic` AS `m`,`filetraffic` AS `f` FROM `voice_server` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||||
|
$query->execute(array($ui->id('serverID', 10, 'post'), $resellerLockupID));
|
||||||
|
|
||||||
$kind = 'ma';
|
} else {
|
||||||
$whichdata = '&short=' . $ui->id('what', 30, 'post');
|
$query = $sql->prepare("SELECT SUM(`slots`) AS `s`, SUM(`usedslots`) AS `u`, SUM(`maxtraffic`) AS `m`, SUM(`filetraffic`) AS `f` FROM `voice_server` WHERE `resellerid`=?");
|
||||||
|
$query->execute(array($resellerLockupID));
|
||||||
|
}
|
||||||
|
|
||||||
$query = $sql->prepare("SELECT `ssh2ip` FROM `voice_masterserver` WHERE `id`=? AND `resellerid`=? AND `active`='Y' LIMIT 1");
|
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$query->execute(array($ui->id('what', 30, 'post'), $reseller_id));
|
$freeSlots = (int) ($row['s'] - $row['u']);
|
||||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
$usedSlots = (int) $row['u'];
|
||||||
$display = $sprache->server . ' ' . $row['ssh2ip'];
|
$freeTraffic = ceil($row['m'] - ($row['f'] / 1024));
|
||||||
}
|
$fileTraffic = ceil($row['f'] / 1024);
|
||||||
|
}
|
||||||
|
|
||||||
$query = $sql->prepare("SELECT `id`,`ssh2ip` FROM `voice_masterserver` WHERE `resellerid`=? AND `active`='Y' ORDER BY `ssh2ip`");
|
if ($ui->id('masterID', 10, 'post') and $ui->st('kind', 'post') == 'ma') {
|
||||||
$query->execute(array($reseller_id));
|
|
||||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
|
||||||
if ($ui->id('what', 30, 'post') == $row['id']) {
|
|
||||||
$data[] = '<option value=' . $row['id'] . ' selected="selected">' . $row['ssh2ip'] . '</option>';
|
|
||||||
} else {
|
|
||||||
$data[] = '<option value=' . $row['id'] . '>' . $row['ssh2ip'] . '</option>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($ui->post['dmy'])) {
|
$kind = 'ma';
|
||||||
|
|
||||||
$dmy = 'da';
|
} else if ($ui->id('serverID', 10, 'post') and $ui->st('kind', 'post') == 'us') {
|
||||||
$year = date('Y',strtotime('-6 days'));
|
|
||||||
$month = date('m',strtotime('-6 days'));
|
|
||||||
$day = date('d',strtotime('-6 days'));
|
|
||||||
$yearstop = date('Y');
|
|
||||||
$monthstop = date('m');
|
|
||||||
$daystop = date('d');
|
|
||||||
$amount = 7;
|
|
||||||
|
|
||||||
} else if ($ui->post['dmy'] == 'da') {
|
$kind = 'us';
|
||||||
|
|
||||||
$dmy = 'da';
|
} else if ($ui->id('serverID', 10, 'post') and $ui->st('kind', 'post') == 'se') {
|
||||||
|
|
||||||
$year = ($ui->isinteger('yearstart', 'post') and $ui->isinteger('yearstart', 'post') <= date('Y')) ? $ui->isinteger('yearstart', 'post') : date('Y', strtotime('-6 days'));
|
$kind = 'se';
|
||||||
$yearstop = ($ui->isinteger('yearstop', 'post') and $ui->isinteger('yearstop', 'post') <= date('Y')) ? $ui->isinteger('yearstop', 'post') : date('Y');
|
|
||||||
|
|
||||||
$month = ($ui->isinteger('monthstart', 'post') and $ui->isinteger('monthstart', 'post') <= 12) ? $ui->isinteger('monthstart', 'post') : date('m', strtotime('-6 days'));
|
$query = $sql->prepare("SELECT v.`ip`,v.`port` FROM `voice_server` v INNER JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`id`=? AND v.`resellerid`=? LIMIT 1");
|
||||||
$monthstop = ($ui->isinteger('monthstop', 'post') and $ui->isinteger('monthstop', 'post') <= 12) ? $ui->isinteger('monthstop', 'post') : date('m');
|
$query->execute(array($ui->id('serverID', 10, 'post'), $resellerLockupID));
|
||||||
|
$display = $query->fetchColumn();
|
||||||
|
}
|
||||||
|
|
||||||
$day = ($ui->isinteger('daystart', 'post') and $ui->isinteger('daystart', 'post') <= 31) ? $ui->isinteger('daystart', 'post') : date('d', strtotime('-6 days'));
|
$htmlExtraInformation['css'][] = '<link href="css/default/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css">';
|
||||||
$daystop = ($ui->isinteger('daystop', 'post') and $ui->isinteger('daystop', 'post') <= 31) ? $ui->isinteger('daystop', 'post') : date('d');
|
$htmlExtraInformation['js'][] = '<script src="js/default/plugins/daterangepicker/moment.js" type="text/javascript"></script>';
|
||||||
|
$htmlExtraInformation['js'][] = '<script src="js/default/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>';
|
||||||
|
|
||||||
$now = date('Y-m-d');
|
$htmlExtraInformation['js'][] = "<script type=\"text/javascript\">
|
||||||
$date1 = strtotime("$year-$month-$day");
|
$(function() {
|
||||||
$date2 = strtotime("$yearstop-$monthstop-$daystop");
|
//Date range as a button
|
||||||
$amount = intval(($date2 - $date1) / 86400) + 1;
|
$('#dateRange').daterangepicker(
|
||||||
|
{
|
||||||
|
ranges: {
|
||||||
|
'Today': [moment(), moment()],
|
||||||
|
'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
|
||||||
|
'Last 7 Days': [moment().subtract('days', 6), moment()],
|
||||||
|
'Last 30 Days': [moment().subtract('days', 29), moment()],
|
||||||
|
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||||
|
'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
|
||||||
|
},
|
||||||
|
startDate: moment().subtract('days', {$menuStart}),
|
||||||
|
endDate: moment(),
|
||||||
|
opens: 'right'
|
||||||
|
},
|
||||||
|
function(start, end) {
|
||||||
|
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
</script>";
|
||||||
|
|
||||||
if ($amount < 0 and "$yearstop-$monthstop-$daystop" > $now){
|
$htmlExtraInformation['css'][] = '<link href="css/default/morris/morris.css" rel="stylesheet" type="text/css">';
|
||||||
$yearstop = date('Y');
|
$htmlExtraInformation['js'][] = '<script src="js/default/plugins/morris/raphael-min.js" type="text/javascript"></script>';
|
||||||
$monthstop = date('m');
|
$htmlExtraInformation['js'][] = '<script src="js/default/plugins/morris/morris.min.js" type="text/javascript"></script>';
|
||||||
$daystop = date('d');
|
$htmlExtraInformation['js'][] = "<script type=\"text/javascript\">
|
||||||
$day = date('d',strtotime('-6 days'));
|
$(function() {
|
||||||
$month = date('m',strtotime('-6 days'));
|
|
||||||
$year = date('Y',strtotime('-6 days'));
|
|
||||||
$amount = 7;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if ($ui->post['dmy'] == 'mo') {
|
'use strict';
|
||||||
|
|
||||||
$dmy = 'mo';
|
var line = new Morris.Area({
|
||||||
$day = 1;
|
element: 'usage-chart',
|
||||||
|
resize: true,
|
||||||
|
data: [],
|
||||||
|
xkey: 'y',
|
||||||
|
ykeys: ['slots', 'traffic'],
|
||||||
|
labels: ['{$voSprache->slots}', '{$gsprache->traffic}'],
|
||||||
|
lineColors: ['#3c8dbc', '#00a65a'],
|
||||||
|
hideHover: 'auto'
|
||||||
|
});
|
||||||
|
|
||||||
$year = ($ui->isinteger('yearstart', 'post') and $ui->isinteger('yearstart', 'post') <= date('Y')) ? $ui->isinteger('yearstart', 'post') : date('Y', strtotime('-6 days'));
|
var trafficDonut = new Morris.Donut({
|
||||||
$yearstop = ($ui->isinteger('yearstop', 'post') and $ui->isinteger('yearstop', 'post') <= date('Y')) ? $ui->isinteger('yearstop', 'post') : date('Y');
|
element: 'traffic-chart',
|
||||||
|
resize: true,
|
||||||
|
colors: ['#00a65a', '#f56954'],
|
||||||
|
data: [
|
||||||
|
{label: '{$gsprache->free}', value: {$freeTraffic}},
|
||||||
|
{label: '{$gsprache->used}', value: {$fileTraffic}}
|
||||||
|
],
|
||||||
|
hideHover: 'auto'
|
||||||
|
});
|
||||||
|
|
||||||
$month = ($ui->isinteger('monthstart', 'post') and $ui->isinteger('monthstart', 'post') <= 12) ? $ui->isinteger('monthstart', 'post') : date('m', strtotime('-6 days'));
|
var slotsDonut = new Morris.Donut({
|
||||||
$monthstop = ($ui->isinteger('monthstop', 'post') and $ui->isinteger('monthstop', 'post') <= 12) ? $ui->isinteger('monthstop', 'post') : date('m');
|
element: 'slots-chart',
|
||||||
|
resize: true,
|
||||||
|
colors: ['#00a65a', '#f56954'],
|
||||||
|
data: [
|
||||||
|
{label: '{$gsprache->free}', value: {$freeSlots}},
|
||||||
|
{label: '{$gsprache->used}', value: {$usedSlots}}
|
||||||
|
],
|
||||||
|
hideHover: 'auto'
|
||||||
|
});
|
||||||
|
|
||||||
$daystop = date('t', strtotime("$yearstop-$monthstop"));
|
function changeMorrisArea() {
|
||||||
$now = date('Y-m');
|
$.ajax({
|
||||||
$date1 = strtotime("$year-$month-$day");
|
type: 'GET',
|
||||||
$add = $date1;
|
dataType: 'json',
|
||||||
$date2 = strtotime("$yearstop-$monthstop-$daystop");
|
url: 'ajax.php',
|
||||||
$i = 0;
|
data: { d: 'voiceAdminStats', dateRange: $('#dateRange').val(), accuracy: $('#inputFormat').val(), serverID: $('#inputSelect').val()}
|
||||||
|
}).done(function(response) {
|
||||||
|
if (typeof line !== 'undefined') {
|
||||||
|
line.setData(response);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
while ($add <= $date2) {
|
changeMorrisArea();
|
||||||
$add = strtotime("+1 months", $add);
|
});
|
||||||
$i++;
|
</script>";
|
||||||
}
|
|
||||||
|
|
||||||
$amount = $i;
|
|
||||||
|
|
||||||
if ($amount < 0 or "$yearstop-$monthstop" > $now){
|
|
||||||
$yearstop = date('Y');
|
|
||||||
$monthstop = date('m');
|
|
||||||
$daystop = date('t', strtotime("$yearstop-$monthstop"));
|
|
||||||
$day = 1;
|
|
||||||
$month = date('m', strtotime('-6 months'));
|
|
||||||
$year = date('Y', strtotime('-6 months'));
|
|
||||||
$amount = 7;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if ($ui->post['dmy'] == 'ye') {
|
|
||||||
|
|
||||||
$dmy = 'ye';
|
|
||||||
$day = 1;
|
|
||||||
|
|
||||||
$year = ($ui->isinteger('yearstart', 'post') and $ui->isinteger('yearstart', 'post') <= date('Y')) ? $ui->isinteger('yearstart', 'post') : date('Y', strtotime('-6 days'));
|
|
||||||
$yearstop = ($ui->isinteger('yearstop', 'post') and $ui->isinteger('yearstop', 'post') <= date('Y')) ? $ui->isinteger('yearstop', 'post') : date('Y');
|
|
||||||
|
|
||||||
$month = 1;
|
|
||||||
$monthstop = 12;
|
|
||||||
$daystop = 31;
|
|
||||||
|
|
||||||
$now = date('Y');
|
|
||||||
$date1 = strtotime($year . '-' . $month . '-' . $day);
|
|
||||||
$date2 = strtotime($yearstop . '-' . $monthstop . '-' . $daystop);
|
|
||||||
$add = $date1;
|
|
||||||
$i = 0;
|
|
||||||
|
|
||||||
while ($add <= $date2) {
|
|
||||||
$add = strtotime('+1 year', $add);
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$amount = $i;
|
|
||||||
|
|
||||||
if ($amount < 0 or "$yearstop" > $now){
|
|
||||||
$yearstop = date('Y');
|
|
||||||
$monthstop = 12;
|
|
||||||
$daystop = 31;
|
|
||||||
$day = 1;
|
|
||||||
$month = 1;
|
|
||||||
$year = date('Y', strtotime('-1 year'));
|
|
||||||
$amount = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($user_language == 'de') {
|
|
||||||
$startdate = $day . '.' . $month . '.' . $year;
|
|
||||||
$stopdate = $daystop . '.' . $monthstop . '.' . $yearstop;
|
|
||||||
} else {
|
|
||||||
$startdate = $year . '-' . $month . '-' . $day;
|
|
||||||
$stopdate = $yearstop . '-' . $monthstop . '-' . $daystop;
|
|
||||||
}
|
|
||||||
|
|
||||||
$getlink = "images.php?img=vo&from=admin&d={$dmy}&p={$year}&id={$day}&po={$month}&m={$amount}{$whichdata}";
|
|
||||||
$template_file = 'admin_voice_stats.tpl';
|
$template_file = 'admin_voice_stats.tpl';
|
||||||
}
|
}
|
74
web/stuff/ajax/admin_voice_stats.php
Normal file
74
web/stuff/ajax/admin_voice_stats.php
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* File: admin_voice_stats.php.
|
||||||
|
* Author: Ulrich Block
|
||||||
|
* Date: 17.01.15
|
||||||
|
* Contact: <ulrich.block@easy-wi.com>
|
||||||
|
*
|
||||||
|
* This file is part of Easy-WI.
|
||||||
|
*
|
||||||
|
* Easy-WI 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 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Easy-WI is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Easy-WI. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* Diese Datei ist Teil von Easy-WI.
|
||||||
|
*
|
||||||
|
* Easy-WI ist Freie Software: Sie koennen es unter den Bedingungen
|
||||||
|
* der GNU General Public License, wie von der Free Software Foundation,
|
||||||
|
* Version 3 der Lizenz oder (nach Ihrer Wahl) jeder spaeteren
|
||||||
|
* veroeffentlichten Version, weiterverbreiten und/oder modifizieren.
|
||||||
|
*
|
||||||
|
* Easy-WI wird in der Hoffnung, dass es nuetzlich sein wird, aber
|
||||||
|
* OHNE JEDE GEWAEHELEISTUNG, bereitgestellt; sogar ohne die implizite
|
||||||
|
* Gewaehrleistung der MARKTFAEHIGKEIT oder EIGNUNG FUER EINEN BESTIMMTEN ZWECK.
|
||||||
|
* Siehe die GNU General Public License fuer weitere Details.
|
||||||
|
*
|
||||||
|
* Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
|
||||||
|
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!defined('AJAXINCLUDED')) {
|
||||||
|
die('Do not access directly!');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
|
||||||
|
if ($ui->st('w', 'get') == 'us') {
|
||||||
|
$query = $sql->prepare("SELECT u.`id`,u.`cname`,u.`vname`,u.`name` FROM `userdata` u INNER JOIN `voice_server` v ON u.`id`=v.`userid` AND v.`active`='Y' WHERE u.`resellerid`=? GROUP BY u.`id`");
|
||||||
|
$query->execute(array($resellerLockupID));
|
||||||
|
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$selected = ($ui->id('selectedID', 10, 'get') == $row['id']) ? ' selected="selected"' : '';
|
||||||
|
$data[] = '<option value=' . $row['id'] . $selected . '>' . trim($row['cname'] . ' ' . $row['vname'] . ' ' . $row['name']) . '</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if ($ui->st('w', 'get') == 'se') {
|
||||||
|
|
||||||
|
$query = $sql->prepare("SELECT v.`id`,v.`ip`,v.`port`,v.`dns`,m.`usedns` FROM `voice_server` v INNER JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`resellerid`=? ORDER BY v.`ip`,v.`port`");
|
||||||
|
$query->execute(array($resellerLockupID));
|
||||||
|
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$selected = ($ui->id('selectedID', 10, 'get') == $row['id']) ? ' selected="selected"' : '';
|
||||||
|
$data[] = '<option value=' . $row['id'] . $selected . '>' . $row['ip'] . ':' . $row['port'] . '</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if ($ui->st('w', 'get') == 'ma') {
|
||||||
|
|
||||||
|
$query = $sql->prepare("SELECT `id`,`ssh2ip` FROM `voice_masterserver` WHERE `resellerid`=? AND `active`='Y' ORDER BY `ssh2ip`");
|
||||||
|
$query->execute(array($resellerLockupID));
|
||||||
|
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$selected = ($ui->id('selectedID', 10, 'get') == $row['id']) ? ' selected="selected"' : '';
|
||||||
|
$data[] = '<option value=' . $row['id'] . $selected . '>' . $row['ssh2ip'] . '</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once IncludeTemplate($template_to_use, 'ajax_admin_voice_stats.tpl', 'ajax');
|
@ -59,12 +59,28 @@ if ($endYear > 2000 and $startYear > 2000) {
|
|||||||
$startDateFormatted = date('Y-m-d', strtotime($startYear . '-' . $startMonth . '-' . $startDay));
|
$startDateFormatted = date('Y-m-d', strtotime($startYear . '-' . $startMonth . '-' . $startDay));
|
||||||
$endDateFormatted = date('Y-m-d', strtotime($endYear . '-' . $endMonth . '-' . $endDay));
|
$endDateFormatted = date('Y-m-d', strtotime($endYear . '-' . $endMonth . '-' . $endDay));
|
||||||
|
|
||||||
if ($ui->id('serverID', 10, 'get')) {
|
if ($ui->w('d', 15, 'get') == 'voiceAdminStats') {
|
||||||
$query = $sql->prepare("SELECT $extractOrNormal AS `groupedDate`,SUM(`used`)/COUNT(`sid`) AS `averageused`,SUM(`traffic`)/1024 as `fileTrafficMB` FROM `voice_server_stats` WHERE `sid`=? AND `uid`=? AND `resellerid`=? AND `date` BETWEEN ? AND ? GROUP BY `groupedDate` ORDER BY `groupedDate`");
|
if ($ui->id('masterID', 10, 'get')) {
|
||||||
$query->execute(array($ui->id('serverID', 10, 'get'), $user_id, $reseller_id, $startDateFormatted, $endDateFormatted));
|
$query = $sql->prepare("SELECT $extractOrNormal AS `groupedDate`,SUM(`used`)/COUNT(`sid`) AS `averageused`,SUM(`traffic`)/1024 as `fileTrafficMB` FROM `voice_server_stats` WHERE `mid`=? AND `resellerid`=? AND `date` BETWEEN ? AND ? GROUP BY `groupedDate` ORDER BY `groupedDate`");
|
||||||
|
$query->execute(array($ui->id('masterID', 10, 'get'), $resellerLockupID, $startDateFormatted, $endDateFormatted));
|
||||||
|
} else if ($ui->id('userID', 10, 'get')) {
|
||||||
|
$query = $sql->prepare("SELECT $extractOrNormal AS `groupedDate`,SUM(`used`)/COUNT(`sid`) AS `averageused`,SUM(`traffic`)/1024 as `fileTrafficMB` FROM `voice_server_stats` WHERE `uid`=? AND `resellerid`=? AND `date` BETWEEN ? AND ? GROUP BY `groupedDate` ORDER BY `groupedDate`");
|
||||||
|
$query->execute(array($ui->id('userID', 10, 'get'), $resellerLockupID, $startDateFormatted, $endDateFormatted));
|
||||||
|
} else if ($ui->id('serverID', 10, 'post')) {
|
||||||
|
$query = $sql->prepare("SELECT $extractOrNormal AS `groupedDate`,SUM(`used`)/COUNT(`sid`) AS `averageused`,SUM(`traffic`)/1024 as `fileTrafficMB` FROM `voice_server_stats` WHERE `sid`=? AND `resellerid`=? AND `date` BETWEEN ? AND ? GROUP BY `groupedDate` ORDER BY `groupedDate`");
|
||||||
|
$query->execute(array($ui->id('serverID', 10, 'get'), $resellerLockupID, $startDateFormatted, $endDateFormatted));
|
||||||
|
} else {
|
||||||
|
$query = $sql->prepare("SELECT $extractOrNormal AS `groupedDate`,SUM(`used`)/COUNT(`sid`) AS `averageused`,SUM(`traffic`)/1024 as `fileTrafficMB` FROM `voice_server_stats` WHERE `resellerid`=? AND `date` BETWEEN ? AND ? GROUP BY `groupedDate` ORDER BY `groupedDate`");
|
||||||
|
$query->execute(array($resellerLockupID, $startDateFormatted, $endDateFormatted));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$query = $sql->prepare("SELECT $extractOrNormal AS `groupedDate`,SUM(`used`)/COUNT(`sid`) AS `averageused`,SUM(`traffic`)/1024 as `fileTrafficMB` FROM `voice_server_stats` WHERE `uid`=? AND `resellerid`=? AND `date` BETWEEN ? AND ? GROUP BY `groupedDate` ORDER BY `groupedDate`");
|
if ($ui->id('serverID', 10, 'get')) {
|
||||||
$query->execute(array($user_id, $reseller_id, $startDateFormatted, $endDateFormatted));
|
$query = $sql->prepare("SELECT $extractOrNormal AS `groupedDate`,SUM(`used`)/COUNT(`sid`) AS `averageused`,SUM(`traffic`)/1024 as `fileTrafficMB` FROM `voice_server_stats` WHERE `sid`=? AND `uid`=? AND `resellerid`=? AND `date` BETWEEN ? AND ? GROUP BY `groupedDate` ORDER BY `groupedDate`");
|
||||||
|
$query->execute(array($ui->id('serverID', 10, 'get'), $user_id, $resellerLockupID, $startDateFormatted, $endDateFormatted));
|
||||||
|
} else {
|
||||||
|
$query = $sql->prepare("SELECT $extractOrNormal AS `groupedDate`,SUM(`used`)/COUNT(`sid`) AS `averageused`,SUM(`traffic`)/1024 as `fileTrafficMB` FROM `voice_server_stats` WHERE `uid`=? AND `resellerid`=? AND `date` BETWEEN ? AND ? GROUP BY `groupedDate` ORDER BY `groupedDate`");
|
||||||
|
$query->execute(array($user_id, $resellerLockupID, $startDateFormatted, $endDateFormatted));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
while($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
@ -387,7 +387,7 @@
|
|||||||
<li <?php if($ui->smallletters('w',255,'get')=='vd') echo 'class="active"';?>><a href="admin.php?w=vd"><i class="fa fa-hdd-o"></i> TSDNS <?php echo $gsprache->master;?></a></li>
|
<li <?php if($ui->smallletters('w',255,'get')=='vd') echo 'class="active"';?>><a href="admin.php?w=vd"><i class="fa fa-hdd-o"></i> TSDNS <?php echo $gsprache->master;?></a></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if($pa['voiceserverStats']) { ?>
|
<?php if($pa['voiceserverStats']) { ?>
|
||||||
<li <?php if($ui->smallletters('w',255,'get')=='vu') echo 'class="active"';?>><a href="admin.php?w=vu&d=md"><i class="fa fa-area-chart"></i> <?php echo $gsprache->stats;?></a></li>
|
<li <?php if($ui->smallletters('w',255,'get')=='vu') echo 'class="active"';?>><a href="admin.php?w=vu"><i class="fa fa-area-chart"></i> <?php echo $gsprache->stats;?></a></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php foreach ($customModules['vo'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
|
<?php foreach ($customModules['vo'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1,72 +1,104 @@
|
|||||||
<div class="row-fluid">
|
<section class="content-header">
|
||||||
<div class="span12">
|
<h1><?php echo $gsprache->voiceserver.' '.$gsprache->stats;?></h1>
|
||||||
<ul class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="admin.php">Home</a> <span class="divider">/</span></li>
|
<li><a href="admin.php"><i class="fa fa-home"> Home</a></i></li>
|
||||||
<li><?php echo $gsprache->voiceserver." ".$gsprache->stats;?></li>
|
<li><a href="admin.php?w=vo"><i class="fa fa-microphone"></i> <?php echo $gsprache->voiceserver;?></a></li>
|
||||||
</ul>
|
<li><i class="fa fa-area-chart"></i> <?php echo $gsprache->stats;?></li>
|
||||||
|
<li class="active"><?php echo $display;?></li>
|
||||||
|
</ol>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="box box-primary">
|
||||||
|
<form role="form" action="admin.php?w=vu" method="post">
|
||||||
|
|
||||||
|
<input type="hidden" name="token" value="<?php echo token();?>">
|
||||||
|
<input type="hidden" name="action" value="md">
|
||||||
|
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="dateRange"><?php echo $sprache->dmy;?></label>
|
||||||
|
<div class="input-prepend input-group">
|
||||||
|
<span class="add-on input-group-addon"><i class="glyphicon glyphicon-calendar fa fa-calendar"></i></span>
|
||||||
|
<input type="text" name="dateRange" id="dateRange" class="form-control" value="<?php echo $dateRange;?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="inputFormat"><?php echo $sprache->accuracy;?></label>
|
||||||
|
<select class="form-control" id="inputFormat" name="accuracy">
|
||||||
|
<option value="da"><?php echo $sprache->days;?></option>
|
||||||
|
<option value="mo" <?php if ($accuracy=='mo') echo 'selected="selected"'?>><?php echo $sprache->months;?></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="inputKind"><?php echo $gsprache->stats;?></label>
|
||||||
|
<select class="form-control" id="inputKind" name="kind">
|
||||||
|
<option value="al"><?php echo $sprache->all;?></option>
|
||||||
|
<option value="ma" <?php if ($kind=='ma') echo 'selected="selected"'?>><?php echo $gsprache->master;?></option>
|
||||||
|
<option value="se" <?php if ($kind=='se') echo 'selected="selected"'?>><?php echo $sprache->server;?></option>
|
||||||
|
<option value="us" <?php if ($kind=='us') echo 'selected="selected"'?>><?php echo $sprache->user;?></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group" id="serverSelect">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box-footer">
|
||||||
|
<button class="btn btn-primary" id="inputEdit" type="submit"><i class="fa fa-edit"></i> <?php echo $gsprache->mod;?></button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?php echo $voSprache->slots;?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="box-body chart-responsive">
|
||||||
|
<div class="chart" id="slots-chart" style="height: 300px; position: relative;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?php echo $gsprache->traffic;?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="box-body chart-responsive">
|
||||||
|
<div class="chart" id="traffic-chart" style="height: 300px; position: relative;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row-fluid">
|
<div class="row">
|
||||||
<div class="span6">
|
<div class="col-md-12">
|
||||||
<dl>
|
<div class="box box-primary">
|
||||||
<dt><?php echo $gsprache->voiceserver." ".$gsprache->stats." ".$display;?></dt>
|
<div class="box-header">
|
||||||
<dd><?php echo $startdate." - ".$stopdate;?></dd>
|
<h3 class="box-title"><?php echo $voSprache->slots;?> + <?php echo $gsprache->traffic;?></h3>
|
||||||
</dl>
|
</div>
|
||||||
|
<div class="box-body chart-responsive">
|
||||||
|
<div class="chart" id="usage-chart" style="height: 300px;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="row-fluid">
|
|
||||||
<div class="span11">
|
<script type="text/javascript">
|
||||||
<form class="form-horizontal" action="admin.php?w=vu" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">
|
$(function(){
|
||||||
<div class="control-group">
|
$('#serverSelect').load('ajax.php?d=adminVoiceStats&w=' + $("#inputKind").val() + '&selectedID=' + <?php echo $selectedID;?>);
|
||||||
<label class="control-label" for="inputFormat"><?php echo $sprache->dmy;?></label>
|
});
|
||||||
<div class="controls">
|
$('#inputKind').on('change', function() {
|
||||||
<select id="inputFormat" name="dmy">
|
$('#serverSelect').load('ajax.php?d=adminVoiceStats&w=' + $("#inputKind").val());
|
||||||
<option value="da" <?php if ($dmy=='da') echo 'selected="selected"'?>><?php echo $sprache->days;?></option>
|
});
|
||||||
<option value="mo" <?php if ($dmy=='mo') echo 'selected="selected"'?>><?php echo $sprache->months;?></option>
|
</script>
|
||||||
<option value="ye" <?php if ($dmy=='ye') echo 'selected="selected"'?>><?php echo $sprache->years;?></option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="inputRange"><?php echo $sprache->range;?></label>
|
|
||||||
<div class="controls form-inline">
|
|
||||||
<input class="span2" name="daystart" type="number" min="1" max="31" step="1" value="<?php echo $day; ?>">
|
|
||||||
<input class="span2" name="monthstart" type="number" min="1" max="12" step="1" value="<?php echo $month; ?>">
|
|
||||||
<input class="span2" name="yearstart" type="number" min="2011" max="2200" step="1" value="<?php echo $year; ?>">
|
|
||||||
-
|
|
||||||
<input class="span2" name="daystop" type="number" min="1" max="31" step="1" value="<?php echo $daystop; ?>">
|
|
||||||
<input class="span2" name="monthstop" type="number" min="1" max="12" step="1" value="<?php echo $monthstop; ?>">
|
|
||||||
<input class="span2" name="yearstop" type="number" min="2011" max="2200" step="1" value="<?php echo $yearstop; ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="inputStats"><?php echo $gsprache->stats;?></label>
|
|
||||||
<div class="controls">
|
|
||||||
<select id="inputStats" name="kind" onchange="getdetails('ajax.php?d=adminvoicestats&w=',this.value)">
|
|
||||||
<option value="al"><?php echo $sprache->all;?></option>
|
|
||||||
<option value="ma" <?php if ($kind=='ma') echo 'selected="selected"'?>><?php echo $gsprache->master;?></option>
|
|
||||||
<option value="se" <?php if ($kind=='se') echo 'selected="selected"'?>><?php echo $sprache->server;?></option>
|
|
||||||
<option value="us" <?php if ($kind=='us') echo 'selected="selected"'?>><?php echo $sprache->user;?></option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="inputSelect"></label>
|
|
||||||
<div id="information" class="controls">
|
|
||||||
<?php if($ui->st('kind','post')!='al'){ ?>
|
|
||||||
<select id="inputSelect" name="what">
|
|
||||||
<?php foreach ($data as $value) echo $value;?>
|
|
||||||
</select>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="inputEdit"></label>
|
|
||||||
<div class="controls"><button class="btn btn-primary" id="inputEdit" type="submit"><i class="icon-edit icon-white"></i> <?php echo $gsprache->save;?></button></div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row-fluid">
|
|
||||||
<div class="span11"><img src="<?php echo $getlink; ?>" alt="Stats" /></div>
|
|
||||||
</div>
|
|
@ -1,9 +1,12 @@
|
|||||||
<?php
|
<?php if(count($data)>0) { ?>
|
||||||
if ($w!='al') {
|
<label for="inputSelect"></label>
|
||||||
echo '<select name="what">';
|
<?php if($ui->st('w','get')=='se'){ ?>
|
||||||
foreach ($data as $value) echo $value;
|
<select class="form-control" id="inputSelect" name="serverID">
|
||||||
echo '</select>';
|
<?php } else if($ui->st('w','get')=='ma'){ ?>
|
||||||
} else {
|
<select class="form-control" id="inputSelect" name="masterID">
|
||||||
echo '';
|
<?php } else if($ui->st('w','get')=='us'){ ?>
|
||||||
}
|
<select class="form-control" id="inputSelect" name="userID">
|
||||||
?>
|
<?php } ?>
|
||||||
|
<?php foreach ($data as $value) echo $value;?>
|
||||||
|
</select>
|
||||||
|
<?php } ?>
|
Loading…
x
Reference in New Issue
Block a user