die('Do not access directly!'); } $data = array(); if ($ui->st('w', 'get') == 'us') { $query = $sql->prepare("SELECT u.`id`,u.`cname`,u.`vname`,u.`name` FROM `userdata` u INNER JOIN `voice_server` v ON u.`id`=v.`userid` AND v.`active`='Y' WHERE u.`resellerid`=? GROUP BY u.`id`"); $query->execute(array($resellerLockupID)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $selected = $ui->id('selectedID', 10, 'get') == $row['id'] ? ' selected="selected"' : ''; $data[] = '<option value=' . $row['id'] . $selected . '>' . trim($row['cname'] . ' ' . $row['vname'] . ' ' . $row['name']) . '</option>'; } } else { if ($ui->st('w', 'get') == 'se') { $query = $sql->prepare("SELECT v.`id`,v.`ip`,v.`port`,v.`dns`,m.`usedns` FROM `voice_server` v INNER JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`resellerid`=? ORDER BY v.`ip`,v.`port`"); $query->execute(array($resellerLockupID)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $selected = $ui->id('selectedID', 10, 'get') == $row['id'] ? ' selected="selected"' : ''; $data[] = '<option value=' . $row['id'] . $selected . '>' . $row['ip'] . ':' . $row['port'] . '</option>'; } } else { if ($ui->st('w', 'get') == 'ma') { $query = $sql->prepare("SELECT `id`,`ssh2ip` FROM `voice_masterserver` WHERE `resellerid`=? AND `active`='Y' ORDER BY `ssh2ip`"); $query->execute(array($resellerLockupID)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $selected = $ui->id('selectedID', 10, 'get') == $row['id'] ? ' selected="selected"' : ''; $data[] = '<option value=' . $row['id'] . $selected . '>' . $row['ssh2ip'] . '</option>'; } } } } require_once IncludeTemplate($template_to_use, 'ajax_admin_voice_stats.tpl', 'ajax');
} else { if (isset($admin_id) and $ui->smallletters('d', 16, 'get') == 'mysqlmasterusage' and $pa['mysql']) { if ($ui->id('id', 10, 'get')) { require_once EASYWIDIR . '/stuff/ajax/mysql_master_usage.php'; } die; } else { if (isset($admin_id) and $pa['dedicatedServer'] and $ui->smallletters('d', 7, 'get') == 'freeips' and $reseller_id == 0) { if ($ui->id('userID', 10, 'get')) { $query = $sql->prepare("SELECT `resellerid` FROM `userdata` WHERE `id`=? LIMIT 1"); $query->execute(array($ui->id('userID', 10, 'get'))); $ipsAvailable = freeips($query->fetchColumn()); } else { $ipsAvailable = array(); } require_once IncludeTemplate($template_to_use, 'ajax_admin_roots_ips.tpl', 'ajax'); die; } else { if (isset($admin_id) and $pa['fastdl'] and $ui->smallletters('d', 9, 'get') == 'webmaster' and $ui->id('id', 10, 'get')) { require_once EASYWIDIR . '/stuff/ajax/web_master_usage.php'; die; } else { if (isset($user_id) and $pa['usertickets'] and $ui->w('d', 20, 'get') == 'userTicketCategories' and $ui->id('topicName', 10, 'get')) { require_once EASYWIDIR . '/stuff/ajax/userpanel_ticket_category.php'; die; } else { if (isset($user_id) and $pa['usertickets'] and $ui->w('d', 24, 'get') == 'resellerTicketCategories' and $ui->id('topicName', 10, 'get')) { require_once EASYWIDIR . '/stuff/ajax/reseller_ticket_category.php'; die; } else { if (isset($admin_id) and $pa['voiceserverStats'] and $ui->w('d', 15, 'get') == 'adminVoiceStats' and $ui->st('w', 'get')) {
$dns = array(); $phpConfigurationMaster = array(); $phpConfigurationVhost = new stdClass(); $query = $sql->prepare("SELECT m.`vhostTemplate`,m.`maxVhost`,m.`maxHDD`,m.`quotaActive`,m.`defaultdns`,m.`usageType`,m.`phpConfiguration`,(SELECT COUNT(v.`webVhostID`) AS `a` FROM `webVhost` AS v WHERE v.`webMasterID`=m.`webMasterID`) AS `totalVhosts`,(SELECT SUM(v.`hdd`) AS `a` FROM `webVhost` AS v WHERE v.`webMasterID`=m.`webMasterID`) AS `totalHDD` FROM `webMaster` AS m WHERE m.`webMasterID`=? AND m.`resellerID`=? LIMIT 1"); $query->execute(array($ui->id('id', 10, 'get'), $resellerLockupID)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $vhostTemplate = $row['vhostTemplate']; $maxVhost = (int) $row['maxVhost']; $maxHDD = (int) $row['maxHDD']; $totalVhosts = (int) $row['totalVhosts']; $leftHDD = (int) $row['maxHDD'] - $row['totalHDD']; $quotaActive = $row['quotaActive']; $usageType = $row['usageType']; $phpConfigurationMaster = @parse_ini_string($row['phpConfiguration'], true, INI_SCANNER_RAW); } // Edit mode will provide the webhost ID if ($ui->id('serverID', 10, 'get')) { $query = $sql->prepare("SELECT `hdd`,`phpConfiguration` FROM `webVhost` WHERE `webVhostID`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($ui->id('serverID', 10, 'get'), $resellerLockupID)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $maxHDD = $row['hdd']; $phpConfigurationVhost = @json_decode($row['phpConfiguration']); } $query = $sql->prepare("SELECT `domain`,`path`,`ownVhost`,`vhostTemplate` FROM `webVhostDomain` WHERE `webVhostID`=? AND `resellerID`=? ORDER BY `domain`"); $query->execute(array($ui->id('serverID', 10, 'get'), $resellerLockupID)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $dns[] = array('domain' => $row['domain'], 'path' => $row['path'], 'ownVhost' => $row['ownVhost'], 'vhostTemplate' => $row['vhostTemplate']); } } require_once IncludeTemplate($template_to_use, 'ajax_admin_web_master.tpl', 'ajax');
include EASYWIDIR . '/stuff/user/init_user.php'; include EASYWIDIR . '/stuff/user/userpanel_home.php'; if ($ui->smallletters('w', 255, 'get') and isset($what_to_be_included_array[$ui->smallletters('w', 255, 'get')]) and is_file(EASYWIDIR . '/stuff/user/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')])) { include EASYWIDIR . '/stuff/user/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')]; } else { if ($ui->smallletters('w', 255, 'get') and isset($what_to_be_included_array[$ui->smallletters('w', 255, 'get')]) and is_file(EASYWIDIR . '/stuff/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')])) { include EASYWIDIR . '/stuff/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')]; } else { if ($ui->smallletters('w', 255, 'get') and isset($customFiles[$ui->smallletters('w', 255, 'get')]) and is_file(EASYWIDIR . '/stuff/custom_modules/' . $customFiles[$ui->smallletters('w', 255, 'get')])) { $customModule = true; include EASYWIDIR . '/stuff/custom_modules/' . $customFiles[$ui->smallletters('w', 255, 'get')]; } else { $template_file = 'userpanel_home.tpl'; } } } unset($dbConnect); if (!isset($template_to_use) or !isset($template_to_use)) { $template_to_use = 'default'; } if (!isset($template_file) or is_array($template_file)) { $template_file = ''; } else { if (is_object($template_file)) { $template_file = (string) $template_file; } } include IncludeTemplate($template_to_use, 'userpanel_header.tpl', 'user'); include IncludeTemplate($template_to_use, preg_match('/^(.*)\\.tpl$/', $template_file) ? $template_file : 'general.tpl', isset($customModule) ? 'custom_modules' : 'user'); include IncludeTemplate($template_to_use, 'userpanel_footer.tpl', 'user'); $sql = null;
* Easy-WI wird in der Hoffnung, dass es nuetzlich sein wird, aber * OHNE JEDE GEWAEHELEISTUNG, bereitgestellt; sogar ohne die implizite * Gewaehrleistung der MARKTFAEHIGKEIT oder EIGNUNG FUER EINEN BESTIMMTEN ZWECK. * Siehe die GNU General Public License fuer weitere Details. * * Sie sollten eine Kopie der GNU General Public License zusammen mit diesem * Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>. */ if (!defined('AJAXINCLUDED')) { die('Do not access directly!'); } $sprache = getlanguagefile('voice', $user_language, $reseller_id); if ($ui->id('id', 10, 'get')) { $dns = ''; $installedServer = 0; $maxServer = 0; $query = $sql->prepare("SELECT COUNT(d.`dnsID`) AS `installed_server`,m.`max_dns`,m.`defaultdns` FROM `voice_tsdns` AS m LEFT JOIN `voice_dns` AS d ON d.`tsdnsID`=m.`id` WHERE m.`id`=? AND m.`resellerid`=? AND m.`active`='Y' GROUP BY m.`id` LIMIT 1"); $query->execute(array($ui->id('id', 10, 'get'), $resellerLockupID)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $dns = $row['defaultdns']; $installedServer = (int) $row['installed_server']; $maxServer = (int) $row['max_dns']; } if ($ui->id('serverID', 10, 'get') and isset($masterServerData)) { $query = $sql->prepare("SELECT `dns` FROM `voice_dns` WHERE `dnsID`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($ui->id('serverID', 10, 'get'), $resellerLockupID)); $dns = $query->fetchColumn(); } } require_once IncludeTemplate($template_to_use, 'ajax_admin_tsdns_server_usage.tpl', 'ajax');
$query = $sql->prepare("SELECT `language` FROM `settings` WHERE `resellerid`=? LIMIT 1"); $query->execute(array($resellerid)); $default_language = $query->fetchColumn(); $query = $sql->prepare("SELECT * FROM `ticket_topics` WHERE `maintopic`=? AND `maintopic`!=`id` AND `resellerid`=? ORDER BY `id`"); $query->execute(array($ui->port('po', 'get'), $resellerid)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $topic = ''; $pselect3 = $sql->prepare("SELECT `text` FROM `translations` WHERE `type`='ti' AND `lang`=? AND `transID`=? AND `resellerID`=? LIMIT 1"); $pselect3->execute(array($user_language, $row['id'], $resellerid)); $topic = $pselect3->fetchColumn(); if (empty($topic)) { $pselect3->execute(array($default_language, $row['id'], $resellerid)); $topic = $pselect3->fetchColumn(); } if (empty($topic)) { $topic = $row['topic']; } $table[] = array('id' => $row['id'], 'topic' => $topic); } $ticketTemplate = $ui->id('r', 1, 'get') != 1 ? 'ajax_userpanel_ticket_category.tpl' : 'ajax_admin_reseller_ticket_category.tpl'; require_once IncludeTemplate($template_to_use, $ticketTemplate, 'ajax'); } } } } } } } } } }
function returnButton($templateToUse, $template, $what, $do, $id, $description = '') { ob_start(); include IncludeTemplate($templateToUse, $template, 'ajax'); return ob_get_clean(); }
if (isset($customFiles[$s])) { include EASYWIDIR . '/stuff/custom_modules/' . $customFiles[$s]; } else { if (isset($s) and !isset($what_to_be_included_array[$s])) { $template_file = 'page_404.tpl'; } else { $template_file = 'page_home.tpl'; } } } } } } unset($dbConnect); if (!isset($template_to_use) or !isset($template_to_use)) { $template_to_use = 'default'; } if (!isset($template_file) or is_array($template_file)) { $template_file = ''; } else { if (is_object($template_file)) { $template_file = (string) $template_file; } } include IncludeTemplate($template_to_use, 'page_header.tpl', 'cms'); include IncludeTemplate($template_to_use, preg_match('/^(.*)\\.tpl$/', $template_file) ? $template_file : 'page_general.tpl', isset($customModule) ? 'custom_modules' : 'cms'); include IncludeTemplate($template_to_use, 'page_footer.tpl', 'cms'); } else { redirect($page_data->pageurl . '/login.php'); } $sql = null;
$table = array(); $ids = (array) $ui->id('id', 10, 'get'); $query = $sql->prepare("SELECT `id`,`shorten`,`description`,`steamgame`,`fps`,`map`,`mapGroup`,`cmd`,`tic`,`gamebinary` FROM `servertypes` WHERE `id`=? AND `resellerid`=? LIMIT 1"); $query2 = $sql->prepare("SELECT `fps`,`map`,`mapGroup`,`cmd`,`owncmd`,`tic`,`userfps`,`usertick`,`usermap`,`user_uploaddir`,`upload`,AES_DECRYPT(`uploaddir`,?) AS `upload_dir` FROM `serverlist` WHERE `switchID`=? AND `servertype`=? AND `resellerid`=? LIMIT 1"); foreach ($ids as $id) { $query->execute(array($id, $resellerLockupID)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { if ($ui->id('gameServerID', 10, 'get')) { unset($fps, $map, $mapGroup, $cmd, $ownCmd, $tic, $userFps, $userTick, $userMap, $userUploaddir, $upload, $uploadDir); $query2->execute(array($aeskey, $ui->id('gameServerID', 10, 'get'), $id, $resellerLockupID)); while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) { $fps = $row2['fps']; $map = $row2['map']; $mapGroup = $row2['mapGroup']; $cmd = stripslashes($row2['cmd']); $ownCmd = $row2['owncmd']; $tic = $row2['tic']; $userFps = $row2['userfps']; $userTick = $row2['usertick']; $userMap = $row2['usermap']; $upload = $row2['upload']; $userUploadDir = $row2['user_uploaddir']; $uploadDir = $row2['upload_dir']; } } $uploadType = $row['gamebinary'] == 'srcds_run' ? 1 : 0; $table[] = array('id' => $row['id'], 'shorten' => $row['shorten'], 'description' => $row['description'], 'steamgame' => $row['steamgame'], 'fps' => isset($fps) ? $fps : $row['fps'], 'userFps' => isset($userFps) ? $userFps : 'N', 'map' => isset($map) ? $map : $row['map'], 'mapGroup' => isset($mapGroup) ? $mapGroup : $row['mapGroup'], 'userMap' => isset($userMap) ? $userMap : 'Y', 'cmd' => isset($cmd) ? $cmd : stripslashes($row['cmd']), 'ownCmd' => isset($ownCmd) ? $ownCmd : 'N', 'tic' => isset($tic) ? $tic : $row['tic'], 'userTick' => isset($userTick) ? $userTick : 'N', 'uploadAllowed' => $uploadType, 'upload' => isset($upload) ? $upload : $uploadType, 'uploadDir' => isset($uploadDir) ? $uploadDir : '', 'userUploadDir' => isset($userUploadDir) ? $userUploadDir : 'N'); } } require_once IncludeTemplate($template_to_use, 'ajax_admin_app_details.tpl', 'ajax');
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Easy-WI. If not, see <http://www.gnu.org/licenses/>. * * Diese Datei ist Teil von Easy-WI. * * Easy-WI ist Freie Software: Sie koennen es unter den Bedingungen * der GNU General Public License, wie von der Free Software Foundation, * Version 3 der Lizenz oder (nach Ihrer Wahl) jeder spaeteren * veroeffentlichten Version, weiterverbreiten und/oder modifizieren. * * Easy-WI wird in der Hoffnung, dass es nuetzlich sein wird, aber * OHNE JEDE GEWAEHELEISTUNG, bereitgestellt; sogar ohne die implizite * Gewaehrleistung der MARKTFAEHIGKEIT oder EIGNUNG FUER EINEN BESTIMMTEN ZWECK. * Siehe die GNU General Public License fuer weitere Details. * * Sie sollten eine Kopie der GNU General Public License zusammen mit diesem * Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>. */ if (!defined('AJAXINCLUDED')) { die('Do not access directly!'); } $sprache = getlanguagefile('gserver', $user_language, $reseller_id); $query = $sql->prepare("SELECT `mapGroup` FROM `servertypes` WHERE `shorten`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($ui->username('mapgroup', 50, 'get'), $reseller_id)); $mapGroup = $query->fetchColumn(); if ($mapGroup != null) { require_once IncludeTemplate($template_to_use, 'ajax_userpanel_mapgroup.tpl', 'ajax'); }
} } if (isset($rootID)) { $query = $sql->prepare("SELECT `ip`,`ftpport` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($rootID, $resellerLockupID)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $ftpport = $row['ftpport']; $ip = $row['ip']; $ftpConnect = new EasyWiFTP($ip, $ftpport, $username, $ftppass); $downloadChrooted = $ftpConnect->removeSlashes($pserver . $serverip . '_' . $port . '/' . $shorten . '/' . $binarydir . '/screenlog.0'); if ($ftpConnect->ftpConnection) { if (!$ftpConnect->downloadToTemp($downloadChrooted, 32768)) { $error = 'Cannot download screenlog from ' . $downloadChrooted; } } else { $error = 'Cannot connect to FTP Server ' . $ip . ':' . $ftpport; } } if (isset($ip)) { $log = isset($error) ? $error : nl2br($ftpConnect->getTempFileContent()); $ftpConnect->tempHandle = null; $ftpConnect = null; } else { $log = 'Error: wrong rootID'; } } else { $log = 'Error: No rootID'; } } include IncludeTemplate($template_to_use, 'gameserverlog.tpl'); $sql = null;
include EASYWIDIR . '/stuff/admin/init_admin.php'; include EASYWIDIR . '/stuff/admin/adminhome.php'; if ($ui->smallletters('w', 255, 'get') and isset($what_to_be_included_array[$ui->smallletters('w', 255, 'get')]) and is_file(EASYWIDIR . '/stuff/admin/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')])) { include EASYWIDIR . '/stuff/admin/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')]; } else { if ($ui->smallletters('w', 255, 'get') and isset($what_to_be_included_array[$ui->smallletters('w', 255, 'get')]) and is_file(EASYWIDIR . '/stuff/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')])) { include EASYWIDIR . '/stuff/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')]; } else { if ($ui->smallletters('w', 255, 'get') and isset($customFiles[$ui->smallletters('w', 255, 'get')]) and is_file(EASYWIDIR . '/stuff/custom_modules/' . $customFiles[$ui->smallletters('w', 255, 'get')])) { $customModule = true; include EASYWIDIR . '/stuff/custom_modules/' . $customFiles[$ui->smallletters('w', 255, 'get')]; } else { $template_file = 'admin_home.tpl'; } } } unset($dbConnect); if (!isset($template_to_use) or !isset($template_to_use)) { $template_to_use = 'default'; } if (!isset($template_file) or is_array($template_file)) { $template_file = ''; } else { if (is_object($template_file)) { $template_file = (string) $template_file; } } include IncludeTemplate($template_to_use, 'admin_header.tpl'); include IncludeTemplate($template_to_use, preg_match('/^(.*)\\.tpl$/', $template_file) ? $template_file : 'general.tpl', isset($customModule) ? 'custom_modules' : 'admin'); include IncludeTemplate($template_to_use, 'admin_footer.tpl'); $sql = null;
* * Easy-WI wird in der Hoffnung, dass es nuetzlich sein wird, aber * OHNE JEDE GEWAEHELEISTUNG, bereitgestellt; sogar ohne die implizite * Gewaehrleistung der MARKTFAEHIGKEIT oder EIGNUNG FUER EINEN BESTIMMTEN ZWECK. * Siehe die GNU General Public License fuer weitere Details. * * Sie sollten eine Kopie der GNU General Public License zusammen mit diesem * Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>. */ if (!defined('AJAXINCLUDED')) { die('Do not access directly!'); } $table = array(); $lookupId = $admin_id == $reseller_id ? 0 : $resellerLockupID; $query = $sql->prepare("SELECT * FROM `ticket_topics` WHERE `maintopic`=? AND `maintopic`!=`id` AND `resellerid`=? ORDER BY `id`"); $query2 = $sql->prepare("SELECT `text` FROM `translations` WHERE `type`='ti' AND `lang`=? AND `transID`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($ui->id('topicName', 10, 'get'), $lookupId)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $query2->execute(array($user_language, $row['id'], $lookupId)); $topic = $query2->fetchColumn(); if (empty($topic)) { $query2->execute(array($default_language, $row['id'], $lookupId)); $topic = $query2->fetchColumn(); if (empty($topic)) { $topic = $row['topic']; } } $table[$row['id']] = $topic; } require_once IncludeTemplate($template_to_use, 'ajax_userpanel_ticket_category.tpl', 'ajax');
$port3 = $row['portThree'] > 0 ? $row['portThree'] : ''; $port4 = $row['portFour'] > 0 ? $row['portFour'] : ''; $port5 = $row['portFive'] > 0 ? $row['portFive'] : ''; } if ($portMax > 0) { while (in_array($port, $ports)) { $port += $portStep; } } if ($portMax > 1) { while (in_array($port2, $ports)) { $port2 += $portStep; } } if ($portMax > 2) { while (in_array($port3, $ports)) { $port3 += $portStep; } } if ($portMax > 3) { while (in_array($port4, $ports)) { $port4 += $portStep; } } if ($portMax > 4) { while (in_array($port5, $ports)) { $port5 += $portStep; } } require_once IncludeTemplate($template_to_use, 'ajax_admin_appmaster_ports_best.tpl', 'ajax');