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 34 } 35 }else{ 36 // no auth 37 $ERROR = p_locale_xhtml('denied'); 38 } 39 40 /*if(!$ERROR){ 41 // load EXIF/IPTC/image details 42 $INFO = array(); 43 $INFO['std'][''] 44 imagesize 45 }*/ 46 47 48 //start output and load template 49 header('Content-Type: text/html; charset=utf-8'); 50 include(template('detail.php')); 51 52