Monday February 6th, 2012

downtown
Cale.cc
 

fine dining
    
Trade Center
Not Logged in

To contribute your own pictures to our gallery you need to login. If you're not already a member - you can register for free! 

join us!

The Cale Family Image Gallery

View Top Rated

Amers Cousins

Halloween pics 2004 '."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; if (!$pSingle){ $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; } $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.='
Visit our  album Visit our  album
Visit our  album Halloween 2004
(11 photos in 2 albums)
An Image selected at random: 'Auntie Shellie and Grayson'
above image selected at random

view the 'Halloween 2004' category
View album for this imageView this image 'Auntie Shellie and Grayson'

Pumpkin and Tiger

Visit our  album Visit our  album
Visit our  album
(1003 photos, viewed times)
Everything #658
above image selected at random

View album for this imageView this image 'Everything #658'

0){ $vAlbum = getGalleryPost($vGallery['pid']); }else{ $vAlbum = $vGallery; } ?>
Visit our  album Visit our  album
Visit our  album
selected at random from the album:
view the 'Halloween 2004' category
(containing 1003 photos, viewed times)
'."\n"; $vOutput.='
'."\n"; $vOutput.= HTMLClean(ucfirst($pGallery['title']))."\n"; $vOutput.='
'."\n"; if ($pSingle){ $vOutput.= doImageString('gallery/'.$pGallery['image'],HTMLClean($pGallery['title']),'','center','class="galleryimage"'); }else{ $vOutput.= doImageString('gallery/t_'.$pGallery['image'],HTMLClean($pGallery['title']),$vLink,'center','class="galleryimage" onmouseover="galleryRollIn(\'image_'.$pGallery['id'].'\')" onmouseout="galleryRollOut(\'image_'.$pGallery['id'].'\')"'); } $vOutput.='
'."\n"; $vOutput.=doImageString('gallery/icons/gallerydetail.off.gif','View the full size Image',$vLink,'center','name="image_'.$pGallery['id'].'"'); $vOutput.='
'."\n"; $vOutput.= '
'."\n"; $vOutput.= 'source name: '.(empty($pGallery['origname'])?'--':$pGallery['origname']).'
'."\n"; $vOutput.= 'posted by: '; $vOutput.= textLinkString($cPathXDe.'user.php?action=profile&uid='.$pGallery['uid'],'View this user\'s profile',GetUsername($pGallery['uid']))."\n"; $vOutput.= '
'."\n"; $vOutput.= 'viewed '.$pGallery['views'].' times'."\n"; $vOutput.= '

'."\n"; $vOutput.= HTMLClean($pGallery['description']); $vOutput.='
'."\n"; $vOutput.='
'."\n"; return $vOutput; } /*====================================================================================================================================================================*/ /** * @return array Uploaded image details * @param pPath string the FULL path to the gallery upload dir * @param pPrefix string a prefix (if any) to prepend to image filenames * @desc Validate a gallery image upload */ function doGalleryImageUpload($pPath, $pPrefix=''){ $vResult = array(); if(($_FILES['filename']['error'] == 0) and ($_FILES['filename']['name'] <> '')){ $vResult['origname'] = $_FILES['filename']['name']; switch($_FILES['filename']['type']){ case 'image/jpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/gif' : $vResult['filename'] = uniqid($pPrefix.'-').'.gif'; $vResult['valid'] = true; break; case 'image/pjpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/png' : $vResult['filename'] = uniqid($pPrefix.'-').'.png'; $vResult['valid'] = true; break; default : $vResult['valid']=false; $vResult['errors'] = 'Only image files are permitted
'."\n"; $vResult['errors'] = $_FILES['filename']['type'].' is not a valid type
'."\n"; } }else{ $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; } if ($vResult['valid']) { if (!move_uploaded_file($_FILES['filename']['tmp_name'],$pPath.'/'.$vResult['filename'])) { $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; }else{ if (ImageMaxSize($pPath.'/'.$vResult['filename'],getSiteOption('image.max.width'), getSiteOption('image.max.height'),80)){//Shrink main image if necessary $vResult['messages'] = 'Image was resized to maximum 600×800 pixels'; } MakeThumbnail($pPath.'/'.$vResult['filename'], getSiteOption('image.thumb.width'), getSiteOption('image.thumb.height'), 60); } } return $vResult; } /*====================================================================================================================================================================*/ /** * @return integer the id of the album being created/replaced * @desc Update/Create an Album in the Database */ function replaceGalleryAlbum($pAlbum){ global $ppbDatabase; $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pAlbum['id'].', '; $vSQL.= $pAlbum['pid'].', '; $vSQL.= $pAlbum['cid'].', '; $vSQL.= $pAlbum['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pAlbum['title']).'\','; $vSQL.= '\''.dbClean($pAlbum['description']).'\','; $vSQL.= '\''.dbClean($pAlbum['keywords']).'\','; $vSQL.= $pAlbum['views'].', '; $vSQL.= '\''.$pAlbum['image'].'\','; $vSQL.= $pAlbum['closed'].', '; $vSQL.= '\''.$pAlbum['origname'].'\', '; $vSQL.= '\''.$pAlbum['sortkey'].'\', '; $vSQL.= '\''.$pAlbum['sorttype'].'\' '; $vSQL.= ')'; //print $vSQL; if(!mysql_query($vSQL)){ myError('Album Update Failed'); return 0; }else{ if($pAlbum['id']>0){ return $pAlbum['id']; }else{ return mysql_insert_id(); } } } /*====================================================================================================================================================================*/ /** * @return integer the id of the item being created/replaced * @param pGallery array a complete gallery post array * @desc Update/Create an item in the passed Album in the Database */ function replaceGalleryItem($pGallery){ global $ppbDatabase; if($pGallery['pid'] > 0){ $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pGallery['id'].', '; $vSQL.= $pGallery['pid'].', '; $vSQL.= $pGallery['cid'].', '; $vSQL.= $pGallery['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pGallery['title']).'\','; $vSQL.= '\''.dbClean($pGallery['description']).'\','; $vSQL.= '\''.dbClean($pGallery['keywords']).'\','; $vSQL.= $pGallery['views'].', '; $vSQL.= '\''.$pGallery['image'].'\','; $vSQL.= '0,'; $vSQL.= '\''.$pGallery['origname'].'\', '; $vSQL.= '\''.$pGallery['sortkey'].'\', '; $vSQL.= '0 '; $vSQL.= ')'; if(!mysql_query($vSQL)){ myError('Gallery Item Update Failed'); return 0; }else{ if($pGallery['id']>0){ return $pGallery['id']; }else{ return mysql_insert_id(); } } }else{ myError('No Album specified'); return 0; } } /*====================================================================================================================================================================*/ /** * @return void * @param pGallery array a gallery item array (may be empty) * @param pAdmin boolean true to show admin controls * @desc Display the form for adding/modifying an album */ function formGalleryItem($pGallery, $pAdmin=false){ $vAlbum=getGalleryPost($pGallery['pid']); ?>  

