/*
This script is part of FunkGallery. A PHP based photo gallery
Copyright (C) 2004 Colin Birch
This copyright message MUST NOT be removed
You can contact Colin Birch at: colin@funkboard.co.uk
*/
require("global.php");
require("text1.php");
//02-01-05
// Fixed a few possible comment hacks
// Added auto delete on old comments
$action=$_POST[action];
if(!$action) {$action=$_GET[action];}
$gll=$_POST[gll];
if(!$gll) {$gll=$_GET[gll];}
$maxp=$_POST[maxp];
if(!$maxp) {$maxp=$_GET[maxp];}
$vpic=$_POST[vpic];
if(!$vpic) {$vpic=$_GET[vpic];}
$tpic=$_POST[tpic];
if(!$tpic) {$tpic=$_GET[tpic];}
$picgal=$_POST[picgal];
if(!$picgal) {$picgal=$_GET[picgal];}
$cname=$_POST[cname];
if(!$cname) {$cname=$_GET[cname];}
$comment=$_POST[comment];
if(!$comment) {$comment=$_GET[comment];}
$uid=$_POST[uid];
if(!$uid) {$uid=$_GET[uid];}
$photo=$_POST[photo];
if(!$photo) {$photo=$_GET[photo];}
$cont=$_POST[cont];
if(!$cont) {$cont=$_GET[cont];}
$wme=templates(webmasteremail);
if ($wme=='you@yourdomain.com') {
echo "Before you can run FunkGallery you MUST configure the Webmaster Email in the Admin Control Panel
To do this log into your Control Panel and click on Settings>Global Settings
Click HERE to log into your Control Panel";
die;
}
$autodelcom=templates(autodelcom);
if ($autodelcom>'0') {
$range=($time-($autodelcom*86400));
$funk->ins_vals("DELETE FROM $comments WHERE date < $range");
}
list($galleryname,$trcolor,$trtext,$alt1,$alt2,$ext)=special_get();
$num=$funk->num_vals("SELECT uid FROM $cats ORDER BY order_by");
$cpnum=sizeof($num);
if ($cpnum>"0") $cpnum--;
if ($cpnum>"0") {
for($x=0;$x<=$cpnum;$x++) {
$categ[$x+1]=$funk->db_query("SELECT cat_name FROM $cats WHERE uid = '$num[$x]'");
}
}
$myhtml->top_html($galleryname,$galleryname,"","");
if (!$action) {
$c=$funk->num_vals("SELECT * FROM $files ORDER BY uploadtime");
while(list($i,$v) = each($c)) {
$vis=$funk->db_query("SELECT uploadtime FROM $files WHERE uid = '$v'");
$gal=$funk->db_query("SELECT gallery FROM $files WHERE uid = '$v'");
}
$vis=date("m/d/y",$vis);
$galn=$funk->db_query("SELECT gallery_name FROM $gallery WHERE uid = '$gal'");
$galn=stripslashes($galn);
?>
"> echo $tx1." ".$galn." ".$vis; ?> |
echo $tx13; ?> | echo $tx14; ?> |
";
if ($tpath!="") {$tpath="";
echo $tpath." "; } echo"$gn |
$co |
".$comment; echo $outcomm."\n"; } ?> } ?> |