forked from trhoppe/roadraceautox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcron.php
99 lines (83 loc) · 3.26 KB
/
cron.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 4.2.0 Patch Level 3 - Licence Number VBFBED0615
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000-2012 vBulletin Solutions Inc. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
ignore_user_abort(1);
@set_time_limit(0);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('SKIP_SESSIONCREATE', 1);
define('NOCOOKIES', 1);
define('THIS_SCRIPT', 'cron');
define('CSRF_PROTECTION', true);
// #################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();
// get special data templates from the datastore
$specialtemplates = array(
'crondata',
'mailqueue',
);
// pre-cache templates used by all actions
$globaltemplates = array();
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once(DIR . '/includes/functions_cron.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$filedata = vb_base64_decode('R0lGODlhAQABAIAAAMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
$filesize = strlen($filedata);
// browser will think there is no more data if content-length is what is returned
// regardless of how long the script continues to execute, apart from IIS + CGI
header('Content-type: image/gif');
if (!(strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false AND strpos(SAPI_NAME, 'cgi') !== false))
{
header('Content-Length: ' . $filesize);
header('Connection: Close');
}
if (!$vbulletin->options['crontab'])
{
echo $filedata;
flush();
}
($hook = vBulletinHook::fetch_hook('cron_start')) ? eval($hook) : false;
if (!defined('NOSHUTDOWNFUNC') AND !$vbulletin->options['crontab'])
{
vB_Shutdown::add('exec_cron');
}
else
{
$cronid = NULL;
if ($vbulletin->options['crontab'] AND SAPI_NAME == 'cli')
{
$cronid = intval($_SERVER['argv'][1]);
// if its a negative number or 0 set it to NULL so it just grabs the next task
if ($cronid < 1)
{
$cronid = NULL;
}
}
exec_cron($cronid);
if (defined('NOSHUTDOWNFUNC'))
{
$db->close();
}
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 16:29, Sun Dec 9th 2012
|| # CVS: $RCSfile$ - $Revision: 62096 $
|| ####################################################################
\*======================================================================*/
?>