Baby

Amer Cale, born July 4th, 2004 @ 5:23am '."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; if (!$pSingle){ $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; } $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.='
Visit our  album Visit our  album
Visit our  album 2004 Amer Rika
(89 photos in 4 albums)
An Image selected at random: 'Bath Time'
above image selected at random

view the '2004 Amer Rika' category
View album for this imageView this image 'Bath Time'

Visit our  album Visit our  album
Visit our  album
(1003 photos, viewed times)
Everything #156
above image selected at random

View album for this imageView this image 'Everything #156'

0){ $vAlbum = getGalleryPost($vGallery['pid']); }else{ $vAlbum = $vGallery; } ?>
Visit our  album Visit our  album
Visit our  album
selected at random from the album:
view the '2004 Amer Rika' category
(containing 1003 photos, viewed times)
'."\n"; $vOutput.='
'."\n"; $vOutput.= HTMLClean(ucfirst($pGallery['title']))."\n"; $vOutput.='
'."\n"; if ($pSingle){ $vOutput.= doImageString('gallery/'.$pGallery['image'],HTMLClean($pGallery['title']),'','center','class="galleryimage"'); }else{ $vOutput.= doImageString('gallery/t_'.$pGallery['image'],HTMLClean($pGallery['title']),$vLink,'center','class="galleryimage" onmouseover="galleryRollIn(\'image_'.$pGallery['id'].'\')" onmouseout="galleryRollOut(\'image_'.$pGallery['id'].'\')"'); } $vOutput.='
'."\n"; $vOutput.=doImageString('gallery/icons/gallerydetail.off.gif','View the full size Image',$vLink,'center','name="image_'.$pGallery['id'].'"'); $vOutput.='
'."\n"; $vOutput.= '
'."\n"; $vOutput.= 'source name: '.(empty($pGallery['origname'])?'--':$pGallery['origname']).'
'."\n"; $vOutput.= 'posted by: '; $vOutput.= textLinkString($cPathXDe.'user.php?action=profile&uid='.$pGallery['uid'],'View this user\'s profile',GetUsername($pGallery['uid']))."\n"; $vOutput.= '
'."\n"; $vOutput.= 'viewed '.$pGallery['views'].' times'."\n"; $vOutput.= '

'."\n"; $vOutput.= HTMLClean($pGallery['description']); $vOutput.='
'."\n"; $vOutput.='
'."\n"; return $vOutput; } /*====================================================================================================================================================================*/ /** * @return array Uploaded image details * @param pPath string the FULL path to the gallery upload dir * @param pPrefix string a prefix (if any) to prepend to image filenames * @desc Validate a gallery image upload */ function doGalleryImageUpload($pPath, $pPrefix=''){ $vResult = array(); if(($_FILES['filename']['error'] == 0) and ($_FILES['filename']['name'] <> '')){ $vResult['origname'] = $_FILES['filename']['name']; switch($_FILES['filename']['type']){ case 'image/jpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/gif' : $vResult['filename'] = uniqid($pPrefix.'-').'.gif'; $vResult['valid'] = true; break; case 'image/pjpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/png' : $vResult['filename'] = uniqid($pPrefix.'-').'.png'; $vResult['valid'] = true; break; default : $vResult['valid']=false; $vResult['errors'] = 'Only image files are permitted
'."\n"; $vResult['errors'] = $_FILES['filename']['type'].' is not a valid type
'."\n"; } }else{ $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; } if ($vResult['valid']) { if (!move_uploaded_file($_FILES['filename']['tmp_name'],$pPath.'/'.$vResult['filename'])) { $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; }else{ if (ImageMaxSize($pPath.'/'.$vResult['filename'],getSiteOption('image.max.width'), getSiteOption('image.max.height'),80)){//Shrink main image if necessary $vResult['messages'] = 'Image was resized to maximum 600×800 pixels'; } MakeThumbnail($pPath.'/'.$vResult['filename'], getSiteOption('image.thumb.width'), getSiteOption('image.thumb.height'), 60); } } return $vResult; } /*====================================================================================================================================================================*/ /** * @return integer the id of the album being created/replaced * @desc Update/Create an Album in the Database */ function replaceGalleryAlbum($pAlbum){ global $ppbDatabase; $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pAlbum['id'].', '; $vSQL.= $pAlbum['pid'].', '; $vSQL.= $pAlbum['cid'].', '; $vSQL.= $pAlbum['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pAlbum['title']).'\','; $vSQL.= '\''.dbClean($pAlbum['description']).'\','; $vSQL.= '\''.dbClean($pAlbum['keywords']).'\','; $vSQL.= $pAlbum['views'].', '; $vSQL.= '\''.$pAlbum['image'].'\','; $vSQL.= $pAlbum['closed'].', '; $vSQL.= '\''.$pAlbum['origname'].'\', '; $vSQL.= '\''.$pAlbum['sortkey'].'\', '; $vSQL.= '\''.$pAlbum['sorttype'].'\' '; $vSQL.= ')'; //print $vSQL; if(!mysql_query($vSQL)){ myError('Album Update Failed'); return 0; }else{ if($pAlbum['id']>0){ return $pAlbum['id']; }else{ return mysql_insert_id(); } } } /*====================================================================================================================================================================*/ /** * @return integer the id of the item being created/replaced * @param pGallery array a complete gallery post array * @desc Update/Create an item in the passed Album in the Database */ function replaceGalleryItem($pGallery){ global $ppbDatabase; if($pGallery['pid'] > 0){ $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pGallery['id'].', '; $vSQL.= $pGallery['pid'].', '; $vSQL.= $pGallery['cid'].', '; $vSQL.= $pGallery['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pGallery['title']).'\','; $vSQL.= '\''.dbClean($pGallery['description']).'\','; $vSQL.= '\''.dbClean($pGallery['keywords']).'\','; $vSQL.= $pGallery['views'].', '; $vSQL.= '\''.$pGallery['image'].'\','; $vSQL.= '0,'; $vSQL.= '\''.$pGallery['origname'].'\', '; $vSQL.= '\''.$pGallery['sortkey'].'\', '; $vSQL.= '0 '; $vSQL.= ')'; if(!mysql_query($vSQL)){ myError('Gallery Item Update Failed'); return 0; }else{ if($pGallery['id']>0){ return $pGallery['id']; }else{ return mysql_insert_id(); } } }else{ myError('No Album specified'); return 0; } } /*====================================================================================================================================================================*/ /** * @return void * @param pGallery array a gallery item array (may be empty) * @param pAdmin boolean true to show admin controls * @desc Display the form for adding/modifying an album */ function formGalleryItem($pGallery, $pAdmin=false){ $vAlbum=getGalleryPost($pGallery['pid']); ?>
Visit our  album Visit our  album
Visit our  album NEW ! 2005 Amer Rika
(20 photos in 1 album)
An Image selected at random: 'Brooklyn Botanic Garden - Cherry blossom festival'
above image selected at random

