<?php
$jsondata = file_get_contents('../includes/appsnscripts.json');
$data = json_decode($jsondata, true);
$json = $data['info'];
$updatedate = $json['da'];
$apksize = $json['si'];
$apkcontact = $json['co'];
$apklink = $json['li'];
$version_code = $json['vc'];
$apkdownloadlink = $json['ai'];

if (isset($_GET['hl'])) {
	echo '<!DOCTYPE html>' . "\n";
	echo '<html lang="en">' . "\n";
	echo "\n";
	echo '<head>' . "\n";
	echo "\n";
	echo '  <meta charset="utf-8">' . "\n";
	echo '  <meta http-equiv="X-UA-Compatible" content="IE=edge">' . "\n";
	echo '  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">' . "\n";
	echo '  <meta name="description" content="">' . "\n";
	echo '  <meta name="author" content="appsnscripts Panels">' . "\n";
	echo '  <meta name="google" content="notranslate">' . "\n";
	echo '  <title>Ultra Smarters Update</title>' . "\n";
	echo '  <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">' . "\n";
	echo '  <link rel="icon" href="../favicon.ico" type="image/x-icon">' . "\n";
	echo '</head> ' . "\n";
	echo '<div class="hAyfc"><div class="BgcNfc">Updated</div><span class="htlgb"><div class="IQ1z0d"><span class="htlgb">' . $updatedate . '</span></div></span></div><div class="hAyfc"><div class="BgcNfc">Size</div><span class="htlgb"><div class="IQ1z0d"><span class="htlgb">' . $apksize . '</span></div></span></div><div class="hAyfc"><div class="BgcNfc">Installs</div><span class="htlgb"><div class="IQ1z0d"><span class="htlgb">5,000,000+</span></div></span></div><div class="hAyfc"><div class="BgcNfc">Current Version</div><span class="htlgb"><div class="IQ1z0d"><span class="htlgb">' . $version_code . '</span></div></span></div><div class="hAyfc"><div class="BgcNfc">Requires Android</div><span class="htlgb"><div class="IQ1z0d"><span class="htlgb">4.2 and up</span></div></span></div><div class="hAyfc"><div class="BgcNfc">Content rating</div><span class="htlgb"><div class="IQ1z0d"><span class="htlgb"><div>PEGI 3</div><div><a href="https://t.me/appsnscripts">Learn more</a></div></span></div></span></div><div class="hAyfc"><div class="BgcNfc">In-app Products</div><span class="htlgb"><div class="IQ1z0d"><span class="htlgb">Contact appsnscripts regarding Purchase</span></div></span></div><div class="hAyfc"><div class="BgcNfc">Permission</div><span class="htlgb"><div class="IQ1z0d"><span class="htlgb"><a jsname="Hly47e" class="hrTbp ">N/A</a></div></span></div></span></div><div class="JHTxhe IQ1z0d YjpPef"><div class="hAyfc"><div class="BgcNfc">Contact Us</div><span class="htlgb"><div class="IQ1z0d"><span class="htlgb"><a target="_blank" href="' . $apklink . '">' . $apkcontact . '</a></span></div></span></div></div><div class="hAyfc"><div class="BgcNfc">Created By</div><span class="htlgb"><div class="IQ1z0d"><span class="htlgb"><div><a href="https://t.me/appsnscripts">appsnscripts Panels</a></div></span></div></span></div>' . "\n";
	echo "\n";
}
else {
	header('HTTP/1.1 301 Moved Permanently');
	header('Location: ' . $apkdownloadlink . '', true, 301);
}

echo '<style>' . "\n";
echo '    .hAyfc {' . "\n";
echo '    background: #fff;' . "\n";
echo '    display: cover;' . "\n";
echo '    font-size: 14px;' . "\n";
echo '    line-height: 24px;' . "\n";
echo '    margin-bottom: 30px;' . "\n";
echo '    margin-top: 30px;' . "\n";
echo '    padding: 0 50px 0 50px;' . "\n";
echo '    position: relative;' . "\n";
echo '    text-align: center;' . "\n";
echo '}' . "\n";
echo '</style>';

?>