155efc227SAndreas Gohr<?php 255efc227SAndreas Gohr if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); 355efc227SAndreas Gohr require_once(DOKU_INC.'inc/init.php'); 455efc227SAndreas Gohr require_once(DOKU_INC.'inc/common.php'); 555efc227SAndreas Gohr require_once(DOKU_INC.'inc/lang/en/lang.php'); 655efc227SAndreas Gohr require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php'); 755efc227SAndreas Gohr require_once(DOKU_INC.'inc/JpegMeta.php'); 855efc227SAndreas Gohr require_once(DOKU_INC.'inc/html.php'); 955efc227SAndreas Gohr require_once(DOKU_INC.'inc/template.php'); 1055efc227SAndreas Gohr require_once(DOKU_INC.'inc/auth.php'); 1155efc227SAndreas Gohr //close session 1255efc227SAndreas Gohr session_write_close(); 1355efc227SAndreas Gohr 146de3759aSAndreas Gohr $IMG = getID('media'); 156de3759aSAndreas Gohr $ID = cleanID($_REQUEST['id']); 1655efc227SAndreas Gohr 17*42905504SAndreas Gohr //FIXME remove me later 18*42905504SAndreas Gohr if($_REQUEST['debug']){ 19*42905504SAndreas Gohr print '<pre>'; 20*42905504SAndreas Gohr foreach(explode(' ','basedir userewrite baseurl useslash') as $x){ 21*42905504SAndreas Gohr print '$'."conf['$x'] = '".$conf[$x]."';\n"; 22*42905504SAndreas Gohr } 23*42905504SAndreas Gohr foreach(explode(' ','DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF '. 24*42905504SAndreas Gohr 'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED') as $x){ 25*42905504SAndreas Gohr print '$'."_SERVER['$x'] = '".$_SERVER[$x]."';\n"; 26*42905504SAndreas Gohr } 27*42905504SAndreas Gohr print "getID('media'): ".getID('media')."\n"; 28*42905504SAndreas Gohr print "getID('media',false): ".getID('media',false)."\n"; 29*42905504SAndreas Gohr print '</pre>'; 30*42905504SAndreas Gohr } 31*42905504SAndreas Gohr 3255efc227SAndreas Gohr $ERROR = false; 3355efc227SAndreas Gohr // check image permissions 3455efc227SAndreas Gohr $AUTH = auth_quickaclcheck($IMG); 3555efc227SAndreas Gohr if($AUTH >= AUTH_READ){ 3655efc227SAndreas Gohr // check if image exists 3755efc227SAndreas Gohr $SRC = mediaFN($IMG); 3855efc227SAndreas Gohr if(!file_exists($SRC)){ 3955efc227SAndreas Gohr //doesn't exist! 4055efc227SAndreas Gohr 4155efc227SAndreas Gohr } 4255efc227SAndreas Gohr }else{ 4355efc227SAndreas Gohr // no auth 4455efc227SAndreas Gohr $ERROR = p_locale_xhtml('denied'); 4555efc227SAndreas Gohr } 4655efc227SAndreas Gohr 4755efc227SAndreas Gohr /*if(!$ERROR){ 4855efc227SAndreas Gohr // load EXIF/IPTC/image details 4955efc227SAndreas Gohr $INFO = array(); 5055efc227SAndreas Gohr $INFO['std'][''] 5155efc227SAndreas Gohr imagesize 5255efc227SAndreas Gohr }*/ 5355efc227SAndreas Gohr 5455efc227SAndreas Gohr 5555efc227SAndreas Gohr //start output and load template 5655efc227SAndreas Gohr header('Content-Type: text/html; charset=utf-8'); 575a892029SAndreas Gohr include(template('detail.php')); 5855efc227SAndreas Gohr 5955efc227SAndreas Gohr //restore old umask 6055efc227SAndreas Gohr umask($conf['oldumask']); 6155efc227SAndreas Gohr 6255efc227SAndreas Gohr?> 63