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 <title><?php echo htmlspecialchars($title) ?></title>
13 <script src="d3.min.js"></script>
14 <link rel="stylesheet" type="text/css" href="normalize.css" />
15 <link rel="stylesheet" type="text/css" href="style.css" />
19 <div class="debug">test</div>
20 <h1><?php echo htmlspecialchars($title) ?></h1>
22 <button class="prev" disabled="disabled" onclick="left()"> prev </button>
23 <button class="next" onclick="right()">next </button>
25 <div class="pics"> </div>
28 This gallery belongs to <?php echo htmlspecialchars($admin) ?>.
29 <div class="copyright"> code: copyright 2011 Arun Persaud arun@nubati.net, code available at nubati.net/git/f-spot-gallery</div>
33 <script type="text/javascript" >
36 var pics = d3.select(".pics").append("ul");
39 var N=<?php echo $N?>;
42 function myreload(a) {
43 d3.json("<?php echo $webbase?>/getjson.php?P="+a, function(json) {
45 pics.selectAll("li").remove();
46 pics.selectAll("li").data(json)
49 .attr("href",function(d) {
50 s= d.base_uri+'/'+d.filename;
51 s = s.replace('file:\/\/<?php echo "".str_replace("/","\/",$dbprefix); ?>','<?php echo $webbase; ?>/Photos-small/');
55 .attr("src",function(d) {
57 s= d.base_uri+'/'+d.filename;
58 s = s.replace('file:\/\/<?php echo "".str_replace("/","\/",$dbprefix); ?>','<?php echo $webbase?>/Photos-tiny/');
64 d3.select(".debug").text("P, count= "+a+" "+count);
68 if (page>=1) page=page-1;
77 function checkbutton() {
80 { d3.select("button.prev").attr("disabled","disabled");}
82 { d3.select("button.prev").attr("disabled", null);};
85 { d3.select("button.next").attr("disabled","disabled");}
87 { d3.select("button.next").attr("disabled",null);}