1<?php 2 if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); 3 require_once(DOKU_INC.'inc/init.php'); 4 require_once(DOKU_INC.'inc/common.php'); 5 require_once(DOKU_INC.'inc/lang/en/lang.php'); 6 require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php'); 7 require_once(DOKU_INC.'inc/JpegMeta.php'); 8 require_once(DOKU_INC.'inc/html.php'); 9 require_once(DOKU_INC.'inc/template.php'); 10 require_once(DOKU_INC.'inc/auth.php'); 11 //close session 12 session_write_close(); 13 14 $IMG = getID('media'); 15 $ID = cleanID($_REQUEST['id']); 16 17 if($conf['allowdebug'] && $_REQUEST['debug']){ 18 print '<pre>'; 19 foreach(explode(' ','basedir userewrite baseurl useslash') as $x){ 20 print '$'."conf['$x'] = '".$conf[$x]."';\n"; 21 } 22 foreach(explode(' ','DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF '. 23 'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED') as $x){ 24 print '$'."_SERVER['$x'] = '".$_SERVER[$x]."';\n"; 25 } 26 print "getID('media'): ".getID('media')."\n"; 27 print "getID('media',false): ".getID('media',false)."\n"; 28 print '</pre>'; 29 } 30 31 $ERROR = false; 32 // check image permissions 33 $AUTH = auth_quickaclcheck($IMG); 34 if($AUTH >= AUTH_READ){ 35 // check if image exists 36 $SRC = mediaFN($IMG); 37 if(!file_exists($SRC)){ 38 //doesn't exist! 39 40 } 41 }else{ 42 // no auth 43 $ERROR = p_locale_xhtml('denied'); 44 } 45 46 /*if(!$ERROR){ 47 // load EXIF/IPTC/image details 48 $INFO = array(); 49 $INFO['std'][''] 50 imagesize 51 }*/ 52 53 54 //start output and load template 55 header('Content-Type: text/html; charset=utf-8'); 56 include(template('detail.php')); 57 58 //restore old umask 59 umask($conf['oldumask']); 60 61?> 62