Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560 [2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85 [3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50 [4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13 [5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
| Server IP : 94.177.8.99 / Your IP : 216.73.217.165 Web Server : Apache/2.4.58 (Ubuntu) System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /proc/self/root/var/www/patientapps_beta/api/.api/ |
Upload File : |
<?php
$filename = _clean(array_shift($elements));
while (ob_get_level()) {
ob_end_clean();
}
$source_file = DOWNLOAD_FOLDER . "/_{$filename}.json";
if (!file_exists($source_file)) {
$source_file = DOWNLOAD_FOLDER . "/{$filename}.json";
}
$contenttype = isset($_GET['type']) ? $_GET['type'] : '';
$contenttype = preg_replace('~[^a-z0-9\-/_]~i', '', $contenttype);
if (!file_exists($source_file)) {
header('Content-type: text/plain');
die('404 Archive Not Found');
}
$json = json_decode(file_get_contents($source_file), TRUE);
$item_name = _clean(array_shift($elements));
if ($item_name == '') {
header('Content-type: text/html');
$content = '';
foreach(array_keys($json) as $keyname) {
$content .= "<a href=\"/api/content/$filename/$keyname\">$keyname</a>\n";
if (substr($keyname, 0, 2) == 'b-' || substr($keyname, 0, 2) == 'i-') {
$content .= " <img src=\"/api/content/$filename/$keyname\" width=\"100\" border=\"1\">\n";
}
}
die( <<<BLOCK
<html>
<!-- $source_file -->
<body><pre>
$content
</pre></body></html>
BLOCK
);
}
if (!isset($json[$item_name])) {
header('Content-type: text/plain');
die('404 Item Not Found');
}
$value = $json[$item_name];
if (strpos($item_name, '.json') !== FALSE) {
if (is_array($value)) {
$item = str_replace('\//', '/', json_encode($value));
} elseif (is_string($value)) {
if (strpos($value, ':') === FALSE) {
$item = base64_decode($value);
} else {
$item = $value;
}
}
} else {
$item = base64_decode($value);
}
if ($contenttype == '') {
if (strpos($item_name, '.json') !== FALSE) {
$contenttype = 'application/json';
} else {
$finfo = new finfo(FILEINFO_MIME);
$contenttype = $finfo->buffer($item);
}
}
header('Content-type: '. $contenttype);
echo $item;
exit;
function _clean($x) {
return str_replace(['..', '\\', '|', '<', '>', '&', ';'], '', $x);
}