xref: /dokuwiki/lib/exe/detail.php (revision 42905504e134d999710eacf73253844e85cf6fec)
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	//FIXME remove me later
18	if($_REQUEST['debug']){
19			print '<pre>';
20			foreach(explode(' ','basedir userewrite baseurl useslash') as $x){
21					print '$'."conf['$x'] = '".$conf[$x]."';\n";
22			}
23			foreach(explode(' ','DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF '.
24                      'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED') as $x){
25					print '$'."_SERVER['$x'] = '".$_SERVER[$x]."';\n";
26			}
27			print "getID('media'): ".getID('media')."\n";
28      print "getID('media',false): ".getID('media',false)."\n";
29			print '</pre>';
30	}
31
32  $ERROR = false;
33  // check image permissions
34  $AUTH = auth_quickaclcheck($IMG);
35  if($AUTH >= AUTH_READ){
36    // check if image exists
37		$SRC = mediaFN($IMG);
38    if(!file_exists($SRC)){
39      //doesn't exist!
40
41		}
42	}else{
43    // no auth
44		$ERROR = p_locale_xhtml('denied');
45  }
46
47  /*if(!$ERROR){
48    // load EXIF/IPTC/image details
49    $INFO = array();
50		$INFO['std']['']
51    imagesize
52  }*/
53
54
55  //start output and load template
56  header('Content-Type: text/html; charset=utf-8');
57  include(template('detail.php'));
58
59  //restore old umask
60  umask($conf['oldumask']);
61
62?>
63