December 2005 »  Viewing DSCN4293     [Image 97 of 97]  :: Jump To  
  First slide Previous slide      Show/Hide EXIF Info Index Page Start/Stop the slide show      You have reached the last slide You have reached the last slide Help
Comment: HALLELUJAH!! ONE YEAR CLEAN AND SOBER!!! (as of dec17, 2005)
DSCN4262 * proverbs with sean, louie, billy, and alejandro * 1024 x 768 * (486KB)

DSCN4263 * i didn't make it in time to get in the pic * 1024 x 768 * (480KB)

DSCN4264 * but, there i am now * 1024 x 768 * (481KB)

DSCN4266 * this one is nowhere to be found in my book * 1024 x 768 * (188KB)

DSCN4268 * but, that is the Rainbow Ryders of Albuquerque, piloted by Dan M. Dalen  (i think there are actually two of these 'loons, this one with the red cap on top, the other with a rainbow band around the bottom) * 1024 x 768 * (193KB)

Click for the original image
 
12/28/05 9:13 PM - DSCN4293.JPG - 1024 x 768 - (610KB)
Download file (610KB)
  First slide Previous slide      Show/Hide EXIF Info Index Page Start/Stop the slide show      You have reached the last slide You have reached the last slide Help
$sql = mysql_query("select * from $table where imageID='$id' order by date DESC"); if( mysql_errno()!=0 ) echo( reportError("Select in showAllPhotoRemarks()", mysql_errno(), mysql_error()) ); while( $row=mysql_fetch_array($sql)) { $msg = str_replace("\n","
",$row["msg"]); $name = $row["name"]; //restore quotes, etc., if needed if( !get_magic_quotes_gpc() ) { $name = stripslashes($name); $msg = stripslashes($msg); } echo("\n
"); if( $admin==true ) showForm($script, $admin, $name, $msg, $row["id"]); //show input form else echo("\n\t
$msg
"); echo("\n\t
".MSG_POSTED_BY." ".$name." ".MSG_POSTED_AT." ".fetchDate($row["date"])."
"); echo("\n
"); } //end while mysql_free_result($sql); } if( $admin==false ) //exhibit Add Remark form showForm($script, $admin, "", "", "0"); } function showForm($script, $admin, $name, $msg, $id) //displays the remarks input form { $action = $admin ? "5" : "2"; echo( "\n\t
" ); echo( "\n\t\t" ); echo( "\n\t\t" ); echo( "\n\t\t".MSG_REMARK_AUTHOR."
" ); echo( "\n\t\t
".MSG_REMARK_CONTENT."
" ); if( $action=="2" ) //'add' button echo( "\n\t\t
" ); else // 'edit' & 'delete' buttons { echo( "\n\t\t
 " ); echo( "\n\t\t" ); } echo( "\n\t
" ); } function fetchRemarksCount($table, $id) { $sql = mysql_query("select * from $table where imageID='$id'"); if( mysql_errno()!=0 ) echo( reportError("Select in fetchRemarksCount()", mysql_errno(), mysql_error()) ); $numOfRows = mysql_num_rows($sql); mysql_free_result($sql); return $numOfRows; } function validateEntry() { //check to see if either name or msg is empty & display warning message if so $name = (IsSet($_POST["name"]))?$_POST["name"]:""; $msg = (IsSet($_POST["msg"]))?$_POST["msg"]:""; $valid = true; if( (strlen($name)<1) || (strlen($msg)<1) ) { echo("
".MSG_EMPTY_AUTHOR_OR_REMARK."
"); $valid = false; } //escape quotes and slashes if necessary if( !get_magic_quotes_gpc() ) { $name = addslashes($name); $msg = addslashes($msg); } //create allowable opening html tags array $open_tag[1]=""; //permit bold and italics $open_tag[2]=""; $open_tag[3]=""; $open_tag[4]=""; $allowable_tags=""; //initialize and build allowable html tags string foreach ($open_tag as $tag) {$allowable_tags=$allowable_tags.$tag."name', NOW(), '$remarkEntry->msg', '".gethostbyaddr($_SERVER["REMOTE_ADDR"])."',"; if( !empty($_SERVER['HTTP_X_FORWARDED_FOR']) ) $query .= "'" . gethostbyaddr($_SERVER['HTTP_X_FORWARDED_FOR']) . "'"; else $query .= " NULL"; $query .= ",'".addslashes($_SERVER["HTTP_REFERER"])."')"; mysql_query($query); if( mysql_errno()!=0 ) echo( reportError("Add Remark", mysql_errno(), mysql_error()) ); else { if( NOTIFY ) // send notification email if enabled sendNotification($table, $imageID, $remarkEntry->name, $remarkEntry->msg); } } function updatePhotoRemark($table, $remarkEntry) { mysql_query("update $table SET name= '$remarkEntry->name' , msg= '$remarkEntry->msg' where id = '$_POST[id]'"); if( mysql_errno()!=0 ) echo( reportError("Update Remark", mysql_errno(), mysql_error()) ); } function deletePhotoRemark($table) { mysql_query("delete from $table where id = '$_POST[id]'"); if( mysql_errno()!=0 ) echo( reportError("Delete remark for photo", mysql_errno(), mysql_error()) ); else echo("
".MSG_PHOTO_REMARK_DELETED."
"); } function deleteAllPhotoRemarks($table, $imageID) { mysql_query("delete from $table where imageID = '".addslashes($imageID)."'"); if( mysql_errno()!=0 ) echo( reportError("Delete all remarks for photo", mysql_errno(), mysql_error()) ); else echo("
".MSG_PHOTO_REMARKS_DELETED."
"); } ////////// // super admin features not availble through GUI--browse to special URL only ////////// /** * deletes ALL remarks from this album * * Example: * http://www.server.com/picture1234.php?action=666&password=myDbPassword * * NOTE: database password required */ function deleteAllRemarks($table) { $password = (IsSet($_POST["password"]))?$_POST["password"]:""; $x=!strcmp(DB_PASSWORD, $password); if( !$x ) echo("
".MSG_INVALID_PASSWORD."
"); else { mysql_query("drop table ".$table); if( mysql_errno()!=0 ) echo( reportError("Drop Table", mysql_errno(), mysql_error()) ); else echo("
".MSG_ALL_REMARKS_DELETED."
"); } } /** * Shows all remarks for pix in this album * * Example: * http://www.server.com/picture1234.php?action=100&password=myDbPassword * * NOTE: database password required */ function showAllAlbumRemarks($table_name) { $result = mysql_query("select * from ".$table_name); if( mysql_errno()!=0 ) echo( reportError("Dump table", mysql_errno(), mysql_error() ) ); $table .= "\n\n"; $noFields = mysql_num_fields($result); $table .= "\n"; for( $i = 0; $i<$noFields; $i++ ) { $field = mysql_field_name($result, $i); $table .= "\t\n"; } while( $r = mysql_fetch_row($result) ) { $table .= "\n"; foreach ($r as $col) { $table .= "\t\n"; } $table .= "\n"; } $table .= "
$field
$col
\n\n"; echo $table; } function reportError($errloc, $errno, $errmsg) { $msg = "\n
"; $msg .= "\n\tA database error has occurred!!"; $msg .= "\n\tPlease report the following error details to site administrators:"; $msg .= "\n\t
    "; $msg .= "\n\t\t
  • Error location: $errloc
  • "; $msg .= "\n\t\t
  • Error no.: $errno
  • "; $msg .= "\n\t\t
  • Error message: $errmsg
  • "; $msg .= "\n\t
"; $msg .= "\n
"; return $msg; } include "connect.php"; /////// open connection to the database $connect = mysql_connect(DB_URL, DB_USERNAME, DB_PASSWORD) or die("Cannot connect to database: ".mysql_error()); mysql_select_db(DB_NAME,$connect) or die("Cannot select database: ".mysql_error()); /////// create table if needed //ensure that table name has only allowable characters $bad_chars = "!@#$%^&*()+<>?{}|[]\:,.-= "; //translate non-allowed characters to '_' $table = strtolower(strtr(DB_TABLE_NAME, $bad_chars, str_repeat("_", strlen($bad_chars)))); mysql_query("create table if not exists ".$table." (id int not null AUTO_INCREMENT, imageID char(200), date datetime not null default '0000-00-00 00:00:00', name char(100), msg text, ip1 char(100), ip2 char(100), refer char(255), primary key (id))"); if( mysql_errno()!=0 ) echo( reportError("Error Creating Table $table", mysql_errno(), mysql_error()) ); ?>