From f9437275e29d196a33f933e80bf9e577a04b5e02 Mon Sep 17 00:00:00 2001 From: Ulrich Block Date: Sun, 24 Nov 2013 12:12:07 +0100 Subject: [PATCH] #17: Partial --- web/css/default/easy-wi.css | 11 +++++------ web/install/install.php | 20 ++++++++++---------- web/reboot.php | 4 ++-- web/stuff/addons.php | 2 +- web/stuff/admin_modules.php | 4 ++-- web/stuff/api_import_users.php | 8 ++++---- web/stuff/api_users.php | 2 +- web/stuff/class_voice.php | 2 +- web/stuff/feeds.php | 2 +- web/stuff/global_userdata.php | 4 ++-- web/stuff/images.php | 6 +++--- web/stuff/init_admin.php | 1 + web/stuff/lendserver.php | 2 +- web/stuff/page_comments.php | 4 ++-- web/stuff/page_downloads.php | 14 +++++++------- web/stuff/page_register.php | 2 +- web/stuff/panel_settings_columns.php | 4 ++-- web/stuff/root_dhcp.php | 4 ++-- web/stuff/root_pxe.php | 4 ++-- web/stuff/root_virtual_server.php | 8 ++++---- web/stuff/roots.php | 2 +- web/stuff/roots_os_templates.php | 6 +++--- web/stuff/settings.php | 4 ++-- web/stuff/tickets.php | 2 +- web/stuff/tickets_reseller.php | 2 +- web/stuff/user.php | 6 +++--- web/stuff/user_groups.php | 6 +++--- web/stuff/userpanel_substitutes.php | 12 ++++++------ web/stuff/userpanel_tickets.php | 6 +++--- web/stuff/voice_master.php | 4 ++-- web/stuff/voice_tsdns.php | 4 ++-- web/stuff/voice_tsdnsrecords.php | 6 +++--- web/template/default/userpanel_header.tpl | 5 +++-- 33 files changed, 87 insertions(+), 86 deletions(-) diff --git a/web/css/default/easy-wi.css b/web/css/default/easy-wi.css index 77e4a123..e2e024e2 100644 --- a/web/css/default/easy-wi.css +++ b/web/css/default/easy-wi.css @@ -1,5 +1,8 @@ -#content { - padding-top: 60px;padding-bottom: 40px; +@media (min-width: 979px) { + #content { + padding-top: 60px; + padding-bottom: 40px; + } } .footable { border-collapse: separate; @@ -39,10 +42,6 @@ vertical-align:middle; } -.navbar .pull-right { - margin-right: 20px; -} - .navbar .btn { margin-top: 0; } diff --git a/web/install/install.php b/web/install/install.php index 22c2ab60..335209b1 100644 --- a/web/install/install.php +++ b/web/install/install.php @@ -601,19 +601,19 @@ $query = $sql->prepare("INSERT INTO `servertypes` (`steamgame`,`appID`,`updates` ('S',232330,1,'css','Counter-Strike: Source','game','srcds_run','','cstrike','67',12,'de_dust2','./%binary% -game cstrike -ip %ip% -port %port% -hostport %port% +maxplayers %slots% +map %map% +tv_port %tvport% +tv_maxclients 1 +clientport %port3%',NULL,'66','a2s','N','','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full','[cfg/server.cfg] cfg\r\ntestslots \"%slots%\"\r\ntestslots2 %slots%\r\n[cfg/server.ini] ini\r\ninistile=\"%slots%\"\r\ninistile2=\"%slots%\"\r\n[cfg/server.xml] xml\r\n%slots%\r\n','password:1',100,4,27015,27016,27017,27018,27019,0,NULL), ('S',90,1,'cstrike','Counter-Strike 1.6','game','hlds_run',NULL,'cstrike','100',12,'de_dust','./%binary% -game cstrike -ip %ip% -port %port% -sys_ticrate %tic% +maxplayers %slots% +map %map% +fps_max %fps%','[Classic Casual = default]\r\n+game_type 0 +game_mode 0 +mapgroup mg_bomb\r\n\r\n[Classic Competitive]\r\n+game_type 0 +game_mode 1 +mapgroup mg_bomb\r\n\r\n[Arms Race]\r\n+game_type 1 +game_mode 0 +mapgroup mg_armsrace\r\n\r\n[Demolition]\r\n+game_type 1 +game_mode 1 +mapgroup mg_demolition\r\n\r\n[Deathmathch]\r\n+game_type 1 +game_mode 2 +mapgroup mg_allclassic','100','hla2s','N','css','server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,2,27015,27016,NULL,NULL,27019,0,NULL), ('S',90,1,'czero','Counter-Strike: Condition Zero','game','hlds_run',NULL,'czero','500',12,'de_dust','./%binary% -game cstrike -ip %ip% -port %port% -pingboost 2 +sys_ticrate %tic% +maxplayers %slots% +map %map% +fps_max %fps%','czero','500','hla2s','Y','css','server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), -('S',232290,1,'dods','Day of Defeat: Source','game','srcds_run','','dod','66',12,'dod_anzio','./%binary% -game dod -tickrate %tic% -ip %ip% -port %port% -autoupdate -verify_all +maxplayers %slots% +map %map% +fps_max %fps% +tv_port %tvport% +replay_port %port3% +alias plugin_load \"test\"',NULL,'100','a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), +('S',232290,1,'dods','Day of Defeat: Source','game','srcds_run','','dod','66',12,'dod_anzio','./%binary% -game dod -ip %ip% -port %port% -verify_all +maxplayers %slots% +map %map% +fps_max %fps% +tv_port %tvport% +replay_port %port3% +alias plugin_load \"test\"',NULL,'100','a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), ('N',NULL,1,'cod4','Call of Duty 4','game','cod4_lnxded',NULL,NULL,'',12,NULL,'./%binary% +set dedicated 2 +exec dedicated.cfg +set fs_basepath %absolutepath%/ +set fs_homepath %absolutepath%/.callofduty4 +set net_ip %ip% +set net_port %port% +set sv_maxclients %slots% +map %map% ','[PAM402 = default]\r\n+set fs_game mods/pam402\r\n\r\n[Punkbuster]\r\n+set sv_punkbuster 1','','cods','N','css','main/dedicated.cfg\r\nmain/server.cfg',NULL,'pswrd:1',100,4,27015,27016,27017,27018,NULL,0,NULL), -('S',550,1,'left4dead','Left 4 Dead','game','srcds_run','l4d','left4dead',NULL,0,'l4d_airport01_greenhouse','./%binary% -game left4dead -ip %ip% -port %port% -autoupdate +map %map% ',NULL,NULL,'a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), -('S',222860,1,'left4dead2','Left 4 Dead 2','game','srcds_run','left4dead2','left4dead2',NULL,0,'c2m1_highway','./%binary% -game left4dead2 -ip %ip% -port %port% -autoupdate +map %map% ',NULL,NULL,'a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), -('Y',NULL,1,'pvkii','Pirates,Vikings and Knights II','game','srcds_run','orangebox','pvkii','100',12,'tw_temple','./%binary% -game pvkii -ip %ip% -port %port% -autoupdate +maxplayers %slots% +map %map% +fps_max %fps% +tv_port %tvport%',NULL,NULL,'a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), -('S',17515,1,'ageofchivalry','Age Of Chivalry','game','srcds_run','orangebox','ageofchivalry','75',12,'aoc_battleground','./%binary% -game ageofchivalry -ip %ip% -port %port% -autoupdate +maxplayers %slots% +map %map% +fps_max %fps% +tv_port %tvport%',NULL,'66','a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), +('S',550,1,'left4dead','Left 4 Dead','game','srcds_run','l4d','left4dead',NULL,0,'l4d_airport01_greenhouse','./%binary% -game left4dead -ip %ip% -port %port% +map %map% ',NULL,NULL,'a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), +('S',222860,1,'left4dead2','Left 4 Dead 2','game','srcds_run','left4dead2','left4dead2',NULL,0,'c2m1_highway','./%binary% -game left4dead2 -ip %ip% -port %port% +map %map% ',NULL,NULL,'a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), +('Y',NULL,1,'pvkii','Pirates,Vikings and Knights II','game','srcds_run','orangebox','pvkii','100',12,'tw_temple','./%binary% -game pvkii -ip %ip% -port %port% +maxplayers %slots% +map %map% +fps_max %fps% +tv_port %tvport%',NULL,NULL,'a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), +('S',17515,1,'ageofchivalry','Age Of Chivalry','game','srcds_run','orangebox','ageofchivalry','75',12,'aoc_battleground','./%binary% -game ageofchivalry -ip %ip% -port %port% +maxplayers %slots% +map %map% +fps_max %fps% +tv_port %tvport%',NULL,'66','a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), ('S',90,1,'dod','Day of Defeat','game','hlds_run',NULL,'dod','100',12,'dod_anzio','./%binary% -game dod -ip %ip% -port %port% +sys_ticrate %tic% +maxplayers %slots% +map %map% +fps_max %fps%','dod','100','hla2s','Y','css','server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), -('S',232370,1,'hl2mp','HL2 Deathmatch','game','srcds_run','','hl2mp','100',12,'dm_lockdown','./%binary% -game hl2mp -ip %ip% -port %port% -autoupdate +maxplayers %slots% +map %map% +fps_max %fps% +tv_port %tvport%',NULL,NULL,'a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), -('S',17705,1,'insurgency','Insurgency','game','srcds_run',NULL,'insurgency','100',12,'ins_abdallah','./%binary% -game insurgency -ip %ip% -port %port% -autoupdate +maxplayers %slots% +map %map% +fps_max %fps%',NULL,'100','a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), -('S',232250,1,'tf','Team Fortress 2','game','srcds_run','orangebox','tf','100',12,'cp_5gorge','./%binary% -game tf -ip %ip% -port %port% -autoupdate +maxplayers %slots% +map %map% +fps_max %fps% +tv_port %tvport%',NULL,NULL,'a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), +('S',232370,1,'hl2mp','HL2 Deathmatch','game','srcds_run','','hl2mp','100',12,'dm_lockdown','./%binary% -game hl2mp -ip %ip% -port %port% +maxplayers %slots% +map %map% +fps_max %fps% +tv_port %tvport%',NULL,NULL,'a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), +('S',17705,1,'insurgency','Insurgency','game','srcds_run',NULL,'insurgency','100',12,'ins_abdallah','./%binary% -game insurgency -ip %ip% -port %port% +maxplayers %slots% +map %map% +fps_max %fps%',NULL,'100','a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), +('S',232250,1,'tf','Team Fortress 2','game','srcds_run','orangebox','tf','100',12,'cp_5gorge','./%binary% -game tf -ip %ip% -port %port% +maxplayers %slots% +map %map% +fps_max %fps% +tv_port %tvport%',NULL,NULL,'a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), ('S',90,1,'tfc','Team Fortress Classic','game','hlds_run',NULL,'tfc','100',12,'2fort','./%binary% -game tfc -ip %ip% -port %port% +sys_ticrate %tic% +maxplayers %slots% +map %map% +fps_max %fps%','tfc','100','hla2s','Y','css','server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), -('S',17505,1,'zps','Zombie Panic Source','game','srcds_run','orangebox','zps','100',12,'zpa_badbayou','./%binary% -game zps -ip %ip% -port %port% -autoupdate +maxplayers %slots% +map %map% +fps_max %fps%',NULL,'100','a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), -('S',740,1,'csgo','Counter-Strike: Global Offensive','gserver','srcds_run',NULL,'csgo',NULL,0,'de_dust','./%binary% -game csgo -console -usercon +ip %ip% +port %port% -maxplayers_override %slots% +map %map% +mapgroup %mapgroup%','[Classic Casual = default]\r\n+game_type 0 +game_mode 0\r\n\r\n[Classic Competitive]\r\n+game_type 0 +game_mode 1\r\n\r\n[Arms Race]\r\n+game_type 1 +game_mode 0\r\n\r\n[Demolition]\r\n+game_type 1 +game_mode 1',NULL,'a2s','N','css','cfg/server.cfg both\r\ncfg/autoexec.cfg both\r\ngamemodes.txt\r\ngamemodes_server.txt',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,'mg_bomb'), +('S',17505,1,'zps','Zombie Panic Source','game','srcds_run','orangebox','zps','100',12,'zpa_badbayou','./%binary% -game zps -ip %ip% -port %port% +maxplayers %slots% +map %map% +fps_max %fps%',NULL,'100','a2s','N','css','cfg/server.cfg both\r\nmaplist.txt full\r\nmapcycle.txt full',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,NULL), +('S',740,1,'csgo','Counter-Strike: Global Offensive','gserver','srcds_run',NULL,'csgo',NULL,0,'de_dust','./%binary% -game csgo -console -usercon +ip %ip% +port %port% -maxplayers_override %slots% +map %map% +mapgroup %mapgroup%','[Classic Casual = default]\r\n+game_type 0 +game_mode 0\r\n\r\n[Classic Competitive]\r\n+game_type 0 +game_mode 1\r\n\r\n[Arms Race]\r\n+game_type 1 +game_mode 0\r\n\r\n[Demolition]\r\n+game_type 1 +game_mode 1',NULL,'a2s','N','css','cfg/server.cfg both\r\ncfg/autoexec.cfg both\r\ngamemodes.txt\r\ngamemodes_server.txt',NULL,'password:1',100,4,27015,27016,27017,27018,27019,0,'mg_bomb'), ('N',NULL,1,'mc','Minecraft','gserver','minecraft_server.jar',NULL,NULL,NULL,0,NULL,'java -Xmx%maxram%M -Xms%minram%M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=%maxcores% -XX:+AggressiveOpts -jar %binary% nogui',NULL,NULL,'minecraft','N','css','server.properties','[server.properties] ini\r\nserver-port=%port%\r\nquery.port=%port%\r\nrcon.port=%port2%\r\nserver-ip=%ip%\r\nmax-players=%slots%',NULL,100,2,25565,25566,NULL,NULL,NULL,0,NULL), ('N',NULL,1,'bukkit','MC Bukkit','gserver','craftbukkit.jar',NULL,NULL,NULL,0,NULL,'java -Xincgc -Xmx%maxram%M -Xms%minram%M -jar %binary% -o true -h %ip% -p %port% -s %slots% --log-append false --log-limit 50000',NULL,NULL,'minecraft','N','','server.properties','[server.properties] ini\r\nserver-port=%port%\r\nquery.port=%port%\r\nrcon.port=%port2%\r\nserver-ip=%ip%\r\nmax-players=%slots%',NULL,100,2,25565,25566,NULL,NULL,NULL,0,NULL), ('N',NULL,1,'samp','GTA San Andreas','gserver','samp03svr',NULL,NULL,NULL,0,NULL,'./%binary%',NULL,NULL,'gtasamp','N','','server.cfg','[server.cfg] cfg\r\nmaxplayers %slots%\r\nport %port%','',10,1,7777,NULL,NULL,NULL,NULL,0,NULL), diff --git a/web/reboot.php b/web/reboot.php index a255397a..8605db3f 100644 --- a/web/reboot.php +++ b/web/reboot.php @@ -137,7 +137,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, $query3 = $sql->prepare("SELECT `id` FROM `voice_server` WHERE `masterserver`=? LIMIT 1"); $query3->execute(array($ts3masterid)); - if ($query3->rowcount()>0) { + if ($query3->rowCount() > 0) { unset($connect_ssh2, $ssh2, $badLogin); $ts3masternotified = $row2['notified']; $addedby = $row2['addedby']; @@ -160,7 +160,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, if (isid($row2['tsdnsServerID'],19)) { $query3 = $sql->prepare("SELECT `id` FROM `voice_tsdns` WHERE `active`='Y' AND `id`=? LIMIT 1"); $query3->execute(array($row2['tsdnsServerID'])); - if ($query3->rowCount()>0) { + if ($query3->rowCount() > 0) { $tsdnsExternalActive = true; } } diff --git a/web/stuff/addons.php b/web/stuff/addons.php index 262ee2fe..bd03fa49 100644 --- a/web/stuff/addons.php +++ b/web/stuff/addons.php @@ -396,7 +396,7 @@ if ($ui->w('action',4, 'post') and !token(true)) { $addon = $query->fetchColumn(); // Check if a row was affected meaning an entry could be deleted. If yes add log entry and display success message - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $query = $sql->prepare("DELETE FROM `addons_allowed` WHERE `addon_id`=? AND `reseller_id`=?"); $query->execute(array($id, $reseller_id)); $query = $sql->prepare("DELETE FROM `addons_installed` WHERE `addonid`=? AND `resellerid`=?"); diff --git a/web/stuff/admin_modules.php b/web/stuff/admin_modules.php index ae0c9bc6..d0e09b79 100644 --- a/web/stuff/admin_modules.php +++ b/web/stuff/admin_modules.php @@ -113,7 +113,7 @@ if ($ui->st('action', 'post') and !token(true)) { 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) { + if ($query->rowCount() > 0) { $errors['get'] = $sprache->get; } } else { @@ -123,7 +123,7 @@ if ($ui->st('action', 'post') and !token(true)) { 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) { + if ($query->rowCount() > 0) { $errors['file'] = $sprache->file; } } else { diff --git a/web/stuff/api_import_users.php b/web/stuff/api_import_users.php index b317b911..807d8353 100644 --- a/web/stuff/api_import_users.php +++ b/web/stuff/api_import_users.php @@ -136,7 +136,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $id = $ui->id('id',19, 'get'); $query = $sql->prepare("SELECT `importID` FROM `api_import` WHERE `importID`!=? AND `domain`=? AND `file`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($id,$ui->domain('domain', 'post'),$ui->startparameter('file', 'post'),$reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $template_file = 'Error: Domain and file already existing'; } else { $query = $sql->prepare("UPDATE `api_import` SET `active`=?,`fetchUpdates`=?,`token`=?,`groupID`=?,`chunkSize`=?,`ssl`=?,`domain`=?,`file`=? WHERE `importID`=? AND `resellerID`=? LIMIT 1"); @@ -146,7 +146,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } else if ($ui->st('d', 'get') == 'ad') { $query = $sql->prepare("SELECT `importID` FROM `api_import` WHERE `domain`=? AND `file`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($ui->domain('domain', 'post'),$ui->startparameter('file', 'post'),$reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $template_file = 'Error: Domain and file already added'; } else { $query = $sql->prepare("INSERT INTO `api_import` (`active`,`fetchUpdates`,`token`,`groupID`,`chunkSize`,`ssl`,`domain`,`file`,`lastID`,`lastCheck`,`resellerID`) VALUES (?,?,?,?,?,?,?,?,0,'0000-00-00 00:00:00',?)"); @@ -156,7 +156,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } else { $template_file = 'admin_404.tpl'; } - if (!isset($template_file) and $query->rowCount()>0) { + if (!isset($template_file) and $query->rowCount() > 0) { $insertlog->execute(); $template_file = $spracheResponse->table_add; } else if (!isset($template_file)) { @@ -192,7 +192,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } $query = $sql->prepare("DELETE FROM `api_import` WHERE `importID`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($id,$reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $loguseraction='%del% %apiimport% '.$domain. '/' . $file; $insertlog->execute(); $template_file = $spracheResponse->table_del; diff --git a/web/stuff/api_users.php b/web/stuff/api_users.php index fa54c45b..8b4b7dcd 100644 --- a/web/stuff/api_users.php +++ b/web/stuff/api_users.php @@ -390,7 +390,7 @@ if (array_value_exists('action','add',$data)) { foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) { $userArray['userdetails'] = $row; } - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $list = true; $tempArray = array(); $query = $sql->prepare("SELECT `id`,`active`,`queryUpdatetime`,`queryPassword`,`queryMap`,`queryMaxplayers`,`queryNumplayers`,`queryName`,`port5`,`serverid`,`pallowed`,`eacallowed`,`protected`,`brandname`,`tvenable`,`war`,`psince`,`serverip`,`port`,`port2`,`port3`,`port4`,`minram`,`maxram`,`slots`,`taskset`,`cores`,`lendserver`,`externalID`,`jobPending` FROM `gsswitch` WHERE `userid`=? AND `resellerid`=? ORDER BY `serverip`,`port`"); diff --git a/web/stuff/class_voice.php b/web/stuff/class_voice.php index 02c72fd5..dbd67234 100644 --- a/web/stuff/class_voice.php +++ b/web/stuff/class_voice.php @@ -984,7 +984,7 @@ function checkDNS ($dns, $id = null, $user_id = null, $type='') { $query2 = $sql->prepare("SELECT `id` FROM `voice_server` WHERE `dns`=? AND `resellerid`=? LIMIT 1"); $query2->execute(array($dns, $reseller_id)); } - if ($query->rowCount()>0 or $query2->rowCount()>0) { + if ($query->rowCount() > 0 or $query2->rowCount() > 0) { return false; } if ($user_id != null) { diff --git a/web/stuff/feeds.php b/web/stuff/feeds.php index afbb19cd..11662417 100644 --- a/web/stuff/feeds.php +++ b/web/stuff/feeds.php @@ -190,7 +190,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { if ($ui->smallletters('action',2, 'post') == 'dl'){ $query = $sql->prepare("DELETE FROM `feeds_url` WHERE `feedID`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($id,$lookUpID)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $query = $sql->prepare("DELETE FROM `feeds_news` WHERE `feedID`=? AND `resellerID`=?"); $query->execute(array($id,$lookUpID)); $loguseraction="%del% Feed $feedUrl"; diff --git a/web/stuff/global_userdata.php b/web/stuff/global_userdata.php index 11103c30..db04d714 100644 --- a/web/stuff/global_userdata.php +++ b/web/stuff/global_userdata.php @@ -110,7 +110,7 @@ if ($ui->st('d', 'get') == 'pw') { $query = $sql->prepare("UPDATE `userdata` SET `updateTime`=NOW(),`security`=? WHERE `id`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($newHash, $lookUpID, $reseller_id)); } - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $template_file = $spracheResponse->table_add; $loguseraction="%psw% %user% $cname"; $insertlog->execute(); @@ -171,7 +171,7 @@ if ($ui->st('d', 'get') == 'pw') { $query = $sql->prepare("UPDATE `userdata` SET `updateTime`=NOW(),`name`=?,`vname`=?,`mail`=?,`phone`=?,`handy`=?,`city`=?,`cityn`=?,`street`=?,`streetn`=?,`mail_backup`=?,`mail_serverdown`=?,`mail_ticket`=?,`mail_gsupdate`=?,`mail_securitybreach`=?,`mail_vserver`=? WHERE `id`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($name,$vname,$mail,$phone,$handy,$city,$cityn,$street,$streetn,$mail_backup,$mail_serverdown,$mail_ticket,$mail_gsupdate,$mail_securitybreach,$mail_vserver,$lookUpID,$reseller_id)); } - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { #https://github.com/easy-wi/developer/issues/5 $changed = array(); foreach ($oldValues as $k => $v) if (isset($$k) and "{$$k}" != $v) $changed[$k] = $v; diff --git a/web/stuff/images.php b/web/stuff/images.php index 49003ead..390c588b 100644 --- a/web/stuff/images.php +++ b/web/stuff/images.php @@ -357,7 +357,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query = $sql->prepare("SELECT `id` FROM `servertypes` WHERE `shorten`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($shorten, $reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $errors['shorten'] = $sprache->abkuerz; } @@ -365,7 +365,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query = $sql->prepare("SELECT `id` FROM `servertypes` WHERE `id`!=? AND `shorten`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($id, $shorten, $reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $errors['shorten'] = $sprache->abkuerz; } @@ -424,7 +424,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query = $sql->prepare("DELETE FROM `servertypes` WHERE `id`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($id, $reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $loguseraction = '%del% %template% ' . $shorten; $insertlog->execute(); $template_file = $spracheResponse->table_del; diff --git a/web/stuff/init_admin.php b/web/stuff/init_admin.php index 9dbecbda..bc63b8f9 100644 --- a/web/stuff/init_admin.php +++ b/web/stuff/init_admin.php @@ -176,4 +176,5 @@ if ($easywiModules['vo'] === true) { if ($easywiModules['ip'] === true) { $what_to_be_included_array['ip'] = 'imprint.php'; + $what_to_be_included_array['si'] = 'panel_settings_imprint.php'; } \ No newline at end of file diff --git a/web/stuff/lendserver.php b/web/stuff/lendserver.php index a38df25b..cd91af40 100644 --- a/web/stuff/lendserver.php +++ b/web/stuff/lendserver.php @@ -67,7 +67,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query = $sql->prepare("UPDATE `lendsettings` SET `active`=?,`activeGS`=?,`activeVS`=?,`mintime`=?,`maxtime`=?,`timesteps`=?,`minplayer`=?,`maxplayer`=?,`playersteps`=?,`mintimeRegistered`=?,`maxtimeRegistered`=?,`timestepsRegistered`=?,`minplayerRegistered`=?,`maxplayerRegistered`=?,`playerstepsRegistered`=?,`vomintime`=?,`vomaxtime`=?,`votimesteps`=?,`vominplayer`=?,`vomaxplayer`=?,`voplayersteps`=?,`vomintimeRegistered`=?,`vomaxtimeRegistered`=?,`votimestepsRegistered`=?,`vominplayerRegistered`=?,`vomaxplayerRegistered`=?,`voplayerstepsRegistered`=?,`shutdownempty`=?,`shutdownemptytime`=?,`ftpupload`=?,`ftpuploadpath`=AES_ENCRYPT(?,?),`lendaccess`=? WHERE `resellerid`=? LIMIT 1"); $query->execute(array($ui->active('active', 'post'), $ui->w('activeGS',1, 'post'), $ui->w('activeVS',1, 'post'), $ui->id('mintime',3, 'post'), $ui->id('maxtime',4, 'post'), $ui->id('timesteps',3, 'post'), $ui->id('minplayer',3, 'post'), $maxplayer = $ui->id('maxplayer',3, 'post'), $ui->id('playersteps',3, 'post'), $ui->id('mintimeRegistered',3, 'post'), $ui->id('maxtimeRegistered',4, 'post'), $ui->id('timestepsRegistered',3, 'post'), $ui->id('minplayerRegistered',3, 'post'), $ui->id('maxplayerRegistered',3, 'post'), $ui->id('playerstepsRegistered',3, 'post'), $vomintime = $ui->id('vomintime',3, 'post'), $ui->id('vomaxtime',4, 'post'), $ui->id('votimesteps',3, 'post'), $ui->id('vominplayer',3, 'post'), $ui->id('vomaxplayer',3, 'post'), $ui->id('voplayersteps',3, 'post'), $ui->id('vomintimeRegistered',3, 'post'), $ui->id('vomaxtimeRegistered',4, 'post'), $ui->id('votimestepsRegistered',3, 'post'), $ui->id('vominplayerRegistered',3, 'post'), $ui->id('vomaxplayerRegistered',3, 'post'), $ui->id('voplayerstepsRegistered',3, 'post'), $ui->active('shutdownempty', 'post'), $ui->id('shutdownemptytime',4, 'post'), $ui->w('ftpupload',1, 'post'), $ui->url('ftpuploadpath', 'post'), $aeskey, $ui->id('lendaccess',1, 'post'), $reseller_id)); - $template_file = ($query->rowCount()>0) ? $spracheResponse->table_add : $spracheResponse->error_table;; + $template_file = ($query->rowCount() > 0) ? $spracheResponse->table_add : $spracheResponse->error_table;; } else { $query = $sql->prepare("SELECT *,AES_DECRYPT(`ftpuploadpath`,?) AS `decyptedftpuploadpath` FROM `lendsettings` WHERE `resellerid`=? LIMIT 1"); diff --git a/web/stuff/page_comments.php b/web/stuff/page_comments.php index f3f00636..e7516c50 100644 --- a/web/stuff/page_comments.php +++ b/web/stuff/page_comments.php @@ -61,7 +61,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } $query = $sql->prepare("UPDATE `page_comments` SET `homepage`=?,`markedSpam`=?,`moderateAccepted`=?,`comment`=? WHERE `commentID`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($url,$ui->active('markedSpam', 'post'),$ui->active('moderateAccepted', 'post'),$ui->post['comment'],$id,$reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $loguseraction='%mod% %comment% '.$ui->id('id',19, 'get'); $insertlog->execute(); $template_file = $spracheResponse->table_add; @@ -94,7 +94,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } else if ($ui->st('d', 'get') == 'dl' and $ui->id('id',19, 'get')){ $query = $sql->prepare("DELETE FROM `page_comments` WHERE `commentID`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($ui->id('id',19, 'get'),$reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $loguseraction='%del% %comment% '.$ui->id('id',19, 'get'); $insertlog->execute(); $template_file = $spracheResponse->table_del; diff --git a/web/stuff/page_downloads.php b/web/stuff/page_downloads.php index b92ea445..8ca930b0 100644 --- a/web/stuff/page_downloads.php +++ b/web/stuff/page_downloads.php @@ -98,19 +98,19 @@ if ($ui->w('action', 4, 'post') and !token(true)) { if ($ui->st('action', 'post') == 'ad') { $query = $sql->prepare("SELECT 1 FROM `page_downloads` WHERE `fileName`=? LIMIT 1"); $query->execute(array($ui->names('fileName',255, 'post'))); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $template_file = $spracheResponse->error_name; } else { $query = $sql->prepare("INSERT INTO `page_downloads` (`show`,`description`,`fileName`,`date`,`resellerID`) VALUES (?,?,?,NOW(),?)"); $query->execute(array($ui->w('show',1, 'post'),$ui->names('description',255, 'post'),$ui->names('fileName',255, 'post'),$reseller_id)); - if ($query->rowCount()>0) $changed = true; + if ($query->rowCount() > 0) $changed = true; $template_file = $spracheResponse->table_add; $id = $sql->lastInsertId(); } } else if ($ui->st('action', 'post') == 'md' and $ui->id('id', 10, 'get')) { $query = $sql->prepare("UPDATE `page_downloads` SET `show`=?,`description`=?,`fileName`=? WHERE `fileID`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($ui->w('show',1, 'post'),$ui->names('description',255, 'post'),$ui->names('fileName',255, 'post'),$id,$reseller_id)); - if ($query->rowCount()>0) $changed = true; + if ($query->rowCount() > 0) $changed = true; } if ($id) { if ($_FILES["upload"]["error"]===0) { @@ -149,7 +149,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { foreach($array as $language) { if (small_letters_check($language,2)) { $query->execute(array($id,$language,$ui->description('text', 'post',$language),$reseller_id)); - if ($query->rowCount()>0) $changed = true; + if ($query->rowCount() > 0) $changed = true; } } $query = $sql->prepare("SELECT `lang` FROM `translations` WHERE `type`='pd' AND `transID`=? AND `resellerID`=?"); @@ -158,13 +158,13 @@ if ($ui->w('action', 4, 'post') and !token(true)) { foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) { if (!in_array($row['lang'],$array)) { $query2->execute(array($addonid, $row['lang'],$reseller_id)); - if ($query2->rowCount()>0) $changed = true; + if ($query2->rowCount() > 0) $changed = true; } } } else { $query = $sql->prepare("DELETE FROM `translations` WHERE `type`='pd' AND `transID`=? AND `resellerID`=?"); $query->execute(array($id,$reseller_id)); - if ($query->rowCount()>0) $changed = true; + if ($query->rowCount() > 0) $changed = true; } $template_file = (isset($changed)) ? $spracheResponse->table_add : $spracheResponse->error_table; } else { @@ -173,7 +173,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } else if ($ui->st('action', 'post') == 'dl' and $ui->id('id', 10, 'get')) { $query = $sql->prepare("DELETE FROM `page_downloads` WHERE `fileID`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($id,$reseller_id)); - $template_file = ($query->rowCount()>0) ? $spracheResponse->table_del : 'admin_404.tpl'; + $template_file = ($query->rowCount() > 0) ? $spracheResponse->table_del : 'admin_404.tpl'; $query = $sql->prepare("DELETE FROM `translations` WHERE `type`='pd' AND `transID`=? AND `resellerID`=?"); $query->execute(array($id,$reseller_id)); unlink(EASYWIDIR . "/downloads/${id}/${fileExtension}"); diff --git a/web/stuff/page_register.php b/web/stuff/page_register.php index 17661cc4..c29be946 100644 --- a/web/stuff/page_register.php +++ b/web/stuff/page_register.php @@ -183,7 +183,7 @@ if (isset($registration) and in_array($registration, array('A','M','D'))) { $query->execute(array($userID,$groupID)); // If is is in DB and mail could be send - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { if ($registration == 'A') { $template_file = $page_sprache->registerAdmin; } else if ($registration == 'M') { diff --git a/web/stuff/panel_settings_columns.php b/web/stuff/panel_settings_columns.php index 4cbdddaa..26120f83 100644 --- a/web/stuff/panel_settings_columns.php +++ b/web/stuff/panel_settings_columns.php @@ -83,7 +83,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } else { $template_file = 'admin_404.tpl'; } - if (!isset($template_file) and $query->rowCount()>0) { + if (!isset($template_file) and $query->rowCount() > 0) { $array = array(); $query = $sql->prepare("INSERT INTO `translations` (`type`,`transID`,`lang`,`text`,`resellerID`) VALUES ('cc',?,?,?,0) ON DUPLICATE KEY UPDATE `text`=VALUES(`text`)"); if ($ui->smallletters('language',2, 'post')) { @@ -166,7 +166,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } else if ($ui->st('action', 'post') == 'dl' and isset($name)) { $query = $sql->prepare("DELETE FROM `custom_columns_settings` WHERE `customID`=? LIMIT 1"); $query->execute(array($id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $query = $sql->prepare("DELETE FROM `custom_columns` WHERE `customID`=?"); $query->execute(array($id)); $query = $sql->prepare("DELETE FROM `translations` WHERE `type`='cc' AND `transID`=?"); diff --git a/web/stuff/root_dhcp.php b/web/stuff/root_dhcp.php index 595aab4c..64c2a236 100644 --- a/web/stuff/root_dhcp.php +++ b/web/stuff/root_dhcp.php @@ -126,7 +126,7 @@ if (in_array($ui->st('d', 'get'), array('md','ad'))){ } else { $template_file = 'admin_404.tpl'; } - if (!isset($template_file) and $query->rowCount()>0) { + if (!isset($template_file) and $query->rowCount() > 0) { $insertlog->execute(); $template_file = $spracheResponse->table_add; } else if (!isset($template_file)) { @@ -148,7 +148,7 @@ if (in_array($ui->st('d', 'get'), array('md','ad'))){ } else if ($ui->smallletters('action',2, 'post') == 'dl') { $query = $sql->prepare("DELETE FROM `rootsDHCP` WHERE `id`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($id,$reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $loguseraction="%del% DHCP"; $insertlog->execute(); $template_file = $spracheResponse->table_del; diff --git a/web/stuff/root_pxe.php b/web/stuff/root_pxe.php index cd44028b..97733ada 100644 --- a/web/stuff/root_pxe.php +++ b/web/stuff/root_pxe.php @@ -122,7 +122,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } else { $template_file = 'admin_404.tpl'; } - if (!isset($template_file) and $query->rowCount()>0) { + if (!isset($template_file) and $query->rowCount() > 0) { $insertlog->execute(); $template_file = $spracheResponse->table_add; } else if (!isset($template_file)) { @@ -144,7 +144,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } else if ($ui->smallletters('action',2, 'post') == 'dl') { $query = $sql->prepare("DELETE FROM `rootsPXE` WHERE `id`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($id,$reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $loguseraction="%del% PXE"; $insertlog->execute(); $template_file = $spracheResponse->table_del; diff --git a/web/stuff/root_virtual_server.php b/web/stuff/root_virtual_server.php index 253bd87e..f070d179 100644 --- a/web/stuff/root_virtual_server.php +++ b/web/stuff/root_virtual_server.php @@ -64,7 +64,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice $besthostcpu = ''; $query = $sql->prepare("SELECT h.`id`, h.`ip`, h.`description`, h.`cores`, h.`mhz`, h.`hdd`, h.`ram`, h.`maxserver`, h.`maxserver`-COUNT(DISTINCT v.`id`) AS `freeserver`, h.`ram`-SUM(v.`minram`) AS `freeram`, h.`cores`*h.`mhz`-SUM(v.`cores`*v.`minmhz`) AS `freecpu`, h.`active` AS `active`, h.`resellerid` AS `resellerid`,h.`thin`,h.`thinquota` FROM `virtualhosts` h LEFT JOIN `virtualcontainer` v ON v.`hostid`=h.`id` GROUP BY h.`id` HAVING ((`freeserver` > 0 OR `freeserver` IS NULL) AND (`freecpu` > 0 OR `freecpu` IS NULL) AND (`freeram` > 0 OR `freeram` IS NULL) AND `active`='Y' AND (`resellerid`=? OR `resellerid`='0')) ORDER BY `freeram` DESC,`freecpu` DESC,`freeserver` DESC"); $query->execute(array($reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) { unset($ramused); unset($cpucore); @@ -528,7 +528,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice } $query = $sql->prepare("INSERT INTO `virtualcontainer` (`userid`,`hostid`,`ip`,`ips`,`mac`,`port`,`pass`,`cores`,`minmhz`,`maxmhz`,`hddsize`,`mountpoint`,`ram`,`minram`,`maxram`,`status`,`resellerid`) VALUES (:userid, :hostid, :ip, :ips, :mac, :port, AES_ENCRYPT(:pass, :aeskey), :cores, :minmhz, :maxmhz, :hddsize, :mountpoint, :ram, :minram, :maxram, :status, :resellerid)"); $query->execute(array(':userid' => $userid,':hostid' => $hostid,':ip' => $ip,':ips' => $ips,':mac' => $mac,':port' => '21',':pass' => $pass,':aeskey' => $aeskey,':cores' => $cores,':minmhz' => $minmhz,':maxmhz' => $maxmhz,':hddsize' => $hddsize,':mountpoint' => $mountpoint,':ram' => $ram,':minram' => $minram,':maxram' => $maxram,':status' => 0,':resellerid' => $resellerid)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $loguseraction="%add% %vserver% $ip Ram: $ram; MinRam: $minram; MaxRam: $maxram; Cores: $cores; MinMhz: $minmhz; MaxMhz: $maxmhz; HDD: $hddsize"; $insertlog->execute(); $template_file = $spracheResponse->table_add; @@ -563,7 +563,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice $query->execute(array($id)); $query = $sql->prepare("INSERT INTO `jobs` (`api`,`type`,`hostID`,`invoicedByID`,`affectedID`,`userID`,`name`,`status`,`date`,`action`,`resellerid`) VALUES ('D','vs',?,?,?,?,?,NULL,NOW(),'dl',?)"); $query->execute(array($hostID,$admin_id,$id,$userID,$ip,$reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $query = $sql->prepare("UPDATE `virtualcontainer` SET `jobPending`='Y' WHERE `id`=? AND `resellerid`=?"); $query->execute(array($id,$reseller_id)); $loguseraction="%del% %vserver% $ip"; @@ -772,7 +772,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lVs']) and $lice $query = $sql->prepare("INSERT INTO `jobs` (`api`,`type`,`hostID`,`invoicedByID`,`affectedID`,`userID`,`name`,`status`,`date`,`action`,`extraData`,`resellerid`) VALUES ('D','vs',NULL,?,?,?,?,NULL,NOW(),'md',?,?)"); $query->execute(array($admin_id,$id,$userid,$ip,json_encode(array('oldactive' => $row['active'], 'oldip' => $row['ip'], 'oldmac' => $row['mac'])),$reseller_id)); } - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $loguseraction="%mod% %vserver% $ip Ram: $ram; MinRam: $minram; MaxRam: $maxram; Cores: $cores; MinMhz: $minmhz; MaxMhz: $maxmhz; HDD: $hddsize"; $insertlog->execute(); $template_file = $spracheResponse->table_add; diff --git a/web/stuff/roots.php b/web/stuff/roots.php index 7ea44d56..16fd8723 100644 --- a/web/stuff/roots.php +++ b/web/stuff/roots.php @@ -234,7 +234,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query = $sql->prepare("DELETE FROM `rserverdata` WHERE `id`=? AND `resellerid`=? AND (`userID` IS NULL OR `userID` IN ('',0)) LIMIT 1"); $query->execute(array($id,$reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $query = $sql->prepare("DELETE m.* FROM `rservermasterg` m LEFT JOIN `rserverdata` r ON m.`serverid`=r.`id` WHERE r.`id` IS NULL"); $query->execute(); $query = $sql->prepare("SELECT `id` FROM `gsswitch` WHERE `rootID`=? AND `resellerid`=?"); diff --git a/web/stuff/roots_os_templates.php b/web/stuff/roots_os_templates.php index e0f40807..d88fc81e 100644 --- a/web/stuff/roots_os_templates.php +++ b/web/stuff/roots_os_templates.php @@ -97,7 +97,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } else { $template_file = 'admin_404.tpl'; } - if (!isset($template_file) and isset($query) and $query->rowCount()>0) { + if (!isset($template_file) and isset($query) and $query->rowCount() > 0) { $insertlog->execute(); $template_file = $spracheResponse->table_add; } else if (!isset($template_file)) { @@ -110,7 +110,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query = $sql->prepare("SELECT `description` FROM `resellerimages` WHERE `id`=? LIMIT 1"); $query->execute(array($id)); $description = $query->fetchColumn(); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $template_file = "admin_root_templates_dl.tpl"; } else { $template_file = 'Error: No such ID'; @@ -121,7 +121,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $description = $query->fetchColumn(); $query = $sql->prepare("DELETE FROM `resellerimages` WHERE `id`=? LIMIT 1"); $query->execute(array($id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $loguseraction="%del% %virtualimage% $description"; $insertlog->execute(); $template_file = $spracheResponse->table_del; diff --git a/web/stuff/settings.php b/web/stuff/settings.php index 848c7364..20847b24 100644 --- a/web/stuff/settings.php +++ b/web/stuff/settings.php @@ -310,7 +310,7 @@ if (isset($logininclude) and $logininclude == true) { $query->execute(array($logdate)); $query = $sql->prepare("SELECT `id` FROM `badips` WHERE `badip`=? AND reason='bot' LIMIT 1"); $query->execute(array($loguserip)); - if ($query->rowcount()>0) { + if ($query->rowCount() > 0) { die(); } $query = $sql->prepare("SELECT `faillogins` FROM `settings` WHERE `resellerid`=0 LIMIT 1"); @@ -318,7 +318,7 @@ if (isset($logininclude) and $logininclude == true) { $allowedfails = $query->fetchColumn(); $query = $sql->prepare("SELECT `id` FROM `badips` WHERE `badip`=? AND `reason`='password' AND `failcount`>=? LIMIT 1"); $query->execute(array($loguserip, $allowedfails)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { die('Your IP is banned'); } } diff --git a/web/stuff/tickets.php b/web/stuff/tickets.php index bb926de0..e09f98a8 100644 --- a/web/stuff/tickets.php +++ b/web/stuff/tickets.php @@ -428,7 +428,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query = $sql->prepare("UPDATE `tickets` SET `state`=?,`supporter`=?,`priority`=? WHERE `id`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($ui->w('state',1, 'post'),$ui->id('supporter',10, 'post'),$ui->id('priority',1, 'post'),$id,$reseller_id)); } - $template_file = ($query->rowCount()>0) ? $spracheResponse->table_add : $spracheResponse->error_table; + $template_file = ($query->rowCount() > 0) ? $spracheResponse->table_add : $spracheResponse->error_table; if (isset($ui->post['ticket']) and strlen($ui->post['ticket'])>0) { $query = $sql->prepare("INSERT INTO `tickets_text` (`ticketID`,`message`,`writeDate`,`userID`,`resellerid`) VALUES (?,?,?,?,?)"); $query->execute(array($id,$ui->post['ticket'],$logdate,$admin_id,$reseller_id)); diff --git a/web/stuff/tickets_reseller.php b/web/stuff/tickets_reseller.php index 6cbe707a..e5ba7f30 100644 --- a/web/stuff/tickets_reseller.php +++ b/web/stuff/tickets_reseller.php @@ -134,7 +134,7 @@ if ($ui->st('d', 'get') == 'ad') { } else if ($ui->st('action', 'get') == 'op') { $query = $sql->prepare("UPDATE `tickets` SET `state`='R' WHERE `id`=? AND `resellerid`=? AND `state`='D' LIMIT 1"); $query->execute(array($id,$resellerid)); - $template_file = ($query->rowCount()>0) ? $spracheResponse->table_add : 'admin_404.tpl'; + $template_file = ($query->rowCount() > 0) ? $spracheResponse->table_add : 'admin_404.tpl'; } else if (!$ui->smallletters('action',2, 'post') or $ui->smallletters('action',2, 'get') == 'md') { $table = array(); $default_language = $rSA['language']; diff --git a/web/stuff/user.php b/web/stuff/user.php index e7b06afb..99cadcb3 100644 --- a/web/stuff/user.php +++ b/web/stuff/user.php @@ -103,12 +103,12 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $bogus = $cname; $query = $sql->prepare("SELECT `id` FROM `userdata` WHERE `cname`=? LIMIT 1"); $query->execute(array($cname)); - if ($query->rowCount()>0) unset($cname,$bogus); + if ($query->rowCount() > 0) unset($cname,$bogus); else { # https://github.com/easy-wi/developer/issues/2 "Substitutes" $query = $sql->prepare("SELECT 1 FROM `userdata_substitutes` WHERE `loginName`=? LIMIT 1"); $query->execute(array($cname)); - if ($query->rowCount()>0) unset($cname,$bogus); + if ($query->rowCount() > 0) unset($cname,$bogus); } } else { $error[] = 'Username transmitted empty!'; @@ -407,7 +407,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { updateJobs($id,$reseller_id); } } - if ($query->rowCount()>0 and isset($deleted)) { + if ($query->rowCount() > 0 and isset($deleted)) { $update = $sql->prepare("UPDATE `userdata` SET `jobPending`='Y' WHERE `id`=? AND `resellerid`=?"); $update->execute(array($id,$resellerid)); $template_file .= $spracheResponse->table_del ."
"; diff --git a/web/stuff/user_groups.php b/web/stuff/user_groups.php index 245731b9..4b6008c1 100644 --- a/web/stuff/user_groups.php +++ b/web/stuff/user_groups.php @@ -311,7 +311,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } $query = $sql->prepare("SELECT `id` FROM `usergroups` WHERE `name`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($ui->names('groupname',255, 'post'),$lookIpID)); - if ($query->rowcount()>0) { + if ($query->rowCount() > 0) { $template_file = 'Error: Group already exists'; } else { $query = $sql->prepare("INSERT INTO `usergroups` (`active`,`defaultgroup`,`grouptype`,`name`,`root`,`user`,`user_users`,`log`,`settings`,`cms_comments`,`cms_settings`,`cms_pages`,`cms_news`,`gserver`,`addons`,`gimages`,`roots`,`restart`,`gsResetting`,`miniroot`,`fastdl`,`modfastdl`,`useraddons`,`usersettings`,`ftpaccess`,`addvserver`,`modvserver`,`delvserver`,`usevserver`,`vserversettings`,`vserverhost`,`voicemasterserver`,`voiceserver`,`resellertemplates`,`ftpbackup`,`traffic`,`trafficsettings`,`lendserver`,`tickets`,`usertickets`,`voiceserverSettings`,`voiceserverStats`,`lendserverSettings`,`pxeServer`,`dhcpServer`,`dedicatedServer`,`eac`,`masterServer`,`userGroups`,`userPassword`,`apiSettings`,`jobs`,`updateEW`,`ipBans`,`mysql`,`mysql_settings`,`resellerid`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); @@ -321,7 +321,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } else { $template_file = 'admin_404.tpl'; } - if (!isset($template_file) and $query->rowCount()>0) { + if (!isset($template_file) and $query->rowCount() > 0) { $insertlog->execute(); $template_file = $spracheResponse->table_add; } else if (!isset($template_file)) { @@ -362,7 +362,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { if (isset($default_id) and $default_id != $id and $default_id != null and $default_id != 0) { $query = $sql->prepare("DELETE FROM `usergroups` WHERE `id`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($id,$lookIpID)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $query = $sql->prepare("DELETE FROM `userdata_groups` WHERE `groupID`=? AND `resellerID`=?"); $query->execute(array($id,$lookIpID)); $loguseraction='%del% %group% '.$name; diff --git a/web/stuff/userpanel_substitutes.php b/web/stuff/userpanel_substitutes.php index f14b88cf..55ca0a23 100644 --- a/web/stuff/userpanel_substitutes.php +++ b/web/stuff/userpanel_substitutes.php @@ -138,13 +138,13 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query = $sql->prepare("SELECT 1 FROM `userdata_substitutes` WHERE `loginName`=? LIMIT 1"); $query->execute(array($ui->names('loginName',255, 'post'))); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $userError = $spracheResponse->error_username; } $query = $sql->prepare("SELECT 1 FROM `userdata` WHERE `cname`=? LIMIT 1"); $query->execute(array($ui->names('loginName',255, 'post'))); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $userError = $spracheResponse->error_username; } @@ -165,7 +165,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $changed = true; $id = $sql->lastInsertId(); } @@ -198,7 +198,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query->execute(array($ui->active('active', 'post'),$ui->names('name',255, 'post'),$ui->names('vname',255, 'post'),$id,$user_id,$reseller_id)); } - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $changed = true; } } @@ -210,7 +210,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) { if (!$ui->id($row['oType'],10, 'post') or !in_array($row['oID'],(array)$ui->id($row['oType'],10, 'post'))) { $query2->execute(array($row['oType'], $row['oID'],$id,$reseller_id)); - if ($query2->rowCount()>0) { + if ($query2->rowCount() > 0) { $changed = true; } } @@ -219,7 +219,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { if ($ui->id($v,10, 'post')) { $query = $sql->prepare("INSERT INTO `userdata_substitutes_servers` (`sID`,`oType`,`oID`,`resellerID`) VALUES (?,?,?,?) ON DUPLICATE KEY UPDATE `sID`=`sID`"); foreach ($ui->id($v,10, 'post') as $oID) $query->execute(array($id,$v,$oID,$reseller_id)); - if ($query->rowCount()>0) $changed = true; + if ($query->rowCount() > 0) $changed = true; } } $template_file = (isset($changed)) ? $spracheResponse->table_add : $spracheResponse->error_table; diff --git a/web/stuff/userpanel_tickets.php b/web/stuff/userpanel_tickets.php index cc0b1948..40e832d4 100644 --- a/web/stuff/userpanel_tickets.php +++ b/web/stuff/userpanel_tickets.php @@ -123,7 +123,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } else if ($ui->st('action', 'get') == 'op') { $query = $sql->prepare("UPDATE `tickets` SET `state`='R' WHERE `id`=? AND `userid`=? AND `resellerid`=? AND `state`='D' LIMIT 1"); $query->execute(array($id,$user_id,$reseller_id)); - $template_file = ($query->rowCount()>0) ? $spracheResponse->table_add : $spracheResponse->error_table; + $template_file = ($query->rowCount() > 0) ? $spracheResponse->table_add : $spracheResponse->error_table; } else if (!$ui->smallletters('action',2, 'post') or $ui->smallletters('action',2, 'get') == 'md') { $table = array(); $default_language = $rSA['language']; @@ -184,7 +184,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { if ($ui->id('userPriority',1, 'post')) { $query=($state == 'A') ? $sql->prepare("UPDATE `tickets` SET `state`='P',`userPriority`=? WHERE `id`=? AND `resellerid`=? LIMIT 1") : $sql->prepare("UPDATE `tickets` SET `userPriority`=? WHERE `id`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($ui->id('userPriority',1, 'post'),$id,$reseller_id)); - $template_file = ($query->rowCount()>0) ? $spracheResponse->table_add : $spracheResponse->error_table; + $template_file = ($query->rowCount() > 0) ? $spracheResponse->table_add : $spracheResponse->error_table; } if (isset($ui->post['ticket']) and strlen($ui->post['ticket'])>0) { $query = $sql->prepare("INSERT INTO `tickets_text` (`ticketID`,`message`,`writeDate`,`userID`,`resellerid`) VALUES (?,?,?,?,?)"); @@ -205,7 +205,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } else if ($ui->smallletters('action',2, 'post') == 'cl' and $ui->id('rating',1, 'post')) { $query = $sql->prepare("UPDATE `tickets` SET `state`='C', `rating`=?,`comment`=? WHERE `id`=? AND `userid`=? AND `resellerid`=? AND `state`!='C' LIMIT 1"); $query->execute(array($ui->id('rating',1, 'post'),$ui->description('comment', 'post'),$id,$user_id,$reseller_id)); - $template_file = ($query->rowCount()>0) ? $spracheResponse->table_add : $spracheResponse->error_table; + $template_file = ($query->rowCount() > 0) ? $spracheResponse->table_add : $spracheResponse->error_table; } } else { $table = array(); diff --git a/web/stuff/voice_master.php b/web/stuff/voice_master.php index 05b5964f..a5834d70 100644 --- a/web/stuff/voice_master.php +++ b/web/stuff/voice_master.php @@ -142,7 +142,7 @@ if ($ui->w('action',4, 'post') and !token(true)) { $query->execute(array($ui->id('managedForID', 10, 'post'), $reseller_id)); } - $resellerToBeWritten = ($query->rowCount()>0) ? $ui->id('managedForID', 10, 'post') : null; + $resellerToBeWritten = ($query->rowCount() > 0) ? $ui->id('managedForID', 10, 'post') : null; } @@ -889,7 +889,7 @@ if ($ui->w('action',4, 'post') and !token(true)) { $ip = $query->fetchColumn(); } } - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $query = $sql->prepare("DELETE FROM `voice_masterserver` WHERE `id`=? AND `resellerid`=? LIMIT 1"); $query->execute(array($id, $reseller_id)); $query = $sql->prepare("DELETE FROM `voice_server` WHERE `masterserver`=? AND `resellerid`=?"); diff --git a/web/stuff/voice_tsdns.php b/web/stuff/voice_tsdns.php index c4e6aedb..3d444131 100644 --- a/web/stuff/voice_tsdns.php +++ b/web/stuff/voice_tsdns.php @@ -427,7 +427,7 @@ if ($ui->w('action',4, 'post') and !token(true)) { $query->execute(array($id, $reseller_id)); $ip = $query->fetchColumn(); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $query = $sql->prepare("UPDATE `voice_masterserver` SET `tsdnsServerID`=NULL WHERE `tsdnsServerID`=? AND `resellerid`=?"); $query->execute(array($id, $reseller_id)); @@ -436,7 +436,7 @@ if ($ui->w('action',4, 'post') and !token(true)) { } // Check if a row was affected meaning an entry could be deleted. If yes add log entry and display success message - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $template_file = $spracheResponse->table_del; $loguseraction = '%del% %voserver% %tsdns% ' . $ip; diff --git a/web/stuff/voice_tsdnsrecords.php b/web/stuff/voice_tsdnsrecords.php index 5b41efda..fd7122c9 100644 --- a/web/stuff/voice_tsdnsrecords.php +++ b/web/stuff/voice_tsdnsrecords.php @@ -262,7 +262,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query = $sql->prepare("UPDATE `voice_dns` SET `active`=?,`dns`=?,`ip`=?,`port`=?,`externalID`=? WHERE `dnsID`=? AND `resellerID`=? LIMIT 1"); $query->execute(array($active,$dns,$ip,$port,$externalID,$id,$reseller_id)); } - if (isset($queryip) and !isset($insterfail) and $query->rowCount()>0) { + if (isset($queryip) and !isset($insterfail) and $query->rowCount() > 0) { $loguseraction="%$log% %voserver% %dns% $ip"; $insertlog->execute(); } else if (isset($queryip) and isset($insterfail)) { @@ -311,10 +311,10 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $keyname = $row['keyname']; $bitversion = $row['bitversion']; } - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $query = $sql->prepare("DELETE FROM `voice_dns` WHERE `dnsID`=? AND `resellerid`=?"); $query->execute(array($id,$reseller_id)); - if ($query->rowCount()>0) { + if ($query->rowCount() > 0) { $template_file = tsdns('dl',$queryip,$ssh2port,$ssh2user,$publickey,$keyname,$ssh2password,0,$serverdir,$bitversion, array($ip), array($port), array($dns),$reseller_id); $loguseraction="%del% %voserver% %dns% $deleteDNS"; $insertlog->execute(); diff --git a/web/template/default/userpanel_header.tpl b/web/template/default/userpanel_header.tpl index 38a1a6aa..318b21c0 100644 --- a/web/template/default/userpanel_header.tpl +++ b/web/template/default/userpanel_header.tpl @@ -54,6 +54,7 @@ +