<?php // a cron php command line -al futtat és annak a beállításai nem jók joomla keretrendszerhez. function process_queue() { //variables $url = "http://li-de.tk/cron.php"; //open connection $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); $result = curl_exec($ch); //clean up curl_close($ch); return $result; } $result = process_queue(); ?>
//<pre> is not good enough for us here } else { //send proper plaintext header @header('Content-Type: text/plain; charset=utf-8'); } while (@ob_end_flush()) { } @raise_memory_limit('128M'); $timenow = time(); mtrace("Server Time: " . date('r', $timenow) . "\n\n"); // END stuff copied from /admin/cron.php. require_once $CFG->dirroot . '/course/sharelib.php'; // default: start running last task after 5 minutes $endtime = time() + 5 * 60; $status = TRUE; while ($status && time() < $endtime) { if (!process_queue()) { break; } } mtrace('Remaining tasks in rollover queue: ' . count_records('block_admin_rollover_queue')); // BEGIN stuff copied from /admin/cron.php. See that file for comments. @session_unset(); @session_destroy(); $difftime = microtime_diff($starttime, microtime()); mtrace("Execution took " . $difftime . " seconds"); /// finish the IE hack if (check_browser_version('MSIE')) { echo "</xmp>"; } // END stuff copied from /admin/cron.php.
$confirm = optional_param('confirm', '', PARAM_ALPHANUM); $auto = optional_param('auto', '', PARAM_INT); $navlinks = array(array('name' => 'View rollover queue', 'link' => null, 'type' => 'misc')); $navigation = build_navigation($navlinks); print_header_simple(get_string('rollover_queue_title', 'block_curr_admin'), get_string('rollover_queue_heading', 'block_curr_admin'), $navigation, ''); if (!empty($auto)) { $endtime = time() + $auto * 60; $status = TRUE; while ($status && time() < $endtime) { if (!process_queue()) { break; } } } else { if (!empty($run)) { process_queue($run); } else { if (!empty($del)) { if (empty($confirm)) { $task = get_record('block_admin_rollover_queue', 'id', $del); $confirm = md5($del); $lyes = $CFG->wwwroot . '/course/rollover_queue.php?del=' . $del . '&confirm=' . $confirm; $lno = $CFG->wwwroot . '/course/rollover_queue.php'; $a = new stdClass(); $a->template = get_field('course', 'fullname', 'id', $task->templateid); $a->crn = get_field('course', 'fullname', 'id', $task->courseid); notice_yesno(get_string('queue_delete_confirm', 'rollover', $a), $lyes, $lno); print_footer(); exit; } if (delete_records('block_admin_rollover_queue', 'id', $del)) {
<?php include_once dirname(__FILE__) . "/frame.class.inc"; include_once dirname(__FILE__) . "/class.unix.inc"; if (isset($_GET["repair-hour"])) { repair_hour(); exit; } if (isset($_GET["processes-queue"])) { process_queue(); exit; } if (isset($_GET["backup-stats-restore"])) { restore_backup(); exit; } if (isset($_GET["backup-stats-restore-all"])) { restore_all_backup(); exit; } if (isset($_GET["migrate-local"])) { migrate_local(); exit; } if (isset($_GET["category-uid"])) { category_uid(); exit; } if (isset($_GET["alldays"])) { alldays(); exit;