3 $iniarray=parse_ini_file("config.ini");
4 $webbase=$iniarray["webbase"];
5 $dbprefix=$iniarray["dbprefix"];
6 $admin=$iniarray["admin"];
7 $title=$iniarray["title"];
8 $N=$iniarray["pics_per_page"];
9 /* end parse ini-file */
12 if(isset($_REQUEST["page"]))
13 $page = intval($_REQUEST["page"]);
17 if(isset($_REQUEST["tag"]))
18 $tags = htmlentities($_REQUEST["tag"]);
22 if(isset($_REQUEST["pic"]))
23 $pic = intval(htmlentities($_REQUEST["pic"]));
28 /* The basic layout */
32 <title><?php echo htmlspecialchars($title) ?></title>
33 <script src = "<?php echo $webbase?>/js/d3.min.js"></script>
34 <link rel="stylesheet" type="text/css" href="<?php echo $webbase?>/css/normalize.css" />
35 <link rel="stylesheet" type="text/css" href="<?php echo $webbase?>/css/style.css" />
39 <div class="debug"></div>
40 <h1><?php echo htmlspecialchars($title) ?></h1>
43 page <span class="index"></span>
44 <button class="prev" type="button" disabled="disabled" onclick="prev_page()"> prev </button>
45 <button class="next" type="button" onclick="next_page()">next </button>
46 <button class="all" type="submit" onclick="document.location.href='<?php echo $webbase?>'">all</button>
49 <div class="permalink"></div>
51 <div class="tagsearch">
52 <form method="get" action="">
53 Search for tag: <input list="MyTags" id="MyTagsInput" type="text" value="" />
54 <datalist id="MyTags">
57 Current tags:<span id="currenttags"></span>
58 <button class="next" type="button" onclick="tagcloud()">tag cloud</button>
61 <div class="nextprev"> <ul></ul></div>
63 <div class="pics"><ul></ul> </div>
66 This gallery belongs to <?php echo htmlspecialchars($admin) ?>.
67 <div class="copyright"> photo-tags: copyright 2011 Arun Persaud arun@nubati.net, code available at <a href="http://source.nubati.net/projects/photo-tags">source.nubati.net/projects/photo-tags</a></div>
71 <script src = "<?php echo $webbase?>/js/photo-tags.js"></script>
72 <script type="text/javascript" >
73 /*hand parameters over to javascript*/
74 var page=<?php echo $page ?>;
75 var N=<?php echo $N ?>;
76 var T="<?php echo $tags ?>";
77 var ID=<?php echo $pic ?>;
79 var dbprefix="<?php echo $dbprefix ?>".replace(/\//g,"\/");
80 var webbase = "<?php echo $webbase?>";