mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
Beschreibung für Voice Server #637
This commit is contained in:
parent
8e67d60422
commit
f6c99f123d
@ -74,6 +74,7 @@ $hostbanner_gfx_url = $ui->url('hostbanner_gfx_url', 'post');
|
||||
$hostbutton_tooltip = $ui->description('hostbutton_tooltip', 'post');
|
||||
$hostbutton_url = $ui->url('hostbutton_url', 'post');
|
||||
$hostbutton_gfx_url = $ui->url('hostbutton_gfx_url', 'post');
|
||||
$description = $ui->names('description', 255, 'post');
|
||||
$max_download_total_bandwidth = ($ui->isinteger('max_download_total_bandwidth', 'post')) ? $ui->isinteger('max_download_total_bandwidth', 'post') : 65536;
|
||||
$max_upload_total_bandwidth = ($ui->isinteger('max_upload_total_bandwidth', 'post')) ? $ui->isinteger('max_upload_total_bandwidth', 'post') : 65536;
|
||||
$maxtraffic = ($ui->escaped('maxtraffic', 'post') === 0 or $ui->escaped('maxtraffic', 'post') == '-1' or $ui->id('maxtraffic', 255, 'post')) ? $ui->escaped('maxtraffic', 'post') : 1024;
|
||||
@ -127,6 +128,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVo']) and $lice
|
||||
|
||||
// Should only be set in case of GET requests
|
||||
if (!$ui->st('action', 'post')) {
|
||||
$description = $row['description'];
|
||||
$externalID = $row['externalID'];
|
||||
$active = $row['active'];
|
||||
$backup = $row['backup'];
|
||||
@ -299,8 +301,8 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVo']) and $lice
|
||||
|
||||
$username = strtolower(getusername($userID));
|
||||
|
||||
$query = $sql->prepare("INSERT INTO `voice_server` (`active`,`iniConfiguration`,`backup`,`lendserver`,`userid`,`masterserver`,`ip`,`port`,`slots`,`initialpassword`,`password`,`forcebanner`,`forcebutton`,`forceservertag`,`forcewelcome`,`max_download_total_bandwidth`,`max_upload_total_bandwidth`,`localserverid`,`dns`,`maxtraffic`,`serverCreated`,`flexSlots`,`flexSlotsFree`,`flexSlotsPercent`,`autoRestart`,`externalID`,`resellerid`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,NOW(),?,?,?,?,?,?)");
|
||||
$query->execute(array($active, $iniConfiguration, $backup, $lendserver, $userID, $rootID, $ip, $port, $slots, $initialpassword, $password, $forcebanner, $forcebutton, $forceservertag, $forcewelcome, $max_download_total_bandwidth, $max_upload_total_bandwidth, $localServerID, $dns, $maxtraffic, $flexSlots, $flexSlotsFree, $flexSlotsPercent, $autoRestart, $externalID, $resellerLockupID));
|
||||
$query = $sql->prepare("INSERT INTO `voice_server` (`description`,`active`,`iniConfiguration`,`backup`,`lendserver`,`userid`,`masterserver`,`ip`,`port`,`slots`,`initialpassword`,`password`,`forcebanner`,`forcebutton`,`forceservertag`,`forcewelcome`,`max_download_total_bandwidth`,`max_upload_total_bandwidth`,`localserverid`,`dns`,`maxtraffic`,`serverCreated`,`flexSlots`,`flexSlotsFree`,`flexSlotsPercent`,`autoRestart`,`externalID`,`resellerid`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,NOW(),?,?,?,?,?,?)");
|
||||
$query->execute(array($description, $active, $iniConfiguration, $backup, $lendserver, $userID, $rootID, $ip, $port, $slots, $initialpassword, $password, $forcebanner, $forcebutton, $forceservertag, $forcewelcome, $max_download_total_bandwidth, $max_upload_total_bandwidth, $localServerID, $dns, $maxtraffic, $flexSlots, $flexSlotsFree, $flexSlotsPercent, $autoRestart, $externalID, $resellerLockupID));
|
||||
$rowCount = $query->rowCount();
|
||||
|
||||
$id = $sql->lastInsertId();
|
||||
@ -313,8 +315,8 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVo']) and $lice
|
||||
|
||||
} else if ($ui->st('action', 'post') == 'md' and $id) {
|
||||
|
||||
$query = $sql->prepare("UPDATE `voice_server` SET `active`=?,`iniConfiguration`=?,`backup`=?,`lendserver`=?,`ip`=?,`port`=?,`slots`=?,`password`=?,`forcebanner`=?,`forcebutton`=?,`forceservertag`=?,`forcewelcome`=?,`max_download_total_bandwidth`=?,`max_upload_total_bandwidth`=?,`dns`=?,`flexSlots`=?,`flexSlotsFree`=?,`flexSlotsPercent`=?,`maxtraffic`=?,`autoRestart`=?,`externalID`=? WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($active, $iniConfiguration, $backup, $lendserver, $ip, $port, $slots, $password, $forcebanner, $forcebutton, $forceservertag, $forcewelcome, $max_download_total_bandwidth, $max_upload_total_bandwidth, $dns, $flexSlots, $flexSlotsFree, $flexSlotsPercent, $maxtraffic, $autoRestart, $externalID, $id, $resellerLockupID));
|
||||
$query = $sql->prepare("UPDATE `voice_server` SET `description`=?,`active`=?,`iniConfiguration`=?,`backup`=?,`lendserver`=?,`ip`=?,`port`=?,`slots`=?,`password`=?,`forcebanner`=?,`forcebutton`=?,`forceservertag`=?,`forcewelcome`=?,`max_download_total_bandwidth`=?,`max_upload_total_bandwidth`=?,`dns`=?,`flexSlots`=?,`flexSlotsFree`=?,`flexSlotsPercent`=?,`maxtraffic`=?,`autoRestart`=?,`externalID`=? WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($description, $active, $iniConfiguration, $backup, $lendserver, $ip, $port, $slots, $password, $forcebanner, $forcebutton, $forceservertag, $forcewelcome, $max_download_total_bandwidth, $max_upload_total_bandwidth, $dns, $flexSlots, $flexSlotsFree, $flexSlotsPercent, $maxtraffic, $autoRestart, $externalID, $id, $resellerLockupID));
|
||||
$rowCount = $query->rowCount();
|
||||
|
||||
$return = $connection->ModServer($localServerID, $slots, $ip, $port, $initialpassword, $name, $welcome, $max_download_total_bandwidth, $max_upload_total_bandwidth, $hostbanner_url, $hostbanner_gfx_url, $hostbutton_url, $hostbutton_gfx_url, $hostbutton_tooltip, null, null, null, null, null, null, null, $customConfigurations);
|
||||
@ -540,8 +542,8 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVo']) and $lice
|
||||
|
||||
if (isset($tsdnsServerID) and isid($tsdnsServerID, 10)) {
|
||||
|
||||
$query = $sql->prepare("SELECT *,AES_DECRYPT(`ssh2port`,:aeskey) AS `decryptedssh2port`,AES_DECRYPT(`ssh2user`,:aeskey) AS `decryptedssh2user`,AES_DECRYPT(`ssh2password`,:aeskey) AS `decryptedssh2password` FROM `voice_tsdns` WHERE `active`='Y' AND `id`=:id AND (`resellerid`=:reseller_id OR `managedForID`=:managedForID) LIMIT 1");
|
||||
$query->execute(array(':aeskey' => $aeskey,':id' => $tsdnsServerID,':reseller_id' => $resellerLockupID,':managedForID' => $admin_id));
|
||||
$query = $sql->prepare("SELECT *,AES_DECRYPT(`ssh2port`,:aeskey) AS `decryptedssh2port`,AES_DECRYPT(`ssh2user`,:aeskey) AS `decryptedssh2user`,AES_DECRYPT(`ssh2password`,:aeskey) AS `decryptedssh2password` FROM `voice_tsdns` WHERE `active`='Y' AND `id`=:id LIMIT 1");
|
||||
$query->execute(array(':aeskey' => $aeskey,':id' => $tsdnsServerID));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$publickey = $row['publickey'];
|
||||
$queryip = $row['ssh2ip'];
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
$defined['voice_server'] = array(
|
||||
'id' => array("Type"=>"int(10) unsigned","Null"=>"NO","Key"=>"PRI","Default"=>"","Extra"=>"auto_increment"),
|
||||
'description' => array("Type"=>"varchar(255)","Null"=>"YES","Key"=>"","Default"=>"","Extra"=>""),
|
||||
'active' => array("Type"=>"enum('Y','N')","Null"=>"YES","Key"=>"","Default"=>"Y","Extra"=>""),
|
||||
'iniConfiguration' => array("Type"=>"text","Null"=>"YES","Key"=>"","Default"=>"","Extra"=>""),
|
||||
'autoRestart' => array("Type"=>"enum('Y','N')","Null"=>"YES","Key"=>"","Default"=>"Y","Extra"=>""),
|
||||
|
@ -495,6 +495,7 @@ if ($ui->st('d', 'get') == 'bu' and $ui->id('id', 10, 'get') and (!isset($_SESSI
|
||||
$query->execute(array($id, $user_id, $reseller_id));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$description = $row['description'];
|
||||
$masterserver = $row['masterserver'];
|
||||
$ip = $row['ip'];
|
||||
$port = $row['port'];
|
||||
@ -763,8 +764,8 @@ if ($ui->st('d', 'get') == 'bu' and $ui->id('id', 10, 'get') and (!isset($_SESSI
|
||||
|
||||
$connection->CloseConnection();
|
||||
|
||||
$query = $sql->prepare("UPDATE `voice_server` SET `dns`=?,`initialpassword`=?,`iniConfiguration`=? WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($dns, $initialpassword, $iniConfiguration, $id, $reseller_id));
|
||||
$query = $sql->prepare("UPDATE `voice_server` SET `description`=?,`dns`=?,`initialpassword`=?,`iniConfiguration`=? WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($ui->names('description', 255, 'post'), $dns, $initialpassword, $iniConfiguration, $id, $reseller_id));
|
||||
|
||||
$loguseraction = '%mod% %voserver% ' . $ip . ':' . $port;
|
||||
$insertlog->execute();
|
||||
@ -994,6 +995,7 @@ if ($ui->st('d', 'get') == 'bu' and $ui->id('id', 10, 'get') and (!isset($_SESSI
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
if (!isset($_SESSION['sID']) or in_array($row['id'], $substituteAccess['vo'])) {
|
||||
|
||||
$dns = $row['dns'];
|
||||
|
||||
if ($row['type'] == 'ts3') {
|
||||
@ -1028,12 +1030,13 @@ if ($ui->st('d', 'get') == 'bu' and $ui->id('id', 10, 'get') and (!isset($_SESSI
|
||||
$minutes = floor(($row['uptime'] - ($days * 86400) - ($hours * 3600)) / 60);
|
||||
$uptime = $days . 'D/' . $hours . 'H/' . $minutes . 'M';
|
||||
$password = ($row['initialpassword'] != '' and $row['initialpassword'] != null) ? '?password='.$row['initialpassword'] : '';
|
||||
$server = ($row['usedns'] == 'N' or $dns==null or $dns == '') ? '<a href="ts3server://'.$row['ip'] . ':' . $row['port'].$password.'">'.$row['ip'] . ':' . $row['port'].'</a>' : '<a href="ts3server://'.$row['dns'].$password.'">'.$row['dns'].' ('.$row['ip'] . ':' . $row['port'].')</a>';
|
||||
$server = ($row['usedns'] == 'N' or $dns == null or $dns == '') ? '<a href="ts3server://'.$row['ip'] . ':' . $row['port'].$password.'">'.$row['ip'] . ':' . $row['port'].'</a>' : '<a href="ts3server://'.$row['dns'].$password.'">'.$row['dns'].' ('.$row['ip'] . ':' . $row['port'].')</a>';
|
||||
$address = $row['ip'] . ':' . $row['port'];
|
||||
$filetraffic = round(($row['filetraffic'] / 1024), 2);
|
||||
$maxtraffic = ($row['maxtraffic'] >= 0) ? round($row['maxtraffic']) : $row['maxtraffic'];
|
||||
}
|
||||
$table[] = array('id' => $row['id'], 'virtual_id' => $row['localserverid'], 'backup' => $row['backup'], 'filetraffic' => $filetraffic,'maxtraffic' => $maxtraffic, 'server' => $server,'address' => $address,'usage' => $usage,'uptime' => $uptime,'stopped' => $stopped,'img' => $imgName,'alt' => $imgAlt,'type' => $type);
|
||||
|
||||
$table[] = array('id' => $row['id'], 'virtual_id' => $row['localserverid'], 'description' => $row['description'], 'backup' => $row['backup'], 'filetraffic' => $filetraffic, 'maxtraffic' => $maxtraffic, 'server' => $server,'address' => $address, 'usage' => $usage, 'uptime' => $uptime, 'stopped' => $stopped, 'img' => $imgName, 'alt' => $imgAlt, 'type' => $type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -193,6 +193,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="inputDescription"><?php echo $gsprache->description;?></label>
|
||||
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputDescription" type="text" name="description" value="<?php echo $description;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php foreach(customColumns('T') as $row){ ?>
|
||||
<div class="form-group">
|
||||
<label for="inputCustom-<?php echo $row['customID'];?>"><?php echo $row['menu'];?></label>
|
||||
|
@ -188,6 +188,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="inputDescription"><?php echo $gsprache->description;?></label>
|
||||
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputDescription" type="text" name="description" value="<?php echo $description;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php foreach(customColumns('T', $id) as $row){ ?>
|
||||
<div class="form-group">
|
||||
<label for="inputCustom-<?php echo $row['customID'];?>"><?php echo $row['menu'];?></label>
|
||||
|
@ -25,7 +25,7 @@
|
||||
<div class="panel box <?php if($table_row['stopped']=='Y') echo 'box-primary'; else if($table_row['stopped']=='C') echo 'box-danger'; else echo 'box-success';?>">
|
||||
<div class="box-body">
|
||||
|
||||
<h4><?php echo $table_row['server'];?></h4>
|
||||
<h4><?php echo (strlen($table_row['description']) == 0) ? $table_row['server'] : $table_row['description'] . ' ' . $table_row['server'];?></h4>
|
||||
|
||||
<div class="form-group">
|
||||
<a href="userpanel.php?w=vo&d=st&id=<?php echo $table_row['id'];?>&action=re&r=vo" onclick="return confirm('<?php echo $table_row['address'];?>: <?php echo $sprache->confirm_restart;?>');"><button class="btn btn-sm btn-success"><i class="icon-white icon-play"></i> <?php echo $gsprache->start;?></button></a>
|
||||
|
@ -31,6 +31,13 @@
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputDescription"><?php echo $gsprache->description;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputDescription" type="text" name="description" value="<?php echo $description;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($usedns=='Y'){ ?>
|
||||
<div class="form-group">
|
||||
<label for="defaultdns"><?php echo $sprache->defaultdns;?></label>
|
||||
|
Loading…
x
Reference in New Issue
Block a user