mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
#17: Refactor
This commit is contained in:
parent
d590a913fc
commit
f2e0853adc
2245
server/control_new.sh
Normal file
2245
server/control_new.sh
Normal file
File diff suppressed because it is too large
Load Diff
@ -50,13 +50,13 @@ if (isset($admin_id)) {
|
|||||||
$userpermissionquery = $sql->prepare("SELECT * FROM `userpermissions` WHERE `userid`=? LIMIT 1");
|
$userpermissionquery = $sql->prepare("SELECT * FROM `userpermissions` WHERE `userid`=? LIMIT 1");
|
||||||
$userpermissionquery->execute(array($permissionid));
|
$userpermissionquery->execute(array($permissionid));
|
||||||
foreach ($userpermissionquery->fetchall() as $userpermissionrow) {
|
foreach ($userpermissionquery->fetchall() as $userpermissionrow) {
|
||||||
if ($userpermissionrow['root']=="Y") {
|
if ($userpermissionrow['root'] == 'Y') {
|
||||||
foreach ($userpermissionrow as $key => $value) {
|
foreach ($userpermissionrow as $key => $value) {
|
||||||
$pa[$key] = true;
|
$pa[$key] = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreach ($userpermissionrow as $key => $value) {
|
foreach ($userpermissionrow as $key => $value) {
|
||||||
if ($value=="Y") {
|
if ($value == 'Y') {
|
||||||
$pa[$key] = true;
|
$pa[$key] = true;
|
||||||
} else {
|
} else {
|
||||||
$pa[$key] = false;
|
$pa[$key] = false;
|
||||||
@ -69,7 +69,7 @@ if (isset($user_id)) {
|
|||||||
$userpermissionquery = $sql->prepare("SELECT * FROM `userpermissions` WHERE `userid`=? LIMIT 1");
|
$userpermissionquery = $sql->prepare("SELECT * FROM `userpermissions` WHERE `userid`=? LIMIT 1");
|
||||||
$userpermissionquery->execute(array($user_id));
|
$userpermissionquery->execute(array($user_id));
|
||||||
foreach ($userpermissionquery->fetchall() as $userpermissionrow) {
|
foreach ($userpermissionquery->fetchall() as $userpermissionrow) {
|
||||||
if ($userpermissionrow['miniroot']=="Y") {
|
if ($userpermissionrow['miniroot'] == 'Y') {
|
||||||
foreach ($userpermissionrow as $key => $value) {
|
foreach ($userpermissionrow as $key => $value) {
|
||||||
$pau[$key] = true;
|
$pau[$key] = true;
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ if (isset($user_id)) {
|
|||||||
if (isset($admin_id)) {
|
if (isset($admin_id)) {
|
||||||
$pau[$key] = true;
|
$pau[$key] = true;
|
||||||
} else {
|
} else {
|
||||||
if ($value=="Y") {
|
if ($value == 'Y') {
|
||||||
$pau[$key] = true;
|
$pau[$key] = true;
|
||||||
} else {
|
} else {
|
||||||
$pau[$key] = false;
|
$pau[$key] = false;
|
||||||
|
@ -146,10 +146,10 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
|||||||
$resellerid = $row2['resellerid'];
|
$resellerid = $row2['resellerid'];
|
||||||
$autorestart = $row2['autorestart'];
|
$autorestart = $row2['autorestart'];
|
||||||
|
|
||||||
if ($addedby == '2') {
|
if ($addedby == 2) {
|
||||||
$queryip = $row2['ssh2ip'];
|
$queryip = $row2['ssh2ip'];
|
||||||
|
|
||||||
} else if ($addedby == '1') {
|
} else if ($addedby == 1) {
|
||||||
$query3 = $sql->prepare("SELECT `ip` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
$query3 = $sql->prepare("SELECT `ip` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||||
$query3->execute(array($row2['rootid'], $resellerid));
|
$query3->execute(array($row2['rootid'], $resellerid));
|
||||||
$queryip = $query3->fetchColumn();
|
$queryip = $query3->fetchColumn();
|
||||||
@ -482,7 +482,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
|||||||
} else if ($restart == 'N' and $qstat == 'minecraft' and $worldsafe == 'Y') {
|
} else if ($restart == 'N' and $qstat == 'minecraft' and $worldsafe == 'Y') {
|
||||||
$cmds[]="sudo -u ${SSH2customer} ./control.sh mc_ws $gsfolder";
|
$cmds[]="sudo -u ${SSH2customer} ./control.sh mc_ws $gsfolder";
|
||||||
echo "Minecraft worlsafe: $server\r\n";
|
echo "Minecraft worlsafe: $server\r\n";
|
||||||
} else if ($restart == 'N' and $qstat == 'a2s' and ($uploadtype == '2' or $uploadtype == '3') and $upload== 'Y') {
|
} else if ($restart == 'N' and $qstat == 'a2s' and ($uploadtype == 2 or $uploadtype == '3') and $upload== 'Y') {
|
||||||
$tmp=gsrestart($gsswitchID,'du', $aeskey, $resellerid);
|
$tmp=gsrestart($gsswitchID,'du', $aeskey, $resellerid);
|
||||||
if (is_array($tmp)) foreach($tmp as $t) $cmds[] = $t;
|
if (is_array($tmp)) foreach($tmp as $t) $cmds[] = $t;
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ if ($ui->smallletters('w',5, 'get') == 'check') {
|
|||||||
$maxserver = $row['maxserver'];
|
$maxserver = $row['maxserver'];
|
||||||
$esxi = $row['esxi'];
|
$esxi = $row['esxi'];
|
||||||
$besthostcpu = $row['cpu'] . ' ' . $cores."x".$mhz." MHz";
|
$besthostcpu = $row['cpu'] . ' ' . $cores."x".$mhz." MHz";
|
||||||
if ($row['thin']=="Y") {
|
if ($row['thin'] == 'Y') {
|
||||||
$percent = $row['thinquota'];
|
$percent = $row['thinquota'];
|
||||||
} else {
|
} else {
|
||||||
$percent="100";
|
$percent="100";
|
||||||
@ -123,7 +123,7 @@ if ($ui->smallletters('w',5, 'get') == 'check') {
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$i = 1;
|
$i = 1;
|
||||||
if ($esxi=="Y") {
|
if ($esxi == 'Y') {
|
||||||
$maxcore="8";
|
$maxcore="8";
|
||||||
} else {
|
} else {
|
||||||
$maxcore = $cores;
|
$maxcore = $cores;
|
||||||
|
@ -158,7 +158,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
|||||||
|
|
||||||
$rulebreak[] = $ssprache->nopassword;
|
$rulebreak[] = $ssprache->nopassword;
|
||||||
|
|
||||||
if ($resellersettings[$resellerid]['nopassword'] == '1') {
|
if ($resellersettings[$resellerid]['nopassword'] == 1) {
|
||||||
$stopserver = true;
|
$stopserver = true;
|
||||||
print "Will stop server $address because running without password. The name converted to ISO-8859-1 is ".iconv('UTF-8','ISO-8859-1//TRANSLIT', $name).".\r\n";
|
print "Will stop server $address because running without password. The name converted to ISO-8859-1 is ".iconv('UTF-8','ISO-8859-1//TRANSLIT', $name).".\r\n";
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
|||||||
|
|
||||||
$rulebreak[] = $ssprache->tohighslots;
|
$rulebreak[] = $ssprache->tohighslots;
|
||||||
|
|
||||||
if ($resellersettings[$resellerid]['tohighslots'] == '1') {
|
if ($resellersettings[$resellerid]['tohighslots'] == 1) {
|
||||||
$stopserver = true;
|
$stopserver = true;
|
||||||
print "Will stop server $address because running with to much slots. The name converted to ISO-8859-1 is ".iconv('UTF-8','ISO-8859-1//TRANSLIT', $name).".\r\n";
|
print "Will stop server $address because running with to much slots. The name converted to ISO-8859-1 is ".iconv('UTF-8','ISO-8859-1//TRANSLIT', $name).".\r\n";
|
||||||
} else {
|
} else {
|
||||||
@ -183,7 +183,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
|||||||
|
|
||||||
$rulebreak[] = $ssprache->noservertag;
|
$rulebreak[] = $ssprache->noservertag;
|
||||||
|
|
||||||
if ($resellersettings[$resellerid]['noservertag'] == '1') {
|
if ($resellersettings[$resellerid]['noservertag'] == 1) {
|
||||||
$stopserver = true;
|
$stopserver = true;
|
||||||
print "Will stop server $address because running without servertag. The name converted to ISO-8859-1 is ".iconv('UTF-8','ISO-8859-1//TRANSLIT', $name).".\r\n";
|
print "Will stop server $address because running without servertag. The name converted to ISO-8859-1 is ".iconv('UTF-8','ISO-8859-1//TRANSLIT', $name).".\r\n";
|
||||||
} else {
|
} else {
|
||||||
@ -739,9 +739,9 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
|||||||
$querypassword = $vrow['decryptedquerypassword'];
|
$querypassword = $vrow['decryptedquerypassword'];
|
||||||
$resellerid = $vrow['resellerid'];
|
$resellerid = $vrow['resellerid'];
|
||||||
$autorestart = $vrow['autorestart'];
|
$autorestart = $vrow['autorestart'];
|
||||||
if ($addedby == '2') {
|
if ($addedby == 2) {
|
||||||
$queryip = $vrow['ssh2ip'];
|
$queryip = $vrow['ssh2ip'];
|
||||||
} else if ($addedby == '1') {
|
} else if ($addedby == 1) {
|
||||||
$vselect2 = $sql->prepare("SELECT `ip` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
$vselect2 = $sql->prepare("SELECT `ip` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||||
$vselect2->execute(array($vrow['rootid'], $resellerid));
|
$vselect2->execute(array($vrow['rootid'], $resellerid));
|
||||||
foreach ($vselect2->fetchall(PDO::FETCH_ASSOC) as $vrow2) $queryip = $vrow2['ip'];
|
foreach ($vselect2->fetchall(PDO::FETCH_ASSOC) as $vrow2) $queryip = $vrow2['ip'];
|
||||||
|
@ -140,12 +140,12 @@ if (!isset($success['false']) and array_value_exists('action','add',$data) and $
|
|||||||
$query2->execute(array($tsdnsServerID,$resellerID));
|
$query2->execute(array($tsdnsServerID,$resellerID));
|
||||||
$defaultdns = $query2->fetchColumn();
|
$defaultdns = $query2->fetchColumn();
|
||||||
}
|
}
|
||||||
if ($row['addedby'] == '2') {
|
if ($row['addedby'] == 2) {
|
||||||
$ips[] = $row['ssh2ip'];
|
$ips[] = $row['ssh2ip'];
|
||||||
foreach (preg_split('/\r\n/', $row['ips'],-1,PREG_SPLIT_NO_EMPTY) as $ip) {
|
foreach (preg_split('/\r\n/', $row['ips'],-1,PREG_SPLIT_NO_EMPTY) as $ip) {
|
||||||
$ips[] = $ip;
|
$ips[] = $ip;
|
||||||
}
|
}
|
||||||
} else if ($row['addedby'] == '1') {
|
} else if ($row['addedby'] == 1) {
|
||||||
$query2 = $sql->prepare("SELECT `ip`,`altips` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
$query2 = $sql->prepare("SELECT `ip`,`altips` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||||
$query2->execute(array($row['rootid'],$resellerID));
|
$query2->execute(array($row['rootid'],$resellerID));
|
||||||
foreach ($query2->fetchAll(PDO::FETCH_ASSOC) as $row2) {
|
foreach ($query2->fetchAll(PDO::FETCH_ASSOC) as $row2) {
|
||||||
|
@ -255,7 +255,7 @@ class rootServer {
|
|||||||
foreach ($this->dhcpData as $k => $v) {
|
foreach ($this->dhcpData as $k => $v) {
|
||||||
$i = 0;
|
$i = 0;
|
||||||
unset($tempBad);
|
unset($tempBad);
|
||||||
if ($v['publickey']=="Y") {
|
if ($v['publickey'] == 'Y') {
|
||||||
|
|
||||||
# https://github.com/easy-wi/developer/issues/70
|
# https://github.com/easy-wi/developer/issues/70
|
||||||
$sshkey=removePub($v['keyname']);
|
$sshkey=removePub($v['keyname']);
|
||||||
@ -317,7 +317,7 @@ class rootServer {
|
|||||||
}
|
}
|
||||||
public function PXEFiles() {
|
public function PXEFiles() {
|
||||||
foreach($this->PXEData as $k => $v) {
|
foreach($this->PXEData as $k => $v) {
|
||||||
if ($v['publickey']=="Y") {
|
if ($v['publickey'] == 'Y') {
|
||||||
|
|
||||||
# https://github.com/easy-wi/developer/issues/70
|
# https://github.com/easy-wi/developer/issues/70
|
||||||
$sshkey=removePub($v['keyname']);
|
$sshkey=removePub($v['keyname']);
|
||||||
|
@ -145,9 +145,9 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
|||||||
$querypassword = $row['decryptedquerypassword'];
|
$querypassword = $row['decryptedquerypassword'];
|
||||||
$addedby = $row['addedby'];
|
$addedby = $row['addedby'];
|
||||||
$localserverid = $row['localserverid'];
|
$localserverid = $row['localserverid'];
|
||||||
if ($addedby == '2') {
|
if ($addedby == 2) {
|
||||||
$queryip = $row['ssh2ip'];
|
$queryip = $row['ssh2ip'];
|
||||||
} else if ($addedby == '1') {
|
} else if ($addedby == 1) {
|
||||||
$query = $sql->prepare("SELECT `ip`,`altips` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
$query = $sql->prepare("SELECT `ip`,`altips` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||||
$query->execute(array($row2['rootid'],$reseller_id));
|
$query->execute(array($row2['rootid'],$reseller_id));
|
||||||
foreach ($query->fetchall(PDO::FETCH_ASSOC) as $row) {
|
foreach ($query->fetchall(PDO::FETCH_ASSOC) as $row) {
|
||||||
@ -226,9 +226,9 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
|||||||
$querypassword = $row2['decryptedquerypassword'];
|
$querypassword = $row2['decryptedquerypassword'];
|
||||||
$addedby = $row2['addedby'];
|
$addedby = $row2['addedby'];
|
||||||
$localserverid = $row2['localserverid'];
|
$localserverid = $row2['localserverid'];
|
||||||
if ($addedby == '2') {
|
if ($addedby == 2) {
|
||||||
$queryip = $row2['ssh2ip'];
|
$queryip = $row2['ssh2ip'];
|
||||||
} else if ($addedby == '1') {
|
} else if ($addedby == 1) {
|
||||||
$query4->execute(array($row2['rootid'],$reseller_id));
|
$query4->execute(array($row2['rootid'],$reseller_id));
|
||||||
foreach ($query4->fetchall(PDO::FETCH_ASSOC) as $row3) {
|
foreach ($query4->fetchall(PDO::FETCH_ASSOC) as $row3) {
|
||||||
$queryip = $row3['ip'];
|
$queryip = $row3['ip'];
|
||||||
|
@ -142,7 +142,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
|||||||
$pselect = $sql->prepare("SELECT p.`id`,p.`released`,t.`title` FROM `page_pages` p LEFT JOIN `page_pages_text` t ON p.`id`=t.`pageid` AND t.`language`=? WHERE p.`id`=? AND p.`resellerid`=? LIMIT 1");
|
$pselect = $sql->prepare("SELECT p.`id`,p.`released`,t.`title` FROM `page_pages` p LEFT JOIN `page_pages_text` t ON p.`id`=t.`pageid` AND t.`language`=? WHERE p.`id`=? AND p.`resellerid`=? LIMIT 1");
|
||||||
$pselect->execute(array($user_language,$id,$reseller_id));
|
$pselect->execute(array($user_language,$id,$reseller_id));
|
||||||
foreach ($pselect->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
foreach ($pselect->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||||
if ($row['released'] == '1') {
|
if ($row['released'] == 1) {
|
||||||
$page_active = $gsprache->yes;
|
$page_active = $gsprache->yes;
|
||||||
} else {
|
} else {
|
||||||
$page_active = $gsprache->no;
|
$page_active = $gsprache->no;
|
||||||
@ -429,7 +429,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
|||||||
if (!isset($titleLanguages[$row['language']])) {
|
if (!isset($titleLanguages[$row['language']])) {
|
||||||
$titleLanguages[$row['language']] = array('page' => getlanguagefile('page', $row['language'],0),'general' => getlanguagefile('general', $row['language'],0));
|
$titleLanguages[$row['language']] = array('page' => getlanguagefile('page', $row['language'],0),'general' => getlanguagefile('general', $row['language'],0));
|
||||||
}
|
}
|
||||||
if ($row['released'] == '1') {
|
if ($row['released'] == 1) {
|
||||||
$released = $gsprache->yes;
|
$released = $gsprache->yes;
|
||||||
} else {
|
} else {
|
||||||
$released = $gsprache->no;
|
$released = $gsprache->no;
|
||||||
|
@ -151,7 +151,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
|||||||
$query->execute(array($user_language,$id,$reseller_id));
|
$query->execute(array($user_language,$id,$reseller_id));
|
||||||
foreach ($query->fetchall(PDO::FETCH_ASSOC) as $row) {
|
foreach ($query->fetchall(PDO::FETCH_ASSOC) as $row) {
|
||||||
$page_title = $row['title'];
|
$page_title = $row['title'];
|
||||||
if ($row['released'] == '1') {
|
if ($row['released'] == 1) {
|
||||||
$page_active = $gsprache->yes;
|
$page_active = $gsprache->yes;
|
||||||
} else {
|
} else {
|
||||||
$page_active = $gsprache->no;
|
$page_active = $gsprache->no;
|
||||||
@ -406,7 +406,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
|||||||
$query->execute(array($user_language,$reseller_id));
|
$query->execute(array($user_language,$reseller_id));
|
||||||
$table = array();
|
$table = array();
|
||||||
foreach ($query->fetchall(PDO::FETCH_ASSOC) as $row) {
|
foreach ($query->fetchall(PDO::FETCH_ASSOC) as $row) {
|
||||||
if ($row['released'] == '1') {
|
if ($row['released'] == 1) {
|
||||||
$released = $gsprache->yes;
|
$released = $gsprache->yes;
|
||||||
} else {
|
} else {
|
||||||
$released = $gsprache->no;
|
$released = $gsprache->no;
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
$sprache = getlanguagefile('voice',$user_language,$reseller_id);
|
$sprache = getlanguagefile('voice',$user_language,$reseller_id);
|
||||||
$loguserid = $user_id;
|
$loguserid = $user_id;
|
||||||
$logusername = getusername($user_id);
|
$logusername = getusername($user_id);
|
||||||
$logusertype='user';
|
$logusertype = 'user';
|
||||||
$logreseller = 0;
|
$logreseller = 0;
|
||||||
if (isset($admin_id)) {
|
if (isset($admin_id)) {
|
||||||
$logsubuser = $admin_id;
|
$logsubuser = $admin_id;
|
||||||
|
@ -128,12 +128,12 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVo']) and $lice
|
|||||||
$hostbutton_gfx_url = $row2['defaulthostbutton_gfx_url'];
|
$hostbutton_gfx_url = $row2['defaulthostbutton_gfx_url'];
|
||||||
$defaultFlexSlotsFree = $row2['defaultFlexSlotsFree'];
|
$defaultFlexSlotsFree = $row2['defaultFlexSlotsFree'];
|
||||||
$defaultFlexSlotsPercent = $row2['defaultFlexSlotsPercent'];
|
$defaultFlexSlotsPercent = $row2['defaultFlexSlotsPercent'];
|
||||||
if ($addedby == '2') {
|
if ($addedby == 2) {
|
||||||
$ips[] = $row2['ssh2ip'];
|
$ips[] = $row2['ssh2ip'];
|
||||||
foreach (preg_split('/\r\n/', $row2['ips'],-1,PREG_SPLIT_NO_EMPTY) as $ip) {
|
foreach (preg_split('/\r\n/', $row2['ips'],-1,PREG_SPLIT_NO_EMPTY) as $ip) {
|
||||||
$ips[] = $ip;
|
$ips[] = $ip;
|
||||||
}
|
}
|
||||||
} else if ($addedby == '1') {
|
} else if ($addedby == 1) {
|
||||||
$query3 = $sql->prepare("SELECT `ip`,`altips` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
$query3 = $sql->prepare("SELECT `ip`,`altips` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||||
$query3->execute(array($row2['rootid'],$reseller_id));
|
$query3->execute(array($row2['rootid'],$reseller_id));
|
||||||
foreach ($query3->fetchAll(PDO::FETCH_ASSOC) as $row3) {
|
foreach ($query3->fetchAll(PDO::FETCH_ASSOC) as $row3) {
|
||||||
@ -241,7 +241,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVo']) and $lice
|
|||||||
$maxslots = $row['maxslots'];
|
$maxslots = $row['maxslots'];
|
||||||
$serverdir = $row['serverdir'];
|
$serverdir = $row['serverdir'];
|
||||||
$mnotified = $row['notified'];
|
$mnotified = $row['notified'];
|
||||||
if ($addedby == '2') {
|
if ($addedby == 2) {
|
||||||
$publickey = $row['publickey'];
|
$publickey = $row['publickey'];
|
||||||
$queryip = $row['ssh2ip'];
|
$queryip = $row['ssh2ip'];
|
||||||
$ssh2port = $row['decryptedssh2port'];
|
$ssh2port = $row['decryptedssh2port'];
|
||||||
@ -249,7 +249,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVo']) and $lice
|
|||||||
$ssh2password = $row['decryptedssh2password'];
|
$ssh2password = $row['decryptedssh2password'];
|
||||||
$keyname = $row['keyname'];
|
$keyname = $row['keyname'];
|
||||||
$bitversion = $row['bitversion'];
|
$bitversion = $row['bitversion'];
|
||||||
} else if ($addedby == '1') {
|
} else if ($addedby == 1) {
|
||||||
$pselect2 = $sql->prepare("SELECT `ip` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
$pselect2 = $sql->prepare("SELECT `ip` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||||
$pselect2->execute(array($row['rootid'],$reseller_id));
|
$pselect2->execute(array($row['rootid'],$reseller_id));
|
||||||
foreach ($pselect2->fetchAll(PDO::FETCH_ASSOC) as $row2) {
|
foreach ($pselect2->fetchAll(PDO::FETCH_ASSOC) as $row2) {
|
||||||
@ -360,7 +360,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVo']) and $lice
|
|||||||
$mnotified = $row['notified'];
|
$mnotified = $row['notified'];
|
||||||
$tsdnsServerID = $row['tsdnsServerID'];
|
$tsdnsServerID = $row['tsdnsServerID'];
|
||||||
$externalDefaultDNS = $row['externalDefaultDNS'];
|
$externalDefaultDNS = $row['externalDefaultDNS'];
|
||||||
if ($addedby == '2') {
|
if ($addedby == 2) {
|
||||||
$publickey = $row['publickey'];
|
$publickey = $row['publickey'];
|
||||||
$queryip = $row['ssh2ip'];
|
$queryip = $row['ssh2ip'];
|
||||||
$ssh2port = $row['decryptedssh2port'];
|
$ssh2port = $row['decryptedssh2port'];
|
||||||
@ -368,7 +368,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVo']) and $lice
|
|||||||
$ssh2password = $row['decryptedssh2password'];
|
$ssh2password = $row['decryptedssh2password'];
|
||||||
$keyname = $row['keyname'];
|
$keyname = $row['keyname'];
|
||||||
$bitversion = $row['bitversion'];
|
$bitversion = $row['bitversion'];
|
||||||
} else if ($addedby == '1') {
|
} else if ($addedby == 1) {
|
||||||
$query = $sql->prepare("SELECT `ip` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
$query = $sql->prepare("SELECT `ip` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||||
$query->execute(array($row['rootid'],$reseller_id));
|
$query->execute(array($row['rootid'],$reseller_id));
|
||||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||||
@ -465,11 +465,11 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVo']) and $lice
|
|||||||
$maxserver = $row2['maxserver'];
|
$maxserver = $row2['maxserver'];
|
||||||
$maxslots = $row2['maxslots'];
|
$maxslots = $row2['maxslots'];
|
||||||
$addedby = $row2['addedby'];
|
$addedby = $row2['addedby'];
|
||||||
if ($addedby == '2') {
|
if ($addedby == 2) {
|
||||||
$queryip = $row2['ssh2ip'];
|
$queryip = $row2['ssh2ip'];
|
||||||
$ips[] = $row2['ssh2ip'];
|
$ips[] = $row2['ssh2ip'];
|
||||||
foreach (preg_split('/\r\n/', $row2['ips'],-1,PREG_SPLIT_NO_EMPTY) as $ip) $ips[] = $ip;
|
foreach (preg_split('/\r\n/', $row2['ips'],-1,PREG_SPLIT_NO_EMPTY) as $ip) $ips[] = $ip;
|
||||||
} else if ($addedby == '1') {
|
} else if ($addedby == 1) {
|
||||||
$query3 = $sql->prepare("SELECT `ip`,`altips` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
$query3 = $sql->prepare("SELECT `ip`,`altips` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||||
$query3->execute(array($row2['rootid'],$reseller_id));
|
$query3->execute(array($row2['rootid'],$reseller_id));
|
||||||
foreach ($query3->fetchAll(PDO::FETCH_ASSOC) as $row3) {
|
foreach ($query3->fetchAll(PDO::FETCH_ASSOC) as $row3) {
|
||||||
@ -557,7 +557,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVo']) and $lice
|
|||||||
$mnotified = $row['notified'];
|
$mnotified = $row['notified'];
|
||||||
$tsdnsServerID = $row['tsdnsServerID'];
|
$tsdnsServerID = $row['tsdnsServerID'];
|
||||||
$externalDefaultDNS = $row['externalDefaultDNS'];
|
$externalDefaultDNS = $row['externalDefaultDNS'];
|
||||||
if ($addedby == '2') {
|
if ($addedby == 2) {
|
||||||
$publickey = $row['publickey'];
|
$publickey = $row['publickey'];
|
||||||
$queryip = $row['ssh2ip'];
|
$queryip = $row['ssh2ip'];
|
||||||
$ssh2port = $row['decryptedssh2port'];
|
$ssh2port = $row['decryptedssh2port'];
|
||||||
@ -565,7 +565,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVo']) and $lice
|
|||||||
$ssh2password = $row['decryptedssh2password'];
|
$ssh2password = $row['decryptedssh2password'];
|
||||||
$keyname = $row['keyname'];
|
$keyname = $row['keyname'];
|
||||||
$bitversion = $row['bitversion'];
|
$bitversion = $row['bitversion'];
|
||||||
} else if ($addedby == '1') {
|
} else if ($addedby == 1) {
|
||||||
$query = $sql->prepare("SELECT `ip`,`bitversion` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
$query = $sql->prepare("SELECT `ip`,`bitversion` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||||
$query->execute(array($row['rootid'],$reseller_id));
|
$query->execute(array($row['rootid'],$reseller_id));
|
||||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user