Tickets 61 and 71

https://github.com/easy-wi/developer/issues/61
https://github.com/easy-wi/developer/issues/71

Some Code cleaning
This commit is contained in:
Ulrich Block 2013-09-27 08:22:09 +02:00
parent 5ed966f7a5
commit 3c922ad206
95 changed files with 1254 additions and 738 deletions

View File

@ -1,4 +1,5 @@
<?php
/**
* File: admin.php.
* Author: Ulrich Block
@ -44,8 +45,8 @@ include(EASYWIDIR.'/stuff/functions.php');
include(EASYWIDIR . '/stuff/settings.php');
include(EASYWIDIR . '/stuff/init_admin.php');
include(EASYWIDIR . '/stuff/adminhome.php');
if (isset($what_to_be_included_array[$w]) and is_file((EASYWIDIR.'/stuff/'.$what_to_be_included_array[$w]))) {
include(EASYWIDIR.'/stuff/'.$what_to_be_included_array[$w]);
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')]);
unset($dbConnect);
} else {
unset($dbConnect);

View File

@ -61,10 +61,10 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
return '';
}
printText('Cloud jobs started');
include('stuff/vorlage.php');
include('stuff/functions.php');
include('stuff/class_validator.php');
include('stuff/settings.php');
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR . '/stuff/settings.php');
printText('File include and parameters fetched. Start connecting to external systems.');
$query=$sql->prepare("SELECT * FROM `api_import` WHERE `active`='Y'");
$query2=$sql->prepare("UPDATE `userdata` SET `salutation`=?,`mail`=?,`cname`=?,`name`=?,`vname`=?,`birthday`=?,`country`=?,`phone`=?,`fax`=?,`handy`=?,`city`=?,`cityn`=?,`street`=?,`streetn`=? WHERE `sourceSystemID`=? AND `externalID`=? AND `resellerid`=? LIMIT 1");

View File

@ -39,13 +39,12 @@
define('EASYWIDIR', dirname(__FILE__));
include(EASYWIDIR."/stuff/vorlage.php");
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR."/stuff/config.php");
include(EASYWIDIR."/stuff/functions.php");
include(EASYWIDIR."/stuff/settings.php");
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/config.php');
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/settings.php');
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$ip=$_SERVER['REMOTE_ADDR'];
if ($ui->st('w','get')=='ms' and $ui->username('shorten','50','get')) {
$query=$sql->prepare("SELECT r.`id`,r.`resellerid`,r.`installing`,r.`updating`,d.`resellerid` AS `userid`,s.`steamVersion`,r.`localVersion` FROM `rservermasterg` r INNER JOIN `rserverdata` d ON r.`serverid`=d.`id` INNER JOIN `servertypes` s ON r.`servertypeid`=s.`id` WHERE s.`shorten`=? AND (d.`ip`=? OR d.`altips` LIKE ?) LIMIT 1");

View File

@ -39,10 +39,10 @@
define('EASYWIDIR', dirname(__FILE__));
include(EASYWIDIR."/stuff/functions.php");
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR."/stuff/settings.php");
include(EASYWIDIR . '/stuff/settings.php');
if (isset($admin_id) and $ui->st('img','get')) {
$pa=User_Permissions($admin_id);
if ($ui->st('img','get')=='tr' and ($pa['traffic'] or $pa['root'])) {

View File

@ -39,6 +39,7 @@
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);
define('EASYWIDIR', dirname(dirname(__FILE__)));
?>
<!DOCTYPE html>
<head>
@ -229,35 +230,6 @@ function passwordhash($username,$password){
$hash = hash('sha512', sha1($usernamea[0].md5($passworda[0].$usernamea[1]).$passworda[1]));
return $hash;
}
function getconfigcvars($file) {
$fp= @fopen($file,'r');
if ($fp == true) {
$configfile="";
while (!feof($fp)){
$line=fgets($fp);
if(strpos(strtolower($line), strtolower("<?php")) === false and strpos(strtolower($line), strtolower("?>")) === false) {
$configfile .="$line\r\n";
}
}
fclose($fp);
$lines=explode("\r\n", $configfile);
foreach ($lines as $line) {
if(strpos(strtolower($line), strtolower("//")) === false and strpos(strtolower($line), strtolower("=")) == true) {
$data=explode("=", $line);
$cvar=preg_replace('/\s+/', '', $data[0]);
$cvar=str_replace('$', "", $cvar);
$data2=explode(";", $data[1]);
$stringlenght=strlen($data2[0]);
$stop=$stringlenght-2;
$value=substr($data2[0],"1",$stop);
$vars[$cvar]=$value;
}
}
return $vars;
} else {
die("No configdata!");
}
}
$lang_detect=strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],"0","2"));
if (file_exists("$lang_detect.xml")) {
$sprache=simplexml_load_file("$lang_detect.xml");
@ -354,13 +326,7 @@ $aeskey="'.$_POST['aeskey'].'";
?>';
@fwrite($config, $configdata) or die("Can not write the configdata");
fclose($config);
$panelcfgcvars=getconfigcvars('../stuff/config.php');
if (!isset($panelcfgcvars['databanktype']) or !isset($panelcfgcvars['host']) or !isset($panelcfgcvars['db']) or !isset($panelcfgcvars['user']) or !isset($panelcfgcvars['pwd'])) die ("Can not read the configdata");
$databanktype=$panelcfgcvars['databanktype'];
$host=$panelcfgcvars['host'];
$db=$panelcfgcvars['db'];
$user=$panelcfgcvars['user'];
$pwd=$panelcfgcvars['pwd'];
include(EASYWIDIR . '/stuff/config.php');
try {
$sql=new PDO("$databanktype:host=$host;dbname=$db",$user,$pwd,array(PDO::MYSQL_ATTR_INIT_COMMAND=>"SET NAMES utf8"));
}
@ -526,13 +492,7 @@ $aeskey="'.$_POST['aeskey'].'";
$emessage .="</br>Adminname";
}
if ($fail!="1") {
#include("../stuff/config.php");
$panelcfgcvars=getconfigcvars('../stuff/config.php');
$databanktype=$panelcfgcvars['databanktype'];
$host=$panelcfgcvars['host'];
$db=$panelcfgcvars['db'];
$user=$panelcfgcvars['user'];
$pwd=$panelcfgcvars['pwd'];
include(EASYWIDIR . '/stuff/config.php');
try {
$sql=new PDO("$databanktype:host=$host;dbname=$db", $user, $pwd,array(PDO::MYSQL_ATTR_INIT_COMMAND=>"SET NAMES utf8"));
$sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
@ -571,8 +531,7 @@ $aeskey="'.$_POST['aeskey'].'";
$imageserver="0";
$language=small_letters_check($_POST['language'],'2');
$faillogins=isid($_POST['faillogins'],'2');
$aesfilecvar=getconfigcvars('../stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$insert_usergroups=$sql->prepare("INSERT INTO `usergroups` (`defaultgroup`,`name`,`grouptype`,`root`,`miniroot`) VALUES
('Y','Admin Default','a','Y','N'),
('Y','Reseller Default','r','Y','N'),

View File

@ -42,36 +42,7 @@
if (!isset($updateinclude) or $updateinclude==false) {
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);
define('EASYWIDIR',$_SERVER['DOCUMENT_ROOT'].'/');
function getconfigcvars($file) {
$fp= @fopen($file, 'rb');
if ($fp == true) {
$configfile="";
while (!feof($fp)){
$line=fgets($fp);
if(strpos(strtolower($line), strtolower("<?php")) === false and strpos(strtolower($line), strtolower("?>")) === false) {
$configfile .="$line\r\n";
}
}
fclose($fp);
$lines=explode("\r\n", $configfile);
foreach ($lines as $line) {
if(strpos(strtolower($line), strtolower("//")) === false and strpos(strtolower($line), strtolower("=")) == true) {
$data=explode("=", $line);
$cvar=preg_replace('/\s+/', '', $data[0]);
$cvar=str_replace('$', "", $cvar);
$data2=explode(";", $data[1]);
$stringlenght=strlen($data2[0]);
$stop=$stringlenght-2;
$value=substr($data2[0],"1",$stop);
$vars[$cvar]=$value;
}
}
return $vars;
} else {
die("No configdata!");
}
}
define('EASYWIDIR', dirname(dirname(__FILE__)));
function isinteger($value) {
if(preg_match("/^[\d+(.\d+|$)]+$/", $value) or $value=="0") {
return true;
@ -92,14 +63,7 @@ if (!isset($updateinclude) or $updateinclude==false) {
unset($this->response);
}
}
$panelcfgcvars=getconfigcvars("../stuff/config.php");
$databanktype=$panelcfgcvars['databanktype'];
$host=$panelcfgcvars['host'];
$db=$panelcfgcvars['db'];
$user=$panelcfgcvars['user'];
$pwd=$panelcfgcvars['pwd'];
$captcha=$panelcfgcvars['captcha'];
$title=$panelcfgcvars['title'];
include(EASYWIDIR . '/stuff/config.php');
try {
$sql=new PDO("$databanktype:host=$host;dbname=$db",$user,$pwd,array(PDO::MYSQL_ATTR_INIT_COMMAND=>"SET NAMES utf8"));
}
@ -109,7 +73,7 @@ if (!isset($updateinclude) or $updateinclude==false) {
}
$response=new UpdateResponse();
} else if (!defined('EASYWIDIR')) {
define('EASYWIDIR',$_SERVER['DOCUMENT_ROOT'].'/');
define('EASYWIDIR', dirname(dirname(__FILE__)));
}
function versioncheck ($current,$new,$file,$response,$sql) {
$include=true;
@ -151,6 +115,7 @@ if (isset($error[2]) and $error[2]!="" and $error[2]!=null and !isinteger($error
} else {
$response->add("Current database version: $version<br />");
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
if (versioncheck ($version,'2.00','update_1x-20.php',$response,$sql)) $version='2.00';
if (versioncheck ($version,'2.01','update_200-201.php',$response,$sql)) $version='2.01';
if (versioncheck ($version,'2.02','update_201-202.php',$response,$sql)) $version='2.02';
@ -162,8 +127,7 @@ if (versioncheck ($version,'2.07','update_206-207.php',$response,$sql)) $version
if (versioncheck ($version,'2.08','update_207-208.php',$response,$sql)) $version='2.08';
if (versioncheck ($version,'2.09','update_208-209.php',$response,$sql)) $version='2.09';
if (versioncheck ($version,'2.10','update_209-210.php',$response,$sql)) $version='2.10';
if (!isset($updateinclude) or $updateinclude==false) include('../stuff/tables_add.php');
else include(EASYWIDIR.'/stuff/tables_add.php');
include(EASYWIDIR . '/stuff/tables_add.php');
if (versioncheck ($version,'2.11','update_210-211.php',$response,$sql)) $version='2.11';
if (versioncheck ($version,'3.00','update_211-300.php',$response,$sql)) $version='3.00';
if (versioncheck ($version,'3.01','update_300-301.php',$response,$sql)) $version='3.01';
@ -183,8 +147,8 @@ if (versioncheck ($version,'3.60','update_340-360.php',$response,$sql)) $version
if (versioncheck ($version,'3.70','update_360-370.php',$response,$sql)) $version='3.70';
if (versioncheck ($version,'4.00','update_370-400.php',$response,$sql)) $version='4.00';
$response->add('Repairing tables if needed.');
if (!isset($updateinclude) or $updateinclude==false) include('../stuff/tables_repair.php');
else include(EASYWIDIR.'/stuff/tables_repair.php');
include(EASYWIDIR . '/stuff/tables_repair.php');
# Ende
if (!isset($updateinclude) or $updateinclude==false) {

View File

@ -37,16 +37,6 @@
*/
if (isset($include) and $include==true) {
if (@is_file('../stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars('../stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'/stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'/stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
}
$insert_easywi_version=$sql->prepare("INSERT INTO `easywi_version` (`version`,`de`,`en`) VALUES
('3.03','<div align=\"right\">06.08.2012</div>
<b>Neuerungen und &Auml;nderungen:</b><br/>

View File

@ -37,16 +37,6 @@
*/
if (isset($include) and $include==true) {
if (@is_file('../stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars('../stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file('stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file('keyphrasefile.php')){
$aesfilecvar=getconfigcvars('keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
}
$insert_easywi_version=$sql->prepare("INSERT INTO `easywi_version` (`version`,`de`,`en`) VALUES
('3.07','<div align=\"right\">01.11.2012</div>
<b>&Auml;nderungen:</b><br/>

View File

@ -37,16 +37,6 @@
*/
if (isset($include) and $include==true) {
if (@is_file('../stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars('../stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'/stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'/stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
}
$insert_easywi_version=$sql->prepare("INSERT INTO `easywi_version` (`version`,`de`,`en`) VALUES
('3.08','<div align=\"right\">03.12.2012</div>
<b>Änderungen:</b><br/>

View File

@ -37,16 +37,6 @@
*/
if (isset($include) and $include==true) {
if (@is_file('../stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars('../stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'/stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'/stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
}
$insert_easywi_version=$sql->prepare("INSERT INTO `easywi_version` (`version`,`de`,`en`) VALUES
('3.09','<div align=\"right\">01.01.2013</div>
<b>Änderungen:</b><br/>

View File

@ -37,16 +37,6 @@
*/
if (isset($include) and $include==true) {
if (@is_file('../stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars('../stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'/stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'/stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
}
$insert_easywi_version=$sql->prepare("INSERT INTO `easywi_version` (`version`,`de`,`en`) VALUES
('3.10','<div align=\"right\">03.02.2013</div>
<b>Änderungen:</b><br/>

View File

@ -38,16 +38,6 @@
*/
if (isset($include) and $include==true) {
if (@is_file('../stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars('../stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'/stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'/stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
}
$insert_easywi_version=$sql->prepare("INSERT INTO `easywi_version` (`version`,`de`,`en`) VALUES
('3.20','<div align=\"right\">11.03.2013</div>
<b>Änderungen:</b>

View File

@ -38,16 +38,6 @@
*/
if (isset($include) and $include==true) {
if (@is_file('../stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars('../stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'/stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'/stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
}
$insert_easywi_version=$sql->prepare("INSERT INTO `easywi_version` (`version`,`de`,`en`) VALUES
('3.30','<div align=\"right\">04.04.2013</div>
<b>Änderungen:</b>

View File

@ -37,16 +37,6 @@
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
if (isset($include) and $include==true) {
if (@is_file('../stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars('../stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'/stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'/stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
}
$insert_easywi_version=$sql->prepare("INSERT INTO `easywi_version` (`version`,`de`,`en`) VALUES
('3.40','<div align=\"right\">09.05.2013</div>
<b>Änderungen:</b>

View File

@ -38,16 +38,6 @@
*/
if (isset($include) and $include==true) {
if (@is_file('../stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars('../stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'/stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'/stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
}
$insert_easywi_version=$sql->prepare("INSERT INTO `easywi_version` (`version`,`de`,`en`) VALUES
('3.60','<div align=\"right\">21.07.2013</div>
<b>Änderungen:</b><br/>

View File

@ -38,16 +38,6 @@
*/
if (isset($include) and $include==true) {
if (@is_file('../stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars('../stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'/stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'/stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
}
$insert_easywi_version=$sql->prepare("INSERT INTO `easywi_version` (`version`,`de`,`en`) VALUES
('3.70','<div align=\"right\">18.08.2013</div>
<b>Änderungen:</b><br/>

View File

@ -38,13 +38,6 @@
*/
if (isset($include) and $include==true) {
if (@is_file('../stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars('../stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
} else if (@is_file(EASYWIDIR.'/stuff/keyphrasefile.php')){
$aesfilecvar=getconfigcvars(EASYWIDIR.'/stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
}
$query=$sql->prepare("INSERT INTO `easywi_version` (`version`,`de`,`en`) VALUES
('4.00','<div align=\"right\">31.08.2013</div>
<b>Änderungen:</b><br/>

View File

@ -65,16 +65,15 @@ if (isset($argv)) {
}
if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
define('EASYWIDIR', dirname(__FILE__));
include('stuff/vorlage.php');
include('stuff/functions.php');
include('stuff/class_validator.php');
include('stuff/class_rootserver.php');
include('stuff/settings.php');
include('stuff/ssh_exec.php');
include('stuff/class_voice.php');
include('stuff/mysql_functions.php');
$aesfilecvar=getconfigcvars("stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR . '/stuff/class_rootserver.php');
include(EASYWIDIR . '/stuff/settings.php');
include(EASYWIDIR . '/stuff/ssh_exec.php');
include(EASYWIDIR . '/stuff/class_voice.php');
include(EASYWIDIR . '/stuff/mysql_functions.php');
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$gsprache=getlanguagefile('general','uk',0);
class runGraph {
private $jobsDone=0;
@ -158,43 +157,43 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
$startTime=strtotime('now');
$theOutput=new runGraph($jobCount,$newLine);
# us > vo > gs > my > vs
include('stuff/jobs_user.php');
include(EASYWIDIR . '/stuff/jobs_user.php');
$countp->execute();
$jobCount=$countp->rowCount();
$theOutput->updateCount($jobCount);
print "\r\n".'Total jobs open after user cleanup jobs are done: '.$jobCount."\r\n";
print 'Executing voice jobs'."\r\n";
include('stuff/jobs_voice.php');
include(EASYWIDIR . '/stuff/jobs_voice.php');
$countp->execute();
$jobCount=$countp->rowCount();
$theOutput->updateCount($jobCount);
print "\r\n".'Total jobs open after voice jobs are done: '.$jobCount."\r\n";
print 'Executing TS DNS jobs'."\r\n";
include('stuff/jobs_tsdns.php');
include(EASYWIDIR . '/stuff/jobs_tsdns.php');
$countp->execute();
$jobCount=$countp->rowCount();
$theOutput->updateCount($jobCount);
print "\r\n".'Total jobs open after TS DNS jobs are done: '.$jobCount."\r\n";
print 'Executing mysql jobs'."\r\n";
include('stuff/jobs_mysql.php');
include(EASYWIDIR . '/stuff/jobs_mysql.php');
$countp->execute();
$jobCount=$countp->rowCount();
$theOutput->updateCount($jobCount);
print "\r\n".'Total jobs open after mysql jobs are done: '.$jobCount."\r\n";
print 'Executing gameserver jobs'."\r\n";
include('stuff/jobs_gserver.php');
include(EASYWIDIR . '/stuff/jobs_gserver.php');
$countp->execute();
$jobCount=$countp->rowCount();
$theOutput->updateCount($jobCount);
print "\r\n".'Total jobs open after gameserver jobs are done: '.$jobCount."\r\n";
print 'Executing root server jobs'."\r\n";
include('stuff/jobs_roots.php');
include(EASYWIDIR . '/stuff/jobs_roots.php');
$countp->execute();
$jobCount=$countp->rowCount();
$theOutput->updateCount($jobCount);
print "\r\n".'Total jobs open after root server jobs are done: '.$jobCount."\r\n";
print 'Executing user remove jobs'."\r\n";
include('stuff/jobs_user_rm.php');
include(EASYWIDIR . '/stuff/jobs_user_rm.php');
print "\n";
$test='ech';
if ($deamon==true) {

View File

@ -39,6 +39,7 @@
<master>Master</master>
<migration>Umzugsservice</migration>
<mod>Ändern</mod>
<modules>Module</modules>
<news>News</news>
<no>Nein</no>
<overview>Übersicht</overview>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<sprache>
<active>Aktivieren</active>
<description>Beschreibung</description>
<error_core>Fehler: Easy-WI Core Module können nicht gelöscht werden</error_core>
<file>Datei</file>
<get>GET Wert</get>
<name>Name</name>
<sub>Menüblock</sub>
<type>Modul Typ</type>
<type_admin>Adminpanel</type_admin>
<type_cms>CMS</type_cms>
<type_core>Easy-WI Core</type_core>
<type_user>Userpanel</type_user>
</sprache>

View File

@ -39,6 +39,7 @@
<master>Master</master>
<migration>Migration Service</migration>
<mod>Modify</mod>
<modules>Modules</modules>
<news>News</news>
<no>No</no>
<overview>Overview</overview>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<sprache>
<active>Activate</active>
<description>Description</description>
<error_core>Error: Easy-WI core modules cannot be deleted</error_core>
<file>File</file>
<get>GET Value</get>
<name>Name</name>
<sub>Menu</sub>
<type>Modul type</type>
<type_admin>Adminpanel</type_admin>
<type_cms>CMS</type_cms>
<type_core>Easy-WI core</type_core>
<type_user>Userpanel</type_user>
</sprache>

View File

@ -45,8 +45,8 @@ if (isset($page_include)) {
$logininclude=1;
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR."/stuff/functions.php");
include(EASYWIDIR."/stuff/settings.php");
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/settings.php');
$query=$sql->prepare("SELECT `language` FROM `settings` WHERE `resellerid`=0 LIMIT 1");
$user_language=$query->fetchColumn();
if (!small_letters_check($user_language,2)) $user_language='en';
@ -857,7 +857,7 @@ XML;
$queryip=$vrow2['ip'];
}
}
include(EASYWIDIR."/stuff/class_voice.php");
include(EASYWIDIR . '/stuff/class_voice.php');
$connection=new TS3($queryip,$queryport,'serveradmin',$querypassword);
$errorcode=$connection->errorcode;
if (strpos($errorcode,'error id=0') === false) {

View File

@ -129,8 +129,7 @@ if ($w=='lo') {
$query->execute(array($ui->w('token',32,'get')));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$username=$row['cname'];
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$salt=md5(mt_rand().date('Y-m-d H:i:s:u'));
$password=createHash($username,$ui->password('password1',255,'post'),$salt,$aeskey);
$query=$sql->prepare("UPDATE `userdata` SET `token`='',`security`=?,`salt`=? WHERE `id`=? LIMIT 1");

View File

@ -50,13 +50,13 @@ set_time_limit($timelimit);
if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
define('EASYWIDIR', dirname(__FILE__));
echo "Reboot and Updater started\r\n";
include('stuff/vorlage.php');
include('stuff/class_validator.php');
include('stuff/functions.php');
include('stuff/settings.php');
include('stuff/ssh_exec.php');
include('stuff/class_masterserver.php');
include('stuff/class_voice.php');
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/settings.php');
include(EASYWIDIR . '/stuff/ssh_exec.php');
include(EASYWIDIR . '/stuff/class_masterserver.php');
include(EASYWIDIR . '/stuff/class_voice.php');
if (version_compare(PHP_VERSION,'5.3.0')>=0){
$currentTime=new DateTime(date('Y-m-d H:i:s'));
} else {
@ -65,8 +65,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
$currentHour=date('G');
}
$now=date('Y-m-d',strtotime("now"));
$aesfilecvar=getconfigcvars("stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('gserver','uk',0);
echo "Fetch version for valves appIDs\r\n";
$query=$sql->prepare("SELECT t.`appID`,t.`shorten` FROM `servertypes` t LEFT JOIN `rservermasterg` r ON t.`id`=r.`servertypeid` WHERE r.`id` IS NOT NULL AND t.`appID` IS NOT NULL AND t.`steamgame`!='N' GROUP BY t.`appID` ORDER BY t.`appID`");
@ -465,7 +464,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
$newsInclude=true;
$printToConsole=true;
print "Check for new news feeds\r\n";
include('stuff/feeds_function.php');
include(EASYWIDIR . '/stuff/feeds_function.php');
if (isset($template_file)) print $template_file."\r\n";
$chunkSize=(isset($argv[1]) and is_numeric($argv[1])) ? $argv[1] : 500;
print "Cleaning Up hourly data. Chunksize is ${chunkSize}\r\n";

View File

@ -36,11 +36,11 @@
*/
define('EASYWIDIR', dirname(__FILE__));
include(EASYWIDIR."/stuff/functions.php");
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR."/stuff/config.php");
include(EASYWIDIR."/stuff/settings.php");
include(EASYWIDIR . '/stuff/config.php');
include(EASYWIDIR . '/stuff/settings.php');
$die=false;
if (!isset($admin_id) and !isset($user_id)) {
redirect('login.php');
@ -345,8 +345,7 @@ if ($ui->smallletters('w',5,'get')=='check') {
}
include(EASYWIDIR . '/stuff/ssh_exec.php');
include(EASYWIDIR . '/stuff/class_masterserver.php');
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$rootServer=new masterServer($ui->id('id',10,'get'),$aeskey);
$games=explode("_",$ui->username('gamestring','50','get'));
$i=1;

View File

@ -36,17 +36,16 @@
*/
define('EASYWIDIR', dirname(__FILE__));
include(EASYWIDIR."/stuff/functions.php");
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR."/stuff/settings.php");
include(EASYWIDIR . '/stuff/settings.php');
if (!isset($user_id) and !isset($admin_id)) {
header('Location: login.php');
die('Please allow redirection');
}
if (isset($server_id)) {
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
if ($reseller_id!="0" and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
}

View File

@ -50,14 +50,13 @@ set_time_limit($timelimit);
if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
define('EASYWIDIR', dirname(__FILE__));
echo "Start Syncs and Updates loading...\r\n";
include('stuff/vorlage.php');
include('stuff/class_validator.php');
include('stuff/functions.php');
include('stuff/settings.php');
include('stuff/ssh_exec.php');
include('stuff/class_masterserver.php');
$aesfilecvar=getconfigcvars("stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/settings.php');
include(EASYWIDIR . '/stuff/ssh_exec.php');
include(EASYWIDIR . '/stuff/class_masterserver.php');
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$currentHour=date('G');
$currentMinute=(int)date('i');
$query=$sql->prepare("SELECT `lastUpdateRun` FROM `settings` WHERE `resellerid`=0 LIMIT 1");

View File

@ -65,20 +65,19 @@ if (isset($checkTypeOfServer)) {
set_time_limit($timelimit);
if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
define('EASYWIDIR', dirname(__FILE__));
include('stuff/vorlage.php');
include('stuff/functions.php');
include('stuff/class_validator.php');
include('stuff/settings.php');
include('stuff/ssh_exec.php');
include('stuff/class_voice.php');
include('stuff/queries.php');
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR . '/stuff/settings.php');
include(EASYWIDIR . '/stuff/ssh_exec.php');
include(EASYWIDIR . '/stuff/class_voice.php');
include(EASYWIDIR . '/stuff/queries.php');
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$dayAndHour=date('Y-m-d H:').'00:00';
$dayAndZeroHour=date('Y-m-d').' 00:00:00';
$ssprache=getlanguagefile('settings','uk',0);
$vosprache=getlanguagefile('voice','uk',0);
$sprache=getlanguagefile('gserver','uk',0);
$aesfilecvar=getconfigcvars("stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
# Pick up Reseller and Lend Settings
$resellersettings=array();

282
web/stuff/admin_modules.php Normal file
View File

@ -0,0 +1,282 @@
<?php
/**
* Ticket: https://github.com/easy-wi/developer/issues/61
* File: admin_modules.php.
* Author: Ulrich Block
* Date: 22.09.13
* Time: 12:21
* Contact: <ulrich.block@easy-wi.com>
*
* This file is part of Easy-WI.
*
* Easy-WI is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Easy-WI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Easy-WI. If not, see <http://www.gnu.org/licenses/>.
*
* Diese Datei ist Teil von Easy-WI.
*
* Easy-WI ist Freie Software: Sie koennen es unter den Bedingungen
* der GNU General Public License, wie von der Free Software Foundation,
* Version 3 der Lizenz oder (nach Ihrer Wahl) jeder spaeteren
* veroeffentlichten Version, weiterverbreiten und/oder modifizieren.
*
* Easy-WI wird in der Hoffnung, dass es nuetzlich sein wird, aber
* OHNE JEDE GEWAEHELEISTUNG, bereitgestellt; sogar ohne die implizite
* Gewaehrleistung der MARKTFAEHIGKEIT oder EIGNUNG FUER EINEN BESTIMMTEN ZWECK.
* Siehe die GNU General Public License fuer weitere Details.
*
* Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
if (!isset($admin_id) or !isset($reseller_id) or (isset($reseller_id) and $reseller_id!=0) or (isset($admin_id) and isset($pa) and !$pa['root'])) {
header('Location: login.php');
die;
}
$loguserid = $admin_id;
$logusername = getusername($admin_id);
$logusertype = 'admin';
$logreseller = 0;
$logsubuser = 0;
$sprache = getlanguagefile('modules',$user_language,$reseller_id);
unset($name);
# array with easy-wi core modules to prevent legacy issues and users from removing
$table = array(
1 => array('id' =>1, 'active' => 'Y', 'name' => $gsprache->gameserver, 'sub' => 'gs', 'type' => $sprache->type_core),
2 => array('id' =>2, 'active' => 'Y', 'name' => 'Easy Anti Cheat', 'sub' => 'ea', 'type' => $sprache->type_core),
3 => array('id' =>3, 'active' => 'Y', 'name' => 'MYSQL', 'sub' => 'my', 'type' => $sprache->type_core),
4 => array('id' =>4, 'active' => 'Y', 'name' => $gsprache->voiceserver, 'sub' => 'vo', 'type' => $sprache->type_core),
5 => array('id' =>5, 'active' => 'Y', 'name' => $gsprache->lendserver, 'sub' => 'le', 'type' => $sprache->type_core),
6 => array('id' =>6, 'active' => 'Y', 'name' => $gsprache->support, 'sub' => 'ti', 'type' => $sprache->type_core),
7 => array('id' =>7, 'active' => 'Y', 'name' => 'Rootserver', 'sub' => 'ro', 'type' => $sprache->type_core)
);
if ($ui->st('action', 'post') and !token(true)) {
$template_file = $spracheResponse->token;
} else if ($ui->st('d', 'get') == 'ad' or $ui->st('d', 'get') == 'md') {
$id = $ui->id('id', 10, 'get');
$active = ($ui->active('active', 'post')) ? $ui->active('active', 'post') : 'Y';
$langAvailable = getlanguages($template_to_use);
// Easy-WI core modules should only be (de)activated
if ($ui->st('d', 'get') == 'md' and $ui->st('action', 'post') == 'md' and $id < 1001) {
$query = $sql->prepare("INSERT INTO `modules` (`id`,`file`,`get`,`sub`,`type`,`active`) VALUES (?,'',?,'','C',?) ON DUPLICATE KEY UPDATE `active`=VALUES(`active`)");
$query->execute(array($id, (isset($table[$id]['sub'])) ? $table[$id]['sub'] : '', $active));
$template_file = ($query->rowCount() == 0) ? $spracheResponse->error_table : $spracheResponse->table_add;
} else if ($ui->st('d', 'get') == 'md' and !$ui->st('action', 'post') and $id < 1001) {
$name = (isset($table[$id]['name'])) ? $table[$id]['name'] : '';
$query = $sql->prepare("SELECT `active` FROM `modules` WHERE `id`=? LIMIT 1");
$query->execute(array($id));
$active = $query->fetchColumn();
if ($query->rowCount() == 0) {
$active = 'Y';
}
$template_file = (isset($table[$id])) ? 'admin_modules_md.tpl' : 'admin_404.tpl';
// Custom Modules
} else if ($id > 1000 or $id === null) {
$errors = array();
$dbSuccess = false;
$file = $ui->config('file', 'post');
$sub = $ui->st('sub', 'post');
$get = $ui->smallletters('get', 255, 'post');
$type = $ui->w('type', 1, 'post');
if ($ui->st('action', 'post')) {
if (!$sub or !in_array($sub, array('gs', 'mo', 'my', 'ro', 'ti', 'us', 'vo', 'pa')) ) {
$errors['sub'] = $sprache->sub;
}
if (!$type or !in_array($type, array('A','P','U')) ) {
$errors['type'] = $sprache->type;
}
if ($get and strlen($get) != 2) {
$query = $sql->prepare("SELECT 1 FROM `modules` WHERE `get`=? AND `id`!=? LIMIT 1");
$query->execute(array($get, $id));
if ($query->rowCount()>0) {
$errors['get'] = $sprache->get;
}
} else {
$errors['get'] = $sprache->get;
}
if ($file and substr(strtolower($file), -4) == '.php') {
$query = $sql->prepare("SELECT 1 FROM `modules` WHERE `file`=? AND `id`!=? LIMIT 1");
$query->execute(array($file, $id));
if ($query->rowCount()>0) {
$errors['file'] = $sprache->file;
}
} else {
$errors['file'] = $sprache->file;
}
if (count($errors) == 0) {
if ($ui->st('action', 'post') == 'md') {
$query = $sql->prepare("UPDATE `modules` SET `get`=?,`file`=?,`sub`=?,`active`=?,`type`=? WHERE `id`=? LIMIT 1");
$query->execute(array($get, $file, $sub, $active, $type, $id));
if ($query->rowCount() > 0) {
$dbSuccess = true;
}
} else if (count($errors) == 0 and $ui->st('action', 'post') == 'ad') {
$query = $sql->prepare("INSERT INTO `modules` (`get`,`file`,`sub`,`active`,`type`) VALUES (?,?,?,?,?)");
$query->execute(array($get, $file, $sub, $active, $type));
if ($query->rowCount() > 0) {
$dbSuccess = true;
}
$id = $sql->lastInsertId();
}
if ($ui->smallletters('lang', 2, 'post')) {
$array = (array) $ui->smallletters('lang', 2, 'post');
$query = $sql->prepare("INSERT INTO `translations` (`type`,`transID`,`lang`,`text`,`resellerID`) VALUES ('mo',?,?,?,?) ON DUPLICATE KEY UPDATE `text`=VALUES(`text`)");
foreach($array as $lang) {
if (small_letters_check($lang, 2)) {
$query->execute(array($id, $lang, $ui->description('translation', 'post', $lang), 0));
if ($dbSuccess === false and $query->rowCount() > 0) {
$dbSuccess = true;
}
}
}
$query = $sql->prepare("SELECT `lang` FROM `translations` WHERE `type`='mo' AND `transID`=? AND `resellerID`=?");
$query2 = $sql->prepare("DELETE FROM `translations` WHERE `type`='mo' AND `transID`=? AND `lang`=? AND `resellerID`=? LIMIT 1");
$query->execute(array($id, 0));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if (!in_array($row['lang'],$array)) {
$query2->execute(array($id, $row['lang'], 0));
if ($dbSuccess === false and $query2->rowCount() > 0) {
$dbSuccess = true;
}
}
}
} else {
$query = $sql->prepare("DELETE FROM `translations` WHERE `type`='mo' AND `transID`=? AND `resellerID`=?");
$query->execute(array($id, 0));
if ($dbSuccess === false and $query->rowCount() > 0) {
$dbSuccess = true;
}
}
if ($dbSuccess === true) {
$loguseraction = ($ui->st('d', 'get') == 'md') ? '%mod% %modules% '.$file : '%add% %modules% '.$file;
$insertlog->execute();
$template_file = $spracheResponse->table_add;
} else {
$template_file = $spracheResponse->error_table;
}
} else {
unset($header, $text);
$template_file = ($ui->st('d', 'get') == 'ad') ? 'admin_modules_ad.tpl' : 'admin_modules_md.tpl';
}
} else {
if ($ui->st('d', 'get') == 'md') {
$query = $sql->prepare("SELECT * FROM `modules` WHERE `id`=? LIMIT 1");
$query->execute(array($id));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$file = $row['file'];
$sub = $row['sub'];
$get = $row['get'];
$type = $row['type'];
$found = true;
}
$languageTexts = array();
foreach ($langAvailable as $lg) {
$languageTexts[$lg] = '';
}
if (isset($found)) {
$query = $sql->prepare("SELECT `text`,`lang` FROM `translations` WHERE `type`='mo' AND `transID`=?");
$query->execute(array($id));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if ($row['lang'] == $rSA['language']) {
$name = $row['text'];
}
$languageTexts[$row['lang']] = $row['text'];
}
if(!isset($name)) {
$name = $file;
}
$template_file = 'admin_modules_md.tpl';
} else {
$template_file = 'admin_404.tpl';
}
} else {
$template_file = 'admin_modules_ad.tpl';
}
}
}
} else if ($ui->st('d', 'get') == 'dl' and $ui->id('id',10, 'get')) {
$id=$ui->id('id',10, 'get');
if ($id < 1001) {
$template_file = $sprache->error_core;
} else {
$query = $sql->prepare("SELECT `file` FROM `modules` WHERE `id`=? LIMIT 1");
$query->execute(array($id));
$moduleFile = $query->fetchColumn();
if ($query->rowCount() > 0) {
if ($ui->st('action', 'post') == 'dl') {
$query = $sql->prepare("DELETE FROM `modules` WHERE `id`=? LIMIT 1");
$query->execute(array($id));
if ($query->rowCount() > 0) {
$template_file = $spracheResponse->table_del;
$loguseraction = '%del% %modules% '.$moduleFile;
$insertlog->execute();
} else {
$template_file = $spracheResponse->error_table;
}
} else {
$template_file = 'admin_modules_dl.tpl';
}
} else {
$template_file = 'admin_404.tpl';
}
}
} else {
$query = $sql->prepare("SELECT * FROM `modules`");
$query2 = $sql->prepare("SELECT `text` FROM `translations` WHERE `type`='mo' AND `transID`=? AND `lang`=? LIMIT 1");
$query->execute();
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if (isset($table[$row['id']])) {
$table[$row['id']]['active'] = $row['active'];
} else {
$query2->execute(array($row['id'], $user_language));
$name = $query2->fetchColumn();
if (strlen($name) == 0) {
$query2->execute(array($row['id'], $rSA['language']));
$name = $query2->fetchColumn();
}
if (strlen($name) == 0) {
$name = $row['file'];
}
$type = '';
if ($row['type'] == 'A') {
$type = $sprache->type_admin;
} else if ($row['type'] == 'P') {
$type = $sprache->type_cms;
} else if ($row['type'] == 'U') {
$type = $sprache->type_user;
}
$table[$row['id']] = array('id' => $row['id'], 'active' => $row['active'], 'name' => $name, 'type' => $type);
}
}
$template_file = 'admin_modules_list.tpl';
}

View File

@ -41,12 +41,11 @@ if ($main!=1 or !isset($admin_id) or (isset($admin_id) and !$pa['apiSettings']))
header('Location: admin.php');
die('No acces');
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('api',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';

View File

@ -37,6 +37,7 @@
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$minimumArray=array('action','identify_server_by','server_local_id','server_external_id');
$editArray=array('active','private','slots','shorten','identify_user_by','user_localid','user_externalid','username');
foreach ($minimumArray as $key) {
@ -51,8 +52,6 @@ if (array_key_exists('action',$data) and $data['action']!='gs') {
}
}
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$active='';
$private='';
$shorten='';

View File

@ -40,12 +40,11 @@ if ($main!=1 or !isset($admin_id) or (isset($admin_id) and !$pa['apiSettings']))
header('Location: admin.php');
die('No acces');
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('api',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';

View File

@ -37,16 +37,12 @@
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
include(EASYWIDIR . '/stuff/keyphrasefile.php');
foreach (array('active','action','identify_server_by','server_local_id','server_external_id','identify_user_by','user_localid','user_externalid','username') as $key) {
if (!array_key_exists($key,$data)) {
$success['false'][]='Data key does not exist: '.$key;
}
}
if (!isset($success['false'])) {
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
}
if (!isset($success['false']) and array_value_exists('action','add',$data)) {
if (dataExist('identify_user_by',$data)) {
$active=active_check($data['active']);

View File

@ -37,6 +37,8 @@
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$username='';
$externalID='';
$email='';
@ -168,8 +170,6 @@ if (array_value_exists('action','add',$data)) {
}
if (!isset($success) and isset($localID) and isset($insert) and $insert==true) {
if (!isset($data['password']) or in_array($data['password'],$bad)) $password=passwordgenerate(10);
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$passwordhash=createHash($username,$password,$salt,$aeskey);
$query=$sql->prepare("UPDATE `userdata` SET `cname`=?,`security`=? WHERE `id`=? LIMIT 1");
$query->execute(array($username,$passwordhash,$localID));
@ -200,8 +200,6 @@ if (array_value_exists('action','add',$data)) {
$what=array();
if (isset($data['password']) and !in_array($data['password'],$bad)) {
$password=$data['password'];
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$salt=md5(mt_rand().date('Y-m-d H:i:s:u'));
$security=createHash($name,$data['password'],$salt,$aeskey);
$what['security']=$security;

View File

@ -37,12 +37,12 @@
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('feeds',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
if ($reseller_id==0) {
$logreseller=0;
$logsubuser=0;

View File

@ -37,12 +37,12 @@
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('feeds',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
if ($reseller_id==0) {
$logreseller=0;
$logsubuser=0;

View File

@ -371,36 +371,6 @@ if (!function_exists('passwordgenerate')) {
natsort($checkedips);
return $checkedips;
}
function getconfigcvars($file) {
$fp= @fopen($file,'rb');
if ($fp == true) {
$vars=array();
$configfile="";
while (!feof($fp)){
$line=fgets($fp);
if(strpos(strtolower($line), strtolower("<?php")) === false and strpos(strtolower($line), strtolower("?>")) === false) {
$configfile .="$line\r\n";
}
}
fclose($fp);
$lines=explode("\r\n", $configfile);
foreach ($lines as $line) {
if(strpos(strtolower($line), strtolower("//")) === false and strpos(strtolower($line), strtolower("=")) == true) {
$data=explode("=", $line);
$cvar=preg_replace('/\s+/', '', $data[0]);
$cvar=str_replace('$', "", $cvar);
$data2=explode(";", $data[1]);
$stringlenght=strlen($data2[0]);
$stop=$stringlenght-2;
$value=substr($data2[0],1,$stop);
$vars[$cvar]=$value;
}
}
return $vars;
} else {
die("No configdata!");
}
}
function eacchange($what,$serverid,$rcon,$reseller_id) {
global $sql;
$query=$sql->prepare("SELECT `active`,`cfgdir` FROM `eac` WHERE `resellerid`=? LIMIT 1");
@ -850,8 +820,9 @@ if (!function_exists('passwordgenerate')) {
}
function sendmail($template,$userid,$server,$shorten) {
global $sql;
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
if (!isset($aeskey)) {
include(EASYWIDIR . '/stuff/keyphrasefile.php');
}
if ($template=='emailnewticket') {
$writerid=$shorten[1];
$shorten=$shorten[0];

View File

@ -35,6 +35,8 @@
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
include(EASYWIDIR . '/stuff/keyphrasefile.php');
if ($ui->st('w','get')=='se') {
if ((!isset($user_id) or $main!=1) or (isset($user_id) and !$pa['usersettings'])) {
header('Location: userpanel.php');
@ -70,8 +72,6 @@ if ($ui->st('w','get')=='se') {
if ($reseller_id!=0 and $admin_id!=$reseller_id) $reseller_id=$admin_id;
}
$sprache=getlanguagefile('user',$user_language,$reseller_id);
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$lookUpID=($ui->st('w','get')=='se') ? $user_id : $admin_id;
if ($ui->st('d','get')=='pw') {
if (!$ui->smallletters('action',2,'post')) {

View File

@ -39,12 +39,11 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['gserver'])) {
header('Location: admin.php');
die;
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('gserver',$user_language,$reseller_id);
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";
$aeskey=$aesfilecvar['aeskey'];
if ($reseller_id==0) {
$logreseller=0;
$logsubuser=0;

View File

@ -39,6 +39,7 @@ if ((!isset($admin_id) or !$main == "1") or (isset($admin_id) and !$pa['gimages'
header('Location: admin.php');
die('No acces');
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('images',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
$loguserid=$admin_id;
@ -58,8 +59,6 @@ if ($reseller_id=="0") {
if ($reseller_id!=0 and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
if ($ui->w('action',4,'post') and !token(true)) {
$template_file=$spracheResponse->token;
} else if ($ui->st('d','get')=='ex' and $ui->id('id',10,'get')) {

View File

@ -37,19 +37,28 @@
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
if (!isset($admin_id) or !isset($reseller_id)) redirect('login.php');
if (!isset($admin_id) or !isset($reseller_id)) {
header('Location: login.php');
die;
}
$pa = User_Permissions($admin_id);
if (!isanyadmin($admin_id) and count($pa)==0) redirect('login.php');
if (!isanyadmin($admin_id) and count($pa) == 0) {
redirect('login.php');
}
$licenceDetails=serverAmount($reseller_id);
$gserver_module = (is_numeric($licenceDetails['mG']) and $licenceDetails['mG'] == 0) ? false : true;
$vserver_module = (is_numeric($licenceDetails['mVs']) and $licenceDetails['mVs'] == 0) ? false : true;
$voserver_module = (is_numeric($licenceDetails['mVo']) and $licenceDetails['mVo'] == 0) ? false : true;
$dediserver_module = (is_numeric($licenceDetails['mD']) and $licenceDetails['mD'] == 0) ? false : true;
$ewVersions['files'] = '4.00';
$vcsprache=getlanguagefile('versioncheck',$user_language,$reseller_id);
$query = $sql->prepare("SELECT `version` FROM `easywi_version` ORDER BY `id` DESC LIMIT 1");
$query->execute();
$ewVersions['cVersion'] = $query->fetchColumn();
$query = $sql->prepare("SELECT `version`,`releasenotesDE`,`releasenotesEN` FROM `settings` WHERE `resellerid`=0 LIMIT 1");
$query->execute();
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
@ -57,30 +66,101 @@ foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$ewVersions['releasenotesDE'] = $row['releasenotesDE'];
$ewVersions['releasenotesEN'] = $row['releasenotesEN'];
}
if ($reseller_id==0 and $ui->st('w','get')!='vc' and ($ewVersions['cVersion']<$ewVersions['version'] or $ewVersions['files']<$ewVersions['version'])) $toooldversion=$vcsprache->newversion.$ewVersions['version'];
if ($reseller_id == 0 and $ui->st('w', 'get') != 'vc' and ($ewVersions['cVersion']<$ewVersions['version'] or $ewVersions['files']<$ewVersions['version'])) {
$toooldversion = $vcsprache->newversion.$ewVersions['version'];
}
$query = $sql->prepare("SELECT `name`,`vname`,`lastlogin` FROM `userdata` WHERE `id`=? LIMIT 1");
$query->execute(array($admin_id));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$great_name = $row['name'];
$great_vname = $row['vname'];
if ($row['lastlogin']!=null and $row['lastlogin']!='0000-00-00 00:00:00' and $user_language=='de') $great_last=date('d.m.Y H:i:s',strtotime($row['lastlogin']));
else if ($row['lastlogin']!=null and $row['lastlogin']!='0000-00-00 00:00:00') $great_last=$row['lastlogin'];
else if ($user_language=='de') $great_last='Niemals';
else $great_last='Never';
if ($row['lastlogin'] != null and $row['lastlogin'] != '0000-00-00 00:00:00' and $user_language == 'de') {
$great_last=date('d.m.Y H:i:s',strtotime($row['lastlogin']));
} else if ($row['lastlogin'] != null and $row['lastlogin'] != '0000-00-00 00:00:00') {
$great_last = $row['lastlogin'];
} else if ($user_language == 'de') {
$great_last = 'Niemals';
} else {
$great_last = 'Never';
}
$what_to_be_included_array=array('ro'=>'roots.php',
}
# https://github.com/easy-wi/developer/issues/61 modules management
$what_to_be_included_array = array(
'fe' => 'feeds.php', 'fn' => 'feeds_entries.php',
'ap' => 'api_settings.php', 'aa' => 'api_external_auth.php', 'ui' => 'api_import_users.php', 'jb' => 'jobs_list.php', 'bu' => 'mysql_root.php',
'ma'=>'masterserver.php','gs'=>'gserver.php','ad'=>'addons.php','im'=>'images.php','ea'=>'eac.php',
'vc' => 'versioncheck.php', 'ib' => 'ip_bans.php', 'se' => 'panel_settings.php', 'cc' => 'panel_settings_columns.php', 'sm' => 'panel_settings_email.php', 'lo' => 'logdata.php', 'ml' => 'maillog.php', 'sr' => 'admin_search.php',
'us' => 'user.php', 'ug' => 'user_groups.php',
'vu'=>'voice_usage.php','vo'=>'voice.php','vd'=>'voice_tsdns.php','vr'=>'voice_tsdnsrecords.php','vm'=>'voice_master.php',
'le'=>'lendserver.php',
'ps'=>'page_settings.php','pp'=>'page_pages.php','pn'=>'page_news_edit.php','pc'=>'page_comments.php','pd'=>'page_downloads.php',
'ip'=>'imprint.php','su'=>'global_userdata.php',
'rh'=>'root_dedicated.php','rd'=>'root_dhcp.php','rp'=>'root_pxe.php','vh'=>'root_virtual_hosts.php','vs'=>'root_virtual_server.php','ot'=>'roots_os_templates.php','tf'=>'traffic.php',
'my'=>'mysql_server.php',
'ti'=>'tickets.php','tr'=>'tickets_reseller.php'
'ip' => 'imprint.php', 'su' => 'global_userdata.php'
);
# hier dann w = 4 buchstaben custom
if ($reseller_id == 0) {
$what_to_be_included_array['mo'] = 'admin_modules.php';
$what_to_be_included_array['ps'] = 'page_settings.php';
$what_to_be_included_array['pp'] = 'page_pages.php';
$what_to_be_included_array['pn'] = 'page_news_edit.php';
$what_to_be_included_array['pc'] = 'page_comments.php';
$what_to_be_included_array['pd'] = 'page_downloads.php';
}
$easywiModules = array('gs' => true, 'ea' => true, 'my' => true, 'ro' => true, 'ti' => true, 'le' => true, 'vo' => true);
$customModules = array('gs' => array(), 'mo' => array(), 'my' => array(), 'ro' => array(), 'ti' => array(), 'us' => array(), 'vo' => array(), 'pa' => array());
$query = $sql->prepare("SELECT * FROM `modules` WHERE `type` IN ('A','C')");
$query2 = $sql->prepare("SELECT `text` FROM `translations` WHERE `type`='mo' AND `transID`=? AND `lang`=? LIMIT 1");
$query->execute();
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if ($row['active'] == 'Y' and $row['type'] == 'A' and is_file(EASYWIDIR.'/stuff/'.$row['file'])) {
$query2->execute(array($row['id'], $user_language));
$name = $query2->fetchColumn();
if (strlen($name) == 0) {
$query2->execute(array($row['id'], $rSA['language']));
$name = $query2->fetchColumn();
}
if (strlen($name) == 0) {
$name = $row['file'];
}
$customModules[$row['sub']][$row['get']] = $name;
$what_to_be_included_array[$row['get']] = $row['file'];
} else if ($row['type'] == 'C' and $row['active'] == 'N') {
$easywiModules[$row['get']] = false;
}
}
if ($easywiModules['gs'] === true) {
$what_to_be_included_array['ro'] = 'roots.php';
$what_to_be_included_array['ma'] = 'masterserver.php';
$what_to_be_included_array['gs'] = 'gserver.php';
$what_to_be_included_array['ad'] = 'addons.php';
$what_to_be_included_array['im'] = 'images.php';
}
if ($easywiModules['ea'] === true) {
$what_to_be_included_array['ea'] = 'eac.php';
}
if ($easywiModules['my'] === true) {
$what_to_be_included_array['my'] = 'mysql_server.php';
}
if ($easywiModules['ro'] === true) {
$what_to_be_included_array['rh'] = 'root_dedicated.php';
$what_to_be_included_array['rd'] = 'root_dhcp.php';
$what_to_be_included_array['rp'] = 'root_pxe.php';
$what_to_be_included_array['vh'] = 'root_virtual_hosts.php';
$what_to_be_included_array['vs'] = 'root_virtual_server.php';
$what_to_be_included_array['ot'] = 'roots_os_templates.php';
$what_to_be_included_array['tf'] = 'traffic.php';
}
if ($easywiModules['ti'] === true) {
$what_to_be_included_array['ti'] = 'tickets.php';
$what_to_be_included_array['tr'] = 'tickets_reseller.php';
}
if ($easywiModules['le'] === true) {
$what_to_be_included_array['le'] = 'lendserver.php';
}
if ($easywiModules['vo'] === true) {
$what_to_be_included_array['vu'] = 'voice_usage.php';
$what_to_be_included_array['vo'] = 'voice.php';
$what_to_be_included_array['vd'] = 'voice_tsdns.php';
$what_to_be_included_array['vr'] = 'voice_tsdnsrecords.php';
$what_to_be_included_array['vm'] = 'voice_master.php';
}

View File

@ -48,7 +48,9 @@ if (isset($_SESSION['sID'])) {
$substituteAccess = array('gs'=>array(),'db'=>array(),'vo'=>array(),'vd'=>array(),'vs'=>array(),'ro'=>array());
$query = $sql->prepare("SELECT `oID`,`oType` FROM `userdata_substitutes_servers` WHERE `sID`=?");
$query->execute(array($_SESSION['sID']));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) $substituteAccess[$row['oType']][]=$row['oID'];
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$substituteAccess[$row['oType']][] = $row['oID'];
}
$query = $sql->prepare("SELECT `name`,`vname`,`lastlogin` FROM `userdata_substitutes` WHERE `sID`=? LIMIT 1");
$query->execute(array($_SESSION['sID']));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
@ -89,22 +91,53 @@ if (isset($_SESSION['sID'])) {
$query->execute(array($user_id));
$virtualcount = $query->fetchColumn();
}
if ($lastlogin!=null and $lastlogin!='0000-00-00 00:00:00' and $user_language=='de') $great_last=date('d.m.Y H:m:s',strtotime($lastlogin));
else if ($lastlogin!=null and $lastlogin!='0000-00-00 00:00:00') $great_last=$lastlogin;
else if ($user_language=='de') $great_last='Niemals';
else $great_last='Never';
if ($lastlogin!=null and $lastlogin!='0000-00-00 00:00:00' and $user_language=='de') {
$great_last=date('d.m.Y H:m:s',strtotime($lastlogin));
} else if ($lastlogin!=null and $lastlogin!='0000-00-00 00:00:00') {
$great_last = $lastlogin;
} else if ($user_language == 'de') {
$great_last='Niemals';
} else {
$great_last='Never';
}
# basic controler array. available at any time to anyone
# https://github.com/easy-wi/developer/issues/61
# basic modules array. available at any time to anyone
$what_to_be_included_array = array('ip'=>'imprint.php','lo'=>'userpanel_logdata.php','ti'=>'userpanel_tickets.php');
# controlers meant only for user only
$easywiModules = array('gs' => true, 'my' => true, 'ro' => true, 'ti' => true, 'le' => true, 'vo' => true);
$customModules = array('gs' => array(), 'mo' => array(), 'my' => array(), 'ro' => array(), 'ti' => array(), 'us' => array(), 'vo' => array());
$query = $sql->prepare("SELECT * FROM `modules` WHERE `type` IN ('U','C')");
$query2 = $sql->prepare("SELECT `text` FROM `translations` WHERE `type`='mo' AND `transID`=? AND `lang`=? LIMIT 1");
$query->execute();
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if ($row['active'] == 'Y' and $row['type'] == 'U' and is_file(EASYWIDIR.'/stuff/'.$row['file'])) {
$query2->execute(array($row['id'], $user_language));
$name = $query2->fetchColumn();
if (strlen($name) == 0) {
$query2->execute(array($row['id'], $rSA['language']));
$name = $query2->fetchColumn();
}
if (strlen($name) == 0) {
$name = $row['file'];
}
$customModules[$row['sub']][$row['get']] = $name;
$what_to_be_included_array[$row['get']] = $row['file'];
} else if ($row['type'] == 'C' and $row['active'] == 'N') {
$easywiModules[$row['get']] = false;
}
}
# modules meant only for user only
if (!isset($_SESSION['sID'])) {
$what_to_be_included_array['su'] = 'userpanel_substitutes.php';
$what_to_be_included_array['se'] = 'global_userdata.php';
}
# controler based on count. No servers, no controler
if ($gscount>0) {
# modules based on count. No servers, no modules
if ($gscount > 0 and $easywiModules['gs'] === true) {
$what_to_be_included_array['gs'] = 'userpanel_gserver.php';
$what_to_be_included_array['fd'] = 'userpanel_fdl.php';
$what_to_be_included_array['ao'] = 'userpanel_ao.php';
@ -113,8 +146,8 @@ if ($gscount>0) {
$what_to_be_included_array['bu'] = 'userpanel_backup.php';
$what_to_be_included_array['ms'] = 'userpanel_migration.php';
}
if ($voicecount>0) $what_to_be_included_array['vo']='userpanel_voice.php';
if ($tsdnscount>0) $what_to_be_included_array['vd']='userpanel_voice_dns.php';
if ($rootcount>0) $what_to_be_included_array['de']='userpanel_dedicated.php';
if ($virtualcount>0) $what_to_be_included_array['vm']='userpanel_virtual.php';
if ($dbcount>0) $what_to_be_included_array['my']='userpanel_mysql.php';
if ($voicecount > 0 and $easywiModules['vo'] === true) $what_to_be_included_array['vo'] = 'userpanel_voice.php';
if ($tsdnscount > 0 and $easywiModules['vo'] === true) $what_to_be_included_array['vd'] = 'userpanel_voice_dns.php';
if ($rootcount > 0 and $easywiModules['ro'] === true) $what_to_be_included_array['de'] = 'userpanel_dedicated.php';
if ($virtualcount > 0 and $easywiModules['ro'] === true) $what_to_be_included_array['vm'] = 'userpanel_virtual.php';
if ($dbcount > 0 and $easywiModules['my'] === true) $what_to_be_included_array['my'] = 'userpanel_mysql.php';

View File

@ -39,6 +39,9 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and (!isset($pa) or (!$
redirect('Location: admin.php');
die;
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
include(EASYWIDIR . '/stuff/ssh_exec.php');
include(EASYWIDIR . '/stuff/class_voice.php');
$sprache=getlanguagefile('lendserver',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
$loguserid=$admin_id;
@ -51,10 +54,6 @@ if ($reseller_id==0) {
$logsubuser=(isset($_SESSION['oldid'])) ? $_SESSION['oldid'] : 0;
$logreseller=0;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR.'/stuff/ssh_exec.php');
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')=="se" and $pa['lendserverSettings']) {

View File

@ -107,8 +107,8 @@ foreach ($pselect->fetchall() as $row) {
$placeholders=array('%%','%add%','%dl%','%del%','%mod%','%start%','%restart%','%stop%','%upd%','%fail%','%ok%','%psw%','%cfg%','%import%','%reinstall%','%backup%','%use%');
$replace=array('',$gsprache->add.': ',$gsprache->del.': ',$gsprache->del.': ',$gsprache->mod.': ',$gsprache->start.': ',$gsprache->start.': ',$gsprache->stop.': ',$gsprache->update.': ','','',$gssprache->password.': ',$gssprache->config.': ',$gsprache->import.': ',$gssprache->reinstall.': ',$gsprache->backup,$gsprache->use.': ');
$replacedpics=str_replace($placeholders,$replace,$useraction);
$placeholders=array('%voserver%','%gserver%','%user%','%group%','%fastdl%','%master%','%user%','%root%','%addon%','%settings%','%vserver%','%ticket_subject%','%reseller%','%virtual%','%eac%','%resync%','%virtualimage%','%template%','%voserver%','%emailsettings%','%dns%','%tsdns%','%pmode%','%comment%');
$replace=array($gsprache->voiceserver,$gsprache->gameserver,$gsprache->user,$gsprache->groups,$gsprache->fastdownload,$gsprache->master,$gsprache->user,$gsprache->root,$gsprache->addon2,$gsprache->settings,$gsprache->virtual,$gsprache->support,$gsprache->reseller,$gsprache->hostsystem,'Easy Anti Cheat',$gssprache->resync,$gsprache->virtual.' '.$gsprache->template,$gsprache->template,$gsprache->voiceserver,'E-Mail '.$gsprache->settings,'TSDNS','TSDNS',$gssprache->protect,$gsprache->comments);
$placeholders=array('%modules%','%voserver%','%gserver%','%user%','%group%','%fastdl%','%master%','%user%','%root%','%addon%','%settings%','%vserver%','%ticket_subject%','%reseller%','%virtual%','%eac%','%resync%','%virtualimage%','%template%','%voserver%','%emailsettings%','%dns%','%tsdns%','%pmode%','%comment%');
$replace=array($gsprache->modules,$gsprache->voiceserver,$gsprache->gameserver,$gsprache->user,$gsprache->groups,$gsprache->fastdownload,$gsprache->master,$gsprache->user,$gsprache->root,$gsprache->addon2,$gsprache->settings,$gsprache->virtual,$gsprache->support,$gsprache->reseller,$gsprache->hostsystem,'Easy Anti Cheat',$gssprache->resync,$gsprache->virtual.' '.$gsprache->template,$gsprache->template,$gsprache->voiceserver,'E-Mail '.$gsprache->settings,'TSDNS','TSDNS',$gssprache->protect,$gsprache->comments);
$replacedwords=str_replace($placeholders,$replace,$replacedpics);
$logdate=explode(' ', $row['logdate']);
$table[]=array('logday'=>$logdate[0],'loghour'=>$logdate[1],'ip'=>$ip,'hostname'=>$hostname,'username'=>$username,'useraction'=>$replacedwords);

View File

@ -39,8 +39,10 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['masterServer'
header('Location: admin.php');
die('No acces');
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
include(EASYWIDIR . '/stuff/class_masterserver.php');
$sprache=getlanguagefile('roots',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
@ -55,7 +57,6 @@ if ($reseller_id==0) {
if ($reseller_id!=0 and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
}
include(EASYWIDIR.'/stuff/class_masterserver.php');
if ($ui->w('action',4,'post') and !token(true)) {
$template_file=$spracheResponse->token;
} else if ($ui->st('d','get')=='ad') {

View File

@ -39,9 +39,10 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['mysql_setting
header('Location: login.php');
die;
}
include(EASYWIDIR . '/stuff/mysql_functions.php');
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('mysql',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);

View File

@ -152,8 +152,7 @@ if (isset($registration) and in_array($registration,array('A','M','D'))) {
// personal Salt and activation md5
$userSalt=md5(date('Y-d-m H:i:s u').md5(mt_rand()));
$activeHash=uniqid();
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
// insert data
$query=$sql->prepare("INSERT INTO `userdata` (`accounttype`,`active`,`mail`,`token`,`creationTime`,`updateTime`,`salutation`,`country`,`name`,`vname`,`birthday`,`phone`,`fax`,`handy`,`city`,`cityn`,`street`,`streetn`) VALUES ('u','R',?,?,NOW(),NOW(),?,?,?,?,?,?,?,?,?,?,?,?)");

View File

@ -1,4 +1,5 @@
<?php
/**
* File: panel_settings.php.
* Author: Ulrich Block
@ -36,26 +37,24 @@
*/
if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['settings'])) {
redirect('login.php');
header('Location: login.php');
die;
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('settings',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";
$logusertype='admin';
if ($reseller_id==0) {
$logreseller=0;
$logsubuser=0;
} else {
if (isset($_SESSION['oldid'])) {
$logsubuser=$_SESSION['oldid'];
} else {
$logsubuser=0;
}
$logsubuser= (isset($_SESSION['oldid'])) ? $_SESSION['oldid'] : 0;
$logreseller=0;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
if ($reseller_id!=0 and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
}

View File

@ -40,6 +40,9 @@
if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['settings'])) {
redirect('login.php');
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('settings',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
$loguserid=$admin_id;
@ -52,8 +55,6 @@ if ($reseller_id==0) {
$logsubuser=(isset($_SESSION['oldid'])) ? $_SESSION['oldid'] : 0;
$logreseller=0;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
if ($reseller_id!=0 and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
}

View File

@ -41,8 +41,9 @@ if (!isset($admin_id) or $main!=1 or !$pa['dedicatedServer']) {
header('Location: admin.php');
die;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);

View File

@ -41,8 +41,9 @@ if (!isset($admin_id) or $main!=1 or $reseller_id!=0 or !$pa['vserversettings']
header('Location: admin.php');
die;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);

View File

@ -41,8 +41,9 @@ if (!isset($admin_id) or $main!=1 or $reseller_id!=0 or !$pa['vserversettings']
header('Location: admin.php');
die;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);

View File

@ -41,8 +41,9 @@ if (!isset($admin_id) or $main!=1 or $reseller_id!=0 or !$pa['vserverhost']) {
header('Location: admin.php');
die;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);

View File

@ -40,8 +40,9 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['addvserver']
header('Location: admin.php');
die;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);

View File

@ -38,8 +38,9 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['roots'])) {
header('Location: admin.php');
die('No acces');
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('roots',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);

View File

@ -41,8 +41,9 @@ if (!isset($admin_id) or $main!=1 or $reseller_id!=0 or !$pa['resellertemplates'
header('Location: admin.php');
die;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);

View File

@ -42,18 +42,15 @@ if (isset($_SERVER['QUERY_STRING'])) {
}
$ui=new ValidateUserinput($_GET,$_POST,$_SERVER,array(),$_ENV);
unset($_GET,$_POST,$_SERVER,$_ENV);
$panelcfgcvars=getconfigcvars(EASYWIDIR."/stuff/config.php");
$dbConnect['type']=$panelcfgcvars['databanktype'];
$dbConnect['host']=$panelcfgcvars['host'];
$dbConnect['db']=$panelcfgcvars['db'];
$dbConnect['user']=$panelcfgcvars['user'];
$dbConnect['pwd']=$panelcfgcvars['pwd'];
$captcha=$panelcfgcvars['captcha'];
$title=$panelcfgcvars['title'];
include(EASYWIDIR . '/stuff/config.php');
$ewCfg['captcha']=$captcha;
$ewCfg['title']=$title;
$dbConnect['debug']=0;
if (isset($panelcfgcvars['debug']) and $panelcfgcvars['debug']==1) {
$dbConnect['type']=(!isset($type) or $type == '') ? 'mysql' : $type;
$dbConnect['host']=$host;
$dbConnect['user']=$user;
$dbConnect['pwd']=$pwd;
$dbConnect['db']=$db;
if (isset($debug) and $debug==1) {
$dbConnect['debug']=1;
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);
@ -207,8 +204,8 @@ if ($loguserip!='localhost') {
$default_language=(!empty($user_language)) ? $user_language : $rSA['language'];
if (!isset($user_language) or empty($user_language)) $user_language=$default_language;
$_SESSION['language']=$user_language;
$gsprache=(isset($reseller_id)) ? getlanguagefile('general',$default_language,$reseller_id) : getlanguagefile('general',$default_language,0);
$spracheResponse=(isset($reseller_id)) ? getlanguagefile('response',$default_language,$reseller_id) : getlanguagefile('response',$default_language,0);
$gsprache=(isset($reseller_id)) ? getlanguagefile('general',$user_language,$reseller_id) : getlanguagefile('general',$user_language,0);
$spracheResponse=(isset($reseller_id)) ? getlanguagefile('response',$user_language,$reseller_id) : getlanguagefile('response',$user_language,0);
}
if (isset($logininclude) and $logininclude==true) {
$query=$sql->prepare("DELETE FROM `badips` WHERE `bantime` <= ?");
@ -228,21 +225,8 @@ if($ui->st('r','get')) {
$r=$ui->st('r','get');
$pagename=$ui->escaped('SCRIPT_NAME','server');
$header='<meta http-equiv="refresh" content="3; URL='.$pagename.'?w='.$r.'">';
if (!isset($user_language)) {
$user_language=$rSA['language'];
}
if (isset($user_language) and is_file("languages/$template_to_use/$user_language/redirect.xml")) {
$rsprache=simplexml_load_file("languages/$template_to_use/$user_language/redirect.xml");
} else if (isset($user_language) and is_file("languages/default/$user_language/redirect.xml")) {
$rsprache=simplexml_load_file("languages/default/$user_language/redirect.xml");
} else if (isset($user_language) and is_file("languages/$user_language/redirect.xml")) {
$rsprache=simplexml_load_file("languages/$user_language/redirect.xml");
} else if (is_file("languages/default/$default_language/redirect.xml")) {
$rsprache=simplexml_load_file("languages/default/$default_language/redirect.xml");
} else {
$user_language=$default_language;
$rsprache=simplexml_load_file("languages/$default_language/redirect.xml");
}
if (!isset($user_language)) $user_language=$rSA['language'];
$rsprache=getlanguagefile('redirect',$user_language,0);
$text=$rsprache->refresh;
}
if($ui->username('distro','50','get')) $get_distro=$ui->username('distro','50','get');

View File

@ -422,6 +422,19 @@ $query="CREATE TABLE IF NOT EXISTS `mail_log` (
$add=$sql->prepare($query);
$add->execute();
#https://github.com/easy-wi/developer/issues/61 add module management
$query="CREATE TABLE IF NOT EXISTS `modules` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`get` varchar(255) NOT NULL,
`file` varchar(255) NOT NULL,
`sub` varchar(2) NOT NULL,
`active` enum('Y','N') DEFAULT 'Y',
`type` enum('A','C','P','U') DEFAULT 'A',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1001;";
$add=$sql->prepare($query);
$add->execute();
#https://github.com/easy-wi/developer/issues/42 column description added
$query="CREATE TABLE IF NOT EXISTS `mysql_external_dbs` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,

View File

@ -395,6 +395,15 @@ $defined['mail_log']=array('id'=>array("Type"=>"bigint(19) unsigned","Null"=>"NO
'resellerid'=>array("Type"=>"int(10) unsigned","Null"=>"YES","Key"=>"MUL","Default"=>"0","Extra"=>"")
);
#https://github.com/easy-wi/developer/issues/61 add module management
$defined['modules']=array('id'=>array("Type"=>"int(10) unsigned","Null"=>"NO","Key"=>"PRI","Default"=>"","Extra"=>"auto_increment"),
'get'=>array("Type"=>"varchar(255)","Null"=>"NO","Key"=>"","Default"=>"","Extra"=>""),
'file'=>array("Type"=>"varchar(255)","Null"=>"NO","Key"=>"","Default"=>"","Extra"=>""),
'sub'=>array("Type"=>"varchar(2)","Null"=>"NO","Key"=>"","Default"=>"","Extra"=>""),
'active'=>array("Type"=>"enum('Y','N')","Null"=>"YES","Key"=>"","Default"=>"Y","Extra"=>""),
'type'=>array("Type"=>"enum('A','C','P','U')","Null"=>"YES","Key"=>"","Default"=>"A","Extra"=>"")
);
#https://github.com/easy-wi/developer/issues/42 column description added
$defined['mysql_external_dbs']=array('id'=>array("Type"=>"int(10) unsigned","Null"=>"NO","Key"=>"PRI","Default"=>"","Extra"=>"auto_increment"),
'active'=>array("Type"=>"enum('Y','N')","Null"=>"YES","Key"=>"","Default"=>"Y","Extra"=>""),

View File

@ -40,8 +40,9 @@ if(!isset($admin_id) or !$main == "1" or (isset($admin_id) and !$pa['traffic']))
}
$sprache=getlanguagefile('traffic',$user_language,$reseller_id);
if ($d=='se' and $reseller_id==0) {
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
if ($ui->w('action',4,'post') and !token(true)) {
$template_file=$spracheResponse->token;
} else if (isset($ui->post['type']) and $ui->w('action',4,'post')=='md') {

View File

@ -62,8 +62,7 @@ if (isset($admin_id)) {
}
if ($ui->id('id',10,'get') and $ui->id('adid',10,'get') and in_array($ui->smallletters('action',2,'get'),array('ad','dl')) and (!isset($_SESSION['sID']) or in_array($ui->id('id',10,'get'),$substituteAccess['gs']))) {
include(EASYWIDIR . '/stuff/ssh_exec.php');
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$gameserverid=$ui->id('id',19,'get');
$addonid=$ui->id('adid',10,'get');
$action=$ui->smallletters('action',2,'get');

View File

@ -43,8 +43,7 @@ if (isset($admin_id) and $reseller_id!=0 and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
}
$customer=getusername($user_id);
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
if ($ui->id('id',10,'get') and (!isset($_SESSION['sID']) or in_array($ui->id('id',10,'get'),$substituteAccess['gs']))) {
$id=(int)$ui->id('id',10,'get');
$query=$sql->prepare("SELECT g.`serverip`,g.`port`,g.`rootID`,g.`newlayout`,s.`map`,t.`shorten`,AES_DECRYPT(g.`ftppassword`,?) AS `dftppassword`,u.`cname`,AES_DECRYPT(u.`ftpbackup`,?) AS `ftp` FROM `gsswitch` g LEFT JOIN `serverlist` s ON g.`serverid`=s.`id` LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` LEFT JOIN `userdata` u ON g.`userid`=u.`id` WHERE g.`id`=? AND g.`userid`=? AND g.`resellerid`=? LIMIT 1");

View File

@ -41,6 +41,9 @@ if ((!isset($main) or $main!=1) or (!isset($user_id) or (isset($user_id) and !$p
header('Location: userpanel.php');
die('No acces');
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
@ -50,8 +53,6 @@ $logsubuser=0;
if (isset($admin_id)) $logsubuser=$admin_id;
else if (isset($subuser_id)) $logsubuser=$subuser_id;
if (isset($admin_id) and $reseller_id!=0) $reseller_id=$admin_id;
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
if ($ui->w('action',4,'post') and !token(true)) {
$template_file=$spracheResponse->token;
} else if ($ui->st('d','get')=='ri'and $ui->id('id',10,'get') and (!isset($_SESSION['sID']) or in_array($ui->id('id',10,'get'),$substituteAccess['ro']))) {

View File

@ -38,6 +38,10 @@ if ((!isset($main) or $main!=1) or (!isset($user_id) or (isset($user_id) and !$p
header('Location: userpanel.php');
die('No acces');
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
include(EASYWIDIR . '/stuff/ssh_exec.php');
$sprache=getlanguagefile('gserver',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
@ -54,9 +58,6 @@ if (isset($admin_id)) {
if (isset($admin_id) and $reseller_id!=0) {
$reseller_id=$admin_id;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR.'/stuff/ssh_exec.php');
if ($ui->w('action',4,'post') and !token(true)) {
$template_file=$spracheResponse->token;
} else if ($ui->st('d','get')=='ri' and !$ui->id('id',10,'get')) {

View File

@ -41,9 +41,10 @@ if ((!isset($main) or $main!=1) or (!isset($user_id) or (isset($user_id) and !$p
header('Location: userpanel.php');
die;
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('gserver',$user_language,$reseller_id);
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$loguserid=$user_id;
$logusername=getusername($user_id);
$logusertype="user";

View File

@ -38,13 +38,14 @@ if ((!isset($user_id) or $main!=1) or (isset($user_id) and !$pa['mysql'])) {
header('Location: userpanel.php');
die;
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('mysql',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
$logusertype="user";
$logreseller=0;
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
if (isset($admin_id)) {
$logsubuser=$admin_id;
} else if (isset($subuser_id)) {

View File

@ -34,7 +34,13 @@
* 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($user_id) or $main!=1) or (isset($user_id) and !$pa['restart']) or !$ui->id('id',10,'get')) redirect('userpanel.php');
if ((!isset($user_id) or $main!=1) or (isset($user_id) and !$pa['restart']) or !$ui->id('id',10,'get')) {
header('Location: userpanel.php');
die;
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('gserver',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
@ -48,8 +54,6 @@ if (isset($admin_id)) {
$logsubuser=0;
}
if (isset($admin_id) and $reseller_id!=0 and $admin_id!=$reseller_id) $reseller_id=$admin_id;
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$files=array();
$query=$sql->prepare("SELECT g.*,AES_DECRYPT(g.`ftppassword`,?) AS `dftppassword`,AES_DECRYPT(g.`ppassword`,?) AS `dpftppassword`,t.`protected` AS `tpallowed`,t.`shorten`,t.`protectedSaveCFGs`,t.`gamebinary`,t.`binarydir`,t.`modfolder`,u.`cname`,s.`servertemplate` FROM `gsswitch` g INNER JOIN `serverlist` s ON g.`serverid`=s.`id` INNER JOIN `servertypes` t ON s.`servertype`=t.`id` INNER JOIN `userdata` u ON g.`userid`=u.`id` WHERE g.`id`=? AND g.`userid`=? AND s.`resellerid`=? LIMIT 1");
$query->execute(array($aeskey,$aeskey,$ui->id('id',10,'get'),$user_id,$reseller_id));

View File

@ -42,8 +42,9 @@ if (!isset($main) or $main!=1 or !isset($user_id) or !isset($user_language) or !
header('Location: userpanel.php');
die;
}
$aesfilecvar=getconfigcvars(EASYWIDIR.'/stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('user',$user_language,$reseller_id);
if ($ui->w('action',4,'post') and !token(true)) {
$template_file=$spracheResponse->token;

View File

@ -42,6 +42,9 @@ if ((!isset($main) or $main!=1) or (!isset($user_id) or (isset($user_id) and !$p
header('Location: userpanel.php');
die('No acces');
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
@ -51,8 +54,6 @@ $logsubuser=0;
if (isset($admin_id)) $logsubuser=$admin_id;
else if (isset($subuser_id)) $logsubuser=$subuser_id;
if (isset($admin_id) and $reseller_id!=0) $reseller_id=$admin_id;
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
if ($ui->w('action',4,'post') and !token(true)) {
$template_file=$spracheResponse->token;
} else if ($ui->st('d','get')=='ri'and $ui->id('id',10,'get') and (!isset($_SESSION['sID']) or in_array($ui->id('id',10,'get'),$substituteAccess['vs']))) {

View File

@ -51,9 +51,8 @@ if (isset($admin_id)) {
} else {
$logsubuser=0;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR."/stuff/class_voice.php");
include(EASYWIDIR . '/stuff/keyphrasefile.php');
include(EASYWIDIR . '/stuff/class_voice.php');
if ($ui->st('d','get')=='bu' and $ui->id('id',10,'get') and (!isset($_SESSION['sID']) or in_array($ui->id('id',10,'get'),$substituteAccess['vo']))) {
$id=$ui->id('id',10,'get');
$query=$sql->prepare("SELECT v.`id`,v.`ip`,v.`port`,v.`dns`,v.`localserverid`,m.`type`,m.`queryport`,AES_DECRYPT(m.`querypassword`,:aeskey) AS `decryptedquerypassword`,m.`rootid`,m.`addedby`,m.`ssh2ip`,m.`type`,m.`usedns`,m.`publickey`,m.`ssh2ip`,AES_DECRYPT(m.`ssh2port`,:aeskey) AS `decryptedssh2port`,AES_DECRYPT(m.`ssh2user`,:aeskey) AS `decryptedssh2user`,AES_DECRYPT(m.`ssh2password`,:aeskey) AS `decryptedssh2password`,m.`serverdir`,m.`keyname`,m.`notified` FROM `voice_server` v LEFT JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`active`='Y' AND m.`active`='Y' AND v.`backup`='Y' AND v.`id`=:server_id AND v.`userid`=:user_id AND v.`resellerid`=:reseller_id LIMIT 1");

View File

@ -48,7 +48,7 @@ if (isset($admin_id)) {
} else {
$logsubuser=0;
}
include(EASYWIDIR."/stuff/class_voice.php");
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']))) {
@ -101,8 +101,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
if (count($error)>0) {
$template_file='Error: '.implode('<br />',$error);
} else {
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$query=$sql->prepare("SELECT *,AES_DECRYPT(`ssh2port`,:aeskey) AS `decryptedssh2port`,AES_DECRYPT(`ssh2user`,:aeskey) AS `decryptedssh2user`,AES_DECRYPT(`ssh2password`,:aeskey) AS `decryptedssh2password` FROM `voice_tsdns` WHERE `active`='Y' AND `id`=:id AND `resellerid`=:reseller_id LIMIT 1");
$query->execute(array(':aeskey'=>$aeskey,':id'=>$tsdnsID,':reseller_id'=>$reseller_id));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {

View File

@ -36,8 +36,13 @@
*/
if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['voiceserver'])) {
redirect('admin.php');
header('Location: admin.php');
die;
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
include(EASYWIDIR . '/stuff/class_voice.php');
$sprache=getlanguagefile('voice',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
@ -52,9 +57,6 @@ if ($reseller_id==0) {
if ($reseller_id!=0 and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR."/stuff/class_voice.php");
if ($ui->st('d','get')=='ad' and is_numeric($licenceDetails['lVo']) and $licenceDetails['lVo']>0 and $licenceDetails['left']>0 and !is_numeric($licenceDetails['left'])) {
$template_file=$gsprache->licence;
} else if ($ui->w('action',4,'post') and !token(true)) {

View File

@ -843,7 +843,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
// https://github.com/easy-wi/developer/issues/36 managedServer,managedForID added
$query=$sql->prepare("SELECT m.*,COUNT(s.`id`) AS `installedserver`,SUM(s.`slots`) AS `installedslots`,SUM(s.`usedslots`) AS `uslots` FROM `voice_masterserver` m LEFT JOIN `voice_server` s ON m.`id`=s.`masterserver` WHERE (m.`resellerid`=? OR m.`managedForID`=?) GROUP BY m.`id` ORDER BY $orderby LIMIT $start,$amount");
$query2=$sql->prepare("SELECT `ip` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
$query3=$sql->prepare("SELECT `id`,`active`,`uptime`,CONCAT(`ip`,':',`port`) AS `address` FROM `voice_server` WHERE `masterserver`=? AND `resellerid`=?");
$query3=$sql->prepare("SELECT `id`,`active`,`uptime`,`queryName`,CONCAT(`ip`,':',`port`) AS `address` FROM `voice_server` WHERE `masterserver`=? AND `resellerid`=?");
$query->execute(array($reseller_id,$admin_id));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$id=$row['id'];
@ -870,11 +870,11 @@ if ($ui->w('action',4,'post') and !token(true)) {
$uslots=($row['uslots']==null) ? 0 : $row['uslots'];
$vs=array();
$query3->execute(array($id,$row['resellerid']));
foreach ($query3->fetchAll(PDO::FETCH_ASSOC) as $row2) {
if ($row2['active']=='N' or $row2['uptime']==1) $vsStatus=2;
else if ($row2['active']=='Y' and $row2['uptime']<1) $vsStatus=3;
foreach ($query3->fetchAll(PDO::FETCH_ASSOC) as $row3) {
if ($row3['active']=='N' or $row3['uptime']==1) $vsStatus=2;
else if ($row3['active']=='Y' and $row3['uptime']<1) $vsStatus=3;
else $vsStatus=1;
$vs[]=array('id'=>$row2['id'],'address'=>$row2['address'],'name'=>$row2['queryName'],'status'=>$vsStatus);
$vs[]=array('id'=>$row3['id'],'address'=>$row3['address'],'name'=>$row3['queryName'],'status'=>$vsStatus);
}
$table[]=array('id'=>$id,'active'=>$row['active'],'managedServer'=>$row['managedServer'],'img'=>$imgName,'alt'=>$imgAlt,'ip'=>$ip,'type'=>$type,'defaultdns'=>$defaultdns,'installedserver'=>$row['installedserver']."/".$row['maxserver'],'installedslots'=>$uslots."/".$installedslots."/".$row['maxslots'],'server'=>$vs);
}

View File

@ -37,7 +37,13 @@
* 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'])) redirect('admin.php');
if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['voiceserver'])) {
header('Location: admin.php');
die;
}
include(EASYWIDIR . '/stuff/keyphrasefile.php');
include(EASYWIDIR . '/stuff/class_voice.php');
$sprache=getlanguagefile('voice',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
@ -56,9 +62,6 @@ if ($reseller_id==0) {
if ($reseller_id!=0 and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
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')=='ad' or $ui->st('d','get')=='md') {

View File

@ -37,7 +37,13 @@
* 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'])) redirect('admin.php');
if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['voiceserver'])) {
header('Location: admin.php');
die;
}
include(EASYWIDIR . '/stuff/class_voice.php');
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$sprache=getlanguagefile('voice',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
@ -50,9 +56,6 @@ if ($reseller_id==0) {
$logreseller=0;
}
if ($reseller_id!=0 and $admin_id!=$reseller_id) $reseller_id=$admin_id;
include(EASYWIDIR."/stuff/class_voice.php");
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
if ($ui->w('action',4,'post') and !token(true)) {
$template_file=$spracheResponse->token;
} else if ($ui->st('d','get')=='ad' or $ui->st('d','get')=='md') {

View File

@ -36,10 +36,10 @@
*/
define('EASYWIDIR', dirname(__FILE__));
include(EASYWIDIR."/stuff/functions.php");
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR."/stuff/settings.php");
include(EASYWIDIR . '/stuff/settings.php');
$pa=User_Permissions($admin_id);
if ((isset($admin_id) and !$pa['user'] and !$pa['gserver'] and !$pa['root']) or !isset($admin_id)) {
die('No access');

View File

@ -89,16 +89,16 @@
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseOne">Dashboard</a>
</div>
<div id="collapseOne" class="accordion-body collapse <?php if(in_array($w,array('da','ho','ib','lo','ml','ip'))) echo 'in';?>">
<div id="collapseOne" class="accordion-body collapse <?php if(in_array($ui->smallletters('w',255,'get'),array('da','ho','ib','lo','ml','ip'))) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<li <?php if($w=='da' or $w=='ho') echo 'class="active"';?>><a href="admin.php?w=da">Dashboard</a></li>
<?php if($pa['ipBans']) { ?><li <?php if($w=='ib') echo 'class="active"';?>><a href="admin.php?w=ib">IP Bans</a></li><?php } ?>
<li <?php if($ui->smallletters('w',255,'get')=='da' or $ui->smallletters('w',255,'get')=='ho') echo 'class="active"';?>><a href="admin.php?w=da">Dashboard</a></li>
<?php if($pa['ipBans']) { ?><li <?php if($ui->smallletters('w',255,'get')=='ib') echo 'class="active"';?>><a href="admin.php?w=ib">IP Bans</a></li><?php } ?>
<?php if($pa['log']) { ?>
<li <?php if($w=='lo') echo 'class="active"';?>><a href="admin.php?w=lo"><?php echo $gsprache->logs;?></a></li>
<li <?php if($w=='ml') echo 'class="active"';?>><a href="admin.php?w=ml">Mail <?php echo $gsprache->logs;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='lo') echo 'class="active"';?>><a href="admin.php?w=lo"><?php echo $gsprache->logs;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='ml') echo 'class="active"';?>><a href="admin.php?w=ml">Mail <?php echo $gsprache->logs;?></a></li>
<?php } ?>
<li <?php if($w=='ip') echo 'class="active"';?>><a href="admin.php?w=ip"><?php echo $gsprache->imprint;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='ip') echo 'class="active"';?>><a href="admin.php?w=ip"><?php echo $gsprache->imprint;?></a></li>
</ul>
</div>
</div>
@ -112,19 +112,20 @@
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseSettings">Easy-WI <?php echo $gsprache->settings;?></a>
</div>
<div id="collapseSettings" class="accordion-body collapse <?php if(in_array($w,array('se','sm','vc','cc','bu'))) echo 'in';?>">
<div id="collapseSettings" class="accordion-body collapse <?php if(in_array($ui->smallletters('w',255,'get'),array('se','sm','vc','cc','bu','mo'))) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<?php if($pa['settings']) { ?>
<li <?php if($w=='se') echo 'class="active"';?>><a href="admin.php?w=se"><?php echo $gsprache->settings;?></a></li>
<li <?php if($w=='sm') echo 'class="active"';?>><a href="admin.php?w=sm">E-Mail <?php echo $gsprache->settings;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='se') echo 'class="active"';?>><a href="admin.php?w=se"><?php echo $gsprache->settings;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='sm') echo 'class="active"';?>><a href="admin.php?w=sm">E-Mail <?php echo $gsprache->settings;?></a></li>
<?php } ?>
<li <?php if($w=='vc') echo 'class="active"';?>><a href="admin.php?w=vc"><?php echo $gsprache->versioncheck;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='vc') echo 'class="active"';?>><a href="admin.php?w=vc"><?php echo $gsprache->versioncheck;?></a></li>
<?php if($pa['root'] and $reseller_id==0) { ?>
<li <?php if($w=='cc') echo 'class="active"';?>><a href="admin.php?w=cc"><?php echo $gsprache->columns;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='cc') echo 'class="active"';?>><a href="admin.php?w=cc"><?php echo $gsprache->columns;?></a></li>
<?php } ?>
<?php if($pa['root'] and $reseller_id==0) { ?>
<li <?php if($w=='bu') echo 'class="active"';?>><a href="admin.php?w=bu"><?php echo $gsprache->databases;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='mo') echo 'class="active"';?>><a href="admin.php?w=mo"><?php echo $gsprache->modules;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='bu') echo 'class="active"';?>><a href="admin.php?w=bu"><?php echo $gsprache->databases;?></a></li>
<?php } ?>
</ul>
</div>
@ -135,14 +136,14 @@
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseTwo"><?php echo $gsprache->jobs.'/'.$gsprache->api;?></a>
</div>
<div id="collapseTwo" class="accordion-body collapse <?php if(in_array($w,array('ap','aa','jb','ui'))) echo 'in';?>">
<div id="collapseTwo" class="accordion-body collapse <?php if(in_array($ui->smallletters('w',255,'get'),array('ap','aa','jb','ui'))) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<?php if($pa['jobs']) { ?><li <?php if($w=='jb') echo 'class="active"';?>><a href="admin.php?w=jb"><?php echo $gsprache->jobs.' '.$gsprache->overview;?></a></li><?php } ?>
<?php if($pa['jobs']) { ?><li <?php if($ui->smallletters('w',255,'get')=='jb') echo 'class="active"';?>><a href="admin.php?w=jb"><?php echo $gsprache->jobs.' '.$gsprache->overview;?></a></li><?php } ?>
<?php if($pa['apiSettings']) { ?>
<li <?php if($w=='ap') echo 'class="active"';?>><a href="admin.php?w=ap"><?php echo $gsprache->api.' '.$gsprache->settings;?></a></li>
<li <?php if($w=='aa') echo 'class="active"';?>><a href="admin.php?w=aa"><?php echo $gsprache->apiAuth;?></a></li>
<li <?php if($w=='ui') echo 'class="active"';?>><a href="admin.php?w=ui"><?php echo $gsprache->userImport;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='ap') echo 'class="active"';?>><a href="admin.php?w=ap"><?php echo $gsprache->api.' '.$gsprache->settings;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='aa') echo 'class="active"';?>><a href="admin.php?w=aa"><?php echo $gsprache->apiAuth;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='ui') echo 'class="active"';?>><a href="admin.php?w=ui"><?php echo $gsprache->userImport;?></a></li>
<?php }?>
</ul>
</div>
@ -154,12 +155,12 @@
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseThree"><?php echo $gsprache->feeds;?></a>
</div>
<div id="collapseThree" class="accordion-body collapse <?php if(in_array($w,array('fe','fn'))) echo 'in';?>">
<div id="collapseThree" class="accordion-body collapse <?php if(in_array($ui->smallletters('w',255,'get'),array('fe','fn'))) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<li <?php if($w=='fn') echo 'class="active"';?>><a href="admin.php?w=fn"><?php echo $gsprache->feeds.' '.$gsprache->news;?></a></li>
<li <?php if($w=='fe' and !in_array($d,array('ad','se'))) echo 'class="active"';?>><a href="admin.php?w=fe"><?php echo $gsprache->feeds;?></a></li>
<li <?php if($w=='fe' and $d=='se') echo 'class="active"';?>><a href="admin.php?w=fe&amp;d=se"><?php echo $gsprache->settings;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='fn') echo 'class="active"';?>><a href="admin.php?w=fn"><?php echo $gsprache->feeds.' '.$gsprache->news;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='fe' and !in_array($d,array('ad','se'))) echo 'class="active"';?>><a href="admin.php?w=fe"><?php echo $gsprache->feeds;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='fe' and $d=='se') echo 'class="active"';?>><a href="admin.php?w=fe&amp;d=se"><?php echo $gsprache->settings;?></a></li>
</ul>
</div>
</div>
@ -170,53 +171,55 @@
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseFour">CMS</a>
</div>
<div id="collapseFour" class="accordion-body collapse <?php if(in_array($w,array('pn','pp','ps','pc','pd'))) echo 'in';?>">
<div id="collapseFour" class="accordion-body collapse <?php if(in_array($ui->smallletters('w',255,'get'),array('pn','pp','ps','pc','pd')) or isset($customModules['pa'][$ui->smallletters('w',255,'get')])) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<?php if($pa['cms_news']) { ?>
<li <?php if($w=='pn') echo 'class="active"';?>><a href="admin.php?w=pn"><?php echo $gsprache->news;?></a></li>
<li <?php if($w=='pc') echo 'class="active"';?>><a href="admin.php?w=pc"><?php echo $gsprache->comments;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='pn') echo 'class="active"';?>><a href="admin.php?w=pn"><?php echo $gsprache->news;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='pc') echo 'class="active"';?>><a href="admin.php?w=pc"><?php echo $gsprache->comments;?></a></li>
<?php } ?>
<?php if($pa['cms_pages']) { ?>
<li <?php if($w=='pp') echo 'class="active"';?>><a href="admin.php?w=pp"><?php echo $gsprache->pages;?></a></li>
<li <?php if($w=='pd') echo 'class="active"';?>><a href="admin.php?w=pd"><?php echo $gsprache->downloads;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='pp') echo 'class="active"';?>><a href="admin.php?w=pp"><?php echo $gsprache->pages;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='pd') echo 'class="active"';?>><a href="admin.php?w=pd"><?php echo $gsprache->downloads;?></a></li>
<?php } ?>
<?php if($pa['cms_settings']) { ?>
<li <?php if($w=='ps') echo 'class="active"';?>><a href="admin.php?w=ps"><?php echo $gsprache->settings;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='ps') echo 'class="active"';?>><a href="admin.php?w=ps"><?php echo $gsprache->settings;?></a></li>
<?php } ?>
<?php foreach ($customModules['pa'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if(($pa['mysql_settings'] or $pa['mysql'])) { ?>
<?php if($easywiModules['my'] and ($pa['mysql_settings'] or $pa['mysql'])) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseFive">MYSQL</a>
</div>
<div id="collapseFive" class="accordion-body collapse <?php if($w=='my') echo 'in';?>">
<div id="collapseFive" class="accordion-body collapse <?php if($ui->smallletters('w',255,'get')=='my' or isset($customModules['my'][$ui->smallletters('w',255,'get')])) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<?php if($pa['mysql']) { ?>
<li <?php if($w=='my' and !in_array($d,array('ms','as','ds'))) echo 'class="active"';?>><a href="admin.php?w=my"><?php echo $gsprache->databases;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='my' and !in_array($d,array('ms','as','ds'))) echo 'class="active"';?>><a href="admin.php?w=my"><?php echo $gsprache->databases;?></a></li>
<?php } ?>
<?php if($pa['mysql_settings']) { ?>
<li <?php if($w=='my' and in_array($d,array('ms','as','ds'))) echo 'class="active"';?>><a href="admin.php?w=my&amp;d=ms">Server</a></li>
<li <?php if($ui->smallletters('w',255,'get')=='my' and in_array($d,array('ms','as','ds'))) echo 'class="active"';?>><a href="admin.php?w=my&amp;d=ms">Server</a></li>
<?php } ?>
<?php foreach ($customModules['my'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if($pa['usertickets'] and $reseller_id!=0) { ?>
<?php if($easywiModules['ti'] and $pa['usertickets'] and $reseller_id!=0) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseSix"><?php echo $gsprache->support;?></a>
</div>
<div id="collapseSix" class="accordion-body collapse <?php if($w=='my') echo 'in';?>">
<div id="collapseSix" class="accordion-body collapse <?php if($ui->smallletters('w',255,'get')=='my') echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<li <?php if($w=='tr') echo 'class="active"';?>><a href="admin.php?w=tr"><?php echo $gsprache->overview;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='tr') echo 'class="active"';?>><a href="admin.php?w=tr"><?php echo $gsprache->overview;?></a></li>
</ul>
</div>
</div>
@ -227,144 +230,163 @@
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseSeven"><?php echo $gsprache->user;?></a>
</div>
<div id="collapseSeven" class="accordion-body collapse <?php if(in_array($w,array('us','ug'))) echo 'in';?>">
<div id="collapseSeven" class="accordion-body collapse <?php if(in_array($ui->smallletters('w',255,'get'),array('us','ug')) or isset($customModules['us'][$ui->smallletters('w',255,'get')])) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<?php if($pa['user'] or $pa['user_users']) { ?>
<li <?php if($w=='us') echo 'class="active"';?>><a href="admin.php?w=us&amp;d=md"><?php echo $gsprache->overview;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='us') echo 'class="active"';?>><a href="admin.php?w=us&amp;d=md"><?php echo $gsprache->overview;?></a></li>
<?php } ?>
<?php if($pa['userGroups']) { ?>
<li <?php if($w=='ug') echo 'class="active"';?>><a href="admin.php?w=ug"><?php echo $gsprache->groups;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='ug') echo 'class="active"';?>><a href="admin.php?w=ug"><?php echo $gsprache->groups;?></a></li>
<?php } ?>
<?php foreach ($customModules['us'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if($pa['roots'] or $pa['masterServer']) { ?>
<?php if($easywiModules['gs'] and ($pa['roots'] or $pa['masterServer'])) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseEight"><?php echo $gsprache->gameroot;?></a>
</div>
<div id="collapseEight" class="accordion-body collapse <?php if(in_array($w,array('ro','ma'))) echo 'in';?>">
<div id="collapseEight" class="accordion-body collapse <?php if(in_array($ui->smallletters('w',255,'get'),array('ro','ma'))) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<li <?php if($w=='ro') echo 'class="active"';?>><a href="admin.php?w=ro&amp;d=md"><?php echo $gsprache->overview;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='ro') echo 'class="active"';?>><a href="admin.php?w=ro&amp;d=md"><?php echo $gsprache->overview;?></a></li>
<?php if($pa['masterServer']) { ?>
<li <?php if($w=='ma' and $d!='ud') echo 'class="active"';?>><a href="admin.php?w=ma&amp;d=md"><?php echo $gsprache->master.' '.$gsprache->overview;?></a></li>
<li <?php if($w=='ma' and $d=='ud') echo 'class="active"';?>><a href="admin.php?w=ma&amp;d=ud"><?php echo $gsprache->master.' '.$gsprache->update;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='ma' and $d!='ud') echo 'class="active"';?>><a href="admin.php?w=ma&amp;d=md"><?php echo $gsprache->master.' '.$gsprache->overview;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='ma' and $d=='ud') echo 'class="active"';?>><a href="admin.php?w=ma&amp;d=ud"><?php echo $gsprache->master.' '.$gsprache->update;?></a></li>
<?php } ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if(($pa['gserver'] or $pa['addons'] or $pa['gimages'] or $pa['eac']) and $gserver_module) { ?>
<?php if($easywiModules['gs'] and ($pa['gserver'] or $pa['addons'] or $pa['gimages'] or $pa['eac']) and $gserver_module) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseNine"><?php echo $gsprache->gameserver;?></a>
</div>
<div id="collapseNine" class="accordion-body collapse <?php if(in_array($w,array('gs','ea','im','ad'))) echo 'in';?>">
<div id="collapseNine" class="accordion-body collapse <?php if(in_array($ui->smallletters('w',255,'get'),array('gs','ea','im','ad')) or isset($customModules['gs'][$ui->smallletters('w',255,'get')])) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<?php if($pa['gserver']) { ?>
<li <?php if($w=='gs') echo 'class="active"';?>><a href="admin.php?w=gs&amp;d=md"><?php echo $gsprache->overview;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='gs') echo 'class="active"';?>><a href="admin.php?w=gs&amp;d=md"><?php echo $gsprache->overview;?></a></li>
<?php } ?>
<?php if($pa['eac']) { ?>
<li <?php if($w=='ea') echo 'class="active"';?>><a href="admin.php?w=ea">Easy Anti Cheat</a></li>
<?php if($easywiModules['ea'] and $pa['eac']) { ?>
<li <?php if($ui->smallletters('w',255,'get')=='ea') echo 'class="active"';?>><a href="admin.php?w=ea">Easy Anti Cheat</a></li>
<?php } ?>
<?php if($pa['gimages']) { ?>
<li <?php if($w=='im') echo 'class="active"';?>><a href="admin.php?w=im&amp;d=md"><?php echo $gsprache->template;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='im') echo 'class="active"';?>><a href="admin.php?w=im&amp;d=md"><?php echo $gsprache->template;?></a></li>
<?php } ?>
<?php if($pa['addons']) { ?>
<li <?php if($w=='ad') echo 'class="active"';?>><a href="admin.php?w=ad"><?php echo $gsprache->addon;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='ad') echo 'class="active"';?>><a href="admin.php?w=ad"><?php echo $gsprache->addon;?></a></li>
<?php } ?>
<?php foreach ($customModules['gs'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if($pa['voicemasterserver'] or $pa['voiceserver'] or $pa['voiceserverStats'] or $pa['voiceserverSettings']) { ?>
<?php if($easywiModules['vo'] and ($pa['voicemasterserver'] or $pa['voiceserver'] or $pa['voiceserverStats'] or $pa['voiceserverSettings'])) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseTen"><?php echo $gsprache->voiceserver;?></a>
</div>
<div id="collapseTen" class="accordion-body collapse <?php if(in_array($w,array('vo','vu','vd','vm','vr'))) echo 'in';?>">
<div id="collapseTen" class="accordion-body collapse <?php if(in_array($ui->smallletters('w',255,'get'),array('vo','vu','vd','vm','vr')) or isset($customModules['vo'][$ui->smallletters('w',255,'get')])) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<?php if($pa['voiceserver']) { ?>
<li <?php if($w=='vo') echo 'class="active"';?>><a href="admin.php?w=vo"><?php echo $gsprache->overview;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='vo') echo 'class="active"';?>><a href="admin.php?w=vo"><?php echo $gsprache->overview;?></a></li>
<?php } ?>
<?php if($pa['voicemasterserver']) { ?>
<li <?php if($w=='vm') echo 'class="active"';?>><a href="admin.php?w=vm"><?php echo $gsprache->master;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='vm') echo 'class="active"';?>><a href="admin.php?w=vm"><?php echo $gsprache->master;?></a></li>
<?php } ?>
<?php if($pa['voiceserver']) { ?>
<li <?php if($w=='vr') echo 'class="active"';?>><a href="admin.php?w=vr">TSDNS <?php echo $gsprache->overview;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='vr') echo 'class="active"';?>><a href="admin.php?w=vr">TSDNS <?php echo $gsprache->overview;?></a></li>
<?php } ?>
<?php if($pa['voicemasterserver']) { ?>
<li <?php if($w=='vd') echo 'class="active"';?>><a href="admin.php?w=vd">TSDNS <?php echo $gsprache->master;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='vd') echo 'class="active"';?>><a href="admin.php?w=vd">TSDNS <?php echo $gsprache->master;?></a></li>
<?php } ?>
<?php if($pa['voiceserverStats']) { ?>
<li <?php if($w=='vu' and $d!='se') echo 'class="active"';?>><a href="admin.php?w=vu&amp;d=md"><?php echo $gsprache->stats;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='vu' and $d!='se') echo 'class="active"';?>><a href="admin.php?w=vu&amp;d=md"><?php echo $gsprache->stats;?></a></li>
<?php } ?>
<?php if($pa['voiceserverSettings']) { ?>
<li <?php if($w=='vu' and $d=='se') echo 'class="active"';?>><a href="admin.php?w=vu&amp;d=se"><?php echo $gsprache->settings;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='vu' and $d=='se') echo 'class="active"';?>><a href="admin.php?w=vu&amp;d=se"><?php echo $gsprache->settings;?></a></li>
<?php } ?>
<?php foreach ($customModules['vo'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if($gserver_module and ($pa['lendserver'] or $pa['lendserverSettings'])) { ?>
<?php if($easywiModules['le'] and ($gserver_module and ($pa['lendserver'] or $pa['lendserverSettings']))) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseEleven"><?php echo $gsprache->lendserver;?></a>
</div>
<div id="collapseEleven" class="accordion-body collapse <?php if($w=='le') echo 'in';?>">
<div id="collapseEleven" class="accordion-body collapse <?php if($ui->smallletters('w',255,'get')=='le') echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<?php if($pa['lendserver']) { ?>
<li <?php if($w=='le' and $d!='se') echo 'class="active"';?>><a href="admin.php?w=le"><?php echo $gsprache->overview;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='le' and $d!='se') echo 'class="active"';?>><a href="admin.php?w=le"><?php echo $gsprache->overview;?></a></li>
<?php } ?>
<?php if($pa['lendserverSettings']) { ?>
<li <?php if($w=='le' and $d=='se') echo 'class="active"';?>><a href="admin.php?w=le&amp;d=se"><?php echo $gsprache->settings;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='le' and $d=='se') echo 'class="active"';?>><a href="admin.php?w=le&amp;d=se"><?php echo $gsprache->settings;?></a></li>
<?php } ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if($pa['tickets']) { ?>
<?php if($easywiModules['ti'] and $pa['tickets']) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseTwelve"><?php echo $gsprache->support;?></a>
</div>
<div id="collapseTwelve" class="accordion-body collapse <?php if($w=='ti') echo 'in';?>">
<div id="collapseTwelve" class="accordion-body collapse <?php if($ui->smallletters('w',255,'get')=='ti' or isset($customModules['ti'][$ui->smallletters('w',255,'get')])) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<li <?php if($w=='ti' and $d!='mt') echo 'class="active"';?>><a href="admin.php?w=ti"><?php echo $gsprache->overview;?></a></li>
<li <?php if($w=='ti' and $d=='mt') echo 'class="active"';?>><a href="admin.php?w=ti&amp;d=mt"><?php echo $gsprache->settings;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='ti' and $d!='mt') echo 'class="active"';?>><a href="admin.php?w=ti"><?php echo $gsprache->overview;?></a></li>
<li <?php if($ui->smallletters('w',255,'get')=='ti' and $d=='mt') echo 'class="active"';?>><a href="admin.php?w=ti&amp;d=mt"><?php echo $gsprache->settings;?></a></li>
<?php foreach ($customModules['ti'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if(rsellerpermisions($admin_id,$sql) and $vserver_module) { ?>
<?php if($easywiModules['ro'] and rsellerpermisions($admin_id,$sql) and $vserver_module) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseThirteen">Rootserver</a>
</div>
<div id="collapseThirteen" class="accordion-body collapse <?php if(in_array($w,array('vs','dp','vh','rd','rp','rh','ot','tf'))) echo 'in';?>">
<div id="collapseThirteen" class="accordion-body collapse <?php if(in_array($ui->smallletters('w',255,'get'),array('vs','dp','vh','rd','rp','rh','ot','tf')) or isset($customModules['ro'][$ui->smallletters('w',255,'get')])) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<?php if($pa['modvserver'] or $pa['delvserver'] or $pa['usevserver']) { ?><li <?php if($w=='vs') echo 'class="active"';?>><a href="admin.php?w=vs&amp;d=md"><?php echo $gsprache->virtual;?></a></li><?php } ?>
<?php if($pa['dedicatedServer']) { ?><li <?php if($w=='rh') echo 'class="active"';?>><a href="admin.php?w=rh"><?php echo $gsprache->dedicated;?></a></li><?php } ?>
<?php if($pa['traffic']) { ?><li <?php if($w=='tf' and $d!='se') echo 'class="active"';?>><a href="admin.php?w=tf"><?php echo $gsprache->traffic;?></a></li><?php } ?>
<?php if($pa['vserverhost'] and $reseller_id==0) { ?><li <?php if($w=='vh') echo 'class="active"';?>><a href="admin.php?w=vh&amp;d=md">ESX(I) Host</a></li><?php } ?>
<?php if($pa['dhcpServer'] and $reseller_id==0) { ?><li <?php if($w=='rd') echo 'class="active"';?>><a href="admin.php?w=rd">DHCP</a></li><?php } ?>
<?php if($pa['pxeServer'] and $reseller_id==0) { ?><li <?php if($w=='rp') echo 'class="active"';?>><a href="admin.php?w=rp">PXE</a></li><?php } ?>
<?php if($pa['resellertemplates'] and $reseller_id==0) { ?><li <?php if($w=='ot') echo 'class="active"';?>><a href="admin.php?w=ot"><?php echo $gsprache->template;?></a></li><?php } ?>
<?php if($reseller_id=='0' and $pa['trafficsettings']) { ?><li <?php if($w=='tf' and $d=='se') echo 'class="active"';?>><a href="admin.php?w=tf&amp;d=se"><?php echo $gsprache->traffic.' '.$gsprache->settings;?></a></li><?php } ?>
<?php if($pa['modvserver'] or $pa['delvserver'] or $pa['usevserver']) { ?><li <?php if($ui->smallletters('w',255,'get')=='vs') echo 'class="active"';?>><a href="admin.php?w=vs&amp;d=md"><?php echo $gsprache->virtual;?></a></li><?php } ?>
<?php if($pa['dedicatedServer']) { ?><li <?php if($ui->smallletters('w',255,'get')=='rh') echo 'class="active"';?>><a href="admin.php?w=rh"><?php echo $gsprache->dedicated;?></a></li><?php } ?>
<?php if($pa['traffic']) { ?><li <?php if($ui->smallletters('w',255,'get')=='tf' and $d!='se') echo 'class="active"';?>><a href="admin.php?w=tf"><?php echo $gsprache->traffic;?></a></li><?php } ?>
<?php if($pa['vserverhost'] and $reseller_id==0) { ?><li <?php if($ui->smallletters('w',255,'get')=='vh') echo 'class="active"';?>><a href="admin.php?w=vh&amp;d=md">ESX(I) Host</a></li><?php } ?>
<?php if($pa['dhcpServer'] and $reseller_id==0) { ?><li <?php if($ui->smallletters('w',255,'get')=='rd') echo 'class="active"';?>><a href="admin.php?w=rd">DHCP</a></li><?php } ?>
<?php if($pa['pxeServer'] and $reseller_id==0) { ?><li <?php if($ui->smallletters('w',255,'get')=='rp') echo 'class="active"';?>><a href="admin.php?w=rp">PXE</a></li><?php } ?>
<?php if($pa['resellertemplates'] and $reseller_id==0) { ?><li <?php if($ui->smallletters('w',255,'get')=='ot') echo 'class="active"';?>><a href="admin.php?w=ot"><?php echo $gsprache->template;?></a></li><?php } ?>
<?php if($reseller_id=='0' and $pa['trafficsettings']) { ?><li <?php if($ui->smallletters('w',255,'get')=='tf' and $d=='se') echo 'class="active"';?>><a href="admin.php?w=tf&amp;d=se"><?php echo $gsprache->traffic.' '.$gsprache->settings;?></a></li><?php } ?>
<?php foreach ($customModules['ro'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if(count($customModules['mo'])>0) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseFourteen"><?php echo $gsprache->modules;?></a>
</div>
<div id="collapseFourteen" class="accordion-body collapse <?php if(isset($customModules['mo'][$ui->smallletters('w',255,'get')])) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<?php foreach ($customModules['mo'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>

View File

@ -0,0 +1,87 @@
<div class="row-fluid">
<div class="span12">
<ul class="breadcrumb">
<li><a href="admin.php">Home</a> <span class="divider">/</span></li>
<li><a href="admin.php?w=mo"><?php echo $gsprache->modules;?></a> <span class="divider">/</span></li>
<li><?php echo $gsprache->add;?></li>
</ul>
</div>
</div>
<?php if (count($errors)>0){ ?>
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Error(s)</h4>
<?php echo implode(', ',$errors);?>
</div>
<?php }?>
<div class="row-fluid">
<div class="span6">
<form class="form-horizontal" action="admin.php?w=mo&amp;d=ad&amp;r=mo" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">
<input type="hidden" name="token" value="<?php echo token();?>">
<input type="hidden" name="action" value="ad">
<div class="control-group<?php if(isset($errors['active'])) echo ' error';?>">
<label class="control-label" for="inputActive"><?php echo $sprache->active;?></label>
<div class="controls">
<select id="inputActive" name="active">
<option value="Y"><?php echo $gsprache->yes;?></option>
<option value="N" <?php if ($active=='N') echo 'selected="selected"'; ?>><?php echo $gsprache->no;?></option>
</select>
</div>
</div>
<div class="control-group<?php if(isset($errors['type'])) echo ' error';?>">
<label class="control-label" for="inputType"><?php echo $sprache->type;?></label>
<div class="controls">
<select id="inputType" name="type">
<option value="A"><?php echo $sprache->type_admin;?></option>
<!--<option value="P" <?php if ($type=='P') echo 'selected="selected"'; ?>><?php echo $sprache->type_cms;?></option>-->
<option value="U" <?php if ($type=='U') echo 'selected="selected"'; ?>><?php echo $sprache->type_user;?></option>
</select>
</div>
</div>
<div class="control-group<?php if(isset($errors['sub'])) echo ' error';?>">
<label class="control-label" for="inputSub"><?php echo $sprache->sub;?></label>
<div class="controls">
<select id="inputSub" name="sub">
<option value="mo"><?php echo $gsprache->modules;?></option>
<option value="gs" <?php if ($sub=='gs') echo 'selected="selected"'; ?>><?php echo $gsprache->gameserver;?></option>
<option value="vo" <?php if ($sub=='vo') echo 'selected="selected"'; ?>><?php echo $gsprache->voiceserver;?></option>
<option value="ro" <?php if ($sub=='ro') echo 'selected="selected"'; ?>>Rootserver</option>
<option value="my" <?php if ($sub=='my') echo 'selected="selected"'; ?>>MYSQL</option>
<option value="gs" <?php if ($sub=='us') echo 'selected="selected"'; ?>><?php echo $gsprache->user;?></option>
<option value="ti" <?php if ($sub=='ti') echo 'selected="selected"'; ?>><?php echo $gsprache->support;?></option>
<option value="pa" <?php if ($sub=='pa') echo 'selected="selected"'; ?>>CMS</option>
</select>
</div>
</div>
<div class="control-group<?php if(isset($errors['file'])) echo ' error';?>">
<label class="control-label" for="inputFile"><?php echo $sprache->file;?></label>
<div class="controls">
<input id=inputFile type="text" name="file" value="<?php echo $file;?>">
</div>
</div>
<div class="control-group<?php if(isset($errors['get'])) echo ' error';?>">
<label class="control-label" for="inputGet"><?php echo $sprache->get;?></label>
<div class="controls">
<input id=inputGet type="text" name="get" value="<?php echo $get;?>">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputDescription"><?php echo $sprache->description;?></label>
<div class="controls"><?php foreach ($langAvailable as $lg) echo '<label class="checkbox inline"><input type="checkbox" checked="checked" name="lang[]" value="'.$lg.'" onclick="textdrop('."'".$lg."'".');"><img src="images/flags/'.$lg.'.png" alt="Flag: '.$lg.'.png"/></label>';?></div>
</div>
<?php foreach ($langAvailable as $lg) { ?>
<div id="<?php echo $lg;?>" class="control-group <?php echo $array['display'];?>">
<label class="control-label" for="inputLangs-<?php echo $lg;?>"><img src="images/flags/<?php echo $lg;?>.png" alt="Flag: 16_<?php echo $lg;?>'.png"/></label>
<div class="controls"><input id="inputLangs-<?php echo $lg;?>" type="text" name="translation[<?php echo $lg;?>]" value="<?php echo $ui->description('translation', 'post', $lg);?>"></div>
</div>
<?php } ?>
<div class="control-group">
<label class="control-label" for="inputEdit"></label>
<div class="controls">
<button class="btn btn-primary pull-right" id="inputEdit" type="submit"><i class="icon-plus-sign icon-white"></i></button>
</div>
</div>
</form>
</div>
</div>

View File

@ -0,0 +1,32 @@
<div class="row-fluid">
<div class="span12">
<ul class="breadcrumb">
<li><a href="admin.php">Home</a> <span class="divider">/</span></li>
<li><a href="admin.php?w=mo"><?php echo $gsprache->modules;?></a> <span class="divider">/</span></li>
<li><?php echo $gsprache->del;?> <span class="divider">/</span></li>
<li class="active"><?php echo $moduleFile;?></li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<dl class="dl-horizontal">
<dt><?php echo $sprache->file;?></dt>
<dd><?php echo $moduleFile;?></dd>
</dl>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<form class="form-horizontal" action="admin.php?w=mo&amp;d=dl&amp;id=<?php echo $id;?>&amp;r=mo" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">
<input type="hidden" name="token" value="<?php echo token();?>">
<input type="hidden" name="action" value="dl">
<div class="control-group">
<label class="control-label" for="inputEdit"></label>
<div class="controls">
<button class="btn btn-danger pull-right" id="inputEdit" type="submit"><i class="icon-remove-sign icon-white"></i></button>
</div>
</div>
</form>
</div>
</div>

View File

@ -0,0 +1,38 @@
<div class="row-fluid">
<div class="span12">
<ul class="breadcrumb">
<li><a href="userpanel.php">Home</a> <span class="divider">/</span></li>
<li class="active"><?php echo $gsprache->modules;?></li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<?php echo $gsprache->modules;?> <a href="admin.php?w=mo&amp;d=ad"<span class="btn btn-primary btn-mini"><i class="icon-white icon-plus-sign"></i></span></a>
</div>
</div>
<hr>
<div class="row-fluid">
<div class="span11">
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th><?php echo $sprache->name;?></th>
<th><?php echo $sprache->type;?></th>
<th><?php echo $gsprache->del;?></a></th>
<th><?php echo $gsprache->mod;?></a></th>
</tr>
</thead>
<tbody>
<?php foreach ($table as $table_row) { ?>
<tr class="<?php if($table_row['active']=='Y') echo 'success'; else echo 'error';?>">
<td><?php echo $table_row['name'];?></td>
<td><?php echo $table_row['type'];?></td>
<td><?php if($table_row['id']>1000) { ?><a href="admin.php?w=mo&amp;d=dl&amp;id=<?php echo $table_row['id'];?>" ><span class="btn btn-mini btn-danger"><i class="icon-white icon-remove-sign"></i></span></a><?php } ?></td>
<td><a href="admin.php?w=mo&amp;d=md&amp;id=<?php echo $table_row['id'];?>" ><span class="btn btn-mini btn-primary"><i class="icon-white icon-edit"></i></span></a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>

View File

@ -0,0 +1,94 @@
<div class="row-fluid">
<div class="span12">
<ul class="breadcrumb">
<li><a href="admin.php">Home</a> <span class="divider">/</span></li>
<li><a href="admin.php?w=mo"><?php echo $gsprache->modules;?></a> <span class="divider">/</span></li>
<li><?php echo $gsprache->mod;?> <span class="divider">/</span></li>
<li class="active"><?php echo $name;?></li>
</ul>
</div>
</div>
<?php if (count($errors)>0){ ?>
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Error(s)</h4>
<?php echo implode(', ',$errors);?>
</div>
<?php }?>
<div class="row-fluid">
<div class="span6">
<form class="form-horizontal" action="admin.php?w=mo&amp;d=md&amp;id=<?php echo $id;?>&amp;r=mo" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">
<input type="hidden" name="token" value="<?php echo token();?>">
<input type="hidden" name="action" value="md">
<div class="control-group<?php if(isset($errors['active'])) echo ' error';?>">
<label class="control-label" for="inputActive"><?php echo $sprache->active;?></label>
<div class="controls">
<select id="inputActive" name="active">
<option value="Y"><?php echo $gsprache->yes;?></option>
<option value="N" <?php if ($active=='N') echo 'selected="selected"'; ?>><?php echo $gsprache->no;?></option>
</select>
</div>
</div>
<?php if($id>1000){ ?>
<div class="control-group<?php if(isset($errors['type'])) echo ' error';?>">
<label class="control-label" for="inputType"><?php echo $sprache->type;?></label>
<div class="controls">
<select id="inputType" name="type">
<option value="A"><?php echo $sprache->type_admin;?></option>
<!--<option value="P" <?php if ($type=='P') echo 'selected="selected"'; ?>><?php echo $sprache->type_cms;?></option>-->
<option value="U" <?php if ($type=='U') echo 'selected="selected"'; ?>><?php echo $sprache->type_user;?></option>
</select>
</div>
</div>
<div class="control-group<?php if(isset($errors['sub'])) echo ' error';?>">
<label class="control-label" for="inputSub"><?php echo $sprache->sub;?></label>
<div class="controls">
<select id="inputSub" name="sub">
<option value="mo"><?php echo $gsprache->modules;?></option>
<option value="gs" <?php if ($sub=='gs') echo 'selected="selected"'; ?>><?php echo $gsprache->gameserver;?></option>
<option value="vo" <?php if ($sub=='vo') echo 'selected="selected"'; ?>><?php echo $gsprache->voiceserver;?></option>
<option value="ro" <?php if ($sub=='ro') echo 'selected="selected"'; ?>>Rootserver</option>
<option value="my" <?php if ($sub=='my') echo 'selected="selected"'; ?>>MYSQL</option>
<option value="gs" <?php if ($sub=='us') echo 'selected="selected"'; ?>><?php echo $gsprache->user;?></option>
<option value="ti" <?php if ($sub=='ti') echo 'selected="selected"'; ?>><?php echo $gsprache->support;?></option>
<option value="pa" <?php if ($sub=='pa') echo 'selected="selected"'; ?>>CMS</option>
</select>
</div>
</div>
<div class="control-group<?php if(isset($errors['file'])) echo ' error';?>">
<label class="control-label" for="inputFile"><?php echo $sprache->file;?></label>
<div class="controls">
<input id=inputFile type="text" name="file" value="<?php echo $file;?>">
</div>
</div>
<div class="control-group<?php if(isset($errors['get'])) echo ' error';?>">
<label class="control-label" for="inputGet"><?php echo $sprache->get;?></label>
<div class="controls">
<input id=inputGet type="text" name="get" value="<?php echo $get;?>">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputDescription"><?php echo $sprache->description;?></label>
<div class="controls">
<?php foreach ($langAvailable as $lg) { ?>
<label class="checkbox inline"><input type="checkbox" name="lang[]" value="<?php echo $lg;?>" onclick="textdrop('<?php echo $lg;?>');" <?php if(isset($lg) and isset($languageTexts[$lg])) echo 'checked="checked"';?>><img src="images/flags/<?php echo $lg;?>.png" alt="Flag: <?php echo $lg;?>.png"/></label>
<?php } ?>
</div>
</div>
<?php foreach ($langAvailable as $lg) { ?>
<div id="<?php echo $lg;?>" class="control-group <?php echo $array['display'];?>">
<label class="control-label" for="inputLangs-<?php echo $lg;?>"><img src="images/flags/<?php echo $lg;?>.png" alt="Flag: 16_<?php echo $lg;?>'.png"/></label>
<div class="controls"><input type="text" id="inputLangs-<?php echo $lg;?>" name="translation[<?php echo $lg;?>]" value="<?php echo $languageTexts[$lg];?>"></div>
</div>
<?php } ?>
<?php } ?>
<div class="control-group">
<label class="control-label" for="inputEdit"></label>
<div class="controls">
<button class="btn btn-primary pull-right" id="inputEdit" type="submit"><i class="icon-edit icon-white"></i></button>
</div>
</div>
</form>
</div>
</div>

View File

@ -264,13 +264,13 @@
</div>
</div>
<div class="r display_none switch control-group">
<label class="control-label" for="inputMaxUserMHZ"><?php echo $sprache->max." ".$gsprache->mhz;?></label>
<label class="control-label" for="inputMaxUserMHZ"><?php echo $sprache->max." ".$rsprache->mhz;?></label>
<div class="controls">
<input id="inputMaxUserMHZ" type="number" name="maxusermhz" value="">
</div>
</div>
<div class="r display_none switch control-group">
<label class="control-label" for="inputMaxUserRam"><?php echo $sprache->max." ".$gsprache->ram;?></label>
<label class="control-label" for="inputMaxUserRam"><?php echo $sprache->max." ".$rsprache->ram;?></label>
<div class="controls">
<input id="inputMaxUserRam" type="number" name="maxuserram" value="">
</div>

View File

@ -213,13 +213,13 @@
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputMaxUserMHZ"><?php echo $sprache->max." ".$gsprache->mhz;?></label>
<label class="control-label" for="inputMaxUserMHZ"><?php echo $sprache->max." ".$rsprache->mhz;?></label>
<div class="controls">
<input id="inputMaxUserMHZ" type="number" name="maxusermhz" value="<?php echo $maxusermhz;?>">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputMaxUserRam"><?php echo $sprache->max." ".$gsprache->ram;?></label>
<label class="control-label" for="inputMaxUserRam"><?php echo $sprache->max." ".$rsprache->ram;?></label>
<div class="controls">
<input id="inputMaxUserRam" type="number" name="maxuserram" value="<?php echo $maxuserram;?>">
</div>

View File

@ -97,11 +97,12 @@
<?php if(!isset($_SESSION['sID'])){ ?><li <?php if($w=='su') echo 'class="active"';?>><a href="userpanel.php?w=su"><?php echo $gsprache->substitutes;?></a></li><?php }?>
<li <?php if($w=='lo') echo 'class="active"';?>><a href="userpanel.php?w=lo"><?php echo $gsprache->logs;?></a></li>
<li <?php if($w=='ip') echo 'class="active"';?>><a href="userpanel.php?w=ip"><?php echo $gsprache->imprint;?></a></li>
<?php foreach ($customModules['us'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php if($pa['usertickets']) { ?>
<?php if($easywiModules['ti'] and $pa['usertickets']) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseTwo"><?php echo $gsprache->support;?></a>
@ -111,12 +112,13 @@
<ul class="nav nav-pills nav-stacked">
<li <?php if($w=='ti' and $d!='ad') echo 'class="active"';?>><a href="userpanel.php?w=ti"><?php echo $gsprache->overview;?></a></li>
<li <?php if($w=='ti' and $d=='ad') echo 'class="active"';?>><a href="userpanel.php?w=ti&amp;d=ad"><?php echo $gsprache->support2;?></a></li>
<?php foreach ($customModules['ti'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if($gscount>0 and $pa['restart']) { ?>
<?php if($easywiModules['gs'] and $gscount>0 and $pa['restart']) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseThree"><?php echo $gsprache->gameserver;?></a>
@ -133,12 +135,13 @@
<?php if($pa['restart']) { ?>
<li <?php if($w=='ms') echo 'class="active"';?>><a href="userpanel.php?w=ms"><?php echo $gsprache->migration;?></a></li>
<?php } ?>
<?php foreach ($customModules['gs'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if(($voicecount>0 or $tsdnscount>0) and $pa['voiceserver']) { ?>
<?php if($easywiModules['vo'] and ($voicecount>0 or $tsdnscount>0) and $pa['voiceserver']) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseFour"><?php echo $gsprache->voiceserver;?></a>
@ -148,12 +151,13 @@
<ul class="nav nav-pills nav-stacked">
<?php if($voicecount>0) { ?><li <?php if($w=='vo') echo 'class="active"';?>><a href="userpanel.php?w=vo"><?php echo $gsprache->overview;?></a></li><?php } ?>
<?php if($tsdnscount>0) { ?><li <?php if($w=='vd') echo 'class="active"';?>><a href="userpanel.php?w=vd">TS3 DNS</a></li><?php } ?>
<?php foreach ($customModules['vo'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if($dbcount>0 and ($pa['mysql'] or $pa['mysql'])) { ?>
<?php if($easywiModules['my'] and $dbcount>0 and ($pa['mysql'] or $pa['mysql'])) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseFive">MYSQL</a>
@ -162,12 +166,13 @@
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<li <?php if($w=='my') echo 'class="active"';?>><a href="userpanel.php?w=my"><?php echo $gsprache->overview;?></a></li>
<?php foreach ($customModules['my'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if(($virtualcount+$rootcount)>0 and $pa['roots']) { ?>
<?php if($easywiModules['ro'] and ($virtualcount+$rootcount)>0 and $pa['roots']) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseSix">Rootserver</a>
@ -177,6 +182,21 @@
<ul class="nav nav-pills nav-stacked">
<?php if($rootcount>0) { ?><li <?php if($w=='de') echo 'class="active"';?>><a href="userpanel.php?w=de"><?php echo $gsprache->dedicated;?></a></li><?php } ?>
<?php if($virtualcount>0) { ?><li <?php if($w=='vm') echo 'class="active"';?>><a href="userpanel.php?w=vm"><?php echo $gsprache->virtual;?></a></li><?php } ?>
<?php foreach ($customModules['ro'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>
</div>
<?php } ?>
<?php if(count($customModules['mo'])>0) { ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseFourteen"><?php echo $gsprache->modules;?></a>
</div>
<div id="collapseFourteen" class="accordion-body collapse <?php if(isset($customModules['mo'][$ui->smallletters('w',255,'get')])) echo 'in';?>">
<div class="accordion-inner">
<ul class="nav nav-pills nav-stacked">
<?php foreach ($customModules['mo'] as $k => $v) { echo '<li '; echo ($ui->smallletters('w',255,'get')==$k) ? 'class="active"' : ''; echo '><a href="admin.php?w='.$k.'">'.$v.'</a></li>'; }; ?>
</ul>
</div>
</div>

View File

@ -58,12 +58,11 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
}
if (!isset($remoteip) or $_SERVER['SERVER_ADDR']==$remoteip) {
define('EASYWIDIR', dirname(__FILE__));
include('stuff/vorlage.php');
include('stuff/class_validator.php');
include("stuff/functions.php");
include("stuff/settings.php");
$aesfilecvar=getconfigcvars("stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/settings.php');
include(EASYWIDIR . '/stuff/keyphrasefile.php');
$query=$sql->prepare("SELECT `type`,`statip`,AES_DECRYPT(`dbname`,:aeskey) AS `decpteddbname`,AES_DECRYPT(`dbuser`,:aeskey) AS `decpteddbuser`,AES_DECRYPT(`dbpassword`,:aeskey) AS `decpteddbpassword`,`table_name`,`column_sourceip`,`column_destip`,`column_byte`,`column_date` FROM `traffic_settings` LIMIT 1");
$query->execute(array(':aeskey'=>$aeskey));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {

View File

@ -45,7 +45,7 @@ include(EASYWIDIR.'/stuff/settings.php');
include(EASYWIDIR . '/stuff/init_user.php');
include(EASYWIDIR . '/stuff/userpanel_home.php');
if (isset($what_to_be_included_array[$w])) {
include('stuff/'.$what_to_be_included_array[$w]);
include(EASYWIDIR . '/stuff/'.$what_to_be_included_array[$w]);
unset($dbConnect);
} else {
unset($dbConnect);