X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=photo-tags.git;a=blobdiff_plain;f=index.php;h=7cf15c01024d74cd75405c055f52f71f835822fc;hp=a6112aba1ed4604d05d74d49726af0aa1c5acfd0;hb=ccbd358803261b138fb5f09cf132543d737a07e7;hpb=629e06724cde4ecd8d1e30fa04567cc1960410c5 diff --git a/index.php b/index.php index a6112ab..7cf15c0 100644 --- a/index.php +++ b/index.php @@ -19,166 +19,97 @@ if(isset($_REQUEST["tag"])) else $tags = ""; +if(isset($_REQUEST["pic"])) + $pic = intval(htmlentities($_REQUEST["pic"])); +else + $pic = -1; +/* end parse flags */ + +/* autoversioning of js and css files */ +function autoversion($file) +{ + /* changes the file name of e.g. css/style.css to css/style..css/js + * this way the browser can cache the file and will reload it if the file changed + * needs to have .htaccess set up correctly to link back to css/style.css */ + + /* only use it for file that have an absolut path */ + if(!file_exists(dirname($_SERVER['SCRIPT_FILENAME']). '/' . $file)) + return $file; + + $md5 = md5_file(dirname($_SERVER['SCRIPT_FILENAME']). '/' . $file); + return preg_replace('{\\.([^./]+)$}', ".$md5.\$1", $file); +} + +/* The basic layout */ ?> + + + <?php echo htmlspecialchars($title) ?> - - - + +" /> +" /> + -
test
+

- - + +
-
- Tags: - - + +

+ + + + Current tags: + + all + +

-
-
+
+ +
+ + +