-
Notifications
You must be signed in to change notification settings - Fork 0
/
handle.php
23 lines (23 loc) · 886 Bytes
/
handle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
$dbhost = 'localhost';
$dbuser = 'endedman';
$dbpass = '';
$dbname = 'jstore2';
$link = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
$rows = "SELECT * FROM apps";
$d = mysqli_query($link, $rows);
$app_name = preg_replace('/\s+/', ' ', $_GET['app_name']);
$dev_name=$_GET['dev_name'];
$icon=$_GET['icon'];
$banner=$_GET['banner'];
// $file=$_GET['file'];
$date=date('l jS \of F Y h:i:s A');
$token=md5($date);
$paid=$_GET['paid'];
$fee=$_GET['fee'];
$paytoken=$_GET['paytoken'];
mysqli_query($link, "INSERT into apps (app_name, dev_name, icon, banner, file, token, paid, fee, paytoken) values ('$app_name', '$dev_name', '$icon', '$banner', 'http://j2me.ml/app/$app_name/$app_name.jar', '$token', '$paid', '$fee', '$paytoken')");
printf('Succeeded, SQL query accepted');
mkdir('/var/www/endedman/data/www/j2me.ml/app/'.$app_name.'/');
printf('Succeeded, mkdir executed!');
?>