xref: /dokuwiki/lib/exe/detail.php (revision 6de3759a1b7a74492845c76e1f0bd1078e2220c7)
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
14*6de3759aSAndreas Gohr  $IMG  = getID('media');
15*6de3759aSAndreas Gohr  $ID   = cleanID($_REQUEST['id']);
1655efc227SAndreas Gohr
1755efc227SAndreas Gohr  $ERROR = false;
1855efc227SAndreas Gohr  // check image permissions
1955efc227SAndreas Gohr  $AUTH = auth_quickaclcheck($IMG);
2055efc227SAndreas Gohr  if($AUTH >= AUTH_READ){
2155efc227SAndreas Gohr    // check if image exists
2255efc227SAndreas Gohr		$SRC = mediaFN($IMG);
2355efc227SAndreas Gohr    if(!file_exists($SRC)){
2455efc227SAndreas Gohr      //doesn't exist!
2555efc227SAndreas Gohr
2655efc227SAndreas Gohr		}
2755efc227SAndreas Gohr	}else{
2855efc227SAndreas Gohr    // no auth
2955efc227SAndreas Gohr		$ERROR = p_locale_xhtml('denied');
3055efc227SAndreas Gohr  }
3155efc227SAndreas Gohr
3255efc227SAndreas Gohr  /*if(!$ERROR){
3355efc227SAndreas Gohr    // load EXIF/IPTC/image details
3455efc227SAndreas Gohr    $INFO = array();
3555efc227SAndreas Gohr		$INFO['std']['']
3655efc227SAndreas Gohr    imagesize
3755efc227SAndreas Gohr  }*/
3855efc227SAndreas Gohr
3955efc227SAndreas Gohr
4055efc227SAndreas Gohr  //start output and load template
4155efc227SAndreas Gohr  header('Content-Type: text/html; charset=utf-8');
425a892029SAndreas Gohr  include(template('detail.php'));
4355efc227SAndreas Gohr
4455efc227SAndreas Gohr  //restore old umask
4555efc227SAndreas Gohr  umask($conf['oldumask']);
4655efc227SAndreas Gohr
4755efc227SAndreas Gohr?>
48