<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');

if(!is_file('install.lock')) {
	include_once '../slex.php';
	xCore::start();
	xNet::post('http://program.maiyun.net/products/filiant/install_callback.php', array(
		'qq' => $_POST['qq'],
		'email' => $_POST['email'],
		'mphone' => $_POST['mphone'],
		'url' => $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']
	));
	// --- 创建 AppData ---
	$user = new xUser(1);
	$rootFolder = new xFolder(0, $user);
	xFolder::create('AppData', $user, $rootFolder);
	// --- 锁定 ---
	rename('_install.lock', 'install.lock');
	echo json_encode(array(
		'result' => '1'
	));
}

