1<?php
2/**
3 * DokuWiki Image Detail Page
4 *
5 * @author   Andreas Gohr <andi@splitbrain.org>
6 * @author   Anika Henke <anika@selfthinker.org>
7 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
8 */
9
10// must be run from within DokuWiki
11if (!defined('DOKU_INC')) die();
12@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
13
14?><!DOCTYPE html>
15<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>"
16 lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
17<head>
18    <meta charset="UTF-8" />
19    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
20    <title>
21        <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?>
22        [<?php echo strip_tags($conf['title'])?>]
23    </title>
24    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
25    <?php tpl_metaheaders()?>
26    <meta name="viewport" content="width=device-width,initial-scale=1" />
27    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
28    <?php tpl_includeFile('meta.html') ?>
29</head>
30
31<body>
32    <!--[if IE 6 ]><div id="IE6"><![endif]--><!--[if IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
33    <div id="dokuwiki__detail" class="dokuwiki">
34        <?php html_msgarea() ?>
35
36        <?php if($ERROR){ print $ERROR; }else{ ?>
37
38            <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?></h1>
39
40            <div class="content">
41                <?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?>
42
43                <div class="img_detail">
44                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
45
46                    <dl>
47                        <?php
48                            $config_files = getConfigFiles('mediameta');
49                            foreach ($config_files as $config_file) {
50                                if(@file_exists($config_file)) {
51                                    include($config_file);
52                                }
53                            }
54
55                            foreach($fields as $key => $tag){
56                                $t = array();
57                                if (!empty($tag[0])) {
58                                    $t = array($tag[0]);
59                                }
60                                if(is_array($tag[3])) {
61                                    $t = array_merge($t,$tag[3]);
62                                }
63                                $value = tpl_img_getTag($t);
64                                if ($value) {
65                                    echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
66                                    if ($tag[2] == 'date') {
67                                        echo dformat($value);
68                                    } else {
69                                        echo hsc($value);
70                                    }
71                                    echo '</dd>';
72                                }
73                            }
74                        ?>
75                    </dl>
76                    <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
77                </div>
78                <div class="clearer"></div>
79            </div><!-- /.content -->
80
81            <p class="back">
82                <?php
83                    $imgNS = getNS($IMG);
84                    $authNS = auth_quickaclcheck("$imgNS:*");
85                    if (($authNS >= AUTH_UPLOAD) && function_exists('media_managerURL')) {
86                        $mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG));
87                        echo '<a href="'.$mmURL.'">'.$lang['img_manager'].'</a><br />';
88                    }
89                ?>
90                &larr; <?php echo $lang['img_backto']?> <?php tpl_pagelink($ID)?>
91            </p>
92
93        <?php } ?>
94    </div>
95    <!--[if ( IE 6 | IE 7 | IE 8 ) ]></div><![endif]-->
96</body>
97</html>
98
99