-
Notifications
You must be signed in to change notification settings - Fork 4
/
config_handler.php
39 lines (37 loc) · 1.16 KB
/
config_handler.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
/**
* This file handles submissions from the config form
*/
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR ."postie-functions.php");
if (isset($_POST["action"])) {
switch($_POST["action"]) {
case "reset":
ResetPostieConfig();
$message = 1;
break;
case "cronless":
check_postie();
$message = 1;
break;
case "test":
$location = get_option('siteurl') . '/wp-admin/options-general.php?page=postie/postie_test.php';
header("Location: $location\n\n");
exit;
break;
case "config":
if( UpdatePostieConfig($_POST)) {
$message = 1;
}
else {
$message = 2;
}
break;
default:
$message = 2;
break;
}
$location = get_option('siteurl') . '/wp-admin/options-general.php?page=postie/postie.php';
header("Location: $location&message=$message\n\n");
exit();
}
?>