-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcron_srun_minute.php
70 lines (59 loc) · 2.49 KB
/
cron_srun_minute.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
<?php
/**************************************************************************************************
| Software Name : Mafia Game Scripts Online Mafia Game
| Software Author : Mafia Game Scripts
| Software Version : Version 2.3.1 Build 2301
| Website : http://www.mafiagamescript.net/
| E-mail : [email protected]
|**************************************************************************************************
| The source files are subject to the Mafia Game Script End-User License Agreement included in License Agreement.html
| The files in the package must not be distributed in whole or significant part.
| All code is copyrighted unless otherwise advised.
| Do Not Remove Powered By Mafia Game Scripts without permission .
|**************************************************************************************************
| Copyright (c) 2010 Mafia Game Script . All rights reserved.
|**************************************************************************************************/
include "config.php";
include "language.php";
global $_CONFIG;
define("MONO_ON", 1);
require "class/class_db_{$_CONFIG['driver']}.php";
$db=new database;
$db->configure($_CONFIG['hostname'],
$_CONFIG['username'],
$_CONFIG['password'],
$_CONFIG['database'],
$_CONFIG['persistent']);
$db->connect();
$c=$db->connection_id;
$db->query("UPDATE users set hospital=hospital-1 WHERE hospital>0");
$db->query("UPDATE `users` SET jail=jail-1 WHERE `jail` > 0");
$db->query("UPDATE users SET traveltime=traveltime-1 WHERE traveltime > 0");
$db->query("UPDATE users SET bguard=bguard-1 WHERE bguard>0");
$db->query("UPDATE users SET bguard=0 WHERE bguard<0");
$hc=$db->num_rows($db->query("SELECT * FROM users WHERE hospital > 0"));
$jc=$db->num_rows($db->query("SELECT * FROM users WHERE jail > 0"));
$db->query("UPDATE settings SET conf_value='$hc' WHERE conf_name='hospital_count'");
$db->query("UPDATE settings SET conf_value='$jc' WHERE conf_name='jail_count'");
print "
<meta HTTP-EQUIV='REFRESH' content='5; url=staff.php?action=cmanual'>
<style type='text/css'>
.style2 {
text-align: center;
}
.style3 {
text-align: center;
color: #008000;
}
.style4 {
color: #FFFFFF;
}
</style>
<body style='background-color: #000000'>
<h2 class='style3'>Cron Job Successfully Ran</h2>
<div class='style2'>
<h3>
<a href='staff.php?action=cmanual'><span class='style4'>Back</span></a></h3>
</div>
";
?>