$spamFilter = $row['spamFilter']; $languageFilter = $row['languageFilter']; $blockLinks = $row['blockLinks']; $blockWords = $row['blockWords']; $mailRequired = $row['mailRequired']; $commentMinLength = $row['commentMinLength']; $commentsModerated = $row['commentsModerated']; $honeyPotKey = $row['honeyPotKey']; if (!isurl($pageurl) and !isdomain($pageurl)) { $pageurl = $page_url; } } $query = $sql->prepare("SELECT `active` FROM `modules` WHERE `type`='C' AND `get`='pn' AND `sub`='pn' LIMIT 1"); $query->execute(); $page_active = $query->fetchColumn(); $page_active = active_check($page_active) ? $page_active : 'Y'; $ewInstallPath = EASYWIDIR; $elements = (!empty($ewInstallPath) and strpos($ui->escaped('REQUEST_URI', 'server'), $ewInstallPath) === false) ? preg_split('/\\//', $ui->escaped('REQUEST_URI', 'server'), -1, PREG_SPLIT_NO_EMPTY) : preg_split('/\\//', substr($ui->escaped('REQUEST_URI', 'server'), strlen($ewInstallPath)), -1, PREG_SPLIT_NO_EMPTY); if (isset($seo) and $seo == 'Y' and isset($elements[0])) { $page_detect_language = $elements[0]; if (!preg_match('/^[a-z]{2}+$/', $elements[0]) and !$ui->w('site', 50, 'get') and $elements[0] != 'index.php') { $throw404 = true; } } if (isset($elements[1]) and $elements[1] != '') { $page_category = strtolower($elements[1]); } if (isset($elements[2]) and $elements[2] != '') { $page_name = strtolower($elements[2]); } if (isset($elements[3]) and $elements[3] != '') {
$flexSlotsFree = $data['flexSlotsFree']; } 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'])) { $tsdns = $data['tsdns']; } 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'])) { $updateArray[] = $data['autoRestart']; $eventualUpdate .= ',`autoRestart`=?'; $flexSlots = $data['autoRestart']; } if (isExternalID($data['server_external_id']) and $data['identify_server_by'] == 'server_local_id') { $updateArray[] = $data['server_external_id']; $eventualUpdate .= ',`externalID`=?'; } if (count($updateArray) > 0) { $eventualUpdate = trim($eventualUpdate, ','); $eventualUpdate .= ','; } $updateArray[] = $localID; $updateArray[] = $resellerID; $query = $sql->prepare("UPDATE `voice_server` SET {$eventualUpdate} `jobPending`='Y' WHERE `id`=? AND `resellerid`=? LIMIT 1");
updateJobs($localID, $resellerID); } } else { $success['false'][] = 'No user can be found to edit'; } } else { $success['false'][] = 'No data for this method'; } } else { if (array_value_exists('action', 'del', $data)) { $from = array('localid' => 'id', 'username' => 'cname', 'external_id' => 'externalID', 'email' => 'mail'); $email = $data['email']; $identifyBy = $data['identify_by']; $username = isset($data['username']) ? $data['username'] : ''; $externalID = (isset($data['external_id']) and isExternalID($data['external_id']) != '') ? $data['external_id'] : ''; $active = isset($data['active']) ? active_check($data['active']) : ''; $localID = isset($data['localid']) ? $data['localid'] : ''; if (dataExist('identify_by', $data)) { $query = $sql->prepare("SELECT `id`,`cname` FROM `userdata` WHERE `" . $from[$data['identify_by']] . "`=? AND `resellerid`=?"); $query->execute(array($data[$data['identify_by']], $resellerID)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $localID = $row['id']; $name = $row['cname']; } if (isset($localID) and isset($name)) { $query = $sql->prepare("UPDATE `userdata` SET `jobPending`='Y' WHERE `id`=? and `resellerid`=?"); $query->execute(array($localID, $resellerID)); $query = $sql->prepare("UPDATE `jobs` SET `status`='2' WHERE (`status` IS NULL OR `status`='1') AND `userID`=? and `resellerID`=?"); $query->execute(array($localID, $resellerID)); $query = $sql->prepare("INSERT INTO `jobs` (`api`,`type`,`invoicedByID`,`affectedID`,`userID`,`name`,`status`,`date`,`action`,`resellerid`) VALUES ('A','us',?,?,?,?,NULL,NOW(),'dl',?)"); $query->execute(array($resellerID, $localID, $localID, $name, $resellerID));
$hdd = $row['hdd']; $domainRowCount = 0; $query2 = $sql->prepare("SELECT COUNT(`jobID`) AS `amount` FROM `jobs` WHERE `affectedID`=? AND `type`='wv' AND `action`='dl' AND (`status` IS NULL OR `status`='1') LIMIT 1"); $query2->execute(array($localServerID)); if ($query2->fetchColumn() > 0) { $success['false'][] = 'Server is marked for deletion'; } else { if (isdomain($dns)) { $query = $sql->prepare("UPDATE `webVhost` SET `defaultDomain`=? WHERE `webVhostID`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($dns, $localServerID, $resellerID)); $domainRowCount = $query->rowCount(); } } $updateArray = array(); $eventualUpdate = ''; if (isset($data['active']) and active_check($data['active'])) { $updateArray[] = $data['active']; $eventualUpdate .= ',`active`=?'; $active = $data['active']; } if (isset($data['password']) and is_password($data['password'], 255)) { $updateArray[] = $data['private']; $updateArray[] = $aeskey; $eventualUpdate .= ',`ftpPassword`=AES_ENCRYPT(?,?)'; $private = $data['password']; } if (isset($data['hdd']) and isid($data['hdd'], 10)) { $updateArray[] = $data['hdd']; $eventualUpdate .= ',`hdd`=?'; $hdd = $data['hdd']; $query = $sql->prepare("SELECT IF(`hddOverbook`='Y',(`maxHDD`/100) * (100+`overbookPercent`),`maxHDD`) AS `maxHDD` FROM `webMaster` WHERE `webMasterID`=? LIMIT 1");
} else { if (!isset($success['false'])) { $active = active_check($data['active']); $identifyUserBy = $data['identify_user_by']; $localUserID = isid($data['user_localid'], 10); $externalUserID = isExternalID($data['user_externalid']); $username = $data['username']; $identifyServerBy = $data['identify_server_by']; $localServerID = isid($data['server_local_id'], 10); $externalServerID = isExternalID($data['server_external_id']); $success['false'][] = 'Can not identify user or bad email'; } } } else { if (!isset($success['false']) and array_value_exists('action', 'mod', $data)) { $active = active_check($data['active']); $identifyUserBy = $data['identify_user_by']; $localUserID = isid($data['user_localid'], 10); $externalUserID = isExternalID($data['user_externalid']); $username = $data['username']; $identifyServerBy = $data['identify_server_by']; $localServerID = isid($data['server_local_id'], 10); $externalServerID = isExternalID($data['server_external_id']); $from = array('server_local_id' => 'id', 'server_external_id' => 'externalID'); if (dataExist('identify_server_by', $data)) { $query = $sql->prepare("SELECT m.`id`,m.`uid`,m.`active`,m.`sid`,m.`dbname`,u.`cname` FROM `mysql_external_dbs` AS m INNER JOIN `userdata` AS u ON u.`id`=m.`uid` WHERE m.`" . $from[$data['identify_server_by']] . "`=? AND m.`resellerid`=?"); $query->execute(array($data[$data['identify_server_by']], $resellerID)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $localID = $row['id']; $userID = $row['uid']; $hostID = $row['sid'];
if ($easywiModules['ip'] === true) { $what_to_be_included_array['imprint'] = 'imprint.php'; } if ($easywiModules['le'] === true) { $what_to_be_included_array['lendserver'] = 'lend.php'; } $query = $sql->prepare("SELECT `activeGS`,`activeVS` FROM `lendsettings` WHERE `resellerid`=0 LIMIT 1"); $query->execute(); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $page_data->SetData('lendactiveGS', $row['activeGS']); $page_data->SetData('lendactiveVS', $row['activeVS']); } $query = $sql->prepare("SELECT `active` FROM `modules` WHERE `id`=5 LIMIT 1"); $query->execute(); $lendActive = $query->fetchColumn(); $lendActive = active_check($lendActive) ? $lendActive : 'Y'; $page_data->SetData('lendactive', $lendActive); $page_data->SetData('protectioncheck', $protectioncheck); $page_data->SetData('title', $title); $query = $sql->prepare("SELECT p.`id`,p.`subpage`,p.`naviDisplay`,t.`title` FROM `page_pages` p LEFT JOIN `page_pages_text` t ON p.`id`=t.`pageid` WHERE p.`released`='1' AND p.`type`='page' AND t.`language`=? AND p.`resellerid`='0' ORDER BY `subpage`,`sort`"); $query->execute(array($user_language)); if ($seo == 'Y') { $page_data->SetMenu($gsprache->news, $gsprache->news, 'news'); if ($protectioncheck == 'Y') { $page_data->SetMenu($page_sprache->protectioncheck, $page_sprache->protectioncheck, 'protectioncheck'); } if ($page_data->lendactive == 'Y') { if ($page_data->showLend(isset($admin_id) ? true : false, isset($user_id) ? true : false, 'g')) { $page_data->SetMenu($gsprache->gameserver, array($gsprache->lendserver, $gsprache->gameserver), 'lendservergs'); } if ($page_data->showLend(isset($admin_id) ? true : false, isset($user_id) ? true : false, 'v')) {
$sprache = getlanguagefile('lendserver', $user_language, $reseller_id); $gssprache = getlanguagefile('gserver', $user_language, $reseller_id); $vosprache = getlanguagefile('voice', $user_language, $reseller_id); $licenceDetails = serverAmount($reseller_id); if (is_numeric($licenceDetails['left']) and (0 > $licenceDetails['left'] or 0 > $licenceDetails['lG'] or 0 > $licenceDetails['lVo'] or $licenceDetails['t'] == 'l')) { header('HTTP/1.1 403 Forbidden'); die('403 Forbidden: ' . $gsprache->licence); } $timeselect = array(); $slotselect = array(); $votimeselect = array(); $voslotselect = array(); $query = $sql->prepare("SELECT `active` FROM `modules` WHERE `id`=5 LIMIT 1"); $query->execute(); $active = $query->fetchColumn(); $active = active_check($active) ? $active : 'Y'; $query = $sql->prepare("SELECT *,NOW() AS `mysqlCurrentTime`,AES_DECRYPT(`ftpuploadpath`,?) AS `decyptedftpuploadpath` FROM `lendsettings` WHERE `resellerid`=? LIMIT 1"); $query->execute(array($aeskey, $reseller_id)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $activeGS = ($row['activeGS'] == 'B' or $row['activeGS'] != 'N' and (isset($admin_id) or $row['activeGS'] != 'N' and $ui->username('shorten', 50, 'get') == 'api') or $row['activeGS'] == 'R' and isset($user_id) or $row['activeGS'] == 'A' and !isset($user_id)) ? 'Y' : 'N'; $activeVS = ($row['activeVS'] == 'B' or $row['activeVS'] != 'N' and (isset($admin_id) or $row['activeVS'] != 'N' and $ui->username('shorten', 50, 'get') == 'api') or $row['activeVS'] == 'R' and isset($user_id) or $row['activeVS'] == 'A' and !isset($user_id)) ? 'Y' : 'N'; $ftpupload = ($row['ftpupload'] == 'Y' or $row['ftpupload'] != 'N' and (isset($admin_id) or $row['ftpupload'] != 'N' and $ui->username('shorten', 50, 'get') == 'api') or $row['ftpupload'] == 'R' and isset($user_id) or $row['ftpupload'] == 'A' and !isset($user_id)) ? 'Y' : 'N'; $ftpuploadpath = $row['decyptedftpuploadpath']; if ($ui->username('shorten', 50, 'get') == 'api' or in_array($row['activeGS'], array('B', 'R')) and (isset($user_id) or isset($admin_id))) { $mintime = (int) $row['mintimeRegistered']; $time = (int) $row['mintimeRegistered']; $maxtime = (int) $row['maxtimeRegistered']; $timesteps = (int) $row['timestepsRegistered']; $minplayer = (int) $row['minplayerRegistered']; $maxplayer = (int) $row['maxplayerRegistered']; $player = (int) $row['maxplayerRegistered'];
} if (!isinteger($ui->post['minram'])) { $fail = 1; $template_file .= "MinRam"; } else { $minram = $ui->post['minram']; } if (!isinteger($ui->post['maxram'])) { $fail = 1; $template_file .= "MaxRam"; } if (!ismac($ui->post['mac'])) { $fail = 1; $template_file .= "MAC"; } if (!active_check($ui->post['active'])) { $fail = 1; $template_file .= "Active"; } if ($reseller_id == 0) { $query = $sql->prepare("SELECT * FROM `virtualcontainer` WHERE `id`=? LIMIT 1"); $query->execute(array($id)); } else { $query = $sql->prepare("SELECT * FROM `virtualcontainer` WHERE `id`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($id, $reseller_id)); } while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $oldactive = $row['active']; $hostid = $row['hostid']; $oldip = $row['ip']; $oldmac = $row['mac'];
if (isset($data['minram']) and isid($data['minram'], 10) and $data['minram'] != $row['minram']) { $updateArray[] = $data['minram']; $eventualUpdate .= ',`minram`=?'; $minram = $data['minram']; } if (isset($data['maxram']) and isid($data['maxram'], 10) and $data['maxram'] != $row['maxram']) { $updateArray[] = $data['maxram']; $eventualUpdate .= ',`maxram`=?'; $maxram = $data['maxram']; } if (isset($calculatedCores) or isset($data['cores']) and cores($data['cores']) and $data['cores'] != $row['cores']) { $updateArray[] = isset($calculatedCores) ? $calculatedCores : $data['cores']; $eventualUpdate .= ',`cores`=?'; $cores = isset($calculatedCores) ? $calculatedCores : $data['cores']; } if (isset($data['active']) and active_check($data['active']) and $data['active'] != $row['active']) { $updateArray[] = $data['active']; $eventualUpdate .= ',`active`=?'; $active = $data['active']; } if (isset($data['port']) and port($data['port']) and $data['port'] != $row['port'] and !in_array($data['port'], $usedPorts)) { $port = $data['port']; } if (isset($data['port2']) and port($data['port2']) and $data['port2'] != $row['port2'] and !in_array($data['port'], $usedPorts)) { $updateArray[] = $data['port2']; $eventualUpdate .= ',`port2`=?'; $port2 = $data['port2']; } if (isset($data['port3']) and port($data['port3']) and $data['port3'] != $row['port3'] and !in_array($data['port'], $usedPorts)) { $updateArray[] = $data['port3']; $eventualUpdate .= ',`port3`=?';
$fail = 1; $template_file .= "User <br />"; } if (!wpreg_check($ui->post['publickey'], 1)) { $fail = 1; $template_file .= "Key <br />"; } if (!active_check($ui->post['active'])) { $fail = 1; $template_file .= "Active <br />"; } if (!active_check($ui->post['esxi'])) { $fail = 1; $template_file .= "ESXi <br />"; } if (!active_check($ui->post['thin'])) { $fail = 1; } if ($fail != 1) { $publickey = $ui->post['publickey']; $keyname = $ui->startparameter('keyname', 'post'); $active = $ui->post['active']; $esxi = $ui->post['esxi']; $ip = $ui->post['ip']; $thin = $ui->post['thin']; $thinquota = isid($ui->post['thinquota'], "2"); $port = $ui->post['port']; $reseller = $ui->post['reseller']; $user = $ui->post['user']; $pass = $ui->startparameter('pass', 'post'); $os = "linux";