<?php
set_time_limit(240);
require($_SERVER['DOCUMENT_ROOT']."/classes/import_templates/import_templates.php");
function microtime_float() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
$body = "The following updates are done:\r\n\r\n";
$test_import = new Import_templates;
$test_import->handle_keywords(1, "yes");
$body .= $test_import->show_messages();
$test_import->handle_categories(1, "yes");
$body .= $test_import->show_messages();
$test_import->handle_screenshots(1, "yes");
$body .= $test_import->show_messages();
$test_import->handle_categorie_list("en", "yes");
$body .= $test_import->show_messages();
$test_import->handle_authors("yes");
$body .= $test_import->show_messages();
$test_import->get_zero_thumbs();
$body .= $test_import->show_messages();
$test_import->write_log(1);
$time_end = microtime_float();
$time = $time_end - $time_start;
$body .= "The script's execution time was ".number_format($time, 4, ".", "")." seconds...";
$header = "From: \"Webmaster\" <mail@provider.com>\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/plain; charset=\"utf-8\"\r\n";
$header .= "Content-Transfer-Encoding: 7bit\r\n";
$subject = "Template import from ".date("d-m-Y");
mail("google@gmail.com", $subject, $body, $header);
exit;
?>
|