Posted on: 10/05/04 09:37pm
By: bcbrock
Tue Oct 5 20:12:47 2004 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE remote_ip = '' AND uid = 1' at line 1. SQL in question: DELETE FROM WHERE remote_ip = '' AND uid = 1
Tue Oct 5 20:15:30 2004 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE uid = 1 AND start_time < 1097025030' at line 1. SQL in question: DELETE FROM WHERE uid = 1 AND start_time < 1097025030
Posted on: 10/06/04 02:34pm
By: Dirk
Posted on: 10/06/04 04:26pm
By: jeffhare
/** * Ver 1.2 * packetmad October 14, 2003 www.lanside.net * * Blaine Lang March 21/02 www.langfamily.ca * Ver 1.1 * This Geeklog PHP function uses the Gallery Random Block code contibuted by Bharat Mediratta - Gallery Developer * * The Gallery random photo block will display a random photo from your Gallery in a geeklog block. * The photo is displayed along with its caption and clicking the photo will take you directly to that photo in the appropriate album. * This version of the random photo code only displays public photos - for which gallery has granted everyboddy access. * Once a day it scans all your albums to see which ones are viewable by the general public. * Then it saves that data and uses it for the rest of the day. * If you change permissions on an album, add or delete albums the changes won't be reflected right away in the random photo block. * You must have Gallery v1.2 or better to use this block. * * This block will also display the photo caption. This is nice when you add comments as a photo caption * But if you have not, the block may display the default photo caption which gallery defaulted to which is your digicam IMAGE ID * I have added a check and exclude these captions. Modify this as required - about halfway down in this function. * */ function phpblock_galleryRandomPhoto() { global $_CONF, $GALLERY_BASEDIR, $GALLERY_NO_SESSIONS, $gallery; $GALLERY_NO_SESSIONS=true; $GALLERY_BASEDIR = "/home/cat320/public_html/gallery/"; define(CACHE_FILE, "/home/cat320/public_html/gallery_temp/randomblock/block-random.cache"); define(CACHE_EXPIRED, 86400); require_once($GALLERY_BASEDIR ."init.php"); include_once($_CONF['path_html'] . "/block-random.php"); if ($profile) { $timer = time(); } /* Initializing the seed */ srand ((double) microtime() * 1000000); // Check the cache file to see if it's up to date $rebuild = 1; if (fs_file_exists(CACHE_FILE)) { $stat = fs_stat(CACHE_FILE); $mtime = $stat[9]; if (time() - $mtime < CACHE_EXPIRED) { $rebuild = 0; } } if ($rebuild) { scanAlbums(); saveCache(); } else { readCache(); } $album = chooseAlbum(); if ($album) { $index = choosePhoto($album); } if (isset($index)) { $id = $album->getPhotoId($index); $retval = "" ."<a href=" .makeAlbumUrl($album->fields["name"], $id) .">" .$album->getThumbnailTag($index) ."</a>"; $caption = $album->getCaption($index); // Add any exclusions that you want for captions. I don't always add an caption and Gallery use the default image name // which I don't want to display. My Cannon digicam uses IMG_XXXX and my Kodak uses DCP_XXXX if (($caption) AND(!strstr($caption,"IMG_")) AND (!strstr($caption,"DCP_"))) { $retval .= "<br><center>$caption</center>"; } else { $retval .= "<br>"; } $retval .= "<br><center>From: " ."<a href=" .makeAlbumUrl($album->fields["name"]) .">" .$album->fields["title"] ."</a></center>"; } else { $retval = "No photo chosen."; } if ($profile) { $elapsed = time() - $timer; $retval .= "<br>Elapsed: $elapsed secs"; } return $retval; }
Posted on: 10/06/04 07:29pm
By: bcbrock
Posted on: 10/08/04 04:13pm
By: bcbrock
Posted on: 10/09/04 08:35am
By: jeffhare
Posted on: 01/10/05 07:45pm
By: dgaussin
if (isset($gallery->app->embedded_inside_type) && $gallery->app->embedded_inside_type=='GeekLog') { $GALLERY_EMBEDDED_INSIDE='GeekLog'; $GALLERY_EMBEDDED_INSIDE_TYPE = 'GeekLog'; // Verify that the geeklog_dir isn't overwritten with a remote exploit if (!realpath($gallery->app->geeklog_dir)) { print _("Security violation") ."n"; exit; } else { if (! defined ("GEEKLOG_DIR")) { define ("GEEKLOG_DIR",$gallery->app->geeklog_dir); } } require_once(GEEKLOG_DIR . '/lib-common.php'); }
if (isset($gallery->app->embedded_inside_type) && $gallery->app->embedded_inside_type=='GeekLog') { $GALLERY_EMBEDDED_INSIDE='GeekLog'; $GALLERY_EMBEDDED_INSIDE_TYPE = 'GeekLog'; // Verify that the geeklog_dir isn't overwritten with a remote exploit if (!realpath($gallery->app->geeklog_dir)) { print _("Security violation") ."n"; exit; } else { if (! defined ("GEEKLOG_DIR")) { define ("GEEKLOG_DIR",$gallery->app->geeklog_dir); } } if (!$GALLERY_BASEDIR) { require_once(GEEKLOG_DIR . '/lib-common.php'); } }