mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
#17: Partial
This commit is contained in:
parent
c61c061580
commit
644e78537d
@ -87,6 +87,6 @@ if (isset($user_id)) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(((!isset($admin_id) and !isset($user_id)) or (((!$pa['gserver']) and !$pa['voiceserver'] and !$pa['voicemasterserver'] and !$pa['traffic'] and !$pa['user'] and !rsellerpermisions($admin_id) and !$pa['usertickets']) and (!$pau['restart'] and !$pau['usertickets'])))) {
|
||||
if (((!isset($admin_id) and !isset($user_id)) or (((!$pa['gserver']) and !$pa['voiceserver'] and !$pa['voicemasterserver'] and !$pa['traffic'] and !$pa['user'] and !rsellerpermisions($admin_id) and !$pa['usertickets']) and (!$pau['restart'] and !$pau['usertickets'])))) {
|
||||
die('No acces');
|
||||
}
|
@ -76,7 +76,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR'] == $ip) {
|
||||
$query->execute();
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$resellerID = $row['resellerID'];
|
||||
if($row['ssl'] == 'Y') {
|
||||
if ($row['ssl'] == 'Y') {
|
||||
$ssl='https://';
|
||||
$port=443;
|
||||
} else {
|
||||
@ -110,7 +110,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR'] == $ip) {
|
||||
if (isset($value->externalID)) {
|
||||
$query4->execute(array(json_encode(array('I' => $row['importID'])),$value->externalID));
|
||||
$checkAmount = $query4->fetchColumn();
|
||||
if($checkAmount>0 and $row['fetchUpdates'] == 'Y') {
|
||||
if ($checkAmount>0 and $row['fetchUpdates'] == 'Y') {
|
||||
$query2->execute(array(getParam('salutation'),strtolower(getParam('email')),getParam('loginName'),getParam('firstName'),getParam('lastName'),getParam('birthday'),getParam('country'),getParam('phone'),getParam('fax'),getParam('handy'),getParam('city'),getParam('cityn'),getParam('street'),getParam('streetn'),json_encode(array('I' => $row['importID'])),getParam('externalID'), $row['resellerID']));
|
||||
printText('User updated. Loginname: '.$value->loginName.' e-mail: '.strtolower($value->email));
|
||||
} else if ($checkAmount>0) {
|
||||
|
@ -54,14 +54,14 @@ if (isset($argv)) {
|
||||
if (isset($e[1])) $args[$e[0]] = $e[1];
|
||||
}
|
||||
}
|
||||
if(!isset($deamon)) {
|
||||
if (!isset($deamon)) {
|
||||
print 'Running job management as cronjob'."\r\n";
|
||||
$deamon = false;
|
||||
set_time_limit($timelimit);
|
||||
} else {
|
||||
print 'Running job management as Deamon'."\r\n";
|
||||
}
|
||||
if(!isset($sleep)) $sleep=60;
|
||||
if (!isset($sleep)) $sleep=60;
|
||||
}
|
||||
if (!isset($ip) or $_SERVER['SERVER_ADDR'] == $ip) {
|
||||
define('EASYWIDIR', dirname(__FILE__));
|
||||
|
14
web/lend.php
14
web/lend.php
@ -171,27 +171,27 @@ foreach ($query->fetchall(PDO::FETCH_ASSOC) as $row) {
|
||||
if ($nextcheck < 0) {
|
||||
$nextcheck = $nextcheck * (-1);
|
||||
}
|
||||
if($time>0 and $maxtime>0) {
|
||||
if ($time>0 and $maxtime>0) {
|
||||
while ($time <= $maxtime) {
|
||||
$timeselect[] = $time;
|
||||
$time = $time + $timesteps;
|
||||
}
|
||||
}
|
||||
$gsstart = $minplayer;
|
||||
if($player>0 and $gsstart>0) {
|
||||
if ($player>0 and $gsstart>0) {
|
||||
while ($gsstart <= $player) {
|
||||
$slotselect[] = $gsstart;
|
||||
$gsstart = $gsstart + $playersteps;
|
||||
}
|
||||
}
|
||||
if($votime>0 and $vomaxtime>0) {
|
||||
if ($votime>0 and $vomaxtime>0) {
|
||||
while ($votime <= $vomaxtime) {
|
||||
$votimeselect[] = $votime;
|
||||
$votime = $votime + $votimesteps;
|
||||
}
|
||||
}
|
||||
$vstart = $vominplayer;
|
||||
if($voplayer>0 and $vstart>0) {
|
||||
if ($voplayer>0 and $vstart>0) {
|
||||
while ($vstart <= $voplayer) {
|
||||
$voslotselect[] = $vstart;
|
||||
$vstart = $vstart + $voplayersteps;
|
||||
@ -248,11 +248,11 @@ if ($activeGS == 'Y' and ($w == 'gs' or $d == 'gs' or $ui->st('w', 'post') == 'g
|
||||
$volallowed = ($vocount>0) ? true : false;
|
||||
$gslallowed = ($gscount>0) ? true : false;
|
||||
|
||||
if(!isset($servertype) and !isset($page_include) and (!$ui->username('shorten', 50, 'get') or ($ui->username('shorten', 50, 'get') == 'api') and !$ui->st('w', 'post'))) {
|
||||
if (!isset($servertype) and !isset($page_include) and (!$ui->username('shorten', 50, 'get') or ($ui->username('shorten', 50, 'get') == 'api') and !$ui->st('w', 'post'))) {
|
||||
$servertype = ($vocount > $gscount) ? 'v' : 'g';
|
||||
}
|
||||
|
||||
if(isset($servertype)) {
|
||||
if (isset($servertype)) {
|
||||
|
||||
$query = $sql->prepare("SELECT `id`,`serverid`,`rcon`,`password`,`slots`,`started`,`lendtime` FROM `lendedserver` WHERE `lenderip`=? AND `servertype`=? AND `resellerid`=? LIMIT 1");
|
||||
$query1 = $sql->prepare("SELECT s.`switchID`,g.`rootID` FROM `serverlist` s INNER JOIN `gsswitch` g ON s.`switchID`=g.`id` WHERE s.`id`=? AND s.`resellerid`=? LIMIT 1");
|
||||
@ -439,7 +439,7 @@ if ($ui->escaped('ipblocked', 'post') and $ui->id('xml', 1, 'post') == 1 and !is
|
||||
die('notblocked');
|
||||
}
|
||||
|
||||
if((!isset($servertype) and isset($page_include) and $ui->id('xml', 1, 'post')!=1) or ($ui->id('xml', 1, 'post') == 1 and !$ui->st('w', 'post'))){
|
||||
if ((!isset($servertype) and isset($page_include) and $ui->id('xml', 1, 'post')!=1) or ($ui->id('xml', 1, 'post') == 1 and !$ui->st('w', 'post'))){
|
||||
$lendGameServers = array();
|
||||
$lendVoiceServers = array();
|
||||
|
||||
|
@ -316,7 +316,7 @@ XML;
|
||||
session_start();
|
||||
|
||||
# https://github.com/easy-wi/developer/issues/2
|
||||
if(isset($sID)) {
|
||||
if (isset($sID)) {
|
||||
$query = $sql->prepare("SELECT `logintime`,`language` FROM `userdata_substitutes` WHERE `sID`=? LIMIT 1");
|
||||
$query->execute(array($sID));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
@ -338,13 +338,13 @@ XML;
|
||||
$_SESSION['resellerid'] = $resellerid;
|
||||
$query = $sql->prepare("DELETE FROM `badips` WHERE `badip`=?");
|
||||
$query->execute(array($loguserip));
|
||||
if(isanyadmin($id) or rsellerpermisions($id)) {
|
||||
if (isanyadmin($id) or rsellerpermisions($id)) {
|
||||
$_SESSION['adminid'] = $id;
|
||||
if(isset($_SESSION['adminid']) and is_numeric($_SESSION['adminid'])) $admin_id = $_SESSION['adminid'];
|
||||
if (isset($_SESSION['adminid']) and is_numeric($_SESSION['adminid'])) $admin_id = $_SESSION['adminid'];
|
||||
} else if (isanyuser($id)) {
|
||||
$_SESSION['userid'] = $id;
|
||||
if(isset($_SESSION['userid']) and is_numeric($_SESSION['userid'])) $user_id = $_SESSION['userid'];
|
||||
if(isset($sID)) $_SESSION['sID'] = $sID;
|
||||
if (isset($_SESSION['userid']) and is_numeric($_SESSION['userid'])) $user_id = $_SESSION['userid'];
|
||||
if (isset($sID)) $_SESSION['sID'] = $sID;
|
||||
}
|
||||
$ref = '';
|
||||
if ($ui->url('HTTP_REFERER', 'server')) {
|
||||
@ -356,9 +356,9 @@ XML;
|
||||
if (isset($referrer[1]) and $referrer[1] == 'login.php') $topanel = true;
|
||||
if (!isset($user_id) and !isset($admin_id)) {
|
||||
header('Location: login.php&r=lo');
|
||||
} else if(isset($user_id)) {
|
||||
} else if (isset($user_id)) {
|
||||
redirect('userpanel.php');
|
||||
} else if(isset($admin_id)) {
|
||||
} else if (isset($admin_id)) {
|
||||
$folders=explode("/",$ui->server['SCRIPT_NAME']);
|
||||
$amount=count($folders)-1;
|
||||
$i = 0;
|
||||
@ -371,7 +371,7 @@ XML;
|
||||
$query = $sql->prepare("UPDATE `settings` SET `paneldomain`=? WHERE `resellerid`=0 LIMIT 1");
|
||||
$query->execute(array($webhostdomain));
|
||||
$params=@json_decode(licenceRequest(true));
|
||||
if(isanyadmin($admin_id) or rsellerpermisions($admin_id)) {
|
||||
if (isanyadmin($admin_id) or rsellerpermisions($admin_id)) {
|
||||
redirect('admin.php');
|
||||
} else {
|
||||
redirect('login.php&r=lo');
|
||||
|
@ -81,7 +81,7 @@ if ($ui->ipport('serveraddress', 'post') or ($ui->ip('ip', 'get') and $ui->port(
|
||||
if (isset($serveraddress)) {
|
||||
$ipvalue = $serveraddress;
|
||||
}
|
||||
if(isset($ip) and isset($port)) {
|
||||
if (isset($ip) and isset($port)) {
|
||||
$query = $sql->prepare("SELECT g.`protected`,g.`psince`,g.`queryName`,g.`queryNumplayers`,g.`queryMaxplayers`,g.`queryMap`,u.`cname`,t.`description` FROM `gsswitch` g INNER JOIN `userdata` u ON g.`userid`=u.`id` INNER JOIN `serverlist` s ON g.`serverid`=s.`id` INNER JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE g.`serverip`=? AND g.`port`=? LIMIT 1");
|
||||
$query->execute(array($ip, $port));
|
||||
$logs = array();
|
||||
|
@ -44,7 +44,7 @@ include(EASYWIDIR . '/stuff/settings.php');
|
||||
$die = false;
|
||||
if (!isset($admin_id) and !isset($user_id)) {
|
||||
redirect('login.php');
|
||||
} else if(isset($admin_id)) {
|
||||
} else if (isset($admin_id)) {
|
||||
$pa=User_Permissions($admin_id);
|
||||
} else if (isset($user_id)) {
|
||||
$pa=User_Permissions($user_id);
|
||||
@ -178,7 +178,7 @@ if ($ui->smallletters('w',5, 'get') == 'check') {
|
||||
require_once IncludeTemplate($template_to_use,'ajax_admin_mysql_server.tpl');
|
||||
} else if ($ui->st('d', 'get')=="tr" and $ui->st('w', 'get')) {
|
||||
if ($ui->st('w', 'get')=="su") {
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `ips` FROM `resellerdata`");
|
||||
$query->execute();
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -204,13 +204,13 @@ if ($ui->smallletters('w',5, 'get') == 'check') {
|
||||
$data[] = '<option>'.$subnet.'</option>';
|
||||
}
|
||||
} else if ($ui->st('w', 'get')=="rs") {
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `id`,`cname` FROM `userdata` WHERE `accounttype`='r' AND `id`=`resellerid`");
|
||||
$query->execute();
|
||||
}
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) $data[] = '<option value='.$row['id'].'>'.$row['cname'].'</option>';
|
||||
} else if ($ui->st('w', 'get')=="us") {
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `id`,`cname` FROM `userdata` WHERE `accounttype`='r'");
|
||||
$query->execute();
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -221,7 +221,7 @@ if ($ui->smallletters('w',5, 'get') == 'check') {
|
||||
$data[] = '<option value='.$row['id'].'>'.$row['cname'].'</option>';
|
||||
}
|
||||
} else if ($ui->st('w', 'get')=="se") {
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT c.`id`,u.`cname` FROM `virtualcontainer` c LEFT JOIN `userdata` u ON c.`userid`=u.`id` ORDER BY u.`id`,c.`id`");
|
||||
$query->execute();
|
||||
} else if ($reseller_id==$admin_id){
|
||||
@ -234,7 +234,7 @@ if ($ui->smallletters('w',5, 'get') == 'check') {
|
||||
foreach ($pselect->fetchAll(PDO::FETCH_ASSOC) as $row) $data[] = '<option value='.$row['id'].'>'.$row['cname'] . '-' . $row['id'].'</option>';
|
||||
} else if ($ui->st('w', 'get')=="ip") {
|
||||
$userips = array();
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `ips` FROM `resellerdata`");
|
||||
$query->execute();
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -271,7 +271,7 @@ if ($ui->smallletters('w',5, 'get') == 'check') {
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) $data[] = '<option value='.$row['id'].'>'.$row['ssh2ip'].'</option>';
|
||||
}
|
||||
require_once IncludeTemplate($template_to_use,'ajax_admin_voice_stats.tpl');
|
||||
} else if ($ui->username('distro','50', 'get') and $ui->id('id',19, 'get') and ($pa['vserversettings'] or $pa['root']) and $reseller_id==0) {
|
||||
} else if ($ui->username('distro','50', 'get') and $ui->id('id',19, 'get') and ($pa['vserversettings'] or $pa['root']) and $reseller_id == 0) {
|
||||
$pselect = $sql->prepare("SELECT `pxeautorun` FROM `resellerimages` WHERE `bitversion`=? AND `distro`=?");
|
||||
$pselect->execute(array($ui->id('id',19, 'get'), $ui->username('distro','50', 'get')));
|
||||
$usedpxeautorun = array();
|
||||
@ -334,7 +334,7 @@ if ($ui->smallletters('w',5, 'get') == 'check') {
|
||||
?>
|
||||
<select name="anticheat">
|
||||
<option value="1"><?php echo $anticheatsoft . ' ' . $sprache->on;?></option>
|
||||
<?php if (!$ui->username('short','50', 'get')){ ?><option value="2" <?php if($anticheat=="2") echo 'selected="selected"';?>><?php echo $anticheatsoft . ' ' . $sprache->off2;?></option><?php } ?>
|
||||
<?php if (!$ui->username('short','50', 'get')){ ?><option value="2" <?php if ($anticheat=="2") echo 'selected="selected"';?>><?php echo $anticheatsoft . ' ' . $sprache->off2;?></option><?php } ?>
|
||||
<?php echo $eac;?>
|
||||
</select>
|
||||
<?php
|
||||
|
@ -53,7 +53,7 @@ if ($ui->id('id', 10, 'get')) {
|
||||
$reseller_id = $admin_id;
|
||||
}
|
||||
|
||||
if(isset($admin_id)) {
|
||||
if (isset($admin_id)) {
|
||||
|
||||
$query = $sql->prepare("SELECT u.`id`,u.`cname` FROM `gsswitch` g LEFT JOIN `userdata` u ON g.`userid`=u.`id` WHERE g.`id`=? AND g.`resellerid`=? LIMIT 1");
|
||||
$query->execute(array($ui->id('id', 10, 'get'), $reseller_id));
|
||||
|
@ -1009,7 +1009,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR'] == $ip) {
|
||||
$removedeadvoiceserver->execute(array($ts3id));
|
||||
} else if ($active == 'Y' and $vs != 'online' and $olduptime>1 and $olduptime != null) {
|
||||
$notified++;
|
||||
if($notified>=$ts3masternotified == $resellersettings[$resellerid]['down_checks']){
|
||||
if ($notified>=$ts3masternotified == $resellersettings[$resellerid]['down_checks']){
|
||||
print "TS3 server $address not running. Starting it.\r\n";
|
||||
$connection->StartServer($virtualserver_id);
|
||||
}
|
||||
@ -1025,7 +1025,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR'] == $ip) {
|
||||
}
|
||||
if (isset($ts3id)) {
|
||||
$flagPassword = 'N';
|
||||
if(isset($sd['virtualserver_flag_password']) and $sd['virtualserver_flag_password'] == 1) {
|
||||
if (isset($sd['virtualserver_flag_password']) and $sd['virtualserver_flag_password'] == 1) {
|
||||
$flagPassword = 'Y';
|
||||
}
|
||||
$query2 = $sql->prepare("UPDATE `voice_server` SET `usedslots`=?,`uptime`=?,`notified`=?,`filetraffic`=?,`lastfiletraffic`=?,`queryName`=?,`queryNumplayers`=?,`queryMaxplayers`=?,`queryPassword`=?,`queryUpdatetime`=NOW() WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
|
@ -43,7 +43,7 @@ $sprache = getlanguagefile('images',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -84,26 +84,26 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
if ($ui->smallletters('action',2, 'post') == 'ad' and $ui->id('import',1, 'post')!=1) {
|
||||
$fail = 0;
|
||||
$template_file = '';
|
||||
if(!$ui->gamestring('shorten', 'post')) {
|
||||
if (!$ui->gamestring('shorten', 'post')) {
|
||||
$template_file .="Shorten<br />";
|
||||
$fail = 1;
|
||||
}
|
||||
if(!$ui->smallletters('type',99, 'post')) {
|
||||
if (!$ui->smallletters('type',99, 'post')) {
|
||||
$template_file .="type<br />";
|
||||
$fail = 1;
|
||||
}
|
||||
if(!$ui->gamestring('addon', 'post')) {
|
||||
if (!$ui->gamestring('addon', 'post')) {
|
||||
$template_file .="Addon<br />";
|
||||
$fail = 1;
|
||||
}
|
||||
if(!$ui->description('menudescription', 'post')) {
|
||||
if (!$ui->description('menudescription', 'post')) {
|
||||
$template_file .="Menuescription<br />";
|
||||
$fail = 1;
|
||||
}
|
||||
if(!$ui->active('paddon', 'post')) {
|
||||
if (!$ui->active('paddon', 'post')) {
|
||||
$fail = 1;
|
||||
}
|
||||
if(!$ui->id('depending',19, 'post') and $ui->escaped('depending', 'post') != 0) {
|
||||
if (!$ui->id('depending',19, 'post') and $ui->escaped('depending', 'post') != 0) {
|
||||
$fail = 1;
|
||||
}
|
||||
if ($fail!=1){
|
||||
@ -118,7 +118,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$configs = $ui->startparameter('configs', 'post');
|
||||
$cmd = $ui->startparameter('cmd', 'post');
|
||||
$rmcmd = $ui->startparameter('rmcmd', 'post');
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query2 = $sql->prepare("SELECT `id` FROM `userdata` WHERE `accounttype`='r'");
|
||||
$query2->execute();
|
||||
$query = $sql->prepare("SELECT COUNT(`id`) AS `amount` FROM `addons` WHERE ((`shorten`=? AND `addon`=?) OR `folder`=?) AND `resellerid`=? LIMIT 1");
|
||||
@ -233,16 +233,16 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
if (@$xml->load($_FILES["file"]["tmp_name"]) !== false) {
|
||||
$childNodes = $xml->documentElement;
|
||||
foreach ($childNodes->childNodes AS $node) {
|
||||
if($node->nodeName == 'active') $active = $node->nodeValue;
|
||||
if($node->nodeName == 'paddon ') $paddon = $node->nodeValue;
|
||||
if($node->nodeName == 'shorten') $shorten = $node->nodeValue;
|
||||
if($node->nodeName == 'addon') $addon = $node->nodeValue;
|
||||
if($node->nodeName == 'type') $type = $node->nodeValue;
|
||||
if($node->nodeName == 'folder') $folder = $node->nodeValue;
|
||||
if($node->nodeName == 'menudescription') $menudescription = $node->nodeValue;
|
||||
if($node->nodeName == 'configs') $configs = $node->configs;
|
||||
if($node->nodeName == 'cmd') $cmd = $node->nodeValue;
|
||||
if($node->nodeName == 'rmcmd') $rmcmd = $node->nodeValue;
|
||||
if ($node->nodeName == 'active') $active = $node->nodeValue;
|
||||
if ($node->nodeName == 'paddon ') $paddon = $node->nodeValue;
|
||||
if ($node->nodeName == 'shorten') $shorten = $node->nodeValue;
|
||||
if ($node->nodeName == 'addon') $addon = $node->nodeValue;
|
||||
if ($node->nodeName == 'type') $type = $node->nodeValue;
|
||||
if ($node->nodeName == 'folder') $folder = $node->nodeValue;
|
||||
if ($node->nodeName == 'menudescription') $menudescription = $node->nodeValue;
|
||||
if ($node->nodeName == 'configs') $configs = $node->configs;
|
||||
if ($node->nodeName == 'cmd') $cmd = $node->nodeValue;
|
||||
if ($node->nodeName == 'rmcmd') $rmcmd = $node->nodeValue;
|
||||
}
|
||||
}
|
||||
} catch(Exception $error) {
|
||||
@ -350,26 +350,26 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
} else if ($action == 'md'){
|
||||
$fail = 0;
|
||||
$template_file = '';
|
||||
if(!$ui->gamestring('shorten', 'post')) {
|
||||
if (!$ui->gamestring('shorten', 'post')) {
|
||||
$template_file .="Shorten<br />";
|
||||
$fail = 1;
|
||||
}
|
||||
if(!$ui->smallletters('type',99, 'post')) {
|
||||
if (!$ui->smallletters('type',99, 'post')) {
|
||||
$template_file .="type<br />";
|
||||
$fail = 1;
|
||||
}
|
||||
if(!$ui->gamestring('addon', 'post')) {
|
||||
if (!$ui->gamestring('addon', 'post')) {
|
||||
$template_file .="Addon<br />";
|
||||
$fail = 1;
|
||||
}
|
||||
if(!$ui->description('menudescription', 'post')) {
|
||||
if (!$ui->description('menudescription', 'post')) {
|
||||
$template_file .="Menuescription<br />";
|
||||
$fail = 1;
|
||||
}
|
||||
if(!$ui->active('paddon', 'post')) {
|
||||
if (!$ui->active('paddon', 'post')) {
|
||||
$fail = 1;
|
||||
}
|
||||
if(!$ui->id('depending',19, 'post') and $ui->escaped('depending', 'post') != 0) {
|
||||
if (!$ui->id('depending',19, 'post') and $ui->escaped('depending', 'post') != 0) {
|
||||
$fail = 1;
|
||||
}
|
||||
if ($fail!=1){
|
||||
@ -513,7 +513,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=ad&d=md&o='.$o.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -212,7 +212,7 @@ if ($ui->st('action', 'post') and !token(true)) {
|
||||
}
|
||||
$languageTexts[$row['lang']] = $row['text'];
|
||||
}
|
||||
if(!isset($name)) {
|
||||
if (!isset($name)) {
|
||||
$name = $file;
|
||||
}
|
||||
$template_file = 'admin_modules_md.tpl';
|
||||
|
@ -126,7 +126,7 @@ if (isset($ui->get['q'])) {
|
||||
}
|
||||
}
|
||||
if ($us == true) {
|
||||
if($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `cname`,CONCAT(`vname`,' ',`name`) AS `username` FROM `userdata` WHERE (`id`=? OR `externalID`=?) ".notIN($usIDs,'`id`'));
|
||||
$query->execute(array($id,$id));
|
||||
} else {
|
||||
@ -160,7 +160,7 @@ if (isset($ui->get['q'])) {
|
||||
}
|
||||
if ($ro == true) {
|
||||
$notIN=notIN($roIDs,'r.`id`');
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT r.`ip`,u.`cname`,CONCAT(`vname`,' ',`name`) AS `username` FROM `rserverdata` r LEFT JOIN `userdata` u ON r.`resellerid`=u.`id` WHERE (r.`id`=? OR r.`externalID`=?) AND r.`hostid`=0 $notIN");
|
||||
$query->execute(array($id,$id));
|
||||
} else {
|
||||
@ -174,7 +174,7 @@ if (isset($ui->get['q'])) {
|
||||
}
|
||||
if ($vs == true) {
|
||||
$notIN=notIN($vsIDs,'r.`id`');
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT v.`ip`,u.`cname`,CONCAT(`vname`,' ',`name`) AS `username` FROM `virtualcontainer` v INNER JOIN `userdata` u ON v.`userid`=u.`id` WHERE (v.`id`=? OR v.`externalID`=?) $notIN");
|
||||
$query->execute(array($id,$id));
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -209,7 +209,7 @@ if (isset($ui->get['q'])) {
|
||||
}
|
||||
if ($ro == true) {
|
||||
$notIN=notIN($roIDs,'r.`id`');
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT r.`id`,u.`cname`,CONCAT(`vname`,' ',`name`) AS `username` FROM `rserverdata` r LEFT JOIN `userdata` u ON r.`resellerid`=u.`id` WHERE r.`hostid`=0 $notIN AND r.`ip`=?");
|
||||
$query->execute(array($ip));
|
||||
} else {
|
||||
@ -223,7 +223,7 @@ if (isset($ui->get['q'])) {
|
||||
}
|
||||
if ($vs == true) {
|
||||
$notIN=notIN($vsIDs,'r.`id`');
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT v.`id`,v.`ip`,u.`cname`,CONCAT(`vname`,' ',`name`) AS `username` FROM `virtualcontainer` v INNER JOIN `userdata` u ON v.`userid`=u.`id` WHERE v.`ip`=? $notIN");
|
||||
$query->execute(array($ip));
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -295,7 +295,7 @@ if (isset($ui->get['q'])) {
|
||||
}
|
||||
}
|
||||
if ($us == true) {
|
||||
if($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$notIN=(count($usIDs)>0) ? '`id` NOT IN('.implode(',',$usIDs).') AND ' : '';
|
||||
$query = $sql->prepare("SELECT `id`,`cname`,CONCAT(`vname`,' ',`name`) AS `username` FROM `userdata` WHERE $notIN (`cname` LIKE :word OR vname LIKE :word OR name LIKE :word)");
|
||||
$query->execute(array(':word' => $word));
|
||||
|
@ -126,7 +126,7 @@ if ($reseller_id == 0) {
|
||||
$crached_hosts = $query->rowCount();
|
||||
$crashedArray['virtualHosts'] = $crached_hosts;
|
||||
$feedArray = array();
|
||||
if($ui->smallletters('w',2, 'get') == 'da' or (!$ui->smallletters('w',2, 'get') and !$ui->smallletters('d',2, 'get'))) {
|
||||
if ($ui->smallletters('w',2, 'get') == 'da' or (!$ui->smallletters('w',2, 'get') and !$ui->smallletters('d',2, 'get'))) {
|
||||
|
||||
|
||||
if ($reseller_id == 0 and $admin_id == $reseller_id) {
|
||||
|
@ -49,7 +49,7 @@ $logusertype = 'admin';
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
$lookupID = 0;
|
||||
|
@ -353,7 +353,7 @@ if (!isset($success['false']) and array_value_exists('action','add',$data) and 1
|
||||
$query = $sql->prepare("SELECT COUNT(`jobID`) AS `amount` FROM `jobs` WHERE `affectedID`=? AND `resellerID`=? AND `action`='dl' AND (`status` IS NULL OR `status`='1') LIMIT 1");
|
||||
$query->execute(array($localID,$resellerID));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if($row['amount']>0) $success['false'][] = 'Server is marked for deletion';
|
||||
if ($row['amount']>0) $success['false'][] = 'Server is marked for deletion';
|
||||
}
|
||||
$updateArray = array();
|
||||
$eventualUpdate = '';
|
||||
@ -455,7 +455,7 @@ if (!isset($success['false']) and array_value_exists('action','add',$data) and 1
|
||||
$insert->execute(array($hostID,$resellerID,$localID,$userID,$name,json_encode(array('newActive' => $active,'newPort' => $port)),$resellerID));
|
||||
}
|
||||
}
|
||||
if(!isset($oldSlots)) {
|
||||
if (!isset($oldSlots)) {
|
||||
$success['false'][] = 'No server can be found to edit';
|
||||
}
|
||||
} else {
|
||||
@ -476,7 +476,7 @@ if (!isset($success['false']) and array_value_exists('action','add',$data) and 1
|
||||
$hostID = $row['rootID'];
|
||||
$hostExternalID = $row['rootID'];
|
||||
}
|
||||
if(isset($localID) and isset($name)) {
|
||||
if (isset($localID) and isset($name)) {
|
||||
$query = $sql->prepare("UPDATE `gsswitch` SET `jobPending`='Y' WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($localID,$resellerID));
|
||||
$query = $sql->prepare("UPDATE `jobs` SET `status`='2' WHERE `type`='gs' AND (`status` IS NULL OR `status`='1') AND `affectedID`=? and `resellerID`=?");
|
||||
@ -536,7 +536,7 @@ if (!isset($success['false']) and array_value_exists('action','add',$data) and 1
|
||||
$localID = $row['id'];
|
||||
$name = $row['serverip'] . ':' . $row['port'];
|
||||
}
|
||||
if(isset($localID) and isset($userID)) {
|
||||
if (isset($localID) and isset($userID)) {
|
||||
$query = $sql->prepare("UPDATE `gsswitch` SET `jobPending`='Y' WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($localID,$resellerID));
|
||||
$query = $sql->prepare("UPDATE `jobs` SET `status`='2' WHERE `type`='gs' AND (`status` IS NULL OR `status`='1') AND (`action`='re' OR `action`='st') AND `affectedID`=? and `resellerID`=?");
|
||||
|
@ -48,7 +48,7 @@ $logusertype = 'admin';
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
$lookupID = 0;
|
||||
@ -170,7 +170,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$query = $sql->prepare("SELECT `ssl`,`domain`,`file` FROM `api_import` WHERE `importID`=? AND `resellerID`=? LIMIT 1");
|
||||
$query->execute(array($id,$reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if($row['ssl'] == 'Y') {
|
||||
if ($row['ssl'] == 'Y') {
|
||||
$ssl='https://';
|
||||
} else {
|
||||
$ssl='http://';
|
||||
@ -255,7 +255,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$imgName='16_bad';
|
||||
$imgAlt='Inactive';
|
||||
}
|
||||
if($row['ssl'] == 'Y') {
|
||||
if ($row['ssl'] == 'Y') {
|
||||
$ssl='https://';
|
||||
} else {
|
||||
$ssl='http://';
|
||||
@ -264,7 +264,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=ui&o='.$o.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -150,7 +150,7 @@ if (!isset($success['false']) and array_value_exists('action','add',$data)) {
|
||||
$query = $sql->prepare("SELECT COUNT(`jobID`) AS `amount` FROM `jobs` WHERE `affectedID`=? AND `resellerID`=? AND `action`='dl' AND (`status` IS NULL OR `status`='1') LIMIT 1");
|
||||
$query->execute(array($localID,$resellerID));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if($row['amount']>0) {
|
||||
if ($row['amount']>0) {
|
||||
$success['false'][] = 'Database is already marked for deletion';
|
||||
}
|
||||
}
|
||||
@ -163,7 +163,7 @@ if (!isset($success['false']) and array_value_exists('action','add',$data)) {
|
||||
$insert->execute(array($hostID,$resellerID,$localID,$userID,$name,$resellerID));
|
||||
}
|
||||
}
|
||||
if(!isset($localID)) {
|
||||
if (!isset($localID)) {
|
||||
$success['false'][] = 'No database can be found to edit';
|
||||
}
|
||||
} else {
|
||||
@ -188,7 +188,7 @@ if (!isset($success['false']) and array_value_exists('action','add',$data)) {
|
||||
$name = $row['dbname'];
|
||||
$hostID = $row['sid'];
|
||||
}
|
||||
if(isset($localID) and isset($name)) {
|
||||
if (isset($localID) and isset($name)) {
|
||||
$query = $sql->prepare("UPDATE `mysql_external_dbs` SET `jobPending`='Y' WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($localID,$resellerID));
|
||||
$update = $sql->prepare("UPDATE `jobs` SET `status`='2' WHERE (`status` IS NULL OR `status`='1') AND `affectedID`=? and `resellerID`=?");
|
||||
|
@ -45,7 +45,7 @@ $sprache = getlanguagefile('api',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
$lookupID = 0;
|
||||
|
@ -196,7 +196,7 @@ if (array_value_exists('action','add',$data)) {
|
||||
$name = $row['cname'];
|
||||
$oldactive = $row['active'];
|
||||
}
|
||||
if(isset($localID)) {
|
||||
if (isset($localID)) {
|
||||
$what = array();
|
||||
if (isset($data['password']) and !in_array($data['password'],$bad)) {
|
||||
$password = $data['password'];
|
||||
@ -341,7 +341,7 @@ if (array_value_exists('action','add',$data)) {
|
||||
$localID = $row['id'];
|
||||
$name = $row['cname'];
|
||||
}
|
||||
if(isset($localID) and isset($name)) {
|
||||
if (isset($localID) and isset($name)) {
|
||||
$update = $sql->prepare("UPDATE `jobs` SET `status`='2' WHERE (`status` IS NULL OR `status`='1') AND `userID`=? and `resellerID`=?");
|
||||
$update->execute(array($localID,$resellerID));
|
||||
$insert = $sql->prepare("INSERT INTO `jobs` (`api`,`type`,`invoicedByID`,`affectedID`,`userID`,`name`,`status`,`date`,`action`,`resellerid`) VALUES ('A','us',?,?,?,?,NULL,NOW(),'dl',?)");
|
||||
@ -371,7 +371,7 @@ if (array_value_exists('action','add',$data)) {
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$userArray['userdetails'] = $row;
|
||||
}
|
||||
if($query->rowCount()>0) {
|
||||
if ($query->rowCount()>0) {
|
||||
$list = true;
|
||||
$tempArray = array();
|
||||
$query = $sql->prepare("SELECT `id`,`active`,`queryUpdatetime`,`queryPassword`,`queryMap`,`queryMaxplayers`,`queryNumplayers`,`queryName`,`port5`,`serverid`,`pallowed`,`eacallowed`,`protected`,`brandname`,`tvenable`,`war`,`psince`,`serverip`,`port`,`port2`,`port3`,`port4`,`minram`,`maxram`,`slots`,`taskset`,`cores`,`lendserver`,`externalID`,`jobPending` FROM `gsswitch` WHERE `userid`=? AND `resellerid`=? ORDER BY `serverip`,`port`");
|
||||
|
@ -196,9 +196,9 @@ if (!isset($success['false']) and array_value_exists('action','add',$data) and $
|
||||
$localID = $sql->lastInsertId();
|
||||
$localServerID = $localID;
|
||||
if (isid($localID,10)) {
|
||||
if($usedns == 'Y' and isset($data['tsdns']) and active_check($data['tsdns'])) {
|
||||
if ($usedns == 'Y' and isset($data['tsdns']) and active_check($data['tsdns'])) {
|
||||
$tsdns = $data['tsdns'];
|
||||
} else if($usedns == 'Y' and (!isset($data['tsdns']) or !active_check($data['tsdns']))) {
|
||||
} else if ($usedns == 'Y' and (!isset($data['tsdns']) or !active_check($data['tsdns']))) {
|
||||
$tsdns = 'Y';
|
||||
} else {
|
||||
$tsdns = 'N';
|
||||
@ -266,7 +266,7 @@ if (!isset($success['false']) and array_value_exists('action','add',$data) and $
|
||||
$query = $sql->prepare("SELECT COUNT(`jobID`) AS `amount` FROM `jobs` WHERE `affectedID`=? AND `resellerID`=? AND `action`='dl' AND (`status` IS NULL OR `status`='1') LIMIT 1");
|
||||
$query->execute(array($localID,$resellerID));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if($row['amount']>0) {
|
||||
if ($row['amount']>0) {
|
||||
$success['false'][] = 'Server is marked for deletion';
|
||||
}
|
||||
}
|
||||
@ -307,60 +307,60 @@ if (!isset($success['false']) and array_value_exists('action','add',$data) and $
|
||||
$eventualUpdate .= ',`maxtraffic`=?';
|
||||
$maxtraffic = $data['maxtraffic'];
|
||||
}
|
||||
if(isset($data['forcebanner']) and active_check($data['forcebanner'])) {
|
||||
if (isset($data['forcebanner']) and active_check($data['forcebanner'])) {
|
||||
$updateArray[] = $data['forcebanner'];
|
||||
$eventualUpdate .= ',`forcebanner`=?';
|
||||
$forcebanner = $data['forcebanner'];
|
||||
}
|
||||
if(isset($data['forcebutton']) and active_check($data['forcebutton'])) {
|
||||
if (isset($data['forcebutton']) and active_check($data['forcebutton'])) {
|
||||
$updateArray[] = $data['forcebutton'];
|
||||
$eventualUpdate .= ',`forcebutton`=?';
|
||||
$forcebutton = $data['forcebutton'];
|
||||
}
|
||||
if(isset($data['forceservertag']) and active_check($data['forceservertag'])) {
|
||||
if (isset($data['forceservertag']) and active_check($data['forceservertag'])) {
|
||||
$updateArray[] = $data['forceservertag'];
|
||||
$eventualUpdate .= ',`forceservertag`=?';
|
||||
$forceservertag = $data['forceservertag'];
|
||||
}
|
||||
if(isset($data['forcewelcome']) and active_check($data['forcewelcome'])) {
|
||||
if (isset($data['forcewelcome']) and active_check($data['forcewelcome'])) {
|
||||
$updateArray[] = $data['forcewelcome'];
|
||||
$eventualUpdate .= ',`forcewelcome`=?';
|
||||
$forcewelcome = $data['forcewelcome'];
|
||||
}
|
||||
if(isset($data['lendserver']) and active_check($data['lendserver'])) {
|
||||
if (isset($data['lendserver']) and active_check($data['lendserver'])) {
|
||||
$updateArray[] = $data['lendserver'];
|
||||
$eventualUpdate .= ',`lendserver`=?';
|
||||
$lendserver = $data['lendserver'];
|
||||
}
|
||||
if(isset($data['backup']) and active_check($data['backup'])) {
|
||||
if (isset($data['backup']) and active_check($data['backup'])) {
|
||||
$updateArray[] = $data['backup'];
|
||||
$eventualUpdate .= ',`backup`=?';
|
||||
$backup = $data['backup'];
|
||||
}
|
||||
if(isset($data['flexSlots']) and active_check($data['flexSlots'])) {
|
||||
if (isset($data['flexSlots']) and active_check($data['flexSlots'])) {
|
||||
$updateArray[] = $data['flexSlots'];
|
||||
$eventualUpdate .= ',`flexSlots`=?';
|
||||
$flexSlots = $data['flexSlots'];
|
||||
}
|
||||
if(isset($data['flexSlotsFree']) and isid($data['flexSlotsFree'],11)) {
|
||||
if (isset($data['flexSlotsFree']) and isid($data['flexSlotsFree'],11)) {
|
||||
$updateArray[] = $data['flexSlotsFree'];
|
||||
$eventualUpdate .= ',`flexSlotsFree`=?';
|
||||
$flexSlotsFree = $data['flexSlotsFree'];
|
||||
}
|
||||
if(isset($data['flexSlotsPercent']) and isid($data['flexSlotsPercent'],3)) {
|
||||
if (isset($data['flexSlotsPercent']) and isid($data['flexSlotsPercent'],3)) {
|
||||
$updateArray[] = $data['flexSlotsPercent'];
|
||||
$eventualUpdate .= ',`flexSlotsPercent`=?';
|
||||
$flexSlotsPercent = $data['flexSlotsPercent'];
|
||||
}
|
||||
if(isset($data['tsdns']) and active_check($data['tsdns'])) {
|
||||
if (isset($data['tsdns']) and active_check($data['tsdns'])) {
|
||||
$tsdns = $data['tsdns'];
|
||||
}
|
||||
if(isset($data['dns']) and $tsdns == 'Y' and isdomain($data['dns'])) {
|
||||
if (isset($data['dns']) and $tsdns == 'Y' and isdomain($data['dns'])) {
|
||||
$updateArray[] = $data['dns'];
|
||||
$eventualUpdate .= ',`dns`=?';
|
||||
$dns = $data['dns'];
|
||||
}
|
||||
if(isset($data['autoRestart']) and active_check($data['autoRestart'])) {
|
||||
if (isset($data['autoRestart']) and active_check($data['autoRestart'])) {
|
||||
$updateArray[] = $data['autoRestart'];
|
||||
$eventualUpdate .= ',`autoRestart`=?';
|
||||
$flexSlots = $data['autoRestart'];
|
||||
@ -380,7 +380,7 @@ if (!isset($success['false']) and array_value_exists('action','add',$data) and $
|
||||
$insert->execute(array($hostID,$resellerID,$localID,$userID,$name,$resellerID));
|
||||
}
|
||||
}
|
||||
if(!isset($oldSlots)) {
|
||||
if (!isset($oldSlots)) {
|
||||
$success['false'][] = 'No server can be found to edit';
|
||||
}
|
||||
} else {
|
||||
@ -400,7 +400,7 @@ if (!isset($success['false']) and array_value_exists('action','add',$data) and $
|
||||
$name = $row['ip'] . ':' . $row['port'];
|
||||
$hostID = $row['hostID'];
|
||||
}
|
||||
if(isset($localID) and isset($name)) {
|
||||
if (isset($localID) and isset($name)) {
|
||||
$query = $sql->prepare("UPDATE `voice_server` SET `jobPending`='Y' WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($localID,$resellerID));
|
||||
$query = $sql->prepare("UPDATE `jobs` SET `status`='2' WHERE `type`='vo' AND (`status` IS NULL OR `status`='1') AND `affectedID`=? and `resellerID`=?");
|
||||
|
@ -216,7 +216,7 @@ class masterServer {
|
||||
if ($updateType == 1) {
|
||||
$this->steamCmdTotal['sync'][$lookUpAppID] = $row['shorten'];
|
||||
|
||||
} else if($updateType == 2) {
|
||||
} else if ($updateType == 2) {
|
||||
$this->steamCmdTotal['nosync'][$lookUpAppID] = $row['shorten'];
|
||||
}
|
||||
|
||||
@ -327,7 +327,7 @@ class masterServer {
|
||||
$mc = 'mcTotal';
|
||||
|
||||
foreach (array_unique(array_merge($this->steamCmdTotal['sync'], $this->steamCmdTotal['nosync'], $this->hldsTotal['sync'], $this->hldsTotal['nosync'], $this->noSteam['sync'], $this->noSteam['nosync'])) as $shorten) {
|
||||
if(in_array($shorten, $this->syncList)) {
|
||||
if (in_array($shorten, $this->syncList)) {
|
||||
unset($this->syncList[array_search($shorten, $this->syncList)]);
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ class easyWiRest {
|
||||
$url=str_replace(array('http://','https://',':8080',':80',':443'),'',$url);
|
||||
if (isdomain($url)) {
|
||||
$this->handle=@fsockopen($url,$port,$errno,$errstr,10);
|
||||
if(!$this->handle) return $errstr;
|
||||
if (!$this->handle) return $errstr;
|
||||
return true;
|
||||
} else {
|
||||
return 'Error: Domain';
|
||||
@ -91,8 +91,8 @@ class easyWiRest {
|
||||
}
|
||||
|
||||
private function execSocket ($type,$params,$url) {
|
||||
if($this->handle) {
|
||||
if($type == 'P') {
|
||||
if ($this->handle) {
|
||||
if ($type == 'P') {
|
||||
$send="POST /".$file." HTTP/1.1\r\n";
|
||||
} else {
|
||||
$send="GET $file HTTP/1.1\r\n";
|
||||
@ -100,11 +100,11 @@ class easyWiRest {
|
||||
$send .= "Host: ".$url."\r\n";
|
||||
$send .="User-Agent: easy-wi.com\r\n";
|
||||
$send .= "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n";
|
||||
if(strlen($params)>0) {
|
||||
if (strlen($params)>0) {
|
||||
$send .= "Content-Length: ".strlen($params)."\r\n";
|
||||
}
|
||||
$send .= "Connection: Close\r\n\r\n";
|
||||
if(strlen($postParams)>0) $send .= $params;
|
||||
if (strlen($postParams)>0) $send .= $params;
|
||||
fwrite($this->handle,$send);
|
||||
$buffer = '';
|
||||
while (!feof($this->handle)) $buffer.=fgets($this->handle,4096);
|
||||
|
@ -71,7 +71,7 @@ class rootServer {
|
||||
$hostID = 0;
|
||||
$userID = 0;
|
||||
$resellerID = 0;
|
||||
if(isid($imageID,10)) {
|
||||
if (isid($imageID,10)) {
|
||||
$query = $this->sql->prepare("SELECT `distro`,`bitversion` FROM `resellerimages` WHERE `id`=? AND `active`='Y' LIMIT 1");
|
||||
$query->execute(array($imageID));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
@ -206,7 +206,7 @@ class rootServer {
|
||||
$query = $this->sql->prepare("SELECT *,AES_DECRYPT(`port`,:aeskey) AS `dport`,AES_DECRYPT(`user`,:aeskey) AS `duser`,AES_DECRYPT(`pass`,:aeskey) AS `dpass` FROM `rootsPXE` WHERE `active`='Y' AND `id`=:pxeID LIMIT 1");
|
||||
$query->execute(array(':aeskey' => $this->aeskey,':pxeID' => $this->ID[$type][$ID]['pxeID']));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if(!isset($this->PXEData[$row['id']])){
|
||||
if (!isset($this->PXEData[$row['id']])){
|
||||
$this->PXEData[$row['id']]['ip'] = $row['ip'];
|
||||
$this->PXEData[$row['id']]['port'] = $row['dport'];
|
||||
$this->PXEData[$row['id']]['user'] = $row['duser'];
|
||||
@ -225,7 +225,7 @@ class rootServer {
|
||||
$query = $this->sql->prepare("SELECT *,AES_DECRYPT(`port`,:aeskey) AS `dport`,AES_DECRYPT(`user`,:aeskey) AS `duser`,AES_DECRYPT(`pass`,:aeskey) AS `dpass` FROM `rootsPXE` WHERE `active`='Y' ORDER BY RAND() LIMIT 1");
|
||||
$query->execute(array(':aeskey' => $this->aeskey));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if(!isset($this->PXEData[$row['id']])){
|
||||
if (!isset($this->PXEData[$row['id']])){
|
||||
$this->PXEData[$row['id']]['ip'] = $row['ip'];
|
||||
$this->PXEData[$row['id']]['port'] = $row['dport'];
|
||||
$this->PXEData[$row['id']]['user'] = $row['duser'];
|
||||
@ -381,7 +381,7 @@ class rootServer {
|
||||
$i++;
|
||||
}
|
||||
$file .= '/';
|
||||
if($this->ID['dedicated'][$a['id']]['apiRequestType'] == 'G') {
|
||||
if ($this->ID['dedicated'][$a['id']]['apiRequestType'] == 'G') {
|
||||
$file .= $requestString;
|
||||
} else {
|
||||
foreach (explode('&',str_replace(array('&','?'), array('&',''),$requestString)) as $param) {
|
||||
@ -470,7 +470,7 @@ class rootServer {
|
||||
$this->execCmd($cmd,$ssh2);
|
||||
foreach ($h['actions'] as $v) {
|
||||
$dir='/vmfs/volumes/'.$this->ID['vmware'][$v['id']]['mountpoint']. '/' . $this->ID['vmware'][$v['id']]['hostname'];
|
||||
if(in_array($v['action'], array('md','dl','st','ri','re'))) {
|
||||
if (in_array($v['action'], array('md','dl','st','ri','re'))) {
|
||||
print "Step 1: Stop and remove if needed\r\n";
|
||||
$cmd="i(){ echo `vim-cmd vmsvc/getallvms 2> /dev/null | grep -v 'Skipping' | grep '".$this->ID['vmware'][$v['id']]['hostname'].".vmx' | awk '{print $1}'`;}; o(){ vim-cmd vmsvc/power.off `i ".$this->ID['vmware'][$v['id']]['hostname']."`; vim-cmd vmsvc/unregister `i ".$this->ID['vmware'][$v['id']]['hostname']."`;}; o;";
|
||||
if (in_array($v['action'], array('dl','ri','re'))) $cmd.=" rm -rf /vmfs/volumes/".$this->ID['vmware'][$v['id']]['mountpoint']. '/' . $this->ID['vmware'][$v['id']]['hostname'];
|
||||
@ -542,7 +542,7 @@ class rootServer {
|
||||
$vmxFile .= 'vmci0.present = "TRUE"'."\n";
|
||||
$vmxFile .= 'uuid.action = "create"'."\n";
|
||||
$vmxFile .= 'bios.bootOrder = "ethernet0"'."\n";
|
||||
if(fwrite($fp,$vmxFile)) {
|
||||
if (fwrite($fp,$vmxFile)) {
|
||||
print "Step 2: Create/edit vmx file (OK)\r\n";
|
||||
} else {
|
||||
print "Step 2: Create/edit vmx file (FAILED)\r\n";
|
||||
@ -551,7 +551,7 @@ class rootServer {
|
||||
} else {
|
||||
print 'could not open: /vmfs/volumes/'.$this->ID['vmware'][$v['id']]['mountpoint']. '/' . $this->ID['vmware'][$v['id']]['hostname']. '/' . $this->ID['vmware'][$v['id']]['hostname'].'.vmx'."\r\n";
|
||||
}
|
||||
if(is_resource($sftp)) fclose($sftp);
|
||||
if (is_resource($sftp)) fclose($sftp);
|
||||
else unset ($sftp);
|
||||
print "Step 3: create volume\r\n";
|
||||
$cmd="a() { vmkfstools -c ".$this->ID['vmware'][$v['id']]['hddsize']." -a lsilogic -d thin /vmfs/volumes/".$this->ID['vmware'][$v['id']]['mountpoint']. '/' . $this->ID['vmware'][$v['id']]['hostname']. '/' . $this->ID['vmware'][$v['id']]['hostname'].".vmdk >/dev/null 2>&1;}; a";
|
||||
|
@ -46,7 +46,7 @@ class ValidateUserinput {
|
||||
return $value;
|
||||
}
|
||||
private function ArrayToObject($array) {
|
||||
if(is_string($array)) {
|
||||
if (is_string($array)) {
|
||||
return $this->magic_quotes($array);
|
||||
} else if (is_array($array)) {
|
||||
$stdClass = new stdClass();
|
||||
@ -103,9 +103,9 @@ class ValidateUserinput {
|
||||
unset($this->env);
|
||||
}
|
||||
private function loop ($check,$function,$type,$length=null) {
|
||||
if(is_string($check) and $length==null and $this->$function($check,$type)) {
|
||||
if (is_string($check) and $length==null and $this->$function($check,$type)) {
|
||||
return $this->$function($check,$type);
|
||||
} else if(is_string($check) and $this->$function($check,$length,$type)) {
|
||||
} else if (is_string($check) and $this->$function($check,$length,$type)) {
|
||||
return $this->$function($check,$length,$type);
|
||||
} else if (is_array($check) or is_object($check)) {
|
||||
$stdClass = new stdClass();
|
||||
@ -136,7 +136,7 @@ class ValidateUserinput {
|
||||
}
|
||||
function url ($value,$type,$object=false) {
|
||||
$check = $this->if_obj_or_str($value,$type,$object);
|
||||
if($check and is_string($check) and filter_var($check,FILTER_VALIDATE_URL)) {
|
||||
if ($check and is_string($check) and filter_var($check,FILTER_VALIDATE_URL)) {
|
||||
return $check;
|
||||
} else if ($check) {
|
||||
return $this->loop($check,'url',$type);
|
||||
@ -144,7 +144,7 @@ class ValidateUserinput {
|
||||
}
|
||||
function domain ($value,$type,$object=false) {
|
||||
$check = $this->if_obj_or_str($value,$type,$object);
|
||||
if($check and is_string($check) and preg_match("/^[\w\d+\-\.]+\.[a-z]{1,5}$/",$check)) {
|
||||
if ($check and is_string($check) and preg_match("/^[\w\d+\-\.]+\.[a-z]{1,5}$/",$check)) {
|
||||
return $check;
|
||||
} else if ($check) {
|
||||
return $this->loop($check,'domain',$type);
|
||||
@ -152,7 +152,7 @@ class ValidateUserinput {
|
||||
}
|
||||
function domainPath ($value,$type,$object=false) {
|
||||
$check = $this->if_obj_or_str($value,$type,$object);
|
||||
if($check and is_string($check) and preg_match("/^[\w\d+\-\.]+\.[a-zA-Z]{1,5}(|\:[0-9]{1,5})(|\/[\w\.\/\-\_]{0,})$/",$check)) {
|
||||
if ($check and is_string($check) and preg_match("/^[\w\d+\-\.]+\.[a-zA-Z]{1,5}(|\:[0-9]{1,5})(|\/[\w\.\/\-\_]{0,})$/",$check)) {
|
||||
return $check;
|
||||
} else if ($check) {
|
||||
return $this->loop($check,'domain',$type);
|
||||
@ -161,7 +161,7 @@ class ValidateUserinput {
|
||||
function ismail ($value,$type,$object=false) {
|
||||
$check = $this->if_obj_or_str($value,$type,$object);
|
||||
if (is_string($check)) $check = trim($check);
|
||||
if($check and is_string($check) and filter_var($check,FILTER_VALIDATE_EMAIL)) {
|
||||
if ($check and is_string($check) and filter_var($check,FILTER_VALIDATE_EMAIL)) {
|
||||
$exploded=explode('@',$check);
|
||||
if (!checkdnsrr($exploded[1], 'MX') and !checkdnsrr($exploded[1], 'A')) return false;
|
||||
return strtolower($check);
|
||||
@ -171,7 +171,7 @@ class ValidateUserinput {
|
||||
}
|
||||
function ip4 ($value,$type,$object=false) {
|
||||
$check = $this->if_obj_or_str($value,$type,$object);
|
||||
if($check and is_string($check) and filter_var($check,FILTER_VALIDATE_IP,FILTER_FLAG_IPV4)){
|
||||
if ($check and is_string($check) and filter_var($check,FILTER_VALIDATE_IP,FILTER_FLAG_IPV4)){
|
||||
return $check;
|
||||
} else if ($check) {
|
||||
return $this->loop($check,'ip4',$type);
|
||||
@ -179,7 +179,7 @@ class ValidateUserinput {
|
||||
}
|
||||
function ip6 ($value,$type,$object=false) {
|
||||
$check = $this->if_obj_or_str($value,$type,$object);
|
||||
if($check and is_string($check) and filter_var($check,FILTER_VALIDATE_IP,FILTER_FLAG_IPV6)){
|
||||
if ($check and is_string($check) and filter_var($check,FILTER_VALIDATE_IP,FILTER_FLAG_IPV6)){
|
||||
return $check;
|
||||
} else if ($check) {
|
||||
return $this->loop($check,'ip6',$type);
|
||||
@ -187,7 +187,7 @@ class ValidateUserinput {
|
||||
}
|
||||
function ip ($value,$type,$object=false) {
|
||||
$check = $this->if_obj_or_str($value,$type,$object);
|
||||
if($check and is_string($check) and filter_var($check,FILTER_VALIDATE_IP)){
|
||||
if ($check and is_string($check) and filter_var($check,FILTER_VALIDATE_IP)){
|
||||
return $check;
|
||||
} else if ($check) {
|
||||
return $this->loop($check,'ip',$type);
|
||||
@ -253,7 +253,7 @@ class ValidateUserinput {
|
||||
$check = $this->if_obj_or_str($value,$type,$object);
|
||||
if ($check and is_string($check)) {
|
||||
$value=(int)str_replace(',', '.',$check);
|
||||
if(preg_match("/^[\d+(.\d+|$)]+$/",$value)) {
|
||||
if (preg_match("/^[\d+(.\d+|$)]+$/",$value)) {
|
||||
return $value;
|
||||
}
|
||||
} else if ($check) {
|
||||
|
@ -147,7 +147,7 @@ class TS3 {
|
||||
$this->socket = @fsockopen('tcp://' . $ip,$queryport,$errnum,$errstr,5);
|
||||
if ($this->socket == true) {
|
||||
$this->socketConnected = true;
|
||||
if(strpos(fgets($this->socket, 8192),'TS3') !== false) {
|
||||
if (strpos(fgets($this->socket, 8192),'TS3') !== false) {
|
||||
$welcome=fgets($this->socket, 8192);
|
||||
@fputs($this->socket, "login $admin $querypassword"."\n");
|
||||
$this->errorcode = $this->ReplaceFromTS3(fgets($this->socket, 8192));
|
||||
@ -449,7 +449,7 @@ class TS3 {
|
||||
print_r($serverdetails);
|
||||
print "\r\n";
|
||||
}
|
||||
} else if($this->debug == true) {
|
||||
} else if ($this->debug == true) {
|
||||
print "Userserver at serverdetails failed:";
|
||||
print_r($useserver);
|
||||
print "\r\n";
|
||||
@ -698,7 +698,7 @@ function tsbackup ($action,$sship,$sshport,$sshuser,$keyuse,$sshkey,$sshpw,$noti
|
||||
$bad="Could not connect to Server";
|
||||
}
|
||||
if (isset($bad) and $notified!='Y') {
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE `resellerid`=0 AND `accounttype`='a'");
|
||||
$query->execute();
|
||||
} else {
|
||||
@ -865,7 +865,7 @@ function tsdns ($action,$sship,$sshport,$sshuser,$keyuse,$sshkey,$sshpw,$notifie
|
||||
function array_multi_dimensional_unique($multi){
|
||||
$unique = array();
|
||||
foreach($multi as $sub){
|
||||
if(!in_array($sub,$unique)){
|
||||
if (!in_array($sub,$unique)){
|
||||
$unique[] = $sub;
|
||||
}
|
||||
}
|
||||
@ -907,7 +907,7 @@ function tsdns ($action,$sship,$sshport,$sshuser,$keyuse,$sshkey,$sshpw,$notifie
|
||||
$bad="Could not connect to Server";
|
||||
}
|
||||
if (isset($bad) and $notified==$maxnotified) {
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE `resellerid`=0 AND `accounttype`='a'");
|
||||
$query->execute();
|
||||
} else {
|
||||
|
@ -43,7 +43,7 @@ $sprache = getlanguagefile('feeds',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -288,7 +288,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=fe&d=md&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -43,7 +43,7 @@ $sprache = getlanguagefile('feeds',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -131,7 +131,7 @@ if ($ui->st('d', 'get') == 'ud') {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=fn&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -44,7 +44,7 @@ if (isset($newsInclude) and $newsInclude == true) {
|
||||
$total = $sql->prepare("SELECT COUNT(`newsID`) AS `amount` FROM `feeds_news` WHERE `resellerID`=?");
|
||||
$delete = $sql->prepare("DELETE FROM `feeds_news` WHERE `resellerID`=? AND `pubDate`<=?");
|
||||
@ini_set('user_agent','easy-wi.com');
|
||||
if(isset($lookUpID)) {
|
||||
if (isset($lookUpID)) {
|
||||
$query = $sql->prepare("SELECT * FROM `feeds_settings` WHERE `resellerID`=? AND `active`='Y' LIMIT 1");
|
||||
$query->execute(array($lookUpID));
|
||||
} else {
|
||||
@ -171,7 +171,7 @@ if (isset($newsInclude) and $newsInclude == true) {
|
||||
stream_set_timeout($feed,10);
|
||||
$meta=stream_get_meta_data($feed);
|
||||
foreach ($meta['wrapper_data'] as $mrow) {
|
||||
if(is_string($mrow) and $mrow == 'Content-Encoding: gzip') {
|
||||
if (is_string($mrow) and $mrow == 'Content-Encoding: gzip') {
|
||||
$gZipped = true;
|
||||
} else if (is_string($mrow) and substr($mrow,0,13) == 'Last-Modified' and !isset($lastModified)) {
|
||||
$lastModified=substr($mrow,16);
|
||||
@ -258,7 +258,7 @@ if (isset($newsInclude) and $newsInclude == true) {
|
||||
if ((bool)preg_match('/^[a-zA-Z0-9\/\r\n+]*={0,2}$/',$description)) {
|
||||
$description=base64_decode($description);
|
||||
}
|
||||
if($theCount<$newsAmount) {
|
||||
if ($theCount<$newsAmount) {
|
||||
$feedsArray[$feedID][] = array('title' => $feedTitle,'description' => $description,'link' => $link,'pubDate' => $pubDate,'content' => $content,'author' => $author,'creator' => $creator);
|
||||
}
|
||||
$theCount++;
|
||||
@ -278,7 +278,7 @@ if (isset($newsInclude) and $newsInclude == true) {
|
||||
foreach ($feeds as $singleFeed) {
|
||||
$count->execute(array($singleFeed['pubDate'],$lookUpID,$feedID));
|
||||
$exists = $count->fetchColumn();
|
||||
if($exists>0) {
|
||||
if ($exists>0) {
|
||||
$skipEntries++;
|
||||
} else {
|
||||
$newEntries++;
|
||||
|
@ -659,9 +659,9 @@ if (!function_exists('passwordgenerate')) {
|
||||
unset($splitline);
|
||||
if ($cvarprotect[$config]['type'] == 'cfg') {
|
||||
$splitline = preg_split("/\s+/", $line, -1, PREG_SPLIT_NO_EMPTY);
|
||||
} else if($cvarprotect[$config]['type'] == 'ini') {
|
||||
} else if ($cvarprotect[$config]['type'] == 'ini') {
|
||||
$splitline = preg_split("/\=/", $line, -1, PREG_SPLIT_NO_EMPTY);
|
||||
} else if($cvarprotect[$config]['type'] == 'xml') {
|
||||
} else if ($cvarprotect[$config]['type'] == 'xml') {
|
||||
$ex1 = explode('>', $line);
|
||||
if (isset($ex1[1])) {
|
||||
$c = str_replace('<', '', $ex1[0]);
|
||||
@ -786,9 +786,9 @@ if (!function_exists('passwordgenerate')) {
|
||||
|
||||
} else if ($action == 're') {
|
||||
|
||||
if($gamebinary == 'srcds_run') {
|
||||
if ($gamebinary == 'srcds_run') {
|
||||
$config = $modfolder . '/cfg/server.cfg';
|
||||
} else if($gamebinary == 'hlds_run') {
|
||||
} else if ($gamebinary == 'hlds_run') {
|
||||
$config = $modfolder . '/server.cfg';
|
||||
} else {
|
||||
$config = 'main/server.cfg';
|
||||
@ -1128,9 +1128,9 @@ if (!function_exists('passwordgenerate')) {
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($resellerid) or $resellerid==$userid) {
|
||||
if (!isset($resellerid) or $resellerid==$userid) {
|
||||
$resellersid = 0;
|
||||
if(!isset($resellerid)) {
|
||||
if (!isset($resellerid)) {
|
||||
$resellerid = 0;
|
||||
}
|
||||
} else {
|
||||
@ -1146,7 +1146,7 @@ if (!function_exists('passwordgenerate')) {
|
||||
$resellerLanguage = $row['language'];
|
||||
$email_settings_type = $row['email_settings_type'];
|
||||
|
||||
if($email_settings_type == 'S'){
|
||||
if ($email_settings_type == 'S'){
|
||||
$email_settings_host = $row['email_settings_host'];
|
||||
$email_settings_port = $row['email_settings_port'];
|
||||
$email_settings_user = $row['email_settings_user'];
|
||||
@ -1165,7 +1165,7 @@ if (!function_exists('passwordgenerate')) {
|
||||
}
|
||||
|
||||
if ($template != 'contact') {
|
||||
if($resellerid == $userid) {
|
||||
if ($resellerid == $userid) {
|
||||
$resellermail = $resellersmail;
|
||||
$lookupID = $resellersid;
|
||||
} else {
|
||||
@ -1242,7 +1242,7 @@ if (!function_exists('passwordgenerate')) {
|
||||
if ($sended == true) {
|
||||
$query = $sql->prepare("INSERT INTO `mail_log` (`uid`,`topic`,`date`,`resellerid`) VALUES (?,?,NOW(),?)");
|
||||
|
||||
if($resellerid == $userid) {
|
||||
if ($resellerid == $userid) {
|
||||
$query->execute(array($userid, $topic, $resellersid));
|
||||
|
||||
} else {
|
||||
@ -1386,7 +1386,7 @@ if (!function_exists('passwordgenerate')) {
|
||||
$errstr = $domain . ' is no domain';
|
||||
}
|
||||
|
||||
if(isset($fp) and $fp) {
|
||||
if (isset($fp) and $fp) {
|
||||
|
||||
if (is_array($postParams) and count($postParams) > 0) {
|
||||
$postData = '';
|
||||
@ -1420,7 +1420,7 @@ if (!function_exists('passwordgenerate')) {
|
||||
}
|
||||
$send .= "Connection: Close\r\n\r\n";
|
||||
|
||||
if(isset($postData) and is_array($postParams) and count($postParams)>0) {
|
||||
if (isset($postData) and is_array($postParams) and count($postParams)>0) {
|
||||
$send .= $postData;
|
||||
}
|
||||
|
||||
@ -1513,7 +1513,7 @@ if (!function_exists('passwordgenerate')) {
|
||||
$key = 'key' . $key;
|
||||
}
|
||||
|
||||
if(is_array($value)){
|
||||
if (is_array($value)){
|
||||
array2xml($value, $xml->addChild($key));
|
||||
|
||||
} else {
|
||||
@ -1527,7 +1527,7 @@ if (!function_exists('passwordgenerate')) {
|
||||
|
||||
global $ui;
|
||||
|
||||
if($ui->active($check, 'post') == 'Y') {
|
||||
if ($ui->active($check, 'post') == 'Y') {
|
||||
return 'Y';
|
||||
}
|
||||
return 'N';
|
||||
|
@ -62,7 +62,7 @@ if ($ui->st('w', 'get') == 'se') {
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -92,7 +92,7 @@ if ($ui->st('d', 'get') == 'pw') {
|
||||
$security = createHash($cname,$ui->password('pass2', 255, 'post'),$salt,$aeskey);
|
||||
$query = $sql->prepare("UPDATE `userdata` SET `updateTime`=NOW(),`security`=?,`salt`=? WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($security,$salt,$lookUpID,$reseller_id));
|
||||
if($query->rowCount()>0) {
|
||||
if ($query->rowCount()>0) {
|
||||
$template_file = $spracheResponse->table_add;
|
||||
$loguseraction="%psw% %user% $cname";
|
||||
$insertlog->execute();
|
||||
@ -152,7 +152,7 @@ if ($ui->st('d', 'get') == 'pw') {
|
||||
$query = $sql->prepare("UPDATE `userdata` SET `updateTime`=NOW(),`name`=?,`vname`=?,`mail`=?,`phone`=?,`handy`=?,`city`=?,`cityn`=?,`street`=?,`streetn`=?,`mail_backup`=?,`mail_serverdown`=?,`mail_ticket`=?,`mail_gsupdate`=?,`mail_securitybreach`=?,`mail_vserver`=? WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($name,$vname,$mail,$phone,$handy,$city,$cityn,$street,$streetn,$mail_backup,$mail_serverdown,$mail_ticket,$mail_gsupdate,$mail_securitybreach,$mail_vserver,$lookUpID,$reseller_id));
|
||||
}
|
||||
if($query->rowCount()>0) {
|
||||
if ($query->rowCount()>0) {
|
||||
#https://github.com/easy-wi/developer/issues/5
|
||||
$changed = array();
|
||||
foreach ($oldValues as $k=>$v) if (isset($$k) and "{$$k}" != $v) $changed[$k] = $v;
|
||||
|
@ -45,7 +45,7 @@ $sprache = getlanguagefile('gserver',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -144,7 +144,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lG']) and $licen
|
||||
$template_file = 'admin_gserver_add.tpl';
|
||||
|
||||
} else if ($ui->w('action',3, 'post') == 'ad' and (!is_numeric($licenceDetails['lG']) or $licenceDetails['lG']>0) and ($licenceDetails['left']>0 or !is_numeric($licenceDetails['left']))) {
|
||||
if($ui->escaped('shorten', 'post') and $ui->id('customer',19, 'post')) {
|
||||
if ($ui->escaped('shorten', 'post') and $ui->id('customer',19, 'post')) {
|
||||
$customer = $ui->id('customer',19, 'post');
|
||||
$count = 0;
|
||||
foreach ($ui->escaped('shorten', 'post') as $i) $count++;
|
||||
@ -449,9 +449,9 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lG']) and $licen
|
||||
if ($eacallowed== 'Y') {
|
||||
if ($shorten=="cstrike" or $shorten=="czero") {
|
||||
if ($war== 'Y') {
|
||||
$anticheat=5;
|
||||
$anticheat = 5;
|
||||
} else {
|
||||
$anticheat=6;
|
||||
$anticheat = 6;
|
||||
}
|
||||
} else if ($shorten=="css" or $shorten=="tf" or $shorten=="cod4") {
|
||||
$anticheat = 3;
|
||||
@ -891,7 +891,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lG']) and $licen
|
||||
$updateGo = true;
|
||||
}
|
||||
$cmds = array();
|
||||
if(($serverip_old != $serverip_new or $port_old != $port_new) and isset($updateGo)){
|
||||
if (($serverip_old != $serverip_new or $port_old != $port_new) and isset($updateGo)){
|
||||
$tmp=gsrestart($server_id,'so',$aeskey,$reseller_id);
|
||||
if (is_array($tmp)) foreach($tmp as $t) $cmds[] = $t;
|
||||
$address_old = $serverip_old . ':' . $port_old;
|
||||
|
@ -147,97 +147,97 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
if (@$xml->load($_FILES['file']['tmp_name']) !== false) {
|
||||
$childNodes = $xml->documentElement;
|
||||
foreach ($childNodes->childNodes AS $node) {
|
||||
if($node->nodeName == 'shorten') {
|
||||
if ($node->nodeName == 'shorten') {
|
||||
$shorten = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'steamgame') {
|
||||
if ($node->nodeName == 'steamgame') {
|
||||
$steamgame = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'appID') {
|
||||
if ($node->nodeName == 'appID') {
|
||||
$appID = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'updates ') {
|
||||
if ($node->nodeName == 'updates ') {
|
||||
$updates = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'description') {
|
||||
if ($node->nodeName == 'description') {
|
||||
$description = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'type') {
|
||||
if ($node->nodeName == 'type') {
|
||||
$type = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'gamebinary') {
|
||||
if ($node->nodeName == 'gamebinary') {
|
||||
$gamebinary = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'binarydir') {
|
||||
if ($node->nodeName == 'binarydir') {
|
||||
$binarydir = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'modfolder') {
|
||||
if ($node->nodeName == 'modfolder') {
|
||||
$modfolder = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'fps') {
|
||||
if ($node->nodeName == 'fps') {
|
||||
$fps = $node->configs;
|
||||
}
|
||||
if($node->nodeName == 'slots') {
|
||||
if ($node->nodeName == 'slots') {
|
||||
$slots = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'modcmds') {
|
||||
if ($node->nodeName == 'modcmds') {
|
||||
$modcmds = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'tic') {
|
||||
if ($node->nodeName == 'tic') {
|
||||
$tic = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'qstat') {
|
||||
if ($node->nodeName == 'qstat') {
|
||||
$qstat = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'gamemod') {
|
||||
if ($node->nodeName == 'gamemod') {
|
||||
$gamemod = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'gamemod2') {
|
||||
if ($node->nodeName == 'gamemod2') {
|
||||
$gamemod2 = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'configs') {
|
||||
if ($node->nodeName == 'configs') {
|
||||
$configs = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'configedit') {
|
||||
if ($node->nodeName == 'configedit') {
|
||||
$configedit = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'qstatpassparam') {
|
||||
if ($node->nodeName == 'qstatpassparam') {
|
||||
$qstatpassparam = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'portStep') {
|
||||
if ($node->nodeName == 'portStep') {
|
||||
$portStep = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'portMax') {
|
||||
if ($node->nodeName == 'portMax') {
|
||||
$portMax = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'portOne') {
|
||||
if ($node->nodeName == 'portOne') {
|
||||
$portOne = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'portTwo') {
|
||||
if ($node->nodeName == 'portTwo') {
|
||||
$portTwo = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'portThree') {
|
||||
if ($node->nodeName == 'portThree') {
|
||||
$portThree = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'portFour') {
|
||||
if ($node->nodeName == 'portFour') {
|
||||
$portFour = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'portFive') {
|
||||
if ($node->nodeName == 'portFive') {
|
||||
$portFive = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'cmd') {
|
||||
if ($node->nodeName == 'cmd') {
|
||||
$cmd = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'protected') {
|
||||
if ($node->nodeName == 'protected') {
|
||||
$protected = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'protectedSaveCFGs') {
|
||||
if ($node->nodeName == 'protectedSaveCFGs') {
|
||||
$protectedSaveCFGs = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'iptables') {
|
||||
if ($node->nodeName == 'iptables') {
|
||||
$iptables = $node->nodeValue;
|
||||
}
|
||||
if($node->nodeName == 'mapGroup') {
|
||||
if ($node->nodeName == 'mapGroup') {
|
||||
$mapGroup = $node->nodeValue;
|
||||
}
|
||||
}
|
||||
@ -320,27 +320,27 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
} else if ($ui->st('action', 'post') == 'md' or $ui->st('action', 'post') == 'ad') {
|
||||
|
||||
$errors = array();
|
||||
if(!$ui->w('steamgame', 1, 'post')) {
|
||||
if (!$ui->w('steamgame', 1, 'post')) {
|
||||
$errors['steamgame'] = $sprache->steam;
|
||||
}
|
||||
if(!$ui->active('gamemod', 'post')) {
|
||||
if (!$ui->active('gamemod', 'post')) {
|
||||
$errors['gamemod'] = $sprache->mods;
|
||||
}
|
||||
if(!$ui->id('updates', 1, 'post')) {
|
||||
if (!$ui->id('updates', 1, 'post')) {
|
||||
$errors['updates'] = 'Autoupdate';
|
||||
}
|
||||
if(!$ui->startparameter('cmd', 'post')) {
|
||||
if (!$ui->startparameter('cmd', 'post')) {
|
||||
$errors['cmd'] = $sprache->start;
|
||||
}
|
||||
if(!$ui->startparameter('gamebinary', 'post')) {
|
||||
if (!$ui->startparameter('gamebinary', 'post')) {
|
||||
$errors['gamebinary'] = $sprache->bin;
|
||||
}
|
||||
|
||||
if($ui->gamestring('shorten', 'post') and $ui->smallletters('action',2, 'post') == 'ad') {
|
||||
if ($ui->gamestring('shorten', 'post') and $ui->smallletters('action',2, 'post') == 'ad') {
|
||||
|
||||
$query = $sql->prepare("SELECT `id` FROM `servertypes` WHERE `shorten`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($shorten, $reseller_id));
|
||||
if($query->rowCount()>0) {
|
||||
if ($query->rowCount()>0) {
|
||||
$errors['shorten'] = $sprache->abkuerz;
|
||||
}
|
||||
|
||||
@ -348,7 +348,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
|
||||
$query = $sql->prepare("SELECT `id` FROM `servertypes` WHERE `id`!=? AND `shorten`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($id, $shorten, $reseller_id));
|
||||
if($query->rowCount()>0) {
|
||||
if ($query->rowCount()>0) {
|
||||
$errors['shorten'] = $sprache->abkuerz;
|
||||
}
|
||||
|
||||
@ -407,7 +407,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$query = $sql->prepare("DELETE FROM `servertypes` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($id, $reseller_id));
|
||||
|
||||
if($query->rowCount()>0) {
|
||||
if ($query->rowCount()>0) {
|
||||
$loguseraction = '%del% %template% ' . $shorten;
|
||||
$insertlog->execute();
|
||||
$template_file = $spracheResponse->table_del;
|
||||
|
@ -37,7 +37,7 @@
|
||||
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if(!isset($user_id)) {
|
||||
if (!isset($user_id)) {
|
||||
header('Location: login.php');
|
||||
die;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ if (isset($action) and $action == 'dl') {
|
||||
}
|
||||
} else $template_file = $spracheResponse->token;
|
||||
}
|
||||
if(!isset($template_file)) $template_file = $i." entries deleted";
|
||||
if (!isset($template_file)) $template_file = $i." entries deleted";
|
||||
} else {
|
||||
$table = array();
|
||||
$o = $ui->st('o', 'get');
|
||||
@ -112,7 +112,7 @@ if (isset($action) and $action == 'dl') {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=ib&d='.$d.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -49,7 +49,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$i = 0;
|
||||
if ($ui->id('id',30, 'post')) {
|
||||
foreach ($ui->id('id',30, 'post') as $id) {
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$delete = $sql->prepare("DELETE FROM `jobs` WHERE `jobID`=? LIMIT 1");
|
||||
$delete->execute(array($id));
|
||||
} else {
|
||||
@ -61,7 +61,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$template_file = $i . ' ' . $gsprache->jobs.' deleted';
|
||||
} else if ($ui->id('id', 19, 'get')) {
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `text` FROM `mail_log` WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($ui->id('id', 19, 'get')));
|
||||
} else if ($reseller_id != 0 and $admin_id != $reseller_id) {
|
||||
@ -116,12 +116,12 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$o = 'di';
|
||||
$orderby = '`jobID` DESC';
|
||||
}
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$where = '';
|
||||
} else {
|
||||
$where='WHERE `resellerID`=?';
|
||||
}
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT * FROM `jobs` $where ORDER BY $orderby LIMIT $start,$amount");
|
||||
$query->execute();
|
||||
} else {
|
||||
@ -165,7 +165,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$table[] = array('jobID' => $row['jobID'], 'date' => $date,'name' => $row['name'], 'api' => $api,'status' => $row['status'], 'img' => $imgName,'alt' => $imgAlt,'userID' => $row['userID'], 'type' => $type[$row['type']], 'action' => $action);
|
||||
}
|
||||
$next = $start+$amount;
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$countp = $sql->prepare("SELECT COUNT(`jobID`) AS `amount` FROM `jobs`");
|
||||
$countp->execute();
|
||||
} else {
|
||||
@ -188,7 +188,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=jb&o='.$o.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -37,7 +37,7 @@
|
||||
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if(!function_exists('removeUser')) {
|
||||
if (!function_exists('removeUser')) {
|
||||
function removeUser ($userID,$tables,$reseller=null) {
|
||||
global $sql;
|
||||
foreach ($tables as $table => $column) {
|
||||
|
@ -131,7 +131,7 @@ foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$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)) {
|
||||
if (isid($localserverid,30)) {
|
||||
$command = $gsprache->add.' voiceserverID: '.$row2['affectedID'].'; Skipping, virtual ID already exists in Easy-WI DB: '.$localserverid;
|
||||
$update = $sql->prepare("UPDATE `jobs` SET `status`='2' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
|
||||
$update->execute(array($row2['jobID']));
|
||||
|
@ -47,7 +47,7 @@ $gssprache = getlanguagefile('gserver',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
|
@ -50,7 +50,7 @@ if (!isset($start)) {
|
||||
$start = 0;
|
||||
}
|
||||
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `userid`,`subuser`,`reseller`,`username`,`usertype`,`useraction`,`ip`,`hostname`,`logdate` FROM `userlog` WHERE `usertype` LIKE :usertype AND (`resellerid`=:reseller_id OR `resellerid`=`userid`) ORDER BY `id` DESC LIMIT $start,$amount");
|
||||
} else if ($reseller_id != 0 and $admin_id != $reseller_id) {
|
||||
$query = $sql->prepare("SELECT `userid`,`subuser`,`reseller`,`username`,`usertype`,`useraction`,`ip`,`hostname`,`logdate` FROM `userlog` WHERE `usertype` LIKE :usertype AND `resellerid`=:reseller_id GROUP BY `userid`,`subuser`,`reseller`,`username`,`usertype`,`useraction`,`ip`,`logdate` ORDER BY `id` DESC LIMIT $start,$amount");
|
||||
@ -85,7 +85,7 @@ foreach ($query->fetchall() as $row) {
|
||||
$username = $row['username'] . ' ↔ ' . $query2->fetchColumn();
|
||||
}
|
||||
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$ip = $row['ip'];
|
||||
$hostname = $row['hostname'];
|
||||
|
||||
@ -136,7 +136,7 @@ foreach ($query->fetchall() as $row) {
|
||||
}
|
||||
$next = $start + $amount;
|
||||
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT COUNT(`id`) AS `amount` FROM `userlog` WHERE `usertype` LIKE :usertype AND (`resellerid`=:reseller_id OR `resellerid`=`userid`)");
|
||||
$requestid = $reseller_id;
|
||||
} else if ($reseller_id != 0 and $admin_id != $reseller_id) {
|
||||
|
@ -68,14 +68,14 @@ if (isset($action) and $action == 'dl' and $ui->id('id',30, 'post')) {
|
||||
$o = 'dd';
|
||||
$orderby = 'l.`id` DESC';
|
||||
}
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$pselect = $sql->prepare("SELECT l.`id`,l.`uid`,l.`topic`,l.`date`,u.`cname`,u.`accounttype`,u.`mail` FROM `mail_log` l LEFT JOIN `userdata` u ON l.`uid`=u.`id` ORDER BY $orderby LIMIT $start,$amount");
|
||||
} else if ($reseller_id != 0 and $admin_id != $reseller_id) {
|
||||
$pselect = $sql->prepare("SELECT l.`id`,l.`uid`,l.`topic`,l.`date`,u.`cname`,u.`accounttype`,u.`mail` FROM `mail_log` l LEFT JOIN `userdata` u ON l.`uid`=u.`id` WHERE l.`resellerid`=? ORDER BY $orderby LIMIT $start,$amount");
|
||||
} else {
|
||||
$pselect = $sql->prepare("SELECT l.`id`,l.`uid`,l.`topic`,l.`date`,u.`cname`,u.`accounttype`,u.`mail` FROM `userdata` u LEFT JOIN `mail_log` l ON u.`id`=l.`resellerid` OR u.`resellerid`=l.`resellerid` WHERE u.`resellerid`=? GROUP BY l.`date` ORDER BY $orderby LIMIT $start,$amount");
|
||||
}
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$pselect->execute();
|
||||
} else {
|
||||
if ($reseller_id != 0 and $admin_id != $reseller_id) {
|
||||
@ -96,7 +96,7 @@ if (isset($action) and $action == 'dl' and $ui->id('id',30, 'post')) {
|
||||
}
|
||||
}
|
||||
$next = $start+$amount;
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$countp = $sql->prepare("SELECT COUNT(`id`) AS `amount` FROM `mail_log`");
|
||||
$countp->execute();
|
||||
} else {
|
||||
@ -123,7 +123,7 @@ if (isset($action) and $action == 'dl' and $ui->id('id',30, 'post')) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=ml&d='.$d.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -47,7 +47,7 @@ $sprache = getlanguagefile('roots',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -64,7 +64,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
include(EASYWIDIR . '/stuff/ssh_exec.php');
|
||||
$serverid = $ui->id('id', 10, 'get');
|
||||
$rootServer=new masterServer($serverid,$aeskey);
|
||||
if($ui->id('id',19, 'post')) {
|
||||
if ($ui->id('id',19, 'post')) {
|
||||
$template_file = '';
|
||||
$query = $sql->prepare("SELECT `id` FROM `rservermasterg` WHERE `serverid`=? AND `servertypeid`=? AND `resellerid`=?");
|
||||
$query2 = $sql->prepare("SELECT * FROM `servertypes` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
@ -119,7 +119,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$sshport = $rdata['port'];
|
||||
$sshuser = $rdata['user'];
|
||||
$sshpass = $rdata['pass'];
|
||||
if($ui->id('id',30, 'post')) {
|
||||
if ($ui->id('id',30, 'post')) {
|
||||
$template_file = '';
|
||||
$deletestring = '';
|
||||
$i = 0;
|
||||
@ -275,7 +275,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=ma&d=md&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -48,7 +48,7 @@ $loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -528,7 +528,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=my&d=md&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -50,7 +50,7 @@ $logsubuser = 0;
|
||||
|
||||
if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$template_file = $spracheResponse->token;
|
||||
} else if($ui->st('d', 'get') == 'md' and $ui->id('id',19, 'get') and $ui->smallletters('action',2, 'post') == 'md'){
|
||||
} else if ($ui->st('d', 'get') == 'md' and $ui->id('id',19, 'get') and $ui->smallletters('action',2, 'post') == 'md'){
|
||||
$id = $ui->id('id',19, 'get');
|
||||
$url = '';
|
||||
if ($ui->url('url', 'post')) {
|
||||
@ -68,7 +68,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
} else {
|
||||
$template_file = $spracheResponse->error_table;
|
||||
}
|
||||
} else if($ui->st('d', 'get') == 'md' and $ui->id('id',19, 'get') and !$ui->smallletters('action',2, 'post')){
|
||||
} else if ($ui->st('d', 'get') == 'md' and $ui->id('id',19, 'get') and !$ui->smallletters('action',2, 'post')){
|
||||
$id = $ui->id('id',19, 'get');
|
||||
$query = $sql->prepare("SELECT t.`pageid`,t.`title`,c.* FROM `page_comments` c LEFT JOIN `page_pages_text` t ON c.`pageTextID`=t.`id` WHERE c.`commentID`=? AND c.`resellerID`=? LIMIT 1");
|
||||
$query->execute(array($id,$reseller_id));
|
||||
@ -91,7 +91,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
} else {
|
||||
$template_file = 'admin_404.tpl';
|
||||
}
|
||||
} else if($ui->st('d', 'get') == 'dl' and $ui->id('id',19, 'get')){
|
||||
} else if ($ui->st('d', 'get') == 'dl' and $ui->id('id',19, 'get')){
|
||||
$query = $sql->prepare("DELETE FROM `page_comments` WHERE `commentID`=? AND `resellerID`=? LIMIT 1");
|
||||
$query->execute(array($ui->id('id',19, 'get'),$reseller_id));
|
||||
if ($query->rowCount()>0) {
|
||||
@ -183,7 +183,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$query = $sql->prepare("SELECT t.`pageid`,t.`language`,t.`title`,c.`commentID`,c.`date`,c.`authorname`,c.`markedSpam`,c.`spamReason`,c.`moderateAccepted`,c.`comment` FROM `page_comments` c LEFT JOIN `page_pages_text` t ON c.`pageTextID`=t.`id` WHERE c.`resellerID`=? $AND ORDER BY $orderby");
|
||||
$query->execute(array($reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
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));
|
||||
}
|
||||
$commentDate='m.d.Y H:i';
|
||||
@ -201,7 +201,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=pc&o='.$o.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -59,7 +59,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
if (small_letters_check($row,2)) {
|
||||
$description = '';
|
||||
unset($lang);
|
||||
if($ui->id('id', 10, 'get')) {
|
||||
if ($ui->id('id', 10, 'get')) {
|
||||
$query->execute(array($id, $row,$reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row2) {
|
||||
$lang = $row2['lang'];
|
||||
@ -103,7 +103,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
} else {
|
||||
$query = $sql->prepare("INSERT INTO `page_downloads` (`show`,`description`,`fileName`,`date`,`resellerID`) VALUES (?,?,?,NOW(),?)");
|
||||
$query->execute(array($ui->w('show',1, 'post'),$ui->names('description',255, 'post'),$ui->names('fileName',255, 'post'),$reseller_id));
|
||||
if($query->rowCount()>0) $changed = true;
|
||||
if ($query->rowCount()>0) $changed = true;
|
||||
$template_file = $spracheResponse->table_add;
|
||||
$id = $sql->lastInsertId();
|
||||
}
|
||||
@ -135,7 +135,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
'rar' => 'application/x-rar-compressed');
|
||||
$exploded=explode('.',$_FILES["upload"]["name"]);
|
||||
$extension = $exploded[count($exploded)-1];
|
||||
if(isset($allowedTypes[$extension]) and ((is_array($allowedTypes[$extension]) and in_array($_FILES["upload"]["type"],$allowedTypes[$extension])) or (!is_array($allowedTypes[$extension]) and $_FILES["upload"]["type"] == $allowedTypes[$extension])) ) {
|
||||
if (isset($allowedTypes[$extension]) and ((is_array($allowedTypes[$extension]) and in_array($_FILES["upload"]["type"],$allowedTypes[$extension])) or (!is_array($allowedTypes[$extension]) and $_FILES["upload"]["type"] == $allowedTypes[$extension])) ) {
|
||||
if (move_uploaded_file($_FILES["upload"]["tmp_name"],EASYWIDIR . '/downloads/'.$id . '.' . $extension)) {
|
||||
$changed = true;
|
||||
$query = $sql->prepare("UPDATE `page_downloads` SET `fileExtension`=? WHERE `fileID`=? AND `resellerID`=?");
|
||||
@ -149,7 +149,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
foreach($array as $language) {
|
||||
if (small_letters_check($language,2)) {
|
||||
$query->execute(array($id,$language,$ui->description('text', 'post',$language),$reseller_id));
|
||||
if($query->rowCount()>0) $changed = true;
|
||||
if ($query->rowCount()>0) $changed = true;
|
||||
}
|
||||
}
|
||||
$query = $sql->prepare("SELECT `lang` FROM `translations` WHERE `type`='pd' AND `transID`=? AND `resellerID`=?");
|
||||
@ -158,13 +158,13 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if (!in_array($row['lang'],$array)) {
|
||||
$query2->execute(array($addonid, $row['lang'],$reseller_id));
|
||||
if($query2->rowCount()>0) $changed = true;
|
||||
if ($query2->rowCount()>0) $changed = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$query = $sql->prepare("DELETE FROM `translations` WHERE `type`='pd' AND `transID`=? AND `resellerID`=?");
|
||||
$query->execute(array($id,$reseller_id));
|
||||
if($query->rowCount()>0) $changed = true;
|
||||
if ($query->rowCount()>0) $changed = true;
|
||||
}
|
||||
$template_file = (isset($changed)) ? $spracheResponse->table_add : $spracheResponse->error_table;
|
||||
} else {
|
||||
|
@ -100,12 +100,12 @@ if ((isset($page_name) and $page_name!=szrp($page_sprache->older) and isset($pag
|
||||
$url = '';
|
||||
$comment = '';
|
||||
if (isset($comments) and $comments == 'Y') {
|
||||
if($ui->escaped('comment', 'post')) {
|
||||
if ($ui->escaped('comment', 'post')) {
|
||||
$comment = $ui->escaped('comment', 'post');
|
||||
if (strlen($ui->escaped('comment', 'post'))<=$commentMinLength) {
|
||||
$error = true;
|
||||
}
|
||||
if(!isset($admin_id) and !isset($user_id)){
|
||||
if (!isset($admin_id) and !isset($user_id)){
|
||||
$email = $ui->ismail('email', 'post');
|
||||
$author = $ui->names('author',255, 'post');
|
||||
if ($mailRequired== 'Y' and !$ui->ismail('email', 'post')) {
|
||||
|
@ -426,7 +426,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$query->execute(array($user_language,$reseller_id));
|
||||
$table = array();
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
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));
|
||||
}
|
||||
if ($row['released'] == '1') {
|
||||
@ -496,7 +496,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=pn&d=md&o='.$o.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -121,7 +121,7 @@ if (isset($page_id) and is_numeric($page_id)) {
|
||||
$query = $sql->prepare("SELECT t.`id`,p.`id` AS `pageID`,p.`type`,t.`shortlink`,t.`title`,t.`text`,t.`language` FROM `page_pages` p LEFT JOIN `page_pages_text` t ON p.`id`=t.`pageid` WHERE p.`released`=1 AND p.`resellerid`=0 AND (LOWER(t.`shortlink`) LIKE :search OR LOWER(t.`title`) LIKE :search OR LOWER(t.`text`) LIKE :search)");
|
||||
$query->execute(array(':search' => '%'.$value.'%'));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
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));
|
||||
}
|
||||
if (strlen($row['text'])<=$newssidebar_textlength) {
|
||||
@ -151,7 +151,7 @@ if (isset($page_id) and is_numeric($page_id)) {
|
||||
$title=(string)$titleLanguages[$row['language']]['page']->about;
|
||||
$link = $page_data->pageurl.'/?s=news&l='.$row['language'];
|
||||
}
|
||||
if(!isset($link)) {
|
||||
if (!isset($link)) {
|
||||
$link='#';
|
||||
}
|
||||
if ($exact == true) {
|
||||
@ -162,7 +162,7 @@ if (isset($page_id) and is_numeric($page_id)) {
|
||||
$worth+=substr_count(strtolower($row['text']),strtolower($value));
|
||||
}
|
||||
$href='<a href="'.$link.'" title="'.$title.'">'.$title.'</a>';
|
||||
if(isset($results[$row['id']])) {
|
||||
if (isset($results[$row['id']])) {
|
||||
$oldWorth = $results[$row['id']]['worth'];
|
||||
$hits = $results[$row['id']]['hits'];
|
||||
$hits[] = $value;
|
||||
@ -196,7 +196,7 @@ if (isset($page_id) and is_numeric($page_id)) {
|
||||
$exists = array();
|
||||
foreach ($resultsArray as $key=>$val) {
|
||||
foreach ($val as $k=>$v) {
|
||||
if(!in_array($key,$exists)) {
|
||||
if (!in_array($key,$exists)) {
|
||||
unset($resultsArray[$key][$k]);
|
||||
$results[] = $v;
|
||||
$exists[] = $key;
|
||||
|
@ -478,7 +478,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=pp&d=md&o='.$o.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -144,7 +144,7 @@ if (isset($registration) and in_array($registration, array('A','M','D'))) {
|
||||
}
|
||||
|
||||
// If no error occurred go on otherwise display form again
|
||||
if(count($error)>0) {
|
||||
if (count($error)>0) {
|
||||
$token=md5(date('Y-d-m H:i:s u').md5(mt_rand()));
|
||||
$_SESSION['registerToken'] = $token;
|
||||
$template_file = 'page_register.tpl';
|
||||
@ -175,9 +175,9 @@ if (isset($registration) and in_array($registration, array('A','M','D'))) {
|
||||
|
||||
// If is is in DB and mail could be send
|
||||
if ($query->rowCount()>0) {
|
||||
if($registration == 'A') {
|
||||
if ($registration == 'A') {
|
||||
$template_file = $page_sprache->registerAdmin;
|
||||
} else if($registration == 'M') {
|
||||
} else if ($registration == 'M') {
|
||||
$template_file = $page_sprache->registerMailSend;
|
||||
|
||||
// send Mail
|
||||
|
@ -128,7 +128,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$loguseraction="%mod% CMS Settings";
|
||||
$insertlog->execute();
|
||||
if($queryAffected>0) {
|
||||
if ($queryAffected>0) {
|
||||
$template_file = $spracheResponse->table_add;
|
||||
} else {
|
||||
$template_file = $spracheResponse->error_table;
|
||||
|
@ -48,7 +48,7 @@ $gssprache = getlanguagefile('gserver',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
|
@ -48,7 +48,7 @@ $logsubuser = 0;
|
||||
$sprache = getlanguagefile('columns',$user_language,$reseller_id);
|
||||
if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$template_file = $spracheResponse->token;
|
||||
} else if(in_array($ui->st('d', 'get'), array('ad','md'))) {
|
||||
} else if (in_array($ui->st('d', 'get'), array('ad','md'))) {
|
||||
$id = $ui->id('id', 10, 'get');
|
||||
if (in_array($ui->st('action', 'post'), array('ad','md'))) {
|
||||
$error = array();
|
||||
@ -71,7 +71,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$template_file = 'Error: '.implode('<br />',$error);
|
||||
} else {
|
||||
$name = $ui->w('name',255, 'post');
|
||||
if($ui->st('d', 'get') == 'ad') {
|
||||
if ($ui->st('d', 'get') == 'ad') {
|
||||
$query = $sql->prepare("INSERT INTO `custom_columns_settings` (`active`,`item`,`type`,`length`,`name`) VALUES (?,?,?,?,?)");
|
||||
$query->execute(array($ui->active('active', 'post'),$ui->w('item',1, 'post'),$ui->w('type',1, 'post'),$ui->id('length',10, 'post'),$name));
|
||||
$id = $sql->lastInsertId();
|
||||
@ -237,7 +237,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=cc&o='.$o.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .=20;
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -48,7 +48,7 @@ $gssprache = getlanguagefile('gserver',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
|
@ -47,7 +47,7 @@ function serverQuery ($ip, $port, $type) {
|
||||
$socket = @fsockopen('udp://' . $ip, (int) $port, $errnum, $errstr, 5);
|
||||
}
|
||||
|
||||
if($socket === false) {
|
||||
if ($socket === false) {
|
||||
return $errstr;
|
||||
|
||||
} else {
|
||||
|
@ -48,7 +48,7 @@ $sprache = getlanguagefile('reseller',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -68,7 +68,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lDs']) and $lice
|
||||
$pxe=($query->fetchColumn()>0) ? 'Y' : 'N';
|
||||
if (!in_array($ui->smallletters('action',2, 'post'), array('md','ad')) and $ui->st('d', 'get') == 'md') {
|
||||
$table = array();
|
||||
$query=($reseller_id==0) ? $sql->prepare("SELECT `id`,`cname`,`vname`,`name`,`accounttype` FROM `userdata` WHERE (`id`=`resellerid` OR `resellerid`=?) AND `accounttype` IN ('r','u') ORDER BY `id` DESC") : $sql->prepare("SELECT `id`,`cname`,`vname`,`name`,`accounttype` FROM `userdata` WHERE `resellerid`=? AND `accounttype` IN ('r','u') ORDER BY `id` DESC");
|
||||
$query=($reseller_id == 0) ? $sql->prepare("SELECT `id`,`cname`,`vname`,`name`,`accounttype` FROM `userdata` WHERE (`id`=`resellerid` OR `resellerid`=?) AND `accounttype` IN ('r','u') ORDER BY `id` DESC") : $sql->prepare("SELECT `id`,`cname`,`vname`,`name`,`accounttype` FROM `userdata` WHERE `resellerid`=? AND `accounttype` IN ('r','u') ORDER BY `id` DESC");
|
||||
$query->execute(array($reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$type=($row['accounttype'] == 'u') ? $gsprache->user : $gsprache->reseller;
|
||||
@ -104,7 +104,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lDs']) and $lice
|
||||
}
|
||||
}
|
||||
$template_file = (isset($active)) ? 'admin_root_dedicated_md.tpl' : 'admin_404.tpl';
|
||||
} else if (!in_array($ui->smallletters('action',2, 'post'), array('md','ad')) and $ui->st('d', 'get') == 'ad' and $reseller_id==0) {
|
||||
} else if (!in_array($ui->smallletters('action',2, 'post'), array('md','ad')) and $ui->st('d', 'get') == 'ad' and $reseller_id == 0) {
|
||||
$table = array();
|
||||
$query = $sql->prepare("SELECT `id`,`cname`,`vname`,`name` FROM `userdata` WHERE `id`=`resellerid` AND `accounttype`='r' ORDER BY `id` DESC");
|
||||
$query->execute();
|
||||
@ -156,7 +156,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lDs']) and $lice
|
||||
$query = $sql->prepare("UPDATE `rootsDedicated` SET `active`=?,`userID`=?,`description`=?,`ip`=?,`ips`=?,`restart`=?,`apiRequestType`=?,`apiRequestRestart`=?,`apiRequestStop`=?,`apiURL`=?,`https`=?,`mac`=?,`useDHCP`=?,`usePXE`=?,`externalID`=?,`jobPending`='Y' WHERE `dedicatedID`=? AND `resellerID`=?");
|
||||
$query->execute(array($active,$userID,$description,$ip,$ips,$restart,$apiRequestType,$apiRequestRestart,$apiRequestStop,$apiURL,$https,$mac,$useDHCP,$usePXE,$externalID,$id,$reseller_id));
|
||||
$loguseraction="%mod% ".$gsprache->dedicated;
|
||||
} else if ($ui->st('d', 'get') == 'ad' and $reseller_id==0) {
|
||||
} else if ($ui->st('d', 'get') == 'ad' and $reseller_id == 0) {
|
||||
$query = $sql->prepare("INSERT INTO `rootsDedicated` (`active`,`userID`,`description`,`ip`,`ips`,`restart`,`apiRequestType`,`apiRequestRestart`,`apiRequestStop`,`apiURL`,`https`,`mac`,`useDHCP`,`usePXE`,`externalID`,`resellerID`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
|
||||
$query->execute(array($active,$userID,$description,$ip,$ips,$restart,$apiRequestType,$apiRequestRestart,$apiRequestStop,$apiURL,$https,$mac,$useDHCP,$usePXE,$externalID,$reseller_id));
|
||||
$loguseraction="%add% ".$gsprache->dedicated;
|
||||
@ -172,7 +172,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lDs']) and $lice
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ($ui->st('d', 'get') == 'dl' and $ui->id('id', 10, 'get') and $reseller_id==0) {
|
||||
} else if ($ui->st('d', 'get') == 'dl' and $ui->id('id', 10, 'get') and $reseller_id == 0) {
|
||||
$id = $ui->id('id', 10, 'get');
|
||||
$query = $sql->prepare("SELECT `ip`,`description`,`restart`,`useDHCP`,`usePXE` FROM `rootsDedicated` WHERE `dedicatedID`=? AND `resellerID`=? LIMIT 1");
|
||||
$query->execute(array($id,$reseller_id));
|
||||
@ -344,7 +344,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lDs']) and $lice
|
||||
$orderby = 'd.`dedicatedID` ASC';
|
||||
$o = 'ai';
|
||||
}
|
||||
$query=($reseller_id==0) ? $sql->prepare("SELECT d.*,u.`cname`,u.`name`,u.`vname` FROM `rootsDedicated` d LEFT JOIN `userdata` u ON d.`userID`=u.`id` WHERE d.`resellerID`=? OR u.`id`=u.`resellerid` ORDER BY $orderby LIMIT $start,$amount") : $sql->prepare("SELECT d.*,u.`cname`,u.`name`,u.`vname` FROM `rootsDedicated` d LEFT JOIN `userdata` u ON d.`userID`=u.`id` WHERE d.`resellerID`=? ORDER BY $orderby LIMIT $start,$amount");
|
||||
$query=($reseller_id == 0) ? $sql->prepare("SELECT d.*,u.`cname`,u.`name`,u.`vname` FROM `rootsDedicated` d LEFT JOIN `userdata` u ON d.`userID`=u.`id` WHERE d.`resellerID`=? OR u.`id`=u.`resellerid` ORDER BY $orderby LIMIT $start,$amount") : $sql->prepare("SELECT d.*,u.`cname`,u.`name`,u.`vname` FROM `rootsDedicated` d LEFT JOIN `userdata` u ON d.`userID`=u.`id` WHERE d.`resellerID`=? ORDER BY $orderby LIMIT $start,$amount");
|
||||
$query2 = $sql->prepare("SELECT `action`,`extraData` FROM `jobs` WHERE `affectedID`=? AND `type`='de' AND (`status` IS NULL OR `status`=1 OR `status`=4) ORDER BY `jobID` DESC LIMIT 1");
|
||||
$query->execute(array($reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
@ -391,7 +391,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lDs']) and $lice
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=rp&o='.$o.'&a=';
|
||||
if(!isset($amount)) $link .="20";
|
||||
if (!isset($amount)) $link .="20";
|
||||
else $link .= $amount;
|
||||
if ($start==0) $link .= '&p=0" class="bold">1</a>';
|
||||
else $link .= '&p=0">1</a>';
|
||||
|
@ -48,7 +48,7 @@ $sprache = getlanguagefile('reseller',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
|
@ -48,7 +48,7 @@ $sprache = getlanguagefile('reseller',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
|
@ -48,7 +48,7 @@ $sprache = getlanguagefile('reseller',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -132,12 +132,12 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$count=count($uiddata)-1;
|
||||
while ($i<$count) {
|
||||
list($uid,$space)=explode(":", $uiddata[$i]);
|
||||
if(strpos(strtolower($space), strtolower('TB')) === false) {
|
||||
if (strpos(strtolower($space), strtolower('TB')) === false) {
|
||||
$hddamount=str_replace('GB,', '', $space);
|
||||
} else {
|
||||
$hddamount=str_replace('TB,', '', $space)*1000;
|
||||
}
|
||||
if(isset($hdd)){
|
||||
if (isset($hdd)){
|
||||
$hdd .="\r\n".$uid . ' ' . $hddamount;
|
||||
} else {
|
||||
$hdd = $uid . ' ' . $hddamount;
|
||||
@ -398,7 +398,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=vh&d=md&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -57,7 +57,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
$template_file = $gsprache->licence;
|
||||
} else if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$template_file = $spracheResponse->token;
|
||||
} else if ($ui->st('d', 'get') == 'ad' and ($reseller_id==0 or $admin_id==$reseller_id) and $pa['addvserver'] and (!is_numeric($licenceDetails['lVs']) or $licenceDetails['lVs']>0) and ($licenceDetails['left']>0 or !is_numeric($licenceDetails['left']))) {
|
||||
} else if ($ui->st('d', 'get') == 'ad' and ($reseller_id == 0 or $admin_id==$reseller_id) and $pa['addvserver'] and (!is_numeric($licenceDetails['lVs']) or $licenceDetails['lVs']>0) and ($licenceDetails['left']>0 or !is_numeric($licenceDetails['left']))) {
|
||||
if (!$ui->smallletters('action',2, 'post')) {
|
||||
$table = array();
|
||||
$table2 = array();
|
||||
@ -134,7 +134,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
unset($percentserver);
|
||||
unset($percentusedhdd);
|
||||
while ($i<=$cores) {
|
||||
if($cpucore[$i]==0) {
|
||||
if ($cpucore[$i]==0) {
|
||||
$percentusedcpu[$i] = 0;
|
||||
} else {
|
||||
$percentusedcpu[$i] = $cpucore[$i]/($mhz/100);
|
||||
@ -178,7 +178,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
}
|
||||
$i = 1;
|
||||
if ($esxi== 'Y') {
|
||||
$maxcore=8;
|
||||
$maxcore = 8;
|
||||
} else {
|
||||
$maxcore = $row['cores'];
|
||||
}
|
||||
@ -286,7 +286,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
} else {
|
||||
}
|
||||
$checkedips = array();
|
||||
$query=($reseller_id==0) ? $sql->prepare("SELECT `id`,`cname`,`vname`,`name`,`accounttype` FROM `userdata` WHERE (`id`=`resellerid` OR `resellerid`=?) AND `accounttype` IN ('r','u') ORDER BY `id` DESC") : $sql->prepare("SELECT `id`,`cname`,`vname`,`name`,`accounttype` FROM `userdata` WHERE `resellerid`=? AND `accounttype` IN ('r','u') ORDER BY `id` DESC");
|
||||
$query=($reseller_id == 0) ? $sql->prepare("SELECT `id`,`cname`,`vname`,`name`,`accounttype` FROM `userdata` WHERE (`id`=`resellerid` OR `resellerid`=?) AND `accounttype` IN ('r','u') ORDER BY `id` DESC") : $sql->prepare("SELECT `id`,`cname`,`vname`,`name`,`accounttype` FROM `userdata` WHERE `resellerid`=? AND `accounttype` IN ('r','u') ORDER BY `id` DESC");
|
||||
$query->execute(array($reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if (!isset($firstresellerip)) {
|
||||
@ -368,7 +368,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
$maxram = $ui->post['maxram'];
|
||||
}
|
||||
if (isips($ui->post['ips']) or empty($ui->post['ips'])) {
|
||||
$freeips=($reseller_id==0) ? freeips($reseller_id) : freeips($userid);
|
||||
$freeips=($reseller_id == 0) ? freeips($reseller_id) : freeips($userid);
|
||||
if (isips($ui->post['ips'])) {
|
||||
$posted_ip=ipstoarray($ui->post['ips']);
|
||||
foreach ($posted_ip as $ip_row) {
|
||||
@ -541,7 +541,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
}
|
||||
} else if ($ui->st('d', 'get') == 'dl' and $ui->id('id', 10, 'get') and $pa['delvserver']) {
|
||||
$id = $ui->id('id', 10, 'get');
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT c.`ip`,c.`hostid`,c.`userid`,r.`description`,r.`bitversion` FROM `virtualcontainer` c LEFT JOIN `resellerimages` r ON c.`imageid`=r.`id` WHERE c.`id`=? LIMIT 1");
|
||||
$query->execute(array($id));
|
||||
} else {
|
||||
@ -579,7 +579,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
} else if ($ui->st('d', 'get') == 'md' and $ui->id('id', 10, 'get') and $pa['modvserver']) {
|
||||
$id = $ui->id('id', 10, 'get');
|
||||
if (!$ui->smallletters('action',2, 'post')) {
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT c.`active`,c.`ip`,c.`ips`,c.`mac`,c.`cores`,c.`minmhz`,c.`maxmhz`,c.`hddsize`,c.`mountpoint`,c.`ram`,c.`minram`,c.`maxram`,AES_DECRYPT(c.`pass`, :aeskey) AS `decryptedpass`,r.`description`,r.`bitversion`,u.`cname`,h.`cores` AS `hcore`,h.`esxi`,u.`id` AS `userid` FROM `virtualcontainer` c LEFT JOIN `resellerimages` r ON c.`imageid`=r.`id` LEFT JOIN `userdata` u ON c.`userid`=u.`id` LEFT JOIN `virtualhosts` h ON c.`hostid`=h.`id` WHERE c.`id`=:id LIMIT 1");
|
||||
$query->execute(array(':id' => $id,':aeskey' => $aeskey));
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -621,7 +621,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
}
|
||||
}
|
||||
if (isset($userid)) {
|
||||
$checkedips=($reseller_id==0) ? freeips($reseller_id) : freeips($userid);
|
||||
$checkedips=($reseller_id == 0) ? freeips($reseller_id) : freeips($userid);
|
||||
$template_file = "admin_root_vserver_md.tpl";
|
||||
} else {
|
||||
$template_file = "admin_404.tpl";
|
||||
@ -670,7 +670,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
$fail = 1;
|
||||
$template_file .="Active";
|
||||
}
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT * FROM `virtualcontainer` WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($id));
|
||||
} else {
|
||||
@ -713,7 +713,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
}
|
||||
}
|
||||
if (isip($ui->post['ip'], 'all') and isset($oldip)) {
|
||||
$freeips=($reseller_id==0) ? freeips($reseller_id) : freeips($userid);
|
||||
$freeips=($reseller_id == 0) ? freeips($reseller_id) : freeips($userid);
|
||||
$checked_ips = array();
|
||||
if (isips($ui->post['ips'])) {
|
||||
$postedips=ipstoarray($ui->post['ips']);
|
||||
@ -734,7 +734,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
}
|
||||
if ($ui->post['ip'] == $oldip or in_array($ui->post['ip'],$freeips)) {
|
||||
$ip = $ui->post['ip'];
|
||||
} else if(isset($checked_ips[0]) and isip($checked_ips[0], 'all')) {
|
||||
} else if (isset($checked_ips[0]) and isip($checked_ips[0], 'all')) {
|
||||
$ip = $checked_ips[0];
|
||||
}
|
||||
if (!isset($ips)) {
|
||||
@ -758,7 +758,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
$maxram = $ui->post['maxram'];
|
||||
$active = $ui->post['active'];
|
||||
$mac = $ui->post['mac'];
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("UPDATE `virtualcontainer` SET `active`=:active, `ip`=:ip, `ips`=:ips,`mac`=:mac,`cores`=:cores, minmhz=:minmhz, maxmhz=:maxmhz, hddsize=:hddsize, ram=:ram, minram=:minram, maxram=:maxram WHERE `id`=:id LIMIT 1");
|
||||
$query->execute(array(':active' => $active,':ip' => $ip,':ips' => $ips,':mac' => $mac,':cores' => $cores,':minmhz' => $minmhz,':maxmhz' => $maxmhz,':hddsize' => $hddsize,':ram' => $ram,':minram' => $minram,':maxram' => $maxram,':id' => $id));
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -787,7 +787,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
$id = $ui->id('id', 10, 'get');
|
||||
if (!$ui->smallletters('action',2, 'post')) {
|
||||
$option = array();
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT c.ip,c.status,AES_DECRYPT(c.pass, :aeskey) AS decryptedpass,r.description,r.bitversion FROM `virtualcontainer` c LEFT JOIN `resellerimages` r ON c.imageid=r.id WHERE c.id=:id LIMIT 1");
|
||||
$query->execute(array(':id' => $id,':aeskey' => $aeskey));
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -885,7 +885,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
$o = 'ai';
|
||||
}
|
||||
$table = array();
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT c.*,r.`description` AS `idescription`,r.`bitversion`,h.`ip` AS `hip`,h.`id` AS `hid`,h.`description` AS `hdescription`,u.`cname` FROM `virtualcontainer` c LEFT JOIN `resellerimages` r ON c.`imageid`=r.`id` LEFT JOIN `virtualhosts` h ON c.`hostid`=h.`id` LEFT JOIN `userdata` u ON c.`userid`=u.`id` ORDER BY $orderby LIMIT $start,$amount");
|
||||
$query->execute();
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -930,7 +930,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
$table[] = array('id' => $row['id'], 'active' => $active,'cip' => $row['ip'], 'cores' => $row['cores'], 'minmhz' => $row['minmhz'], 'maxmhz' => $row['maxmhz'], 'hddsize' => $row['hddsize'], 'ram' => $row['ram'], 'minram' => $row['minram'], 'maxram' => $row['maxram'], 'status' => $status,'idescription' => $row['idescription'], 'bitversion' => $row['bitversion'], 'hip' => $row['hip'], 'hid' => $row['hid'], 'hdescription' => $row['hdescription'], 'cname' => $row['cname'], 'userid' => $row['userid'], 'jobPending' => $jobPending);
|
||||
}
|
||||
$next = $start+$amount;
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$countp = $sql->prepare("SELECT COUNT(`id`) AS `amount` FROM `virtualcontainer`");
|
||||
$countp->execute();
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -956,7 +956,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=vs&d=md&shorten='.$o.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .=20;
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -48,7 +48,7 @@ $sprache = getlanguagefile('reseller',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
|
@ -39,7 +39,7 @@ if (isset($_SERVER['QUERY_STRING'])) {
|
||||
$queries = strtolower($_SERVER['QUERY_STRING']);
|
||||
$badcontent = array("http://", "ftp://", "https://", "ftps://", "delete ", "from ", "into ", "userdata ", "userdata(", "userdata`", "userpermissions ", "userpermissions(", "userpermissions`", "select ", "set ", "where ", "update ", "union ", "*", ".ssh", "~", "chmod ", "passwd", "fclose", "fopen", "fwrite", "getenv", "locate", "passthru", "phpinfo", "proc_close", "proc_get_status", "proc_nice", "proc_open", "proc_terminate", "shell_exec(", "system(");
|
||||
$check_bad = str_replace($badcontent, 'bad', $queries);
|
||||
if($queries != $check_bad) {
|
||||
if ($queries != $check_bad) {
|
||||
die();
|
||||
}
|
||||
}
|
||||
@ -100,7 +100,7 @@ if ($loguserip != 'localhost') {
|
||||
$user_id = $_SESSION['userid'];
|
||||
$admin_id = $_SESSION['adminid'];
|
||||
|
||||
} else if(isset($_SESSION['userid']) and is_numeric($_SESSION['userid'])) {
|
||||
} else if (isset($_SESSION['userid']) and is_numeric($_SESSION['userid'])) {
|
||||
$user_id = $_SESSION['userid'];
|
||||
|
||||
} else if (isset($_SESSION['adminid']) and is_numeric($_SESSION['adminid'])) {
|
||||
@ -239,7 +239,7 @@ if ($loguserip!='localhost') {
|
||||
}
|
||||
if (!isset($user_language) and isset($user_id) and isset($admin_id)) {
|
||||
$user_language=language($admin_id);
|
||||
} else if(!isset($user_language) and isset($user_id) and !isset($admin_id)) {
|
||||
} else if (!isset($user_language) and isset($user_id) and !isset($admin_id)) {
|
||||
$user_language=language($user_id);
|
||||
} else if (!isset($user_language) and isset($admin_id)) {
|
||||
$user_language=language($admin_id);
|
||||
@ -248,8 +248,8 @@ if ($loguserip!='localhost') {
|
||||
$language_changed = true;
|
||||
$user_language = $page_detect_language;
|
||||
}
|
||||
if($ui->st('l', 'get') or isset($language_changed)) {
|
||||
if($ui->st('l', 'get')) $user_language = $ui->st('l', 'get');
|
||||
if ($ui->st('l', 'get') or isset($language_changed)) {
|
||||
if ($ui->st('l', 'get')) $user_language = $ui->st('l', 'get');
|
||||
|
||||
# https://github.com/easy-wi/developer/issues/2
|
||||
if (isset($_SESSION['sID'])) {
|
||||
@ -288,7 +288,7 @@ if (isset($logininclude) and $logininclude == true) {
|
||||
die('Your IP is banned');
|
||||
}
|
||||
}
|
||||
if($ui->st('r', 'get')) {
|
||||
if ($ui->st('r', 'get')) {
|
||||
$header = '<meta http-equiv="refresh" content="3; URL=' . $ui->escaped('SCRIPT_NAME', 'server') . '?w=' . $ui->st('r', 'get') . '">';
|
||||
if (!isset($user_language)) {
|
||||
$user_language = $rSA['language'];
|
||||
@ -299,22 +299,22 @@ if($ui->st('r', 'get')) {
|
||||
if ($ui->w('action', 4, 'post')) {
|
||||
$action = $ui->w('action', 4, 'post');
|
||||
}
|
||||
if($ui->smallletters('site','50', 'get')) {
|
||||
if ($ui->smallletters('site','50', 'get')) {
|
||||
$s = $ui->smallletters('site','50', 'get');
|
||||
}
|
||||
if($ui->st('w', 'get')) {
|
||||
if ($ui->st('w', 'get')) {
|
||||
$w = $ui->st('w', 'get');
|
||||
} else {
|
||||
$w = 'ho';
|
||||
}
|
||||
if($ui->st('d', 'get')) {
|
||||
if ($ui->st('d', 'get')) {
|
||||
$d = $ui->st('d', 'get');
|
||||
} else {
|
||||
$d = 'md';
|
||||
}
|
||||
|
||||
|
||||
if($ui->smallletters('t','1', 'get')) {
|
||||
if ($ui->smallletters('t','1', 'get')) {
|
||||
$list_type = $ui->smallletters('t','1', 'get');
|
||||
if ($list_type=="m") {
|
||||
$where="WHERE `type`='map'";
|
||||
@ -328,7 +328,7 @@ if($ui->smallletters('t','1', 'get')) {
|
||||
$list_type="a";
|
||||
$where = '';
|
||||
}
|
||||
if($ui->pregw('g','14', 'get')) {
|
||||
if ($ui->pregw('g','14', 'get')) {
|
||||
$list_gtype = $ui->pregw('g','14', 'get');
|
||||
if ($where != '') {
|
||||
$where .=" AND shorten='$list_gtype'";
|
||||
@ -342,7 +342,7 @@ if($ui->pregw('g','14', 'get')) {
|
||||
} else {
|
||||
$list_gtype = '';
|
||||
}
|
||||
if($ui->pregw('m','20', 'get')) {
|
||||
if ($ui->pregw('m','20', 'get')) {
|
||||
$list_gtype = $ui->pregw('m','20', 'get');
|
||||
if ($where != '') {
|
||||
$where .=" AND (s.`shorten`='$list_gtype' OR s.`qstat`='$list_gtype')";
|
||||
@ -361,14 +361,14 @@ if (empty($where) and $w!="lo" and $w!="rs" and ($w!="ma" and $d!="ud")) {
|
||||
} else if ($w!="lo" and ($w=="ma" and $d=="ud")) {
|
||||
$where .=" AND r.`resellerid`=:reseller_id";
|
||||
}
|
||||
if($ui->isinteger('a', 'get')) {
|
||||
if ($ui->isinteger('a', 'get')) {
|
||||
$a = (int) $ui->isinteger('a', 'get');
|
||||
$amount = $a;
|
||||
$_SESSION['amount'] = $a;
|
||||
} else {
|
||||
$amount = (isset($_SESSION['amount']) and is_int($_SESSION['amount'])) ? $_SESSION['amount'] : 20;
|
||||
}
|
||||
if($ui->id('p', 19, 'get')) {
|
||||
if ($ui->id('p', 19, 'get')) {
|
||||
$start = $ui->id('p', 19, 'get');
|
||||
} else {
|
||||
$start = 0;
|
||||
@ -395,7 +395,7 @@ if ($w=="ma" and $d=="ud" and isset($action) and $action=="ud" and $ui->descript
|
||||
$i = 0;
|
||||
$gamestring_buf = '';
|
||||
foreach($ui->description('description', 'post') as $description) {
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query->execute(array($description, $id, 0));
|
||||
} else {
|
||||
$query->execute(array($description, $id, $admin_id));
|
||||
|
@ -1351,13 +1351,13 @@ foreach ($defined as $table => $t_p) {
|
||||
$add = $sql->prepare($add_query);
|
||||
$add->execute();
|
||||
}
|
||||
if(count($addIndex)>0) {
|
||||
if (count($addIndex)>0) {
|
||||
$add_query='ALTER TABLE `'.$table.'` ADD INDEX(`'.implode('`),ADD INDEX(`',$addIndex).'`)';
|
||||
$response->add('ADD: '.$add_query.'<br />');
|
||||
$add = $sql->prepare($add_query);
|
||||
$add->execute();
|
||||
}
|
||||
if(count($removeIndex)>0) {
|
||||
if (count($removeIndex)>0) {
|
||||
$remove_query='ALTER TABLE `'.$table.'` DROP INDEX `'.implode('`,DROP INDEX `',$removeIndex).'`';
|
||||
$response->add('ADD: '.$remove_query.'<br />');
|
||||
$remove = $sql->prepare($remove_query);
|
||||
|
@ -42,7 +42,7 @@ $sprache = getlanguagefile('tickets',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -327,7 +327,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=ti&d=mt&o='.$o.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
@ -424,7 +424,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$state = $row['state'];
|
||||
}
|
||||
if (isset($state) and $state!='C' and $ui->w('state',1, 'post') != 'C') {
|
||||
if($ui->id('priority',1, 'post')) {
|
||||
if ($ui->id('priority',1, 'post')) {
|
||||
$query = $sql->prepare("UPDATE `tickets` SET `state`=?,`supporter`=?,`priority`=? WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($ui->w('state',1, 'post'),$ui->id('supporter',10, 'post'),$ui->id('priority',1, 'post'),$id,$reseller_id));
|
||||
}
|
||||
@ -433,7 +433,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$query = $sql->prepare("INSERT INTO `tickets_text` (`ticketID`,`message`,`writeDate`,`userID`,`resellerid`) VALUES (?,?,?,?,?)");
|
||||
$query->execute(array($id,$ui->post['ticket'],$logdate,$admin_id,$reseller_id));
|
||||
}
|
||||
if(isid($userid,10)) {
|
||||
if (isid($userid,10)) {
|
||||
$query = $sql->prepare("SELECT `mail_ticket` FROM `userdata` WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($userid));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
|
@ -42,7 +42,7 @@ $sprache = getlanguagefile('tickets',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -57,7 +57,7 @@ if ($reseller_id != 0 and $admin_id==$reseller_id) {
|
||||
$resellerid = 0;
|
||||
} else if ($reseller_id != 0 and $admin_id != $reseller_id) {
|
||||
$resellerid = $reseller_id;
|
||||
} else if ($reseller_id==0) {
|
||||
} else if ($reseller_id == 0) {
|
||||
$resellerid = 0;
|
||||
}
|
||||
if ($ui->st('d', 'get') == 'ad') {
|
||||
@ -191,13 +191,13 @@ if ($ui->st('d', 'get') == 'ad') {
|
||||
$state = $row['state'];
|
||||
}
|
||||
if (isset($state) and $state!='C' and $state!='P') {
|
||||
if($ui->id('userPriority',1, 'post')) {
|
||||
if ($ui->id('userPriority',1, 'post')) {
|
||||
$query=($state == 'A') ? $sql->prepare("UPDATE `tickets` SET `state`='P',`userPriority`=? WHERE `id`=? AND `resellerid`=? LIMIT 1") : $sql->prepare("UPDATE `tickets` SET `userPriority`=? WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($ui->id('userPriority',1, 'post'),$id,$resellerid));
|
||||
}
|
||||
$query = $sql->prepare("INSERT INTO `tickets_text` (`ticketID`,`message`,`writeDate`,`userID`,`resellerid`) VALUES (?,?,?,?,?)");
|
||||
$query->execute(array($id,$ui->post['ticket'],$logdate,$admin_id,$resellerid));
|
||||
if(isid($userid,10)) {
|
||||
if (isid($userid,10)) {
|
||||
$query = $sql->prepare("SELECT `mail_ticket` FROM `userdata` WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($userid));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
|
@ -34,12 +34,12 @@
|
||||
* Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
|
||||
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
if(!isset($admin_id) or $main != 1 or (isset($admin_id) and !$pa['traffic'])) {
|
||||
if (!isset($admin_id) or $main != 1 or (isset($admin_id) and !$pa['traffic'])) {
|
||||
header('Location: admin.php');
|
||||
die('No acces');
|
||||
}
|
||||
$sprache = getlanguagefile('traffic',$user_language,$reseller_id);
|
||||
if ($d== 'se' and $reseller_id==0) {
|
||||
if ($d== 'se' and $reseller_id == 0) {
|
||||
|
||||
include(EASYWIDIR . '/stuff/keyphrasefile.php');
|
||||
|
||||
@ -149,7 +149,7 @@ if ($d== 'se' and $reseller_id==0) {
|
||||
$whichdata="&ips=".$ui->post['what'];
|
||||
$display = $sprache->subnet . ' ' . $ui->post['what'];
|
||||
}
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$pselect = $sql->prepare("SELECT `ips` FROM `resellerdata`");
|
||||
$pselect->execute();
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -183,7 +183,7 @@ if ($d== 'se' and $reseller_id==0) {
|
||||
$kind="rs";
|
||||
$whichdata="&short=".$ui->post['what'];
|
||||
$extra = $gsprache->reseller;
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$pselect = $sql->prepare("SELECT `id`,`cname` FROM `userdata` WHERE `accounttype`='r' AND `id`=`resellerid`");
|
||||
$pselect->execute();
|
||||
}
|
||||
@ -198,7 +198,7 @@ if ($d== 'se' and $reseller_id==0) {
|
||||
$kind="us";
|
||||
$whichdata="&distro=".$ui->post['what'];
|
||||
$extra = $sprache->user;
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$pselect = $sql->prepare("SELECT `id`,`cname` FROM `userdata` WHERE `accounttype`='r'");
|
||||
$pselect->execute();
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -213,7 +213,7 @@ if ($d== 'se' and $reseller_id==0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$pselect = $sql->prepare("SELECT `cname` FROM `userdata` WHERE `accounttype`='r' AND `id`=:id LIMIT 1");
|
||||
$pselect->execute(array(':id' => $ui->post['what']));
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -228,7 +228,7 @@ if ($d== 'se' and $reseller_id==0) {
|
||||
if (isid($ui->post['what'], '30')) {
|
||||
$whichdata="&shorten=".$ui->post['what'];
|
||||
}
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$pselect = $sql->prepare("SELECT u.`cname` FROM `virtualcontainer` c LEFT JOIN `userdata` u ON c.`userid`=u.`id` WHERE c.`id`=:id ORDER BY u.`id`,c.`id` LIMIT 1");
|
||||
$pselect->execute(array(':id' =>$ui->post['what']));
|
||||
} else if ($reseller_id==$admin_id){
|
||||
@ -241,7 +241,7 @@ if ($d== 'se' and $reseller_id==0) {
|
||||
foreach ($pselect->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$display = $sprache->server . ' ' . $row['cname'] . '-' . $ui->post['what'];
|
||||
}
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$pselect = $sql->prepare("SELECT c.`id`,u.`cname` FROM `virtualcontainer` c LEFT JOIN `userdata` u ON c.`userid`=u.`id` ORDER BY u.`id`,c.`id`");
|
||||
$pselect->execute();
|
||||
} else if ($reseller_id==$admin_id){
|
||||
@ -264,7 +264,7 @@ if ($d== 'se' and $reseller_id==0) {
|
||||
$whichdata="&ip=".$ui->post['what'];
|
||||
$display = $sprache->ip . ' ' . $ui->post['what'];
|
||||
}
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$pselect = $sql->prepare("SELECT `ips` FROM `resellerdata`");
|
||||
$pselect->execute();
|
||||
} else if ($reseller_id==$admin_id) {
|
||||
@ -302,7 +302,7 @@ if ($d== 'se' and $reseller_id==0) {
|
||||
$yearstop=date('Y');
|
||||
$monthstop=date('m');
|
||||
$daystop=date('d');
|
||||
$amount=7;
|
||||
$amount = 7;
|
||||
} else if ($ui->post['dmy'] == 'da') {
|
||||
$dmy='da';
|
||||
if (validate_int($ui->post['daystart'],1,31)) {
|
||||
@ -346,7 +346,7 @@ if ($d== 'se' and $reseller_id==0) {
|
||||
$day=date('d',strtotime("-6 days"));
|
||||
$month=date('m',strtotime("-6 days"));
|
||||
$year=date('Y',strtotime("-6 days"));
|
||||
$amount=7;
|
||||
$amount = 7;
|
||||
}
|
||||
} else if ($ui->post['dmy'] == 'mo') {
|
||||
$dmy='mo';
|
||||
@ -390,7 +390,7 @@ if ($d== 'se' and $reseller_id==0) {
|
||||
$day = 1;
|
||||
$month=date('m',strtotime("-6 months"));
|
||||
$year=date('Y',strtotime("-6 months"));
|
||||
$amount=7;
|
||||
$amount = 7;
|
||||
}
|
||||
} else if ($ui->post['dmy'] == 'ye') {
|
||||
$dmy='ye';
|
||||
|
@ -44,7 +44,7 @@ $rsprache = getlanguagefile('reseller',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -148,16 +148,16 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$query = $sql->prepare("INSERT INTO `userdata` (`creationTime`,`updateTime`,`active`,`salutation`,`birthday`,`country`,`fax`,`cname`,`security`,`name`,`vname`,`mail`,`phone`,`handy`,`city`,`cityn`,`street`,`streetn`,`fdlpath`,`accounttype`,`mail_backup`,`mail_gsupdate`,`mail_securitybreach`,`mail_serverdown`,`mail_ticket`,`mail_vserver`) VALUES (NOW(),NOW(),?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
|
||||
$query->execute(array($active,$salutation,$birthday,$country,$fax,$bogus,$security,$name,$vname,$mail,$phone,$handy,$city,$cityn,$street,$streetn,$fdlpath,$accounttype,$mail_backup,$mail_gsupdate,$mail_securitybreach,$mail_serverdown,$mail_ticket,$mail_vserver));
|
||||
$id = $sql->lastInsertId();
|
||||
$query=($accounttype == 'r' and $reseller_id==0) ? $sql->prepare("SELECT `id` FROM `usergroups` WHERE `id`=? AND `grouptype`=? AND `resellerid`=0 LIMIT 1") : $sql->prepare("SELECT `id` FROM `usergroups` WHERE `id`=? AND `grouptype`=? AND `resellerid`=? LIMIT 1");
|
||||
$query=($accounttype == 'r' and $reseller_id == 0) ? $sql->prepare("SELECT `id` FROM `usergroups` WHERE `id`=? AND `grouptype`=? AND `resellerid`=0 LIMIT 1") : $sql->prepare("SELECT `id` FROM `usergroups` WHERE `id`=? AND `grouptype`=? AND `resellerid`=? LIMIT 1");
|
||||
$query2 = $sql->prepare("INSERT INTO `userdata_groups` (`userID`,`groupID`,`resellerID`) VALUES (?,?,?) ON DUPLICATE KEY UPDATE `groupID`=VALUES(`groupID`)");
|
||||
foreach ($usergroup as $gid) {
|
||||
if ($accounttype == 'r' and $reseller_id==0) $query->execute(array($gid,$accounttype));
|
||||
if ($accounttype == 'r' and $reseller_id == 0) $query->execute(array($gid,$accounttype));
|
||||
else $query->execute(array($gid,$accounttype,$reseller_id));
|
||||
if(isid($query->fetchColumn(),10)) $query2->execute(array($id,$gid,$reseller_id));
|
||||
if (isid($query->fetchColumn(),10)) $query2->execute(array($id,$gid,$reseller_id));
|
||||
}
|
||||
customColumns('U',$id,'save');
|
||||
$cnamenew = $ui->username('cname',255, 'post');
|
||||
if($prefix1== 'Y' and $accounttype!='a') {
|
||||
if ($prefix1== 'Y' and $accounttype!='a') {
|
||||
$cnamenew = $cname.$id;
|
||||
} else if ($accounttype!='a') {
|
||||
$cnamenew = $cname;
|
||||
@ -189,7 +189,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
} else {
|
||||
$maxvoserver = $ui->id('maxvoiceserver',10, 'post');
|
||||
}
|
||||
if($vserver_module or $dediserver_module) {
|
||||
if ($vserver_module or $dediserver_module) {
|
||||
if (!$ui->id('maxgserver',10, 'post')) {
|
||||
$maxvserver = 0;
|
||||
} else {
|
||||
@ -203,7 +203,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$post_ips=array_unique((array)$ui->ips('ips', 'post'));
|
||||
$maxuserram = $ui->id('maxuserram',255, 'post');
|
||||
$maxusermhz = $ui->id('maxusermhz',255, 'post');
|
||||
if ($reseller_id==0 or $reseller_id==$admin_id) {
|
||||
if ($reseller_id == 0 or $reseller_id==$admin_id) {
|
||||
$availableips=freeips($reseller_id);
|
||||
} else {
|
||||
$availableips=freeips($admin_id);
|
||||
@ -270,7 +270,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$query2 = $sql->prepare("INSERT INTO `translations` (`type`,`transID`,`lang`,`text`,`resellerID`) VALUES ('em',?,?,?,?) ON DUPLICATE KEY UPDATE `text`=VALUES(`text`)");
|
||||
$query->execute(array($reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) $query2->execute(array($row['transID'], $row['lang'], $row['text'],$id));
|
||||
$resellersid=($reseller_id==0) ? $resellerid : $reseller_id;
|
||||
$resellersid=($reseller_id == 0) ? $resellerid : $reseller_id;
|
||||
$query = $sql->prepare("INSERT INTO `resellerdata` (`useractive`,`ips`,`maxuser`,`maxgserver`,`maxvoserver`,`maxdedis`,`maxvserver`,`maxuserram`,`maxusermhz`,`resellerid`,`resellersid`) VALUES (?,?,?,?,?,?,?,?,?,?,?)");
|
||||
$query->execute(array($useractive,$ips,$maxuser,$maxgserver,$maxvoserver,$maxdedis,$maxvserver,$maxuserram,$maxusermhz,$resellerid,$resellersid));
|
||||
$query = $sql->prepare("INSERT INTO `eac` (resellerid) VALUES (?)");
|
||||
@ -311,7 +311,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
if ($row['defaultgroup'] == 'Y') $defaultGroups[$row['grouptype']][$row['id']] = $row['name'];
|
||||
$groups[$row['grouptype']][$row['id']] = $row['name'];
|
||||
}
|
||||
if ($reseller_id==0 or $reseller_id==$admin_id) {
|
||||
if ($reseller_id == 0 or $reseller_id==$admin_id) {
|
||||
$availableips=freeips($reseller_id);
|
||||
} else {
|
||||
$availableips=freeips($admin_id);
|
||||
@ -322,7 +322,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
} else if ($ui->st('d', 'get') == 'dl' and $ui->id('id', 10, 'get') != $admin_id and ($pa['user'] or $pa['user_users'])) {
|
||||
$id = $ui->id('id', 10, 'get');
|
||||
if (!$ui->smallletters('action',2, 'post')) {
|
||||
if($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `cname`,`name`,`accounttype` FROM `userdata` WHERE `id`=? AND (`resellerid`=? OR `id`=`resellerid`) LIMIT 1");
|
||||
} else {
|
||||
$query = $sql->prepare("SELECT `cname`,`name`,`accounttype` FROM `userdata` WHERE `id`=? AND `resellerid`=? AND `resellerid`!=`id` LIMIT 1");
|
||||
@ -342,7 +342,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
} else if ($ui->smallletters('action',2, 'post') == 'dl') {
|
||||
if ($reseller_id != 0 and $admin_id != $reseller_id) $reseller_id = $admin_id;
|
||||
$template_file = '';
|
||||
if($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `cname`,`resellerid`,`accounttype` FROM `userdata` WHERE `id`=? AND (`resellerid`=? OR `id`=resellerid) LIMIT 1");
|
||||
} else {
|
||||
$query = $sql->prepare("SELECT `cname`,`resellerid`,`accounttype` FROM `userdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
@ -360,7 +360,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
updateJobs($id,$reseller_id);
|
||||
}
|
||||
}
|
||||
if($query->rowCount()>0 and isset($deleted)) {
|
||||
if ($query->rowCount()>0 and isset($deleted)) {
|
||||
$update = $sql->prepare("UPDATE `userdata` SET `jobPending`='Y' WHERE `id`=? AND `resellerid`=?");
|
||||
$update->execute(array($id,$resellerid));
|
||||
$template_file .= $spracheResponse->table_del ."<br />";
|
||||
@ -376,7 +376,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$id = $ui->id('id', 10, 'get');
|
||||
$resellerid=($reseller_id != 0 and $admin_id != $reseller_id) ? $admin_id : $reseller_id;
|
||||
if (!$ui->smallletters('action',2, 'post')) {
|
||||
$query=($reseller_id==0) ? $sql->prepare("SELECT * FROM `userdata` WHERE id=? AND (`resellerid`=? OR `id`=resellerid) LIMIT 1") : $sql->prepare("SELECT * FROM `userdata` WHERE id=? AND `resellerid`=? LIMIT 1");
|
||||
$query=($reseller_id == 0) ? $sql->prepare("SELECT * FROM `userdata` WHERE id=? AND (`resellerid`=? OR `id`=resellerid) LIMIT 1") : $sql->prepare("SELECT * FROM `userdata` WHERE id=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($id,$resellerid));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$active = 'N';
|
||||
@ -432,14 +432,14 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$groups[$row['id']] = $row['name'];
|
||||
}
|
||||
if ($accounttype == 'r' and $reseller_id==0) $lookUpID = $id;
|
||||
if ($accounttype == 'r' and $reseller_id == 0) $lookUpID = $id;
|
||||
$query = $sql->prepare("SELECT `groupID` FROM `userdata_groups` WHERE `userID`=? AND `resellerID`=?");
|
||||
$query->execute(array($id,$lookUpID));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$groupsAssigned[] = $row['groupID'];
|
||||
}
|
||||
if ($accounttype == 'r') {
|
||||
$ips=($reseller_id==0 or $reseller_id==$admin_id) ? freeips($reseller_id) : freeips($admin_id);
|
||||
$ips=($reseller_id == 0 or $reseller_id==$admin_id) ? freeips($reseller_id) : freeips($admin_id);
|
||||
$ipsAssigned = array();
|
||||
$query = $sql->prepare("SELECT * FROM `resellerdata` WHERE `resellerid`=?");
|
||||
$query->execute(array($id));
|
||||
@ -481,7 +481,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$template_file = implode('<br />',$errors);
|
||||
} else {
|
||||
$jobPending = '';
|
||||
if ($reseller_id==0){
|
||||
if ($reseller_id == 0){
|
||||
$query = $sql->prepare("SELECT `accounttype`,`active`,`cname`,`resellerid` FROM `userdata` WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($id));
|
||||
} else {
|
||||
@ -519,7 +519,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$fax = $ui->phone('fax',50, 'post');
|
||||
$useractive=($ui->active('useractive', 'post')) ? $ui->active('useractive', 'post') : 'N';
|
||||
if ($ui->ips('ips', 'post') or $ui->id('maxuser',10, 'post') and $accounttype='r') {
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$availableips=freeips($reseller_id);
|
||||
} else if ($resellerlockupid==0 or $resellerlockupid==$admin_id) {
|
||||
$availableips=freeips($resellerlockupid);
|
||||
@ -547,7 +547,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$maxusermhz = $ui->id('maxusermhz',255, 'post');
|
||||
$query = $sql->prepare("SELECT `useractive` FROM `resellerdata` WHERE `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($id));
|
||||
if($query->fetchColumn() != $useractive) {
|
||||
if ($query->fetchColumn() != $useractive) {
|
||||
$query = $sql->prepare("SELECT `id`,`cname` FROM `userdata` WHERE `resellerid`=?");
|
||||
$query->execute(array($id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row){
|
||||
@ -574,13 +574,13 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
customColumns('U',$id,'save');
|
||||
if ($id != $admin_id) {
|
||||
$tempArray = array();
|
||||
$query=($accounttype == 'r' and $reseller_id==0) ? $sql->prepare("SELECT `id` FROM `usergroups` WHERE `id`=? AND `grouptype`=? AND `resellerid`=0 LIMIT 1") : $sql->prepare("SELECT `id` FROM `usergroups` WHERE `id`=? AND `grouptype`=? AND `resellerid`=? LIMIT 1");
|
||||
$query=($accounttype == 'r' and $reseller_id == 0) ? $sql->prepare("SELECT `id` FROM `usergroups` WHERE `id`=? AND `grouptype`=? AND `resellerid`=0 LIMIT 1") : $sql->prepare("SELECT `id` FROM `usergroups` WHERE `id`=? AND `grouptype`=? AND `resellerid`=? LIMIT 1");
|
||||
$query2 = $sql->prepare("INSERT INTO `userdata_groups` (`userID`,`groupID`,`resellerID`) VALUES (?,?,?) ON DUPLICATE KEY UPDATE `groupID`=VALUES(`groupID`)");
|
||||
foreach ($ui->id('groups',10, 'post') as $gid) {
|
||||
$tempArray[] = $gid;
|
||||
if ($accounttype == 'r' and $reseller_id==0) $query->execute(array($gid,$accounttype));
|
||||
if ($accounttype == 'r' and $reseller_id == 0) $query->execute(array($gid,$accounttype));
|
||||
else $query->execute(array($gid,$accounttype,$resellerlockupid));
|
||||
if(isid($query->fetchColumn(),10)) $query2->execute(array($id,$gid,$resellerlockupid));
|
||||
if (isid($query->fetchColumn(),10)) $query2->execute(array($id,$gid,$resellerlockupid));
|
||||
}
|
||||
$query = $sql->prepare("SELECT `groupID` FROM `userdata_groups` WHERE `userID`=? AND `resellerID`=?");
|
||||
$query2 = $sql->prepare("DELETE FROM `userdata_groups` WHERE `groupID`=? AND `userID`=? AND `resellerID`=? LIMIT 1");
|
||||
@ -604,7 +604,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
} else if ($ui->st('d', 'get') == 'pw' and $ui->id('id', 10, 'get') and $pa['userPassword']) {
|
||||
$id = $ui->id('id', 10, 'get');
|
||||
$query=($reseller_id==0) ? $sql->prepare("SELECT `cname`,`accounttype` FROM `userdata` WHERE `id`=? AND (`resellerid`=? OR `id`=`resellerid`) LIMIT 1") : $sql->prepare("SELECT `cname`,`accounttype` FROM `userdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query=($reseller_id == 0) ? $sql->prepare("SELECT `cname`,`accounttype` FROM `userdata` WHERE `id`=? AND (`resellerid`=? OR `id`=`resellerid`) LIMIT 1") : $sql->prepare("SELECT `cname`,`accounttype` FROM `userdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($id,$reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if (($row['accounttype'] == 'a' and $pa['user']) or ($row['accounttype'] != 'a') and ($pa['user'] or $pa['user_users'])) $cname = $row['cname'];
|
||||
@ -623,7 +623,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$password = $ui->password('password',20, 'post');
|
||||
$salt=md5(mt_rand().date('Y-m-d H:i:s:u'));
|
||||
$security=createHash($cname,$password,$salt,$aeskey);
|
||||
$query=($reseller_id==0) ? $sql->prepare("UPDATE `userdata` SET `updateTime`=NOW(),`security`=?,`salt`=? WHERE id=? AND (`resellerid`=? OR `id`=`resellerid`) LIMIT 1") : $sql->prepare("UPDATE `userdata` SET `updateTime`=NOW(),`security`=?,`salt`=? WHERE id=? AND `resellerid`=? LIMIT 1");
|
||||
$query=($reseller_id == 0) ? $sql->prepare("UPDATE `userdata` SET `updateTime`=NOW(),`security`=?,`salt`=? WHERE id=? AND (`resellerid`=? OR `id`=`resellerid`) LIMIT 1") : $sql->prepare("UPDATE `userdata` SET `updateTime`=NOW(),`security`=?,`salt`=? WHERE id=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($security,$salt,$id,$reseller_id));
|
||||
$template_file = $spracheResponse->table_add ."<br />";
|
||||
$loguseraction="%psw% %user% $cname";
|
||||
@ -674,9 +674,9 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
if ((in_array($s,$selected) and $k != $s) or (!in_array($s,$selected) and $k==$s)) $ticketLinks[$k] .= '&state[] = '.$s;
|
||||
}
|
||||
}
|
||||
if(count($selected)==1) $and.=" AND `active`='${selected[0]}'";
|
||||
else if(count($selected)==2) $and.=" AND (`active`='${selected[0]}' OR `active`='${selected[1]}')";
|
||||
if($reseller_id==0) {
|
||||
if (count($selected)==1) $and.=" AND `active`='${selected[0]}'";
|
||||
else if (count($selected)==2) $and.=" AND (`active`='${selected[0]}' OR `active`='${selected[1]}')";
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `id`,`active`,`cname`,`name`,`accounttype`,`jobPending`,`resellerid` FROM `userdata` WHERE (`resellerid`=0 OR `id`=`resellerid`) ${and} ORDER BY $orderby LIMIT $start,$amount");
|
||||
$query->execute();
|
||||
} else {
|
||||
@ -721,7 +721,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$table[] = array('id' => $row['id'], 'img' => $imgName,'alt' => $imgAlt,'adminaccount' => $adminaccount,'accounttype' => $accounttype,'cname' => $row['cname'], 'name' => $row['name'], 'jobPending' => $jobPending,'active' => $row['active']);
|
||||
}
|
||||
$next = $start+$amount;
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT COUNT(`id`) AS `amount` FROM `userdata` WHERE (`resellerid`=0 OR `id`=`resellerid`) ${and}");
|
||||
$query->execute();
|
||||
} else {
|
||||
@ -743,7 +743,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=us&d=md&o='.$o.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$amount=20;
|
||||
}
|
||||
$link .= $amount;
|
||||
|
@ -46,7 +46,7 @@ $rsprache = getlanguagefile('reseller',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -335,16 +335,16 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$query = $sql->prepare("SELECT `active`,`grouptype`,`name` FROM `usergroups` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($id,$lookIpID));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if($row['active'] == 'Y') {
|
||||
if ($row['active'] == 'Y') {
|
||||
$imgName='16_ok';
|
||||
$imgAlt='ok';
|
||||
} else {
|
||||
$imgName='16_bad';
|
||||
$imgAlt='bad';
|
||||
}
|
||||
if($row['grouptype'] == 'r') {
|
||||
if ($row['grouptype'] == 'r') {
|
||||
$grouptype = $sprache->accounttype_reseller;
|
||||
} else if($row['grouptype'] == 'a') {
|
||||
} else if ($row['grouptype'] == 'a') {
|
||||
$grouptype = $sprache->accounttype_admin;
|
||||
} else {
|
||||
$grouptype = $sprache->accounttype_user;
|
||||
@ -404,21 +404,21 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$query = $sql->prepare("SELECT * FROM `usergroups` WHERE `resellerid`=? ORDER BY $orderby");
|
||||
$query->execute(array($lookIpID));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if($row['active'] == 'Y') {
|
||||
if ($row['active'] == 'Y') {
|
||||
$imgName='16_ok';
|
||||
$imgAlt='ok';
|
||||
} else {
|
||||
$imgName='16_bad';
|
||||
$imgAlt='inactive';
|
||||
}
|
||||
if($row['grouptype'] == 'r') {
|
||||
if ($row['grouptype'] == 'r') {
|
||||
$grouptype = $sprache->accounttype_reseller;
|
||||
} else if($row['grouptype'] == 'a') {
|
||||
} else if ($row['grouptype'] == 'a') {
|
||||
$grouptype = $sprache->accounttype_admin;
|
||||
} else {
|
||||
$grouptype = $sprache->accounttype_user;
|
||||
}
|
||||
if($row['defaultgroup'] == 'Y') {
|
||||
if ($row['defaultgroup'] == 'Y') {
|
||||
$defaultgroup = $gsprache->yes;
|
||||
} else {
|
||||
$defaultgroup = $gsprache->no;
|
||||
|
@ -111,7 +111,7 @@ if ($ui->id('id', 10, 'get') and $ui->id('adid',10, 'get') and in_array($ui->sma
|
||||
$customer = $customer."-p";
|
||||
}
|
||||
if ($ui->st('action', 'get') == 'ad' and ($protected=="N" or ($protected=="Y" and $paddon=="Y"))) {
|
||||
if(ssh2_execute('gs',$rootID,"sudo -u $customer ./control.sh addaddon $type $addon \"$serverfolder\" \"$modfolder\"") !== false){
|
||||
if (ssh2_execute('gs',$rootID,"sudo -u $customer ./control.sh addaddon $type $addon \"$serverfolder\" \"$modfolder\"") !== false){
|
||||
$query = $sql->prepare("INSERT INTO `addons_installed` (`userid`,`addonid`,`serverid`,`servertemplate`,`paddon`,`resellerid`) VALUES (?,?,?,?,?,?)");
|
||||
$query->execute(array($user_id,$addonid,$serverid,$servertemplate,$protected,$reseller_id));
|
||||
$template_file = $sprache->addon_inst;
|
||||
@ -148,7 +148,7 @@ if ($ui->id('id', 10, 'get') and $ui->id('adid',10, 'get') and in_array($ui->sma
|
||||
$installedid = $query2->fetchColumn();
|
||||
}
|
||||
}
|
||||
if(ssh2_execute('gs',$rootID,$cmds) !== false){
|
||||
if (ssh2_execute('gs',$rootID,$cmds) !== false){
|
||||
$template_file = $sprache->addon_del;
|
||||
$actionstatus="ok";
|
||||
} else {
|
||||
@ -204,7 +204,7 @@ if ($ui->id('id', 10, 'get') and $ui->id('adid',10, 'get') and in_array($ui->sma
|
||||
$query3 = $sql->prepare("SELECT `text` FROM `translations` WHERE `type`='ad' AND `transID`=? AND `lang`=? AND `resellerID`=? LIMIT 1");
|
||||
$query3->execute(array($adid,$user_language,$reseller_id));
|
||||
$descriptionrow = $query3->fetchColumn();
|
||||
if(empty($descriptionrow)) {
|
||||
if (empty($descriptionrow)) {
|
||||
$query3 = $sql->prepare("SELECT `text` FROM `translations` WHERE `type`='ad' AND `transID`=? AND `lang`=? AND `resellerID`=? LIMIT 1");
|
||||
$query3->execute(array($adid,$default_language,$reseller_id));
|
||||
$descriptionrow = $query->fetchColumn();
|
||||
|
@ -67,7 +67,7 @@ if ($ui->st('d', 'get') == 'ud' and $ui->id('id',19, 'get') and (!isset($_SESSIO
|
||||
if ($ftpupload!='') {
|
||||
include(EASYWIDIR . "/stuff/ssh_exec.php");
|
||||
$serverfolder="${row['serverip']}_${row['port']}/${shorten}";
|
||||
if(ssh2_execute('gs', $row['rootID'],"sudo -u ${customer} ./control.sh fastdl ${customer} ${serverfolder} \"${ftpupload}\" ${row['modfolder']}") === false) {
|
||||
if (ssh2_execute('gs', $row['rootID'],"sudo -u ${customer} ./control.sh fastdl ${customer} ${serverfolder} \"${ftpupload}\" ${row['modfolder']}") === false) {
|
||||
$template_file = $spracheResponse->error_server;
|
||||
$actionstatus="fail";
|
||||
} else {
|
||||
|
@ -219,35 +219,35 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$eac = array();
|
||||
if ($rowcount>0 and $eacallowed== 'Y' and ($gshorten=="css" or $gshorten=="cod4" or $gshorten=="cstrike" or $gshorten=="czero" or $gshorten=="tf")) {
|
||||
if ($gshorten=="cstrike" or $gshorten=="czero") {
|
||||
if($anticheat==3 and $hlds_3== 'Y') {
|
||||
if ($anticheat==3 and $hlds_3== 'Y') {
|
||||
$eac[] = '<option value="3" selected="selected">Easy Anti Cheat</option>';
|
||||
} else if($hlds_3== 'Y') {
|
||||
} else if ($hlds_3== 'Y') {
|
||||
$eac[] = '<option value="3">Easy Anti Cheat</option>';
|
||||
}
|
||||
if($anticheat==4 and $hlds_4== 'Y') {
|
||||
if ($anticheat==4 and $hlds_4== 'Y') {
|
||||
$eac[] = '<option value="4" selected="selected">Easy Anti Cheat Public</option>';
|
||||
} else if($hlds_4== 'Y') {
|
||||
} else if ($hlds_4== 'Y') {
|
||||
$eac[] = '<option value="4">Easy Anti Cheat Public</option>';
|
||||
}
|
||||
if($anticheat==5 and $hlds_5== 'Y') {
|
||||
if ($anticheat==5 and $hlds_5== 'Y') {
|
||||
$eac[] = '<option value="5" selected="selected">Easy Anti Cheat 32Bit</option>';
|
||||
} else if($hlds_5== 'Y') {
|
||||
} else if ($hlds_5== 'Y') {
|
||||
$eac[] = '<option value="5">Easy Anti Cheat 32Bit</option>';
|
||||
}
|
||||
if($anticheat==6 and $hlds_6== 'Y') {
|
||||
if ($anticheat==6 and $hlds_6== 'Y') {
|
||||
$eac[] = '<option value="6" selected="selected">Easy Anti Cheat Public 32Bit</option>';
|
||||
} else if($hlds_6== 'Y') {
|
||||
} else if ($hlds_6== 'Y') {
|
||||
$eac[] = '<option value="6">Easy Anti Cheat Public 32Bit</option>';
|
||||
}
|
||||
} else {
|
||||
if($anticheat==3 and $normal_3== 'Y') {
|
||||
if ($anticheat==3 and $normal_3== 'Y') {
|
||||
$eac[] = '<option value="3" selected="selected">Easy Anti Cheat</option>';
|
||||
} else if($normal_3== 'Y') {
|
||||
} else if ($normal_3== 'Y') {
|
||||
$eac[] = '<option value="3">Easy Anti Cheat</option>';
|
||||
}
|
||||
if($anticheat==4 and $normal_4== 'Y') {
|
||||
if ($anticheat==4 and $normal_4== 'Y') {
|
||||
$eac[] = '<option value="4" selected="selected">Easy Anti Cheat Public</option>';
|
||||
} else if($normal_4== 'Y') {
|
||||
} else if ($normal_4== 'Y') {
|
||||
$eac[] = '<option value="4">Easy Anti Cheat Public</option>';
|
||||
}
|
||||
}
|
||||
@ -316,19 +316,19 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
if ($ui->id("anticheat_${switchID}",1, 'post')) {
|
||||
$anticheat=($ui->id("anticheat_${switchID}",1, 'post')>0) ? $ui->id("anticheat_${switchID}",1, 'post') : 1;
|
||||
if ($row['shorten']=="cstrike" or $row['shorten']=="czero") {
|
||||
if($anticheat==3 and $hlds_3== 'N' and $hlds_5== 'Y' and $active == 'Y') $anticheat=5;
|
||||
else if($anticheat==3 and $hlds_3== 'N' and $hlds_5== 'N' and $active == 'Y') $anticheat = 1;
|
||||
if ($anticheat==3 and $hlds_3== 'N' and $hlds_5== 'Y' and $active == 'Y') $anticheat = 5;
|
||||
else if ($anticheat==3 and $hlds_3== 'N' and $hlds_5== 'N' and $active == 'Y') $anticheat = 1;
|
||||
else if ($anticheat>1 and $active == 'N') $anticheat = 1;
|
||||
if($anticheat==4 and $hlds_4== 'N' and $hlds_6== 'Y' and $active == 'Y') $anticheat=6;
|
||||
else if($anticheat==4 and $hlds_4== 'N' and $hlds_6== 'N' and $active == 'Y') $anticheat = 1;
|
||||
if ($anticheat==4 and $hlds_4== 'N' and $hlds_6== 'Y' and $active == 'Y') $anticheat = 6;
|
||||
else if ($anticheat==4 and $hlds_4== 'N' and $hlds_6== 'N' and $active == 'Y') $anticheat = 1;
|
||||
else if ($anticheat>1 and $active == 'N') $anticheat = 1;
|
||||
if($anticheat==5 and $hlds_5== 'N' and $active == 'Y') $anticheat = 1;
|
||||
if($anticheat==6 and $hlds_6== 'N' and $active == 'Y') $anticheat = 1;
|
||||
if(($anticheat>6 and $active == 'Y') or $anticheat>2 and $active == 'N') $anticheat = 1;
|
||||
if ($anticheat==5 and $hlds_5== 'N' and $active == 'Y') $anticheat = 1;
|
||||
if ($anticheat==6 and $hlds_6== 'N' and $active == 'Y') $anticheat = 1;
|
||||
if (($anticheat>6 and $active == 'Y') or $anticheat>2 and $active == 'N') $anticheat = 1;
|
||||
} else {
|
||||
if($anticheat==3 and $normal_3== 'N' and $active == 'Y') $anticheat = 1;
|
||||
if($anticheat==4 and $normal_4== 'N' and $active == 'Y') $anticheat = 1;
|
||||
if(($anticheat>4 and $active == 'Y') or $anticheat>2 and $active == 'N') $anticheat = 1;
|
||||
if ($anticheat==3 and $normal_3== 'N' and $active == 'Y') $anticheat = 1;
|
||||
if ($anticheat==4 and $normal_4== 'N' and $active == 'Y') $anticheat = 1;
|
||||
if (($anticheat>4 and $active == 'Y') or $anticheat>2 and $active == 'N') $anticheat = 1;
|
||||
}
|
||||
} else {
|
||||
$anticheat = 1;
|
||||
@ -457,14 +457,14 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$ftpport = $row['ftpport'];
|
||||
$ip = $row['ip'];
|
||||
}
|
||||
if($gamebinary == 'srcds_run'){
|
||||
if ($gamebinary == 'srcds_run'){
|
||||
$config = $binarydir. '/' . $modfolder. '/' . $postconfig;
|
||||
if ($configname=="server.cfg" and $qstat=="a2s") {
|
||||
$general_cvar=array('hostname','sv_password','sv_contact','sv_tags','motdfile','mapcyclefile','sv_downloadurl','net_maxfilesize','rcon_password','sv_rcon_minfailures','sv_rcon_maxfailures','sv_rcon_banpenalty','sv_rcon_minfailuretime','sv_pure','sv_pure_kick_clients','sv_timeout','sv_voiceenable','sv_allowdownload','sv_allowupload','sv_region','sv_friction','sv_stopspeed','sv_gravity','sv_accelerate','sv_airaccelerate','sv_wateraccelerate','sv_allow_color_correction','sv_allow_wait_command','mp_flashlight','mp_footsteps','mp_falldamage','mp_limitteams','mp_limitteams','mp_friendlyfire','mp_autokick','mp_forcecamera','mp_fadetoblack','mp_allowspectators','mp_chattime','log','sv_log_onefile','sv_logfile','sv_logbans','sv_logecho','mp_logdetail','mp_timelimit','mp_winlimit','sv_minrate','sv_maxrate','sv_minupdaterate','sv_maxupdaterate','sv_mincmdrate','sv_maxcmdrate','sv_client_cmdrate_difference','sv_client_min_interp_ratio','sv_client_max_interp_ratio','mp_fraglimit','mp_maxrounds');
|
||||
} else {
|
||||
$general_cvar = array();
|
||||
}
|
||||
} else if($gamebinary == 'hlds_run'){
|
||||
} else if ($gamebinary == 'hlds_run'){
|
||||
$config = $modfolder. '/' . $postconfig;
|
||||
$general_cvar = array();
|
||||
} else {
|
||||
@ -728,7 +728,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$pserver="/pserver/";
|
||||
$pro = $sprache->on;
|
||||
}
|
||||
if($pa['ftpaccess'] or $pa['miniroot']) {
|
||||
if ($pa['ftpaccess'] or $pa['miniroot']) {
|
||||
if ($row['newlayout'] == 'Y') $cname = $cname . '-' . $row['id'];
|
||||
$query2->execute(array($rootid));
|
||||
$ftpport = $query2->fetchColumn();
|
||||
|
@ -109,7 +109,7 @@ foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$crashedArray['ts3'] = $crached_ts3_virtual;
|
||||
$feedArray = array();
|
||||
|
||||
if($ui->smallletters('w',2, 'get') == 'da' or (!$ui->smallletters('w',2, 'get') and !$ui->smallletters('d',2, 'get'))) {
|
||||
if ($ui->smallletters('w',2, 'get') == 'da' or (!$ui->smallletters('w',2, 'get') and !$ui->smallletters('d',2, 'get'))) {
|
||||
$query = $sql->prepare("SELECT * FROM `feeds_settings` WHERE `resellerID`=? AND `active`='Y' LIMIT 1");
|
||||
$query->execute(array($reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
|
@ -73,8 +73,8 @@ foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
foreach (explode("\r\n", $row['protectedSaveCFGs']) as $cfg) if ($cfg != '') $files[] = $cfg;
|
||||
$shorten = $row['shorten'];
|
||||
$serverTemplate=($row['servertemplate']!=1) ? $row['shorten'] . '-' . $row['servertemplate'] : $row['shorten'];
|
||||
if($row['gamebinary'] == 'srcds_run') $gamePath="${row['binarydir']}/${row['modfolder']}";
|
||||
else if($row['gamebinary'] == 'hlds_run') $gamePath="${row['modfolder']}";
|
||||
if ($row['gamebinary'] == 'srcds_run') $gamePath="${row['binarydir']}/${row['modfolder']}";
|
||||
else if ($row['gamebinary'] == 'hlds_run') $gamePath="${row['modfolder']}";
|
||||
else $gamePath = '';
|
||||
$gamePath=str_replace(array('//','///','////'),'/',$gamePath);
|
||||
}
|
||||
@ -107,7 +107,7 @@ if ($query->rowCount()==0 or (isset($pallowed) and $pallowed== 'N') or (isset($_
|
||||
$i++;
|
||||
}
|
||||
foreach (preg_split('/\//',str_replace(array('//','///','////'),'/',$folders),-1,PREG_SPLIT_NO_EMPTY) as $dir) {
|
||||
if(!@ftp_chdir($ftp_connect,$dir)) {
|
||||
if (!@ftp_chdir($ftp_connect,$dir)) {
|
||||
@ftp_mkdir($ftp_connect,$dir);
|
||||
@ftp_chdir($ftp_connect,$dir);
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
$anticheat = $row['anticheat'];
|
||||
$gsswitch = $row['gsswitch'];
|
||||
$defaultMapGroup = $table[$row['gsswitch']]['defaultMapGroup'];
|
||||
if($defaultMapGroup != null) $mapGroup = $row['mapGroup'];
|
||||
if ($defaultMapGroup != null) $mapGroup = $row['mapGroup'];
|
||||
$map = $row['map'];
|
||||
$pro = $row['protected'];
|
||||
$restart = $row['restart'];
|
||||
@ -134,35 +134,35 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
}
|
||||
if (!isset($eac) and $eacallowed== 'Y' and $rowcount>0 and ($gsswitch=="css" or $gsswitch=="cod4" or $gsswitch=="cstrike" or $gsswitch=="czero" or $gsswitch=="tf")) {
|
||||
if ($gsswitch=="cstrike" or $gsswitch=="czero") {
|
||||
if($anticheat=="3" and $hlds_3== 'Y') {
|
||||
if ($anticheat=="3" and $hlds_3== 'Y') {
|
||||
$eac[] = '<option value="3" selected="selected">Easy Anti Cheat</option>';
|
||||
} else if($hlds_3== 'Y') {
|
||||
} else if ($hlds_3== 'Y') {
|
||||
$eac[] = '<option value="3">Easy Anti Cheat</option>';
|
||||
}
|
||||
if($anticheat=="4" and $hlds_4== 'Y') {
|
||||
if ($anticheat=="4" and $hlds_4== 'Y') {
|
||||
$eac[] = '<option value="4" selected="selected">Easy Anti Cheat Public</option>';
|
||||
} else if($hlds_4== 'Y') {
|
||||
} else if ($hlds_4== 'Y') {
|
||||
$eac[] = '<option value="4">Easy Anti Cheat Public</option>';
|
||||
}
|
||||
if($anticheat=="5" and $hlds_5== 'Y') {
|
||||
if ($anticheat=="5" and $hlds_5== 'Y') {
|
||||
$eac[] = '<option value="5" selected="selected">Easy Anti Cheat 32Bit</option>';
|
||||
} else if($hlds_5== 'Y') {
|
||||
} else if ($hlds_5== 'Y') {
|
||||
$eac[] = '<option value="5">Easy Anti Cheat 32Bit</option>';
|
||||
}
|
||||
if($anticheat=="6" and $hlds_6== 'Y') {
|
||||
if ($anticheat=="6" and $hlds_6== 'Y') {
|
||||
$eac[] = '<option value="6" selected="selected">Easy Anti Cheat Public 32Bit</option>';
|
||||
} else if($hlds_6== 'Y') {
|
||||
} else if ($hlds_6== 'Y') {
|
||||
$eac[] = '<option value="6">Easy Anti Cheat Public 32Bit</option>';
|
||||
}
|
||||
} else {
|
||||
if($anticheat=="3" and $normal_3== 'Y') {
|
||||
if ($anticheat=="3" and $normal_3== 'Y') {
|
||||
$eac[] = '<option value="3" selected="selected">Easy Anti Cheat</option>';
|
||||
} else if($normal_3== 'Y') {
|
||||
} else if ($normal_3== 'Y') {
|
||||
$eac[] = '<option value="3">Easy Anti Cheat</option>';
|
||||
}
|
||||
if($anticheat=="4" and $normal_4== 'Y') {
|
||||
if ($anticheat=="4" and $normal_4== 'Y') {
|
||||
$eac[] = '<option value="4" selected="selected">Easy Anti Cheat Public</option>';
|
||||
} else if($normal_4== 'Y') {
|
||||
} else if ($normal_4== 'Y') {
|
||||
$eac[] = '<option value="4">Easy Anti Cheat Public</option>';
|
||||
}
|
||||
}
|
||||
@ -206,31 +206,31 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
}
|
||||
if ($anticheat>2) {
|
||||
if ($gsswitch=="cstrike" or $gsswitch=="czero") {
|
||||
if($anticheat==3 and $hlds_3== 'N' and $hlds_5== 'Y') {
|
||||
$anticheat=5;
|
||||
} else if($anticheat==3 and $hlds_3== 'N' and $hlds_5== 'N') {
|
||||
if ($anticheat==3 and $hlds_3== 'N' and $hlds_5== 'Y') {
|
||||
$anticheat = 5;
|
||||
} else if ($anticheat==3 and $hlds_3== 'N' and $hlds_5== 'N') {
|
||||
$anticheat = 1;
|
||||
} else {
|
||||
$anticheat = 1;
|
||||
}
|
||||
if($anticheat==4 and $hlds_4== 'N' and $hlds_6== 'Y') {
|
||||
$anticheat=6;
|
||||
} else if($anticheat==4 and $hlds_4== 'N' and $hlds_6== 'N') {
|
||||
if ($anticheat==4 and $hlds_4== 'N' and $hlds_6== 'Y') {
|
||||
$anticheat = 6;
|
||||
} else if ($anticheat==4 and $hlds_4== 'N' and $hlds_6== 'N') {
|
||||
$anticheat = 1;
|
||||
} else {
|
||||
$anticheat = 1;
|
||||
}
|
||||
if($anticheat==5 and $hlds_5== 'N') {
|
||||
if ($anticheat==5 and $hlds_5== 'N') {
|
||||
$anticheat = 1;
|
||||
}
|
||||
if($anticheat==6 and $hlds_6== 'N') {
|
||||
if ($anticheat==6 and $hlds_6== 'N') {
|
||||
$anticheat = 1;
|
||||
}
|
||||
} else {
|
||||
if($anticheat==3 and $normal_3== 'N') {
|
||||
if ($anticheat==3 and $normal_3== 'N') {
|
||||
$anticheat = 1;
|
||||
}
|
||||
if($anticheat==4 and $normal_4== 'N') {
|
||||
if ($anticheat==4 and $normal_4== 'N') {
|
||||
$anticheat = 1;
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$lastID = $sql->lastInsertId();
|
||||
$query = $sql->prepare("INSERT INTO `tickets_text` (`ticketID`,`writeDate`,`userID`,`message`,`resellerID`) VALUES (?,?,?,?,?)");
|
||||
$query->execute(array($lastID,$logdate,$user_id,$ticketText,$reseller_id));
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$query = $sql->prepare("SELECT `id`,`mail_ticket` FROM `userdata` WHERE `resellerid`='0' AND `accounttype`='a'");
|
||||
$query->execute();
|
||||
} else {
|
||||
@ -181,7 +181,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$state = $row['state'];
|
||||
}
|
||||
if (isset($state) and $state!='C' and $state!='P') {
|
||||
if($ui->id('userPriority',1, 'post')) {
|
||||
if ($ui->id('userPriority',1, 'post')) {
|
||||
$query=($state == 'A') ? $sql->prepare("UPDATE `tickets` SET `state`='P',`userPriority`=? WHERE `id`=? AND `resellerid`=? LIMIT 1") : $sql->prepare("UPDATE `tickets` SET `userPriority`=? WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($ui->id('userPriority',1, 'post'),$id,$reseller_id));
|
||||
$template_file = ($query->rowCount()>0) ? $spracheResponse->table_add : $spracheResponse->error_table;
|
||||
@ -192,7 +192,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$count = $query->rowCount();
|
||||
$template_file = ((!isset($template_file) and $count > 0) or (isset($template_file) & $template_file == $spracheResponse->error_table & $count>0)) ? $spracheResponse->table_add : $spracheResponse->error_table;
|
||||
}
|
||||
if(isid($userid,10)) {
|
||||
if (isid($userid,10)) {
|
||||
$query = $sql->prepare("SELECT `mail_ticket` FROM `userdata` WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($userid));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
|
@ -51,7 +51,7 @@ if (isset($admin_id)) {
|
||||
include(EASYWIDIR . '/stuff/class_voice.php');
|
||||
if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$template_file = $spracheResponse->token;
|
||||
} else if($ui->st('d', 'get') == 'md' and $ui->id('id',19, 'get') and (!isset($_SESSION['sID']) or in_array($ui->id('id', 10, 'get'),$substituteAccess['vd']))) {
|
||||
} else if ($ui->st('d', 'get') == 'md' and $ui->id('id',19, 'get') and (!isset($_SESSION['sID']) or in_array($ui->id('id', 10, 'get'),$substituteAccess['vd']))) {
|
||||
$id = $ui->id('id',19, 'get');
|
||||
if (!$ui->smallletters('action',2, 'post')) {
|
||||
$query = $sql->prepare("SELECT d.`dnsID`,d.`dns`,d.`ip`,d.`port`,t.`defaultdns` FROM `voice_dns` d LEFT JOIN `voice_tsdns` t ON d.`tsdnsID`=t.`id` WHERE d.`active`='Y' AND d.`dnsID`=? AND d.`resellerID`=? LIMIT 1");
|
||||
|
@ -47,7 +47,7 @@ $sprache = getlanguagefile('voice',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
|
@ -53,7 +53,7 @@ $loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
|
||||
@ -121,7 +121,7 @@ if ($ui->w('action',4, 'post') and !token(true)) {
|
||||
|
||||
$resellerIDs = array();
|
||||
|
||||
$or = ($reseller_id==0) ? 'OR `resellerid`=`id`' : '';
|
||||
$or = ($reseller_id == 0) ? 'OR `resellerid`=`id`' : '';
|
||||
$query = $sql->prepare("SELECT `id`,`cname`,`vname`,`name` FROM `userdata` WHERE (`resellerid`=? $or) AND `accounttype`='r' ORDER BY `id` DESC");
|
||||
$query->execute(array($reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
@ -736,7 +736,7 @@ if ($ui->w('action',4, 'post') and !token(true)) {
|
||||
$password = ($ui->id("$virtualserver_id-password", 1, 'post') == 1) ? 'Y' : 'N';
|
||||
$serverdns = ($ui->domain("$virtualserver_id-virtualserver_dns", 'post') == '') ? $cnamenew . '-' . $virtualserver_id . '.' . $defaultdns : $ui->domain("$virtualserver_id-virtualserver_dns", 'post');
|
||||
|
||||
if($port != null) {
|
||||
if ($port != null) {
|
||||
$serverdns=strtolower($serverdns);
|
||||
unset($addlist);
|
||||
$addlist = array();
|
||||
|
@ -48,7 +48,7 @@ $sprache = getlanguagefile('voice',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -162,7 +162,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$id = $query->fetchColumn();
|
||||
$dnsarray=tsdns('li',$ip,$port,$user,$publickey,$keyname,$pass,'N',$serverdir,$bit, array(''), array(''), array(''),$reseller_id,$sql);
|
||||
$newArray = array();
|
||||
if(is_array($dnsarray)) {
|
||||
if (is_array($dnsarray)) {
|
||||
$table = array();
|
||||
$query = $sql->prepare("SELECT `id`,`cname`,`vname`,`name` FROM `userdata` WHERE `resellerid`=? AND `accounttype`='u' ORDER BY `id` DESC");
|
||||
$query->execute(array($reseller_id));
|
||||
@ -182,7 +182,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$newArray = array();
|
||||
$maxPost=@ini_get('suhosin.post.max_vars');
|
||||
$maxRequests=@ini_get('suhosin.request.max_vars');
|
||||
if($maxRequests and $maxPost and $maxPost<$maxRequests) {
|
||||
if ($maxRequests and $maxPost and $maxPost<$maxRequests) {
|
||||
$max = $maxPost;
|
||||
} else {
|
||||
$max = $maxRequests;
|
||||
@ -230,7 +230,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$bit = $row['bitversion'];
|
||||
}
|
||||
$dnsarray=tsdns('li',$ssh2ip,$ssh2port,$ssh2user,$publickey,$keyname,$ssh2password,'N',$serverdir,$bit, array(''), array(''), array(''),$reseller_id,$sql);
|
||||
if(is_array($dnsarray)) {
|
||||
if (is_array($dnsarray)) {
|
||||
$table = array();
|
||||
$query = $sql->prepare("SELECT `id`,`cname`,`vname`,`name` FROM `userdata` WHERE `resellerid`=? AND `accounttype`='u' ORDER BY `id` DESC");
|
||||
$query->execute(array($reseller_id));
|
||||
@ -250,7 +250,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$newArray = array();
|
||||
$maxPost=@ini_get('suhosin.post.max_vars');
|
||||
$maxRequests=@ini_get('suhosin.request.max_vars');
|
||||
if($maxRequests and $maxPost and $maxPost<$maxRequests) {
|
||||
if ($maxRequests and $maxPost and $maxPost<$maxRequests) {
|
||||
$max = $maxPost;
|
||||
} else {
|
||||
$max = $maxRequests;
|
||||
|
@ -48,7 +48,7 @@ $sprache = getlanguagefile('voice',$user_language,$reseller_id);
|
||||
$loguserid = $admin_id;
|
||||
$logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
if ($reseller_id==0) {
|
||||
if ($reseller_id == 0) {
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
} else {
|
||||
@ -405,7 +405,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
$pageamount = ceil($colcount / $amount);
|
||||
$link='<a href="admin.php?w=vr&&o='.$o.'&a=';
|
||||
if(!isset($amount)) {
|
||||
if (!isset($amount)) {
|
||||
$link .="20";
|
||||
} else {
|
||||
$link .= $amount;
|
||||
|
@ -35,7 +35,7 @@
|
||||
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if(!isset($admin_id) or $main!=1 or (isset($admin_id) and !$pa['voiceserver'] and !$pa['voiceserverSettings'] and !$pa['voiceserverStats'])) {
|
||||
if (!isset($admin_id) or $main!=1 or (isset($admin_id) and !$pa['voiceserver'] and !$pa['voiceserverSettings'] and !$pa['voiceserverStats'])) {
|
||||
header('Location: admin.php');
|
||||
die;
|
||||
}
|
||||
@ -163,7 +163,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$yearstop=date('Y');
|
||||
$monthstop=date('m');
|
||||
$daystop=date('d');
|
||||
$amount=7;
|
||||
$amount = 7;
|
||||
} else if ($ui->post['dmy'] == 'to') {
|
||||
$dmy='to';
|
||||
if (validate_int($ui->post['daystart'],1,31)) {
|
||||
@ -252,7 +252,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$day=date('d',strtotime("-6 days"));
|
||||
$month=date('m',strtotime("-6 days"));
|
||||
$year=date('Y',strtotime("-6 days"));
|
||||
$amount=7;
|
||||
$amount = 7;
|
||||
}
|
||||
} else if ($ui->post['dmy'] == 'mo') {
|
||||
$dmy='mo';
|
||||
@ -296,7 +296,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$day = 1;
|
||||
$month=date('m',strtotime("-6 months"));
|
||||
$year=date('Y',strtotime("-6 months"));
|
||||
$amount=7;
|
||||
$amount = 7;
|
||||
}
|
||||
} else if ($ui->post['dmy'] == 'ye') {
|
||||
$dmy='ye';
|
||||
|
@ -189,7 +189,7 @@ if (!isset($remoteip) or $_SERVER['SERVER_ADDR'] == $remoteip) {
|
||||
$resellerid = $uids[1];
|
||||
}
|
||||
if (isset($serverid)) {
|
||||
if($direction=="in") {
|
||||
if ($direction=="in") {
|
||||
$ip = $ip_dst;
|
||||
$ipcase="ip_dst";
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user