view the 'NEW ! 2005 Amer Rika ' category
View album for this imageView this image 'Brooklyn Botanic Garden - Cherry blossom festival'

Visit our  album Visit our  album
Visit our  album
(1003 photos, viewed times)
Everything #202
above image selected at random

View album for this imageView this image 'Everything #202'

0){ $vAlbum = getGalleryPost($vGallery['pid']); }else{ $vAlbum = $vGallery; } ?>
Visit our  album Visit our  album
Visit our  album
selected at random from the album:
view the 'NEW ! 2005 Amer Rika ' category
(containing 1003 photos, viewed times)
'."\n"; $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.= HTMLClean(ucfirst($pGallery['title']))."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.=''."\n"; $vOutput.=' '."\n"; if ($pSingle){ $vOutput.= doImageString('gallery/'.$pGallery['image'],HTMLClean($pGallery['title']),'','center','class="galleryimage"'); }else{ $vOutput.= doImageString('gallery/t_'.$pGallery['image'],HTMLClean($pGallery['title']),$vLink,'center','class="galleryimage" onmouseover="galleryRollIn(\'image_'.$pGallery['id'].'\')" onmouseout="galleryRollOut(\'image_'.$pGallery['id'].'\')"'); } $vOutput.=' '."\n"; $vOutput.=''."\n"; if (!$pSingle){ $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=doImageString('gallery/icons/gallerydetail.off.gif','View the full size Image',$vLink,'center','name="image_'.$pGallery['id'].'"'); $vOutput.=' '."\n"; $vOutput.=''."\n"; } $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.= '
'."\n"; $vOutput.= 'source name: '.(empty($pGallery['origname'])?'--':$pGallery['origname']).'
'."\n"; $vOutput.= 'posted by: '; $vOutput.= textLinkString($cPathXDe.'user.php?action=profile&uid='.$pGallery['uid'],'View this user\'s profile',GetUsername($pGallery['uid']))."\n"; $vOutput.= '
'."\n"; $vOutput.= 'viewed '.$pGallery['views'].' times'."\n"; $vOutput.= '

'."\n"; $vOutput.= HTMLClean($pGallery['description']); $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.=''."\n"; $vOutput.='
'."\n"; return $vOutput; } /*====================================================================================================================================================================*/ /** * @return array Uploaded image details * @param pPath string the FULL path to the gallery upload dir * @param pPrefix string a prefix (if any) to prepend to image filenames * @desc Validate a gallery image upload */ function doGalleryImageUpload($pPath, $pPrefix=''){ $vResult = array(); if(($_FILES['filename']['error'] == 0) and ($_FILES['filename']['name'] <> '')){ $vResult['origname'] = $_FILES['filename']['name']; switch($_FILES['filename']['type']){ case 'image/jpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/gif' : $vResult['filename'] = uniqid($pPrefix.'-').'.gif'; $vResult['valid'] = true; break; case 'image/pjpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/png' : $vResult['filename'] = uniqid($pPrefix.'-').'.png'; $vResult['valid'] = true; break; default : $vResult['valid']=false; $vResult['errors'] = 'Only image files are permitted
'."\n"; $vResult['errors'] = $_FILES['filename']['type'].' is not a valid type
'."\n"; } }else{ $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; } if ($vResult['valid']) { if (!move_uploaded_file($_FILES['filename']['tmp_name'],$pPath.'/'.$vResult['filename'])) { $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; }else{ if (ImageMaxSize($pPath.'/'.$vResult['filename'],getSiteOption('image.max.width'), getSiteOption('image.max.height'),80)){//Shrink main image if necessary $vResult['messages'] = 'Image was resized to maximum 600×800 pixels'; } MakeThumbnail($pPath.'/'.$vResult['filename'], getSiteOption('image.thumb.width'), getSiteOption('image.thumb.height'), 60); } } return $vResult; } /*====================================================================================================================================================================*/ /** * @return integer the id of the album being created/replaced * @desc Update/Create an Album in the Database */ function replaceGalleryAlbum($pAlbum){ global $ppbDatabase; $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pAlbum['id'].', '; $vSQL.= $pAlbum['pid'].', '; $vSQL.= $pAlbum['cid'].', '; $vSQL.= $pAlbum['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pAlbum['title']).'\','; $vSQL.= '\''.dbClean($pAlbum['description']).'\','; $vSQL.= '\''.dbClean($pAlbum['keywords']).'\','; $vSQL.= $pAlbum['views'].', '; $vSQL.= '\''.$pAlbum['image'].'\','; $vSQL.= $pAlbum['closed'].', '; $vSQL.= '\''.$pAlbum['origname'].'\', '; $vSQL.= '\''.$pAlbum['sortkey'].'\', '; $vSQL.= '\''.$pAlbum['sorttype'].'\' '; $vSQL.= ')'; //print $vSQL; if(!mysql_query($vSQL)){ myError('Album Update Failed'); return 0; }else{ if($pAlbum['id']>0){ return $pAlbum['id']; }else{ return mysql_insert_id(); } } } /*====================================================================================================================================================================*/ /** * @return integer the id of the item being created/replaced * @param pGallery array a complete gallery post array * @desc Update/Create an item in the passed Album in the Database */ function replaceGalleryItem($pGallery){ global $ppbDatabase; if($pGallery['pid'] > 0){ $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pGallery['id'].', '; $vSQL.= $pGallery['pid'].', '; $vSQL.= $pGallery['cid'].', '; $vSQL.= $pGallery['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pGallery['title']).'\','; $vSQL.= '\''.dbClean($pGallery['description']).'\','; $vSQL.= '\''.dbClean($pGallery['keywords']).'\','; $vSQL.= $pGallery['views'].', '; $vSQL.= '\''.$pGallery['image'].'\','; $vSQL.= '0,'; $vSQL.= '\''.$pGallery['origname'].'\', '; $vSQL.= '\''.$pGallery['sortkey'].'\', '; $vSQL.= '0 '; $vSQL.= ')'; if(!mysql_query($vSQL)){ myError('Gallery Item Update Failed'); return 0; }else{ if($pGallery['id']>0){ return $pGallery['id']; }else{ return mysql_insert_id(); } } }else{ myError('No Album specified'); return 0; } } /*====================================================================================================================================================================*/ /** * @return void * @param pGallery array a gallery item array (may be empty) * @param pAdmin boolean true to show admin controls * @desc Display the form for adding/modifying an album */ function formGalleryItem($pGallery, $pAdmin=false){ $vAlbum=getGalleryPost($pGallery['pid']); ?>
Visit our  album Visit our  album
Visit our  album Our son
(0 photos in 0 album)
no images yet
above image selected at random

