-
Notifications
You must be signed in to change notification settings - Fork 5
/
cron.php
39 lines (30 loc) · 768 Bytes
/
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
<?php
$error = false;
$result = array();
if(isset($_GET['save'])){
$request_body = file_get_contents('php://input');
if($request_body){
$data = json_decode($request_body);
$plugin = $data->plugin;
$config = $data->data;
}else{
$error = true;
}
if($plugin && $config){
$file_config = "cron.json";
//file_put_contents($file_config, json_encode($config));
$result = array(
"error" => false,
"message" => "Save plugin cron done !"
);
}else{
$error = true;
}
if($error){
$result = array(
"error" => true,
"message" => "Missing data for saving cron file"
);
}
echo json_encode($result);
}