Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php //https://server1.vittgam.net/jsbeautify-test/ require_once("adodb5/adodb.inc.php"..
Decoded Output download
<?php
//https://server1.vittgam.net/jsbeautify-test/
require_once("adodb5/adodb.inc.php");
class topodds
{
private $db;
private $stbl;
private $ttbl;
private $mtbl;
private $dsn;
private function jsonout($rows)
{
$ {
"input"
} = json_encode($ {
"rows"
});
echo$ {
"input"
};
}
public function __construct($dbserver,$database,$dbusername,$dbpassword,$sportTable,$marketTable,$tournamentTable)
{
$this - > db = & ADONewConnection("odbc_mssql");
$this - > dsn = "Driver={SQL Server};Server=$dbserver;
Database=$database;";
$this - > db - > Connect($this - > dsn, "$dbusername", "$dbpassword");
$this - > stbl = $ {
"sportTable"
};
$this - > ttbl = $ {
"tournamentTable"
};
$this - > mtbl = $ {
"marketTable"
};
}
public function fetchSports()
{
$ {
"query"
} = "SELECT DISTINCT sportName,{$this->stbl}.sportId FROM {$this->stbl},{$this->mtbl},{$this->ttbl} WHERE {$this->ttbl}.sportID = {$this->stbl}.sportID AND {$this->mtbl}.tournamentId = {$this->ttbl}.tournamentId AND wagerEnd > GetDate() AND status < 6 ORDER BY sportName";
$this - > db - > debug = -99;
$ {
"rows"
} = $this - > db - > GetAll($ {
"query"
});
$ {
"rows"
} = array("data" = > $ {
"rows"
});
$this - > jsonout($ {
"rows"
});
}
public function fetchTournaments($id)
{
$fdopxi = "query";
if (strpos($ {
"id"
}, "|") !== false) {
$ {
"id"
} = str_replace("|", ",", $ {
"id"
});
}
$ {
$fdopxi
} = "SELECT DISTINCT {$this->ttbl}.tournamentName,{$this->ttbl}.tournamentId,{$this->stbl}.sportId, {$this->stbl}.sportName FROM {$this->stbl},{$this->mtbl},{$this->ttbl} WHERE {$this->ttbl}.sportID = {$this->stbl}.sportID AND {$this->mtbl}.tournamentId = {$this->ttbl}.tournamentId AND wagerEnd > GetDate() AND status < 6 AND {$this->stbl}.sportid IN ($id) ORDER BY {$this->stbl}.sportId,{$this->ttbl}.tournamentName";
$ {
"rows"
} = $this - > db - > GetAll($ {
"query"
});
$ {
"data"
} = array();
foreach($ {
"rows"
}
as$ {
"row"
}) {
$wdhiegzhbmsm = "row";
$ {
"data"
}[$ {
"row"
}[2]]["data"][] = array($ {
"row"
}[1], $ {
"row"
}[0], );
$wknogryatyhg = "row";
$ {
"data"
}[$ {
$wdhiegzhbmsm
}[2]]["sportName"] = $ {
$wknogryatyhg
}[3];
}
$this - > jsonout($ {
"data"
});
}
function fetchEvents($id)
{
if (strpos($ {
"id"
}, "|") !== false) {
$ {
"id"
} = str_replace("|", ",", $ {
"id"
});
}
$jumsknygmko = "rows";
$mllqqxb = "data";
$rxsvri = "data";
$ {
"query"
} = "SELECT DISTINCT {$this->ttbl}.tournamentId,eventName,eventNumber,eventId,eventStatus,betType,eventDate FROM {$this->stbl},{$this->mtbl},{$this->ttbl} WHERE {$this->ttbl}.sportID = {$this->stbl}.sportID AND {$this->mtbl}.tournamentId = {$this->ttbl}.tournamentId AND wagerEnd > GetDate() AND status < 6 AND {$this->ttbl}.tournamentId IN ($id) ORDER BY {$this->ttbl}.tournamentId, EventName";
$ {
"rows"
} = $this - > db - > GetAll($ {
"query"
});
$ {
$mllqqxb
} = array();
foreach($ {
$jumsknygmko
}
as$ {
"row"
}) {
$fndbunnj = "row";
$oqtapgleaad = "row";
if ($ {
"row"
}[5] == 1) {
$qzhldpsi = "rows2";
$wqabgtlhsx = "sql";
$ {
"sql"
} = "SELECT marketId, marketName1,marketName2,homePrice,drawPrice,awayPrice FROM market WHERE eventId = {$row[3]}";
$ {
"rows2"
} = $this - > db - > GetAll($ {
$wqabgtlhsx
});
foreach($ {
$qzhldpsi
}
as$ {
"mp"
}) {
$scwyxwiblb = "row";
$uczhzcklef = "mp";
$ {
"data"
}[$ {
"row"
}[0]][] = array(htmlentities($ {
$scwyxwiblb
}[1])." : ".htmlentities($ {
$uczhzcklef
}[1])." VS ".htmlentities($ {
"mp"
}[2]), $ {
"row"
}[2], "$row[3].$mp[0]", $ {
"row"
}[4], $ {
"row"
}[5], $ {
"row"
}[6]);
}
}
else$ {
"data"
}[$ {
$oqtapgleaad
}[0]][] = array($ {
"row"
}[1], $ {
"row"
}[2], $ {
"row"
}[3], $ {
"row"
}[4], $ {
"row"
}[5], $ {
$fndbunnj
}[6]);
}
$this - > jsonout($ {
$rxsvri
});
}
public function fetchMarkets($id)
{
$qldvjvy = "pos";
"data" = "data";
$cqwpjmbc = "id";
if (strpos($ {
$cqwpjmbc
}, "|") !== false) {
$iqpcrrgp = "id";
$ {
"id"
} = str_replace("|", ",", $ {
$iqpcrrgp
});
}
$ccycvgsd = "data";
$ujinohgjq = "querys";
$ {
$qldvjvy
} = strpos($ {
"id"
}, ".");
$ {
"data"
} = array();
$ {
"querys"
} = array();
if ($ {
"pos"
} === false) {
$ {
"querys"
}[] = "SELECT eventId,marketId,marketName1,status,eventStatus,currentPrice,CONVERT(CHAR(20),displayEnd,20) AS displayEnd2,betType,marketName2,homePrice,drawPrice,awayPrice FROM sport,market,tournament WHERE market.eventStatus < 6 AND tournament.sportID = sport.sportID AND market.tournamentId = tournament.tournamentId AND eventId IN ($id) ORDER BY marketId";
} else {
$tfuoicvrk = "id";
$ {
"ids"
} = explode(",", $ {
"id"
});
foreach($ {
"ids"
}
as$ {
$tfuoicvrk
}) {
$cwwlxfdmm = "pos";
$ {
$cwwlxfdmm
} = strpos($ {
"id"
}, ".");
if ($ {
"pos"
} === false) {
$ {
"querys"
}[] = "SELECT eventId,marketId,marketName1,status,eventStatus,currentPrice,CONVERT(CHAR(20),displayEnd,20) AS displayEnd2,betType,marketName2,homePrice,drawPrice,awayPrice FROM sport,market,tournament WHERE market.eventStatus < 6 AND tournament.sportID = sport.sportID AND market.tournamentId = tournament.tournamentId AND eventId = ($id) ORDER BY marketId";
} else {
$ {
"mid"
} = explode(".", $ {
"id"
});
$ {
"querys"
}[] = "SELECT eventId,marketId,marketName1,status,eventStatus,currentPrice,CONVERT(CHAR(20),displayEnd,20) AS displayEnd2,betType,marketName2,homePrice,drawPrice,awayPrice FROM sport,market,tournament WHERE market.eventStatus < 6 AND tournament.sportID = sport.sportID AND market.tournamentId = tournament.tournamentId AND eventId = $mid[0] AND market.marketId = $mid[1] ORDER BY marketId";
}
}
}
foreach($ {
$ujinohgjq
}
as$ {
"query"
}) {
$zndkqxzdb = "rows";
$ogywajzbssh = "rows";
$this - > db - > debug = -099;
"row" = "row";
$pykfcht = "query";
$ {
$zndkqxzdb
} = $this - > db - > GetAll($ {
$pykfcht
});
foreach($ {
$ogywajzbssh
}
as$ {
"row"
}) {
"row" = "row";
if ($ {
"row"
}[7] < > 1) {
$lrbuhgh = "row";
$yvhgylum = "row";
$tfroelqn = "row";
$ {
"data"
}[$ {
"row"
}[0]]["data"][] = array($ {
"row"
}[1], $ {
"row"
}[2], $ {
$lrbuhgh
}[5], $ {
"row"
}[3]);
$ {
"data"
}[$ {
"row"
}[0]]["eventStatus"] = $ {
"row"
}[4];
$ {
"data"
}[$ {
$tfroelqn
}[0]]["eventDate"] = strtotime($ {
"row"
}[6]);
$ {
"data"
}[$ {
"row"
}[0]]["eventType"] = $ {
$yvhgylum
}[7];
} else {
$rbbwgjdeughv = "row";
$peboqvkyqe = "data";
$rvqqerndjypd = "row";
$qlqnplvcmi = "data";
$rngfsxrykgl = "row";
$mmpoggo = "row";
$hfkghoweahd = "row";
$ {
$peboqvkyqe
}[$ {
"row"
}[0].".".$ {
"row"
}[1]]["data"][] = array($ {
"row"
}[1], $ {
"row"
}[2], $ {
$hfkghoweahd
}[8], $ {
$rvqqerndjypd
}[9], $ {
"row"
}[10], $ {
"row"
}[11], $ {
"row"
}[3]);
$ztfsoxsfd = "data";
$ {
$qlqnplvcmi
}[$ {
$rbbwgjdeughv
}[0].".".$ {
"row"
}[1]]["eventStatus"] = $ {
$mmpoggo
}[4];
$ {
$ztfsoxsfd
}[$ {
"row"
}[0].".".$ {
"row"
}[1]]["eventDate"] = strtotime($ {
"row"
}[6]);
$ {
"data"
}[$ {
$rngfsxrykgl
}[0].".".$ {
"row"
}[1]]["eventType"] = $ {
"row"
}[7];
}
}
}
$this - > jsonout($ {
$ccycvgsd
});
}
public function findMarkets($arg='',$sportId=0)
{
$fppjoyiy = "rows";
if ($ {
"sportId"
} == 0) $ {
"query"
} = "SELECT DISTINCT {$this->ttbl}.tournamentName,{$this->ttbl}.tournamentId,{$this->stbl}.sportId,{$this->mtbl}.eventId FROM {$this->stbl},{$this->mtbl},{$this->ttbl} WHERE {$this->ttbl}.sportID = {$this->stbl}.sportID AND {$this->mtbl}.tournamentId = {$this->ttbl}.tournamentId AND wagerEnd > GetDate() AND status < 6 AND (marketName1 LIKE '%$arg%' OR marketName2 LIKE '%$arg%') ORDER BY {$this->ttbl}.tournamentName";
else$ {
"query"
} = "SELECT DISTINCT {$this->ttbl}.tournamentName,{$this->ttbl}.tournamentId,{$this->stbl}.sportId,{$this->mtbl}.eventId FROM {$this->stbl},{$this->mtbl},{$this->ttbl} WHERE {$this->ttbl}.sportID = {$this->stbl}.sportID AND {$this->mtbl}.tournamentId = {$this->ttbl}.tournamentId AND wagerEnd > GetDate() AND status < 6 AND {$this->stbl}.sportid = $sportId AND (marketName1 LIKE '%$arg%' OR marketName2 LIKE '%$arg%') ORDER BY {$this->ttbl}.tournamentName";
$etfnqbtqcq = "data";
$ {
$fppjoyiy
} = $this - > db - > GetAll($ {
"query"
});
$nlmjtbmmyve = "rows";
$ {
"data"
} = array();
foreach($ {
$nlmjtbmmyve
}
as$ {
"row"
}) {
$ptouehdn = "row";
$ {
"data"
}[$ {
"row"
}[2]][$ {
$ptouehdn
}[1]][] = $ {
"row"
}[3];
}
$ {
"data"
} = array("data" = > $ {
$etfnqbtqcq
});
$this - > jsonout($ {
"data"
});
}
public function version()
{
$ {
"data"
} = array("data" = > "3.0.0");
$this - > jsonout($ {
"data"
});
}
}
?>
Did this file decode correctly?
Original Code
<?php
//https://server1.vittgam.net/jsbeautify-test/
require_once("adodb5/adodb.inc.php");
class topodds
{
private $db;
private $stbl;
private $ttbl;
private $mtbl;
private $dsn;
private function jsonout($rows)
{
$ {
"input"
} = json_encode($ {
"rows"
});
echo$ {
"input"
};
}
public function __construct($dbserver,$database,$dbusername,$dbpassword,$sportTable,$marketTable,$tournamentTable)
{
$this - > db = & ADONewConnection("odbc_mssql");
$this - > dsn = "Driver={SQL Server};Server=$dbserver;
Database=$database;";
$this - > db - > Connect($this - > dsn, "$dbusername", "$dbpassword");
$this - > stbl = $ {
"sportTable"
};
$this - > ttbl = $ {
"tournamentTable"
};
$this - > mtbl = $ {
"marketTable"
};
}
public function fetchSports()
{
$ {
"query"
} = "SELECT DISTINCT sportName,{$this->stbl}.sportId FROM {$this->stbl},{$this->mtbl},{$this->ttbl} WHERE {$this->ttbl}.sportID = {$this->stbl}.sportID AND {$this->mtbl}.tournamentId = {$this->ttbl}.tournamentId AND wagerEnd > GetDate() AND status < 6 ORDER BY sportName";
$this - > db - > debug = -99;
$ {
"rows"
} = $this - > db - > GetAll($ {
"query"
});
$ {
"rows"
} = array("data" = > $ {
"rows"
});
$this - > jsonout($ {
"rows"
});
}
public function fetchTournaments($id)
{
$fdopxi = "query";
if (strpos($ {
"id"
}, "|") !== false) {
$ {
"id"
} = str_replace("|", ",", $ {
"id"
});
}
$ {
$fdopxi
} = "SELECT DISTINCT {$this->ttbl}.tournamentName,{$this->ttbl}.tournamentId,{$this->stbl}.sportId, {$this->stbl}.sportName FROM {$this->stbl},{$this->mtbl},{$this->ttbl} WHERE {$this->ttbl}.sportID = {$this->stbl}.sportID AND {$this->mtbl}.tournamentId = {$this->ttbl}.tournamentId AND wagerEnd > GetDate() AND status < 6 AND {$this->stbl}.sportid IN ($id) ORDER BY {$this->stbl}.sportId,{$this->ttbl}.tournamentName";
$ {
"rows"
} = $this - > db - > GetAll($ {
"query"
});
$ {
"data"
} = array();
foreach($ {
"rows"
}
as$ {
"row"
}) {
$wdhiegzhbmsm = "row";
$ {
"data"
}[$ {
"row"
}[2]]["data"][] = array($ {
"row"
}[1], $ {
"row"
}[0], );
$wknogryatyhg = "row";
$ {
"data"
}[$ {
$wdhiegzhbmsm
}[2]]["sportName"] = $ {
$wknogryatyhg
}[3];
}
$this - > jsonout($ {
"data"
});
}
function fetchEvents($id)
{
if (strpos($ {
"id"
}, "|") !== false) {
$ {
"id"
} = str_replace("|", ",", $ {
"id"
});
}
$jumsknygmko = "rows";
$mllqqxb = "data";
$rxsvri = "data";
$ {
"query"
} = "SELECT DISTINCT {$this->ttbl}.tournamentId,eventName,eventNumber,eventId,eventStatus,betType,eventDate FROM {$this->stbl},{$this->mtbl},{$this->ttbl} WHERE {$this->ttbl}.sportID = {$this->stbl}.sportID AND {$this->mtbl}.tournamentId = {$this->ttbl}.tournamentId AND wagerEnd > GetDate() AND status < 6 AND {$this->ttbl}.tournamentId IN ($id) ORDER BY {$this->ttbl}.tournamentId, EventName";
$ {
"rows"
} = $this - > db - > GetAll($ {
"query"
});
$ {
$mllqqxb
} = array();
foreach($ {
$jumsknygmko
}
as$ {
"row"
}) {
$fndbunnj = "row";
$oqtapgleaad = "row";
if ($ {
"row"
}[5] == 1) {
$qzhldpsi = "rows2";
$wqabgtlhsx = "sql";
$ {
"sql"
} = "SELECT marketId, marketName1,marketName2,homePrice,drawPrice,awayPrice FROM market WHERE eventId = {$row[3]}";
$ {
"rows2"
} = $this - > db - > GetAll($ {
$wqabgtlhsx
});
foreach($ {
$qzhldpsi
}
as$ {
"mp"
}) {
$scwyxwiblb = "row";
$uczhzcklef = "mp";
$ {
"data"
}[$ {
"row"
}[0]][] = array(htmlentities($ {
$scwyxwiblb
}[1])." : ".htmlentities($ {
$uczhzcklef
}[1])." VS ".htmlentities($ {
"mp"
}[2]), $ {
"row"
}[2], "$row[3].$mp[0]", $ {
"row"
}[4], $ {
"row"
}[5], $ {
"row"
}[6]);
}
}
else$ {
"data"
}[$ {
$oqtapgleaad
}[0]][] = array($ {
"row"
}[1], $ {
"row"
}[2], $ {
"row"
}[3], $ {
"row"
}[4], $ {
"row"
}[5], $ {
$fndbunnj
}[6]);
}
$this - > jsonout($ {
$rxsvri
});
}
public function fetchMarkets($id)
{
$qldvjvy = "pos";
"data" = "data";
$cqwpjmbc = "id";
if (strpos($ {
$cqwpjmbc
}, "|") !== false) {
$iqpcrrgp = "id";
$ {
"id"
} = str_replace("|", ",", $ {
$iqpcrrgp
});
}
$ccycvgsd = "data";
$ujinohgjq = "querys";
$ {
$qldvjvy
} = strpos($ {
"id"
}, ".");
$ {
"data"
} = array();
$ {
"querys"
} = array();
if ($ {
"pos"
} === false) {
$ {
"querys"
}[] = "SELECT eventId,marketId,marketName1,status,eventStatus,currentPrice,CONVERT(CHAR(20),displayEnd,20) AS displayEnd2,betType,marketName2,homePrice,drawPrice,awayPrice FROM sport,market,tournament WHERE market.eventStatus < 6 AND tournament.sportID = sport.sportID AND market.tournamentId = tournament.tournamentId AND eventId IN ($id) ORDER BY marketId";
} else {
$tfuoicvrk = "id";
$ {
"ids"
} = explode(",", $ {
"id"
});
foreach($ {
"ids"
}
as$ {
$tfuoicvrk
}) {
$cwwlxfdmm = "pos";
$ {
$cwwlxfdmm
} = strpos($ {
"id"
}, ".");
if ($ {
"pos"
} === false) {
$ {
"querys"
}[] = "SELECT eventId,marketId,marketName1,status,eventStatus,currentPrice,CONVERT(CHAR(20),displayEnd,20) AS displayEnd2,betType,marketName2,homePrice,drawPrice,awayPrice FROM sport,market,tournament WHERE market.eventStatus < 6 AND tournament.sportID = sport.sportID AND market.tournamentId = tournament.tournamentId AND eventId = ($id) ORDER BY marketId";
} else {
$ {
"mid"
} = explode(".", $ {
"id"
});
$ {
"querys"
}[] = "SELECT eventId,marketId,marketName1,status,eventStatus,currentPrice,CONVERT(CHAR(20),displayEnd,20) AS displayEnd2,betType,marketName2,homePrice,drawPrice,awayPrice FROM sport,market,tournament WHERE market.eventStatus < 6 AND tournament.sportID = sport.sportID AND market.tournamentId = tournament.tournamentId AND eventId = $mid[0] AND market.marketId = $mid[1] ORDER BY marketId";
}
}
}
foreach($ {
$ujinohgjq
}
as$ {
"query"
}) {
$zndkqxzdb = "rows";
$ogywajzbssh = "rows";
$this - > db - > debug = -099;
"row" = "row";
$pykfcht = "query";
$ {
$zndkqxzdb
} = $this - > db - > GetAll($ {
$pykfcht
});
foreach($ {
$ogywajzbssh
}
as$ {
"row"
}) {
"row" = "row";
if ($ {
"row"
}[7] < > 1) {
$lrbuhgh = "row";
$yvhgylum = "row";
$tfroelqn = "row";
$ {
"data"
}[$ {
"row"
}[0]]["data"][] = array($ {
"row"
}[1], $ {
"row"
}[2], $ {
$lrbuhgh
}[5], $ {
"row"
}[3]);
$ {
"data"
}[$ {
"row"
}[0]]["eventStatus"] = $ {
"row"
}[4];
$ {
"data"
}[$ {
$tfroelqn
}[0]]["eventDate"] = strtotime($ {
"row"
}[6]);
$ {
"data"
}[$ {
"row"
}[0]]["eventType"] = $ {
$yvhgylum
}[7];
} else {
$rbbwgjdeughv = "row";
$peboqvkyqe = "data";
$rvqqerndjypd = "row";
$qlqnplvcmi = "data";
$rngfsxrykgl = "row";
$mmpoggo = "row";
$hfkghoweahd = "row";
$ {
$peboqvkyqe
}[$ {
"row"
}[0].".".$ {
"row"
}[1]]["data"][] = array($ {
"row"
}[1], $ {
"row"
}[2], $ {
$hfkghoweahd
}[8], $ {
$rvqqerndjypd
}[9], $ {
"row"
}[10], $ {
"row"
}[11], $ {
"row"
}[3]);
$ztfsoxsfd = "data";
$ {
$qlqnplvcmi
}[$ {
$rbbwgjdeughv
}[0].".".$ {
"row"
}[1]]["eventStatus"] = $ {
$mmpoggo
}[4];
$ {
$ztfsoxsfd
}[$ {
"row"
}[0].".".$ {
"row"
}[1]]["eventDate"] = strtotime($ {
"row"
}[6]);
$ {
"data"
}[$ {
$rngfsxrykgl
}[0].".".$ {
"row"
}[1]]["eventType"] = $ {
"row"
}[7];
}
}
}
$this - > jsonout($ {
$ccycvgsd
});
}
public function findMarkets($arg='',$sportId=0)
{
$fppjoyiy = "rows";
if ($ {
"sportId"
} == 0) $ {
"query"
} = "SELECT DISTINCT {$this->ttbl}.tournamentName,{$this->ttbl}.tournamentId,{$this->stbl}.sportId,{$this->mtbl}.eventId FROM {$this->stbl},{$this->mtbl},{$this->ttbl} WHERE {$this->ttbl}.sportID = {$this->stbl}.sportID AND {$this->mtbl}.tournamentId = {$this->ttbl}.tournamentId AND wagerEnd > GetDate() AND status < 6 AND (marketName1 LIKE '%$arg%' OR marketName2 LIKE '%$arg%') ORDER BY {$this->ttbl}.tournamentName";
else$ {
"query"
} = "SELECT DISTINCT {$this->ttbl}.tournamentName,{$this->ttbl}.tournamentId,{$this->stbl}.sportId,{$this->mtbl}.eventId FROM {$this->stbl},{$this->mtbl},{$this->ttbl} WHERE {$this->ttbl}.sportID = {$this->stbl}.sportID AND {$this->mtbl}.tournamentId = {$this->ttbl}.tournamentId AND wagerEnd > GetDate() AND status < 6 AND {$this->stbl}.sportid = $sportId AND (marketName1 LIKE '%$arg%' OR marketName2 LIKE '%$arg%') ORDER BY {$this->ttbl}.tournamentName";
$etfnqbtqcq = "data";
$ {
$fppjoyiy
} = $this - > db - > GetAll($ {
"query"
});
$nlmjtbmmyve = "rows";
$ {
"data"
} = array();
foreach($ {
$nlmjtbmmyve
}
as$ {
"row"
}) {
$ptouehdn = "row";
$ {
"data"
}[$ {
"row"
}[2]][$ {
$ptouehdn
}[1]][] = $ {
"row"
}[3];
}
$ {
"data"
} = array("data" = > $ {
$etfnqbtqcq
});
$this - > jsonout($ {
"data"
});
}
public function version()
{
$ {
"data"
} = array("data" = > "3.0.0");
$this - > jsonout($ {
"data"
});
}
}
?>
Function Calls
None |
Stats
MD5 | d4a7655280b586474c1c974031834afe |
Eval Count | 0 |
Decode Time | 88 ms |