view the 'Our son' category

Visit our  album Visit our  album
Visit our  album
(1003 photos, viewed times)
Everything #501
above image selected at random

View album for this imageView this image 'Everything #501'

0){ $vAlbum = getGalleryPost($vGallery['pid']); }else{ $vAlbum = $vGallery; } ?>
Visit our  album Visit our  album
Visit our  album
selected at random from the album:
view the 'Our son' category
(containing 1003 photos, viewed times)
'."\n"; $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.= HTMLClean(ucfirst($pGallery['title']))."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.=''."\n"; $vOutput.=' '."\n"; if ($pSingle){ $vOutput.= doImageString('gallery/'.$pGallery['image'],HTMLClean($pGallery['title']),'','center','class="galleryimage"'); }else{ $vOutput.= doImageString('gallery/t_'.$pGallery['image'],HTMLClean($pGallery['title']),$vLink,'center','class="galleryimage" onmouseover="galleryRollIn(\'image_'.$pGallery['id'].'\')" onmouseout="galleryRollOut(\'image_'.$pGallery['id'].'\')"'); } $vOutput.=' '."\n"; $vOutput.=''."\n"; if (!$pSingle){ $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=doImageString('gallery/icons/gallerydetail.off.gif','View the full size Image',$vLink,'center','name="image_'.$pGallery['id'].'"'); $vOutput.=' '."\n"; $vOutput.=''."\n"; } $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.= '
'."\n"; $vOutput.= 'source name: '.(empty($pGallery['origname'])?'--':$pGallery['origname']).'
'."\n"; $vOutput.= 'posted by: '; $vOutput.= textLinkString($cPathXDe.'user.php?action=profile&uid='.$pGallery['uid'],'View this user\'s profile',GetUsername($pGallery['uid']))."\n"; $vOutput.= '
'."\n"; $vOutput.= 'viewed '.$pGallery['views'].' times'."\n"; $vOutput.= '

'."\n"; $vOutput.= HTMLClean($pGallery['description']); $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.=''."\n"; $vOutput.='
'."\n"; return $vOutput; } /*====================================================================================================================================================================*/ /** * @return array Uploaded image details * @param pPath string the FULL path to the gallery upload dir * @param pPrefix string a prefix (if any) to prepend to image filenames * @desc Validate a gallery image upload */ function doGalleryImageUpload($pPath, $pPrefix=''){ $vResult = array(); if(($_FILES['filename']['error'] == 0) and ($_FILES['filename']['name'] <> '')){ $vResult['origname'] = $_FILES['filename']['name']; switch($_FILES['filename']['type']){ case 'image/jpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/gif' : $vResult['filename'] = uniqid($pPrefix.'-').'.gif'; $vResult['valid'] = true; break; case 'image/pjpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/png' : $vResult['filename'] = uniqid($pPrefix.'-').'.png'; $vResult['valid'] = true; break; default : $vResult['valid']=false; $vResult['errors'] = 'Only image files are permitted
'."\n"; $vResult['errors'] = $_FILES['filename']['type'].' is not a valid type
'."\n"; } }else{ $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; } if ($vResult['valid']) { if (!move_uploaded_file($_FILES['filename']['tmp_name'],$pPath.'/'.$vResult['filename'])) { $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; }else{ if (ImageMaxSize($pPath.'/'.$vResult['filename'],getSiteOption('image.max.width'), getSiteOption('image.max.height'),80)){//Shrink main image if necessary $vResult['messages'] = 'Image was resized to maximum 600×800 pixels'; } MakeThumbnail($pPath.'/'.$vResult['filename'], getSiteOption('image.thumb.width'), getSiteOption('image.thumb.height'), 60); } } return $vResult; } /*====================================================================================================================================================================*/ /** * @return integer the id of the album being created/replaced * @desc Update/Create an Album in the Database */ function replaceGalleryAlbum($pAlbum){ global $ppbDatabase; $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pAlbum['id'].', '; $vSQL.= $pAlbum['pid'].', '; $vSQL.= $pAlbum['cid'].', '; $vSQL.= $pAlbum['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pAlbum['title']).'\','; $vSQL.= '\''.dbClean($pAlbum['description']).'\','; $vSQL.= '\''.dbClean($pAlbum['keywords']).'\','; $vSQL.= $pAlbum['views'].', '; $vSQL.= '\''.$pAlbum['image'].'\','; $vSQL.= $pAlbum['closed'].', '; $vSQL.= '\''.$pAlbum['origname'].'\', '; $vSQL.= '\''.$pAlbum['sortkey'].'\', '; $vSQL.= '\''.$pAlbum['sorttype'].'\' '; $vSQL.= ')'; //print $vSQL; if(!mysql_query($vSQL)){ myError('Album Update Failed'); return 0; }else{ if($pAlbum['id']>0){ return $pAlbum['id']; }else{ return mysql_insert_id(); } } } /*====================================================================================================================================================================*/ /** * @return integer the id of the item being created/replaced * @param pGallery array a complete gallery post array * @desc Update/Create an item in the passed Album in the Database */ function replaceGalleryItem($pGallery){ global $ppbDatabase; if($pGallery['pid'] > 0){ $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pGallery['id'].', '; $vSQL.= $pGallery['pid'].', '; $vSQL.= $pGallery['cid'].', '; $vSQL.= $pGallery['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pGallery['title']).'\','; $vSQL.= '\''.dbClean($pGallery['description']).'\','; $vSQL.= '\''.dbClean($pGallery['keywords']).'\','; $vSQL.= $pGallery['views'].', '; $vSQL.= '\''.$pGallery['image'].'\','; $vSQL.= '0,'; $vSQL.= '\''.$pGallery['origname'].'\', '; $vSQL.= '\''.$pGallery['sortkey'].'\', '; $vSQL.= '0 '; $vSQL.= ')'; if(!mysql_query($vSQL)){ myError('Gallery Item Update Failed'); return 0; }else{ if($pGallery['id']>0){ return $pGallery['id']; }else{ return mysql_insert_id(); } } }else{ myError('No Album specified'); return 0; } } /*====================================================================================================================================================================*/ /** * @return void * @param pGallery array a gallery item array (may be empty) * @param pAdmin boolean true to show admin controls * @desc Display the form for adding/modifying an album */ function formGalleryItem($pGallery, $pAdmin=false){ $vAlbum=getGalleryPost($pGallery['pid']); ?>  

Scott & Etsuko

'."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; if (!$pSingle){ $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; } $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.='
Visit our  album Visit our  album
Visit our  album Road trips
(16 photos in 1 album)
An Image selected at random: 'Picteresque '
above image selected at random

