-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupload.php
More file actions
34 lines (28 loc) · 977 Bytes
/
upload.php
File metadata and controls
34 lines (28 loc) · 977 Bytes
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
<?php
function __autoload($class_name)
{
include './include/class.' . $class_name . '.inc';
}
$data = "ERROR - Nothing is defined";
if (isset($_REQUEST['domain']))
{
$domains = new Domains($_REQUEST['domain']);
//$file = './../includes/vhosts.conf'; //Use this if running locally
$file = '/home/vetlogic/includes/vhosts.conf'; // Use this if running on live server
//$file = '/Applications/conf/vhosts.conf'; // Use this if running on Mac
$url = $_REQUEST['domain'];
if (isset($_REQUEST['feature']))
{
$feature = $_REQUEST['feature'];
//if ($feature == 1) $data = $domains->find($file, $url);
if ($feature == 2) $data = $domains->update($url, $file);
//if ($feature == 3) $domains->delete($url, $file);
}
else
{
$data = 'ERROR - You need to define a feature';
}
}
else $data = "ERROR - You need to define a domain";
header('Content-Type: application/json');
echo json_encode($data);