Last change
on this file since 25027 was 25027, checked in by jmt12, 12 years ago |
Adding the packages directory, and within it a configured version of dokuwiki all ready to run
|
File size:
1.4 KB
|
Line | |
---|
1 | <?php
|
---|
2 | if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
|
---|
3 | define('DOKU_MEDIADETAIL',1);
|
---|
4 | require_once(DOKU_INC.'inc/init.php');
|
---|
5 | //close session
|
---|
6 | session_write_close();
|
---|
7 |
|
---|
8 | $IMG = getID('media');
|
---|
9 | $ID = cleanID($_REQUEST['id']);
|
---|
10 |
|
---|
11 | if($conf['allowdebug'] && $_REQUEST['debug']){
|
---|
12 | print '<pre>';
|
---|
13 | foreach(explode(' ','basedir userewrite baseurl useslash') as $x){
|
---|
14 | print '$'."conf['$x'] = '".$conf[$x]."';\n";
|
---|
15 | }
|
---|
16 | foreach(explode(' ','DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF '.
|
---|
17 | 'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED') as $x){
|
---|
18 | print '$'."_SERVER['$x'] = '".$_SERVER[$x]."';\n";
|
---|
19 | }
|
---|
20 | print "getID('media'): ".getID('media')."\n";
|
---|
21 | print "getID('media',false): ".getID('media',false)."\n";
|
---|
22 | print '</pre>';
|
---|
23 | }
|
---|
24 |
|
---|
25 | $ERROR = false;
|
---|
26 | // check image permissions
|
---|
27 | $AUTH = auth_quickaclcheck($IMG);
|
---|
28 | if($AUTH >= AUTH_READ){
|
---|
29 | // check if image exists
|
---|
30 | $SRC = mediaFN($IMG);
|
---|
31 | if(!@file_exists($SRC)){
|
---|
32 | //doesn't exist!
|
---|
33 | header("HTTP/1.0 404 File not Found");
|
---|
34 | $ERROR = 'File not found';
|
---|
35 | }
|
---|
36 | }else{
|
---|
37 | // no auth
|
---|
38 | $ERROR = p_locale_xhtml('denied');
|
---|
39 | }
|
---|
40 |
|
---|
41 | // this makes some general infos available as well as the info about the
|
---|
42 | // "parent" page
|
---|
43 | $INFO = pageinfo();
|
---|
44 |
|
---|
45 | //start output and load template
|
---|
46 | header('Content-Type: text/html; charset=utf-8');
|
---|
47 | include(template('detail.php'));
|
---|
48 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.