view the 'Road trips' category
View album for this imageView this image 'Picteresque '

Visit our  album Visit our  album
Visit our  album
(1003 photos, viewed times)
Everything #89
above image selected at random

View album for this imageView this image 'Everything #89'

0){ $vAlbum = getGalleryPost($vGallery['pid']); }else{ $vAlbum = $vGallery; } ?>
Visit our  album Visit our  album
Visit our  album
selected at random from the album:
view the 'Road trips' category
(containing 1003 photos, viewed times)
'."\n"; $vOutput.='
'."\n"; $vOutput.= HTMLClean(ucfirst($pGallery['title']))."\n"; $vOutput.='
'."\n"; if ($pSingle){ $vOutput.= doImageString('gallery/'.$pGallery['image'],HTMLClean($pGallery['title']),'','center','class="galleryimage"'); }else{ $vOutput.= doImageString('gallery/t_'.$pGallery['image'],HTMLClean($pGallery['title']),$vLink,'center','class="galleryimage" onmouseover="galleryRollIn(\'image_'.$pGallery['id'].'\')" onmouseout="galleryRollOut(\'image_'.$pGallery['id'].'\')"'); } $vOutput.='
'."\n"; $vOutput.=doImageString('gallery/icons/gallerydetail.off.gif','View the full size Image',$vLink,'center','name="image_'.$pGallery['id'].'"'); $vOutput.='
'."\n"; $vOutput.= '
'."\n"; $vOutput.= 'source name: '.(empty($pGallery['origname'])?'--':$pGallery['origname']).'
'."\n"; $vOutput.= 'posted by: '; $vOutput.= textLinkString($cPathXDe.'user.php?action=profile&uid='.$pGallery['uid'],'View this user\'s profile',GetUsername($pGallery['uid']))."\n"; $vOutput.= '
'."\n"; $vOutput.= 'viewed '.$pGallery['views'].' times'."\n"; $vOutput.= '

'."\n"; $vOutput.= HTMLClean($pGallery['description']); $vOutput.='
'."\n"; $vOutput.='
'."\n"; return $vOutput; } /*====================================================================================================================================================================*/ /** * @return array Uploaded image details * @param pPath string the FULL path to the gallery upload dir * @param pPrefix string a prefix (if any) to prepend to image filenames * @desc Validate a gallery image upload */ function doGalleryImageUpload($pPath, $pPrefix=''){ $vResult = array(); if(($_FILES['filename']['error'] == 0) and ($_FILES['filename']['name'] <> '')){ $vResult['origname'] = $_FILES['filename']['name']; switch($_FILES['filename']['type']){ case 'image/jpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/gif' : $vResult['filename'] = uniqid($pPrefix.'-').'.gif'; $vResult['valid'] = true; break; case 'image/pjpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/png' : $vResult['filename'] = uniqid($pPrefix.'-').'.png'; $vResult['valid'] = true; break; default : $vResult['valid']=false; $vResult['errors'] = 'Only image files are permitted
'."\n"; $vResult['errors'] = $_FILES['filename']['type'].' is not a valid type
'."\n"; } }else{ $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; } if ($vResult['valid']) { if (!move_uploaded_file($_FILES['filename']['tmp_name'],$pPath.'/'.$vResult['filename'])) { $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; }else{ if (ImageMaxSize($pPath.'/'.$vResult['filename'],getSiteOption('image.max.width'), getSiteOption('image.max.height'),80)){//Shrink main image if necessary $vResult['messages'] = 'Image was resized to maximum 600×800 pixels'; } MakeThumbnail($pPath.'/'.$vResult['filename'], getSiteOption('image.thumb.width'), getSiteOption('image.thumb.height'), 60); } } return $vResult; } /*====================================================================================================================================================================*/ /** * @return integer the id of the album being created/replaced * @desc Update/Create an Album in the Database */ function replaceGalleryAlbum($pAlbum){ global $ppbDatabase; $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pAlbum['id'].', '; $vSQL.= $pAlbum['pid'].', '; $vSQL.= $pAlbum['cid'].', '; $vSQL.= $pAlbum['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pAlbum['title']).'\','; $vSQL.= '\''.dbClean($pAlbum['description']).'\','; $vSQL.= '\''.dbClean($pAlbum['keywords']).'\','; $vSQL.= $pAlbum['views'].', '; $vSQL.= '\''.$pAlbum['image'].'\','; $vSQL.= $pAlbum['closed'].', '; $vSQL.= '\''.$pAlbum['origname'].'\', '; $vSQL.= '\''.$pAlbum['sortkey'].'\', '; $vSQL.= '\''.$pAlbum['sorttype'].'\' '; $vSQL.= ')'; //print $vSQL; if(!mysql_query($vSQL)){ myError('Album Update Failed'); return 0; }else{ if($pAlbum['id']>0){ return $pAlbum['id']; }else{ return mysql_insert_id(); } } } /*====================================================================================================================================================================*/ /** * @return integer the id of the item being created/replaced * @param pGallery array a complete gallery post array * @desc Update/Create an item in the passed Album in the Database */ function replaceGalleryItem($pGallery){ global $ppbDatabase; if($pGallery['pid'] > 0){ $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pGallery['id'].', '; $vSQL.= $pGallery['pid'].', '; $vSQL.= $pGallery['cid'].', '; $vSQL.= $pGallery['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pGallery['title']).'\','; $vSQL.= '\''.dbClean($pGallery['description']).'\','; $vSQL.= '\''.dbClean($pGallery['keywords']).'\','; $vSQL.= $pGallery['views'].', '; $vSQL.= '\''.$pGallery['image'].'\','; $vSQL.= '0,'; $vSQL.= '\''.$pGallery['origname'].'\', '; $vSQL.= '\''.$pGallery['sortkey'].'\', '; $vSQL.= '0 '; $vSQL.= ')'; if(!mysql_query($vSQL)){ myError('Gallery Item Update Failed'); return 0; }else{ if($pGallery['id']>0){ return $pGallery['id']; }else{ return mysql_insert_id(); } } }else{ myError('No Album specified'); return 0; } } /*====================================================================================================================================================================*/ /** * @return void * @param pGallery array a gallery item array (may be empty) * @param pAdmin boolean true to show admin controls * @desc Display the form for adding/modifying an album */ function formGalleryItem($pGallery, $pAdmin=false){ $vAlbum=getGalleryPost($pGallery['pid']); ?>
Visit our  album Visit our  album
Visit our  album Scott & Etsuko
(19 photos in 1 album)
An Image selected at random: 'Scott's birthday Oct.13'
above image selected at random

view the 'Scott & Etsuko' category
View album for this imageView this image 'Scott´s birthday Oct.13'

