<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>
<link rel="shortcut icon" href="/favicon.ico" />
<meta name="description" content="Создать Онлайн Android приложение для своего сайта."/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="keywords" content="apk client,android,клиент для сайта,приложение для сайта"/>
<link rel="stylesheet" class="css" href="/style.css"/>
<title>Создать Онлайн Android приложение для своего сайта.</title>
</head>
<body>
<!--
Автор скрипта bage
ICQ 281123
-->
<div class="title"><img src="images/logo.png" title="logotip"/></div>
<div class="menu">
<center>
<a href="images/ImgL2.jpg"/><img src="images/ImgL2.jpg" width="120" height="120" title="Screenshot"/></a><br />
</center>
<?php
include 'incfiles/clear_old_files.php';
clear_old_files();
switch ($_GET['act']){
default:
echo '
<form method="POST" action="?act=step2">
<input type="text" name="url" placeholder="Введите адрес сайта в формате http://sait.ru"/><br />
<input type="submit" value="Создать">
</form>';
break;
case 'step2':
$url = htmlspecialchars(strip_tags($_POST['url']));
if (!filter_var($url,FILTER_VALIDATE_URL))
echo '<font color="red">Неправильный адрес сайта</font>'; else{
include 'incfiles/createzip.php';
include 'incfiles/createzipfromdir.php';
$text = "$url\nen\nAutomatique\nY\n";
$fp = fopen("apk/assets/params.txt", "w");
fwrite($fp, $text);
fclose($fp);
$createZip = new createDirZip;
$createZip->get_files_from_folder('apk/', '');
$fileName = 'downloads/'.time().'_cl.apk';
$fd = fopen($fileName, 'wb');
$out = fwrite($fd, $createZip->getZippedfile());
fclose($fd);
#$createZip->forceDownload($fileName);
echo '
<center>
<img src="images/success.png" title="success"/>
<form method="POST" action="'.$fileName.'">
<input type="submit" value="Скачать">
</form>
</center>';
}
break;
}
?>
</div>
<div class="foot"><a href="/"> (c) by bage 2014 ICQ 281123</a></div>
</body>
</html>