Hello {$_SERVER['PHP_AUTH_USER']}.
";
//echo "You entered {$_SERVER['PHP_AUTH_PW']} as your password.
";$_SESSION['name'] = $_SERVER['REMOTE_ADDR'];
error_log($_SERVER['REMOTE_ADDR'], 0);
error_log($_SESSION['user'], 0);
echo "";
}
$datadefaultstring = file_get_contents("./themes/default/config.json");
$app = filter_var($_GET['app'], FILTER_SANITIZE_STRING);
$url = filter_var($_GET['url'], FILTER_SANITIZE_STRING);
if ($app == null)
{
echo "Nebola zadaná aplikácia
";
exit;
} else
{
if (file_exists("./themes/" . $app))
{
$datastring = file_get_contents('./themes/' . $app . '/config' . ($url !== "" ?
$url : "") . '.json');
}
}
$dataobj = json_decode($datastring);
//var_dump($dataobj);
if (isset($dataobj->application->lang))
{
$lang_json = file_get_contents('./lang/' . $dataobj->application->lang . '.json');
} else
{
$lang_json = file_get_contents('./lang/sk.json');
}
if (json_last_error() != 0)
{
echo "Konfigurácia aplikacii nieje validná
";
var_dump($dataobj);
exit;
}
$db = new SQLite3('./themes/' . $dataobj->application->pfolder . '/viewerdb.db');
$apprnd_id = filter_var($_GET['ssid'], FILTER_SANITIZE_STRING);;
global $appid;
function select($sqlcommand, $db, $returnjson)
{
$stmt = $db->query($sqlcommand);
$row = array();
$i = 0;
while ($res = $stmt->fetchArray(SQLITE3_ASSOC))
{
if (!isset($res)) continue;
$row[$i] = $res;
$i++;
}
if ($returnjson)
{
return json_encode($row[0], JSON_UNESCAPED_SLASHES | JSON_FORCE_OBJECT |
JSON_UNESCAPED_UNICODE);
} else
{
return $row;
}
}
$version = file_get_contents('./rev.txt');
if ($_GET['ssid'] != null)
{
$resultx = select("SELECT appjson FROM apps_save where appid=" . $apprnd_id, $db, true);
}
?>
application->name;
?>
';
//echo '';
}else {
echo '';
}
?>