Visit our  album Visit our  album
Visit our  album
(1003 photos, viewed times)
Everything #522
above image selected at random

View album for this imageView this image 'Everything #522'

0){ $vAlbum = getGalleryPost($vGallery['pid']); }else{ $vAlbum = $vGallery; } ?>
Visit our  album Visit our  album
Visit our  album
selected at random from the album:
view the 'Scott & Etsuko' category
(containing 1003 photos, viewed times)
'."\n"; $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.= HTMLClean(ucfirst($pGallery['title']))."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.=''."\n"; $vOutput.=' '."\n"; if ($pSingle){ $vOutput.= doImageString('gallery/'.$pGallery['image'],HTMLClean($pGallery['title']),'','center','class="galleryimage"'); }else{ $vOutput.= doImageString('gallery/t_'.$pGallery['image'],HTMLClean($pGallery['title']),$vLink,'center','class="galleryimage" onmouseover="galleryRollIn(\'image_'.$pGallery['id'].'\')" onmouseout="galleryRollOut(\'image_'.$pGallery['id'].'\')"'); } $vOutput.=' '."\n"; $vOutput.=''."\n"; if (!$pSingle){ $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=doImageString('gallery/icons/gallerydetail.off.gif','View the full size Image',$vLink,'center','name="image_'.$pGallery['id'].'"'); $vOutput.=' '."\n"; $vOutput.=''."\n"; } $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.= '
'."\n"; $vOutput.= 'source name: '.(empty($pGallery['origname'])?'--':$pGallery['origname']).'
'."\n"; $vOutput.= 'posted by: '; $vOutput.= textLinkString($cPathXDe.'user.php?action=profile&uid='.$pGallery['uid'],'View this user\'s profile',GetUsername($pGallery['uid']))."\n"; $vOutput.= '
'."\n"; $vOutput.= 'viewed '.$pGallery['views'].' times'."\n"; $vOutput.= '

'."\n"; $vOutput.= HTMLClean($pGallery['description']); $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.=''."\n"; $vOutput.='
'."\n"; return $vOutput; } /*====================================================================================================================================================================*/ /** * @return array Uploaded image details * @param pPath string the FULL path to the gallery upload dir * @param pPrefix string a prefix (if any) to prepend to image filenames * @desc Validate a gallery image upload */ function doGalleryImageUpload($pPath, $pPrefix=''){ $vResult = array(); if(($_FILES['filename']['error'] == 0) and ($_FILES['filename']['name'] <> '')){ $vResult['origname'] = $_FILES['filename']['name']; switch($_FILES['filename']['type']){ case 'image/jpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/gif' : $vResult['filename'] = uniqid($pPrefix.'-').'.gif'; $vResult['valid'] = true; break; case 'image/pjpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/png' : $vResult['filename'] = uniqid($pPrefix.'-').'.png'; $vResult['valid'] = true; break; default : $vResult['valid']=false; $vResult['errors'] = 'Only image files are permitted
'."\n"; $vResult['errors'] = $_FILES['filename']['type'].' is not a valid type
'."\n"; } }else{ $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; } if ($vResult['valid']) { if (!move_uploaded_file($_FILES['filename']['tmp_name'],$pPath.'/'.$vResult['filename'])) { $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; }else{ if (ImageMaxSize($pPath.'/'.$vResult['filename'],getSiteOption('image.max.width'), getSiteOption('image.max.height'),80)){//Shrink main image if necessary $vResult['messages'] = 'Image was resized to maximum 600×800 pixels'; } MakeThumbnail($pPath.'/'.$vResult['filename'], getSiteOption('image.thumb.width'), getSiteOption('image.thumb.height'), 60); } } return $vResult; } /*====================================================================================================================================================================*/ /** * @return integer the id of the album being created/replaced * @desc Update/Create an Album in the Database */ function replaceGalleryAlbum($pAlbum){ global $ppbDatabase; $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pAlbum['id'].', '; $vSQL.= $pAlbum['pid'].', '; $vSQL.= $pAlbum['cid'].', '; $vSQL.= $pAlbum['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pAlbum['title']).'\','; $vSQL.= '\''.dbClean($pAlbum['description']).'\','; $vSQL.= '\''.dbClean($pAlbum['keywords']).'\','; $vSQL.= $pAlbum['views'].', '; $vSQL.= '\''.$pAlbum['image'].'\','; $vSQL.= $pAlbum['closed'].', '; $vSQL.= '\''.$pAlbum['origname'].'\', '; $vSQL.= '\''.$pAlbum['sortkey'].'\', '; $vSQL.= '\''.$pAlbum['sorttype'].'\' '; $vSQL.= ')'; //print $vSQL; if(!mysql_query($vSQL)){ myError('Album Update Failed'); return 0; }else{ if($pAlbum['id']>0){ return $pAlbum['id']; }else{ return mysql_insert_id(); } } } /*====================================================================================================================================================================*/ /** * @return integer the id of the item being created/replaced * @param pGallery array a complete gallery post array * @desc Update/Create an item in the passed Album in the Database */ function replaceGalleryItem($pGallery){ global $ppbDatabase; if($pGallery['pid'] > 0){ $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pGallery['id'].', '; $vSQL.= $pGallery['pid'].', '; $vSQL.= $pGallery['cid'].', '; $vSQL.= $pGallery['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pGallery['title']).'\','; $vSQL.= '\''.dbClean($pGallery['description']).'\','; $vSQL.= '\''.dbClean($pGallery['keywords']).'\','; $vSQL.= $pGallery['views'].', '; $vSQL.= '\''.$pGallery['image'].'\','; $vSQL.= '0,'; $vSQL.= '\''.$pGallery['origname'].'\', '; $vSQL.= '\''.$pGallery['sortkey'].'\', '; $vSQL.= '0 '; $vSQL.= ')'; if(!mysql_query($vSQL)){ myError('Gallery Item Update Failed'); return 0; }else{ if($pGallery['id']>0){ return $pGallery['id']; }else{ return mysql_insert_id(); } } }else{ myError('No Album specified'); return 0; } } /*====================================================================================================================================================================*/ /** * @return void * @param pGallery array a gallery item array (may be empty) * @param pAdmin boolean true to show admin controls * @desc Display the form for adding/modifying an album */ function formGalleryItem($pGallery, $pAdmin=false){ $vAlbum=getGalleryPost($pGallery['pid']); ?>

Scott Cale

Scott´s Personal Stuff '."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; if (!$pSingle){ $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; } $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.='
Visit our  album Visit our  album
Visit our  album Other Stuff
(4 photos in 1 album)
An Image selected at random: 'Hawaii'
above image selected at random

view the 'Other Stuff' category
View album for this imageView this image 'Hawaii'

Misc. Other stuff

Visit our  album Visit our  album
Visit our  album
(1003 photos, viewed times)
Everything #295
above image selected at random

