3 $iniarray=parse_ini_file("config.ini");
4 $webbase=$iniarray["webbase"];
5 $dbprefix=$iniarray["dbprefix"];
6 $admin=$iniarray["admin"];
7 $title=$iniarray["title"];
8 /* end parse ini-file */
11 <title><?php echo htmlspecialchars($title) ?></title>
12 <script src="d3.min.js"></script>
13 <link rel="stylesheet" type="text/css" href="normalize.css" />
14 <link rel="stylesheet" type="text/css" href="style.css" />
18 <div class="debug">test</div>
19 <h1><?php echo htmlspecialchars($title) ?></h1>
21 <button class="prev" disabled="disabled" onclick="left()"> prev </button>
22 <button class="next" onclick="right()">next </button>
24 <div class="pics"> </div>
27 This gallery belongs to <?php echo htmlspecialchars($admin) ?>.
28 <div class="copyright"> code: copyright 2011 Arun Persaud arun@nubati.net, code available at nubati.net/git/f-spot-gallery</div>
32 <script type="text/javascript" >
35 var pics = d3.select(".pics").append("ul");
41 function myreload(a,b) {
42 d3.json("<?php echo $webbase?>/getjson.php?O="+a+"&N="+b, function(json) {
44 pics.selectAll("li").remove();
45 pics.selectAll("li").data(json)
48 .attr("href",function(d) {
49 s= d.base_uri+'/'+d.filename;
50 s = s.replace('file:\/\/<?php echo "".str_replace("/","\/",$dbprefix); ?>','<?php echo $webbase; ?>/Photos-small/');
54 .attr("src",function(d) {
56 s= d.base_uri+'/'+d.filename;
57 s = s.replace('file:\/\/<?php echo "".str_replace("/","\/",$dbprefix); ?>','<?php echo $webbase?>/Photos-tiny/');
63 d3.select(".debug").text("O, N= "+a+" "+b+" "+count);
67 if (offset>=N) offset=offset-N;
76 function checkbutton() {
79 { d3.select("button.prev").attr("disabled","disabled");}
81 { d3.select("button.prev").attr("disabled", null);};
84 { d3.select("button.next").attr("disabled","disabled");}
86 { d3.select("button.next").attr("disabled",null);}