-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreset-cron.php
44 lines (42 loc) · 1.39 KB
/
reset-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
<?php include('includes/header.php');?>
<?php include('includes/login/auth.php');?>
<?php
$script_filename = basename(__FILE__);
$server_path_array = explode($script_filename, $_SERVER['SCRIPT_FILENAME']);
$server_path = substr($server_path_array[0], 0, -1);
?>
<div class="row-fluid">
<div class="span12">
<h2><?php echo _('Reset cron job setup status');?></h2><br/>
<?php
$confirm = $_POST['c'];
if(count($_POST)!=0 && $confirm==1)
{
$q = 'UPDATE login SET cron = 0, cron_ares = 0, cron_csv = 0, cron_seg = 0';
$r = mysqli_query($mysqli, $q);
if ($r)
{
echo '<script type="text/javascript">window.location = "'.addslashes(get_app_info('path')).'/reset-cron-success";</script>';
}
else
echo _('Failed to reset cron.');
}
else
{
echo '<form action="" method="post">';
echo _('Do you want to clear the positive status that cron jobs has been setup so that you can view cron job setup instructions again?');
echo '<input type="hidden" name="c" value="1"/>
<br/><br/><input type="submit" name="submit" class="btn" value="'._('Yes, reset cron jobs statuses').'"/>
</form>';
}
?>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$("td").mouseover(function(){
$(this).selectText();
});
});
</script>
<?php include('includes/footer.php');?>