mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
https://github.com/easy-wi/developer/issues/212 https://github.com/easy-wi/developer/issues/30
This commit is contained in:
parent
a4a56df27c
commit
3f2eea6274
@ -132,6 +132,11 @@ if ($ui->smallletters('w', 9, 'get') == 'datatable') {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_appserver.php');
|
||||
|
||||
// App server
|
||||
} else if ($ui->smallletters('d', 4, 'get') == 'user' and isset($admin_id) and isset($reseller_id) and isset($resellerLockupID) and ($pa['user'] or $pa['user_users'] or $pa['userPassword'])) {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_user.php');
|
||||
|
||||
// Code wise it seems odd, but this way we can get plausible userIDs for following queries up front without having to repeat ourselves
|
||||
} else {
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
<help_sidebar>Die Status Informationen werden alle %n% Minuten aktualisiert.</help_sidebar>
|
||||
<hostsystem>Hostsystem</hostsystem>
|
||||
<hotline>Hotline</hotline>
|
||||
<inactive>Inaktiv</inactive>
|
||||
<import>Importieren</import>
|
||||
<imprint>Impressum</imprint>
|
||||
<jobs>Jobs</jobs>
|
||||
|
@ -36,6 +36,7 @@
|
||||
<groups>Grupper</groups>
|
||||
<hostsystem>Værtssystem</hostsystem>
|
||||
<hotline>Hotline</hotline>
|
||||
<inactive></inactive>
|
||||
<imprint>Impressum</imprint>
|
||||
<jobs>Job</jobs>
|
||||
<jobPending>Job afventer</jobPending>
|
||||
|
@ -57,6 +57,7 @@
|
||||
<help_sidebar>The status information are gathered every %n% minutes.</help_sidebar>
|
||||
<hostsystem>Hostsystem</hostsystem>
|
||||
<hotline>Hotline</hotline>
|
||||
<inactive>Inactive</inactive>
|
||||
<import>Import</import>
|
||||
<imprint>Imprint</imprint>
|
||||
<jobs>Jobs</jobs>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -37,7 +37,6 @@
|
||||
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
if (!defined('AJAXINCLUDED')) {
|
||||
die('Do not access directly!');
|
||||
}
|
||||
@ -97,14 +96,14 @@ if ($sSearch) {
|
||||
}
|
||||
|
||||
$query2 = $sql->prepare("SELECT `action`,`extraData` FROM `jobs` WHERE `affectedID`=? AND `resellerID`=? AND `type`='gs' AND (`status` IS NULL OR `status`=1) ORDER BY `jobID` DESC LIMIT 1");
|
||||
$query3 = $sql->prepare("UPDATE `gsswitch` SET `jobPending`='N' WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$tobeActive = false;
|
||||
$jobPending = $gsprache->no;
|
||||
$statusMessage = $gsprache->status_ok;
|
||||
|
||||
if (isset($row['jobPending']) and $row['jobPending'] == 'Y') {
|
||||
if ($row['jobPending'] == 'Y') {
|
||||
|
||||
$query2->execute(array($row['id'], $resellerLockupID));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
@ -118,7 +117,11 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
}
|
||||
|
||||
$json = @json_decode($row2['extraData']);
|
||||
$tobeActive = (is_object($json) and isset($json->newActive)) ? $json->newActive : 'N';
|
||||
$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));
|
||||
}
|
||||
}
|
||||
|
||||
|
188
web/stuff/ajax/datatable_user.php
Normal file
188
web/stuff/ajax/datatable_user.php
Normal file
@ -0,0 +1,188 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* File: datatable_user.php.
|
||||
* Author: Ulrich Block
|
||||
* Date: 10.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!');
|
||||
}
|
||||
|
||||
$sprache = getlanguagefile('user', $user_language, $reseller_id);
|
||||
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `userdata` WHERE (`resellerid`=0 OR `id`=`resellerid`)");
|
||||
$query->execute();
|
||||
} else {
|
||||
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `userdata` WHERE `id`=:id AND `resellerid`=:id");
|
||||
$query->execute(array(':id' => $resellerLockupID));
|
||||
}
|
||||
|
||||
$array['iTotalRecords'] = $query->fetchColumn();
|
||||
|
||||
if ($sSearch) {
|
||||
|
||||
$toLower = strtolower($sSearch);
|
||||
|
||||
$accountTypeQuery = array();
|
||||
|
||||
if (strpos(strtolower($sprache->accounttype_admin), $toLower) !== false) {
|
||||
$accountTypeQuery[] = 'OR `accounttype`=\'a\'';
|
||||
}
|
||||
|
||||
if (strpos(strtolower($sprache->accounttype_reseller), $toLower) !== false) {
|
||||
$accountTypeQuery[] = 'OR `accounttype`=\'r\'';
|
||||
}
|
||||
|
||||
if (strpos(strtolower($sprache->accounttype_user), $toLower) !== false) {
|
||||
$accountTypeQuery[] = 'OR `accounttype`=\'u\'';
|
||||
}
|
||||
|
||||
$accountTypeQuery = (count($accountTypeQuery) > 0) ? implode(' ', $accountTypeQuery) : '';
|
||||
|
||||
$activeQuery = array();
|
||||
|
||||
if (strpos(strtolower($gsprache->status_inactive), $toLower) !== false) {
|
||||
$activeQuery[] = 'OR `active`=\'N\'';
|
||||
}
|
||||
|
||||
if (strpos(strtolower($gsprache->status_ok), $toLower) !== false) {
|
||||
$activeQuery[] = 'OR `active`=\'Y\'';
|
||||
}
|
||||
|
||||
$activeQuery = (count($activeQuery) > 0) ? implode(' ', $activeQuery) : '';
|
||||
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `userdata` WHERE (`resellerid`=0 OR `id`=`resellerid`) AND (`cname` LIKE :search OR `id` LIKE :search OR CONCAT(`vname`,' ',`name`) LIKE :search {$accountTypeQuery} {$activeQuery})");
|
||||
$query->execute(array(':search' => '%' . $sSearch . '%'));
|
||||
} else {
|
||||
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `userdata` WHERE `id`=:id AND `resellerid`=:id AND (`cname` LIKE :search OR `id` LIKE :search OR CONCAT(`vname`,' ',`name`) LIKE :search {$accountTypeQuery} {$activeQuery})");
|
||||
$query->execute(array(':search' => '%' . $sSearch . '%', ':id' => $resellerLockupID));
|
||||
}
|
||||
|
||||
$array['iTotalDisplayRecords'] = $query->fetchColumn();
|
||||
|
||||
} else {
|
||||
$array['iTotalDisplayRecords'] = $array['iTotalRecords'];
|
||||
}
|
||||
|
||||
$orderFields = array(0 => '`cname`', 1 => '`id`', 2 => '`full_name`', 3 => '`active`', 4 => '`accounttype`');
|
||||
|
||||
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 = '`id` DESC';
|
||||
}
|
||||
|
||||
if ($sSearch) {
|
||||
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `cname`,`id`,CONCAT(`vname`,' ',`name`) AS `full_name`,`active`,`accounttype`,`jobPending`,`resellerid` FROM `userdata` WHERE (`resellerid`=0 OR `id`=`resellerid`) AND (`cname` LIKE :search OR `id` LIKE :search OR CONCAT(`vname`,' ',`name`) LIKE :search {$accountTypeQuery} {$activeQuery}) ORDER BY $orderBy LIMIT {$iDisplayStart},{$iDisplayLength}");
|
||||
$query->execute(array(':search' => '%' . $sSearch . '%'));
|
||||
} else {
|
||||
$query = $sql->prepare("SELECT `cname`,`id`,CONCAT(`vname`,' ',`name`) AS `full_name`,`active`,`accounttype`,`jobPending`,`resellerid` FROM `userdata` WHERE `id`!=:id AND `resellerid`=:id AND (`cname` LIKE :search OR `id` LIKE :search OR CONCAT(`vname`,' ',`name`) LIKE :search {$accountTypeQuery} {$activeQuery}) ORDER BY $orderBy LIMIT {$iDisplayStart},{$iDisplayLength}");
|
||||
$query->execute(array(':search' => '%' . $sSearch . '%', ':id' => $resellerLockupID));
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `cname`,`id`,CONCAT(`vname`,' ',`name`) AS `full_name`,`active`,`accounttype`,`jobPending`,`resellerid` FROM `userdata` WHERE (`resellerid`=0 OR `id`=`resellerid`) ORDER BY $orderBy LIMIT {$iDisplayStart},{$iDisplayLength}");
|
||||
$query->execute();
|
||||
} else {
|
||||
$query = $sql->prepare("SELECT `cname`,`id`,CONCAT(`vname`,' ',`name`) AS `full_name`,`active`,`accounttype`,`jobPending`,`resellerid` FROM `userdata` WHERE `id`!=:id AND `resellerid`=:id ORDER BY $orderBy LIMIT {$iDisplayStart},{$iDisplayLength}");
|
||||
$query->execute(array(':id' => $resellerLockupID));
|
||||
}
|
||||
}
|
||||
|
||||
$query2 = $sql->prepare("SELECT `action`,`extraData` FROM `jobs` WHERE `affectedID`=? AND `resellerID`=? AND `type`='us' AND (`status` IS NULL OR `status`=1) ORDER BY `jobID` DESC LIMIT 1");
|
||||
$query3 = $sql->prepare("UPDATE `userdata` SET `jobPending`='N' WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$jobPending = $gsprache->no;
|
||||
$statusMessage = $gsprache->status_ok;
|
||||
|
||||
if ($row['jobPending'] == 'Y') {
|
||||
|
||||
$query2->execute(array($row['id'], $row['resellerid']));
|
||||
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['active'] = (is_object($json) and isset($json->newActive)) ? $json->newActive : 'N';
|
||||
}
|
||||
|
||||
if ($query2->rowCount() == 0) {
|
||||
$query3->execute(array($row['id'], $row['resellerid']));
|
||||
}
|
||||
}
|
||||
|
||||
$statusMessage = ($row['active'] == 'N') ? $gsprache->status_inactive : $gsprache->status_ok;
|
||||
|
||||
if ($row['accounttype'] == 'a') {
|
||||
$accounttype = $sprache->accounttype_admin;
|
||||
} else if ($row['accounttype'] == 'r') {
|
||||
$accounttype = $sprache->accounttype_reseller;
|
||||
} else {
|
||||
$accounttype = $sprache->accounttype_user;
|
||||
}
|
||||
|
||||
$actionString = '';
|
||||
|
||||
if ($pa['userPassword'] and (($row['accounttype'] == 'a' and $pa['user']) or $row['accounttype'] != 'a')) {
|
||||
$actionString .= ' ' . returnButton($template_to_use, 'ajax_admin_buttons_pw.tpl', 'us', 'pw', $row['id'], $gsprache->password);
|
||||
}
|
||||
|
||||
if ($row['id'] != $admin_id and (($row['accounttype'] == 'a' and $pa['user']) or ($row['accounttype'] != 'a' and ($pa['user_users'] or $pa['user'])))) {
|
||||
$actionString .= ' ' . returnButton($template_to_use, 'ajax_admin_buttons_dl.tpl', 'us', 'dl', $row['id'], $gsprache->del);
|
||||
}
|
||||
if (($row['accounttype'] == 'a' and $pa['user']) or ($row['accounttype'] != 'a' and ($pa['user_users'] or $pa['user']))) {
|
||||
$actionString .= ' ' . returnButton($template_to_use, 'ajax_admin_buttons_md.tpl', 'us', 'md', $row['id'], $gsprache->mod);
|
||||
}
|
||||
|
||||
$array['aaData'][] = array(returnButton($template_to_use, 'ajax_admin_user_switch.tpl', $row['cname'], '', $row['id'], ''), $row['id'], $row['full_name'], returnButton($template_to_use, 'ajax_admin_show_status.tpl', '', '', ($row['active'] == 'N') ? 3 : 4, (string) $statusMessage), (string) $accounttype, (string) $jobPending, $actionString);
|
||||
}
|
@ -88,7 +88,8 @@ if ($ui->st('d', 'get') == 'pw') {
|
||||
if (!$ui->smallletters('action',2, 'post')) {
|
||||
$template_file = ($logusertype == 'user') ? 'userpanel_pass.tpl' : 'admin_user_own_pass.tpl';
|
||||
|
||||
} else if ($ui->smallletters('action',2, 'post') == 'md'){
|
||||
} else if ($ui->smallletters('action',2, 'post') == 'md') {
|
||||
|
||||
$errors = array();
|
||||
|
||||
if (!$ui->password('password', 255, 'post')) {
|
||||
|
@ -45,6 +45,7 @@ $query4 = $sql->prepare("SELECT e.`active`,e.`dbname`,AES_DECRYPT(e.`password`,?
|
||||
$query5 = $sql->prepare("DELETE FROM `mysql_external_dbs` WHERE `id`=? LIMIT 1");
|
||||
$query6 = $sql->prepare("UPDATE `jobs` SET `status`='3' WHERE `jobID`=? LIMIT 1");
|
||||
$query7 = $sql->prepare("UPDATE `jobs` SET `status`='1' WHERE (`status` IS NULL OR `status`='1') AND `type`='my' AND `hostID`=?");
|
||||
$query8 = $sql->prepare("UPDATE `jobs` SET `action`='dl' WHERE `hostID`=? AND `type`='my'");
|
||||
|
||||
$query->execute();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
@ -56,8 +57,7 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$remotesql = new ExternalSQL ($row2['ip'], $row2['port'], $row2['user'], $row2['decryptedpassword']);
|
||||
}
|
||||
|
||||
|
||||
if (isset($remotesql) and $remotesql->error == 'ok') {
|
||||
if (isset($remotesql) or $remotesql->error == 'ok') {
|
||||
|
||||
$query3->execute(array($row['hostID']));
|
||||
while ($row2 = $query3->fetch(PDO::FETCH_ASSOC)) {
|
||||
@ -111,7 +111,22 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$query6->execute(array($row2['jobID']));
|
||||
}
|
||||
|
||||
} else {
|
||||
} else if (isset($remotesql)) {
|
||||
|
||||
$query7->execute(array($row['hostID']));
|
||||
|
||||
} else {
|
||||
|
||||
$query8->execute(array($row['hostID']));
|
||||
|
||||
$query3->execute(array($row['hostID']));
|
||||
while ($row3 = $query3->fetch(PDO::FETCH_ASSOC)) {
|
||||
if ($row2['action'] == 'dl') {
|
||||
|
||||
$query5->execute(array($row2['affectedID']));
|
||||
|
||||
customColumns('M', $row2['affectedID'], 'del');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -87,7 +87,7 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$query2 = $sql->prepare("UPDATE `jobs` SET `status`='4' WHERE `jobID`=? LIMIT 1");
|
||||
$query2->execute(array($row['jobID']));
|
||||
|
||||
updateJobs($row['affectedID'], $row['resellerID'],$jobPending='Y');
|
||||
updateJobs($row['affectedID'], $row['resellerID'], 'Y');
|
||||
|
||||
$theOutput->printGraph($command);
|
||||
}
|
@ -55,13 +55,14 @@ if (!function_exists('removeUser')) {
|
||||
}
|
||||
}
|
||||
|
||||
$query = $sql->prepare("SELECT * FROM `jobs` j WHERE `status`='4' AND `type`='us' AND `action` IN ('dl','md') AND NOT EXISTS (SELECT 1 FROM `jobs` WHERE `userID`=j.`userID` AND (`status`=1 OR `status` IS NULL) AND `type`!='us' LIMIT 1)");
|
||||
$query = $sql->prepare("SELECT j.* FROM `jobs` AS j WHERE `status`='4' AND `type`='us' AND `action` IN ('dl','md') AND NOT EXISTS (SELECT 1 FROM `jobs` WHERE `userID`=j.`userID` AND (`status`=1 OR `status` IS NULL) AND `type`!='us' LIMIT 1)");
|
||||
$query->execute();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$ok = true;
|
||||
|
||||
if ($row['action'] == 'dl') {
|
||||
|
||||
$query2 = $sql->prepare("SELECT `accounttype`,`resellerid` FROM `userdata` WHERE `id`=? LIMIT 1");
|
||||
$query2->execute(array($row['affectedID']));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
@ -108,7 +109,6 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
'voice_masterserver' => 'resellerid',
|
||||
'translations' => 'resellerID',
|
||||
'voice_server_stats' => 'resellerid',
|
||||
'voice_stats_settings' => 'resellerid',
|
||||
'mysql_external_servers' => 'resellerid',
|
||||
'mysql_external_dbs' => 'resellerid',
|
||||
'usergroups' => 'resellerid',
|
||||
@ -117,6 +117,7 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
'voice_tsdns' => 'resellerid',
|
||||
'voice_dns' => 'resellerID'
|
||||
);
|
||||
|
||||
removeUser($row['affectedID'],$tables);
|
||||
|
||||
if ($row2['resellerid'] == $row['affectedID']) {
|
||||
@ -140,7 +141,7 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$query2 = $sql->prepare("DELETE FROM `userdata` WHERE `id`=? LIMIT 1");
|
||||
$query2->execute(array($row['affectedID']));
|
||||
|
||||
$command = $gsprache->del.' userID: ' . $row['affectedID'] . ' name:' . $row['name'];
|
||||
$command = $gsprache->del . ' userID: ' . $row['affectedID'] . ' name:' . $row['name'];
|
||||
|
||||
} else {
|
||||
|
||||
@ -177,7 +178,7 @@ $sql->exec("DELETE o.* FROM `userdata_substitutes_servers` o LEFT JOIN `userdata
|
||||
$sql->exec("DELETE s.* FROM `userdata_social_identities` s LEFT JOIN `userdata` u ON s.`userID`=u.`id` WHERE u.`id` IS NULL");
|
||||
$sql->exec("DELETE s.* FROM `userdata_social_identities_substitutes` s LEFT JOIN `userdata_substitutes` u ON s.`userID`=u.`sID` WHERE u.`sID` IS NULL");
|
||||
$sql->exec("DELETE g.* FROM `gsswitch` g LEFT JOIN `userdata` u ON g.`userid`=u.`id` WHERE u.`id` IS NULL");
|
||||
$sql->exec("DELETE FROM `gsswitch` WHERE NOT EXISTS (SELECT 1 FROM `serverlist` WHERE `switchID`=`gsswitch`.`id`)");
|
||||
#$sql->exec("DELETE FROM `gsswitch` WHERE NOT EXISTS (SELECT 1 FROM `serverlist` WHERE `switchID`=`gsswitch`.`id`)");
|
||||
$sql->exec("DELETE s.* FROM `serverlist` s LEFT JOIN `gsswitch` g ON s.`switchID`=g.`id` WHERE g.`id` IS NULL");
|
||||
$sql->exec("DELETE a.* FROM `addons_installed` a LEFT JOIN `serverlist` s ON a.`serverid`=s.`id` WHERE s.`id` IS NULL");
|
||||
$sql->exec("DELETE a.* FROM `addons_installed` a LEFT JOIN `userdata` u ON a.`userid`=u.`id` WHERE u.`id` IS NULL");
|
||||
|
@ -44,6 +44,8 @@ $query2 = $sql->prepare("SELECT `active`,`usedns`,`defaultdns`,`bitversion`,`def
|
||||
$query->execute();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
unset($queryport);
|
||||
|
||||
$query2->execute(array(':aeskey' => $aeskey,':id' => $row['hostID'], ':reseller_id' => $row['resellerID']));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
@ -82,15 +84,196 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($queryport)) {
|
||||
if (isset($queryip, $queryport)) {
|
||||
|
||||
$connection = new TS3($queryip, $queryport, 'serveradmin', $querypassword);
|
||||
$errorcode = $connection->errorcode;
|
||||
}
|
||||
|
||||
if (!isset($errorcode) or strpos($errorcode, 'error id=0') === false) {
|
||||
if (!isset($errorcode) or strpos($errorcode, 'error id=0') === false) {
|
||||
|
||||
$query2 = $sql->prepare("UPDATE `jobs` SET `status`='1' WHERE `status` IS NULL AND `type`='vo' AND `hostID`=?");
|
||||
$query2->execute(array($row['hostID']));
|
||||
$query2 = $sql->prepare("UPDATE `jobs` SET `status`='1' WHERE `status` IS NULL AND `type`='vo' AND `hostID`=?");
|
||||
$query2->execute(array($row['hostID']));
|
||||
|
||||
} else {
|
||||
|
||||
$query2 = $sql->prepare("SELECT * FROM `jobs` WHERE (`status` IS NULL OR `status`='1') AND `type`='vo' AND `hostID`=?");
|
||||
$query2->execute(array($row['hostID']));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$extraData = @json_decode($row2['extraData']);
|
||||
|
||||
$query3 = $sql->prepare("SELECT * FROM `voice_server` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query3->execute(array($row2['affectedID'], $row2['resellerID']));
|
||||
while ($row3 = $query3->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$active = $row3['active'];
|
||||
$localserverid = $row3['localserverid'];
|
||||
$backup = $row3['backup'];
|
||||
$lendserver = $row3['lendserver'];
|
||||
$ip = $row3['ip'];
|
||||
$port = $row3['port'];
|
||||
$slots = $row3['slots'];
|
||||
$initialpassword = $row3['initialpassword'];
|
||||
$password = $row3['password'];
|
||||
$forcebanner = $row3['forcebanner'];
|
||||
$forcebutton = $row3['forcebutton'];
|
||||
$forceservertag = $row3['forceservertag'];
|
||||
$forcewelcome = $row3['forcewelcome'];
|
||||
$maxtraffic = $row3['maxtraffic'];
|
||||
$filetraffic = $row3['filetraffic'];
|
||||
$max_download_total_bandwidth = $row3['max_download_total_bandwidth'];
|
||||
$max_upload_total_bandwidth = $row3['max_upload_total_bandwidth'];
|
||||
$dns = $row3['dns'];
|
||||
$masterserver = $row3['masterserver'];
|
||||
}
|
||||
|
||||
if ($row2['action'] == 'dl' and isset($localserverid) and isid($localserverid, 30)) {
|
||||
|
||||
$command = $gsprache->del . ' voiceserverID: ' . $row2['affectedID'] . ' name:'.$row2['name'];
|
||||
$connection->DelServer($localserverid);
|
||||
|
||||
$query3 = $sql->prepare("DELETE FROM `voice_server` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query3->execute(array($row2['affectedID'], $row['resellerID']));
|
||||
|
||||
customColumns('T', $row2['affectedID'], 'del');
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='3' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['jobID']));
|
||||
|
||||
if ($usedns == 'Y') {
|
||||
tsdns('dl', $queryip, $ssh2port, $ssh2user, $publickey, $keyname, $ssh2password, $mnotified, $serverdir, $bitversion, array($ip), array($port), array($dns), $row['resellerID']);
|
||||
}
|
||||
|
||||
tsbackup('delete', $ssh2user, $serverdir, $masterserver, $localserverid, '*');
|
||||
|
||||
$query3 = $sql->prepare("DELETE v.* FROM `voice_server_backup` v LEFT JOIN `userdata` u ON v.`uid`=u.`id` WHERE u.`id` IS NULL");
|
||||
$query3->execute();
|
||||
|
||||
} else if ($row2['action'] == 'ad' and isset($active)) {
|
||||
|
||||
if (isid($localserverid, 30)) {
|
||||
|
||||
$command = $gsprache->add.' voiceserverID: '.$row2['affectedID'].'; Skipping, virtual ID already exists in Easy-WI DB: '.$localserverid;
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='2' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['jobID']));
|
||||
|
||||
} else {
|
||||
|
||||
$virtualserver_id = $connection->AddServer($slots, $ip, $port, $initialpassword, $name, array('Y', $welcome), $max_download_total_bandwidth, $max_upload_total_bandwidth, array('Y', $hostbanner_url), $hostbanner_gfx_url, array('Y', $hostbutton_url), $hostbutton_gfx_url, $hostbutton_tooltip);
|
||||
|
||||
if (isid($virtualserver_id, 19)) {
|
||||
|
||||
$command = $gsprache->add.' voiceserverID: '.$row2['affectedID'].'; Name:'.$row2['name'];
|
||||
|
||||
if ($active == 'N') {
|
||||
$connection->StopServer($virtualserver_id);
|
||||
}
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `voice_server` SET `localserverid`=?,`jobPending`='N' WHERE `id`=? LIMIT 1");
|
||||
$query3->execute(array($virtualserver_id, $row2['affectedID']));
|
||||
|
||||
if ($usedns == 'Y') {
|
||||
$template_file = tsdns('md', $queryip, $ssh2port, $ssh2user, $publickey, $keyname, $ssh2password, $mnotified, $serverdir, $bitversion, array($ip), array($port), array($dns), $row['resellerID']);
|
||||
}
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='3' WHERE `affectedID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['affectedID']));
|
||||
|
||||
} else {
|
||||
|
||||
$command = $gsprache->add.' voiceserverID: '.$row2['affectedID'].'; Error: '.$virtualserver_id;
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='1' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['jobID']));
|
||||
}
|
||||
}
|
||||
|
||||
} else if ($row2['action'] == 'md' and isset($localserverid) and isid($localserverid, 30)) {
|
||||
|
||||
$command = $gsprache->mod . ' voiceserverID: ' . $row2['affectedID'] . ' name:' . $row2['name'];
|
||||
|
||||
$query3 = $sql->prepare("SELECT `active`,`slots`,`ip`,`port`,`dns` FROM `voice_server` WHERE `id`=? LIMIT 1");
|
||||
$query3->execute(array($row2['affectedID']));
|
||||
foreach ($query3->fetchAll(PDO::FETCH_ASSOC) as $row3) {
|
||||
|
||||
$oldip = $row3['ip'];
|
||||
$oldport = $row3['port'];
|
||||
$olddns = $row3['dns'];
|
||||
$connection->StartServer($localserverid);
|
||||
$serverdetails = $connection->ServerDetails($localserverid);
|
||||
$name = $serverdetails['virtualserver_name'];
|
||||
$welcome = $serverdetails['virtualserver_welcomemessage'];
|
||||
$hostbanner_url = $serverdetails['virtualserver_hostbanner_url'];
|
||||
$hostbanner_gfx_url = $serverdetails['virtualserver_hostbanner_gfx_url'];
|
||||
$hostbutton_tooltip = $serverdetails['virtualserver_hostbutton_tooltip'];
|
||||
$hostbutton_url = $serverdetails['virtualserver_hostbutton_url'];
|
||||
$hostbutton_gfx_url = $serverdetails['virtualserver_hostbutton_gfx_url'];
|
||||
|
||||
$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);
|
||||
|
||||
if ($forcebanner== 'Y') {
|
||||
$removelist[] = 'b_virtualserver_modify_hostbanner';
|
||||
$removelist[] = 'i_needed_modify_power_virtualserver_modify_hostbanner';
|
||||
} else if ($forcebanner== 'N') {
|
||||
$addlist[] = 'b_virtualserver_modify_hostbanner';
|
||||
$addlist[] = 'i_needed_modify_power_virtualserver_modify_hostbanner';
|
||||
}
|
||||
|
||||
if ($forcebutton == 'Y') {
|
||||
$removelist[] = 'b_virtualserver_modify_hostbutton';
|
||||
$removelist[] = 'i_needed_modify_power_virtualserver_modify_hostbutton';
|
||||
} else if ($forcebutton == 'N') {
|
||||
$addlist[] = 'b_virtualserver_modify_hostbutton';
|
||||
$addlist[] = 'i_needed_modify_power_virtualserver_modify_hostbutton';
|
||||
}
|
||||
|
||||
if ($forcewelcome == 'Y') {
|
||||
$removelist[] = 'b_virtualserver_modify_welcomemessage';
|
||||
$removelist[] = 'i_needed_modify_power_virtualserver_modify_welcomemessage';
|
||||
} else if ($forcewelcome == 'N') {
|
||||
$addlist[] = 'b_virtualserver_modify_welcomemessage';
|
||||
$addlist[] = 'i_needed_modify_power_virtualserver_modify_welcomemessage';
|
||||
}
|
||||
|
||||
if (isset($addlist)) {
|
||||
$connection->AdminPermissions($localserverid,'add', $addlist);
|
||||
}
|
||||
|
||||
if (isset($removelist)) {
|
||||
$connection->AdminPermissions($localserverid,'del', $removelist);
|
||||
}
|
||||
|
||||
if ($usedns == 'Y') {
|
||||
$template_file = tsdns('md', $queryip, $ssh2port, $ssh2user, $publickey, $keyname, $ssh2password, $mnotified, $serverdir, $bitversion, array($ip, $oldip), array($port, $oldport), array($dns, $olddns), $row2['resellerID']);
|
||||
}
|
||||
|
||||
if ($row3['active'] == 'N' or $extraData->newActive == 'N') {
|
||||
$connection->StopServer($localserverid);
|
||||
}
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='3' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['jobID']));
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `voice_server` SET `jobPending`='N' WHERE `id`=? LIMIT 1");
|
||||
$query3->execute(array($row2['affectedID']));
|
||||
}
|
||||
} else if (!isset($localserverid) or !isid($localserverid, 30)) {
|
||||
|
||||
$command = 'Error: can not find voiceserver';
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='2' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['jobID']));
|
||||
|
||||
} else {
|
||||
$command='Error: unknown command';
|
||||
}
|
||||
|
||||
$theOutput->printGraph($command);
|
||||
}
|
||||
|
||||
$connection->CloseConnection();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@ -98,178 +281,14 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$query2->execute(array($row['hostID']));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$extraData = @json_decode($row2['extraData']);
|
||||
$query3 = $sql->prepare("DELETE FROM `voice_server` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query3->execute(array($row2['affectedID'], $row['resellerID']));
|
||||
|
||||
$query3 = $sql->prepare("SELECT * FROM `voice_server` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query3->execute(array($row2['affectedID'], $row2['resellerID']));
|
||||
while ($row3 = $query3->fetch(PDO::FETCH_ASSOC)) {
|
||||
$query3 = $sql->prepare("DELETE v.* FROM `voice_server_backup` v LEFT JOIN `userdata` u ON v.`uid`=u.`id` WHERE u.`id` IS NULL");
|
||||
$query3->execute();
|
||||
|
||||
$active = $row3['active'];
|
||||
$localserverid = $row3['localserverid'];
|
||||
$backup = $row3['backup'];
|
||||
$lendserver = $row3['lendserver'];
|
||||
$ip = $row3['ip'];
|
||||
$port = $row3['port'];
|
||||
$slots = $row3['slots'];
|
||||
$initialpassword = $row3['initialpassword'];
|
||||
$password = $row3['password'];
|
||||
$forcebanner = $row3['forcebanner'];
|
||||
$forcebutton = $row3['forcebutton'];
|
||||
$forceservertag = $row3['forceservertag'];
|
||||
$forcewelcome = $row3['forcewelcome'];
|
||||
$maxtraffic = $row3['maxtraffic'];
|
||||
$filetraffic = $row3['filetraffic'];
|
||||
$max_download_total_bandwidth = $row3['max_download_total_bandwidth'];
|
||||
$max_upload_total_bandwidth = $row3['max_upload_total_bandwidth'];
|
||||
$dns = $row3['dns'];
|
||||
$masterserver = $row3['masterserver'];
|
||||
}
|
||||
|
||||
if ($row2['action'] == 'dl' and isset($localserverid) and isid($localserverid, 30)) {
|
||||
|
||||
$command = $gsprache->del . ' voiceserverID: ' . $row2['affectedID'] . ' name:'.$row2['name'];
|
||||
$connection->DelServer($localserverid);
|
||||
|
||||
$query3 = $sql->prepare("DELETE FROM `voice_server` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query3->execute(array($row2['affectedID'], $row['resellerID']));
|
||||
|
||||
customColumns('T', $row2['affectedID'], 'del');
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='3' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['jobID']));
|
||||
|
||||
if ($usedns == 'Y') {
|
||||
tsdns('dl', $queryip, $ssh2port, $ssh2user, $publickey, $keyname, $ssh2password, $mnotified, $serverdir, $bitversion, array($ip), array($port), array($dns), $row['resellerID']);
|
||||
}
|
||||
|
||||
tsbackup('delete', $ssh2user, $serverdir, $masterserver, $localserverid, '*');
|
||||
|
||||
$query3 = $sql->prepare("DELETE v.* FROM `voice_server_backup` v LEFT JOIN `userdata` u ON v.`uid`=u.`id` WHERE u.`id` IS NULL");
|
||||
$query3->execute();
|
||||
|
||||
} else if ($row2['action'] == 'ad' and isset($active)) {
|
||||
|
||||
if (isid($localserverid, 30)) {
|
||||
|
||||
$command = $gsprache->add.' voiceserverID: '.$row2['affectedID'].'; Skipping, virtual ID already exists in Easy-WI DB: '.$localserverid;
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='2' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['jobID']));
|
||||
|
||||
} else {
|
||||
|
||||
$virtualserver_id = $connection->AddServer($slots, $ip, $port, $initialpassword, $name, array('Y', $welcome), $max_download_total_bandwidth, $max_upload_total_bandwidth, array('Y', $hostbanner_url), $hostbanner_gfx_url, array('Y', $hostbutton_url), $hostbutton_gfx_url, $hostbutton_tooltip);
|
||||
|
||||
if (isid($virtualserver_id, 19)) {
|
||||
|
||||
$command = $gsprache->add.' voiceserverID: '.$row2['affectedID'].'; Name:'.$row2['name'];
|
||||
|
||||
if ($active == 'N') {
|
||||
$connection->StopServer($virtualserver_id);
|
||||
}
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `voice_server` SET `localserverid`=?,`jobPending`='N' WHERE `id`=? LIMIT 1");
|
||||
$query3->execute(array($virtualserver_id, $row2['affectedID']));
|
||||
|
||||
if ($usedns == 'Y') {
|
||||
$template_file = tsdns('md', $queryip, $ssh2port, $ssh2user, $publickey, $keyname, $ssh2password, $mnotified, $serverdir, $bitversion, array($ip), array($port), array($dns), $row['resellerID']);
|
||||
}
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='3' WHERE `affectedID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['affectedID']));
|
||||
|
||||
} else {
|
||||
|
||||
$command = $gsprache->add.' voiceserverID: '.$row2['affectedID'].'; Error: '.$virtualserver_id;
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='1' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['jobID']));
|
||||
}
|
||||
}
|
||||
|
||||
} else if ($row2['action'] == 'md' and isset($localserverid) and isid($localserverid, 30)) {
|
||||
|
||||
$command = $gsprache->mod . ' voiceserverID: ' . $row2['affectedID'] . ' name:' . $row2['name'];
|
||||
|
||||
$query3 = $sql->prepare("SELECT `active`,`slots`,`ip`,`port`,`dns` FROM `voice_server` WHERE `id`=? LIMIT 1");
|
||||
$query3->execute(array($row2['affectedID']));
|
||||
foreach ($query3->fetchAll(PDO::FETCH_ASSOC) as $row3) {
|
||||
|
||||
$oldip = $row3['ip'];
|
||||
$oldport = $row3['port'];
|
||||
$olddns = $row3['dns'];
|
||||
$connection->StartServer($localserverid);
|
||||
$serverdetails = $connection->ServerDetails($localserverid);
|
||||
$name = $serverdetails['virtualserver_name'];
|
||||
$welcome = $serverdetails['virtualserver_welcomemessage'];
|
||||
$hostbanner_url = $serverdetails['virtualserver_hostbanner_url'];
|
||||
$hostbanner_gfx_url = $serverdetails['virtualserver_hostbanner_gfx_url'];
|
||||
$hostbutton_tooltip = $serverdetails['virtualserver_hostbutton_tooltip'];
|
||||
$hostbutton_url = $serverdetails['virtualserver_hostbutton_url'];
|
||||
$hostbutton_gfx_url = $serverdetails['virtualserver_hostbutton_gfx_url'];
|
||||
|
||||
$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);
|
||||
|
||||
if ($forcebanner== 'Y') {
|
||||
$removelist[] = 'b_virtualserver_modify_hostbanner';
|
||||
$removelist[] = 'i_needed_modify_power_virtualserver_modify_hostbanner';
|
||||
} else if ($forcebanner== 'N') {
|
||||
$addlist[] = 'b_virtualserver_modify_hostbanner';
|
||||
$addlist[] = 'i_needed_modify_power_virtualserver_modify_hostbanner';
|
||||
}
|
||||
|
||||
if ($forcebutton == 'Y') {
|
||||
$removelist[] = 'b_virtualserver_modify_hostbutton';
|
||||
$removelist[] = 'i_needed_modify_power_virtualserver_modify_hostbutton';
|
||||
} else if ($forcebutton == 'N') {
|
||||
$addlist[] = 'b_virtualserver_modify_hostbutton';
|
||||
$addlist[] = 'i_needed_modify_power_virtualserver_modify_hostbutton';
|
||||
}
|
||||
|
||||
if ($forcewelcome == 'Y') {
|
||||
$removelist[] = 'b_virtualserver_modify_welcomemessage';
|
||||
$removelist[] = 'i_needed_modify_power_virtualserver_modify_welcomemessage';
|
||||
} else if ($forcewelcome == 'N') {
|
||||
$addlist[] = 'b_virtualserver_modify_welcomemessage';
|
||||
$addlist[] = 'i_needed_modify_power_virtualserver_modify_welcomemessage';
|
||||
}
|
||||
|
||||
if (isset($addlist)) {
|
||||
$connection->AdminPermissions($localserverid,'add', $addlist);
|
||||
}
|
||||
|
||||
if (isset($removelist)) {
|
||||
$connection->AdminPermissions($localserverid,'del', $removelist);
|
||||
}
|
||||
|
||||
if ($usedns == 'Y') {
|
||||
$template_file = tsdns('md', $queryip, $ssh2port, $ssh2user, $publickey, $keyname, $ssh2password, $mnotified, $serverdir, $bitversion, array($ip, $oldip), array($port, $oldport), array($dns, $olddns), $row2['resellerID']);
|
||||
}
|
||||
|
||||
if ($row3['active'] == 'N' or $extraData->newActive == 'N') {
|
||||
$connection->StopServer($localserverid);
|
||||
}
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='3' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['jobID']));
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `voice_server` SET `jobPending`='N' WHERE `id`=? LIMIT 1");
|
||||
$query3->execute(array($row2['affectedID']));
|
||||
}
|
||||
} else if (!isset($localserverid) or !isid($localserverid, 30)) {
|
||||
|
||||
$command = 'Error: can not find voiceserver';
|
||||
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='2' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['jobID']));
|
||||
|
||||
} else {
|
||||
$command='Error: unknown command';
|
||||
}
|
||||
|
||||
$theOutput->printGraph($command);
|
||||
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='3' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
|
||||
$query3->execute(array($row2['jobID']));
|
||||
}
|
||||
|
||||
$connection->CloseConnection();
|
||||
}
|
||||
}
|
@ -43,14 +43,19 @@ $query3 = $sql->prepare("DELETE FROM `webVhost` WHERE `webVhostID`=? LIMIT 1");
|
||||
$query4 = $sql->prepare("SELECT `active` FROM `webVhost` WHERE `webVhostID`=? LIMIT 1");
|
||||
$query5 = $sql->prepare("UPDATE `jobs` SET `status`='3' WHERE `jobID`=? LIMIT 1");
|
||||
$query6 = $sql->prepare("UPDATE `webVhost` SET `jobPending`='N' WHERE `webVhostID`=? LIMIT 1");
|
||||
$query7 = $sql->prepare("UPDATE `jobs` SET `status`='1' WHERE (`status` IS NULL OR `status`='1') IS NULL AND `type`='wv' AND `hostID`=?");
|
||||
$query7 = $sql->prepare("UPDATE `jobs` SET `status`='1' WHERE (`status` IS NULL OR `status`='1') AND `type`='wv' AND `hostID`=?");
|
||||
$query8 = $sql->prepare("UPDATE `jobs` SET `action`='dl' WHERE `hostID`=? AND `type`='wv'");
|
||||
|
||||
$query->execute();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$vhostObject = new HttpdManagement($row['hostID'], $row['resellerID']);
|
||||
|
||||
if ($vhostObject != false and $vhostObject->ssh2Connect() and $vhostObject->sftpConnect()) {
|
||||
if (($vhostObject != false and $vhostObject->ssh2Connect() and $vhostObject->sftpConnect()) or $vhostObject->masterNotfound) {
|
||||
|
||||
if ($vhostObject->masterNotfound) {
|
||||
$query8->execute(array($row['hostID']));
|
||||
}
|
||||
|
||||
$query2->execute(array($row['hostID']));
|
||||
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
|
||||
@ -59,7 +64,9 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
if ($row2['action'] == 'dl') {
|
||||
|
||||
$vhostObject->vhostDelete($row2['affectedID']);
|
||||
if (!$vhostObject->masterNotfound) {
|
||||
$vhostObject->vhostDelete($row2['affectedID']);
|
||||
}
|
||||
|
||||
$query3->execute(array($row2['affectedID']));
|
||||
|
||||
@ -91,6 +98,7 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$vhostObject->restartHttpdServer();
|
||||
|
||||
} else {
|
||||
$theOutput->printGraph('cannot connect to web host with ID: ' . $row['hostID']);
|
||||
$query7->execute(array($row['hostID']));
|
||||
}
|
||||
}
|
@ -53,7 +53,7 @@ class HttpdManagement {
|
||||
|
||||
// Data
|
||||
private $sql, $aeskey, $resellerID, $hostID, $ssh2Pass, $hostData = array(), $vhostData = false, $dataPrepared = false;
|
||||
public $ssh2Object = false, $sftpObject = false;
|
||||
public $ssh2Object = false, $sftpObject = false, $masterNotfound = false;
|
||||
|
||||
public function __destruct() {
|
||||
unset($this->sql, $this->aeskey, $this->hostID, $this->ssh2Object, $this->sftpObject);
|
||||
@ -129,8 +129,9 @@ class HttpdManagement {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
$this->masterNotfound = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function removeNotNeededSlashes ($value) {
|
||||
|
@ -55,6 +55,7 @@ class masterServer {
|
||||
|
||||
private $updateIDs = array();
|
||||
private $removeLogs = array();
|
||||
private $winCmds = array();
|
||||
private $imageserver, $resellerID, $webhost, $rootOK, $rootID, $rootNotifiedCount, $steamAccount, $steamPassword, $updates, $os, $aeskey, $shellScript, $uniqueHex, $masterserverDir;
|
||||
public $sship, $sshport, $sshuser, $sshpass, $publickey, $keyname;
|
||||
public $updateAmount = 0;
|
||||
@ -117,66 +118,117 @@ class masterServer {
|
||||
$this->webhost = $query->fetchColumn();
|
||||
}
|
||||
|
||||
private function checkIfImageServerIsInSameSubnet ($type, $imageString) {
|
||||
|
||||
// Get the imageserver if possible and use Easy-WI server as fallback
|
||||
$mainIp = explode('.', $this->sship);
|
||||
$mainSubnet = $mainIp[0] . '.' . $mainIp[1] . '.' . $mainIp[2];
|
||||
|
||||
if ($type == 'rsync') {
|
||||
$splitPaths = @preg_split('/\//', $imageString, -1, PREG_SPLIT_NO_EMPTY);
|
||||
$splitCredentialsAndServer = (isset($split1[1])) ? preg_split('/\:/', $splitPaths[1], -1, PREG_SPLIT_NO_EMPTY) : preg_split('/\:/', $splitPaths[0], -1, PREG_SPLIT_NO_EMPTY);
|
||||
} else {
|
||||
$splitPaths = @preg_split('/\//', $imageString, -1, PREG_SPLIT_NO_EMPTY);
|
||||
$splitCredentialsAndServer = (isset($split1[1])) ? preg_split('/\@/', $splitPaths[1], -1, PREG_SPLIT_NO_EMPTY) : preg_split('/\@/', $splitPaths[0], -1, PREG_SPLIT_NO_EMPTY);
|
||||
}
|
||||
|
||||
foreach ($splitCredentialsAndServer as $splitIp) {
|
||||
|
||||
if ($splitIp != $this->sship && isip($splitIp, 'all')) {
|
||||
|
||||
$ipParts = explode('.', $splitIp);
|
||||
$subnet = $ipParts[0] . '.' . $ipParts[1] . '.' . $ipParts[2];
|
||||
|
||||
if ($mainSubnet == $subnet) {
|
||||
return $imageString;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function getPreferdImageServer ($preferedServer, $allServer) {
|
||||
|
||||
if (count($preferedServer) > 0) {
|
||||
$allServer = $preferedServer;
|
||||
}
|
||||
|
||||
if (count($allServer) > 0) {
|
||||
$imageserverCount = count($allServer) - 1;
|
||||
$arrayEntry = rand(0, $imageserverCount);
|
||||
return $imageserverCount[$arrayEntry];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function getImageServer () {
|
||||
|
||||
global $sql;
|
||||
|
||||
// Get the imageserver if possible and use Easy-WI server as fallback
|
||||
$mainip = explode('.', $this->sship);
|
||||
$mainsubnet = $mainip[0] . '.' . $mainip[1] . '.' . $mainip[2];
|
||||
|
||||
$query = $sql->prepare("SELECT `imageserver` FROM `settings` WHERE `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($this->resellerID));
|
||||
|
||||
$splitImageservers = preg_split('/\r\n/', $query->fetchColumn(), -1, PREG_SPLIT_NO_EMPTY);
|
||||
$imageservers = array();
|
||||
$rsyncServers = array();
|
||||
$ftpServers = array();
|
||||
|
||||
foreach ($splitImageservers as $server) {
|
||||
|
||||
$split2 = array();
|
||||
|
||||
if (isurl($server)) {
|
||||
$imageservers[] = $server;
|
||||
$split1 = preg_split('/\//', $server, -1, PREG_SPLIT_NO_EMPTY);
|
||||
$split2 = (isset($split1[1])) ? preg_split('/\@/', $split1[1], -1, PREG_SPLIT_NO_EMPTY) : preg_split('/\@/', $split1[0], -1, PREG_SPLIT_NO_EMPTY);
|
||||
|
||||
$ftpServers[] = $server;
|
||||
} else if (isRsync($server)) {
|
||||
$imageservers[] = $server;
|
||||
$split1 = preg_split('/\//', $server, -1, PREG_SPLIT_NO_EMPTY);
|
||||
$split2 = (isset($split1[1])) ? preg_split('/\:/', $split1[1], -1, PREG_SPLIT_NO_EMPTY) : preg_split('/\:/', $split1[0], -1, PREG_SPLIT_NO_EMPTY);
|
||||
$rsyncServers[] = $server;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($split2 as $splitip) {
|
||||
$preferedServer = array();
|
||||
|
||||
if ($splitip == $this->sship) {
|
||||
$noSync = true;
|
||||
if ($this->os == 'L' and count($rsyncServers) > 0) {
|
||||
|
||||
} else if (isip($splitip,'all')) {
|
||||
$ipparts = explode('.', $splitip);
|
||||
$subnet = $ipparts[0] . '.' . $ipparts[1] . '.' . $ipparts[2];
|
||||
foreach ($rsyncServers as $server) {
|
||||
|
||||
if ($mainsubnet == $subnet) {
|
||||
$imageserver = $server;
|
||||
}
|
||||
$imageServer = $this->checkIfImageServerIsInSameSubnet('rsync', $server);
|
||||
|
||||
if ($imageServer) {
|
||||
$preferedServer[] = $imageServer;
|
||||
}
|
||||
}
|
||||
|
||||
$imageServer = $this->getPreferdImageServer($preferedServer, $rsyncServers);
|
||||
}
|
||||
|
||||
if (!isset($imageserver) and count($imageservers) > 0) {
|
||||
$imageserver_count = count($imageservers) - 1;
|
||||
$arrayentry = rand(0, $imageserver_count);
|
||||
$imageserver = $imageservers[$arrayentry];
|
||||
if (!isset($imageServer) and count($ftpServers) > 0) {
|
||||
foreach ($ftpServers as $server) {
|
||||
|
||||
$imageServer = $this->checkIfImageServerIsInSameSubnet('ftp', $server);
|
||||
|
||||
if ($imageServer) {
|
||||
$preferedServer[] = $imageServer;
|
||||
}
|
||||
}
|
||||
|
||||
$imageServer = $this->getPreferdImageServer($preferedServer, $ftpServers);
|
||||
}
|
||||
|
||||
if (!isset($imageserver)) {
|
||||
$imageserver = 'easywi';
|
||||
if (!isset($imageServer) or !$imageServer) {
|
||||
$imageServer = 'easywi';
|
||||
}
|
||||
|
||||
if (isset($noSync) or $this->updates == 2) {
|
||||
$imageserver = 'none';
|
||||
if ($this->updates == 2) {
|
||||
$imageServer = 'none';
|
||||
}
|
||||
|
||||
$this->imageserver = $imageserver;
|
||||
$this->imageserver = $imageServer;
|
||||
}
|
||||
|
||||
private function imageStringtoWinDeamon () {
|
||||
|
||||
if (isurl($this->imageserver)) {
|
||||
return ftpStringToData($this->imageserver);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getCommands () {
|
||||
@ -185,7 +237,7 @@ class masterServer {
|
||||
return $this->shellScript;
|
||||
}
|
||||
|
||||
return false;
|
||||
return implode('<br>', $this->winCmds);
|
||||
}
|
||||
|
||||
private function startShellScript () {
|
||||
@ -245,6 +297,13 @@ class masterServer {
|
||||
$this->shellScript .= '$SYNCCMD/masterserver/' . $shorten . ' > ' . $updateLog . "\n";
|
||||
$this->shellScript .= '${IONICE}nice -n +19 find ' . $this->masterserverDir . $shorten . '/ -type f -name "*.listing" -delete' . "\n";
|
||||
$this->shellScript .= 'fi' . "\n";
|
||||
} else {
|
||||
|
||||
$imageServer = $this->imageStringtoWinDeamon();
|
||||
|
||||
if (is_array($imageServer)) {
|
||||
$this->winCmds[] = 'master ' . $shorten . ' ftp:' . $imageServer['server'] . ':' . $imageServer['port'] . ':' . $imageServer['user'] . ':' . $imageServer['pwd'] . ':/Masterserver ' . $this->webhost . '/get_password.php?w=ms&shorten=' . $shorten;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -408,6 +467,38 @@ class masterServer {
|
||||
}
|
||||
}
|
||||
|
||||
private function windowsCollectData ($row) {
|
||||
|
||||
if ($row['supdates'] != 3 and $row['updates'] != 3) {
|
||||
|
||||
if (strlen($this->steamAccount) > 0) {
|
||||
|
||||
$connectData = $this->steamAccount;
|
||||
|
||||
if (strlen($this->steamPassword) > 0) {
|
||||
$connectData .= ':' . $this->steamPassword;
|
||||
}
|
||||
|
||||
} else if (strlen($row['steamAcc']) > 0) {
|
||||
|
||||
$connectData = $row['steamAcc'];
|
||||
|
||||
if (strlen($this->steamPassword) > 0) {
|
||||
$connectData .= ':' . $row['steamPwd'];
|
||||
}
|
||||
|
||||
} else {
|
||||
$connectData = 'anonymous';
|
||||
}
|
||||
|
||||
$callBackUrl = (strlen($this->webhost) > 0) ? $this->webhost . '/get_password.php?w=ms&shorten=' . $row['shorten'] : '';
|
||||
|
||||
$this->winCmds[] = 'master ' . $row['shorten'] . ' steam:' . $connectData . ':' . workAroundForValveChaos($row['appID'], $row['shorten'], false) . ' ' . $callBackUrl;
|
||||
}
|
||||
|
||||
$this->updateAmount++;
|
||||
}
|
||||
|
||||
private function addonSync ($serverTypeIDs) {
|
||||
|
||||
if (count($serverTypeIDs) > 0) {
|
||||
@ -432,6 +523,22 @@ class masterServer {
|
||||
$this->shellScript .= 'fi' . "\n";
|
||||
$this->shellScript .= 'find ' . $absoluteAddonPath . ' -type d -exec chmod 750 {} \;' . "\n";
|
||||
$this->shellScript .= 'find ' . $absoluteAddonPath . ' -type f -exec chmod 640 {} \;' . "\n";
|
||||
|
||||
} else {
|
||||
|
||||
$imageServer = $this->imageStringtoWinDeamon();
|
||||
|
||||
if ($row['type'] == 'tool') {
|
||||
$addonMasterFolder = 'MasterAddons';
|
||||
$addonCmd = 'masteraddon';
|
||||
} else {
|
||||
$addonMasterFolder = 'MasterMaps';
|
||||
$addonCmd = 'mastermaps';
|
||||
}
|
||||
|
||||
if (is_array($imageServer)) {
|
||||
$this->winCmds[] = $addonCmd . ' install ' . $imageServer['server'] . ' ' . $imageServer['port'] . ' ' . $imageServer['user'] . ' ' . $imageServer['pwd'] . ' /' . $addonMasterFolder . ' ' . $row['addon'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -474,6 +581,8 @@ class masterServer {
|
||||
|
||||
if ($this->os == 'L') {
|
||||
$this->linuxCollectData($row, $force, $returnSuccessInAnyCase);
|
||||
} else {
|
||||
$this->windowsCollectData($row, $force, $returnSuccessInAnyCase);
|
||||
}
|
||||
|
||||
// Set masterserver to updating
|
||||
@ -557,56 +666,95 @@ class masterServer {
|
||||
return $ssh2Pass;
|
||||
}
|
||||
|
||||
private function linuxSshConnectAndExecute ($updating, $getReturn, $ssh2Pass) {
|
||||
|
||||
$sftpObject = new Net_SFTP($this->sship, $this->sshport);
|
||||
|
||||
$loginReturn = $sftpObject->login($this->sshuser, $ssh2Pass);
|
||||
|
||||
if ($loginReturn) {
|
||||
|
||||
$sftpObject->put('/home/' . $this->sshuser . '/temp/master-' . $this->uniqueHex . '.sh', $this->shellScript);
|
||||
$sftpObject->chmod(0700, '/home/' . $this->sshuser . '/temp/master-' . $this->uniqueHex . '.sh');
|
||||
|
||||
// File has been created, now login with SSH2 and execute the script
|
||||
$sshObject = new Net_SSH2($this->sship, $this->sshport);
|
||||
|
||||
if ($sshObject->login($this->sshuser, $ssh2Pass)) {
|
||||
|
||||
if ($updating === true) {
|
||||
|
||||
$this->setUpdating();
|
||||
|
||||
$removeLogs = $this->removeUpdateLogs();
|
||||
|
||||
if ($removeLogs !== false) {
|
||||
$sftpObject->put('/home/' . $this->sshuser . '/temp/remove-update-logs-' . $this->uniqueHex . '.sh', $removeLogs);
|
||||
$sftpObject->chmod(0700, '/home/' . $this->sshuser . '/temp/remove-update-logs-' . $this->uniqueHex . '.sh');
|
||||
}
|
||||
}
|
||||
|
||||
if ($getReturn === false) {
|
||||
|
||||
$sshObject->exec('/home/' . $this->sshuser . '/temp/master-' . $this->uniqueHex . '.sh & ');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return $sshObject->exec('/home/' . $this->sshuser . '/temp/master-' . $this->uniqueHex . '.sh');
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function windowsSshConnectAndExecute ($updating, $getReturn, $ssh2Pass) {
|
||||
|
||||
$sshObject = new Net_SSH2($this->sship, $this->sshport);
|
||||
|
||||
if ($sshObject->login($this->sshuser, $ssh2Pass)) {
|
||||
|
||||
if ($updating === true) {
|
||||
$this->setUpdating();
|
||||
}
|
||||
|
||||
if ($getReturn === false) {
|
||||
|
||||
foreach ($this->winCmds as $command) {
|
||||
$sshObject->exec($command . "\r\n");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$return = '';
|
||||
|
||||
foreach ($this->winCmds as $command) {
|
||||
|
||||
$temp = $sshObject->exec($command . "\r\n");
|
||||
|
||||
if ($temp) {
|
||||
$return .= $temp;
|
||||
}
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function sshConnectAndExecute ($updating = true, $getReturn = false) {
|
||||
|
||||
$ssh2Pass = $this->getKeyAndOrPassword();
|
||||
|
||||
if ($this->os == 'L') {
|
||||
|
||||
$sftpObject = new Net_SFTP($this->sship, $this->sshport);
|
||||
|
||||
$loginReturn = $sftpObject->login($this->sshuser, $ssh2Pass);
|
||||
|
||||
if ($loginReturn) {
|
||||
|
||||
$sftpObject->put('/home/' . $this->sshuser . '/temp/master-' . $this->uniqueHex . '.sh', $this->shellScript);
|
||||
$sftpObject->chmod(0700, '/home/' . $this->sshuser . '/temp/master-' . $this->uniqueHex . '.sh');
|
||||
|
||||
// File has been created, now login with SSH2 and execute the script
|
||||
$sshObject = new Net_SSH2($this->sship, $this->sshport);
|
||||
|
||||
if ($sshObject->login($this->sshuser, $ssh2Pass)) {
|
||||
|
||||
if ($updating === true) {
|
||||
|
||||
$this->setUpdating();
|
||||
|
||||
$removeLogs = $this->removeUpdateLogs();
|
||||
|
||||
if ($removeLogs !== false) {
|
||||
$sftpObject->put('/home/' . $this->sshuser . '/temp/remove-update-logs-' . $this->uniqueHex . '.sh', $removeLogs);
|
||||
$sftpObject->chmod(0700, '/home/' . $this->sshuser . '/temp/remove-update-logs-' . $this->uniqueHex . '.sh');
|
||||
}
|
||||
}
|
||||
|
||||
if ($getReturn === false) {
|
||||
|
||||
$sshObject->exec('/home/' . $this->sshuser . '/temp/master-' . $this->uniqueHex . '.sh & ');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return $sshObject->exec('/home/' . $this->sshuser . '/temp/master-' . $this->uniqueHex . '.sh');
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
$return = ($this->os == 'L') ? $this->linuxSshConnectAndExecute($updating, $getReturn, $ssh2Pass) : $this->windowsSshConnectAndExecute($updating, $getReturn, $ssh2Pass);
|
||||
|
||||
if (!$return) {
|
||||
$this->handleFailedConnectAttemps();
|
||||
}
|
||||
|
||||
$this->handleFailedConnectAttemps();
|
||||
|
||||
return false;
|
||||
return $return;
|
||||
}
|
||||
|
||||
private function linuxCheckForUpdate ($shorten) {
|
||||
@ -651,12 +799,16 @@ class masterServer {
|
||||
$this->shellScript .= 'if [ -d "' . $this->masterserverDir . $shorten . '" ]; then rm -rf "' . $this->masterserverDir . $shorten . '"; fi' . "\n";
|
||||
}
|
||||
|
||||
private function WindowsMasterRemove ($shorten) {
|
||||
$this->winCmds[] = 'delmaster ' . $shorten;
|
||||
}
|
||||
|
||||
public function masterRemove ($shorten) {
|
||||
|
||||
if ($this->os == 'L') {
|
||||
$this->linuxMasterRemove($shorten);
|
||||
} else {
|
||||
|
||||
$this->WindowsMasterRemove($shorten);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -899,7 +899,7 @@ if (!function_exists('passwordgenerate')) {
|
||||
return (array_key_exists($key, $array) and $array[$key] == $value) ? true : false;
|
||||
}
|
||||
|
||||
function updateJobs($localID, $resellerID, $jobPending='Y') {
|
||||
function updateJobs($localID, $resellerID, $jobPending = 'Y') {
|
||||
|
||||
global $sql;
|
||||
|
||||
@ -945,6 +945,35 @@ if (!function_exists('passwordgenerate')) {
|
||||
}
|
||||
}
|
||||
|
||||
function CopyAdminTable ($tablename, $id, $reseller_id, $limit, $where='') {
|
||||
|
||||
global $sql;
|
||||
|
||||
$query = $sql->prepare("SELECT * FROM `$tablename` WHERE `resellerid`=? " . $where . " " .$limit);
|
||||
$query->execute(array($reseller_id));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$keys = array();
|
||||
$questionmarks = array();
|
||||
$intos = array();
|
||||
|
||||
foreach ($row as $key=>$value) {
|
||||
if ($key != 'id' and $key != 'resellerid'){
|
||||
$keys[]="`".$key."`";
|
||||
$questionmarks[] = '?';
|
||||
$intos[] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$keys[] = "`resellerid`";
|
||||
$intos[] = $id;
|
||||
$questionmarks[] = '?';
|
||||
$into = 'INSERT INTO `' . $tablename . '` (' . implode(',', $keys) . ') VALUES (' . implode(',', $questionmarks) . ')';
|
||||
$query2 = $sql->prepare("$into");
|
||||
$query2->execute($intos);
|
||||
}
|
||||
}
|
||||
|
||||
function dataExist ($value, $array) {
|
||||
return (isset($array[$value]) and isset($array[$array[$value]]) and !in_array($array[$array[$value]], array(false, null,''))) ? true : false;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@
|
||||
<?php foreach(customColumns('G') 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 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="<?php echo $row['value'];?>" maxlength="<?php echo $row['length'];?>"></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
|
@ -306,7 +306,7 @@
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<?php if($pa['user'] or $pa['user_users']) { ?>
|
||||
<li <?php if($ui->smallletters('w',255,'get')=='us') echo 'class="active"';?>><a href="admin.php?w=us&d=md"><i class="fa fa-columns"></i> <?php echo $gsprache->user.' '.$gsprache->overview;?></a></li>
|
||||
<li <?php if($ui->smallletters('w',255,'get')=='us') echo 'class="active"';?>><a href="admin.php?w=us"><i class="fa fa-columns"></i> <?php echo $gsprache->user.' '.$gsprache->overview;?></a></li>
|
||||
<?php } ?>
|
||||
<?php if($pa['userGroups']) { ?>
|
||||
<li <?php if($ui->smallletters('w',255,'get')=='ug') echo 'class="active"';?>><a href="admin.php?w=ug"><i class="fa fa-group"></i> <?php echo $gsprache->groups;?></a></li>
|
||||
|
@ -2,6 +2,7 @@
|
||||
<h1>Social Auth Provider</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><i class="fa fa-user"></i> <?php echo $gsprache->user;?></li>
|
||||
<li><i class="fa fa-cloud"></i> Social Auth Provider</li>
|
||||
<li class="active"><?php echo $gsprache->add;?></li>
|
||||
</ol>
|
||||
|
@ -2,6 +2,7 @@
|
||||
<h1>Social Auth Provider</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><i class="fa fa-user"></i> <?php echo $gsprache->user;?></li>
|
||||
<li><i class="fa fa-cloud"></i> Social Auth Provider</li>
|
||||
<li class="active"><?php echo $gsprache->del;?></li>
|
||||
</ol>
|
||||
|
@ -2,6 +2,7 @@
|
||||
<h1>Social Auth Provider</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><i class="fa fa-user"></i> <?php echo $gsprache->user;?></li>
|
||||
<li><i class="fa fa-cloud"></i> Social Auth Provider</li>
|
||||
<li class="active"><?php echo $gsprache->overview;?></li>
|
||||
</ol>
|
||||
@ -24,7 +25,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Service Provider</th>
|
||||
<th><?php echo $gsprache->status;?></th>
|
||||
<th><?php echo $gsprache->active;?></th>
|
||||
<th><?php echo $gsprache->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -32,7 +33,7 @@
|
||||
<?php foreach ($table as $table_row) { ?>
|
||||
<tr>
|
||||
<td><?php echo $table_row['name'];?></a></td>
|
||||
<td><i class="fa <?php if($table_row['active']=='Y') echo 'fa-check-circle-o'; else echo 'fa-ban';?>"></i></td>
|
||||
<td><?php echo ($table_row['active']=='Y') ? $gsprache->yes : $gsprache->no;?></td>
|
||||
<td>
|
||||
<a href="admin.php?w=up&d=dl&id=<?php echo $table_row['id'];?>"><span class="btn btn-danger btn-sm"><i class="fa fa-trash"></i> <?php echo $gsprache->del;?></span></a>
|
||||
<a href="admin.php?w=up&d=md&id=<?php echo $table_row['id'];?>"><span class="btn btn-primary btn-sm"><i class="fa fa-pencil-square-o"></i> <?php echo $gsprache->mod;?></span></a>
|
||||
@ -43,7 +44,7 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Service Provider</th>
|
||||
<th><?php echo $gsprache->status;?></th>
|
||||
<th><?php echo $gsprache->active;?></th>
|
||||
<th><?php echo $gsprache->action;?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
@ -2,6 +2,7 @@
|
||||
<h1>Social Auth Provider</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><i class="fa fa-user"></i> <?php echo $gsprache->user;?></li>
|
||||
<li><i class="fa fa-cloud"></i> Social Auth Provider</li>
|
||||
<li class="active"><?php echo $gsprache->mod;?></li>
|
||||
</ol>
|
||||
|
392
web/template/adminlte/admin/admin_user_add.tpl
Normal file
392
web/template/adminlte/admin/admin_user_add.tpl
Normal file
@ -0,0 +1,392 @@
|
||||
<section class="content-header">
|
||||
<h1><?php echo $gsprache->user;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="admin.php?w=us"><i class="fa fa-user"></i> <?php echo $gsprache->user;?></a></li>
|
||||
<li class="active"><?php echo $gsprache->add;?></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>
|
||||
<?php }?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-success">
|
||||
|
||||
<form role="form" action="admin.php?w=us&d=ad&r=us" 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">externalID</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['active'])) echo ' error';?>">
|
||||
<label for="inputActive"><?php echo $sprache->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>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputSalutation"><?php echo $sprache->salutation;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputSalutation" name="salutation">
|
||||
<option value="1"><?php echo $sprache->salutation2;?></option>
|
||||
<option value="2" <?php if ($salutation==2) echo 'selected="selected"';?>><?php echo $sprache->salutation3;?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputCountry"><?php echo $sprache->country;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputCountry" name="flagmenu">
|
||||
<?php foreach ($selectlanguages as $la) { ?>
|
||||
<option value="<?php echo $la;?>" <?php if ($la==$country) echo 'selected="selected"'; ?>><?php echo $la;?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputFname"><?php echo $sprache->fname;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputFname" type="text" name="name" value="<?php echo $name;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputVname"><?php echo $sprache->vname;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputVname" type="text" name="vname" value="<?php echo $vname;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['mail'])) echo ' error';?>">
|
||||
<label for="inputBirthday"><?php echo $sprache->birthday;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputBirthday" type="text" name="birthday" value="<?php echo $birthday;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputMail"><?php echo $sprache->email;?>*</label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMail" type="email" name="mail" value="<?php echo $mail;?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputTel"><?php echo $sprache->tel;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputTel" type="tel" name="phone" value="<?php echo $phone;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputFax">Fax</label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputFax" type="tel" name="fax" value="<?php echo $fax;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputHandy"><?php echo $sprache->han;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputHandy" type="tel" name="handy" value="<?php echo $handy;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputCity"><?php echo $sprache->stadt;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputCity" type="text" name="city" value="<?php echo $city;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputCityn"><?php echo $sprache->plz;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputCityn" type="text" name="cityn" value="<?php echo $cityn;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputStreet"><?php echo $sprache->str;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputStreet" type="text" name="street" value="<?php echo $street;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputHnum"><?php echo $sprache->hnum;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputHnum" type="text" name="streetn" value="<?php echo $streetn;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['password'])) echo ' error';?>">
|
||||
<label for="inputPassword"><?php echo $sprache->wipsw;?>*</label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputPassword" type="text" name="password" value="<?php echo $password;?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['accounttype'])) echo ' error';?>">
|
||||
<label for="inputAccounttype"><?php echo $sprache->accounttype;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputAccounttype" name="accounttype" onchange="SwitchShowHideRows(this.value)">
|
||||
<option value="u"><?php echo $sprache->accounttype_user;?></option>
|
||||
<?php if($reseller_id==0 and $pa['user']) { ?><option value="a"><?php echo $sprache->accounttype_admin;?></option><?php }?>
|
||||
<?php if($reseller_id==0 or $admin_id==$reseller_id) { ?><option value="r"><?php echo $sprache->accounttype_reseller;?></option><?php }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="u switch form-group">
|
||||
<label for="inputGroupsU"><?php echo $gsprache->groups;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputGroupsU" multiple="multiple" name="groups_u[]">
|
||||
<?php foreach ($groups['u'] as $gid => $group){ ?><option value="<?php echo $gid;?>" <?php if(isset($defaultGroups['u'][$gid])) echo 'selected="selected"';?>><?php echo $group;?></option><?php }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($reseller_id==0 or $admin_id==$reseller_id) { ?>
|
||||
<div class="r display_none switch form-group">
|
||||
<label for="inputGroupsR"><?php echo $gsprache->groups;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputGroupsR" multiple="multiple" name="groups_r[]">
|
||||
<?php foreach ($groups['r'] as $gid => $group){ ?><option value="<?php echo $gid;?>" <?php if(isset($defaultGroups['r'][$gid])) echo 'selected="selected"';?>><?php echo $group;?></option><?php }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if($reseller_id==0 and $pa['user']) { ?>
|
||||
<div class="a display_none switch form-group">
|
||||
<label for="inputGroupsA"><?php echo $gsprache->groups;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputGroupsA" multiple="multiple" name="groups_a[]">
|
||||
<?php foreach ($groups['a'] as $gid => $group){ ?><option value="<?php echo $gid;?>" <?php if(isset($defaultGroups['a'][$gid])) echo 'selected="selected"';?>><?php echo $group;?></option><?php }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<div class="u switch form-group">
|
||||
<label for="inputFastDl"><?php echo $sprache->fastdl2;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMailTicket" type="url" name="fdlpath" value="<?php echo $fdlpath;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($rSA['prefix1']=='N') { ?>
|
||||
<div class="u switch form-group<?php if(isset($errors['cname'])) echo ' error';?>">
|
||||
<label for="inputUCname"><?php echo $sprache->nickname;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputUCname" type="text" name="cname" value="<?php echo $cname;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="r display_none switch form-group<?php if(isset($errors['cname'])) echo ' error';?>">
|
||||
<label for="inputRCname"><?php echo $sprache->nickname;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputRCname" type="text" name="rcname" value="<?php echo $cname;?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="a display_none switch form-grou<?php if(isset($errors['cname'])) echo ' error';?>p">
|
||||
<label for="inputACname"><?php echo $sprache->nickname;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputACname" type="text" name="acname" value="<?php echo $cname;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputMailBackup">
|
||||
<input id="inputMailBackup" type="checkbox" name="mail_backup" value="Y" <?php if ($mail_backup=='Y') echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_backup;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputMailServerDown">
|
||||
<input id="inputMailServerDown" type="checkbox" name="mail_serverdown" value="Y" <?php if ($mail_serverdown=='Y') echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_serverdown;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputMailTicket">
|
||||
<input id="inputMailTicket" type="checkbox" name="mail_ticket" value="Y" <?php if ($mail_ticket=='Y') echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_ticket;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="a display_none switch form-group">
|
||||
<label for="inputAMailUpdate">
|
||||
<input id="inputAMailUpdate" type="checkbox" name="mail_gsupdate" value="Y" <?php if ($mail_gsupdate=='Y') echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_gsupdate;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="a display_none switch form-group">
|
||||
<label for="inputAMailSecurity">
|
||||
<input id="inputAMailSecurity" type="checkbox" name="mail_securitybreach" value="Y" <?php if ($mail_securitybreach=='Y') echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_securitybreach;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="a display_none switch form-group">
|
||||
<label for="inputAMailVserver">
|
||||
<input id="inputAMailVserver" type="checkbox" name="mail_vserver" value="Y" <?php if ($mail_vserver=='Y') echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_vserver;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="r display_none switch form-group">
|
||||
<label for="inputRMailUpdate">
|
||||
<input id="inputRMailUpdate" type="checkbox" name="rmail_gsupdate" value="Y" <?php if ($mail_gsupdate=='Y') echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_gsupdate;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="r display_none switch form-group">
|
||||
<label for="inputRMailSecurity">
|
||||
<input id="inputRMailSecurity" type="checkbox" name="rmail_securitybreach" value="Y" <?php if ($mail_securitybreach=='Y') echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_securitybreach;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="r display_none switch form-group">
|
||||
<label for="inputRMailVserver">
|
||||
<input id="inputRMailVserver" type="checkbox" name="rmail_vserver" value="Y" <?php if ($mail_vserver=='Y') echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_vserver;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="r display_none switch form-group">
|
||||
<label for="inputMaxUser"><?php echo $sprache->max.' '.$gsprache->user;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxUser" type="number" name="maxuser" value="<?php echo $maxuser;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($easywiModules['gs']) { ?>
|
||||
<div class="r display_none switch form-group">
|
||||
<label for="inputMaxGserver"><?php echo $sprache->max.' '.$gsprache->gameserver;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxGserver" type="number" name="maxgserver" value="<?php echo $maxgserver;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php }; if($easywiModules['vo']) { ?>
|
||||
<div class="r display_none switch form-group">
|
||||
<label for="inputMaxVoserver"><?php echo $sprache->max.' '.$gsprache->voiceserver;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxVoserver" type="number" name="maxvoserver" value="<?php echo $maxvoserver;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php }; if($easywiModules['ro']) { ?>
|
||||
<div class="r display_none switch form-group">
|
||||
<label for="inputMaxDedis"><?php echo $sprache->max.' '.$gsprache->dedicated;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxDedis" type="number" name="maxdedis" value="<?php echo $maxdedis;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="r display_none switch form-group">
|
||||
<label for="inputMaxVirtual"><?php echo $sprache->max.' '.$gsprache->virtual;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxVirtual" type="number" name="maxvserver" value="<?php echo $maxvserver;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="r display_none switch form-group">
|
||||
<label for="inputMaxUserMHZ"><?php echo $sprache->max.' '.$rsprache->mhz;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxUserMHZ" type="number" name="maxusermhz" value="<?php echo $maxusermhz;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="r display_none switch form-group">
|
||||
<label for="inputMaxUserRam"><?php echo $sprache->max.' '.$rsprache->ram;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxUserRam" type="number" name="maxuserram" value="<?php echo $maxuserram;?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="r display_none switch form-group">
|
||||
<label for="inputResellerUserActive"><?php echo $gsprache->reseller.' '.$gsprache->user.' '.$sprache->active;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputResellerUserActive" name="useractive">
|
||||
<option value="Y"><?php echo $gsprache->yes;?></option>
|
||||
<option value="N" <?php if ($useractive=='N') echo 'selected="selected"'; ?>><?php echo $gsprache->no;?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php foreach(customColumns('U') 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>
|
||||
|
||||
<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>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.onDomReady = initReady;
|
||||
|
||||
function initReady(fn) {
|
||||
if(document.addEventListener) {
|
||||
document.addEventListener("DOMContentLoaded", fn, false);
|
||||
} else {
|
||||
document.onreadystatechange = function() {
|
||||
readyState(fn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function readyState(func) {
|
||||
if(document.readyState == "interactive" || document.readyState == "complete") {
|
||||
func();
|
||||
}
|
||||
}
|
||||
|
||||
window.onDomReady(onReady); function onReady() {
|
||||
SwitchShowHideRows('init_ready');
|
||||
}
|
||||
</script>
|
45
web/template/adminlte/admin/admin_user_dl.tpl
Normal file
45
web/template/adminlte/admin/admin_user_dl.tpl
Normal file
@ -0,0 +1,45 @@
|
||||
<section class="content-header">
|
||||
<h1><?php echo $gsprache->user;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="admin.php?w=us"><i class="fa fa-user"></i> <?php echo $gsprache->user;?></a></li>
|
||||
<li><?php echo $gsprache->del;?></li>
|
||||
<li class="active"><?php echo $cname;?></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=us&d=dl&id=<?php echo $id;?>&r=us" 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="form-group">
|
||||
<label for="inputNickname"><?php echo $sprache->nickname;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputNickname" type="text" name="nickname" value="<?php echo $cname;?>" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputName"><?php echo $sprache->user;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputName" type="text" name="nickname" value="<?php echo $fullName;?>" disabled="disabled">
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@ -2,8 +2,8 @@
|
||||
<h1><?php echo $gsprache->groups;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><i class="fa fa-user"></i> <?php echo $gsprache->user;?></li>
|
||||
<li><i class="fa fa-group"></i> <?php echo $gsprache->groups;?></li>
|
||||
<li><a href="admin.php?w=us"><i class="fa fa-user"></i> <?php echo $gsprache->user;?></a></li>
|
||||
<li><a href="admin.php?w=ug"><i class="fa fa-group"></i> <?php echo $gsprache->groups;?></a></li>
|
||||
<li class="active"><?php echo $gsprache->overview;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
@ -38,7 +38,7 @@
|
||||
<tr>
|
||||
<td><?php echo $table_row['name'];?></td>
|
||||
<td><?php echo $table_row['id'];?></td>
|
||||
<td><i class="fa <?php if($table_row['active']=='Y') echo 'fa-check-circle-o'; else echo 'fa-ban';?>"></i></td>
|
||||
<td><?php echo ($table_row['active']=='Y') ? $gsprache->yes : $gsprache->no;?></td>
|
||||
<td><?php echo $table_row['grouptype'];?></td>
|
||||
<td><?php echo $table_row['defaultgroup'];?></td>
|
||||
<td>
|
||||
|
51
web/template/adminlte/admin/admin_user_list.tpl
Normal file
51
web/template/adminlte/admin/admin_user_list.tpl
Normal file
@ -0,0 +1,51 @@
|
||||
<section class="content-header">
|
||||
<h1><?php echo $gsprache->user;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="admin.php?w=us"><i class="fa fa-user"></i> <?php echo $gsprache->user;?></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->user;?> <a href="admin.php?w=us&d=ad"><span class="btn btn-success btn-sm"><i class="fa fa-plus-circle"></i> <?php echo $gsprache->add;?></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<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->nickname;?></th>
|
||||
<th>ID</a></th>
|
||||
<th><?php echo $sprache->user;?></th>
|
||||
<th><?php echo $gsprache->active;?></th>
|
||||
<th><?php echo $sprache->accounttype;?></th>
|
||||
<th><?php echo $gsprache->jobPending;?></th>
|
||||
<th><?php echo $gsprache->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th><?php echo $sprache->nickname;?></th>
|
||||
<th>ID</a></th>
|
||||
<th><?php echo $sprache->user;?></th>
|
||||
<th><?php echo $gsprache->active;?></th>
|
||||
<th><?php echo $sprache->accounttype;?></th>
|
||||
<th><?php echo $gsprache->jobPending;?></th>
|
||||
<th><?php echo $gsprache->action;?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
265
web/template/adminlte/admin/admin_user_md.tpl
Normal file
265
web/template/adminlte/admin/admin_user_md.tpl
Normal file
@ -0,0 +1,265 @@
|
||||
<section class="content-header">
|
||||
<h1><?php echo $gsprache->user;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="admin.php?w=us"><i class="fa fa-user"></i> <?php echo $gsprache->user;?></a></li>
|
||||
<li><?php echo $gsprache->mod;?></li>
|
||||
<li class="active"><?php echo $cname;?></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>
|
||||
<?php }?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
|
||||
<form role="form" action="admin.php?w=us&d=md&id=<?php echo $id;?>&r=us" 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">externalID</label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputExternalID" type="text" name="externalID" value="<?php echo $externalID;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputActive"><?php echo $sprache->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>
|
||||
<option value="R" <?php if ($active=='R') echo 'selected="selected"';?>><?php echo $sprache->activeRegister;?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputSalutation"><?php echo $sprache->salutation;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputSalutation" name="salutation">
|
||||
<option value="1"><?php echo $sprache->salutation2;?></option>
|
||||
<option value="2" <?php if ($salutation==2) echo 'selected="selected"';?>><?php echo $sprache->salutation3;?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputCountry"><?php echo $sprache->country;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputCountry" name="flagmenu">
|
||||
<?php foreach ($selectlanguages as $la) { ?>
|
||||
<option value="<?php echo $la;?>" <?php if ($la==$country) echo 'selected="selected"'; ?>><?php echo $la;?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputFname"><?php echo $sprache->fname;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputFname" type="text" name="name" value="<?php echo $name;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputVname"><?php echo $sprache->vname;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputVname" type="text" name="vname" value="<?php echo $vname;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputBirthday"><?php echo $sprache->birthday;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputBirthday" type="text" name="birthday" value="<?php echo $birthday;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputMail"><?php echo $sprache->email;?>*</label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMail" type="email" name="mail" value="<?php echo $mail;?>" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputTel"><?php echo $sprache->tel;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputTel" type="tel" name="phone" value="<?php echo $phone;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputFax">Fax</label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputFax" type="tel" name="fax" value="<?php echo $fax;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputHandy"><?php echo $sprache->han;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputHandy" type="tel" name="handy" value="<?php echo $handy;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputCity"><?php echo $sprache->stadt;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputCity" type="text" name="city" value="<?php echo $city;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputCityn"><?php echo $sprache->plz;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputCityn" type="text" name="cityn" value="<?php echo $cityn;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputStreet"><?php echo $sprache->str;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputStreet" type="text" name="street" value="<?php echo $street;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputHnum"><?php echo $sprache->hnum;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputHnum" type="text" name="streetn" value="<?php echo $streetn;?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($reseller_id==0 or $id!=$admin_id) { ?>
|
||||
<div class="form-group">
|
||||
<label for="inputGroups"><?php echo $gsprache->groups;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputGroups" multiple="multiple" name="groups[]">
|
||||
<?php foreach ($groups[$accountType] as $gid => $group){ ?><option value="<?php echo $gid;?>" <?php if(in_array($gid,$groupsAssigned)) echo 'selected="selected"';?>><?php echo $group;?></option><?php }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="form-group">
|
||||
<label for="inputMailBackup">
|
||||
<input id="inputMailBackup" type="checkbox" name="mail_backup" value="Y" <?php if ($mail_backup=="Y") echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_backup;?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputMailServerDown">
|
||||
<input id="inputMailServerDown" type="checkbox" name="mail_serverdown" value="Y" <?php if ($mail_serverdown=="Y") echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_serverdown;?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputMailTicket">
|
||||
<input id="inputMailTicket" type="checkbox" name="mail_ticket" value="Y" <?php if ($mail_ticket=="Y") echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_ticket;?>
|
||||
</label>
|
||||
</div>
|
||||
<?php if ($accountType=='a' or $accountType=='r') { ?>
|
||||
<div class="form-group">
|
||||
<label for="inputMailUpdate">
|
||||
<input id="inputMailUpdate" type="checkbox" name="mail_gsupdate" value="Y" <?php if ($mail_gsupdate=="Y") echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_gsupdate;?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputMailSecurity">
|
||||
<input id="inputMailSecurity" type="checkbox" name="mail_securitybreach" value="Y" <?php if ($mail_securitybreach=="Y") echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_securitybreach;?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputMailVserver">
|
||||
<input id="inputMailVserver" type="checkbox" name="mail_vserver" value="Y" <?php if ($mail_vserver=="Y") echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_vserver;?>
|
||||
</label>
|
||||
</div>
|
||||
<?php } else if ($accountType=='u') { ?>
|
||||
<div class="form-group">
|
||||
<label for="inputFastDl"><?php echo $sprache->fastdl2;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMailTicket" type="url" name="fdlpath" value="<?php echo $fdlpath;?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php }; if ($accountType=='r') { ?>
|
||||
<div class="form-group">
|
||||
<label for="inputMaxUser"><?php echo $sprache->max.' '.$gsprache->user;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxUser" type="number" name="maxuser" value="<?php echo $maxuser;?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php if($easywiModules['gs']) { ?>
|
||||
<div class="form-group">
|
||||
<label for="inputMaxGserver"><?php echo $sprache->max.' '.$gsprache->gameserver;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxGserver" type="number" name="maxgserver" value="<?php echo $maxgserver;?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php }; if($easywiModules['vo']) { ?>
|
||||
<div class="form-group">
|
||||
<label for="inputMaxVoserver"><?php echo $sprache->max.' '.$gsprache->voiceserver;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxVoserver" type="number" name="maxvoserver" value="<?php echo $maxvoserver;?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php }; if($easywiModules['ro']) { ?>
|
||||
<div class="form-group">
|
||||
<label for="inputMaxDedis"><?php echo $sprache->max.' '.$gsprache->dedicated;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxDedis" type="number" name="maxdedis" value="<?php echo $maxdedis;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputMaxVirtual"><?php echo $sprache->max.' '.$gsprache->virtual;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxVirtual" type="number" name="maxvserver" value="<?php echo $maxvserver;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputMaxUserMHZ"><?php echo $sprache->max.' '.$rsprache->mhz;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxUserMHZ" type="number" name="maxusermhz" value="<?php echo $maxusermhz;?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputMaxUserRam"><?php echo $sprache->max.' '.$rsprache->ram;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputMaxUserRam" type="number" name="maxuserram" value="<?php echo $maxuserram;?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="form-group">
|
||||
<label for="inputResellerUserActive"><?php echo $gsprache->reseller.' '.$gsprache->user.' '.$sprache->active;?></label>
|
||||
<div class="controls">
|
||||
<select class="form-control" id="inputResellerUserActive" name="useractive">
|
||||
<option value="Y"><?php echo $gsprache->yes;?></option>
|
||||
<option value="N" <?php if ($useractive=='N') echo 'selected="selected"'; ?>><?php echo $gsprache->no;?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php foreach(customColumns('U',$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="<?php echo $row['value'];?>" maxlength="<?php echo $row['length'];?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
164
web/template/adminlte/admin/admin_user_own_md.tpl
Normal file
164
web/template/adminlte/admin/admin_user_own_md.tpl
Normal file
@ -0,0 +1,164 @@
|
||||
<section class="content-header">
|
||||
<h1><?php echo $gsprache->settings;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li class="active"><?php echo $gsprache->settings;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
|
||||
<form role="form" action="admin.php?w=su&r=su" 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">
|
||||
|
||||
<?php if(count($serviceProviders) > 0 ) echo '<h3>Social Auth</h3>';?>
|
||||
|
||||
<?php foreach($serviceProviders as $sp){ ?>
|
||||
<div class="control-group">
|
||||
|
||||
<label for="sp<?php echo $sp['sp'];?>">
|
||||
<?php echo $sp['sp'];?>
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
<?php if (strlen($sp['spUserId'])==0){ ?>
|
||||
<a class="btn btn-block btn-social btn-<?php echo strtolower($sp['sp']);?> span10" href="login.php?serviceProvider=<?php echo $sp['sp'];?>" id="sp<?php echo $sp['sp'];?>">
|
||||
<i class="fa fa-<?php echo strtolower($sp['sp']);?>"></i> <?php echo $sprache->socialConnect.' '.$sp['sp'];?>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a class="btn btn-block btn-social btn-<?php echo strtolower($sp['sp']);?> span10" href="admin.php?w=su&spUser=<?php echo $sp['spUserId'];?>&spId=<?php echo $sp['spId'];?>&r=su" id="sp<?php echo $sp['sp'];?>">
|
||||
<i class="fa fa-<?php echo strtolower($sp['sp']);?>"></i> <?php echo $sprache->socialRemove.' '.$sp['sp'];?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(count($serviceProviders) > 0 ) echo '<hr>';?>
|
||||
|
||||
<h3>Mails</h3>
|
||||
<div class="form-group">
|
||||
<label for="mail_backup">
|
||||
<input id="mail_backup" type="checkbox" name="mail_backup" value="Y" <?php if ($mail_backup=="Y") echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_backup;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="mail_serverdown">
|
||||
<input id="mail_serverdown" type="checkbox" name="mail_serverdown" value="Y" <?php if ($mail_serverdown=="Y") echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_serverdown;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="mail_ticket">
|
||||
<input id="mail_ticket" type="checkbox" name="mail_ticket" value="Y" <?php if ($mail_ticket=="Y") echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_ticket;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputMailUpdate">
|
||||
<input id="inputMailUpdate" type="checkbox" name="mail_gsupdate" value="Y" <?php if ($mail_gsupdate=="Y") echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_gsupdate;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputMailSecurity">
|
||||
<input id="inputMailSecurity" type="checkbox" name="mail_securitybreach" value="Y" <?php if ($mail_securitybreach=="Y") echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_securitybreach;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputMailVserver">
|
||||
<input id="inputMailVserver" type="checkbox" name="mail_vserver" value="Y" <?php if ($mail_vserver=="Y") echo 'checked="checked"'; ?>>
|
||||
<?php echo $sprache->mail_vserver;?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<h3><?php echo $gsprache->user;?></h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="fname"><?php echo $sprache->fname;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="fname" type="text" name="name" value="<?php echo $name;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="vname"><?php echo $sprache->vname;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="vname" type="text" name="vname" value="<?php echo $vname;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="mail"><?php echo $sprache->email;?>*</label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="mail" type="email" name="mail" value="<?php echo $mail;?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="tel"><?php echo $sprache->tel;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="tel" type="text" name="phone" value="<?php echo $phone;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="handy"><?php echo $sprache->han;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="handy" type="text" name="handy" value="<?php echo $handy;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="stadt"><?php echo $sprache->stadt;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="stadt" type="text" name="city" value="<?php echo $city;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cityn"><?php echo $sprache->plz;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="cityn" type="text" name="cityn" value="<?php echo $cityn;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="street"><?php echo $sprache->str;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="street" type="text" name="street" value="<?php echo $street;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="streetn"><?php echo $sprache->hnum;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="streetn" type="text" name="streetn" value="<?php echo $streetn;?>">
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
43
web/template/adminlte/admin/admin_user_own_pass.tpl
Normal file
43
web/template/adminlte/admin/admin_user_own_pass.tpl
Normal file
@ -0,0 +1,43 @@
|
||||
<section class="content-header">
|
||||
<h1><?php echo $sprache->passw;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li class="active"><?php echo $sprache->passw;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
|
||||
<form role="form" action="admin.php?w=su&d=pw&r=su" 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="password1"><?php echo $sprache->passw_1;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="password1" type="password" name="password" value="" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password2"><?php echo $sprache->passw_2;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="password2" type="password" name="pass2" value="" required>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
72
web/template/adminlte/admin/admin_user_pass.tpl
Normal file
72
web/template/adminlte/admin/admin_user_pass.tpl
Normal file
@ -0,0 +1,72 @@
|
||||
<section class="content-header">
|
||||
<h1><?php echo $gsprache->user;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="admin.php?w=us"><i class="fa fa-user"></i> <?php echo $gsprache->user;?></a></li>
|
||||
<li><?php echo $sprache->passw;?></li>
|
||||
<li class="active"><?php echo $cname;?></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>
|
||||
<?php }?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
|
||||
<form role="form" action="admin.php?w=us&d=pw&id=<?php echo $id;?>&r=us" onsubmit="return confirm('<?php echo $gsprache->sure;?>');" method="post">
|
||||
|
||||
<input type="hidden" name="token" value="<?php echo token();?>">
|
||||
<input type="hidden" name="action" value="pw">
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputNickname"><?php echo $sprache->nickname;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputNickname" type="text" name="nickname" value="<?php echo $cname;?>" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputName"><?php echo $sprache->user;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputName" type="text" name="nickname" value="<?php echo $fullName;?>" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputPassword"><?php echo $sprache->passw_1;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputPassword" type="password" name="password" value="" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputPasswordRepeat"><?php echo $sprache->passw_2;?></label>
|
||||
<div class="controls">
|
||||
<input class="form-control" id="inputPasswordRepeat" type="password" name="pass2" value="" required>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
1
web/template/adminlte/ajax/ajax_admin_buttons_pw.tpl
Normal file
1
web/template/adminlte/ajax/ajax_admin_buttons_pw.tpl
Normal file
@ -0,0 +1 @@
|
||||
<a href="admin.php?w=<?php echo $what;?>&d=<?php echo $do;?>&id=<?php echo $id;?>"><span class="btn btn-primary btn-sm"><i class="fa fa-key"></i> <?php echo $description;?></span></a>
|
@ -256,7 +256,7 @@
|
||||
<div class="accordion-inner">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<?php if($pa['user'] or $pa['user_users']) { ?>
|
||||
<li <?php if($ui->smallletters('w',255,'get')=='us') echo 'class="active"';?>><a href="admin.php?w=us&d=md"><?php echo $gsprache->overview;?></a></li>
|
||||
<li <?php if($ui->smallletters('w',255,'get')=='us') echo 'class="active"';?>><a href="admin.php?w=us"><?php echo $gsprache->overview;?></a></li>
|
||||
<?php } ?>
|
||||
<?php if($pa['userGroups']) { ?>
|
||||
<li <?php if($ui->smallletters('w',255,'get')=='ug') echo 'class="active"';?>><a href="admin.php?w=ug"><?php echo $gsprache->groups;?></a></li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user