View album for this imageView this image 'Everything #295'

0){ $vAlbum = getGalleryPost($vGallery['pid']); }else{ $vAlbum = $vGallery; } ?>
Visit our  album Visit our  album
Visit our  album
selected at random from the album:
view the 'Other Stuff' category
(containing 1003 photos, viewed times)
'."\n"; $vOutput.='
'."\n"; $vOutput.= HTMLClean(ucfirst($pGallery['title']))."\n"; $vOutput.='
'."\n"; if ($pSingle){ $vOutput.= doImageString('gallery/'.$pGallery['image'],HTMLClean($pGallery['title']),'','center','class="galleryimage"'); }else{ $vOutput.= doImageString('gallery/t_'.$pGallery['image'],HTMLClean($pGallery['title']),$vLink,'center','class="galleryimage" onmouseover="galleryRollIn(\'image_'.$pGallery['id'].'\')" onmouseout="galleryRollOut(\'image_'.$pGallery['id'].'\')"'); } $vOutput.='
'."\n"; $vOutput.=doImageString('gallery/icons/gallerydetail.off.gif','View the full size Image',$vLink,'center','name="image_'.$pGallery['id'].'"'); $vOutput.='
'."\n"; $vOutput.= '
'."\n"; $vOutput.= 'source name: '.(empty($pGallery['origname'])?'--':$pGallery['origname']).'
'."\n"; $vOutput.= 'posted by: '; $vOutput.= textLinkString($cPathXDe.'user.php?action=profile&uid='.$pGallery['uid'],'View this user\'s profile',GetUsername($pGallery['uid']))."\n"; $vOutput.= '
'."\n"; $vOutput.= 'viewed '.$pGallery['views'].' times'."\n"; $vOutput.= '

'."\n"; $vOutput.= HTMLClean($pGallery['description']); $vOutput.='
'."\n"; $vOutput.='
'."\n"; return $vOutput; } /*====================================================================================================================================================================*/ /** * @return array Uploaded image details * @param pPath string the FULL path to the gallery upload dir * @param pPrefix string a prefix (if any) to prepend to image filenames * @desc Validate a gallery image upload */ function doGalleryImageUpload($pPath, $pPrefix=''){ $vResult = array(); if(($_FILES['filename']['error'] == 0) and ($_FILES['filename']['name'] <> '')){ $vResult['origname'] = $_FILES['filename']['name']; switch($_FILES['filename']['type']){ case 'image/jpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/gif' : $vResult['filename'] = uniqid($pPrefix.'-').'.gif'; $vResult['valid'] = true; break; case 'image/pjpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/png' : $vResult['filename'] = uniqid($pPrefix.'-').'.png'; $vResult['valid'] = true; break; default : $vResult['valid']=false; $vResult['errors'] = 'Only image files are permitted
'."\n"; $vResult['errors'] = $_FILES['filename']['type'].' is not a valid type
'."\n"; } }else{ $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; } if ($vResult['valid']) { if (!move_uploaded_file($_FILES['filename']['tmp_name'],$pPath.'/'.$vResult['filename'])) { $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; }else{ if (ImageMaxSize($pPath.'/'.$vResult['filename'],getSiteOption('image.max.width'), getSiteOption('image.max.height'),80)){//Shrink main image if necessary $vResult['messages'] = 'Image was resized to maximum 600×800 pixels'; } MakeThumbnail($pPath.'/'.$vResult['filename'], getSiteOption('image.thumb.width'), getSiteOption('image.thumb.height'), 60); } } return $vResult; } /*====================================================================================================================================================================*/ /** * @return integer the id of the album being created/replaced * @desc Update/Create an Album in the Database */ function replaceGalleryAlbum($pAlbum){ global $ppbDatabase; $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pAlbum['id'].', '; $vSQL.= $pAlbum['pid'].', '; $vSQL.= $pAlbum['cid'].', '; $vSQL.= $pAlbum['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pAlbum['title']).'\','; $vSQL.= '\''.dbClean($pAlbum['description']).'\','; $vSQL.= '\''.dbClean($pAlbum['keywords']).'\','; $vSQL.= $pAlbum['views'].', '; $vSQL.= '\''.$pAlbum['image'].'\','; $vSQL.= $pAlbum['closed'].', '; $vSQL.= '\''.$pAlbum['origname'].'\', '; $vSQL.= '\''.$pAlbum['sortkey'].'\', '; $vSQL.= '\''.$pAlbum['sorttype'].'\' '; $vSQL.= ')'; //print $vSQL; if(!mysql_query($vSQL)){ myError('Album Update Failed'); return 0; }else{ if($pAlbum['id']>0){ return $pAlbum['id']; }else{ return mysql_insert_id(); } } } /*====================================================================================================================================================================*/ /** * @return integer the id of the item being created/replaced * @param pGallery array a complete gallery post array * @desc Update/Create an item in the passed Album in the Database */ function replaceGalleryItem($pGallery){ global $ppbDatabase; if($pGallery['pid'] > 0){ $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pGallery['id'].', '; $vSQL.= $pGallery['pid'].', '; $vSQL.= $pGallery['cid'].', '; $vSQL.= $pGallery['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pGallery['title']).'\','; $vSQL.= '\''.dbClean($pGallery['description']).'\','; $vSQL.= '\''.dbClean($pGallery['keywords']).'\','; $vSQL.= $pGallery['views'].', '; $vSQL.= '\''.$pGallery['image'].'\','; $vSQL.= '0,'; $vSQL.= '\''.$pGallery['origname'].'\', '; $vSQL.= '\''.$pGallery['sortkey'].'\', '; $vSQL.= '0 '; $vSQL.= ')'; if(!mysql_query($vSQL)){ myError('Gallery Item Update Failed'); return 0; }else{ if($pGallery['id']>0){ return $pGallery['id']; }else{ return mysql_insert_id(); } } }else{ myError('No Album specified'); return 0; } } /*====================================================================================================================================================================*/ /** * @return void * @param pGallery array a gallery item array (may be empty) * @param pAdmin boolean true to show admin controls * @desc Display the form for adding/modifying an album */ function formGalleryItem($pGallery, $pAdmin=false){ $vAlbum=getGalleryPost($pGallery['pid']); ?>
Visit our  album Visit our  album
Visit our  album Wedding
(844 photos in 3 albums)
An Image selected at random: 'Everything #49'
above image selected at random

view the 'Wedding' category
View album for this imageView this image 'Everything #49'

The Big Day!

Visit our  album Visit our  album
Visit our  album
(1003 photos, viewed times)
Everything #651
above image selected at random

View album for this imageView this image 'Everything #651'

