mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
#30 web vhosts
This commit is contained in:
parent
4c4bf4c950
commit
3b2775669e
32
web/ajax.php
32
web/ajax.php
@ -191,6 +191,10 @@ if ($ui->smallletters('w', 9, 'get') == 'datatable') {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_mysqldb.php');
|
||||
|
||||
} else if ($ui->smallletters('d', 8, 'get') == 'webvhost' and isset($admin_id) and isset($reseller_id) and isset($resellerLockupID) and $pa['webmaster']) {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_webvhost.php');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,33 +274,9 @@ if ($ui->smallletters('w', 9, 'get') == 'datatable') {
|
||||
|
||||
die;
|
||||
|
||||
} else if (isset($admin_id) and $pa['fastdl'] and $ui->smallletters('d', 8, 'get') == 'webmaster' and $ui->id('id', 10, 'get')) {
|
||||
|
||||
$sprache = getlanguagefile('web', $user_language, $resellerLockupID);
|
||||
|
||||
$maxVhost = 0;
|
||||
$maxHDD = 0;
|
||||
$webVhosts = 0;
|
||||
$leftHDD = 0;
|
||||
$totalHDD = 0;
|
||||
$totalVhosts = 0;
|
||||
$quotaActive = 'N';
|
||||
$dns = '';
|
||||
|
||||
$query = $sql->prepare("SELECT m.`vhostTemplate`,m.`maxVhost`,m.`maxHDD`,m.`quotaActive`,m.`defaultdns`,(SELECT COUNT(v.`webVhostID`) AS `a` FROM `webVhost` AS v WHERE v.`webMasterID`=m.`webMasterID`) AS `totalVhosts`,(SELECT SUM(v.`hdd`) AS `a` FROM `webVhost` AS v WHERE v.`webMasterID`=m.`webMasterID`) AS `totalHDD` FROM `webMaster` AS m WHERE m.`webMasterID`=? AND m.`resellerID`=? LIMIT 1");
|
||||
$query->execute(array($ui->id('id', 10, 'get'), $resellerLockupID));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$vhostTemplate = $row['vhostTemplate'];
|
||||
$maxVhost = (int) $row['maxVhost'];
|
||||
$maxHDD = (int) $row['maxHDD'];
|
||||
$totalVhosts = (int) $row['totalVhosts'];
|
||||
$leftHDD = (int) $row['maxHDD'] - $row['totalHDD'];
|
||||
$quotaActive = $row['quotaActive'];
|
||||
$dns = $row['defaultdns'];
|
||||
}
|
||||
|
||||
require_once IncludeTemplate($template_to_use, 'ajax_admin_web_master.tpl', 'ajax');
|
||||
} else if (isset($admin_id) and $pa['fastdl'] and $ui->smallletters('d', 9, 'get') == 'webmaster' and $ui->id('id', 10, 'get')) {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/web_master_usage.php');
|
||||
die;
|
||||
|
||||
} else if (isset($user_id) and $pa['usertickets'] and $ui->w('d', 20, 'get') == 'userTicketCategories' and $ui->id('topicName', 10, 'get')) {
|
||||
|
@ -61,6 +61,7 @@ if ($reseller_id == 0) {
|
||||
}
|
||||
|
||||
// Define the ID variable which will be used at the form and SQLs
|
||||
$externalID = $ui->externalID('externalID', 'post');
|
||||
$id = $ui->id('id', 10, 'get');
|
||||
$webMasterID = $ui->id('webMasterID', 10, 'post');
|
||||
$userID = $ui->id('userID', 10, 'post');
|
||||
@ -84,24 +85,22 @@ if ($ui->w('action',4, 'post') and !token(true)) {
|
||||
// Add and modify entries. Same validation can be used.
|
||||
if ($ui->st('d', 'get') == 'ad' or $ui->st('d', 'get') == 'md') {
|
||||
|
||||
// Add jQuery plugin chosen to the header
|
||||
$htmlExtraInformation['css'][] = '<link href="css/default/chosen/chosen.min.css" rel="stylesheet" type="text/css">';
|
||||
$htmlExtraInformation['js'][] = '<script src="js/default/plugins/chosen/chosen.jquery.min.js" type="text/javascript"></script>';
|
||||
|
||||
// Error handling. Check if required attributes are set and can be validated
|
||||
$errors = array();
|
||||
|
||||
// Add or mod is opened
|
||||
if (!$ui->smallletters('action', 2, 'post')) {
|
||||
|
||||
$table = array();
|
||||
$table2 = array();
|
||||
|
||||
// Gather data for adding if needed and define add template
|
||||
if ($ui->st('d', 'get') == 'ad') {
|
||||
|
||||
$table = array();
|
||||
$table2 = array();
|
||||
|
||||
$maxVhost = 0;
|
||||
$maxHDD = 0;
|
||||
$totalVhosts = 0;
|
||||
$leftHDD = 0;
|
||||
$quotaActive = 'N';
|
||||
|
||||
// Get useraccounts
|
||||
$query = $sql->prepare("SELECT `id`,`cname`,`vname`,`name` FROM `userdata` WHERE `resellerid`=? AND `accounttype`='u' AND `active`='Y' ORDER BY `id` DESC");
|
||||
$query->execute(array($resellerLockupID));
|
||||
@ -110,51 +109,27 @@ if ($ui->st('d', 'get') == 'ad' or $ui->st('d', 'get') == 'md') {
|
||||
}
|
||||
|
||||
// Get masterserver. Sort by usage.
|
||||
|
||||
$query = $sql->prepare("SELECT m.`webMasterID`,m.`ip`,m.`description`,(SELECT COUNT(v.`webVhostID`) AS `a` FROM `webVhost` AS v WHERE v.`webMasterID`=m.`webMasterID`)/(m.`maxVhost`/100) AS `percentVhostUsage`,(SELECT SUM(v.`hdd`) AS `a` FROM `webVhost` AS v WHERE v.`webMasterID`=m.`webMasterID`)/(IF(m.`hddOverbook`='Y',(m.`maxHDD`/100) * (100+m.`overbookPercent`),`maxHDD`)/100) AS `percentHDDUsage` FROM `webMaster` AS m WHERE m.`active`='Y' AND m.`resellerID`=? GROUP BY m.`webMasterID` HAVING (`percentVhostUsage`<100 OR `percentVhostUsage`IS NULL) AND (`percentHDDUsage`<100 OR `percentHDDUsage`IS NULL) ORDER BY `percentHDDUsage` ASC,`percentVhostUsage` ASC");
|
||||
$query->execute(array($resellerLockupID));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$table2[$row['webMasterID']] = trim($row['ip'] . ' ' . $row['description']);
|
||||
}
|
||||
|
||||
if (count($table2) > 0) {
|
||||
|
||||
$bestID = key($table2);
|
||||
|
||||
$query = $sql->prepare("SELECT m.`vhostTemplate`,m.`maxVhost`,m.`maxHDD`,m.`quotaActive`,m.`defaultdns`,(SELECT COUNT(v.`webVhostID`) AS `a` FROM `webVhost` AS v WHERE v.`webMasterID`=m.`webMasterID`) AS `totalVhosts`,(SELECT SUM(v.`hdd`) AS `a` FROM `webVhost` AS v WHERE v.`webMasterID`=m.`webMasterID`) AS `totalHDD` FROM `webMaster` AS m WHERE m.`webMasterID`=? AND m.`resellerID`=? LIMIT 1");
|
||||
$query->execute(array($bestID, $resellerLockupID));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$vhostTemplate = $row['vhostTemplate'];
|
||||
$maxVhost = (int) $row['maxVhost'];
|
||||
$maxHDD = (int) $row['maxHDD'];
|
||||
$totalVhosts = (int) $row['totalVhosts'];
|
||||
$leftHDD = (int) $row['maxHDD'] - $row['totalHDD'];
|
||||
$quotaActive = $row['quotaActive'];
|
||||
$dns = $row['defaultdns'];
|
||||
}
|
||||
}
|
||||
|
||||
$template_file = 'admin_web_vhost_add.tpl';
|
||||
|
||||
// Gather data for modding in case we have an ID and define mod template
|
||||
} else if ($ui->st('d', 'get') == 'md' and $id) {
|
||||
|
||||
$query = $sql->prepare("SELECT v.*,AES_DECRYPT(v.`ftpPassword`,?) AS `decryptedFTPPass`,m.`ip`,m.`ftpIP`,m.`ftpPort`,m.`description`,m.`maxHDD`,m.`quotaActive`,(SELECT SUM(v.`hdd`) AS `a` FROM `webVhost` AS v WHERE v.`webMasterID`=m.`webMasterID`) AS `totalHDD`,u.`cname`,u.`vname`,u.`name` FROM `webVhost` AS v INNER JOIN `webMaster` AS m ON m.`webMasterID`=v.`webMasterID` INNER JOIN `userdata` AS u ON u.`id`=v.`userID` WHERE v.`webVhostID`=? AND v.`resellerID`=? LIMIT 1");
|
||||
$query = $sql->prepare("SELECT v.*,AES_DECRYPT(v.`ftpPassword`,?) AS `decryptedFTPPass`,u.`cname`,u.`vname`,u.`name` FROM `webVhost` AS v INNER JOIN `userdata` AS u ON u.`id`=v.`userID` WHERE v.`webVhostID`=? AND v.`resellerID`=? LIMIT 1");
|
||||
$query->execute(array($aeskey, $id, $resellerLockupID));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
// Userdata from JOIN, trim in case attributes are not provided
|
||||
$userName = trim($row['cname'] . ' ' . trim($row['vname'] . ' ' . $row['name']));
|
||||
|
||||
// Masterserver from JOIN. Display FTP IP in case it is provided
|
||||
$ftpServer = (isip($row['ftpIP'], 'ip4')) ? $row['ftpIP'] : $row['ip'];
|
||||
$ftpServer .= ':' . $row['ftpPort'];
|
||||
$description = $row['description'];
|
||||
$maxHDD = (int) $row['maxHDD'];
|
||||
$leftHDD = (int) $row['maxHDD'] - $row['totalHDD'];
|
||||
$quotaActive = $row['quotaActive'];
|
||||
$table = array($row['userID'] => trim($row['cname'] . ' ' . trim($row['vname'] . ' ' . $row['name'])));
|
||||
|
||||
// Vhost data
|
||||
$externalID = $row['externalID'];
|
||||
$userID = $row['userID'];
|
||||
$active = $row['active'];
|
||||
$hdd = $row['hdd'];
|
||||
$hddUsage = (int) $row['hddUsage'];
|
||||
@ -162,6 +137,13 @@ if ($ui->st('d', 'get') == 'ad' or $ui->st('d', 'get') == 'md') {
|
||||
$ftpPassword = $row['decryptedFTPPass'];
|
||||
$ownVhost = $row['ownVhost'];
|
||||
$vhostTemplate = $row['vhostTemplate'];
|
||||
|
||||
// Get masterserver. Sort by usage.
|
||||
$query2 = $sql->prepare("SELECT m.`ip`,m.`description` FROM `webMaster` AS m WHERE m.`active`='Y' AND m.`webMasterID`=? AND m.`resellerID`=?");
|
||||
$query2->execute(array($row['webMasterID'], $resellerLockupID));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
$table2[$row['webMasterID']] = trim($row2['ip'] . ' ' . $row2['description']);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if database entry exists and if not display 404 page
|
||||
@ -242,7 +224,7 @@ if ($ui->st('d', 'get') == 'ad' or $ui->st('d', 'get') == 'md') {
|
||||
$query->execute(array($webMasterID, $resellerLockupID));
|
||||
$maxHDD = (int) $query->fetchColumn();
|
||||
|
||||
$query = $sql->prepare("SELECT SUM(v.`hdd`) AS `a` FROM `webVhost` WHERE `webMasterID`=? AND `resellerID`=?");
|
||||
$query = $sql->prepare("SELECT SUM(`hdd`) AS `a` FROM `webVhost` WHERE `webMasterID`=? AND `resellerID`=?");
|
||||
$query->execute(array($id, $resellerLockupID));
|
||||
|
||||
if (($maxHDD + $oldHDD - $query->fetchColumn() - $hdd) < 0) {
|
||||
@ -256,8 +238,8 @@ if ($ui->st('d', 'get') == 'ad' or $ui->st('d', 'get') == 'md') {
|
||||
// Make the inserts or updates define the log entry and get the affected rows from insert
|
||||
if ($ui->st('action', 'post') == 'ad') {
|
||||
|
||||
$query = $sql->prepare("INSERT INTO `webVhost` (`webMasterID`,`userID`,`active`,`hdd`,`ftpPassword`,`ownVhost`,`vhostTemplate`,`resellerID`) VALUES (?,?,?,?,AES_ENCRYPT(?,?),?,?,?)");
|
||||
$query->execute(array($webMasterID, $userID, $active, $hdd, $ftpPassword, $aeskey, $ownVhost, $vhostTemplate, $resellerLockupID));
|
||||
$query = $sql->prepare("INSERT INTO `webVhost` (`webMasterID`,`userID`,`active`,`hdd`,`ftpPassword`,`ownVhost`,`vhostTemplate`,`externalID`,`resellerID`) VALUES (?,?,?,?,AES_ENCRYPT(?,?),?,?,?,?)");
|
||||
$query->execute(array($webMasterID, $userID, $active, $hdd, $ftpPassword, $aeskey, $ownVhost, $vhostTemplate, $externalID, $resellerLockupID));
|
||||
|
||||
$id = (int) $sql->lastInsertId();
|
||||
|
||||
@ -276,8 +258,8 @@ if ($ui->st('d', 'get') == 'ad' or $ui->st('d', 'get') == 'md') {
|
||||
|
||||
} else if ($ui->st('action', 'post') == 'md' and $id) {
|
||||
|
||||
$query = $sql->prepare("UPDATE `webVhost` SET `active`=?,`hdd`=?,`dns`=?,`ftpPassword`=AES_ENCRYPT(?,?),`ownVhost`=?,`vhostTemplate`=? WHERE `webVhostID`=? AND `resellerID`=? LIMIT 1");
|
||||
$query->execute(array($active, $hdd, $dns, $ftpPassword, $aeskey, $ownVhost, $vhostTemplate, $id, $resellerLockupID));
|
||||
$query = $sql->prepare("UPDATE `webVhost` SET `active`=?,`hdd`=?,`dns`=?,`ftpPassword`=AES_ENCRYPT(?,?),`ownVhost`=?,`vhostTemplate`=?,`externalID`=? WHERE `webVhostID`=? AND `resellerID`=? LIMIT 1");
|
||||
$query->execute(array($active, $hdd, $dns, $ftpPassword, $aeskey, $ownVhost, $vhostTemplate, $externalID, $id, $resellerLockupID));
|
||||
|
||||
$rowCount = $query->rowCount();
|
||||
$loguseraction = '%mod% %webvhost% ' . $dns;
|
||||
@ -472,106 +454,7 @@ if ($ui->st('d', 'get') == 'ad' or $ui->st('d', 'get') == 'md') {
|
||||
// List the available entries
|
||||
} else {
|
||||
|
||||
$table = array();
|
||||
|
||||
$query = $sql->prepare("SELECT COUNT(`webVhostID`) AS `amount` FROM `webVhost` WHERE `resellerID`=?");
|
||||
$query->execute(array($resellerLockupID));
|
||||
$colcount = $query->fetchColumn();
|
||||
|
||||
if (!isset($start)) {
|
||||
$start = 0;
|
||||
}
|
||||
|
||||
if (!isset($amount)) {
|
||||
$amount = 20;
|
||||
}
|
||||
|
||||
if ($start > $colcount) {
|
||||
$start = $colcount - $amount;
|
||||
}
|
||||
|
||||
if ($start < 0) {
|
||||
$start = 0;
|
||||
}
|
||||
|
||||
$next = $start + $amount;
|
||||
$vor = ($colcount > $next) ? $start + $amount : $start;
|
||||
$back = $start - $amount;
|
||||
$zur = ($back >= 0) ? $start - $amount : $start;
|
||||
|
||||
$o = (string) $ui->st('o', 'get');
|
||||
|
||||
if ($ui->st('o', 'get') == 'dd') {
|
||||
$orderby = 'v.`dns` DESC';
|
||||
} else if ($ui->st('o', 'get') == 'ad') {
|
||||
$orderby = 'v.`dns` ASC';
|
||||
} else if ($ui->st('o', 'get') == 'dc') {
|
||||
$orderby = 'u.`cname` DESC';
|
||||
} else if ($ui->st('o', 'get') == 'ac') {
|
||||
$orderby = 'u.`cname` ASC';
|
||||
} else if ($ui->st('o', 'get') == 'ds') {
|
||||
$orderby = 'v.`active` DESC';
|
||||
} else if ($ui->st('o', 'get') == 'as') {
|
||||
$orderby = 'v.`active` ASC';
|
||||
} else if ($ui->st('o', 'get') == 'di') {
|
||||
$orderby = 'v.`webVhostID` DESC';
|
||||
} else {
|
||||
$orderby = 'v.`webVhostID` ASC';
|
||||
$o = 'ai';
|
||||
}
|
||||
|
||||
$query = $sql->prepare("SELECT v.*,u.`cname` FROM `webVhost` AS v LEFT JOIN `userdata` u ON v.`userID`=u.`id` WHERE v.`resellerID`=? ORDER BY " . $orderby . " LIMIT " . $start . "," . $amount);
|
||||
$query2 = $sql->prepare("SELECT `action`,`extraData` FROM `jobs` WHERE `affectedID`=? AND `type`='wv' AND (`status` IS NULL OR `status`=1 OR `status`=4) ORDER BY `jobID` DESC LIMIT 1");
|
||||
|
||||
$query->execute(array($resellerLockupID));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$jobPending = $gsprache->no;
|
||||
|
||||
if ($row['jobPending'] == 'Y') {
|
||||
$query2->execute(array($row['webVhostID']));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
if ($row2['action'] == 'ad') {
|
||||
$jobPending = $gsprache->add;
|
||||
} else if ($row2['action'] == 'dl') {
|
||||
$jobPending = $gsprache->del;
|
||||
} else {
|
||||
$jobPending = $gsprache->mod;
|
||||
}
|
||||
|
||||
$json = @json_decode($row2['extraData']);
|
||||
$tobeActive = (is_object($json) and isset($json->newActive)) ? $json->newActive : 'N';
|
||||
}
|
||||
}
|
||||
|
||||
$active = 'Y';
|
||||
|
||||
if ($row['jobPending'] == 'Y' and isset($tobeActive) and $tobeActive == 'Y') {
|
||||
$active = 'Y';
|
||||
} else if ($row['active'] == 'N') {
|
||||
$active = 'N';
|
||||
}
|
||||
|
||||
$table[] = array('id' => $row['webVhostID'], 'active' => $row['active'], 'dns' => $row['dns'], 'hdd' => $row['hdd'], 'hddUsage' => $row['hddUsage'], 'jobPending' => $jobPending, 'userID' => $row['userID'], 'cname' => $row['cname']);
|
||||
}
|
||||
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
|
||||
$link = '<a href="admin.php?w=fv&o=' . $o . '&a=' . $amount;
|
||||
$link .= ($start == 0) ? '&p=0" class="bold">1</a>' : '&p=0">1</a>';
|
||||
|
||||
$pages[] = $link;
|
||||
|
||||
$i = 2;
|
||||
|
||||
while ($i <= $pageamount) {
|
||||
$selectpage = ($i - 1) * $amount;
|
||||
$pages[] = ($start == $selectpage) ? '<a href="admin.php?w=fv&o=' . $o . '&a=' . $amount . '&p=' . $selectpage . '" class="bold">' . $i . '</a>' : '<a href="admin.php?w=fv&o=' . $o . '&a=' . $amount . '&p=' . $selectpage . '">' . $i . '</a>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
$pages = implode(', ',$pages);
|
||||
configureDateTables('-1', '1, "asc"', 'ajax.php?w=datatable&d=webvhost');
|
||||
|
||||
$template_file = 'admin_web_vhost_list.tpl';
|
||||
}
|
130
web/stuff/ajax/datatable_webvhost.php
Normal file
130
web/stuff/ajax/datatable_webvhost.php
Normal file
@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* File: datatable_webvhost.php.
|
||||
* Author: Ulrich Block
|
||||
* Date: 14.03.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!');
|
||||
}
|
||||
|
||||
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `webVhost` WHERE `resellerID`=?");
|
||||
$query->execute(array($resellerLockupID));
|
||||
|
||||
$array['iTotalRecords'] = $query->fetchColumn();
|
||||
|
||||
if ($sSearch) {
|
||||
|
||||
$userInQuery = (count($userIDs) > 0) ? ' OR `userID` IN (' . implode(',', $userIDs) . ')' : '';
|
||||
|
||||
$toLower = strtolower($sSearch);
|
||||
|
||||
$statusQuery = array();
|
||||
|
||||
if (strpos(strtolower($gsprache->status_inactive), $toLower) !== false or strpos(strtolower($gsprache->status_stop), $toLower) !== false) {
|
||||
$statusQuery[] = "OR v.`active`='N'";
|
||||
}
|
||||
if (strpos(strtolower($gsprache->status_ok), $toLower) !== false) {
|
||||
$statusQuery[] = "OR v.`active`='Y'";
|
||||
}
|
||||
|
||||
$statusQuery = (count($statusQuery) > 0) ? implode(' ', $statusQuery) : '';
|
||||
|
||||
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `webVhost` AS v LEFT JOIN `userdata` AS u ON v.`userID`=u.`id` WHERE v.`resellerID`=:reseller_id AND (v.`webVhostID` LIKE :search OR v.`dns` LIKE :search {$userInQuery} {$statusQuery})");
|
||||
$query->execute(array(':search' => '%' . $sSearch . '%', ':reseller_id' => $resellerLockupID));
|
||||
$array['iTotalDisplayRecords'] = $query->fetchColumn();
|
||||
|
||||
} else {
|
||||
$array['iTotalDisplayRecords'] = $array['iTotalRecords'];
|
||||
}
|
||||
|
||||
$orderFields = array(0 => 'v.`dns`', 1 => 'v.`webVhostID`', 2 => 'v.`active`', 3 => 'd.`description`', 4 => 'u.`cname`', 5 => 'v.`jobPending`');
|
||||
|
||||
if (isset($orderFields[$iSortCol]) and is_array($orderFields[$iSortCol])) {
|
||||
$orderBy = implode(' ' . $sSortDir . ', ', $orderFields[$iSortCol]) . ' ' . $sSortDir;
|
||||
} else if (isset($orderFields[$iSortCol]) and !is_array($orderFields[$iSortCol])) {
|
||||
$orderBy = $orderFields[$iSortCol] . ' ' . $sSortDir;
|
||||
} else {
|
||||
$orderBy = 'v.`webVhostID` DESC';
|
||||
}
|
||||
|
||||
|
||||
if ($sSearch) {
|
||||
$query = $sql->prepare("SELECT v.`dns`,v.`webVhostID`,v.`active`,v.`jobPending`,v.`hdd`,v.`hddUsage`,v.`userID`,u.`cname`,CONCAT(u.`vname`,' ',u.`name`) AS `full_name` FROM `webVhost` AS v LEFT JOIN `userdata` AS u ON v.`userID`=u.`id` WHERE v.`resellerID`=:reseller_id AND (v.`webVhostID` LIKE :search OR v.`dns` LIKE :search {$userInQuery} {$statusQuery}) ORDER BY $orderBy LIMIT {$iDisplayStart},{$iDisplayLength}");
|
||||
$query->execute(array(':search' => '%' . $sSearch . '%', ':reseller_id' => $resellerLockupID));
|
||||
} else {
|
||||
$query = $sql->prepare("SELECT v.`dns`,v.`webVhostID`,v.`active`,v.`jobPending`,v.`hdd`,v.`hddUsage`,v.`userID`,u.`cname`,CONCAT(u.`vname`,' ',u.`name`) AS `full_name` FROM `webVhost` AS v LEFT JOIN `userdata` AS u ON v.`userID`=u.`id` WHERE v.`resellerID`=? ORDER BY $orderBy LIMIT {$iDisplayStart},{$iDisplayLength}");
|
||||
$query->execute(array($resellerLockupID));
|
||||
}
|
||||
|
||||
$query2 = $sql->prepare("SELECT `action`,`extraData` FROM `jobs` WHERE `affectedID`=? AND `resellerID`=? AND `type`='wv' AND (`status` IS NULL OR `status`=1) ORDER BY `jobID` DESC LIMIT 1");
|
||||
$query3 = $sql->prepare("UPDATE `webVhost` SET `jobPending`='N' WHERE `webVhostID`=? AND `resellerID`=? LIMIT 1");
|
||||
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$jobPending = $gsprache->no;
|
||||
$status = 0;
|
||||
$statusMessage = $gsprache->status_ok;
|
||||
|
||||
if ($row['jobPending'] == 'Y') {
|
||||
|
||||
$query2->execute(array($row['id'], $resellerLockupID));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
if ($row2['action'] == 'ad') {
|
||||
$jobPending = $gsprache->add;
|
||||
} else if ($row2['action'] == 'dl') {
|
||||
$jobPending = $gsprache->del;
|
||||
} else {
|
||||
$jobPending = $gsprache->mod;
|
||||
}
|
||||
|
||||
$json = @json_decode($row2['extraData']);
|
||||
$row['status'] = ((is_object($json) and isset($json->newActive) and $json->newActive == 'N')) ? 2 : 0;
|
||||
}
|
||||
|
||||
if ($query2->rowCount() == 0) {
|
||||
$query3->execute(array($row['id'], $resellerLockupID));
|
||||
}
|
||||
}
|
||||
|
||||
if ($row['active'] == 'N') {
|
||||
$status = 3;
|
||||
$statusMessage = $gsprache->status_inactive;
|
||||
}
|
||||
|
||||
$array['aaData'][] = array($row['dns'], $row['webVhostID'], returnButton($template_to_use, 'ajax_admin_show_status.tpl', '', '', $status, (string) $statusMessage), returnButton($template_to_use, 'ajax_admin_user_switch.tpl', $row['cname'], $row['full_name'], $row['userID'], ''), (int) $row['hddUsage'] . '/' . (int) $row['hdd'], (string) $jobPending, returnButton($template_to_use, 'ajax_admin_buttons_ri.tpl', 'wv', 'ri', $row['webVhostID'], $gsprache->reinstall) . ' ' . returnButton($template_to_use, 'ajax_admin_buttons_dl.tpl', 'wv', 'dl', $row['webVhostID'], $gsprache->del) . ' ' . returnButton($template_to_use, 'ajax_admin_buttons_md.tpl', 'wv', 'md', $row['webVhostID'], $gsprache->mod));
|
||||
}
|
82
web/stuff/ajax/web_master_usage.php
Normal file
82
web/stuff/ajax/web_master_usage.php
Normal file
@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* File: web_master_usage.php.
|
||||
* Author: Ulrich Block
|
||||
* Date: 14.03.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!');
|
||||
}
|
||||
|
||||
$sprache = getlanguagefile('web', $user_language, $resellerLockupID);
|
||||
|
||||
$maxVhost = 0;
|
||||
$maxHDD = 0;
|
||||
$webVhosts = 0;
|
||||
$leftHDD = 0;
|
||||
$totalHDD = 0;
|
||||
$totalVhosts = 0;
|
||||
$maxHDD = 1000;
|
||||
$quotaActive = 'N';
|
||||
$ownVhost = 'N';
|
||||
$dns = '';
|
||||
|
||||
$query = $sql->prepare("SELECT m.`vhostTemplate`,m.`maxVhost`,m.`maxHDD`,m.`quotaActive`,m.`defaultdns`,(SELECT COUNT(v.`webVhostID`) AS `a` FROM `webVhost` AS v WHERE v.`webMasterID`=m.`webMasterID`) AS `totalVhosts`,(SELECT SUM(v.`hdd`) AS `a` FROM `webVhost` AS v WHERE v.`webMasterID`=m.`webMasterID`) AS `totalHDD` FROM `webMaster` AS m WHERE m.`webMasterID`=? AND m.`resellerID`=? LIMIT 1");
|
||||
$query->execute(array($ui->id('id', 10, 'get'), $resellerLockupID));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$vhostTemplate = $row['vhostTemplate'];
|
||||
$maxVhost = (int) $row['maxVhost'];
|
||||
$maxHDD = (int) $row['maxHDD'];
|
||||
$totalVhosts = (int) $row['totalVhosts'];
|
||||
$leftHDD = (int) $row['maxHDD'] - $row['totalHDD'];
|
||||
$quotaActive = $row['quotaActive'];
|
||||
$dns = $row['defaultdns'];
|
||||
}
|
||||
|
||||
// Edit mode will provide the webhost ID
|
||||
if ($ui->id('serverID', 10, 'get')) {
|
||||
|
||||
$query = $sql->prepare("SELECT `ownVhost`,`vhostTemplate`,`dns`,`hdd` FROM `webVhost` WHERE `webVhostID`=? AND `resellerID`=? LIMIT 1");
|
||||
$query->execute(array($ui->id('serverID', 10, 'get'), $resellerLockupID));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$ownVhost = $row['ownVhost'];
|
||||
$vhostTemplate = $row['vhostTemplate'];
|
||||
$dns = $row['dns'];
|
||||
$maxHDD = $row['hdd'];
|
||||
}
|
||||
}
|
||||
|
||||
require_once IncludeTemplate($template_to_use, 'ajax_admin_web_master.tpl', 'ajax');
|
@ -118,7 +118,7 @@
|
||||
<label for="inputMaxHDD"><?php echo $sprache->maxHDD;?></label>
|
||||
<div class="controls">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="inputMaxHDD" class="span11" type="number" name="maxHDD" value="<?php echo $maxHDD;?>">
|
||||
<input class="form-control" id="inputMaxHDD" type="number" name="maxHDD" value="<?php echo $maxHDD;?>">
|
||||
<span class="input-group-addon">MB</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,106 +1,124 @@
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="admin.php">Home</a> <span class="divider">/</span></li>
|
||||
<li><a href="admin.php?w=wv"><?php echo $gsprache->webspace;?> Vhost</a> <span class="divider">/</span></li>
|
||||
<li class="active"><?php echo $gsprache->add;?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-header">
|
||||
<h1><?php echo $gsprache->webspace;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="admin.php?w=wv"><i class="fa fa-cubes"></i> <?php echo $gsprache->webspace;?></a></li>
|
||||
<li class="active"><?php echo $gsprache->add;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
|
||||
<?php if (count($errors)>0){ ?>
|
||||
<div class="alert alert-error">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><?php echo $gsprache->errors;?></h4>
|
||||
<?php echo implode(', ',$errors);?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div class="row-fluid">
|
||||
<div class="span11">
|
||||
<form class="form-horizontal" action="admin.php?w=wv&d=ad&r=wv" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">
|
||||
<input type="hidden" name="token" value="<?php echo token();?>">
|
||||
<input type="hidden" name="action" value="ad">
|
||||
<div class="control-group<?php if(isset($errors['userID'])) echo ' error';?>">
|
||||
<label class="control-label" for="inputUserID"><?php echo $dedicatedLanguage->user;?></label>
|
||||
<div class="controls">
|
||||
<select id="inputUserID" name="userID" class="span11">
|
||||
<?php foreach ($table as $k=>$v){ ?>
|
||||
<option value="<?php echo $k;?>" <?php if ($userID==$k) echo 'selected="selected";'?>><?php echo $v;?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><?php echo $gsprache->errors;?></h4>
|
||||
<?php echo implode(', ',$errors);?>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputFtpPassword"><?php echo $sprache->ftpPassword;?></label>
|
||||
<div class="controls"><input id="inputFtpPassword" class="span11" type="text" name="ftpPassword" value="<?php echo $ftpPassword;?>" required></div>
|
||||
</div>
|
||||
<div class="control-group<?php if(isset($errors['active'])) echo ' error';?>">
|
||||
<label class="control-label" for="inputActive"><?php echo $dedicatedLanguage->active;?></label>
|
||||
<div class="controls">
|
||||
<select id="inputActive" class="span11" name="active">
|
||||
<option value="Y"><?php echo $gsprache->yes;?></option>
|
||||
<option value="N" <?php if ($active=='N') echo 'selected="selected";'?>><?php echo $gsprache->no;?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group<?php if(isset($errors['webMasterID'])) echo ' error';?>">
|
||||
<label class="control-label" for="inputWebMasterID"><?php echo $gsprache->master;?></label>
|
||||
<div class="controls">
|
||||
<select id="inputWebMasterID" name="webMasterID" class="span11" onchange="getdetails('ajax.php?d=webmaster&id=', this.value)">
|
||||
<?php foreach ($table2 as $k=>$v){ ?>
|
||||
<option value="<?php echo $k;?>" <?php if ($webMasterID==$k) echo 'selected="selected";'?>><?php echo $v;?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="information">
|
||||
<div class="control-group">
|
||||
<label class="control-label lead" for="displayUsage"><b><?php echo $sprache->usage;?></b></label>
|
||||
<div class="controls">
|
||||
<dl id="displayUsage">
|
||||
<dt><?php echo $sprache->maxVhost;?></dt>
|
||||
<dd><?php echo $totalVhosts.'/'.$maxVhost;?></dd>
|
||||
<dt><?php echo $sprache->maxHDD;?></dt>
|
||||
<dd><?php echo $leftHDD.'/'.$maxHDD;?> MB</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($quotaActive=='Y'){ ?>
|
||||
<div class="control-group<?php if(isset($errors['hdd'])) echo ' error';?>">
|
||||
<label class="control-label" for="inputHDD"><?php echo $sprache->hdd;?></label>
|
||||
<div class="controls">
|
||||
<div class="input-append span12">
|
||||
<input id="inputHDD" class="span11" type="number" name="hdd" value="<?php echo $hdd;?>">
|
||||
<span class="add-on">MB</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-success">
|
||||
|
||||
<form role="form" action="admin.php?w=wv&d=ad&r=wv" onsubmit="return confirm('<?php echo $gsprache->sure;?>');" method="post">
|
||||
|
||||
<input type="hidden" name="token" value="<?php echo token();?>">
|
||||
<input type="hidden" name="action" value="ad">
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputExternalID">External ID</label>
|
||||
<div class="controls"><input class="form-control" id="inputExternalID" type="text" name="externalID" value="<?php echo $externalID;?>"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['userID'])) echo ' has-error';?>">
|
||||
<label for="inputUser"><?php echo $dedicatedLanguage->user;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control chosen-select" id="inputUser" name="userID" required="required">
|
||||
<option></option>
|
||||
<?php foreach ($table as $k=>$v){ ?>
|
||||
<option value="<?php echo $k;?>" <?php if ($userID==$k) echo 'selected="selected";'?>><?php echo $v;?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['webMasterID'])) echo ' has-error';?>">
|
||||
<label for="webMasterID"><?php echo $gsprache->master;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control chosen-select" id="webMasterID" name="webMasterID">
|
||||
<?php foreach ($table2 as $k=>$v){ ?>
|
||||
<option value="<?php echo $k;?>" <?php if ($webMasterID==$k) echo 'selected="selected";'?>><?php echo $v;?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputFtpPassword"><?php echo $sprache->ftpPassword;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputFtpPassword" type="text" name="ftpPassword" value="<?php echo $ftpPassword;?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['active'])) echo ' has-error';?>">
|
||||
<label for="inputActive"><?php echo $dedicatedLanguage->active;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputActive" name="active">
|
||||
<option value="Y"><?php echo $gsprache->yes;?></option>
|
||||
<option value="N" <?php if($active=='N') echo 'selected="selected"';?>><?php echo $gsprache->no;?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php foreach(customColumns('W') as $row){ ?>
|
||||
<div class="form-group">
|
||||
<label for="inputCustom-<?php echo $row['customID'];?>"><?php echo $row['menu'];?></label>
|
||||
<div class="controls"><input class="form-control" id="inputCustom-<?php echo $row['customID'];?>" type="<?php echo $row['type']=='V' ? 'text' : 'number';?>" name="<?php echo $row['name'];?>" value="" maxlength="<?php echo $row['length'];?>"></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<div id="rootWrapper">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputDNS"><?php echo $sprache->dns;?></label>
|
||||
<div class="controls"><input id="inputDNS" class="span11" type="text" name="dns" value="<?php echo $dns;?>" required></div>
|
||||
</div>
|
||||
<div class="control-group<?php if(isset($errors['ownVhost'])) echo ' error';?>">
|
||||
<label class="control-label" for="inputOwnVhost"><?php echo $sprache->ownVhost;?></label>
|
||||
<div class="controls">
|
||||
<select id="inputOwnVhost" class="span11" name="ownVhost" onchange="textdrop('OwnVhostTemplate')">
|
||||
<option value="N"><?php echo $gsprache->no;?></option>
|
||||
<option value="Y" <?php if ($ownVhost=='Y') echo 'selected="selected";'?>><?php echo $gsprache->yes;?></option>
|
||||
</select>
|
||||
|
||||
<div class="box-footer">
|
||||
<button class="btn btn-success" id="inputEdit" type="submit"><i class="fa fa-plus-circle"> <?php echo $gsprache->add;?></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group<?php if($ownVhost=='N') echo ' display_none';?>" id="OwnVhostTemplate">
|
||||
<label class="control-label" for="inputvhostTemplate"><?php echo $sprache->vhostTemplate;?></label>
|
||||
<div class="controls">
|
||||
<textarea id="inputvhostTemplate" class="span11" name="vhostTemplate" rows="20"><?php echo $vhostTemplate;?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</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-plus-sign icon-white"></i> <?php echo $gsprache->add;?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#inputUser,#inputRoot").chosen({
|
||||
disable_search_threshold: 3,
|
||||
inherit_select_classes: true,
|
||||
no_results_text: '<?php echo $gsprache->chosenNoResult;?>',
|
||||
placeholder_text_single: '<?php echo $gsprache->chosenSelect;?>',
|
||||
placeholder_text_multiple: '<?php echo $gsprache->chosenSelect;?>',
|
||||
width: "100%"
|
||||
});
|
||||
|
||||
function loadRootDetails () {
|
||||
$.ajax({ url: 'ajax.php?d=webmaster&id=' + $("#webMasterID").val() + '&serverID=<?php echo $id;?>', cache: false } ).done(function(html) {
|
||||
$('#rootWrapper').html(html);
|
||||
});
|
||||
}
|
||||
|
||||
$('#inputRoot').on('change', function() {
|
||||
loadRootDetails();
|
||||
});
|
||||
|
||||
$(function(){
|
||||
loadRootDetails();
|
||||
});
|
||||
</script>
|
@ -1,34 +1,48 @@
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="admin.php">Home</a> <span class="divider">/</span></li>
|
||||
<li><a href="admin.php?w=wv"><?php echo $gsprache->webspace;?> Vhost</a> <span class="divider">/</span></li>
|
||||
<li><?php echo $gsprache->del;?> <span class="divider">/</span></li>
|
||||
<li class="active"><?php echo $dns;?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<dl class="dl-horizontal">
|
||||
<dt><?php echo $sprache->dns?></dt>
|
||||
<dd><?php echo $dns;?></dd>
|
||||
<dt><?php echo $dedicatedLanguage->user?></dt>
|
||||
<dd><?php echo $user;?></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<form class="form-horizontal" action="admin.php?w=wv&d=dl&id=<?php echo $id;?>&r=wv" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">
|
||||
<input type="hidden" name="token" value="<?php echo token();?>">
|
||||
<input type="hidden" name="action" value="dl">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputEdit"></label>
|
||||
<div class="controls">
|
||||
<button class="btn btn-danger pull-left" id="inputEdit" type="submit"><i class="fa fa-trash-o"></i> <?php echo $gsprache->del;?></button>
|
||||
</div>
|
||||
<section class="content-header">
|
||||
<h1><?php echo $gsprache->webspace;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="admin.php?w=wv"><i class="fa fa-cubes"></i> <?php echo $gsprache->webspace;?></a></li>
|
||||
<li><?php echo $gsprache->reinstall;?></li>
|
||||
<li class="active"><?php echo $dns;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-danger">
|
||||
|
||||
<form role="form" action="admin.php?w=wv&d=dl&id=<?php echo $id;?>&r=wv" onsubmit="return confirm('<?php echo $gsprache->sure;?>');" method="post">
|
||||
|
||||
<input type="hidden" name="token" value="<?php echo token();?>">
|
||||
<input type="hidden" name="action" value="dl">
|
||||
|
||||
<div class="box-body">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputDns"><?php echo $sprache->dns;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputDns" type="text" name="dns" value="<?php echo $dns;?>" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputUser"><?php echo $dedicatedLanguage->user;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputUser" type="text" name="user" value="<?php echo $user;?>" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<button class="btn btn-danger" id="inputDelete" type="submit"><i class="fa fa-trash-o"></i> <?php echo $gsprache->del;?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@ -1,60 +1,54 @@
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="admin.php">Home</a> <span class="divider">/</span></li>
|
||||
<li><a href="admin.php?w=wv"><?php echo $gsprache->webspace;?> Vhost</a> <span class="divider">/</span></li>
|
||||
<li class="active"><?php echo $gsprache->overview;?></li>
|
||||
</ul>
|
||||
<section class="content-header">
|
||||
<h1><?php echo $gsprache->webspace;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="admin.php?w=wv"><i class="fa fa-cubes"></i> <?php echo $gsprache->webspace;?></a></li>
|
||||
<li class="active"><?php echo $gsprache->overview;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo $gsprache->webspace;?> <a href="admin.php?w=wv&d=ad"><span class="btn btn-success btn-sm"><i class="fa fa-plus-circle"></i> <?php echo $gsprache->add;?></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<?php echo $gsprache->webspace;?> Vhost <a href="admin.php?w=wv&d=ad"><span class="btn btn-primary btn-mini"><i class="icon-white icon-plus-sign"></i> <?php echo $gsprache->add;?></span></a>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body table-responsive">
|
||||
<table id="dataTable" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $sprache->dns;?></th>
|
||||
<th>ID</th>
|
||||
<th><?php echo $gsprache->status;?></th>
|
||||
<th><?php echo $dedicatedLanguage->user;?></th>
|
||||
<th><?php echo $sprache->hddUsage;?></th>
|
||||
<th><?php echo $gsprache->jobs;?></th>
|
||||
<th><?php echo $gsprache->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th><?php echo $sprache->dns;?></th>
|
||||
<th>ID</th>
|
||||
<th><?php echo $gsprache->status;?></th>
|
||||
<th><?php echo $dedicatedLanguage->user;?></th>
|
||||
<th><?php echo $sprache->hddUsage;?></th>
|
||||
<th><?php echo $gsprache->jobs;?></th>
|
||||
<th><?php echo $gsprache->action;?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row-fluid">
|
||||
<div class="span11 pagination">
|
||||
<ul>
|
||||
<li><a href="admin.php?w=wv&o=<?php echo $o;?>&a=<?php echo $amount;?>&p=<?php echo $zur;?>"><i class="icon-step-backward"></i></a></li>
|
||||
<li><a href="admin.php?w=wv&o=<?php echo $o;?>&a=20&p=<?php echo $start; ?>">20</a></li>
|
||||
<li><a href="admin.php?w=wv&o=<?php echo $o;?>&a=50&p=<?php echo $start; ?>">50</a></li>
|
||||
<li><a href="admin.php?w=wv&o=<?php echo $o;?>&a=100&p=<?php echo $start; ?>">100</a></li>
|
||||
<li><a href="admin.php?w=wv&o=<?php echo $o;?>&a=<?php echo $amount;?>&p=<?php echo $vor;?>"><i class="icon-step-forward"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span11">
|
||||
<table class="table table-bordered table-hover table-striped footable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-class="expand"><a href="admin.php?w=wv&a=<?php echo $amount;?>&p=<?php echo $start;?>&o=<?php if ($o=='ad') { echo 'dd'; } else { echo 'ad'; } ?>"><?php echo $sprache->dns;?></a></th>
|
||||
<th data-hide="phone,tablet"><a href="admin.php?w=wv&a=<?php echo $amount;?>&p=<?php echo $start;?>&o=<?php if ($o=='ai') { echo 'di'; } else { echo 'ai'; } ?>">ID</a></th>
|
||||
<th data-hide="phone,tablet"><a href="admin.php?w=wv&a=<?php echo $amount;?>&p=<?php echo $start;?>&o=<?php if ($o=='as') { echo 'ds'; } else { echo 'as'; } ?>"><?php echo $gsprache->status;?></a></th>
|
||||
<th data-hide="phone,tablet"><a href="admin.php?w=wv&a=<?php echo $amount;?>&p=<?php echo $start;?>&o=<?php if ($o=='ac') { echo 'dc'; } else { echo 'ac'; } ?>"><?php echo $dedicatedLanguage->user;?></a></th>
|
||||
<th data-hide="phone,tablet"><?php echo $sprache->hddUsage;?></th>
|
||||
<th data-hide="phone,tablet"><?php echo $gsprache->jobPending;?></th>
|
||||
<th><?php echo $dedicatedLanguage->reinstall;?></th>
|
||||
<th><?php echo $gsprache->del;?></th>
|
||||
<th><?php echo $gsprache->mod;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($table as $table_row) { ?>
|
||||
<tr>
|
||||
<td><?php echo $table_row['dns'];?></td>
|
||||
<td><?php echo $table_row['id'];?></td>
|
||||
<td><i class="<?php if($table_row['active']=='Y') echo 'fa fa-check'; else echo 'fa fa-ban';?>"></i></td>
|
||||
<td><?php if(isid($table_row['userID'], 10)) { ?><a href="switch.php?id=<?php echo $table_row['userID'];?>"><?php echo $table_row['cname'];?></a><?php }?></td>
|
||||
<td><?php echo $table_row['hddUsage'];?> MB</td>
|
||||
<td><?php echo $table_row['jobPending'];?></td>
|
||||
<td><a href="admin.php?w=wv&d=ri&id=<?php echo $table_row['id'];?>" ><span class="btn btn-mini btn-warning"><i class="fa fa-refresh"></i></span></a></td>
|
||||
<td><a href="admin.php?w=wv&d=dl&id=<?php echo $table_row['id'];?>" ><span class="btn btn-mini btn-danger"><i class="fa fa-trash-o"></i></span></a></td>
|
||||
<td><a href="admin.php?w=wv&d=md&id=<?php echo $table_row['id'];?>" ><span class="btn btn-mini btn-primary"><i class="icon-white icon-edit"></i></span></a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@ -1,94 +1,129 @@
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="admin.php">Home</a> <span class="divider">/</span></li>
|
||||
<li><a href="admin.php?w=fv"><?php echo $gsprache->webspace;?> Vhost</a> <span class="divider">/</span></li>
|
||||
<li><?php echo $gsprache->mod;?> <span class="divider">/</span></li>
|
||||
<li class="active"><?php echo $dns;?></li>
|
||||
</ul>
|
||||
<section class="content-header">
|
||||
<h1><?php echo $gsprache->webspace;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="admin.php?w=wv"><i class="fa fa-cubes"></i> <?php echo $gsprache->webspace;?></a></li>
|
||||
<li><?php echo $gsprache->mod;?></li>
|
||||
<li class="active"><?php echo $dns;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
|
||||
<?php if (count($errors)>0){ ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><?php echo $gsprache->errors;?></h4>
|
||||
<?php echo implode(', ', $errors);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (count($errors)>0){ ?>
|
||||
<div class="alert alert-error">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><?php echo $gsprache->errors;?></h4>
|
||||
<?php echo implode(', ',$errors);?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div class="row-fluid">
|
||||
<div class="span11">
|
||||
<form class="form-horizontal" action="admin.php?w=wv&d=md&id=<?php echo $id;?>&r=wv" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">
|
||||
<input type="hidden" name="token" value="<?php echo token();?>">
|
||||
<input type="hidden" name="action" value="md">
|
||||
<div class="control-group">
|
||||
<label class="control-label lead" for="displayServerInfo"><b><?php echo $gsprache->webspace.' '.$gsprache->master;?></b></label>
|
||||
<div class="controls">
|
||||
<dl id="displayServerInfo">
|
||||
<dt><?php echo $sprache->maxHDD;?></dt>
|
||||
<dd><?php echo $leftHDD.'/'.$maxHDD;?> MB</dd>
|
||||
<dt><?php echo $sprache->ftpIP;?></dt>
|
||||
<dd><?php echo $ftpServer;?></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label lead" for="displayServerInfo"><b><?php echo $gsprache->webspace;?></b></label>
|
||||
<div class="controls">
|
||||
<dl id="displayVhostInfo">
|
||||
<dt><?php echo $sprache->hddUsage;?></dt>
|
||||
<dd><?php echo $hddUsage.'/'.$hdd;?> MB</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputFtpPassword"><?php echo $sprache->ftpPassword;?></label>
|
||||
<div class="controls"><input id="inputFtpPassword" class="span11" type="text" name="ftpPassword" value="<?php echo $ftpPassword;?>" required></div>
|
||||
</div>
|
||||
<div class="control-group<?php if(isset($errors['active'])) echo ' error';?>">
|
||||
<label class="control-label" for="inputActive"><?php echo $dedicatedLanguage->active;?></label>
|
||||
<div class="controls">
|
||||
<select id="inputActive" class="span11" name="active">
|
||||
<option value="Y"><?php echo $gsprache->yes;?></option>
|
||||
<option value="N" <?php if ($active=='N') echo 'selected="selected";'?>><?php echo $gsprache->no;?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($quotaActive=='Y'){ ?>
|
||||
<div class="control-group<?php if(isset($errors['hdd'])) echo ' error';?>">
|
||||
<label class="control-label" for="inputHDD"><?php echo $sprache->hdd;?></label>
|
||||
<div class="controls">
|
||||
<div class="input-append span11">
|
||||
<input id="inputHDD" class="span11" type="number" name="hdd" value="<?php echo $hdd;?>">
|
||||
<span class="add-on">MB</span>
|
||||
<?php }?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="box box-primary">
|
||||
|
||||
<form role="form" action="admin.php?w=wv&d=md&id=<?php echo $id;?>&r=wv" onsubmit="return confirm('<?php echo $gsprache->sure;?>');" 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="inputExternalID">External ID</label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputExternalID" type="text" name="externalID" value="<?php echo $externalID;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['userID'])) echo ' has-error';?>">
|
||||
<label for="inputUser"><?php echo $dedicatedLanguage->user;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control chosen-select" id="inputUser" name="userID" disabled="disabled">
|
||||
<option></option>
|
||||
<?php foreach ($table as $k=>$v){ ?>
|
||||
<option value="<?php echo $k;?>" <?php if ($userID==$k) echo 'selected="selected";'?>><?php echo $v;?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['webMasterID'])) echo ' has-error';?>">
|
||||
<label for="webMasterID"><?php echo $gsprache->master;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control chosen-select" id="webMasterID" name="webMasterID">
|
||||
<?php foreach ($table2 as $k=>$v){ ?>
|
||||
<option value="<?php echo $k;?>" <?php if ($webMasterID==$k) echo 'selected="selected";'?>><?php echo $v;?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputFtpPassword"><?php echo $sprache->ftpPassword;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputFtpPassword" type="text" name="ftpPassword" value="<?php echo $ftpPassword;?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['active'])) echo ' has-error';?>">
|
||||
<label for="inputActive"><?php echo $dedicatedLanguage->active;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputActive" name="active">
|
||||
<option value="Y"><?php echo $gsprache->yes;?></option>
|
||||
<option value="N" <?php if($active=='N') echo 'selected="selected"';?>><?php echo $gsprache->no;?></option>
|
||||
</select>
|
||||
</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>
|
||||
<div class="controls"><input class="form-control" id="inputCustom-<?php echo $row['customID'];?>" type="<?php echo $row['type']=='V' ? 'text' : 'number';?>" name="<?php echo $row['name'];?>" value="" maxlength="<?php echo $row['length'];?>"></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<div id="rootWrapper">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<button class="btn btn-primary" id="inputEdit" type="submit"><i class="fa fa-save"> <?php echo $gsprache->save;?></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputDNS"><?php echo $sprache->dns;?></label>
|
||||
<div class="controls"><input id="inputDNS" class="span11" type="text" name="dns" value="<?php echo $dns;?>" required></div>
|
||||
</div>
|
||||
<div class="control-group<?php if(isset($errors['ownVhost'])) echo ' error';?>">
|
||||
<label class="control-label" for="inputOwnVhost"><?php echo $sprache->ownVhost;?></label>
|
||||
<div class="controls">
|
||||
<select id="inputOwnVhost" class="span11" name="ownVhost" onchange="textdrop('OwnVhostTemplate')">
|
||||
<option value="N"><?php echo $gsprache->no;?></option>
|
||||
<option value="Y" <?php if ($ownVhost=='Y') echo 'selected="selected";'?>><?php echo $gsprache->yes;?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group<?php if($ownVhost=='N') echo ' display_none';?>" id="OwnVhostTemplate">
|
||||
<label class="control-label" for="inputvhostTemplate"><?php echo $sprache->vhostTemplate;?></label>
|
||||
<div class="controls">
|
||||
<textarea id="inputvhostTemplate" class="span11" name="vhostTemplate" rows="20"><?php echo $vhostTemplate;?></textarea>
|
||||
</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->mod;?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#inputUser,#inputRoot").chosen({
|
||||
disable_search_threshold: 3,
|
||||
inherit_select_classes: true,
|
||||
no_results_text: '<?php echo $gsprache->chosenNoResult;?>',
|
||||
placeholder_text_single: '<?php echo $gsprache->chosenSelect;?>',
|
||||
placeholder_text_multiple: '<?php echo $gsprache->chosenSelect;?>',
|
||||
width: "100%"
|
||||
});
|
||||
|
||||
function loadRootDetails () {
|
||||
$.ajax({ url: 'ajax.php?d=webmaster&id=' + $("#webMasterID").val() + '&serverID=<?php echo $id;?>', cache: false } ).done(function(html) {
|
||||
$('#rootWrapper').html(html);
|
||||
});
|
||||
}
|
||||
|
||||
$('#inputRoot').on('change', function() {
|
||||
loadRootDetails();
|
||||
});
|
||||
|
||||
$(function(){
|
||||
loadRootDetails();
|
||||
});
|
||||
</script>
|
@ -1,34 +1,46 @@
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="admin.php">Home</a> <span class="divider">/</span></li>
|
||||
<li><a href="admin.php?w=wv"><?php echo $gsprache->webspace;?> Vhost</a> <span class="divider">/</span></li>
|
||||
<li><?php echo $dedicatedLanguage->reinstall;?> <span class="divider">/</span></li>
|
||||
<li class="active"><?php echo $dns;?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<dl class="dl-horizontal">
|
||||
<dt><?php echo $sprache->dns?></dt>
|
||||
<dd><?php echo $dns;?></dd>
|
||||
<dt><?php echo $dedicatedLanguage->user?></dt>
|
||||
<dd><?php echo $user;?></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
<form class="form-horizontal" action="admin.php?w=wv&d=ri&id=<?php echo $id;?>&r=wv" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">
|
||||
<input type="hidden" name="token" value="<?php echo token();?>">
|
||||
<input type="hidden" name="action" value="ri">
|
||||
<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="fa fa-refresh"></i> <?php echo $dedicatedLanguage->reinstall;?></button>
|
||||
</div>
|
||||
<section class="content-header">
|
||||
<h1><?php echo $gsprache->webspace;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="admin.php?w=wv"><i class="fa fa-cubes"></i> <?php echo $gsprache->webspace;?></a></li>
|
||||
<li><?php echo $gsprache->reinstall;?></li>
|
||||
<li class="active"><?php echo $dns;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-warning">
|
||||
|
||||
<form role="form" action="admin.php?w=wv&d=ri&id=<?php echo $id;?>&r=wv" onsubmit="return confirm('<?php echo $gsprache->sure;?>');" method="post" >
|
||||
|
||||
<input type="hidden" name="token" value="<?php echo token();?>">
|
||||
<input type="hidden" name="action" value="ri">
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputDns"><?php echo $sprache->dns;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputDns" type="text" name="dns" value="<?php echo $dns;?>" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputUser"><?php echo $dedicatedLanguage->user;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputUser" type="text" name="user" value="<?php echo $user;?>" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<button class="btn btn-warning" id="inputReinstall" type="submit"><i class="fa fa-refresg"> <?php echo $gsprache->reinstall;?></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@ -1,42 +1,52 @@
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label lead" for="displayUsage"><b><?php echo $sprache->usage;?></b></label>
|
||||
<div class="form-group">
|
||||
<label for="inputMaxVhost"><?php echo $sprache->maxVhost;?></label>
|
||||
<div class="controls">
|
||||
<dl id="displayUsage">
|
||||
<dt><?php echo $sprache->maxVhost;?></dt>
|
||||
<dd><?php echo $totalVhosts.'/'.$maxVhost;?></dd>
|
||||
<dt><?php echo $sprache->maxHDD;?></dt>
|
||||
<dd><?php echo $leftHDD.'/'.$maxHDD;?> MB</dd>
|
||||
</dl>
|
||||
<input class="form-control" id="inputMaxVhost" type="text" name="maxVhost" value="<?php echo $totalVhosts.'/'.$maxVhost;?>" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
<?php if($quotaActive=='Y'){ ?>
|
||||
<div class="control-group<?php if(isset($errors['hdd'])) echo ' error';?>">
|
||||
<label class="control-label" for="inputHDD"><?php echo $sprache->hdd;?></label>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputMaxHDD"><?php echo $sprache->maxHDD;?></label>
|
||||
<div class="controls">
|
||||
<div class="input-append span12">
|
||||
<input id="inputHDD" class="span11" type="number" name="hdd" value="1000">
|
||||
<span class="add-on">MB</span>
|
||||
<input class="form-control" id="inputMaxHDD" type="text" name="maxHDD" value="<?php echo $leftHDD.'/'.$maxHDD;?>" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($quotaActive=='Y'){ ?>
|
||||
<div class="form-group<?php if(isset($errors['hdd'])) echo ' has-error';?>">
|
||||
<label for="inputHDD"><?php echo $sprache->hdd;?></label>
|
||||
<div class="controls">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="inputHDD" type="number" name="maxHDD" value="<?php echo $maxHDD;?>">
|
||||
<span class="input-group-addon">MB</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputDNS"><?php echo $sprache->dns;?></label>
|
||||
<div class="controls"><input id="inputDNS" class="span11" type="text" name="dns" value="<?php echo $dns;?>" required></div>
|
||||
</div>
|
||||
<div class="control-group<?php if(isset($errors['ownVhost'])) echo ' error';?>">
|
||||
<label class="control-label" for="inputOwnVhost"><?php echo $sprache->ownVhost;?></label>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputDNS"><?php echo $sprache->dns;?></label>
|
||||
<div class="controls">
|
||||
<select id="inputOwnVhost" class="span11" name="ownVhost" onchange="textdrop('OwnVhostTemplate')">
|
||||
<input class="form-control" id="inputDNS" type="text" name="dns" value="<?php echo $dns;?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['ownVhost'])) echo ' has-error';?>">
|
||||
<label for="inputOwnVhost"><?php echo $sprache->ownVhost;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputOwnVhost" name="ownVhost" onchange="SwitchShowHideRows(this.value,'switch',1);">
|
||||
<option value="N"><?php echo $gsprache->no;?></option>
|
||||
<option value="Y"><?php echo $gsprache->yes;?></option>
|
||||
<option value="Y" <?php if ($ownVhost=='Y') echo 'selected="selected";'?>><?php echo $gsprache->yes;?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" id="OwnVhostTemplate" style="display: none;">
|
||||
<label class="control-label" for="inputvhostTemplate"><?php echo $sprache->vhostTemplate;?></label>
|
||||
|
||||
<div class="Y switch form-group <?php if($ownVhost=='N') echo 'display_none';?>">
|
||||
<label for="inputvhostTemplate"><?php echo $sprache->vhostTemplate;?></label>
|
||||
<div class="controls">
|
||||
<textarea id="inputvhostTemplate" class="span11" name="vhostTemplate" rows="20"><?php echo $vhostTemplate;?></textarea>
|
||||
<textarea class="form-control" id="inputvhostTemplate" name="vhostTemplate" rows="20"><?php echo $vhostTemplate;?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
SwitchShowHideRows('init_ready');
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user