xref: /dokuwiki/lib/exe/detail.php (revision f42d1c75316f76b00c3e1b4ae7f890048ae1b117)
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*f42d1c75SAndreas Gohr	if($conf['allowdebug'] && $_REQUEST['debug']){
1842905504SAndreas Gohr			print '<pre>';
1942905504SAndreas Gohr			foreach(explode(' ','basedir userewrite baseurl useslash') as $x){
2042905504SAndreas Gohr					print '$'."conf['$x'] = '".$conf[$x]."';\n";
2142905504SAndreas Gohr			}
2242905504SAndreas Gohr			foreach(explode(' ','DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF '.
2342905504SAndreas Gohr                      'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED') as $x){
2442905504SAndreas Gohr					print '$'."_SERVER['$x'] = '".$_SERVER[$x]."';\n";
2542905504SAndreas Gohr			}
2642905504SAndreas Gohr			print "getID('media'): ".getID('media')."\n";
2742905504SAndreas Gohr      print "getID('media',false): ".getID('media',false)."\n";
2842905504SAndreas Gohr			print '</pre>';
2942905504SAndreas Gohr	}
3042905504SAndreas Gohr
3155efc227SAndreas Gohr  $ERROR = false;
3255efc227SAndreas Gohr  // check image permissions
3355efc227SAndreas Gohr  $AUTH = auth_quickaclcheck($IMG);
3455efc227SAndreas Gohr  if($AUTH >= AUTH_READ){
3555efc227SAndreas Gohr    // check if image exists
3655efc227SAndreas Gohr		$SRC = mediaFN($IMG);
3755efc227SAndreas Gohr    if(!file_exists($SRC)){
3855efc227SAndreas Gohr      //doesn't exist!
3955efc227SAndreas Gohr
4055efc227SAndreas Gohr		}
4155efc227SAndreas Gohr	}else{
4255efc227SAndreas Gohr    // no auth
4355efc227SAndreas Gohr		$ERROR = p_locale_xhtml('denied');
4455efc227SAndreas Gohr  }
4555efc227SAndreas Gohr
4655efc227SAndreas Gohr  /*if(!$ERROR){
4755efc227SAndreas Gohr    // load EXIF/IPTC/image details
4855efc227SAndreas Gohr    $INFO = array();
4955efc227SAndreas Gohr		$INFO['std']['']
5055efc227SAndreas Gohr    imagesize
5155efc227SAndreas Gohr  }*/
5255efc227SAndreas Gohr
5355efc227SAndreas Gohr
5455efc227SAndreas Gohr  //start output and load template
5555efc227SAndreas Gohr  header('Content-Type: text/html; charset=utf-8');
565a892029SAndreas Gohr  include(template('detail.php'));
5755efc227SAndreas Gohr
5855efc227SAndreas Gohr  //restore old umask
5955efc227SAndreas Gohr  umask($conf['oldumask']);
6055efc227SAndreas Gohr
6155efc227SAndreas Gohr?>
62