0){ $vAlbum = getGalleryPost($vGallery['pid']); }else{ $vAlbum = $vGallery; } ?>
Visit our  album Visit our  album
Visit our  album
selected at random from the album:
view the 'Wedding' category
(containing 1003 photos, viewed times)
'."\n"; $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.= HTMLClean(ucfirst($pGallery['title']))."\n"; $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.=''."\n"; $vOutput.=' '."\n"; if ($pSingle){ $vOutput.= doImageString('gallery/'.$pGallery['image'],HTMLClean($pGallery['title']),'','center','class="galleryimage"'); }else{ $vOutput.= doImageString('gallery/t_'.$pGallery['image'],HTMLClean($pGallery['title']),$vLink,'center','class="galleryimage" onmouseover="galleryRollIn(\'image_'.$pGallery['id'].'\')" onmouseout="galleryRollOut(\'image_'.$pGallery['id'].'\')"'); } $vOutput.=' '."\n"; $vOutput.=''."\n"; if (!$pSingle){ $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.=doImageString('gallery/icons/gallerydetail.off.gif','View the full size Image',$vLink,'center','name="image_'.$pGallery['id'].'"'); $vOutput.=' '."\n"; $vOutput.=''."\n"; } $vOutput.=''."\n"; $vOutput.=' '."\n"; $vOutput.= '
'."\n"; $vOutput.= 'source name: '.(empty($pGallery['origname'])?'--':$pGallery['origname']).'
'."\n"; $vOutput.= 'posted by: '; $vOutput.= textLinkString($cPathXDe.'user.php?action=profile&uid='.$pGallery['uid'],'View this user\'s profile',GetUsername($pGallery['uid']))."\n"; $vOutput.= '
'."\n"; $vOutput.= 'viewed '.$pGallery['views'].' times'."\n"; $vOutput.= '

'."\n"; $vOutput.= HTMLClean($pGallery['description']); $vOutput.=' '."\n"; $vOutput.=''."\n"; $vOutput.=''."\n"; $vOutput.='
'."\n"; return $vOutput; } /*====================================================================================================================================================================*/ /** * @return array Uploaded image details * @param pPath string the FULL path to the gallery upload dir * @param pPrefix string a prefix (if any) to prepend to image filenames * @desc Validate a gallery image upload */ function doGalleryImageUpload($pPath, $pPrefix=''){ $vResult = array(); if(($_FILES['filename']['error'] == 0) and ($_FILES['filename']['name'] <> '')){ $vResult['origname'] = $_FILES['filename']['name']; switch($_FILES['filename']['type']){ case 'image/jpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/gif' : $vResult['filename'] = uniqid($pPrefix.'-').'.gif'; $vResult['valid'] = true; break; case 'image/pjpeg' : $vResult['filename'] = uniqid($pPrefix.'-').'.jpg'; $vResult['valid'] = true; break; case 'image/png' : $vResult['filename'] = uniqid($pPrefix.'-').'.png'; $vResult['valid'] = true; break; default : $vResult['valid']=false; $vResult['errors'] = 'Only image files are permitted
'."\n"; $vResult['errors'] = $_FILES['filename']['type'].' is not a valid type
'."\n"; } }else{ $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; } if ($vResult['valid']) { if (!move_uploaded_file($_FILES['filename']['tmp_name'],$pPath.'/'.$vResult['filename'])) { $vResult['valid'] = false; $vResult['filename'] = ''; $vResult['errors'] = 'File did not upload successfully'."\n"; }else{ if (ImageMaxSize($pPath.'/'.$vResult['filename'],getSiteOption('image.max.width'), getSiteOption('image.max.height'),80)){//Shrink main image if necessary $vResult['messages'] = 'Image was resized to maximum 600×800 pixels'; } MakeThumbnail($pPath.'/'.$vResult['filename'], getSiteOption('image.thumb.width'), getSiteOption('image.thumb.height'), 60); } } return $vResult; } /*====================================================================================================================================================================*/ /** * @return integer the id of the album being created/replaced * @desc Update/Create an Album in the Database */ function replaceGalleryAlbum($pAlbum){ global $ppbDatabase; $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pAlbum['id'].', '; $vSQL.= $pAlbum['pid'].', '; $vSQL.= $pAlbum['cid'].', '; $vSQL.= $pAlbum['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pAlbum['title']).'\','; $vSQL.= '\''.dbClean($pAlbum['description']).'\','; $vSQL.= '\''.dbClean($pAlbum['keywords']).'\','; $vSQL.= $pAlbum['views'].', '; $vSQL.= '\''.$pAlbum['image'].'\','; $vSQL.= $pAlbum['closed'].', '; $vSQL.= '\''.$pAlbum['origname'].'\', '; $vSQL.= '\''.$pAlbum['sortkey'].'\', '; $vSQL.= '\''.$pAlbum['sorttype'].'\' '; $vSQL.= ')'; //print $vSQL; if(!mysql_query($vSQL)){ myError('Album Update Failed'); return 0; }else{ if($pAlbum['id']>0){ return $pAlbum['id']; }else{ return mysql_insert_id(); } } } /*====================================================================================================================================================================*/ /** * @return integer the id of the item being created/replaced * @param pGallery array a complete gallery post array * @desc Update/Create an item in the passed Album in the Database */ function replaceGalleryItem($pGallery){ global $ppbDatabase; if($pGallery['pid'] > 0){ $vSQL = 'REPLACE INTO '.$ppbDatabase['gallery'].' VALUES ('; $vSQL.= $pGallery['id'].', '; $vSQL.= $pGallery['pid'].', '; $vSQL.= $pGallery['cid'].', '; $vSQL.= $pGallery['uid'].', '; $vSQL.= 'CURRENT_TIMESTAMP,'; $vSQL.= '\''.dbClean($pGallery['title']).'\','; $vSQL.= '\''.dbClean($pGallery['description']).'\','; $vSQL.= '\''.dbClean($pGallery['keywords']).'\','; $vSQL.= $pGallery['views'].', '; $vSQL.= '\''.$pGallery['image'].'\','; $vSQL.= '0,'; $vSQL.= '\''.$pGallery['origname'].'\', '; $vSQL.= '\''.$pGallery['sortkey'].'\', '; $vSQL.= '0 '; $vSQL.= ')'; if(!mysql_query($vSQL)){ myError('Gallery Item Update Failed'); return 0; }else{ if($pGallery['id']>0){ return $pGallery['id']; }else{ return mysql_insert_id(); } } }else{ myError('No Album specified'); return 0; } } /*====================================================================================================================================================================*/ /** * @return void * @param pGallery array a gallery item array (may be empty) * @param pAdmin boolean true to show admin controls * @desc Display the form for adding/modifying an album */ function formGalleryItem($pGallery, $pAdmin=false){ $vAlbum=getGalleryPost($pGallery['pid']); ?>

the administrators reserve the right to edit and/or delete content deemed inappropriate

Copyright © 2001-2012 cale.cc