Вот код с 900 до 950 строк
/**
* AJAX call
* manual activation
* @return json encoded array
*/
static function on_ajax_manual_activation() {
//required data
if (empty($_POST['td_server_id']) ||
empty($_POST['envato_code']) ||
empty($_POST['td_key']))
{
return;
}
$id = trim($_POST['td_server_id']);
$ec = preg_replace('/\s+/', '', $_POST['envato_code']);
$ad = trim($_POST['td_key']);
//return buffer
$buffy = array(
'envato_code' => $ec,
'theme_activated' => false
);
if (self::self_check($id, $ec, $ad) === true) {
td_util::ajax_handle($ec);
$buffy['theme_activated'] = true;
}
die(json_encode($buffy));
}
/**
* AJAX call
* @return json encoded array
*/
static function on_ajax_db_check() {
//return buffer
$buffy = array(
'db_is_set' => false,
'db_time' => 0
);
$current_date = date('U');
if (TD_DEPLOY_MODE == 'dev') {
$delay = 40;
} else {
$delay = 604800;
}