1<?php 2 3require_once realpath(dirname(__FILE__) . '/../../../') . '/inc/init.php'; 4 5if (!isset($_GET['id'])) { 6 die('no id given'); 7} 8 9$id = cleanID($_GET['id']); 10 11 12if (auth_quickaclcheck($id) < AUTH_READ) { 13 header('HTTP/1.1 403 Forbidden'); 14 die('access denied'); 15} 16 17$path = preg_replace('/.txt$/i', '.xml', wikiFN($id)); 18 19if (!file_exists($path)) { 20 header('HTTP/1.0 404 Not Found'); 21 die('dosn\'t exists'); 22} 23 24header('Content-Type: text/xml'); 25echo file_get_contents($path);