Ulrich Block 2013-09-07 11:31:00 +02:00
parent 6c0f4c599c
commit 247083bf3b
85 changed files with 298 additions and 287 deletions

View File

@ -63,7 +63,7 @@ if ($ui->st('w','get')=='ms' and $ui->username('shorten','50','get')) {
$query=$sql->prepare("SELECT `id` FROM `userdata` WHERE ((`resellerid`=? AND `accounttype`='a') OR (`id`=? AND `accounttype`='r')) AND `mail_gsupdate`='Y'");
$query->execute(array($row['resellerid'],$row['resellerid']));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row2) {
sendmail('emailgserverupdate',$row2['id'],$ip,$ui->username('shorten','50','get'),$sql);
sendmail('emailgserverupdate',$row2['id'],$ip,$ui->username('shorten','50','get'));
}
}
}
@ -76,7 +76,7 @@ if ($ui->st('w','get')=='ms' and $ui->username('shorten','50','get')) {
$query=$sql->prepare("SELECT `mail_backup` FROM `userdata` WHERE `mail_backup`='Y' AND `id`=? LIMIT 1");
$query->execute(array($row['userid']));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row2) {
sendmail('emailbackup',$row['userid'],$row['server'],'',$sql);
sendmail('emailbackup',$row['userid'],$row['server'],'');
}
}
echo 'ok';
@ -89,7 +89,7 @@ if ($ui->st('w','get')=='ms' and $ui->username('shorten','50','get')) {
$query=$sql->prepare("SELECT `mail_backup` FROM `userdata` WHERE `mail_backup`='Y' AND `id`=? LIMIT 1");
$query->execute(array($userid));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row2) {
sendmail('emailbackuprestore',$userid,$server,'',$sql);
sendmail('emailbackuprestore',$userid,$server,'');
}
}
echo 'ok';
@ -106,7 +106,7 @@ if ($ui->st('w','get')=='ms' and $ui->username('shorten','50','get')) {
$query->execute(array($userid));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row2) {
if ($row2['mail_vserver']=='Y') {
sendmail('emailvinstall',$userid,$ip,$pass,$sql);
sendmail('emailvinstall',$userid,$ip,$pass);
}
}
}

View File

