155efc227SAndreas Gohr<?php 2*d0a27cb0SAndreas Gohr if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); 37a24876fSAndreas Gohr define('DOKU_MEDIADETAIL',1); 455efc227SAndreas Gohr require_once(DOKU_INC.'inc/init.php'); 555efc227SAndreas Gohr require_once(DOKU_INC.'inc/common.php'); 655efc227SAndreas Gohr require_once(DOKU_INC.'inc/lang/en/lang.php'); 755efc227SAndreas Gohr require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php'); 855efc227SAndreas Gohr require_once(DOKU_INC.'inc/JpegMeta.php'); 955efc227SAndreas Gohr require_once(DOKU_INC.'inc/html.php'); 1055efc227SAndreas Gohr require_once(DOKU_INC.'inc/template.php'); 1155efc227SAndreas Gohr require_once(DOKU_INC.'inc/auth.php'); 1255efc227SAndreas Gohr //close session 1355efc227SAndreas Gohr session_write_close(); 1455efc227SAndreas Gohr 156de3759aSAndreas Gohr $IMG = getID('media'); 166de3759aSAndreas Gohr $ID = cleanID($_REQUEST['id']); 1755efc227SAndreas Gohr 18f42d1c75SAndreas Gohr if($conf['allowdebug'] && $_REQUEST['debug']){ 1942905504SAndreas Gohr print '<pre>'; 2042905504SAndreas Gohr foreach(explode(' ','basedir userewrite baseurl useslash') as $x){ 2142905504SAndreas Gohr print '$'."conf['$x'] = '".$conf[$x]."';\n"; 2242905504SAndreas Gohr } 2342905504SAndreas Gohr foreach(explode(' ','DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF '. 2442905504SAndreas Gohr 'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED') as $x){ 2542905504SAndreas Gohr print '$'."_SERVER['$x'] = '".$_SERVER[$x]."';\n"; 2642905504SAndreas Gohr } 2742905504SAndreas Gohr print "getID('media'): ".getID('media')."\n"; 2842905504SAndreas Gohr print "getID('media',false): ".getID('media',false)."\n"; 2942905504SAndreas Gohr print '</pre>'; 3042905504SAndreas Gohr } 3142905504SAndreas 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); 38d8186216SBen Coburn 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?> 60