@ -75,7 +75,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
include('stuff/mysql_functions.php');
$aesfilecvar=getconfigcvars("stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$gsprache=getlanguagefile('general','uk','0',$sql);
$gsprache=getlanguagefile('general','uk',0);
class runGraph {
private $jobsDone=0;
private $startTime=0;

View File

@ -51,8 +51,7 @@ if (isset($page_include)) {
$user_language=$query->fetchColumn();
if (!small_letters_check($user_language,2)) $user_language='en';
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
include(EASYWIDIR.'/stuff/keyphrasefile.php');
$validacces=false;
if ($ui->ip4('REMOTE_ADDR','server') and $ui->names('user',255,'post') and !isset($page_include)) {
$query=$sql->prepare("SELECT `active`,`pwd`,`salt`,`user`,i.`resellerID` FROM `api_ips` i LEFT JOIN `api_settings` s ON i.`resellerID`=s.`resellerID` WHERE `ip`=?");
@ -81,9 +80,9 @@ if ($ui->escaped('email','post')!='') {
$query=($query->rowCount()==0) ? $sql->prepare("INSERT INTO `badips` (`bantime`,`failcount`,`reason`,`badip`) VALUES (?,'1','bot',?)") : $sql->prepare("UPDATE `badips` SET `bantime`=?, `failcount`=failcount+1, `reason`='bot' WHERE `badip`=? LIMIT 1");
$query->execute(array($fullday,$loguserip));
}
$sprache=getlanguagefile('lendserver',$user_language,$reseller_id,$sql);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$vosprache=getlanguagefile('voice',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('lendserver',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
$vosprache=getlanguagefile('voice',$user_language,$reseller_id);
$licenceDetails=serverAmount($reseller_id);
if (is_numeric($licenceDetails['left']) and (0>$licenceDetails['left'] or 0>$licenceDetails['lG'] or 0>$licenceDetails['lVo'] or $licenceDetails['t']=='l')) {
header('HTTP/1.1 403 Forbidden');

View File

@ -121,7 +121,7 @@ if ($w=='lo') {
$webhostdomain=(isset($ui->server['HTTPS'])) ? "https://".$ui->server['HTTP_HOST'].$path : "http://".$ui->server['HTTP_HOST'].$path;
$link=$webhostdomain.'login.php?w=pr&gamestring='.$md5;
$htmllink='<a href="'.$link.'">'.$link.'</a>';
sendmail('emailpwrecovery',$userid,$htmllink,'',$sql);
sendmail('emailpwrecovery',$userid,$htmllink,'');
}
} else if ($ui->password('password1',255,'post') and $ui->password('password2',255,'post') and $ui->w('token',32,'get')) {
if ($ui->password('password1',255,'post')==$ui->password('password2',255,'post')) {
@ -189,7 +189,7 @@ if ($w=='lo') {
$webhostdomain=(isset($ui->server['HTTPS'])) ? "https://".$ui->server['HTTP_HOST'].$path : "http://".$ui->server['HTTP_HOST'].$path;
$link=$webhostdomain.'login.php?w=pr&amp;gamestring='.$md5;
$htmllink='<a href="'.$link.'">'.$link.'</a>';
sendmail('emailpwrecovery',$row['userid'],$htmllink,'',$sql);
sendmail('emailpwrecovery',$row['userid'],$htmllink,'');
} else if (!isset($ts3userlist[$dbid])) {
$text='Error: '.$sprache->nouser;
}
@ -213,7 +213,7 @@ if ($w=='lo') {
$include='passwordrecovery.tpl';
}
} else {
$aeskey=include(EASYWIDIR.'/stuff/keyphrasefile.php');
include(EASYWIDIR.'/stuff/keyphrasefile.php');
if (!$ui->username('username',255,'post') and !$ui->ismail('username',255,'post') and !$ui->password('password',255,'post') and !isset($_SESSION['sessionid'])) {
$include='login.tpl';
} else if (($ui->username('username',255,'post') or $ui->ismail('username','post')) and $ui->password('password',255,'post') and !isset($_SESSION['sessionid'])) {

View File

@ -69,7 +69,7 @@ if ($ui->escaped('email','post')!='') {
$query->execute(array($fullday,$loguserip));
die('IP banned');
}
$sprache=getlanguagefile('gserver',$user_language,0,$sql);
$sprache=getlanguagefile('gserver',$user_language,0);
$ipvalue="111.111.111.111:27015";
if ($ui->ipport('serveraddress','post') or (isset($server_ip) and isset($server_port))) {
if ($ui->ipport('serveraddress','post')) {
@ -210,6 +210,15 @@ XML;
}
}
} else if (isset($page_include)) {
// https://github.com/easy-wi/developer/issues/62
$langLinks=array();
foreach ($languages as $l) {
$tempLanguage=getlanguagefile('page',$l,0);
$langLinks[$l]=($page_data->seo=='Y') ? szrp($tempLanguage->$s) : '?s='.$s;
}
$page_data->langLinks($langLinks);
$template_file='page_protectioncheck.tpl';
} else {
if (file_exists(EASYWIDIR.'/template/'.$template_to_use.'/protectioncheck.tpl')) {

View File

@ -67,7 +67,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
$now=date('Y-m-d',strtotime("now"));
$aesfilecvar=getconfigcvars("stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$sprache=getlanguagefile('gserver','uk',0,$sql);
$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`");
$query2=$sql->prepare("UPDATE `servertypes` SET `steamVersion`=? WHERE `appID`=?");
@ -219,7 +219,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
}
foreach ($query3->fetchAll(PDO::FETCH_ASSOC) as $row3) {
if ($row3['mail_serverdown']=='Y') {
sendmail('emaildownrestart',$row3['id'],$queryip.' ('.$restartreturn.')','',$sql);
sendmail('emaildownrestart',$row3['id'],$queryip.' ('.$restartreturn.')','');
}
}
}

View File

@ -65,7 +65,7 @@ if ($ui->smallletters('w',5,'get')=='check') {
} else if ($die==true) {
redirect('login.php');
} else if ($ui->username('mapgroup','50','get')) {
$sprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('gserver',$user_language,$reseller_id);
$query=$sql->prepare("SELECT `mapGroup` FROM `servertypes` WHERE `shorten`=? AND `resellerid`=? LIMIT 1");
$query->execute(array($ui->username('mapgroup','50','get'),$reseller_id));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
@ -75,7 +75,7 @@ if ($ui->smallletters('w',5,'get')=='check') {
}
}
} else if ($ui->id('id',19,'get') and $ui->st('d','get')=="vs" and ($pa['addvserver'] or $pa['root'])) {
$sprache=getlanguagefile('reseller',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
if ($reseller_id!=0 and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
$notexclusive=true;
@ -297,7 +297,7 @@ if ($ui->smallletters('w',5,'get')=='check') {
</select>
<?php
} else if (($ui->username('short','50','get') or $ui->username('shorten','50','get')) and $pa['restart']) {
$sprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('gserver',$user_language,$reseller_id);
if ($reseller_id!=0 and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
}
@ -339,7 +339,7 @@ if ($ui->smallletters('w',5,'get')=='check') {
</select>
<?php
} else if ($ui->username('gamestring','50','get') and $ui->id('id',19,'get') and ($pa['roots'] or $pa['root'])) {
$sprache=getlanguagefile('roots',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('roots',$user_language,$reseller_id);
if ($reseller_id!=0 and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
}
@ -374,7 +374,7 @@ if ($ui->smallletters('w',5,'get')=='check') {
}
}
} else if (($pa['voiceserver'] or $pa['voiceserver']) and $ui->st('d','get')=="vo" and $ui->id('id',19,'get')) {
$sprache=getlanguagefile('voice',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('voice',$user_language,$reseller_id);
$query=$sql->prepare("SELECT m.`maxserver`,COUNT(v.`id`) AS `installedserver`,m.`maxslots`,SUM(v.`slots`) AS `installedslots`,SUM(v.`usedslots`) AS `uslots` FROM `voice_masterserver` m LEFT JOIN `voice_server` v ON m.`id`=v.`masterserver` WHERE m.`id`=? AND m.`resellerid`=? LIMIT 1");
$query->execute(array($ui->id('id',19,'get'),$reseller_id));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
@ -396,7 +396,7 @@ if ($ui->smallletters('w',5,'get')=='check') {
require_once IncludeTemplate($template_to_use,'ajax_admin_voiceserver_usage.tpl');
}
} else if ($pa['gserver'] and $ui->st('d','get')!="vs" and $ui->st('d','get')!="vo" and ($ui->id('id',19,'get') or $ui->ip('ip','get'))) {
$sprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('gserver',$user_language,$reseller_id);
if ($reseller_id!=0 and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
}

View File

@ -74,9 +74,9 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
include('stuff/queries.php');
$dayAndHour=date('Y-m-d H:').'00:00';
$dayAndZeroHour=date('Y-m-d').' 00:00:00';
$ssprache=getlanguagefile('settings','uk','0',$sql);
$vosprache=getlanguagefile('voice','uk','0',$sql);
$sprache=getlanguagefile('gserver','uk','0',$sql);
$ssprache=getlanguagefile('settings','uk',0);
$vosprache=getlanguagefile('voice','uk',0);
$sprache=getlanguagefile('gserver','uk',0);
$aesfilecvar=getconfigcvars("stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
@ -158,7 +158,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
}
foreach ($query->fetchall(PDO::FETCH_ASSOC) as $row) {
if ($row['mail_securitybreach']=='Y') {
sendmail('emailsecuritybreach',$row['id'],$address,$rulebreak,$sql);
sendmail('emailsecuritybreach',$row['id'],$address,$rulebreak);
}
}
$query=$sql->prepare("UPDATE `gsswitch` SET `secnotified`='Y' WHERE `serverip`=? AND `port`=? LIMIT 1");
@ -220,7 +220,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
$query=$sql->prepare("SELECT `mail_serverdown` FROM `userdata` WHERE `id`=? LIMIT 1");
$query->execute(array($userid));
foreach ($query->fetchall(PDO::FETCH_ASSOC) as $row) {
if ($row['mail_serverdown']=='Y') sendmail('emaildownrestart',$userid,$address,'',$sql);
if ($row['mail_serverdown']=='Y') sendmail('emaildownrestart',$userid,$address,'');
}
}
}
@ -559,7 +559,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
}
foreach ($query3->fetchAll(PDO::FETCH_ASSOC) as $row3) {
if ($row3['mail_serverdown']=='Y') {
sendmail('emaildownrestart',$row3['id'],$row['ssh2ip'].' (External TSDNS)','',$sql);
sendmail('emaildownrestart',$row3['id'],$row['ssh2ip'].' (External TSDNS)','');
}
}
}
@ -688,7 +688,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
$query2->execute(array($resellerid));
}
foreach ($query2->fetchall(PDO::FETCH_ASSOC) as $row2) {
if ($row2['mail_serverdown']=='Y') sendmail('emaildownrestart',$row2['id'],$queryip.' ('.$restartreturn.')','',$sql);
if ($row2['mail_serverdown']=='Y') sendmail('emaildownrestart',$row2['id'],$queryip.' ('.$restartreturn.')','');
}
}
$pupdate=$sql->prepare("UPDATE `voice_server` SET `uptime`='0' WHERE `masterserver`=?");
@ -940,7 +940,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
}
foreach ($query2->fetchall(PDO::FETCH_ASSOC) as $row2) {
if ($row2['mail_securitybreach']=='Y' or $row2['id']==$userid) {
sendmail('emailsecuritybreach',$row2['id'],$address,$rulebreak,$sql);
sendmail('emailsecuritybreach',$row2['id'],$address,$rulebreak);
}
}
$pupdate2=$sql->prepare("UPDATE `voice_server` SET `notified`='1' WHERE `id`=? LIMIT 1");
@ -995,7 +995,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR']==$ip) {
$query2=$sql->prepare("SELECT `mail_serverdown` FROM `userdata` WHERE `id`=? LIMIT 1");
$query2->execute(array($userid));
foreach ($query2->fetchall(PDO::FETCH_ASSOC) as $row2) {
if ($row2['mail_serverdown']=='Y') sendmail('emaildownrestart',$userid,$address,'',$sql);
if ($row2['mail_serverdown']=='Y') sendmail('emaildownrestart',$userid,$address,'');
}
$newnotified=$notified;
}

View File

@ -39,7 +39,7 @@ if ((!isset($admin_id) or !$main == 1) or (isset($admin_id) and !$pa['addons']))
header('Location: admin.php');
die('No acces');
}
$sprache=getlanguagefile('images',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('images',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";

View File

@ -40,7 +40,7 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !isanyadmin($admin_
header('Location: login.php');
die('No acces');
}
$sprache=getlanguagefile('search',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('search',$user_language,$reseller_id);
$results=array();
$gs=false;
$vs=false;

View File

@ -39,7 +39,7 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !isanyadmin($admin_
header('Location: login.php');
die('No acces');
}
$sprache_bad=getlanguagefile('home',$user_language,$reseller_id,$sql);
$sprache_bad=getlanguagefile('home',$user_language,$reseller_id);
if ($reseller_id!=0 and $admin_id!=$reseller_id) {
$resellerid=$admin_id;
} else {

View File

@ -41,7 +41,7 @@ if ($main!=1 or !isset($admin_id) or (isset($admin_id) and !$pa['apiSettings']))
header('Location: admin.php');
die('No acces');
}
$sprache=getlanguagefile('api',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('api',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';

View File

@ -40,7 +40,7 @@ if ($main!=1 or !isset($admin_id) or (isset($admin_id) and !$pa['apiSettings']))
header('Location: admin.php');
die('No acces');
}
$sprache=getlanguagefile('api',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('api',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';

View File

@ -41,7 +41,7 @@ if ($main!=1 or !isset($admin_id) or (isset($admin_id) and !$pa['apiSettings']))
header('Location: admin.php');
die('No acces');
}
$sprache=getlanguagefile('api',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('api',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';

View File

@ -134,9 +134,9 @@ if (array_value_exists('action','add',$data)) {
}
if (isset($data['name']) and names($data['name'],255)) $name=names($data['name'],255);
if (isset($data['vname']) and names($data['vname'],255)) $vname=names($data['vname'],255);
if (isset($data['phone']) and phone($data['phone'],255)) $phone=phone($data['phone'],255);
if (isset($data['handy']) and phone($data['handy'],255)) $handy=phone($data['handy'],255);
if (isset($data['fax']) and phone($data['fax'],255)) $fax=phone($data['fax'],255);
if (isset($data['phone']) and phone($data['phone'])) $phone=phone($data['phone']);
if (isset($data['handy']) and phone($data['handy'])) $handy=phone($data['handy']);
if (isset($data['fax']) and phone($data['fax'])) $fax=phone($data['fax']);
if (isset($data['city']) and names($data['city'],50)) $city=names($data['city'],50);
if (isset($data['cityn']) and is_number($data['cityn'],6)) $cityn=is_number($data['cityn'],6);
if (isset($data['street']) and names($data['street'],50)) $street=names($data['street'],50);
@ -219,16 +219,16 @@ if (array_value_exists('action','add',$data)) {
$what['vname']=names($data['vname'],255);
$vname=$what['vname'];
}
if (isset($data['phone']) and phone($data['phone'],255)) {
$what['phone']=phone($data['phone'],255);
if (isset($data['phone']) and phone($data['phone'])) {
$what['phone']=phone($data['phone']);
$phone=$what['phone'];
}
if (isset($data['handy']) and phone($data['handy'],255)) {
$what['handy']=phone($data['handy'],255);
if (isset($data['handy']) and phone($data['handy'])) {
$what['handy']=phone($data['handy']);
$handy=$what['handy'];
}
if (isset($data['fax']) and phone($data['fax'],255)) {
$what['fax']=phone($data['fax'],255);
if (isset($data['fax']) and phone($data['fax'])) {
$what['fax']=phone($data['fax']);
$fax=$what['fax'];
}
if (isset($data['city']) and names($data['city'],50)) {

View File

@ -36,8 +36,7 @@
*/
class PageSettings {
private $seo='';
public $language,$about,$canurl,$pageurl,$title,$keywords=array(),$lastnews,$tags,$pages,$hiddenPages,$last_news=array(),$MSIE=false,$lendactive,$lendactiveGS,$lendactiveVS,$lendGS=false,$lendVS=false,$protectioncheck,$pages_array=array();
public $seo='',$language,$about,$canurl,$pageurl,$title,$keywords=array(),$lastnews,$tags,$pages,$hiddenPages,$last_news=array(),$MSIE=false,$lendactive,$lendactiveGS,$lendactiveVS,$lendGS=false,$lendVS=false,$protectioncheck,$pages_array=array(),$languageLinks=array();
function __construct($user_language,$pageurl,$seo) {
$this->language=$user_language;
$this->pageurl=$pageurl;
@ -53,9 +52,7 @@ class PageSettings {
}
function AddData ($var,$value) {
if (is_array($this->$var)) {
if (!in_array($value,$this->$var,true)) {
array_push($this->$var,$value);
}
if (!in_array($value,$this->$var,true)) array_push($this->$var,$value);
} else {
$this->$var .=' '.$value;
}
@ -78,9 +75,7 @@ class PageSettings {
if ($this->seo=='Y') {
if (is_array($request)) {
$link='';
foreach ($request as $r) {
$link .='/'.$this->NameToLink($r);
}
foreach ($request as $r) $link .='/'.$this->NameToLink($r);
} else if ($id==false) {
$link = '/'.$this->AddPageToArray('pages',$subid,$this->NameToLink($request));
} else {
@ -91,14 +86,8 @@ class PageSettings {
if (is_array($request)) {
$getparams='';
$i=0;
foreach ($request as $key=>$value) {
if ($value!='' and $value!=null) {
if ($i==0) {
$getparams .='?'.$key.'='.$value;
} else {
$getparams .='&amp;'.$key.'='.$value;
}
}
foreach ($request as $k=>$v) {
if ($v!='' and $v!=null) $getparams .=($i==0) ? '?'.$k.'='.$v : '&amp;'.$k.'='.$v;
$i++;
}
} else if (is_numeric($request)) {
@ -122,25 +111,15 @@ class PageSettings {
}
function SetNewsPost ($id,$title,$text,$cutOff) {
$this->last_news[$id]['title']=$title;
if (strlen($text)<=$cutOff) {
$this->last_news[$id]['text']=$text;
} else {
$this->last_news[$id]['text']=substr($text,0,$cutOff).' ...';
}
if ($this->seo=='Y') {
$this->last_news[$id]['link']=$this->pages['news']['link'].$this->NameToLink($title).'/';
} else {
$this->last_news[$id]['link']=$this->pages['news']['link'].'&amp;id='.$id;
}
$this->last_news[$id]['text']=(strlen($text)<=$cutOff) ? $text : substr($text,0,$cutOff).' ...';
$this->last_news[$id]['link']=($this->seo=='Y') ? $this->pages['news']['link'].$this->NameToLink($title).'/' : $this->pages['news']['link'].'&amp;id='.$id;
$this->last_news[$id]['href']='<a href="'.$this->last_news[$id]['link'].'" title="'.$title.'">'.$title.'</a>';
}
function SetLinks ($var,$linkname,$request,$id,$date=null) {
if ($this->seo=='Y') {
if (is_array($request)) {
$link='';
for ($i=0;$i<(count($request)-1);$i++) {
$link .='/'.$this->NameToLink($request[$i]);
}
for ($i=0;$i<(count($request)-1);$i++) $link .='/'.$this->NameToLink($request[$i]);
$link .= '/'.$this->AddPageToArray($var,$id,$this->NameToLink($request[$i]));
} else {
$link = '/'.$this->AddPageToArray($var,$id,$this->NameToLink($request));
@ -150,14 +129,8 @@ class PageSettings {
if (is_array($request)) {
$getparams='';
$i=0;
foreach ($request as $key=>$value) {
if ($value!='' and $value!=null) {
if ($i==0) {
$getparams .='?'.$key.'='.$value;
} else {
$getparams .='&amp;'.$key.'='.$value;
}
}
foreach ($request as $k=>$v) {
if ($v!='' and $v!=null) $getparams .=($i==0) ? '?'.$k.'='.$v : '&amp;'.$k.'='.$v;
$i++;
}
} else {
@ -178,11 +151,7 @@ class PageSettings {
$query=$sql->prepare("SELECT `title` FROM `page_pages_text` WHERE `id`=? LIMIT 1");
$query->execute(array($ID));
$title=$query->fetchColumn();
if ($s=='news') {
$addToUrl='/'.$this->language.'/'.$this->NameToLink($gsprache->news).'/'.$this->NameToLink($title).'/';
} else {
$addToUrl='/'.$this->language.'/'.$this->NameToLink($title).'/';
}
$addToUrl=($s=='news') ? '/'.$this->language.'/'.$this->NameToLink($gsprache->news).'/'.$this->NameToLink($title).'/' : '/'.$this->language.'/'.$this->NameToLink($title).'/';
} else if ($this->seo=='Y' and in_array($s,array('imprint','lendserver','news'))) {
$addToUrl='/'.$this->language.'/'.$this->NameToLink($gsprache->$s).'/';
} else if ($this->seo=='Y') {
@ -222,6 +191,25 @@ class PageSettings {
}
return false;
}
// https://github.com/easy-wi/developer/issues/62
public function langLinks ($links=array()) {
global $languages;
foreach ($languages as $l) {
if ($this->seo=='Y') {
$this->languageLinks[$l]=(isset($links[$l])) ? $this->pageurl.'/'.$l.'/'.$links[$l].'/' : $this->pageurl.'/'.$l.'/';
} else {
$this->languageLinks[$l]=(isset($links[$l])) ? $this->pageurl.'/index.php'.$links[$l].'&amp;l='.$l : $this->pageurl.'/index.php?l='.$l;
}
}
}
public function getLangLinks () {
if (count($this->languageLinks)==0) {
$this->langLinks();
}
return $this->languageLinks;
}
function __destruct() {
unset($this->seo,$this->language,$this->about,$this->canurl,$this->pageurl,$this->title,$this->keywords,$this->lastnews,$this->tags,$this->pages,$this->hiddenPages,$this->last_news,$this->MSIE);
}
@ -231,6 +219,8 @@ function checkForSpam ($checkURL=null) {
global $ui,$blockLinks,$languageFilter,$page_data,$user_language,$textID,$blockWords,$honeyPotKey,$tornevall,$sql;
$spamReason=array();
$ips=array();
// Check if IP exists at DB as a spammer
if ($checkURL==null) {
$hostByIp='';
if ($ui->ip4('REMOTE_ADDR','server')) {
@ -239,68 +229,56 @@ function checkForSpam ($checkURL=null) {
}
$query=$sql->prepare("SELECT COUNT(`commentID`) AS `amount` FROM `page_comments` WHERE `markedSpam`='Y' AND (`ip`=? OR `dns`=?) AND `resellerid`=0 LIMIT 1");
$query->execute(array($ui->ip('REMOTE_ADDR','server'),$hostByIp));
if ($query->fetchColumn()>0) {
$spamReason[]='IP or Host already known for spam';
}
if ($query->fetchColumn()>0) $spamReason[]='IP or Host already known for spam';
} else {
$check=str_replace(array('https://','http://','ftps://','ftp://'),'',$checkURL);
$ips=gethostbynamel($check);
foreach($ips as $ip) {
$query=$sql->prepare("SELECT COUNT(`commentID`) AS `amount` FROM `page_comments` WHERE `markedSpam`='Y' AND `ip`=? AND `resellerid`=0 LIMIT 1");
$query->execute(array($ip));
if ($query->fetchColumn()>0 and !in_array('IP or Host already known for spam',$spamReason)) {
$spamReason[]='IP or Host already known for spam';
}
if ($query->fetchColumn()>0 and !in_array('IP or Host already known for spam',$spamReason)) $spamReason[]='IP or Host already known for spam';
}
}
if ($checkURL==null and count($spamReason)==0 and $ui->ip4('REMOTE_ADDR','server') and !in_array($ui->ip4('REMOTE_ADDR','server'),gethostbynamel($hostByIp))) {
$spamReason[]='Fake IP';
}
if($checkURL==null and count($spamReason)==0 and strlen($ui->escaped('mail','post'))>0) {
$spamReason[]='XSS: Hidden field';
}
if($checkURL==null and count($spamReason)==0 and (!isset($_SESSION['news'][$textID]) or $_SESSION['news'][$textID]!=$ui->escaped('token','post'))) {
$spamReason[]='XSS: Token';
}
// reverse DNS does not add up
if ($checkURL==null and count($spamReason)==0 and $ui->ip4('REMOTE_ADDR','server') and !in_array($ui->ip4('REMOTE_ADDR','server'),gethostbynamel($ips))) $spamReason[]='Fake IP';
// hidden fields have been filled
if ($checkURL==null and count($spamReason)==0 and strlen($ui->escaped('mail','post'))>0) $spamReason[]='XSS: Hidden field';
// CSFR token does not add up
if ($checkURL==null and count($spamReason)==0 and (!isset($_SESSION['news'][$textID]) or $_SESSION['news'][$textID]!=$ui->escaped('token','post'))) $spamReason[]='XSS: Token';
// Links not allowed in comments
if ($checkURL==null and count($spamReason)==0 and $blockLinks=='Y') {
foreach (array('http://','https://','ftp://','ftps://') as $key) {
if (strpos($ui->escaped('comment','post'),$key)!==false and (!in_array('URL',$spamReason))) {
$spamReason[]='URL';
}
}
foreach (array('http://','https://','ftp://','ftps://') as $key) if (strpos($ui->escaped('comment','post'),$key)!==false and (!in_array('URL Spam',$spamReason))) $spamReason[]='URL Spam';
}
// Post contains blacklisted words
if ($checkURL==null and count($spamReason)==0) {
foreach (explode(',',$blockWords) as $word) {
if (strlen(trim($word))>0 and strpos($ui->escaped('comment','post'),trim($word))!==false) {
if (!in_array('Word Blacklist',$spamReason)) {
$spamReason[]='Word Blacklist';
}
}
if (strlen(trim($word))>0 and strpos($ui->escaped('comment','post'),trim($word))!==false and !in_array('Word Blacklist',$spamReason)) $spamReason[]='Word Blacklist';
}
}
// use google translation REST API for language detection. If the current page contains a different language we likely have a spammer
if ($checkURL==null and count($spamReason)==0 and $languageFilter=='Y') {
$raw=webhostRequest('translate.google.com',$page_data->pageurl,'/translate_a/t?client=x&text='.urlencode(htmlentities(substr($ui->escaped('comment','post'),0,200))));
$json=json_decode($raw);
if ($json and isset($json->src) and $json->src!=$user_language) {
$spamReason[]='Language';
}
if ($json and isset($json->src) and $json->src!=$user_language) $spamReason[]='Language';
}
// check if the remote address (IP) is known for spamming at the tornevall.org list
if (count($spamReason)==0 and ($checkURL!=null or $ui->ip4('REMOTE_ADDR','server')) and (($honeyPotKey!=null and $honeyPotKey!='') or $tornevall=='Y')) {
if ($checkURL!=null) {
$ips=array($ui->ip4('REMOTE_ADDR','server'));
}
if ($checkURL!=null) $ips=array($ui->ip4('REMOTE_ADDR','server'));
foreach ($ips as $ip) {
$ipRevers=implode('.',array_reverse(explode('.',$ip)));
if (count($spamReason)==0 and $tornevall=='Y' and (bool)checkdnsrr($ipRevers.'.opm.tornevall.org.','A')) {
$spamReason[]='IP is listed at dnsbl.tornevall.org';
}
if (count($spamReason)==0 and $tornevall=='Y' and (bool)checkdnsrr($ipRevers.'.opm.tornevall.org.','A')) $spamReason[]='IP is listed at dnsbl.tornevall.org';
if (count($spamReason)==0 and $honeyPotKey!=null and $honeyPotKey!='') {
$ex=explode('.',gethostbyname($honeyPotKey.'.'.$ipRevers.'.dnsbl.httpbl.org'));
if ($ex[0]==127){
$types=array(1=>'Suspicious',2=>'Harvester',3=>'Suspicious & Harvester',4=>'Comment Spammer',5=>'Suspicious & Comment Spammer',6=>'Harvester & Comment Spammer',7=>'Suspicious & Harvester & Comment Spammer');
if ($ex[3]!=0) {
$spamReason[]='IP seems to be a '.$types[$ex[3]].'. It was last seen '.$ex[1].' day(s) ago and has a threat score of '.$ex[2];
}
if ($ex[3]!=0) $spamReason[]='IP seems to be a '.$types[$ex[3]].'. It was last seen '.$ex[1].' day(s) ago and has a threat score of '.$ex[2];
}
}
}

View File

@ -657,7 +657,7 @@ function tsbackup ($action,$sship,$sshport,$sshuser,$keyuse,$sshkey,$sshpw,$noti
}
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if ($row['mail_serverdown']=='Y') {
sendmail('emaildown',$row['id'],'TS3 Master '.$sship.' ( '.$bad.' )','',$sql);
sendmail('emaildown',$row['id'],'TS3 Master '.$sship.' ( '.$bad.' )','');
}
}
$query=$sql->prepare("UPDATE `voice_masterserver` SET `notified`='Y' WHERE `ssh2ip`=? AND `resellerid`=? LIMIT 1");
@ -866,7 +866,7 @@ function tsdns ($action,$sship,$sshport,$sshuser,$keyuse,$sshkey,$sshpw,$notifie
}
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if ($row['mail_serverdown']=='Y') {
sendmail('emaildown',$row['id'],'TS3 Master '.$sship.' ( '.$bad.' )','',$sql);
sendmail('emaildown',$row['id'],'TS3 Master '.$sship.' ( '.$bad.' )','');
}
}
$query=$sql->prepare("UPDATE `voice_masterserver` SET `notified`=`notified`+1 WHERE `ssh2ip`=? AND `resellerid`=? LIMIT 1");

View File

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

View File

@ -37,7 +37,7 @@
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
$sprache=getlanguagefile('feeds',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('feeds',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';

View File

@ -37,7 +37,7 @@
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
$sprache=getlanguagefile('feeds',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('feeds',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';

View File

@ -1,4 +1,5 @@
<?php
/**
* File: functions.php.
* Author: Ulrich Block
@ -80,7 +81,10 @@ if (!function_exists('passwordgenerate')) {
$szrm=array('ä'=>'ae','ö'=>'oe','ü'=>'ue','Ä'=>'Ae','Ö'=>'Oe','Ü'=>'Ue','ß'=>'ss','á'=>'a','à'=>'a','Á'=>'A','À'=>'A','é'=>'e','è'=>'e','É'=>'E','È'=>'E','ó'=>'o','ò'=>'o','Ó'=>'O','Ò'=>'O','ú'=>'u','ù'=>'u','Ú'=>'U','Ù'=>'U');
return strtolower(preg_replace('/[^a-zA-Z0-9]{1}/','-',strtr($value,$szrm)));
}
function redirect ($value) {
function redirect($value, $sendHTTP301 = false) {
if ($sendHTTP301 == true) {
header('HTTP/1.1 301 Moved Permanently');
}
header ('Location: '.$value);
die('Please allow redirection settings');
}
@ -155,7 +159,7 @@ if (!function_exists('passwordgenerate')) {
$query->execute();
$dCount=(int)$query->fetchColumn();
$count=$gsCount+$vCount+$voCount+$dCount;
$sprache=getlanguagefile('licence',$user_language,$resellerid,$sql);
$sprache=getlanguagefile('licence',$user_language,$resellerid);
$s=$sprache->unlimited;
$mG=$s;
$mVs=$s;
@ -250,7 +254,8 @@ if (!function_exists('passwordgenerate')) {
}
return $language;
}
function getlanguagefile($filename,$user_language,$reseller_id,$sql) {
function getlanguagefile($filename,$user_language,$reseller_id) {
global $sql;
$sprache=new stdClass;
$query=$sql->prepare("SELECT `language`,`template` FROM `settings` WHERE `resellerid`=? LIMIT 1");
$query->execute(array($reseller_id));
@ -843,7 +848,8 @@ if (!function_exists('passwordgenerate')) {
}
return false;
}
function sendmail($template,$userid,$server,$shorten,$sql) {
function sendmail($template,$userid,$server,$shorten) {
global $sql;
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
if ($template=='emailnewticket') {
@ -867,17 +873,12 @@ if (!function_exists('passwordgenerate')) {
$query=$sql->prepare("SELECT `vname`,`name`,`cname` FROM `userdata` WHERE `id`=? LIMIT 1");
$query->execute(array($writerid));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$username=$row['vname']." ".$row['name'];
if ($username==' ' or $username=='') {
$username=$row['cname'];
}
$username=($row['vname'].' '.$row['name']==' ') ? $row['cname'] : $row['vname'].' '.$row['name'];
}
}
if(!isset($resellerid) or $resellerid==$userid) {
$resellersid=0;
if(!isset($resellerid)) {
$resellerid=0;
}
if(!isset($resellerid)) $resellerid=0;
} else {
$resellersid=$resellerid;
}

View File

@ -69,7 +69,7 @@ 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,$sql);
$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;

View File

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

View File

@ -39,8 +39,8 @@ if ((!isset($admin_id) or !$main == "1") or (isset($admin_id) and !$pa['gimages'
header('Location: admin.php');
die('No acces');
}
$sprache=getlanguagefile('images',$user_language,$reseller_id,$sql);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('images',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";

View File

@ -1,4 +1,5 @@
<?php
/**
* File: imprint.php.
* Author: Ulrich Block
@ -35,14 +36,8 @@
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
if (!isset($reseller_id)) {
$reseller_id=0;
}
if (isset($user_language)) {
$sprache=getlanguagefile('images',$user_language,$reseller_id,$sql);
} else {
$sprache=getlanguagefile('images',$page_language,$reseller_id,$sql);
}
if (!isset($reseller_id)) $reseller_id=0;
$sprache=(isset($user_language)) ? getlanguagefile('images',$user_language,$reseller_id) : getlanguagefile('images',$page_language,$reseller_id);
if (isset($admin_id) and $admin_id==$reseller_id) {
$resellerid=0;
} else if (isset($reseller_id)) {
@ -52,25 +47,24 @@ if (isset($admin_id) and $admin_id==$reseller_id) {
}
$query=$sql->prepare("SELECT `imprint` FROM `imprints` WHERE language=? AND resellerid=? LIMIT 1");
$query->execute(array($user_language,$resellerid));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$imprint=$row['imprint'];
}
if (!isset($imprint)) {
$imprint=$query->fetchColumn();
if ($imprint!='') {
$query=$sql->prepare("SELECT `language` FROM `settings` WHERE `resellerid`=? LIMIT 1");
$query->execute(array($resellerid));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$defaultlanguage=$row['language'];
}
$defaultlanguage=$query->fetchColumn();
$query=$sql->prepare("SELECT `imprint` FROM `imprints` WHERE language=? AND resellerid=? LIMIT 1");
$query->execute(array($defaultlanguage,$resellerid));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$imprint=$row['imprint'];
}
}
if (!isset($imprint)) {
$imprint='';
$imprint=$query->fetchColumn();
}
if (isset($page_data)) {
$page_data->setCanonicalUrl($s);
// https://github.com/easy-wi/developer/issues/62
$langLinks=array();
foreach ($languages as $l) {
$tempLanguage=getlanguagefile('general',$l,0);
$langLinks[$l]=($page_data->seo=='Y') ? szrp($tempLanguage->$s) : '?s='.$s;
}
$page_data->langLinks($langLinks);
}
$template_file="imprint.tpl";

View File

@ -46,7 +46,7 @@ $vserver_module=(is_numeric($licenceDetails['mVs']) and $licenceDetails['mVs']==
$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,$sql);
$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();

View File

@ -40,7 +40,7 @@
$pages=array();
if (!isset($user_language)) $user_language=$default_language;
$page_sprache=getlanguagefile('page',$user_language,0,$sql);
$page_sprache=getlanguagefile('page',$user_language,0);
include(EASYWIDIR.'/stuff/class_page_settings.php');
if (!isurl($pageurl) or (!isdomain($pageurl) and (!isurl($pageurl)))) $pageurl=$page_url;
$page_data=new PageSettings($user_language,$pageurl,$seo);

View File

@ -41,8 +41,8 @@ if ((!isset($admin_id) or !$main == "1") or (isset($admin_id) and !$pa['ipBans']
header('Location: admin.php');
die('No acces');
}
$sprache=getlanguagefile('logs',$user_language,$reseller_id,$sql);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('logs',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
if (isset($action) and $action=='dl') {
$i=0;
if ($ui->id('id',30,'post')) {

View File

@ -37,7 +37,7 @@
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
$sprache=getlanguagefile('gserver','en',0,$sql);
$sprache=getlanguagefile('gserver','en',0);
$query=$sql->prepare("SELECT `hostID`,`resellerID` FROM `jobs` WHERE (`status` IS NULL OR `status`='1') AND `type`='gs' GROUP BY `hostID`");
$query2=$sql->prepare("SELECT * FROM `jobs` WHERE (`status` IS NULL OR `status`='1') AND `type`='gs' AND `hostID`=?");
$query3=$sql->prepare("SELECT g.*,AES_DECRYPT(g.`ftppassword`,?) AS `ftp`,AES_DECRYPT(g.`ppassword`,?) AS `ppasswordftp`,u.`cname` FROM `gsswitch` g INNER JOIN `userdata` u ON g.`userid`=u.`id` WHERE g.`id`=? LIMIT 1");

View File

@ -41,7 +41,7 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['jobs'])) {
header('Location: admin.php');
die('No acces');
}
$sprache=getlanguagefile('api',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('api',$user_language,$reseller_id);
if ($ui->w('action',4,'post') and !token(true)) {
$template_file=$spracheResponse->token;
} else if ($ui->w('action',4,'post')=='dl' and !isset($server_id)) {

View File

@ -39,8 +39,8 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and (!isset($pa) or (!$
redirect('Location: admin.php');
die;
}
$sprache=getlanguagefile('lendserver',$user_language,$reseller_id,$sql);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('lendserver',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";

View File

@ -39,8 +39,8 @@ if ((!isset($admin_id) or !$main == "1") or (isset($admin_id) and !$pa['log']))
header('Location: admin.php');
die('No acces');
}
$sprache=getlanguagefile('logs',$user_language,$reseller_id,$sql);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('logs',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
$table=array();
if ($reseller_id==0) {
$pselect=$sql->prepare("SELECT `userid`,`subuser`,`reseller`,`username`,`usertype`,`useraction`,`ip`,`hostname`,`logdate` FROM `userlog` WHERE `usertype` LIKE :usertype AND (`resellerid`=:reseller_id OR `resellerid`=`userid`) ORDER BY `id` DESC LIMIT $start,$amount");

View File

@ -39,8 +39,8 @@ if ((!isset($admin_id) or !$main == "1") or (isset($admin_id) and !$pa['log']))
header('Location: admin.php');
die('No acces');
}
$sprache=getlanguagefile('logs',$user_language,$reseller_id,$sql);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('logs',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
if (isset($action) and $action=='dl' and $ui->id('id',30,'post')) {
$i=0;
if ($ui->id('id',30,'post')) {

View File

@ -41,7 +41,7 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['masterServer'
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$sprache=getlanguagefile('roots',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('roots',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";

View File

@ -42,7 +42,7 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['mysql_setting
include(EASYWIDIR.'/stuff/mysql_functions.php');
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$sprache=getlanguagefile('mysql',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('mysql',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";

View File

@ -40,7 +40,7 @@
if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['cms_pages']) or $reseller_id!=0) {
redirect('admin.php');
}
$sprache=getlanguagefile('page',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('page',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';
@ -184,7 +184,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
$query->execute(array($reseller_id));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if(!isset($titleLanguages[$row['language']])) {
$titleLanguages[$row['language']]=array('page'=>getlanguagefile('page',$row['language'],0,$sql),'general'=>getlanguagefile('general',$row['language'],0,$sql));
$titleLanguages[$row['language']]=array('page'=>getlanguagefile('page',$row['language'],0),'general'=>getlanguagefile('general',$row['language'],0));
}
$commentDate='m.d.Y H:i';
if ($user_language=='de') $commentDate='d.m.Y H:i';

View File

@ -56,11 +56,20 @@ if ($ui->escaped('email','post')) {
unset($error);
$success=true;
$comments=$name.' ('.$email.'):<br />'.$comments;
sendmail('contact',$name,$comments,$rSA['email'],$sql);
sendmail('contact',$name,$comments,$rSA['email']);
}
} else {
$token=md5(passwordgenerate(32));
$_SESSION['token']=$token;
}
$page_data->setCanonicalUrl($s);
// https://github.com/easy-wi/developer/issues/62
$langLinks=array();
foreach ($languages as $l) {
$tempLanguage=getlanguagefile('page',$l,0);
$langLinks[$l]=($page_data->seo=='Y') ? szrp($tempLanguage->$s) : '?s='.$s;
}
$page_data->langLinks($langLinks);
$template_file='contact.tpl';

View File

@ -99,5 +99,14 @@ if (isset($downloadID)) {
$table[]=array('id'=>$row['fileID'],'description'=>$row['description'],'link'=>(isset($seo) and $seo=='Y') ? $page_data->pages['downloads']['link'].'get/'.$row['fileID'].'/' : $page_data->pages['downloads']['link'].'&amp;action=get&amp;id='.$row['fileID'],'text'=>$row['text']);
}
}
// https://github.com/easy-wi/developer/issues/62
$langLinks=array();
foreach ($languages as $l) {
$tempLanguage=getlanguagefile('general',$l,0);
$langLinks[$l]=($page_data->seo=='Y') ? szrp($tempLanguage->$s) : '?s='.$s;
}
$page_data->langLinks($langLinks);
$template_file='page_downloads_list.tpl';
}

View File

@ -41,7 +41,7 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['cms_pages'])
header('Location: admin.php');
die;
}
$sprache=getlanguagefile('page',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('page',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";

View File

@ -40,7 +40,7 @@ if ($ui->id('id',19,'get')) {
$page_id=$ui->id('id',19,'get');
} else if (isset($page_name) and $page_name!=szrp($page_sprache->older) and isset($page_name) and $page_name!='' and $page_name!=null and $page_name!=false) {
$pagesAvailable=array();
$query=$sql->prepare("SELECT p.`id`,t.`title` FROM `page_pages` p LEFT JOIN `page_pages_text` t ON p.`id`=t.`pageid` WHERE `type`='news' AND t.`language`=? AND p.`released`='1' AND p.`resellerid`='0'");
$query=$sql->prepare("SELECT p.`id`,t.`title` FROM `page_pages` p LEFT JOIN `page_pages_text` t ON p.`id`=t.`pageid` WHERE `type`='news' AND t.`language`=? AND p.`released`=1 AND p.`resellerid`=0");
$query->execute(array($user_language));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$pagesAvailable[szrp($row['title'])]=$row['id'];
@ -81,12 +81,19 @@ if ((isset($page_name) and $page_name!=szrp($page_sprache->older) and isset($pag
}
}
$pageLanguage=$row['language'];
if ($pageLanguage=='de') {
$date=date('d.m.Y',strtotime($row['date']));
} else {
$date=date('m.d.Y',strtotime($row['date']));
}
$date=($pageLanguage=='de') ? date('d.m.Y',strtotime($row['date'])): date('m.d.Y',strtotime($row['date']));
}
// https://github.com/easy-wi/developer/issues/62
$langLinks=array();
$query=$sql->prepare("SELECT `title`,`language` FROM `page_pages_text` WHERE `pageid`=?");
$query->execute(array($page_id));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$tempLanguage=getlanguagefile('general',$row['language'],0);
$langLinks[$row['language']]=($page_data->seo=='Y') ? szrp($tempLanguage->news).'/'.szrp($row['title']) : '?s=news&amp;id='.$page_id;
}
$page_data->langLinks($langLinks);
if (isset($textID) or isset($comments)) {
$email='';
$author='';
@ -277,6 +284,15 @@ if ((isset($page_name) and $page_name!=szrp($page_sprache->older) and isset($pag
} else {
$paginationLink=$page_url.'/index.php?site=news&amp;start=';
}
// https://github.com/easy-wi/developer/issues/62
$langLinks=array();
foreach ($languages as $l) {
$tempLanguage=getlanguagefile('general',$l,0);
$langLinks[$l]=($page_data->seo=='Y') ? szrp($tempLanguage->news) : '?s=news';
}
$page_data->langLinks($langLinks);
$page_data->setCanonicalUrl($s);
$template_file='page_news.tpl';
} else {

View File

@ -39,7 +39,7 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['cms_news']) o
header('Location: admin.php');
die;
}
$sprache=getlanguagefile('page',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('page',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";
@ -427,7 +427,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
$table = array();
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if(!isset($titleLanguages[$row['language']])) {
$titleLanguages[$row['language']]=array('page'=>getlanguagefile('page',$row['language'],0,$sql),'general'=>getlanguagefile('general',$row['language'],0,$sql));
$titleLanguages[$row['language']]=array('page'=>getlanguagefile('page',$row['language'],0),'general'=>getlanguagefile('general',$row['language'],0));
}
if ($row['released']=='1') {
$released=$gsprache->yes;

View File

@ -60,11 +60,7 @@ if (isset($page_id) and is_numeric($page_id)) {
$query2->execute(array($row['id']));
foreach ($query2->fetchAll(PDO::FETCH_ASSOC) as $row2) {
$page_data->AddData('keywords',$row2['name']);
if ($seo=='Y') {
$tag_tags[]='<a href='.$page_url.'/'.$user_language.'/'.$page_sprache->tag.'/'.strtolower(szrp($row2['name'])).'/>'.$row2['name'].'</a>';
} else {
$tag_tags[]='<a href='.$page_url.'/index.php?site=tag&amp;tag='.strtolower(szrp($row2['name'])).'/>'.$row2['name'].'</a>';
}
$tag_tags[]=($seo=='Y') ? '<a href='.$page_url.'/'.$user_language.'/'.$page_sprache->tag.'/'.strtolower(szrp($row2['name'])).'/>'.$row2['name'].'</a>' : '<a href='.$page_url.'/index.php?site=tag&amp;tag='.strtolower(szrp($row2['name'])).'/>'.$row2['name'].'</a>';
}
}
$breadcrumbs=array();
@ -73,29 +69,18 @@ if (isset($page_id) and is_numeric($page_id)) {
$query->execute(array($breadcrumbID,$user_language));
unset($breadcrumbID);
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if (isset($seo) and $seo=='Y') {
$link=$page_data->pageurl.'/'.$user_language.'/'.szrp($row['title']).'/';
} else {
$link=$page_data->pageurl.'?s=page&amp;l='.$user_language.'&amp;id='.$row['id'];
}
$link=(isset($seo) and $seo=='Y') ? $page_data->pageurl.'/'.$user_language.'/'.szrp($row['title']).'/' : $page_data->pageurl.'?s=page&amp;l='.$user_language.'&amp;id='.$row['id'];
$breadcrumbs[]=array('href'=>'<a href="'.$link.'">'.$row['title'].'</a>','link'=>$link);
$breadcrumbID=$row['subpage'];
$breadcrumbPageID=$row['id'];
}
}
$breadcrumbs=array_reverse($breadcrumbs);
if (isset($page_title)) {
$template_file='page_page.tpl';
} else {
$template_file='page_404.tpl';
}
$template_file=(isset($page_title)) ? 'page_page.tpl' : 'page_404.tpl';
} else if ($s=='about') {
$page_text='';
$query=$sql->prepare("SELECT t.`text` FROM `page_pages` p LEFT JOIN `page_pages_text` t ON p.`id`=t.`pageid` WHERE `type`='about' AND t.`language`=? AND p.`resellerid`='0' LIMIT 1");
$query->execute(array($user_language));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$page_text=nl2br($row['text']);
}
$page_text=nl2br($query->fetchColumn());
$page_title=$page_sprache->about;
$page_keywords=array();
$tag_tags=array();
@ -109,17 +94,13 @@ if (isset($page_id) and is_numeric($page_id)) {
$searchString=preg_replace("/\s+/",' ',$ui->escaped('search','post'));
$searchFor['exact'][]=strtolower($searchString);
if (strpos($searchString,'"')===false) {
foreach (preg_split('/\s+/',$searchString,-1,PREG_SPLIT_NO_EMPTY) as $v) {
$searchFor['general'][]=strtolower($v);
}
foreach (preg_split('/\s+/',$searchString,-1,PREG_SPLIT_NO_EMPTY) as $v) $searchFor['general'][]=strtolower($v);
} else {
$checkForEnd=false;
$split=explode('"',$searchString);
foreach ($split as $v) {
if ($v!='' and $checkForEnd==false) {
foreach (preg_split('/\s+/',$v,-1,PREG_SPLIT_NO_EMPTY) as $v2) {
$searchFor['general'][]=strtolower($v2);
}
foreach (preg_split('/\s+/',$v,-1,PREG_SPLIT_NO_EMPTY) as $v2) $searchFor['general'][]=strtolower($v2);
$checkForEnd=true;
} else if ($v!='' and $checkForEnd==true) {
$searchFor['exact'][]=strtolower($v);
@ -137,7 +118,7 @@ if (isset($page_id) and is_numeric($page_id)) {
$query->execute(array(':search'=>'%'.$value.'%'));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if(!isset($titleLanguages[$row['language']])) {
$titleLanguages[$row['language']]=array('page'=>getlanguagefile('page',$row['language'],0,$sql),'general'=>getlanguagefile('general',$row['language'],0,$sql));
$titleLanguages[$row['language']]=array('page'=>getlanguagefile('page',$row['language'],0),'general'=>getlanguagefile('general',$row['language'],0));
}
if (strlen($row['text'])<=$newssidebar_textlength) {
$text=$row['text'];
@ -248,4 +229,20 @@ if (isset($page_id) and is_numeric($page_id)) {
} else {
$template_file='page_404.tpl';
}
}
}
// https://github.com/easy-wi/developer/issues/62
$langLinks=array();
if (isset($s) and $s=='page') {
$query=$sql->prepare("SELECT `title`,`language` FROM `page_pages_text` WHERE `pageid`=?");
$query->execute(array($page_id));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$langLinks[$row['language']]=($page_data->seo=='Y') ? szrp($row['title']) : '?s=page&amp;id='.$page_id;
}
} else if (isset($s)) {
foreach ($languages as $l) {
$tempLanguage=getlanguagefile('page',$l,0);
$langLinks[$l]=($page_data->seo=='Y') ? szrp($tempLanguage->$s) : '?s='.$s;
}
}
$page_data->langLinks($langLinks);

View File

@ -39,7 +39,7 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['cms_pages'])
header('Location: admin.php');
die;
}
$sprache=getlanguagefile('page',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('page',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";

View File

@ -50,7 +50,7 @@ foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$registrationBadEmail=$row['registrationBadEmail'];
$registrationBadIP=$row['registrationBadIP'];
}
$langObject=getlanguagefile('user',(isset($user_language)) ? $user_language : $default_language,0,$sql);
$langObject=getlanguagefile('user',(isset($user_language)) ? $user_language : $default_language,0);
if (isset($registration) and in_array($registration,array('A','M','D'))) {
if (isset($page_name) and isset($page_count) and $page_name=='activate' and wpreg_check($page_count,100)) {
@ -64,7 +64,7 @@ if (isset($registration) and in_array($registration,array('A','M','D'))) {
$_SESSION['userid']=$userID;
$_SESSION['resellerid']=0;
$template_file=$page_sprache->registerActivated;
$langObjectTemp=getlanguagefile('redirect',(isset($user_language)) ? $user_language : $default_language,0,$sql);
$langObjectTemp=getlanguagefile('redirect',(isset($user_language)) ? $user_language : $default_language,0);
$text=$langObjectTemp->refresh;
$langObjectTemp=null;
if (isset($page_data->canurl)) $header='<meta http-equiv="refresh" content="3; URL='.$page_data->canurl.'">';
@ -182,7 +182,7 @@ if (isset($registration) and in_array($registration,array('A','M','D'))) {
$template_file=$page_sprache->registerMailSend;
// send Mail
sendmail('emailregister',$userID,'',$page_data->pages['register']['link'].'activate/'.$activeHash.'/',$sql);
sendmail('emailregister',$userID,'',$page_data->pages['register']['link'].'activate/'.$activeHash.'/');
} else {
$_SESSION['userid']=$userID;
$_SESSION['resellerid']=0;

View File

@ -39,7 +39,7 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['cms_settings'
header('Location: admin.php');
die('No acces');
}
$sprache=getlanguagefile('page',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('page',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";

View File

@ -38,8 +38,8 @@
if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['settings'])) {
redirect('login.php');
}
$sprache=getlanguagefile('settings',$user_language,$reseller_id,$sql);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('settings',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";
@ -157,7 +157,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
} else {
$query=$sql->prepare("SELECT *,AES_DECRYPT(`imageserver`,?) AS `decryptedimageserver` FROM `settings` WHERE `resellerid`=? LIMIT 1");
$query->execute(array($aeskey,$reseller_id));
$usprache=getlanguagefile('user',$user_language,$reseller_id,$sql);
$usprache=getlanguagefile('user',$user_language,$reseller_id);
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$language_choosen=$row['language'];
$template_choosen=$row['template'];

View File

@ -45,7 +45,7 @@ $logusername=getusername($admin_id);
$logusertype='admin';
$logreseller=0;
$logsubuser=0;
$sprache=getlanguagefile('columns',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('columns',$user_language,$reseller_id);
if ($ui->w('action',4,'post') and !token(true)) {
$template_file=$spracheResponse->token;
} else if(in_array($ui->st('d','get'),array('ad','md'))) {

View File

@ -40,8 +40,8 @@
if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['settings'])) {
redirect('login.php');
}
$sprache=getlanguagefile('settings',$user_language,$reseller_id,$sql);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('settings',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";
@ -138,7 +138,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
} else {
$query=$sql->prepare("SELECT *,AES_DECRYPT(`email_settings_password`,?) AS `decryptedpassword` FROM `settings` WHERE `resellerid`=? LIMIT 1");
$query->execute(array($aeskey,$reseller_id));
$usprache=getlanguagefile('user',$user_language,$reseller_id,$sql);
$usprache=getlanguagefile('user',$user_language,$reseller_id);
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$emailbackup=@gzuncompress($row['emailbackup']);
$emailbackuprestore=@gzuncompress($row['emailbackuprestore']);

View File

@ -43,7 +43,7 @@ if (!isset($admin_id) or $main!=1 or !$pa['dedicatedServer']) {
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$sprache=getlanguagefile('reseller',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';

View File

@ -43,7 +43,7 @@ if (!isset($admin_id) or $main!=1 or $reseller_id!=0 or !$pa['vserversettings']
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$sprache=getlanguagefile('reseller',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';

View File

@ -43,7 +43,7 @@ if (!isset($admin_id) or $main!=1 or $reseller_id!=0 or !$pa['vserversettings']
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$sprache=getlanguagefile('reseller',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';

View File

@ -43,7 +43,7 @@ if (!isset($admin_id) or $main!=1 or $reseller_id!=0 or !$pa['vserverhost']) {
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$sprache=getlanguagefile('reseller',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";

View File

@ -42,7 +42,7 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['addvserver']
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$sprache=getlanguagefile('reseller',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";

View File

@ -40,7 +40,7 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['roots'])) {
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$sprache=getlanguagefile('roots',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('roots',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";
@ -240,7 +240,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
}
}
} else {
$gsSprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$gsSprache=getlanguagefile('gserver',$user_language,$reseller_id);
$table = array();
$o=$ui->st('o','get');
if ($ui->st('o','get')=='ar') {

View File

@ -43,7 +43,7 @@ if (!isset($admin_id) or $main!=1 or $reseller_id!=0 or !$pa['resellertemplates'
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$sprache=getlanguagefile('reseller',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';

View File

@ -207,8 +207,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,$sql) : getlanguagefile('general',$default_language,0,$sql);
$spracheResponse=(isset($reseller_id)) ? getlanguagefile('response',$default_language,$reseller_id,$sql) : getlanguagefile('response',$default_language,0,$sql);
$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);
}
if (isset($logininclude) and $logininclude==true) {
$query=$sql->prepare("DELETE FROM `badips` WHERE `bantime` <= ?");

View File

@ -84,7 +84,7 @@ if (!function_exists('ssh2_execute')) {
if ($notified==$rSA['down_checks']) {
$query=($resellerID==0) ? $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE `resellerid`=0 AND `accounttype`='a'") : $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE (`id`=${resellerID} AND `id`=`resellerid`) OR `resellerid`=0 AND `accounttype`='a'");
$query->execute();
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row2) if ($row2['mail_serverdown']=='Y') sendmail('emaildown',$row2['id'],$ssh2IP,'',$sql);
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row2) if ($row2['mail_serverdown']=='Y') sendmail('emaildown',$row2['id'],$ssh2IP,'');
}
if ($type=='gs') {
$query=$sql->prepare("UPDATE `rserverdata` SET `notified`=? WHERE `id`=? LIMIT 1");

View File

@ -38,7 +38,7 @@ if (!isset($admin_id) or $main!=1 or (isset($admin_id) and !$pa['tickets'])) {
header('Location: admin.php');
die;
}
$sprache=getlanguagefile('tickets',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('tickets',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";
@ -437,7 +437,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
$query=$sql->prepare("SELECT `mail_ticket` FROM `userdata` WHERE `id`=? LIMIT 1");
$query->execute(array($userid));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if ($row['mail_ticket']=='Y') sendmail('emailnewticket',$userid,$ui->post['ticket'],array($id,$admin_id),$sql);
if ($row['mail_ticket']=='Y') sendmail('emailnewticket',$userid,$ui->post['ticket'],array($id,$admin_id));
}
}
} else {

View File

@ -38,7 +38,7 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['usertickets']
header('Location: userpanel.php');
die;
}
$sprache=getlanguagefile('tickets',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('tickets',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";
@ -121,7 +121,7 @@ if ($ui->st('d','get')=='ad') {
$query->execute(array($resellerid));
}
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if ($row['mail_ticket']=='Y') sendmail('emailnewticket',$row['id'],$ticketText,array($lastID,$admin_id),$sql);
if ($row['mail_ticket']=='Y') sendmail('emailnewticket',$row['id'],$ticketText,array($lastID,$admin_id));
}
$template_file=$spracheResponse->table_add;
} else {
@ -201,7 +201,7 @@ if ($ui->st('d','get')=='ad') {
$query=$sql->prepare("SELECT `mail_ticket` FROM `userdata` WHERE `id`=? LIMIT 1");
$query->execute(array($userid));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if ($row['mail_ticket']=='Y') sendmail('emailnewticket',$userid,$ui->post['ticket'],array($id,$admin_id),$sql);
if ($row['mail_ticket']=='Y') sendmail('emailnewticket',$userid,$ui->post['ticket'],array($id,$admin_id));
}
}
$template_file=$spracheResponse->table_add;

View File

@ -38,7 +38,7 @@ if(!isset($admin_id) or !$main == "1" or (isset($admin_id) and !$pa['traffic']))
header('Location: admin.php');
die('No acces');
}
$sprache=getlanguagefile('traffic',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('traffic',$user_language,$reseller_id);
if ($d=='se' and $reseller_id==0) {
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];

View File

@ -40,8 +40,8 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['user'] and !$
}
$aesfilecvar=getconfigcvars(EASYWIDIR."/stuff/keyphrasefile.php");
$aeskey=$aesfilecvar['aeskey'];
$sprache=getlanguagefile('user',$user_language,$reseller_id,$sql);
$rsprache=getlanguagefile('reseller',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('user',$user_language,$reseller_id);
$rsprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";
@ -288,7 +288,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
} else if ($user_accounttype=="r" and $admin_id!=$reseller_id) {
$query->execute(array($cnamenew,$security2,$salt,$admin_id,$id));
}
sendmail('emailuseradd',$id,$cnamenew,$password,$sql);
sendmail('emailuseradd',$id,$cnamenew,$password);
$template_file=$sprache->user_create .": <b>$cnamenew</b>.";
$loguseraction="%add% %user% $cnamenew";
$insertlog->execute();

View File

@ -41,8 +41,8 @@ if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['userGroups'])
header('Location: admin.php');
die('No acces');
}
$sprache=getlanguagefile('user',$user_language,$reseller_id,$sql);
$rsprache=getlanguagefile('reseller',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('user',$user_language,$reseller_id);
$rsprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype='admin';

View File

@ -38,7 +38,7 @@ if ((!isset($user_id) or !$main == "1") or (isset($user_id) and !$pa['useraddons
header('Location: userpanel.php');
die('No acces');
}
$sprache=getlanguagefile('images',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('images',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
$logusertype="user";

View File

@ -38,7 +38,7 @@ if ((!isset($user_id) or $main!=1) or (isset($user_id) and !$pa['ftpbackup']) or
header('Location: userpanel.php');
die;
}
$sprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('gserver',$user_language,$reseller_id);
if (isset($admin_id) and $reseller_id!=0 and $admin_id!=$reseller_id) {
$reseller_id=$admin_id;
}

View File

@ -41,7 +41,7 @@ if ((!isset($main) or $main!=1) or (!isset($user_id) or (isset($user_id) and !$p
header('Location: userpanel.php');
die('No acces');
}
$sprache=getlanguagefile('reseller',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
$logusertype="user";

View File

@ -38,7 +38,7 @@ if ((!isset($user_id) or !$main == "1") or (isset($user_id) and !$pa['fastdl']))
header('Location: userpanel.php');
die('No acces');
}
$sprache=getlanguagefile('fastdl',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('fastdl',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
$logusertype="user";

View File

@ -38,7 +38,7 @@ if ((!isset($main) or $main!=1) or (!isset($user_id) or (isset($user_id) and !$p
header('Location: userpanel.php');
die('No acces');
}
$sprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('gserver',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
$logusertype="user";

View File

@ -38,7 +38,7 @@ if ((!isset($user_id) or !$main == "1") or (isset($user_id) and !isanyuser($user
header('Location: login.php');
die('No acces');
}
$sprache_bad=getlanguagefile('home',$user_language,$reseller_id,$sql);
$sprache_bad=getlanguagefile('home',$user_language,$reseller_id);
$query_tag=$sql->prepare("SELECT brandname FROM settings WHERE resellerid=? LIMIT 1");
$query_tag->execute(array($reseller_id));
foreach ($query_tag->fetchAll(PDO::FETCH_ASSOC) as $row_tag) {

View File

@ -38,8 +38,8 @@ if ((!isset($user_id) or $main!=1) or (isset($user_id) and !$pa['usersettings'])
header('Location: userpanel.php');
die;
}
$sprache=getlanguagefile('logs',$user_language,$reseller_id,$sql);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('logs',$user_language,$reseller_id);
$gssprache=getlanguagefile('gserver',$user_language,$reseller_id);
if (isset($admin_id) and $reseller_id!=0) $reseller_id=$admin_id;
$table=array();
$query=$sql->prepare("SELECT `subuser`,`username`,`useraction`,`ip`,`logdate` FROM `userlog` WHERE `usertype`='user' AND `userid`=? AND `resellerid`=? ORDER BY `logdate` DESC LIMIT $start,$amount");

View File

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

View File

@ -38,7 +38,7 @@ if ((!isset($user_id) or $main!=1) or (isset($user_id) and !$pa['mysql'])) {
header('Location: userpanel.php');
die;
}
$sprache=getlanguagefile('mysql',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('mysql',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
$logusertype="user";

View File

@ -35,7 +35,7 @@
* 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');
$sprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('gserver',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
$logusertype="user";

View File

@ -37,7 +37,7 @@
if ((!isset($user_id) or $main!=1) or (isset($user_id) and !$pa['restart']) or !$ui->id('id',19,'get')) {
redirect('userpanel.php');
}
$sprache=getlanguagefile('gserver',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('gserver',$user_language,$reseller_id);
if (isset($admin_id) and $reseller_id!=0 and $admin_id!=$reseller_id) $reseller_id=$admin_id;
if (!isset($_SESSION['sID']) or in_array($ui->id('id',19,'get'),$substituteAccess['gs'])) {
$query=$sql->prepare("SELECT g.`serverip`,g.`port`,g.`protected`,s.`anticheat`,g.`pallowed`,g.`eacallowed`,s.`map`,s.`mapGroup`,t.`shorten`,t.`mapGroup` AS `defaultMapGroup` FROM `gsswitch` g LEFT JOIN `serverlist` s ON g.`serverid`=s.`id` LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE g.`id`=? AND g.`userid`=? AND g.`resellerid`=? LIMIT 1");

View File

@ -44,7 +44,7 @@ if (!isset($main) or $main!=1 or !isset($user_id) or !isset($user_language) or !
}
$aesfilecvar=getconfigcvars(EASYWIDIR.'/stuff/keyphrasefile.php');
$aeskey=$aesfilecvar['aeskey'];
$sprache=getlanguagefile('user',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('user',$user_language,$reseller_id);
if ($ui->w('action',4,'post') and !token(true)) {
$template_file=$spracheResponse->token;
} else if ($ui->id('id',10,'get') or $ui->st('d','get')=='ad') {

View File

@ -38,7 +38,7 @@ if ((!isset($user_id) or $main!=1) or (isset($user_id) and !$pa['usertickets']))
header('Location: userpanel.php');
die;
}
$sprache=getlanguagefile('tickets',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('tickets',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
$logusertype="admin";
@ -110,7 +110,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
$query->execute(array($reseller_id));
}
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if ($row['mail_ticket']=='Y') sendmail('emailnewticket',$row['id'],$ticketText,array($lastID,$user_id),$sql);
if ($row['mail_ticket']=='Y') sendmail('emailnewticket',$row['id'],$ticketText,array($lastID,$user_id));
}
$template_file=$spracheResponse->table_add;
} else {
@ -196,7 +196,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
$query=$sql->prepare("SELECT `mail_ticket` FROM `userdata` WHERE `id`=? LIMIT 1");
$query->execute(array($userid));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
if ($row['mail_ticket']=='Y') sendmail('emailnewticket',$userid,$ui->post['ticket'],array($id,$user_id),$sql);
if ($row['mail_ticket']=='Y') sendmail('emailnewticket',$userid,$ui->post['ticket'],array($id,$user_id));
}
}
} else {

View File

@ -42,7 +42,7 @@ if ((!isset($main) or $main!=1) or (!isset($user_id) or (isset($user_id) and !$p
header('Location: userpanel.php');
die('No acces');
}
$sprache=getlanguagefile('reseller',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('reseller',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
$logusertype="user";

View File

@ -39,7 +39,7 @@ if ((!isset($user_id) or !$main == "1") or (isset($user_id) and !$pa['voiceserve
header('Location: userpanel.php');
die('No acces');
}
$sprache=getlanguagefile('voice',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('voice',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
$logusertype='user';

View File

@ -36,7 +36,7 @@
* Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
$sprache=getlanguagefile('voice',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('voice',$user_language,$reseller_id);
$loguserid=$user_id;
$logusername=getusername($user_id);
$logusertype='user';

View File

@ -41,7 +41,7 @@ if ((!isset($admin_id) or $main!=1) or $reseller_id!=0 or !$pa['updateEW']) {
}
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$sprache=getlanguagefile('licence',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('licence',$user_language,$reseller_id);
$logusertype="admin";
$logreseller=0;
$logsubuser=0;

View File

@ -38,7 +38,7 @@
if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['voiceserver'])) {
redirect('admin.php');
}
$sprache=getlanguagefile('voice',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('voice',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";

View File

@ -40,7 +40,7 @@
if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['voicemasterserver'])) {
redirect('admin.php');
}
$sprache=getlanguagefile('voice',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('voice',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";
@ -325,7 +325,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
$template_file='Error: '.implode('<br />',$error);
} else {
if ($ui->w('action',3,'post')=='ad' or ($ui->st('d','get')=='ri' and $id=$ui->id('id',10,'get') and $ui->w('action',3,'post')!='ad2')) {
$usprache=getlanguagefile('user',$user_language,$reseller_id,$sql);
$usprache=getlanguagefile('user',$user_language,$reseller_id);
$connected=false;
if ($addtype==2) {
$table=array();
@ -587,7 +587,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$customer=$row['id'];
$cnamenew=$ui->username("$virtualserver_id-username",50,'post');
sendmail('emailuseradd',$customer,$cnamenew,$initialpassword,$sql);
sendmail('emailuseradd',$customer,$cnamenew,$initialpassword);
}
}
} else {

View File

@ -38,7 +38,7 @@
*/
if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['voiceserver'])) redirect('admin.php');
$sprache=getlanguagefile('voice',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('voice',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";
@ -175,7 +175,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
$newuser=2;
}
}
$usprache=getlanguagefile('user',$user_language,$reseller_id,$sql);
$usprache=getlanguagefile('user',$user_language,$reseller_id);
$newArray=array();
$maxPost=@ini_get('suhosin.post.max_vars');
$maxRequests=@ini_get('suhosin.request.max_vars');
@ -243,7 +243,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
$newuser=2;
}
}
$usprache=getlanguagefile('user',$user_language,$reseller_id,$sql);
$usprache=getlanguagefile('user',$user_language,$reseller_id);
$newArray=array();
$maxPost=@ini_get('suhosin.post.max_vars');
$maxRequests=@ini_get('suhosin.request.max_vars');
@ -306,7 +306,7 @@ if ($ui->w('action',4,'post') and !token(true)) {
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$customer=$row['id'];
$cnamenew=$ui->username("${lookUp}-username",50,'post');
sendmail('emailuseradd',$customer,$cnamenew,$initialpassword,$sql);
sendmail('emailuseradd',$customer,$cnamenew,$initialpassword);
}
}
} else {

View File

@ -38,7 +38,7 @@
*/
if ((!isset($admin_id) or $main!=1) or (isset($admin_id) and !$pa['voiceserver'])) redirect('admin.php');
$sprache=getlanguagefile('voice',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('voice',$user_language,$reseller_id);
$loguserid=$admin_id;
$logusername=getusername($admin_id);
$logusertype="admin";

View File

@ -39,7 +39,7 @@ if(!isset($admin_id) or $main!=1 or (isset($admin_id) and !$pa['voiceserver'] an
header('Location: admin.php');
die;
}
$sprache=getlanguagefile('traffic',$user_language,$reseller_id,$sql);
$sprache=getlanguagefile('traffic',$user_language,$reseller_id);
if ($ui->w('action',4,'post') and !token(true)) {
$template_file=$spracheResponse->token;
} else if ($d=='se' and $pa['voiceserverSettings']) {

View File

@ -35,7 +35,7 @@
<span class="icon-bar"></span>
</button>
<p class="navbar-text pull-left">
<?php foreach ($languages as $language){ if ($seo=='Y'){ $lURL=$page_url.'/'.$language.'/'; } else { $lURL=$page_url.'/index.php?l='.$language; } echo '<a href="'.$lURL.'"><img src="'.$page_data->pageurl.'/images/flags/'.$language.'.png" alt="Flag: '.$language.'.png."></a>';} ?>
<?php foreach ($page_data->getLangLinks() as $l=>$v) { echo '<a href="'.$v.'"><img src="'.$page_data->pageurl.'/images/flags/'.$l.'.png" alt="Flag: '.$l.'.png."></a>';}?>
</p>
<div class="nav-collapse collapse">
<ul class="nav">