// // ### Adding a special 'index' icon or photo #################################################### // // Add an 'index.jpg', 'index.gif' or 'index.png' to your album which will be used on the main // album index page. Usefull if you want a specific icon or photo to represent the album. // // ### Multimedia Support - Create music and movie albums ######################################## // // Enable multimedia support, add a MP3 file to the album and an image with the same name OR add // an icon with the name mp3.png to the multimedia-icon directory to represent all MP3 files. // // ### Known problems - please check www.guestmagazine.net for more info ########################### // // A large photo will not create a thumbnail due to the PHP memory limit (increase limit php.ini) // If thumbnails are not created, set $gd2=true to $gd2=false (see configuration section B) // It is NOT possible to rename this script, it will look for other albums index.php files // Do not use special characters in filenames or directory names (like: ') // // *********************************************************************************************** // // CONFIGURATION SECTION-A : Only editable in this script, make changes and save before uploading // // ### Login - Administrator access $admin_access=true; // Change to true for EASY configuration, press 'Tab' key or add ?admin=1 behind your URL, http://www.web.com/photoalbum/index.php?admin=1: true or false $admins='mar,foto'; // Admin(s) with access to this album: 'login-name,password' comma separated - change this to your own login-name and password!! $admin_ip=''; // Allow admin login from specified IP addresses only, one or multiple IP's comma separated - optional $enable_admin_keyboardshortcut=true; // Press 'Tab' key on your keyboard to continue to the admin login screen: true or false // ### Hosting the album $max_albums=0; // Maximum amount of albums 0=unlimited $max_album_size=0; // Maximum filesize of album in MB 0=unlimited $allow_configuration=true; // Allow modification of the configuration; true or false $comment_size=250; // Maxmimum amount of characters in visitor comment // ### Permanent batch image resize $resizeimages=false; // Set to true to auto-resize all uploaded photos permanently for smaller filesize - EXIF information is lost - write access required $resizeto=640; // Size in px for permanent resize (min. 30 pixels) //set_time_limit(360); // Optional: Allow more time for batch resizing (when script times-out - remove the // at the beginning of this line) // ### Colors for EasyPhpAlbum logo $logo_line_color='#CCCCCC'; // Logo line color $logo_text_color='#E79A62'; // Logo text color // ### Translations for the visitors $language_page='Pagina'; // Text for page number - Change this in your own language $language_homepage='Inicio'; // Text for homepage button in menu - change this in your own language $language_albums='Albums'; // Text for amount of albums - change this in your own language $language_photos='Fotos'; // Text for amount of photos - change this in your own language $language_view='Ver'; // Text for tooltip image- change this in your own language $language_view_next='->'; // Text for next image link- change this in your own language $language_view_previous='<-'; // Text for previous image link- change this in your own language $language_viewnext='Clique para visualizar a próxima foto (ou use as setas do teclado)'; // Text for tooltip image in popup window - change this in your own language $language_viewmm='Play multimedia file'; // Text for tooltip multimedia file - change this in your own language $language_dir_empty='Directory empty'; // Text for empty directory - change this in your own language $language_login='Autenticacao'; // Text for login - change this in your own language $language_logout='Sair'; // Text for logout - change this in your own language $language_user='Utilizador'; // Text for username - change this in your own language $language_passw='Password'; // Text for password - change this in your own language $language_slideshow='ver apresentacao'; // Text for starting slideshow - change this in your own language $language_stop_slideshow='parar apresentacao'; // Text for stopping slideshow - change this in your own language $language_hitcounter_tooltip='Hit counter'; // Text for tooltip of hit counter - change this in your own language $language_email_alt='Email this page to a friend'; // Text for tooltip of email button - change this in your own language $language_email_subject='EasyPhpAlbum'; // Text for email subject line - change this in your own language $language_email_comment='Please copy this link in your browser:'; // Text for email comment line - change this in your own language $language_download='right-click to download: '; // Text for download link - change this in your own language $language_rating='rating:'; // Text for rating photo - change this in your own language $language_hits='hits:'; // Text for hits photo - change this in your own language $language_countcomments='total comments: '; // Text for thumbnail comments counter - change this in your own language $language_rating_votes='votes'; // Text for rating photo amount of votes - change this in your own language $language_rating_tooltip='Rating (5=excellent / 1=poor)'; // Text for rating tooltip - change this in your own language $language_rating_choose='Choose a rating'; // Text for rating selection - change this in your own language $language_rating_excellent='5 - Excellent'; // Text for rating selection - change this in your own language $language_rating_verygood='4 - Very good'; // Text for rating selection - change this in your own language $language_rating_good='3 - Good'; // Text for rating selection - change this in your own language $language_rating_fair='2 - Fair'; // Text for rating selection - change this in your own language $language_rating_poor='1 - Poor'; // Text for rating selection - change this in your own language $language_add_comment='add comment'; // Text for visitors to add a comment - change this in your own language $language_add_file='Upload file'; // Text for visitors to add a file - change this in your own language $language_save_comment='Save comment'; // Text for visitors to save the comment - change this in your own language $language_upload_comment='Upload file(s)'; // Text for visitors to upload files - change this in your own language $language_username_comment='Nickname'; // Text for visitors to add nickname to the comment or file upload - change this in your own language $language_comment_max='Maxmimum amount of characters'; // Text for visitors maximum comment characters - change this in your own language $language_up='Up'; // Text for menu directory up - change this in your own language $language_shop_info='N.copias e tamanho:'; // Text for shop number of copies per photo - change this in your own language $language_shop_order='Encomendar Fotografias'; // Text for shop order button - change this in your own language $language_shop_cancel='Cancelar'; // Text for shop cancel button - change this in your own language $language_shop_address='Nome e Morada completos:'; // Text for shop address - change this to your own language $language_shop_email_address='Endereco E-mail ou telefone:'; // Text for shop address - change this to your own language $language_shop_ordercomments='A sua encomenda (podera adicionar comentarios):'; // Text for shop address - change this to your own language $language_shop_confirmation='Encomenda efectuada - brevemente entraremos em contacto consigo. Obrigado'; // Text for shop address - change this to your own language $language_sort_option1='standard album sort'; // Options for visitor album sort - change this to your own language $language_sort_option2='sort by hitcounter'; // Options for visitor album sort - change this to your own language $language_sort_option3='sort by comments'; // Options for visitor album sort - change this to your own language $language_sort_option4='sort by rating'; // Options for visitor album sort - change this to your own language $language_sort_option5='sort by date'; // Options for visitor album sort - change this to your own language // ************************************************************************************************** // * * // * A 'configuration.php' file created by this script overrides the configuration section B below! * // * * // ************************************************************************************************** // // CONFIGURATION SECTION-B : Also editable using the administrator web-interface (recommended) // ### Login - Restrict access for visitors $restrict_access=false; // Ask for valid login and password: true or false $users='mar,foto'; // User(s) with access to this album: 'name,password' comma separated // ### Server & navigation $gd2=true; // Set to true if your server has GDLib2+ (for better quality thumbnails) $title='Marfoto - Photography'; // Page title - leave empty to display directory name $home_page=''; // Menu link to another page or homepage of your website - leave empty to disable $show_email_link=false; // Shows 'email' button: true or false $show_poweredby_easyphpalbum=false; // Set to true or false. True is strongly recommended! ;) $imagemagick=false; // Use ImageMagick (when installed on server) for resize/rotate of images in admin section $imagemagick_path=''; // The path to ImageMagick (leave empty if link is available on server) otherwise use for example '/usr/bin/' $show_bottommenu=true; // Display bottom album navigation menu: true or false $show_topmenu=false; // Display top album navigation menu: true or false $show_dir_up=false; // Display menu item 'directory up' - required for sub-sub-dir structure: true or false $show_statistics=true; // Show album statistics on main page: true or false $use_main_config=false; // Use configuration file from main album index page: true or false $use_album_config=''; // Use configuration from other album - enter directory or album name or leave empty to disable $enable_keyboard_arrows=true; // Use the arrows keys on your keyboard to continue to the next or previous photo: true or false $ban_ip=''; // IP adresses to ignore for the hitcounter, rating, comment and upload system - add one or multiple IP's comma separated, example: 127.0.0.1,10.0.0.150 // ### Thumbnail layout and creation $thumb_size=160; // Size in px for thumbnails (min. 30 pixels) $border_width=0; // Add border around photo - width in px (0=no border) $show_bordershadow=false; // Display shadow around border: true or false $show_binder=false; // Display binder: true or false $binder_spacing=8; // Space between binder-rings in px $clip_corner=15; // Clip corner of photo - size in % of width (0=no clipping) $clip_corner_round=true; // Clip corner of photo - rounded or straight: true or false $clip_topleft=false; // Clip top left corner: true or false $clip_topright=true; // Clip top right corner: true or false $clip_bottomleft=true; // Clip bottom left corner: true or false $clip_bottomright=true; // Clip bottom right corner: true or false $clip_randomly=false; // Randomly clip 'enabled' corners: true or false $show_number=false; // Display photo number in thumbnail: true or false $create_thumbnail_cache=true; // Save thumbnails for faster display (recommended) - requires write access to (sub)directory: true or false $thumbnail_txtfile=false; // Display textfile from photo with thumbnail: true or false $thumbnail_opacity=false; // Use 'fade-out/fade-in' thumbnails: true or false $opacity_level=50; // Set opacity between 0 and 100; 0=invisible and 100=normal $thumbnail_countcomments=false; // Show amount of comments for photo: true or false $indeximage_no_thumb=true; // Do not 'thumbnailize' the albums index.jpg png or gif image: true or false $thumbnail_borderpng=''; // Add a border to the thumbnail, filelocation of the (transparent) PNG image file, example 'gfx/border.png' $thumbnail_spacing=0; // Width in px of thumbnail-cell (0=autosize) $thumbnail_rotation=false; // Rotate the thumbnail: true or false $thumbnail_rotation_degrees=0; // 0=random, otherwise: 45 or -45 $valign_thumbnail='top'; // Alignment of thumbnail: 'middle', 'top' or 'bottom' $show_thumb_name_top=false; // Show name above thumbnail: true or false $square_thumbnails=false; // Create thumbnails with the same width & height: true or false // ### Page layout and behaviour $images_per_page=20; // Number of photos to display per page $columns_per_page=4; // Number of photos next to each other $popup=false; // Display photo in popup or on page: true or false $popup_force_focus=false; // Set to true to force window on top (only for popup) $popup_browse=true; // Browse photos in popup window: true or false $image_border=true; // Display border around photo (only when $popup=false): true or false $slideshow=true; // Enable slideshow: true or false $slideshow_delay=4000; // Time between slides in milliseconds (1 second = 1000 milliseconds). Minimum 1 second. $page_header=true; // Show page title and line (false=compact format): true or false $center_title=false; // Centers title on page: true or false $center_album=false; // Centers all content on page: true or false $sort_thumbs=false; // Sort thumbs according to (exif) date, new to old: true or false $sort_rating=false; // Sort thumbs according to rating score, high to low: true or false $sort_hits=false; // Sort thumbs according to total hits, high to low: true or false $sort_comments=false; // Sort thumbs according to total comments, high to low: true or false $sort_hightolow=true; // Sort from high/new to low/old (score/rating and date): true or false $visitor_sort=false; // Allow visitors to sort the photos in the album: true or false $background_image='http://www.marfoto.com.pt/escolha_fotos/fundo.jpg'; // The URL for your background image (example: 'http://www.guestmagazine.net/bg.gif'), leave empty for no background $background_repeat='repeat'; // Repeat your background image, valid settings: repeat / repeat-x / repeat-y / no-repeat $background_position='50% 50%'; // Position your background image based on % of width and % of height of page (50% 50% =centered) $menu_background_image='http://www.marfoto.com.pt/escolha_fotos/fundo.jpg'; // The URL for your menu background image (example: 'http://www.guestmagazine.net/bg.gif'), leave empty for no background $content_width='85%'; // The width of the page content: % or px, example: 85% or 800px $content_leftmargin='10px'; // The left margin of the page content: % or px, example: 5% or 10px $page_leftmargin='20px'; // The left margin of the page: % or px, example: 0% or 20px $header=''; // The URL to an image to use as a page header, leave empty to disable $footer=''; // The URL to an image to use as a page footer, leave empty to disable $transparent_page=false; // Make album background transparent for site integration: true or false $transparent_menu=false; // Make album menu background transparent for site integration: true or false $show_previous_next=true; // When displaying the photo, show the thumbnails of the previous and next photo: true or false $show_prev_next_below=false; // Show previous and next thumbnail below the photo: true or false $show_prev_next_size=80; // Size of previous and next thumbnail in px $show_prev_next_position='middle'; // Alignment of previous and next thumbnail: 'middle', 'top' or 'bottom' // ### Photo information $show_name=true; // Display file name: true or false (tip: use filename as short description for photo) $show_name_top=true; // Display file name above image: true or false $show_details=false; // Display photo dimensions & filesize: true or false $show_date=false; // Display date of photo (based on EXIF-date, if not available uses file-date): true or false $show_date_format='d-M-Y H:i'; // Format for date - see PHP manual function date to change this $show_exif_comment=false; // Display EXIF comment from photo (only when $popup=false): true or false $show_iptc_caption=false; // Display the IPTC caption from photo (only when $popup=false): true or false $show_download=false; // Show download link for photo in original size: true or false $image_txtfile=true; // Display text from a textfile (only when $popup=false). Filename for text file is same as photo (myphoto.jpg >> myphoto.txt): true or false $visitor_comments=false; // Allow visitors to enter a comment with the photo: true or false $visitor_comments_dateformat='d/M/Y H:i'; // Format for date with comment - see PHP manual function date to change this $visitor_upload=false; // Allow visitors to upload a file (be carefull!): true or false $visitor_upload_size=2048; // Maximum upload size for files from visitors in kB (2048 kB = 2 MB) $visitor_upload_max_files=6; // Maximum amount of files that can be uploaded by visitor simultaneously: 1 to 6 maximum $visitor_files='png,gif,jpg,jpeg,swf'; // Allow visitors to upload the specified file(s), comma separated $upload_email=''; // Enter your email address to receive a notification of new uploads by mail, leave empty to disable $comment_email=''; // Enter your email address to receive a copy of the comment by mail, leave empty to disable $comment_logip=false; // Save and display IP address with comment: true or false $hit_counter=false; // Enable hit counter - views per photo (not album), requires write access: true or false $hit_counter_random=true; // Display segments irregular: true or false $hit_counter_text=false; // Use text based hitcounter: true or false $rating=false; // Enable rating system - vistors rate the photo/multimediafile from scale 5 (excellent) to 1 (poor) - only when $popup=false, requires write access: true or false $rating_text=false; // Use text based rating - vistors rate the photo/multimediafile from scale 5 (excellent) to 1 (poor) - only when $popup=false, requires write access: true or false $name_bold=true; // Write photo name in bold: true or false $name_italic=true; // Write photo name in italic: true or false $info_bold=false; // Write photo information in bold: true or false $info_italic=false; // Write photo information in italic: true or false // ### Photo manipulation for display $image_resize=true; // Set to true to resize photo for display, use this to show large photos in a smaller size: true or false $image_resizeto=0; // Size in px for resize (min. 30 pixels) or 0 for auto-resize $image_inflate=false; // Allow photo to be enlarged: true or false $copyright='www.marfoto.com.pt'; // Add copyright notice to photo (only when $image_resize=true) $copyright_position='0% 100%'; // Position of copyright notice based on % of width and % of height of original image (50% 50% =centered) $watermark=''; // Add a watermark to the photo (only when $image_resize=true and GDLib2+), filelocation of the (transparent) PNG image file, example 'gfx/watermark.png' $watermark_position='100% 100%'; // Position of watermark image based on % of width and % of height of original image (50% 50% =centered) $watermark_transparancy=100; // Transparency for watermark, 0 to 100: 0=not visible, 100=visible $image_greyscale=false; // Convert color jpg photo to grayscale (only when $image_resize=true) - only for GDLib2+ $image_sepia_depth=80; // Add 'aged' effect to jpg photo only when $image_greyscale=true (0=disabled) - only for GDLib2+ $image_noise_depth=10; // Add random noise to jpg photo to make it look older only when $image_greyscale=true (0=disabled) - only for GDLib2+ $apply_thumbnail_borderpng=false; // If you configured a border image for the thumbnail apply it to the photo as well: true or false // ### Photo shop system $shop=true; // Use shop system: true or false $shop_email='brunodelfim@delphis.com.pt'; // The email address the order will be emailed to $shop_choice1='-,1x,2x,3x,4x,5x'; // Ordering information first selection box, comma separated $shop_choice2='-,09x13cm,10x15cm,11x17cm,13x18cm,25x30cm'; // Ordering information second selection box, comma separated (leave empty to disable box) $shop_columns=4; // All photos will be shown on a single page, this sets the amount of photos next to each other // ### MultiMedia Files (MP3,Mpeg,AVI etc.) $play_multimedia=false; // Enable or Disable multimedia support (to link a photo to a MP3 file, include a MP3 with the same name as the photo): true or false $embed_player=true; // Embeds the player underneath the photo: true or false $link_player=false; // Creates a link from the image to the multimedia file: true or false $download_multimedia=false; // Add a download link to the multimedia file $movie_formats='mpg,mpeg,avi,mov,swf,wmv'; // File extensions for supported movie files $sound_formats='mp3,wav,au,wma,ogg'; // File extensions for supported sound files $mm_watermark=''; // Add a 'multimedia' watermark to the image (only when $image_resize=true and GDLib2+), filelocation of the (transparent) PNG image file, example 'gfx/multimedia_watermark.png' $mm_watermark_position='100% 100%'; // Position of multimedia watermark image based on % of width and % of height of original image (50% 50% =centered) $mm_watermark_transparancy=100; // Transparency for multimedia watermark, 0 to 100: 0=not visible, 100=visible $mm_dir=''; // Directory for multimedia images (add a mp3.jpg to represent MP3 images, mpeg.png to represent MPEG files etc.), example 'gfx/' $mm_thumbnail=false; // Apply thumbnail settings to multimedia image: true or false $mm_photo=false; // Apply photo manipulation settings to multimedia image: true or false // ### Page,Photo & Menu colors $page_color='#000000'; // Page background color $text_color='#FFFFFF'; // Text color $text_hover_color='#FE9900'; // Text hover color $title_color='#0A7FDC'; // Title color $border_color='#000000'; // Photo border color $table_color='#000000'; // Table background color $item_border_color='#000000'; // Border color table $line_color='#FE9900'; // Color for lines $email_color='#FFFF99'; // Color for email button $menu_line_width='1'; // Menu border line thickness in px (top+bottom) $menu_bar_width='0'; // Menu bar line thickness in px (left + right) $menu_bordertop_color='#FE9900'; // Menu border top color $menu_borderbottom_color='#FE9900'; // Menu border bottom color $menu_borderleft_color='#FE9900'; // Menu border left color $menu_borderright_color='#FE9900'; // Menu border right color $menu_bordertop_hover_color='#FE9900'; // Menu border hover top color $menu_borderbottom_hover_color='#FE9900'; // Menu border hover bottom color $menu_borderleft_hover_color='#FE9900'; // Menu border hover left color $menu_borderright_hover_color='#FE9900'; // Menu border hover right color $menu_text_color='#0A7FDC'; // Menu text color $menu_texthover_color='#FE9900'; // Menu text hover color $menu_background_color='#000000'; // Menu background color $menu_background_hover_color='#000000'; // Menu background hover color $hit_counter_linecolor='#999999'; // Hit counter line color $hit_counter_segmentcolor='#000000'; // Hit counter segment color $hit_counter_textcolor='#FFFFFF'; // Hit counter text color $rating_blockcolor='#CCCCCC'; // Rating color - no score $rating_blockcolor_score='#FF0000'; // Rating color - score // ### META information for search-engines $meta_description='Marfoto - Photography'; // Short description for your album $meta_keywords='marfoto, fotografia, photography, casamentos, baptizados'; // Search keywords comma separated $meta_copyright_and_author='Delphis.com.pt'; // Copyright and author of the website // End of configuration // // *********************************************************************************************** // Check if a configuration file exists - overrides the configuration in this index.php script if (file_exists('configuration.php')) {include('configuration.php');} $album_config=true; if ($use_main_config) { if (file_exists('../configuration.php')) { include('../configuration.php'); $album_config=false; } } if ($use_album_config!='') { if (file_exists("../$use_album_config/configuration.php")) { include("../$use_album_config/configuration.php"); $album_config=false; } } // Check if a logout was requested if (isset($_REQUEST['logout'])) { session_start(); session_unset(); session_destroy(); if ($_REQUEST['logout']==1) {setcookie('epa','',time()-3600);} else {setcookie('epaadmin','',time()-3600);} if ($restrict_access) {require_login();} } // Check for administrator login if ($admin_access && isset($_REQUEST['admin'])) { $users_configured=$users; $restrict_access_configured=$restrict_access; $users=$admins; $restrict_access=true; $admin_link='admin=1'; if ($admin_ip!='') { $valid_ips=explode(',',$admin_ip); if (!in_array($_SERVER['REMOTE_ADDR'],$valid_ips)) {$users='';} } } else { $admin_link=''; } // Check for valid login - cookie and/or session if ($restrict_access) { session_start(); $valid_users=explode(',',$users); foreach ($valid_users as $key => $user) $valid_users[$key]=md5($user . date('d')); if ($admin_link!='') {$cookiename='epaadmin';} else {$cookiename='epa';} // Check if cookie data is available and valid if (isset($_COOKIE[$cookiename])) { $cookie_data=explode('@',$_COOKIE[$cookiename]); if (count($cookie_data)==3) { if (in_array($cookie_data[0],$valid_users)) { $user_index=array_search($cookie_data[0],$valid_users); if ($valid_users[$user_index+1]!=$cookie_data[1]) require_login(); else if (md5($_SERVER['HTTP_USER_AGENT'])!=$cookie_data[2]) require_login(); } else { require_login(); } } else { require_login(); } // Check if form data is submitted and valid } else if (isset($_REQUEST['new_user']) && isset($_REQUEST['new_password'])) { if (in_array(md5($_REQUEST['new_user'] . date('d')),$valid_users)) { $user_index=array_search(md5($_REQUEST['new_user'] . date('d')),$valid_users); if ($valid_users[$user_index+1]!=md5($_REQUEST['new_password'] . date('d'))) { require_login(); } else { $_SESSION['epa_user']=md5($_REQUEST['new_user'] . date('d')); $_SESSION['epa_passw']=md5($_REQUEST['new_password'] . date('d')); $_SESSION['epa_agent']=md5($_SERVER['HTTP_USER_AGENT']); setcookie($cookiename,$_SESSION['epa_user'] . '@' . $_SESSION['epa_passw'] . '@' . $_SESSION['epa_agent'],time()+3600); } } else { require_login(); } // Check if current session is valid } else if (isset($_SESSION['epa_passw']) && isset($_SESSION['epa_user']) && isset($_SESSION['epa_agent'])) { if ($_SESSION['epa_agent']!=md5($_SERVER['HTTP_USER_AGENT'])) {require_login();} if (in_array($_SESSION['epa_user'],$valid_users)) { $user_index=array_search($_SESSION['epa_user'],$valid_users); if ($valid_users[$user_index+1]!=$_SESSION['epa_passw']) {require_login();} } else { require_login(); } // Session data and form data is invalid } else { require_login(); } } // Check for admin requests if ($admin_link!='') { // Show configuration menu if (isset($_REQUEST['configuration'])) {configuration();} $supportedformats=explode(',',$movie_formats.','.$sound_formats.',png,gif,jpg,jpeg,txt,zip'); // Rename image or directory if (isset($_REQUEST['renameimagenew']) && isset($_REQUEST['renameimageold'])) { $renameimageold=$_REQUEST['renameimageold']; if (is_file($renameimageold)) { $extension=strtolower(substr($renameimageold,strrpos($renameimageold,'.')+1,strlen($renameimageold))); if ($extension=='jpg' || $extension=='jpeg' || $extension=='png' || $extension=='gif'|| in_array($extension,$supportedformats)) { $newimagefilename=str_replace('/','',$_REQUEST['renameimagenew']); $newimagefilename=str_replace('..','',$newimagefilename); @rename($renameimageold,$newimagefilename.'.'.$extension); $renameimageoldtxt=substr($renameimageold,0,strrpos($renameimageold,'.')).'.txt'; if (file_exists($renameimageoldtxt)) @rename($renameimageoldtxt,$newimagefilename.'.txt'); else if (file_exists('textfiles/'.$renameimageoldtxt)) @rename('textfiles/'.$renameimageoldtxt,'textfiles/'.$newimagefilename.'.txt'); } } else if (is_dir($renameimageold)) { $albumname=ereg_replace("[^[:space:]a-zA-Z0-9*_.-]","",$_REQUEST['renameimagenew']); @rename($renameimageold,$albumname); } } // Delete a file or directory if (isset($_REQUEST['imagefilename'])) { $imagefilename=str_replace('/','',$_REQUEST['imagefilename']); $imagefilename=str_replace('..','',$imagefilename); if (isset($_REQUEST['backup'])) { if ($_REQUEST['backup']==1) $imagefilename='backup/'.$imagefilename; } if (is_file($imagefilename) || is_file('textfiles/'.$imagefilename)) { $extension=strtolower(substr($imagefilename,strrpos($imagefilename,'.')+1,strlen($imagefilename))); if ($extension=='jpg' || $extension=='jpeg' || $extension=='png' || $extension=='gif' || in_array($extension,$supportedformats)) { if (file_exists($imagefilename)) {@unlink($imagefilename);} if (is_dir('thumbnails')) {$subdir='thumbnails/';} else {$subdir='';} if (file_exists($subdir.substr($imagefilename,0,strrpos($imagefilename,'.')) . '_thumbindex.' . $extension)) @unlink($subdir.substr($imagefilename,0,strrpos($imagefilename,'.')) . '_thumbindex.' . $extension); if (file_exists($subdir.substr($imagefilename,0,strrpos($imagefilename,'.')) . '_thumb.' . $extension)) @unlink($subdir.substr($imagefilename,0,strrpos($imagefilename,'.')) . '_thumb.' . $extension); // Delete rating and hitcounter files as well $imagefilename=substr($imagefilename,0,strrpos($imagefilename,'.')).'.stat'; if (file_exists($imagefilename)) @unlink($imagefilename); else if (file_exists('hitcounters/'.$imagefilename)) @unlink('hitcounters/'.$imagefilename); $imagefilename=substr($imagefilename,0,strrpos($imagefilename,'.')).'.rate'; if (file_exists($imagefilename)) @unlink($imagefilename); else if (file_exists('ratings/'.$imagefilename)) @unlink('ratings/'.$imagefilename); } else if ($extension=='txt') { if (file_exists($imagefilename)) @unlink($imagefilename); else if (file_exists('textfiles/'.$imagefilename)) @unlink('textfiles/'.$imagefilename); } } else if (is_dir($imagefilename)) { removedir(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename.'/hitcounters',false); removedir(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename.'/ratings',false); removedir(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename.'/textfiles',false); removedir(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename.'/thumbnails',false); removedir(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename.'/gfx',false); removedir(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename,false); } } // Upload file(s) if (isset($_FILES['uploadimage1']) || isset($_FILES['uploadimage2']) || isset($_FILES['uploadimage3']) || isset($_FILES['uploadimage4']) || isset($_FILES['uploadimage5']) || isset($_FILES['uploadimage6'])) { for($i=1;$i<7;$i++) { if (isset($_FILES['uploadimage' . $i])) { $imagefilename=str_replace('/','',$_FILES['uploadimage' . $i]['name']); $imagefilename=str_replace('..','',$imagefilename); $extension=strtolower(substr($imagefilename,strrpos($imagefilename,'.')+1,strlen($imagefilename))); if (in_array($extension,$supportedformats)) { if ($extension!='txt') { if (@move_uploaded_file($_FILES['uploadimage' . $i]['tmp_name'],str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename)) { if (filesize($imagefilename)==0) @unlink($imagefilename); if ($extension=='zip') unzipimages($imagefilename,$movie_formats.','.$sound_formats.',png,gif,jpg,jpeg,txt,zip',''); } } else if (is_dir('textfiles')) { if (@move_uploaded_file($_FILES['uploadimage' . $i]['tmp_name'],str_replace(chr(92),chr(47),getcwd()).'/textfiles/'.$imagefilename)) { if (filesize('textfiles/'.$imagefilename)==0) @unlink('textfiles/'.$imagefilename); } } else { if (@move_uploaded_file($_FILES['uploadimage' . $i]['tmp_name'],str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename)) { if (filesize($imagefilename)==0) @unlink($imagefilename); } } if ($_FILES['uploadimage' . $i]['error']==UPLOAD_ERR_INI_SIZE) $title.=" - (upload failed: filesize too big)"; if ($_FILES['uploadimage' . $i]['error']==UPLOAD_ERR_PARTIAL) $title.=" - (upload failed: upload interrupted)"; } } } } // Add/edit text file for photo if (isset($_REQUEST['phototextfile']) && isset($_REQUEST['phototext'])) { if (is_dir('textfiles')) { if ($fp=@fopen('textfiles/'.$_REQUEST['phototextfile'],'w')) { fwrite($fp,stripslashes($_REQUEST['phototext'])); fclose($fp); } } else { if ($fp=@fopen($_REQUEST['phototextfile'],'w')) { fwrite($fp,stripslashes($_REQUEST['phototext'])); fclose($fp); } } } // Create text file for photo if (isset($_REQUEST['newtxtfile'])) { if (is_dir('textfiles')) { if (file_exists($_REQUEST['newtxtfile'])) @touch('textfiles/'.substr($_REQUEST['newtxtfile'],0,strrpos($_REQUEST['newtxtfile'],'.')).'.txt'); } else { if (file_exists($_REQUEST['newtxtfile'])) @touch(substr($_REQUEST['newtxtfile'],0,strrpos($_REQUEST['newtxtfile'],'.')).'.txt'); } } // Backup image(s) for($i=1;$i<($images_per_page+1);$i++) { if (isset($_REQUEST['backup_'.$i])) { if (!is_dir('backup')) {@mkdir('backup');} $backupimage=$_REQUEST['backup_'.$i]; @copy($backupimage,'backup/'.$backupimage); } } // Restore image if (isset($_REQUEST['restorefilename'])) { @copy('backup/'.$_REQUEST['restorefilename'],$_REQUEST['restorefilename']); } // Resize image(s) if (isset($_REQUEST['resizeimagesto'])) { $resizeimagesto=(int) $_REQUEST['resizeimagesto']; if ($resizeimagesto>0) { for($i=1;$i<($images_per_page+1);$i++) { if (isset($_REQUEST['image_'.$i])) { $resizeimage=$_REQUEST['image_'.$i]; if (file_exists($resizeimage)) resize($resizeimage,$resizeimagesto); } } } } // Rotate image(s) if (isset($_REQUEST['rotateimages'])) { $direction=$_REQUEST['rotateimages']; if ($direction=='r' || $direction=='l') { for($i=1;$i<($images_per_page+1);$i++) { if (isset($_REQUEST['rotate_'.$i])) { $rotateimage=$_REQUEST['rotate_'.$i]; if (file_exists($rotateimage)) rotate($rotateimage,$direction); } } } } // Create new album if (isset($_REQUEST['newalbumname'])) { $albumname=ereg_replace("[^[:space:]a-zA-Z0-9*_.-]","",$_REQUEST['newalbumname']); if(!file_exists($albumname) && $albumname!='') { if (@mkdir($albumname)) { @copy('index.php',$albumname.'/index.php'); if (file_exists('configuration.php')) {@copy('configuration.php',$albumname.'/configuration.php');} if (!file_exists($albumname.'/hitcounters')) {@mkdir($albumname.'/hitcounters');} if (!file_exists($albumname.'/ratings')) {@mkdir($albumname.'/ratings');} if (!file_exists($albumname.'/textfiles')) {@mkdir($albumname.'/textfiles');} if (!file_exists($albumname.'/thumbnails')) {@mkdir($albumname.'/thumbnails');} } else { $title.=' - failed (please enable write access)'; } } else if (file_exists($albumname) && $albumname!='') { @copy('index.php',$albumname.'/index.php'); if (file_exists('configuration.php')) {@copy('configuration.php',$albumname.'/configuration.php');} if (!file_exists($albumname.'/hitcounters')) {@mkdir($albumname.'/hitcounters');} if (!file_exists($albumname.'/ratings')) {@mkdir($albumname.'/ratings');} if (!file_exists($albumname.'/textfiles')) {@mkdir($albumname.'/textfiles');} if (!file_exists($albumname.'/thumbnails')) {@mkdir($albumname.'/thumbnails');} } } } // Display EasyPhpAlbum logo if ($show_poweredby_easyphpalbum && isset($_REQUEST['poweredby'])) { if (imagetypes() & IMG_PNG) { header("Content-type: image/png"); imagepng(poweredby_image()); } else { header("Content-type: image/jpeg"); imagejpeg(poweredby_image(),'',100); } exit; } // Display Email link if ($show_email_link && isset($_REQUEST['emaillink'])) { header("Content-type: image/png"); imagepng(emaillink_image()); exit; } // Update & output hit-counter if ($hit_counter && isset($_REQUEST['statistics']) && isset($_REQUEST['image'])) { $image=$_REQUEST['image']; $stats_filename=substr($image,0,strrpos($image,'.')).'.stat'; if (strpos($stats_filename,'/')!=false) { if (is_dir(substr($image,0,strrpos($image,'/')) . '/hitcounters')) $stats_filename=str_replace('/','/hitcounters/',$stats_filename); } else { if (is_dir('hitcounters')) $stats_filename='hitcounters/'.$stats_filename; } if (!file_exists($stats_filename) && file_exists($image)) { if (touch($stats_filename)) { if ($fp=@fopen($stats_filename,'w')) { fwrite($fp,'0'); fclose($fp); } } else { $hit_counter_random=false; header("HTTP/1.1 202 Accepted"); header("Content-type: image/png"); imagepng(hitcounter_image('ERROR')); } } if (is_writable($stats_filename)) { if ($fp=@fopen($stats_filename,'r+')) { $valid_ips=explode(',',$ban_ip); if ($_REQUEST['statistics']==1 && !in_array($_SERVER['REMOTE_ADDR'],$valid_ips)) { $stats=explode('@',fread($fp,filesize($stats_filename))); if (!in_array($_SERVER['REMOTE_ADDR'],$stats)) { array_push($stats,$_SERVER['REMOTE_ADDR']); $stats[0]=$stats[0]+1; rewind($fp); fwrite($fp,implode('@',$stats)); } } else { $stats=explode('@',fread($fp,filesize($stats_filename))); } fclose($fp); header("HTTP/1.1 202 Accepted"); header("Content-type: image/png"); imagepng(hitcounter_image($stats[0]+0)); } } else { $hit_counter_random=false; header("HTTP/1.1 202 Accepted"); header("Content-type: image/png"); imagepng(hitcounter_image('ERROR')); } exit; } // Update rating & output rating-scorebar if ($rating && isset($_REQUEST['rating']) && isset($_REQUEST['rateimage'])) { $score=intval($_REQUEST['rating']); $image=$_REQUEST['rateimage']; $stats_filename=substr($image,0,strrpos($image,'.')).'.rate'; if (is_dir('ratings')) $stats_filename='ratings/'.$stats_filename; if (!file_exists($stats_filename) && file_exists($image)) { if (touch($stats_filename)) { if ($fp=@fopen($stats_filename,'w')) { fwrite($fp,'0'); fclose($fp); } } } if (is_writable($stats_filename)) { if ($fp=@fopen($stats_filename,'r+')) { if ($score>0 && $score<6) { $stats=explode('@',fread($fp,filesize($stats_filename))); $valid_ips=explode(',',$ban_ip); if (!in_array($_SERVER['REMOTE_ADDR'],$stats) && !in_array($_SERVER['REMOTE_ADDR'],$valid_ips)) { rewind($fp); $stats[0]=$stats[0]+1; if (count($stats)>2) $score=round(($stats[0]*$stats[1]+$score)/($stats[0]+1),2); $number=explode('.',$score); $number[1]=(isset($number[1]))?$number[1]:''; $decimal=str_pad($number[1],2,'0'); $score=$number[0].'.'.$decimal; $stats[1]=$score; array_push($stats,$_SERVER['REMOTE_ADDR']); fwrite($fp,implode('@',$stats)); fclose($fp); } } else { $stats=explode('@',fread($fp,filesize($stats_filename))); if (count($stats)>2) $score=$stats[1]; fclose($fp); header("HTTP/1.1 202 Accepted"); header("Content-type: image/png"); imagepng(rating_image(floor($score+0))); exit; } } } } // Save visitor comment with photo if ($visitor_comments) { if (isset($_REQUEST['newcomment'])) { if ($_REQUEST['newcomment']!='') { // Make sure visitor stays on the same page if (isset($_REQUEST['comment_showimage'])) $_REQUEST['showimage']=$_REQUEST['comment_showimage']; if (isset($_REQUEST['comment_screenwidth'])) $_REQUEST['screenwidth']=$_REQUEST['comment_screenwidth']; // Add comment to textfile if (isset($_REQUEST['comment_username'])) { $username=substr(trim(stripslashes($_REQUEST['comment_username'])),0,10); if ($username=='') {$username='anonymous';} } else { $username=''; } $valid_ips=explode(',',$ban_ip); if (is_dir('textfiles') && !in_array($_SERVER['REMOTE_ADDR'],$valid_ips)) { if ($fp=@fopen('textfiles/'.substr($_REQUEST['comment_showimage'],0,strrpos($_REQUEST['comment_showimage'],'.')).'.txt','ab')) { if ($comment_logip) fwrite($fp,'[ '.date($visitor_comments_dateformat).' - '.$_SERVER['REMOTE_ADDR'].' - by ' . $username . ' ]' . "\n"); else fwrite($fp,'[ '.date($visitor_comments_dateformat).' - by '.$username . ' ]' . "\n"); fwrite($fp,substr(trim(stripslashes($_REQUEST['newcomment'])),0,$comment_size) . "\n". "\n"); fclose($fp); if ($comment_email!='') mail($comment_email,'New comment for photoalbum ' . $title,'photo: ' . $_REQUEST['comment_showimage'] . chr(10) . chr(10) . 'comment: ' . substr(trim(stripslashes($_REQUEST['newcomment'])),0,$comment_size) . chr(10) . chr(10) . 'Link: http://' . $_SERVER['HTTP_HOST'] . $HTTP_SERVER_VARS['SCRIPT_NAME'] . '?showimage=' . rawurlencode($_REQUEST['showimage']) . '&screenwidth=' . $_REQUEST['screenwidth'],'From: ' . $comment_email . "\r\n" . 'Reply-To: ' . $comment_email . "\r\n" . 'X-Mailer: PHP/' . phpversion()); } } else if (!in_array($_SERVER['REMOTE_ADDR'],$valid_ips)) { if ($fp=@fopen(substr($_REQUEST['comment_showimage'],0,strrpos($_REQUEST['comment_showimage'],'.')).'.txt','ab')) { if ($comment_logip) fwrite($fp,'[ '.date($visitor_comments_dateformat).' - '.$_SERVER['REMOTE_ADDR'].' - by ' . $username . ' ]' . "\n"); else fwrite($fp,'[ '.date($visitor_comments_dateformat).' - by '.$username . ' ]' . "\n"); fwrite($fp,substr(trim(stripslashes($_REQUEST['newcomment'])),0,$comment_size) . "\n". "\n"); fclose($fp); if ($comment_email!='') mail($comment_email,'New comment for photoalbum ' . $title,'photo: ' . $_REQUEST['comment_showimage'] . chr(10) . chr(10). 'comment: ' . substr(trim(stripslashes($_REQUEST['newcomment'])),0,$comment_size) . chr(10) . chr(10) . 'Link: http://' . $_SERVER['HTTP_HOST'] . $HTTP_SERVER_VARS['SCRIPT_NAME'] . '?showimage=' . rawurlencode($_REQUEST['showimage']) . '&screenwidth=' . $_REQUEST['screenwidth'],'From: ' . $comment_email . "\r\n" . 'Reply-To: ' . $comment_email . "\r\n" . 'X-Mailer: PHP/' . phpversion()); } } } } } // Upload file(s) from visitor if ($visitor_upload) { $valid_ips=explode(',',$ban_ip); if ((isset($_FILES['uploadfile1']) || isset($_FILES['uploadfile2']) || isset($_FILES['uploadfile3']) || isset($_FILES['uploadfile4']) || isset($_FILES['uploadfile5']) || isset($_FILES['uploadfile6'])) && !in_array($_SERVER['REMOTE_ADDR'],$valid_ips)) { $accepted_files=explode(',',$visitor_files); $uploaded_files=''; for($i=1;$i<7;$i++) { if (isset($_FILES['uploadfile' . $i])) { $imagefilename=str_replace('/','',$_FILES['uploadfile' . $i]['name']); $imagefilename=str_replace('..','',$imagefilename); $extension=strtolower(substr($imagefilename,strrpos($imagefilename,'.')+1,strlen($imagefilename))); if (in_array($extension,$accepted_files)) { if (isset($_REQUEST['comment_username'])) { $username=substr(ereg_replace("[^a-z,A-Z,0-9,_,-]","_",trim(stripslashes($_REQUEST['comment_username']))),0,10); if ($username=='') {$username='anonymous';} } else { $username='anonymous'; } $imagefilename=substr($imagefilename,0,strrpos($imagefilename,'.')).'_by_'.$username.'.'.$extension; if (@move_uploaded_file($_FILES['uploadfile' . $i]['tmp_name'],str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename)) { if (filesize($imagefilename)==0) @unlink($imagefilename); if (in_array($extension,explode(',','png,gif,jpg,jpeg,swf'))) { if (!$check_file = @GetImageSize($imagefilename)) @unlink($imagefilename); } $uploaded_files.=$imagefilename.chr(10); if ($extension=='zip') {unzipimages($imagefilename,$visitor_files,'_by_'.$username);} if (file_exists(substr($imagefilename,0,strrpos($imagefilename,'.')) . '_thumb.' . $extension)) @unlink(substr($imagefilename,0,strrpos($imagefilename,'.')) . '_thumb.' . $extension); if (file_exists('thumbnails/'.substr($imagefilename,0,strrpos($imagefilename,'.')) . '_thumb.' . $extension)) @unlink('thumbnails/'.substr($imagefilename,0,strrpos($imagefilename,'.')) . '_thumb.' . $extension); } if ($_FILES['uploadfile' . $i]['error']==UPLOAD_ERR_INI_SIZE) $title.=" | ERROR Upload failed: filesize too big"; if ($_FILES['uploadfile' . $i]['error']==UPLOAD_ERR_PARTIAL) $title.=" | ERROR Upload failed: upload interrupted"; if ($_FILES['uploadfile' . $i]['error']==UPLOAD_ERR_FORM_SIZE) $title.=" | ERROR Upload failed: filesize too big"; } } } if ($upload_email!='' && $uploaded_files!='') mail($upload_email,'New upload for album ' . $title,'Uploaded file(s): ' .chr(10).chr(10). $uploaded_files .chr(10).chr(10) . 'Uploaded by: ' . $username . ' IP-address: ' . $_SERVER['REMOTE_ADDR'] . chr(10).chr(10) . 'Link: http://' . $_SERVER['HTTP_HOST'] . $HTTP_SERVER_VARS['SCRIPT_NAME'],'From: ' . $upload_email . "\r\n" . 'Reply-To: ' . $upload_email . "\r\n" . 'X-Mailer: PHP/' . phpversion()); } } // Create and output image in specified size if (isset($_REQUEST['image'])) { $image=$_REQUEST['image']; if (file_exists($image)) { $size=@GetImageSize($image); if ($size[2]==1) { if (imagetypes() & IMG_GIF) { $im=@imagecreatefromgif($image); } else { header("Content-type: image/png"); imagepng(invalid_image('No GIF support')); exit; } } if ($size[2]==2) { if (imagetypes() & IMG_JPG) { $im=@imagecreatefromjpeg($image); } else { header("Content-type: image/png"); imagepng(invalid_image('No JPG support')); exit; } } if ($size[2]==3) { if (imagetypes() & IMG_PNG) { $im=@imagecreatefrompng($image); } else { header("Content-type: image/jpeg"); imagejpeg(invalid_image('No PNG support'),'',100); exit; } } if ($size[2]!=1 && $size[2]!=2 && $size[2]!=3) { $thumb=invalid_image('Invalid Image'); } else { // Determine some sizes and settings if ($thumb_size<30) $thumb_size=30; if (isset($_REQUEST['resize'])) { if ($image_resizeto==0 && isset($_REQUEST['screenwidth'])) $image_resizeto=floor($_REQUEST['screenwidth']/1.6); if (!$image_inflate) { if ($image_resizeto>$size[0] && $image_resizeto>$size[1]) $image_resizeto=max($size[0],$size[1]); } $thumb_size=$image_resizeto; if (isset($_REQUEST['adminpanel'])) { $copyright=''; $thumb_size=60; $mm_watermark=''; $watermark=''; } $show_number=false; $show_binder=false; $show_bordershadow=false; $clip_corner=0; if (!$apply_thumbnail_borderpng) { $thumbnail_borderpng=''; $border_width=0; } $thumbnail_rotation=false; } if ($show_binder) $border_offset=3; else $border_offset=2; if ($show_bordershadow) $shadow_offset=3; else $shadow_offset=0; // Add watermark if ($watermark!='') { if ($gd2 && file_exists($watermark)) { $watermarkim=@imagecreatefrompng($watermark); $wpos=explode(' ',str_replace('%','',$watermark_position)); if (count($wpos)>1) @imagecopymerge($im,$watermarkim,min(max(imagesx($im)*($wpos[0]/100)-0.5*imagesx($watermarkim),0),imagesx($im)-imagesx($watermarkim)),min(max(imagesy($im)*($wpos[1]/100)-0.5*imagesy($watermarkim),0),imagesy($im)-imagesy($watermarkim)),0,0,imagesx($watermarkim),imagesy($watermarkim),$watermark_transparancy+0); else @imagecopymerge($im,$watermarkim,imagesx($im)-imagesx($watermarkim),imagesy($im)-imagesy($watermarkim),0,0,imagesx($watermarkim),imagesy($watermarkim),$watermark_transparancy+0); @imagedestroy($watermarkim); } } // Add watermark for multimediafiles if ($mm_watermark!='') { if ($gd2 && file_exists($mm_watermark)) { $mm_file=get_multimedia($image,false); if ($mm_file!='') { $watermarkim=@imagecreatefrompng($mm_watermark); $wpos=explode(' ',str_replace('%','',$mm_watermark_position)); if (count($wpos)>1) @imagecopymerge($im,$watermarkim,min(max(imagesx($im)*($wpos[0]/100)-0.5*imagesx($watermarkim),0),imagesx($im)-imagesx($watermarkim)),min(max(imagesy($im)*($wpos[1]/100)-0.5*imagesy($watermarkim),0),imagesy($im)-imagesy($watermarkim)),0,0,imagesx($watermarkim),imagesy($watermarkim),$mm_watermark_transparancy+0); else @imagecopymerge($im,$watermarkim,imagesx($im)-imagesx($watermarkim),imagesy($im)-imagesy($watermarkim),0,0,imagesx($watermarkim),imagesy($watermarkim),$mm_watermark_transparancy+0); @imagedestroy($watermarkim); } } } // Create empty thumbnail $x1=$border_width*$border_offset+$thumb_size+$shadow_offset; $x2=$border_width*$border_offset+ceil($size[0]/($size[1]/$thumb_size))+$shadow_offset; $y1=$border_width*2+ceil($size[1]/($size[0]/$thumb_size))+$shadow_offset; $y2=$border_width*2+$thumb_size+$shadow_offset; if ($gd2) { if ($size[0]>$size[1]) $thumb=imagecreatetruecolor($x1,$y1); else $thumb=imagecreatetruecolor($x2,$y2); } else { if ($size[0]>$size[1]) $thumb=imagecreate($x1,$y1); else $thumb=imagecreate($x2,$y2); } $black=imagecolorallocate($thumb,0,0,0); $white=imagecolorallocate($thumb,255,255,255); $gray=imagecolorallocate($thumb,192,192,192); $middlegray=imagecolorallocate($thumb,158,158,158); $darkgray=imagecolorallocate($thumb,128,128,128); imagefill($thumb,0,0,imagecolorallocate($thumb,hexdec(substr($table_color,1,2)),hexdec(substr($table_color,3,2)),hexdec(substr($table_color,5,2)))); if ($show_binder) $bind_offset=4; else $bind_offset=0; imagefilledrectangle($thumb,$bind_offset,0,imagesx($thumb)-$shadow_offset,imagesy($thumb)-$shadow_offset,imagecolorallocate($thumb,hexdec(substr($border_color,1,2)),hexdec(substr($border_color,3,2)),hexdec(substr($border_color,5,2)))); // Add shadow to thumbnail if ($show_bordershadow) { imagerectangle($thumb,$bind_offset,0,imagesx($thumb)-4,imagesy($thumb)-4,$gray); imageline($thumb,$bind_offset,imagesy($thumb)-3,imagesx($thumb),imagesy($thumb)-3,$darkgray); imageline($thumb,imagesx($thumb)-3,0,imagesx($thumb)-3,imagesy($thumb),$darkgray); imageline($thumb,$bind_offset+2,imagesy($thumb)-2,imagesx($thumb),imagesy($thumb)-2,$middlegray); imageline($thumb,imagesx($thumb)-2,2,imagesx($thumb)-2,imagesy($thumb),$middlegray); imageline($thumb,$bind_offset+2,imagesy($thumb)-1,imagesx($thumb),imagesy($thumb)-1,$gray); imageline($thumb,imagesx($thumb)-1,2,imagesx($thumb)-1,imagesy($thumb),$gray); } // Clip corner of original image if ($clip_corner>0) { $clip_corner=floor(imagesx($im)*($clip_corner/100)); if ($clip_corner_round){ $clip_degrees=90/$clip_corner; // Set centre point for polygon $points_tl=array(0,0); $points_br=array(imagesx($im),imagesy($im)); $points_tr=array(imagesx($im),0); $points_bl=array(0,imagesy($im)); } $bgcolor=imagecolorallocate($im,hexdec(substr($border_color,1,2)),hexdec(substr($border_color,3,2)),hexdec(substr($border_color,5,2))); for ($i=0;$i<$clip_corner;$i++) { if ($clip_corner_round){ $x=$clip_corner*cos(deg2rad($i*$clip_degrees)); $y=$clip_corner*sin(deg2rad($i*$clip_degrees)); array_push($points_tl,$clip_corner-$x); array_push($points_tl,$clip_corner-$y); array_push($points_tr,imagesx($im)-$clip_corner+$x); array_push($points_tr,$clip_corner-$y); array_push($points_br,imagesx($im)-$clip_corner+$x); array_push($points_br,imagesy($im)-$clip_corner+$y); array_push($points_bl,$clip_corner-$x); array_push($points_bl,imagesy($im)-$clip_corner+$y); } else { if ($clip_randomly) {$random=1;} else {$random=0;} if ($clip_topleft && rand(0,$random)==0) {imageline($im,0,$i,$clip_corner-$i,$i,$bgcolor);} if ($clip_bottomright && rand(0,$random)==0) {imageline($im,imagesx($im)-$clip_corner+$i,imagesy($im)-$i-1,imagesx($im)+$clip_corner-$i,imagesy($im)-$i-1,$bgcolor);} if ($clip_topright && rand(0,$random)==0) {imageline($im,imagesx($im)-$clip_corner+$i,$i,imagesx($im)+$clip_corner-$i,$i,$bgcolor);} if ($clip_bottomleft && rand(0,$random)==0) {imageline($im,0,imagesy($im)-$i-1,$clip_corner-$i,imagesy($im)-$i-1,$bgcolor);} } } if ($clip_corner_round){ // Add the final points to cope with rounding error array_push($points_tl,$clip_corner,0); array_push($points_br,imagesx($im)-$clip_corner,imagesy($im)); array_push($points_tr,imagesx($im)-$clip_corner,0); array_push($points_bl,$clip_corner,imagesy($im)); if ($clip_randomly) {$random=1;} else {$random=0;} if ($clip_topleft && rand(0,$random)==0) {imagefilledpolygon($im,$points_tl,count($points_tl)/2,$bgcolor);} if ($clip_bottomright && rand(0,$random)==0) {imagefilledpolygon($im,$points_br,count($points_br)/2,$bgcolor);} if ($clip_topright && rand(0,$random)==0) {imagefilledpolygon($im,$points_tr,count($points_tr)/2,$bgcolor);} if ($clip_bottomleft && rand(0,$random)==0) {imagefilledpolygon($im,$points_bl,count($points_bl)/2,$bgcolor);} // Cleanup - remove 1px from outline of image imagerectangle($im,0,0,imagesx($im)-1,imagesy($im)-1,$bgcolor); } } // Image created - modify colors (only for jpg & gd2) if ($image_greyscale && $size[2]==2 && $gd2) { imagetruecolortopalette($im,1,256); for ($c=0;$c<256;$c++) { $col=imagecolorsforindex($im,$c); $new_col=floor($col['red']*0.2125+$col['green']*0.7154+$col['blue']*0.0721); $noise=rand(-$image_noise_depth,$image_noise_depth); if ($image_sepia_depth>0) { $r=$new_col+$image_sepia_depth+$noise; $g=floor($new_col+$image_sepia_depth/1.86+$noise); $b=floor($new_col+$image_sepia_depth/-3.48+$noise); } else { $r=$new_col+$noise; $g=$new_col+$noise; $b=$new_col+$noise; } imagecolorset($im,$c,max(0,min(255,$r)),max(0,min(255,$g)),max(0,min(255,$b))); } } // Copy photo to thumbnail if ($gd2) @imagecopyresampled($thumb,$im,$border_width*($border_offset-1),$border_width,0,0,imagesx($thumb)-($border_offset*$border_width)-$shadow_offset,imagesy($thumb)-2*$border_width-$shadow_offset,imagesx($im),imagesy($im)); else @imagecopyresized($thumb,$im,$border_width*($border_offset-1),$border_width,0,0,imagesx($thumb)-($border_offset*$border_width)-$shadow_offset,imagesy($thumb)-2*$border_width-$shadow_offset,imagesx($im),imagesy($im)); // Copy thumbnail border image if ($thumbnail_borderpng!='') { if ($gd2 && file_exists($thumbnail_borderpng)) { $borderim=@imagecreatefrompng($thumbnail_borderpng); @imagecopyresampled($thumb,$borderim,$bind_offset,0,0,0,imagesx($thumb)-$shadow_offset-$bind_offset,imagesy($thumb)-$shadow_offset,imagesx($borderim),imagesy($borderim)); @imagedestroy($borderim); } else if (file_exists($thumbnail_borderpng)) { $borderim=@imagecreatefrompng($thumbnail_borderpng); @imagecopyresized($thumb,$borderim,$bind_offset,0,0,0,imagesx($thumb)-$shadow_offset-$bind_offset,imagesy($thumb)-$shadow_offset,imagesx($borderim),imagesy($borderim)); @imagedestroy($borderim); } } // Add thumbnail number if ($show_number && isset($_REQUEST['number']) && isset($_REQUEST['total'])) { // Sample some pixels to determine text color $colors=array(); for ($i=5;$i<25;$i++) { $indexis=ImageColorAt($thumb,$i,4+ceil($i/5)); $rgbarray=ImageColorsForIndex($thumb,$indexis); array_push($colors,$rgbarray['red'],$rgbarray['green'],$rgbarray['blue']); } if (array_sum($colors)/count($colors)>180) $textcolor=$black; else $textcolor=$white; if ($show_binder) $number_offset=$border_width*2; else $number_offset=$border_width; if ($border_width==0) $number_offset=1; imagestring($thumb,1,$number_offset,2,($_REQUEST['number']+1) . '/' . $_REQUEST['total'],$textcolor); } // Add a binder if ($show_binder) { if ($binder_spacing<4) $binder_spacing=4; $spacing=floor(imagesy($thumb)/$binder_spacing)-2; $offset=floor((imagesy($thumb)-($spacing*$binder_spacing))/2); for ($i=$offset;$i<=$offset+$spacing*$binder_spacing;$i+=$binder_spacing) { imagefilledrectangle($thumb,8,$i-2,10,$i+2,$black); imageline($thumb,11,$i-1,11,$i+1,$darkgray); imageline($thumb,8,$i-2,10,$i-2,$darkgray); imageline($thumb,8,$i+2,10,$i+2,$darkgray); imagefilledrectangle($thumb,0,$i-1,8,$i+1,$gray); imageline($thumb,0,$i,8,$i,$white); imageline($thumb,0,$i-1,0,$i+1,$gray); imagesetpixel($thumb,0,$i,$darkgray); } } // Add copyright if (isset($_REQUEST['resize']) && $copyright!='') { $widthx=imagefontwidth(1)*strlen($copyright); if (($widthx+imagefontwidth(1))>imagesx($thumb)) { $copyright=substr($copyright,0,floor(imagesx($thumb)/imagefontwidth(1))-1); $widthx=imagefontwidth(1)*strlen($copyright); } $heighty=imagefontheight(1); $cpos=explode(' ',str_replace('%','',$copyright_position)); if (count($cpos)>1) { $cposx=min(max(imagesx($thumb)*($cpos[0]/100)-0.5*$widthx,imagefontwidth(1)),imagesx($thumb)-$widthx-imagefontwidth(1)); $cposy=min(max(imagesy($thumb)*($cpos[1]/100)-0.5*$heighty,$heighty),imagesy($thumb)-$heighty*1.5); } else { $cposx=imagefontwidth(1); $cposy=imagesy($thumb)-10; } $colors=array(); for ($i=$cposx;$i<($cposx+$widthx);$i++) { $indexis=ImageColorAt($thumb,$i,$cposy+0.5*$heighty); $rgbarray=ImageColorsForIndex($thumb,$indexis); array_push($colors,$rgbarray['red'],$rgbarray['green'],$rgbarray['blue']); } if (array_sum($colors)/count($colors)>180) imagestring($thumb,1,$cposx,$cposy,$copyright,$black); else imagestring($thumb,1,$cposx,$cposy,$copyright,$white); } // Randomly rotate the thumbnail - coded for compatibility with PHP 4.1.0 if ($thumbnail_rotation) { if ($thumbnail_rotation_degrees==0) $thumbnail_rotation_degrees=rand(-1,1)*45; // 45 degrees provides good result without the need for antialiasing if ($thumbnail_rotation_degrees<>0 && imagesx($thumb)0) { $centerx=imagesx($thumb)/2; $centery=imagesy($thumb)/2; $maxsizex=ceil(abs(cos(deg2rad($thumbnail_rotation_degrees))*imagesx($thumb))+abs(sin(deg2rad($thumbnail_rotation_degrees))*imagesy($thumb))); $maxsizey=ceil(abs(sin(deg2rad($thumbnail_rotation_degrees))*imagesx($thumb))+abs(cos(deg2rad($thumbnail_rotation_degrees))*imagesy($thumb))); if ($maxsizex & 1) {$maxsizex+=3;} else {$maxsizex+=2;} if ($maxsizey & 1) {$maxsizey+=3;} else {$maxsizey+=2;} if ($gd2) {$newthumb=imagecreatetruecolor($maxsizex,$maxsizey);} else {$newthumb=imagecreate($maxsizex,$maxsizey);} imagefill($newthumb,0,0,imagecolorallocate($newthumb,hexdec(substr($table_color,1,2)),hexdec(substr($table_color,3,2)),hexdec(substr($table_color,5,2)))); $newcenterx=imagesx($newthumb)/2; $newcentery=imagesy($newthumb)/2; $thumbnail_rotation_degrees+=180; for ($px=0;$px-1 && ($centerx+$vectorx)<($centerx*2+1) && ($centery+$vectory)>-1 && ($centery+$vectory)<($centery*2+1)) @imagecopy($newthumb,$thumb,$px,$py,$centerx+$vectorx,$centery+$vectory,1,1); } } @imagedestroy($thumb); if ($gd2) {$thumb=imagecreatetruecolor(imagesx($newthumb),imagesy($newthumb));} else {$thumb=imagecreate(imagesx($newthumb),imagesy($newthumb));} @imagecopy($thumb,$newthumb,0,0,0,0,imagesx($newthumb),imagesy($newthumb)); @imagedestroy($newthumb); } } } if ($square_thumbnails) { $squaresize=max(imagesx($thumb),imagesy($thumb)); if ($gd2) {$newthumb=imagecreatetruecolor($squaresize,$squaresize);} else {$newthumb=imagecreate($squaresize,$squaresize);} imagefill($newthumb,0,0,imagecolorallocate($newthumb,hexdec(substr($border_color,1,2)),hexdec(substr($border_color,3,2)),hexdec(substr($border_color,5,2)))); $centerx=floor(($squaresize-imagesx($thumb))/2); $centery=floor(($squaresize-imagesy($thumb))/2); @imagecopy($newthumb,$thumb,$centerx,$centery,0,0,imagesx($thumb),imagesy($thumb)); @imagedestroy($thumb); if ($gd2) {$thumb=imagecreatetruecolor($squaresize,$squaresize);} else {$thumb=imagecreate($squaresize,$squaresize);} @imagecopy($thumb,$newthumb,0,0,0,0,$squaresize,$squaresize); @imagedestroy($newthumb); } if (strpos($image,'/')) $subdir=substr($image,0,strpos($image,'/')+1); else $subdir=''; if (is_dir($subdir . 'thumbnails')) $thumbdir='thumbnails/'; else $thumbdir=''; if (isset($_REQUEST['indexalbum'])) $indexalbum=(int) $_REQUEST['indexalbum']; else $indexalbum=0; if ($indexalbum>0) $thumbfilename=$subdir . $thumbdir . substr($image,strlen($subdir),strrpos($image,'.')-strlen($subdir)) . '_thumbindex'; else $thumbfilename=$subdir . $thumbdir . substr($image,0,strrpos($image,'.')) . '_thumb'; if ($size[2]==1) { if ($create_thumbnail_cache && !isset($_REQUEST['resize'])) @imagegif($thumb,$thumbfilename.'.gif'); header("Content-type: image/gif"); imagegif($thumb); } else if ($size[2]==2) { if ($create_thumbnail_cache && !isset($_REQUEST['resize'])) @imagejpeg($thumb,$thumbfilename.'.jpg',90); header("Content-type: image/jpeg"); imagejpeg($thumb,'',90); } else if ($size[2]==3) { if ($create_thumbnail_cache && !isset($_REQUEST['resize'])) @imagepng($thumb,$thumbfilename.'.png'); header("Content-type: image/png"); imagepng($thumb); } else { header("Content-type: image/png"); imagepng(invalid_image('Invalid Image')); } } else { header("Content-type: image/png"); imagepng(invalid_image('File not found')); } @imagedestroy($im); @imagedestroy($thumb); exit; } // Batch resize all images in directory permanently - checks if image has been resized already if ($resizeimages) { $images=array(); $images=get_images(getcwd(),false,false); if ($images && $resizeto>30) { foreach ($images as $image) resize($image,$resizeto); } } // Create new images for multimedia files without their own image if ($play_multimedia && $mm_dir!='') {create_mm(false);} // Detect sub directories - if present; current index.php file is home (main index) - otherwise detect directories one level higher $dir_names=array(); $file_names=array(); $album_show=false; $total_amount_images=0; if ($dir=@opendir(getcwd())) { while ($file=@readdir($dir)) { if (($file!='.') && ($file!='..') && is_dir($file) && file_exists($file.'/index.php') && ($file!='_vti_cnf')) { $images=get_images($file,false,true); if (count($images)!=0) { array_push($dir_names,$file); $index_image_exists=count($file_names); foreach ($images as $firstimage) { if (substr($firstimage,0,strrpos($firstimage,'.'))=='index') { array_push($file_names,$file . '/' . $firstimage); break; } } if ($index_image_exists==count($file_names)) array_push($file_names,$file . '/' . $images[0]); $album_show=true; $total_amount_images=$total_amount_images+count($images); } } } @closedir($dir); } sort($dir_names); sort($file_names); $total_amount_albums=count($dir_names); if (count($dir_names)==0) { $dir_names=array(); if ($dir=@opendir('../')) { while ($file=@readdir($dir)) { if (($file!='.') && ($file!='..') && is_dir('../'.$file) && file_exists('../'.$file.'/index.php') && $file!=substr(getcwd(),-strlen($file)) && ($file!='_vti_cnf')) { $images=get_images('../' . $file,false,false); if (count($images)!=0) array_push($dir_names,'../' . $file); } } @closedir($dir); } sort($dir_names); if ($admin_link!='') $file_names=get_images('./',true,true); else $file_names=get_images('./',true,false); } // Add backup images for administrator access $backup_not_published=0; if ($admin_link!='' && is_dir('backup')) { $backup_files=array(); $backup_files=get_images('backup',true,false); foreach($backup_files as $backup_image) { if (!in_array($backup_image,$file_names)) { array_push($file_names,$backup_image); $backup_not_published+=1; } } } // Add multimedia files for administrator access if ($admin_link!='') { $add_mm_files=get_multimedia('',true); foreach($add_mm_files as $newfile) {array_push($file_names,$newfile);} } // Page title if ($title=='') { $title=str_replace(chr(92),chr(47),getcwd()); $title=str_replace('_',' ',$title); $title=substr($title,strrpos($title,chr(47))+1); if (ereg("([0-9]{3})",substr($title,0,3))) { if (substr($title,3,1)==' ' || substr($title,3,1)=='_') $title=trim(substr($title,3)); } } // Change display configuration for shop system, order stage 1,2 and 3 if ($shop && isset($_REQUEST['orderphotos'])) { $order=0; if ($_REQUEST['orderphotos']==1) { $images_per_page=9999; if (isset($_REQUEST['page'])) {unset($_REQUEST['page']);} $columns_per_page=$shop_columns; $thumbnail_txtfile=false; $thumbnail_countcomments=false; $popup=true; $order=1; } if ($_REQUEST['orderphotos']==2) {$order=2;} if ($_REQUEST['orderphotos']==3) {$order=3;} } else { $order=0; } // Evaluate which thumbnails to show on current page $max_files=count($file_names); if (isset($_REQUEST['page'])) {$page=abs((int) $_REQUEST['page']);} else {$page=0;} if ($images_per_page==0) {$images_per_page=1;} $albumpage=ceil($page/$images_per_page)+1; $show_files=$page+$images_per_page; if ($show_files>$max_files) {$show_files=$max_files;} if ($page==$show_files) {$page-=$images_per_page;} if ($max_files==0) {$page=0;} // Create HTML page echo "$title\n"; echo "\n"; echo "\n"; echo "\n"; // Insert CSS Styles html_css(); // Javascript echo "
\n"; echo "\n"; if ($header!='' && $admin_link=='') { $extension=strtolower(substr($header,strrpos($header,'.')+1,strlen($header))); if ($extension=='jpg' || $extension=='jpeg' || $extension=='png' || $extension=='gif') { echo "\n"; echo "\n"; echo "
\n"; } } else { // Add your php header here: include("http://www.yourwebsite.com/header.php"); } // Gallery header if ($page_header || $admin_link!='') {echo "

$title

 
";} // Insert menu if ($show_topmenu && $admin_link=='') {album_menu();} // Main content for page placed in a table echo "
\n"; // No image files in directory or PHP version < 4.1.0 if ($max_files==0 && $admin_link=='') {echo "\n";} // Show administrator section if ($admin_link!='') { $columns_per_page=9; $button_text='Upload/Backup/Resize/Rotate'; if ($allow_configuration) {$disable='';} else {$disable='disabled=\"true\"';} if ($dir=@opendir(getcwd())) { $total_albums=0; while ($file=@readdir($dir)) if (($file!='.') && ($file!='..') && is_dir($file) && file_exists($file.'/index.php') && ($file!='_vti_cnf')) {$total_albums+=1;} @closedir($dir); } if ($total_albums==0 && $max_files==0 && !isset($_REQUEST['newinstallation'])) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; $button_text='Upload'; } else if ($total_albums!=0) { echo "\n"; if ($dir=@opendir(getcwd())) { $all_albums=array(); while ($file=@readdir($dir)) { if (($file!='.') && ($file!='..') && is_dir($file) && file_exists($file.'/index.php') && ($file!='_vti_cnf')) {array_push($all_albums,$file);} } @closedir($dir); sort($all_albums); for ($count=$page;$count\n"; } if ($max_albums>0) { if ($max_albums>$total_albums) { echo "\n"; $button_text='Create album'; } else { $button_text='Maximum amount of albums reached...'; } } else { echo "\n"; $button_text='Create album'; } } else if ($max_files==0) { echo "\n"; $button_text='Upload'; $disable='disabled=\"true\"'; } else { echo "\n"; for ($count=$page;$count<$show_files;$count++) { $image_filename=rawurlencode($file_names[$count]); $randomid=uniqid(rand(),true); $showimage_txt=substr($file_names[$count],0,strrpos($file_names[$count],'.')).'.txt'; $extension=strtolower(substr($file_names[$count],strrpos($file_names[$count],'.')+1,strlen($file_names[$count]))); if (file_exists($file_names[$count])) { $size=@GetImageSize('./' . $file_names[$count]); $file_size=@filesize($file_names[$count]); $file_date=getexif($file_names[$count],$show_date_format,'date'); if ($hit_counter) {$file_date.="
" . gettotalhits($file_names[$count]) . ' hits';} if (file_exists('backup/'.$file_names[$count])) $backup_html=""; else $backup_html=""; $backup_only="
$file_names[$count]"; if ($extension=='gif' || $extension=='png' || $extension=='jpg' || $extension=='jpeg') { if (file_exists($showimage_txt) || file_exists('textfiles/'.$showimage_txt)) echo "$backup_html\n"; else echo "$backup_html\n"; } else { echo "\n"; } } else { $size=@GetImageSize('backup/' . $file_names[$count]); $file_size=@filesize('backup/'.$file_names[$count]); $file_date=getexif('backup/'.$file_names[$count],$show_date_format,'date'); if ($hit_counter) {$file_date.="
" . gettotalhits($file_names[$count]) . ' hits';} $backup_html=""; $backup_only="$file_names[$count]
(backup only - not published)"; if (file_exists($showimage_txt) || file_exists('textfiles/'.$showimage_txt)) echo "$backup_html\n"; else echo "$backup_html\n"; } $textarea1=''; $textarea2='
'; $textarea3=''; $textarea4="delete / edit"; if (isset($_REQUEST['edittxtfile'])) { if ($_REQUEST['edittxtfile']==$showimage_txt) { $textarea1="'; $textarea4="cancel"; $button_text='Save text'; } } if (file_exists($showimage_txt) && ($extension=='gif' || $extension=='png' || $extension=='jpg' || $extension=='jpeg')) { echo "\n"; } else if (file_exists('textfiles/'.$showimage_txt) && ($extension=='gif' || $extension=='png' || $extension=='jpg' || $extension=='jpeg')) { echo "\n"; } } } if ($total_albums==0) { $file_size=0; $file_size_backup=0; for ($count=0;$count0) $backup_text=" | Total images in backup (not published): $backup_not_published (" . floor((($file_size_backup/1024)/1024)*100)/100 . " Mb)"; else $backup_text=''; if ($max_album_size>0) { if ($max_album_size>floor(((($file_size+$file_size_backup)/1024)/1024)*100)/100) echo "\n"; else $button_text='Backup/Resize/Rotate'; } else { echo "\n"; } if (file_exists('../index.php')) $mainmenu=""; else $mainmenu=''; echo "\n"; echo "\n"; } else { echo "\n"; } } else if (isset($_REQUEST['showimage']) && isset($_REQUEST['screenwidth']) && file_exists($_REQUEST['showimage'])) { // Display single photo on page $showimage=$_REQUEST['showimage']; $showimageurl=rawurlencode($showimage); $screenwidth=$_REQUEST['screenwidth']; $border=''; if ($image_border) {$border="border=\"1\"";} $onload=''; if ($slideshow && isset($_REQUEST['slideshow'])) {$onload="onload=\"javascript: starttimer()\"";} // Obtain new image width and height when resized $size=@GetImageSize('./' . $showimage); $dimensions=getdimensions($size); $image_width=$dimensions[0]; $image_height=$dimensions[1]; if ($show_name) { $file_name=substr($showimage,0,strrpos($showimage,'.')); if (ereg("([0-9]{3})",substr($file_name,0,3))) { if (substr($file_name,3,1)==' ' || substr($file_name,3,1)=='_') $file_name=trim(substr($file_name,3)); } if (strpos($file_name,'/')!=false) {$file_name=substr($file_name,0,strpos($file_name,'/'));} if ($name_bold) {$contentshowname='';} if ($name_italic) {$contentshowname.='';} $contentshowname.=str_replace('_',' ',$file_name) . "
"; if ($name_italic) {$contentshowname.='
';} if ($name_bold) {$contentshowname.='
';} if ($show_name_top) {echo "\n";} } $thumb_size=$image_resizeto; $previous_thumb=''; $next_thumb=''; if ($show_previous_next) { if (is_dir('thumbnails')) {$thumbdir='thumbnails/';} else {$thumbdir='';} if (in_array($showimage,$file_names)) { $main_index=array_search($showimage,$file_names); if ($show_prev_next_size>-1) {$show_prev_next_width="width=$show_prev_next_size";} else {$show_prev_next_width='';} if (($main_index+1)<=count($file_names)) { if (($main_index+1)=count($file_names)) {$next_image=$file_names[0];} $extension='.'.strtolower(substr($next_image,strrpos($next_image,'.')+1,strlen($next_image))); $next_thumb=$thumbdir . substr($next_image,0,strrpos($next_image,'.')) . '_thumb' . $extension; if (!file_exists($next_thumb)) $next_thumb=""; else $next_thumb=""; } if (($main_index-1)>=-1) { if (($main_index-1)>=0) {$next_image=$file_names[$main_index-1];} if (($main_index-1)<0) {$next_image=$file_names[count($file_names)-1];} $extension='.'.strtolower(substr($next_image,strrpos($next_image,'.')+1,strlen($next_image))); $previous_thumb=$thumbdir . substr($next_image,0,strrpos($next_image,'.')) . '_thumb' . $extension; if (!file_exists($previous_thumb)) $previous_thumb=""; else $previous_thumb=""; } } } if ($show_prev_next_below) { $prev_next=$previous_thumb . ' ' . $next_thumb . '
'; $previous_thumb=''; $next_thumb=''; } else { $prev_next=''; } $multimedia_href1=''; $multimedia_href2=''; $multimedia_href3=''; $content=''; $multimedia_content=''; $display_photo=true; if ($play_multimedia) { $mm_file=get_multimedia($showimage,false); if ($mm_file!='') { if ($link_player) { $multimedia_href1=""; $multimedia_href2=''; $multimedia_href3="alt=\"$language_viewmm\""; } $mm_height="height=\"42\""; if ($image_width>300) {$mm_width="width=\"$image_width\"";} else {$mm_width="width=\"280\"";} $extension=strtolower(substr($mm_file,strrpos($mm_file,'.')+1,strlen($mm_file))); $movies=explode(',',$movie_formats); if (in_array($extension,$movies)) { $mm_height=''; $mm_width=''; $display_photo=false; } if ($embed_player && $display_photo) $content.="

\n"; if ($embed_player && !$display_photo) $content.="$previous_thumb $next_thumb

\n"; if ($download_multimedia) $multimedia_content="$language_download $mm_file
"; if (!$mm_photo) {$image_resize=false;} } } $image_width="width=$image_width"; $image_height="height=$image_height"; if (!$image_resize) { $image_width=''; $image_height=''; } if ($image_resize && $display_photo) { echo "
\n"; } else if ($display_photo) { echo "\n"; } if ($show_name && !$show_name_top) {$content.=$contentshowname;} if ($prev_next!='') {$content.=$prev_next;} if ($info_bold) {$content.='';} if ($info_italic) {$content.='';} if ($show_download && !isset($_REQUEST['slideshow'])) {$content.="$language_download $showimage
";} $content.=$multimedia_content; if ($show_iptc_caption) { $caption=iptc($showimage); if ($caption!='') {$content.=$caption . "
";} } if ($show_exif_comment) { $exif_comment=getexif($showimage,$show_date_format,'comment'); if ($exif_comment!='') {$content.=$exif_comment . "
";} } if ($show_details) { $file_size=@filesize($showimage); $content.=$size[0] . "x" . $size[1] . " / " . floor($file_size/1024) . " Kb
"; } if ($show_date) {$content.=getexif($showimage,$show_date_format,'date') . "
";} // Update statistics if ($hit_counter) { echo "\n"; } if ($rating && !isset($_REQUEST['slideshow'])) { $randomid=uniqid(rand(),true); if (!$rating_text) $content.="$language_rating \"$language_rating_tooltip\" (" . gettotalvotes($showimage,true) . " $language_rating_votes)"; else $content.="$language_rating " . round(gettotalvotes($showimage,false)/(gettotalvotes($showimage,true)+0.001),2) . " (" . gettotalvotes($showimage,true) . " $language_rating_votes)"; $content.="
 
"; } if ($info_bold) {$content.='
';} if ($info_italic) {$content.='';} if ($show_exif_comment || $show_iptc_caption) {$nowrap="";} else {$nowrap="nowrap=\"nowrap\"";} if ($content!='') {echo "\n";} // Display textfile if ($image_txtfile) { $showimage_txt=substr($showimage,0,strrpos($showimage,'.')).'.txt'; if (file_exists($showimage_txt)) { echo "\n"; } else if (file_exists('textfiles/'.$showimage_txt)) { echo "\n"; } } } else if ($order>1) { if ($order==2) { // Order has been placed - details required echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "\n"; } else if ($order==3) { // Order has been confirmed - show confirmation if (isset($_REQUEST['address']) && isset($_REQUEST['email_address']) && isset($_REQUEST['finalorder'])) { $message=$_REQUEST['address'] . chr(10) . chr(10) . $_REQUEST['email_address'] . chr(10) . chr(10) . $_REQUEST['finalorder']; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; // Send email with the order mail($shop_email,'New order!!','Order from photoalbum: ' . $title . chr(10) . chr(10) . $message,'From: ' . $_REQUEST['email_address'] . "\r\n" . 'Reply-To: ' . $_REQUEST['email_address'] . "\r\n" . 'X-Mailer: PHP/' . phpversion()); } } } else { // Display thumbnail images $colcount=0; for ($count=$page;$count<$show_files;$count++) { $file_name=substr($file_names[$count],0,strrpos($file_names[$count],'.')); $link=''; if (ereg("([0-9]{3})",substr($file_name,0,3))) { if (substr($file_name,3,1)==' ' || substr($file_name,3,1)=='_') $file_name=trim(substr($file_name,3)); } if (strpos($file_name,'/')!=false) { $link=substr($file_names[$count],0,strpos($file_names[$count],'/')).'/index.php'; $file_name=substr($file_name,0,strpos($file_name,'/')); } $size=@GetImageSize('./' . $file_names[$count]); $dimensions=getdimensions($size); $popup_width=$dimensions[0]; $popup_height=$dimensions[1]; $image_filename=rawurlencode($file_names[$count]); $extension='.'.strtolower(substr($file_names[$count],strrpos($file_names[$count],'.')+1,strlen($file_names[$count]))); if ($size[2]==1) {$extension='.gif';} if ($size[2]==2) {$extension='.jpg';} if ($size[2]==3) {$extension='.png';} if (strpos($file_names[$count],'/')) {$subdir=substr($file_names[$count],0,strpos($file_names[$count],'/')+1);} else {$subdir='';} if (is_dir($subdir . 'thumbnails')) {$thumbdir='thumbnails/';} else {$thumbdir='';} if ($total_amount_albums>0) { $thumb_filename=$subdir . $thumbdir . substr($file_names[$count],strlen($subdir),strrpos($file_names[$count],'.')-strlen($subdir)) . '_thumbindex' . $extension; if ($hit_counter) {$counter_code="href=\"javascript:updatestats('$file_names[$count]','$link')\"";} else {$counter_code="href=\"$link\"";} } else { $thumb_filename=$subdir . $thumbdir . substr($file_names[$count],0,strrpos($file_names[$count],'.')) . '_thumb' . $extension; $counter_code="href=\"$link\""; } $alt=str_replace('_',' ',$file_name); // Check for valid thumbnail file or create a new thumbnail if (file_exists($thumb_filename)) { if (@filemtime($thumb_filename)>@filemtime('index.php') || !$create_thumbnail_cache) {$valid_thumb=true;} else {$valid_thumb=false;} if (file_exists('configuration.php')) if (@filemtime($thumb_filename)>@filemtime('configuration.php') || !$create_thumbnail_cache) {$valid_thumb=true;} else {$valid_thumb=false;} } else { $valid_thumb=false; } // Check if thumbnail file belongs to multimedia icon if ($play_multimedia && $mm_dir!='' && !$mm_thumbnail) { if (file_exists($mm_dir)) { $all_mm_files=get_multimedia('',true); foreach ($all_mm_files as $key => $filename) {$all_mm_files[$key]=strtolower(substr($filename,0,strrpos($filename,'.')));} if (in_array(strtolower(substr($file_names[$count],0,strrpos($file_names[$count],'.'))),$all_mm_files)) {$valid_thumb=true;} } } $is_index=substr($file_names[$count],0,strrpos($file_names[$count],'.')); if (strpos($is_index,'/')) {$is_index=substr($is_index,strrpos($is_index,'/')+1);} $multimedia_href1=''; $multimedia_href2=''; $multimedia_content=''; $content=''; if ($show_name && $show_thumb_name_top) { if ($name_bold) {$content.='';} if ($name_italic) {$content.='';} $content.=str_replace('_',' ',$file_name) . "
"; if ($name_bold) {$content.='
';} if ($name_italic) {$content.='';} } if ($play_multimedia) { $mm_file=get_multimedia($file_names[$count],false); if ($mm_file!='') { $multimedia_href1=""; $multimedia_href2=''; if ($download_multimedia) { $extension=strtolower(substr($mm_file,strrpos($mm_file,'.')+1,strlen($mm_file))); $multimedia_content="$language_download $mm_file
"; } } } if ($valid_thumb && $is_index!='index') { if (strpos($file_names[$count],'/')===false && $size[0]) { $onclick=''; if ($hit_counter) {$onclick="onclick=\"updatestats('$file_names[$count]','')\"";} if ($multimedia_href1=='') $content.="\"$language_view
"; else if ($popup) $content.="$multimedia_href1\"$language_viewmm$multimedia_href2
"; else $content.="\"$language_view
"; } else if ($size[0]) { $content.="\"$language_view
"; } else { $content.="
"; } } else if ($is_index!='index') { if (strpos($file_names[$count],'/')===false && $size[0]) { $onclick=''; if ($hit_counter) {$onclick="onclick=\"updatestats('$file_names[$count]','')\"";} if ($multimedia_href1=='') $content.="\"$language_view
"; else if ($popup) $content.="$multimedia_href1\"$language_viewmm$multimedia_href2
"; else $content.="\"$language_view
"; } else if ($size[0]) { $content.="\"$language_view
"; } else { $content.="
"; } } else if ($indeximage_no_thumb && $is_index=='index') { $content.="\"$language_view
"; } if ($show_name && !$show_thumb_name_top) { if ($name_bold) {$content.='';} if ($name_italic) {$content.='';} $content.=str_replace('_',' ',$file_name) . "
"; if ($name_bold) {$content.='
';} if ($name_italic) {$content.='';} } if ($info_bold) {$content.='';} if ($info_italic) {$content.='';} if ($show_download) {$content.="$language_download $file_names[$count]
";} $content.=$multimedia_content; if ($show_details) { $file_size=@filesize($file_names[$count]); $content.=$size[0] . "x" . $size[1] . " / " . floor($file_size/1024) . " Kb
"; } if ($show_date) {$content.=getexif($file_names[$count],$show_date_format,'date') . "
";} $randomid=uniqid(rand(),true); if ($hit_counter && !$hit_counter_text) $content.="\"$language_hitcounter_tooltip\"
"; else if ($hit_counter && $hit_counter_text) $content.="$language_hits " . gettotalhits($file_names[$count]) . "
"; if ($rating && strpos($file_names[$count],'/')===false && !$popup && !$rating_text) $content.="$language_rating \"$language_rating_tooltip\" (" . gettotalvotes($file_names[$count],true) . " $language_rating_votes)
"; else if ($rating && strpos($file_names[$count],'/')===false && !$popup && $rating_text) $content.="$language_rating " . round(gettotalvotes($file_names[$count],false)/(gettotalvotes($file_names[$count],true)+0.001),2) . " (" . gettotalvotes($file_names[$count],true) . " $language_rating_votes)
"; if ($thumbnail_countcomments) { $totalcomments=gettotalcomments($file_names[$count]); if ($totalcomments>0) {$content.=$language_countcomments . $totalcomments ."
";} } if ($info_bold) {$content.='
';} if ($info_italic) {$content.='';} // Display textfile if ($thumbnail_txtfile) { $nowrap="nowrap=\"nowrap\""; $showimage_txt=substr($file_names[$count],0,strrpos($file_names[$count],'.')).'.txt'; if (file_exists($showimage_txt)) { $lines=file($showimage_txt); foreach ($lines as $line) {$content.=htmlentities($line)."
";} $nowrap=''; } else { if (strpos($showimage_txt,'/')!=false) { if (is_dir(substr($showimage_txt,0,strrpos($showimage_txt,'/')) . '/textfiles')) $showimage_txt=str_replace('/','/textfiles/',$showimage_txt); } else { if (is_dir('textfiles')) {$showimage_txt='textfiles/'.$showimage_txt;} } if (file_exists($showimage_txt)) { $lines=file($showimage_txt); foreach ($lines as $line) {$content.=htmlentities($line)."
";} $nowrap=''; } } } else { $nowrap="nowrap=\"nowrap\""; } // Add shop selection boxes if ($shop && $order==1) { $content.=$language_shop_info . "
"; if ($shop_choice1!='') { $choices=explode(',',$shop_choice1); $content.=""; } if ($shop_choice2!='') { $choices=explode(',',$shop_choice2); $content.=""; } $content.="
"; } if ($thumbnail_spacing!='') {$col_width="width=\"$thumbnail_spacing" . "px\"";} else {$col_width='';} if ($columns_per_page==1) { echo "\n"; } else { $colcount+=1; if ($colcount==1) { echo "\n"; } else if ($colcount<$columns_per_page) { echo "\n"; } else { echo "\n"; $colcount=0; } } if ($colcount<$columns_per_page && $colcount!=0 && $count==$show_files-1) { for ($emptycol=$colcount;$emptycol<$columns_per_page;$emptycol++) {echo "";} echo "\n"; } } } echo "\n"; if ($shop && $order==1) echo "\n"; // Page numbers - back & forward browsing etc. if (($max_files>$images_per_page ||isset($_REQUEST['showimage'])) || $shop && $order<2 || $visitor_upload) { if ((count($file_names)/$images_per_page)>29) {$nowrap='';} else {$nowrap="nowrap=\"nowrap\"";} echo "\n"; } echo "
$language_dir_empty
EasyPhpAlbum installation menu
For a multiple album installation, please enter the 1st album name below.

Otherwise please select and upload some photo's.
Album name:
  Edit AlbumImagesAction
" . ($count+1) . ".$all_albums[$count]" . count(get_images($all_albums[$count],false,false)) . "delete / rename
Create new album with name:
Create new album with name:
$language_dir_empty
  NameDateDimensionsSizeBackupAction
v / r / d
" . ($count+1) . ".$backup_only$file_date$size[0] x $size[1]" . floor($file_size/1024) . " Kbdelete / rename
" . ($count+1) . ".$backup_only$file_date$size[0] x $size[1]" . floor($file_size/1024) . " Kbdelete / rename / add text
" . ($count+1) . ".$file_names[$count]$file_date " . floor($file_size/1024) . " Kb   delete / rename
v / r / d
" . ($count+1) . ".$file_names[$count]$file_date$size[0] x $size[1]" . floor($file_size/1024) . " Kbbackup (not published)
" . ($count+1) . ".$file_names[$count]$file_date$size[0] x $size[1]" . floor($file_size/1024) . " Kbbackup (not published)
  $textarea1\n"; $lines=file($showimage_txt); foreach ($lines as $line) {echo htmlentities($line).$textarea2;} if (count($lines)==0) {echo "Description for photo";} echo "$textarea3$textarea4
  $textarea1"; $lines=file('textfiles/'.$showimage_txt); foreach ($lines as $line) {echo htmlentities($line).$textarea2;} if (count($lines)==0) {echo "Description for photo";} echo "$textarea3$textarea4




$mainmenu
Total files in album: " . (count($file_names)-$backup_not_published) . " (" . floor((($file_size/1024)/1024)*100)/100 ." Mb) $backup_text
$contentshowname
$previous_thumb $multimedia_href1$multimedia_href2 $next_thumb
$previous_thumb $multimedia_href1$multimedia_href2 $next_thumb
$content
\n"; $lines=file($showimage_txt); foreach ($lines as $line) {echo htmlentities($line)."
";} echo "
\n"; $lines=file('textfiles/'.$showimage_txt); foreach ($lines as $line) {echo htmlentities($line)."
";} echo "
$language_shop_address
$language_shop_email_address
$language_shop_ordercomments
\n"; echo "
$language_shop_confirmation
 
 
$content
$content$content$content
 
 
"; if (count($file_names)>$images_per_page || isset($_REQUEST['showimage'])) { if ($albumpage==1) echo "$language_page 1"; else echo "$language_page 1"; } for ($i=$images_per_page;$i$p"; else echo " | $p"; } // Back & forward browsing (only when slideshow is not active) if (!isset($_REQUEST['slideshow'])) { if (isset($_REQUEST['showimage'])) { if (in_array($_REQUEST['showimage'],$file_names)) { $back=array_search($_REQUEST['showimage'],$file_names)-1; $forward=$back+2; $count=count($file_names); if ($count>1) { if ($back>=0 && $forward<$count) echo " | $language_view_previous $language_view_next"; if ($forward>=$count) echo " | $language_view_previous"; if ($back<0) echo " | $language_view_next"; } // Insert code for keyboard navigation if ($enable_keyboard_arrows) { echo "\n"; } } } } if ($slideshow && isset($_REQUEST['showimage']) && isset($_REQUEST['screenwidth']) && count($file_names)>1) { $showimage=rawurlencode($_REQUEST['showimage']); $screenwidth=(int) $_REQUEST['screenwidth']; $mm_slideshow=false; // Check if thumbnail file belongs to multimedia file if ($play_multimedia) { $all_mm_files=get_multimedia('',true); foreach ($all_mm_files as $key => $filename) {$all_mm_files[$key]=strtolower(substr($filename,0,strrpos($filename,'.')));} if (in_array(strtolower(substr($_REQUEST['showimage'],0,strrpos($_REQUEST['showimage'],'.'))),$all_mm_files)) {$mm_slideshow=true;} } if (!$mm_slideshow) { if (isset($_REQUEST['slideshow'])) echo " | $language_stop_slideshow"; else echo " | $language_slideshow"; } } if ($visitor_comments && isset($_REQUEST['showimage']) && !isset($_REQUEST['slideshow'])) echo " | $language_add_comment"; if ($visitor_upload && !isset($_REQUEST['showimage']) && $admin_link=='' && !$shop) { $file_size=0; if ($max_album_size>0) { if ($dir=@opendir('./')) { while ($file=@readdir($dir)) { if (($file!='.') && ($file!='..') && !is_dir($file)) $file_size+=@filesize($file); } } @closedir($dir); } if (count($file_names)>$images_per_page && $max_album_size>=floor((($file_size/1024)/1024)*100)/100) { echo " | $language_add_file"; } else if ($max_album_size>=floor((($file_size/1024)/1024)*100)/100) { echo "$language_add_file "; } } if ($show_email_link && !isset($_REQUEST['slideshow']) && $admin_link=='' && $order==0) { $url="http://" . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']; if (!empty($_SERVER["QUERY_STRING"])) {$url.="?" . rawurldecode($_SERVER['QUERY_STRING']);} echo " | \"$language_email_alt\""; } if ($shop && $order==0 && !isset($_REQUEST['showimage'])) { if (count($file_names)>$images_per_page) {$separator=' | ';} else {$separator='';} echo "$separator$language_shop_order"; } if ($visitor_sort && !isset($_REQUEST['showimage']) && $admin_link=='' && $order==0) { if (isset($_REQUEST['sort'])) { if ($_REQUEST['sort']=='name') {$sort_1='selected';} else {$sort_1='';} if ($_REQUEST['sort']=='hitcounter') {$sort_2='selected';} else {$sort_2='';} if ($_REQUEST['sort']=='comments') {$sort_3='selected';} else {$sort_3='';} if ($_REQUEST['sort']=='rating') {$sort_4='selected';} else {$sort_4='';} if ($_REQUEST['sort']=='date') {$sort_5='selected';} else {$sort_5='';} } else { $sort_1='selected'; $sort_2=''; $sort_3=''; $sort_4=''; $sort_5=''; } if (count($file_names)>$images_per_page) {$separator=' | ';} else {$separator='';} $sort_selection=$separator.""; } echo "
\n"; // Visitor comments if ($visitor_comments && isset($_REQUEST['showimage'])) { echo "
\n"; echo "
$language_username_comment:
\n"; echo "\n"; } // Visitor upload if ($visitor_upload && !isset($_REQUEST['showimage'])) { echo "
\n"; echo "\n"; echo "
$language_username_comment:
"; for($i=1;$i<($visitor_upload_max_files+1);$i++) {echo "
";} echo "
\n"; echo "\n"; } echo "
 
"; // Insert menu if ($show_bottommenu && $admin_link=='') {album_menu();} if ($show_poweredby_easyphpalbum) echo "

\"v1.3.6\"

\n"; if ($footer!='' && $admin_link=='') { $extension=strtolower(substr($footer,strrpos($footer,'.')+1,strlen($footer))); if ($extension=='jpg' || $extension=='jpeg' || $extension=='png' || $extension=='gif') { echo "

 

"; echo "\n"; echo "\n"; echo "
\n"; } } else { echo "

 

"; echo "\n"; // Add you own php footer here (in the table instead of  ) echo "\n"; echo "\n"; echo "
 
 
\n"; } // End of HTML page echo "
\n"; // Functions // Create error image function invalid_image($message) { $im=imagecreate(80,75); $black=imagecolorallocate($im,0,0,0); $yellow=imagecolorallocate($im,255,255,0); imagefilledrectangle($im,0,0,80,75,imagecolorallocate($im,255,0,0)); imagerectangle($im,0,0,79,74,$black); imageline($im,0,20,80,20,$black); imagefilledrectangle($im,1,1,78,19,$yellow); imagefilledrectangle($im,27,35,52,60,$yellow); imagerectangle($im,26,34,53,61,$black); imageline($im,27,35,52,60,$black); imageline($im,52,35,27,60,$black); imagestring($im,1,5,5,$message,$black); return $im; } // Create powered by image function poweredby_image() { global $logo_line_color,$logo_text_color; $im=imagecreate(64,20); $blue=imagecolorallocate($im,hexdec(substr($logo_text_color,1,2)),hexdec(substr($logo_text_color,3,2)),hexdec(substr($logo_text_color,5,2))); $orange=imagecolorallocate($im,hexdec(substr($logo_line_color,1,2)),hexdec(substr($logo_line_color,3,2)),hexdec(substr($logo_line_color,5,2))); $white=imagecolorresolve($im,255,255,255); imagecolortransparent($im,$white); imageline($im,0,0,64,0,$orange); imageline($im,0,19,64,19,$orange); imagefilledrectangle($im,0,1,64,18,$white); imagestring($im,1,2,2,' Powered by',$blue); imagestring($im,1,2,10,'EasyPhpAlbum',$blue); return $im; } // Create emaillink image function emaillink_image() { global $email_color; $im=imagecreate(20,10); $black=imagecolorallocate($im,0,0,0); imagefilledrectangle($im,0,0,20,10,$black); imagefilledrectangle($im,1,1,18,8,imagecolorallocate($im,hexdec(substr($email_color,1,2)),hexdec(substr($email_color,3,2)),hexdec(substr($email_color,5,2)))); imageline($im,1,1,9,5,$black); imageline($im,11,5,19,1,$black); imageline($im,9,5,11,5,$black); imageline($im,1,9,6,4,$black); imageline($im,13,4,18,9,$black); return $im; } // Create hitcounter image function hitcounter_image($hits) { global $hit_counter_linecolor,$hit_counter_textcolor,$hit_counter_segmentcolor,$hit_counter_random; if (strlen($hits)>5) {$hits=substr($hits,-5);} $hits=str_repeat('0',5-strlen($hits)).$hits; $im=imagecreate(55,12); $col_text=imagecolorallocate($im,hexdec(substr($hit_counter_textcolor,1,2)),hexdec(substr($hit_counter_textcolor,3,2)),hexdec(substr($hit_counter_textcolor,5,2))); $col_line=imagecolorallocate($im,hexdec(substr($hit_counter_linecolor,1,2)),hexdec(substr($hit_counter_linecolor,3,2)),hexdec(substr($hit_counter_linecolor,5,2))); imagefilledrectangle($im,0,0,55,12,$col_line); imagefilledrectangle($im,1,1,53,10,imagecolorallocate($im,hexdec(substr($hit_counter_segmentcolor,1,2)),hexdec(substr($hit_counter_segmentcolor,3,2)),hexdec(substr($hit_counter_segmentcolor,5,2)))); for ($i=0;$i<=strlen($hits);$i++) { if ($hit_counter_random) {$y_pos=mt_rand(1,3);} else {$y_pos=2;} $x_pos=3+$i*11; imagestring($im,1,$x_pos,$y_pos,substr($hits,$i,1),$col_text); imageline($im,$x_pos+7,0,$x_pos+7,12,$col_line); } return $im; } // Create rating image function rating_image($score) { global $table_color,$rating_blockcolor,$rating_blockcolor_score; $im=imagecreate(38,6); $col_block=imagecolorallocate($im,hexdec(substr($rating_blockcolor,1,2)),hexdec(substr($rating_blockcolor,3,2)),hexdec(substr($rating_blockcolor,5,2))); $col_block_score=imagecolorallocate($im,hexdec(substr($rating_blockcolor_score,1,2)),hexdec(substr($rating_blockcolor_score,3,2)),hexdec(substr($rating_blockcolor_score,5,2))); imagefill($im,0,0,imagecolorallocate($im,hexdec(substr($table_color,1,2)),hexdec(substr($table_color,3,2)),hexdec(substr($table_color,5,2)))); $x_pos=0; for ($i=0;$i<5;$i++) { if ($i<$score) imagefilledrectangle($im,$x_pos,0,$x_pos+5,6,$col_block_score); else imagefilledrectangle($im,$x_pos,0,$x_pos+5,6,$col_block); $x_pos+=8; } return $im; } // Footer & Bottom menu function album_menu() { global $total_amount_albums,$show_statistics,$language_albums,$language_photos,$total_amount_images,$language_homepage,$home_page; global $show_dir_up,$language_up,$album_show,$order,$dir_names,$admin_link,$restrict_access,$language_logout; echo "
    "; if ($total_amount_albums!=0 && $show_statistics) echo "
    $language_albums: $total_amount_albums | $language_photos: $total_amount_images
    "; if ($home_page!='' && $order==0) {echo "
  • $language_homepage
  • ";} if ($show_dir_up) {echo "
  • $language_up
  • \n";} if (!$album_show && $order==0) { for ($count=0;$count$dir_name\n"; } } if ($restrict_access) { if ($admin_link!='') echo "
  • $language_logout
  • \n"; else echo "
  • $language_logout
  • \n"; } echo "
\n"; } // Determine dimensions for resized image function getdimensions($size) { global $image_resize,$image_resizeto,$image_inflate; $width=80; $height=75; if ($image_resize && $size[0]) { if ($image_resizeto==0 && isset($_REQUEST['screenwidth'])) $newsize=floor($_REQUEST['screenwidth']/1.6); else if ($image_resizeto!=0) $newsize=$image_resizeto; else $newsize=max($size[0],$size[1]); if (!$image_inflate) { if ($newsize>$size[0] && $newsize>$size[1]) $newsize=max($size[0],$size[1]); } if ($size[0]>$size[1]) { $width=$newsize; $height=ceil($size[1]/($size[0]/$width)); } else { $width=ceil($size[0]/($size[1]/$newsize)); $height=$newsize; } } else if ($size[0]) { $width=$size[0]; $height=$size[1]; } return array($width,$height); } // Read total amount of votes or score from file function gettotalvotes($image,$votes) { $totalvotes=0; $totalscore=0; $stats_filename=substr($image,0,strrpos($image,'.')) . '.rate'; if (is_dir('ratings')) {$stats_filename='ratings/'.$stats_filename;} if (is_readable($stats_filename)) { if ($fp=@fopen($stats_filename,'r')) { $stats=explode('@',fread($fp,filesize($stats_filename))); $totalvotes=$stats[0]; if (count($stats)>2) {$totalscore=floor($stats[0]*$stats[1]);} fclose($fp); } } if ($votes) return $totalvotes; else return $totalscore; } // Read total amount of hits file function gettotalhits($image) { $totalhits=0; $stats_filename=substr($image,0,strrpos($image,'.')).'.stat'; if (strpos($stats_filename,'/')!=false) { if (is_dir(substr($image,0,strrpos($image,'/')) . '/hitcounters')) $stats_filename=str_replace('/','/hitcounters/',$stats_filename); } else { if (is_dir('hitcounters')) $stats_filename='hitcounters/'.$stats_filename; } if (is_readable($stats_filename)) { if ($fp=@fopen($stats_filename,'r')) { $stats=explode('@',fread($fp,filesize($stats_filename))); $totalhits=$stats[0]+0; fclose($fp); } } return $totalhits; } // Count total comments for text file function gettotalcomments($filename) { $comments=0; $showimage_txt=substr($filename,0,strrpos($filename,'.')).'.txt'; if (is_dir('textfiles')) {$showimage_txt='textfiles/'.$showimage_txt;} if (file_exists($showimage_txt)) { $fp=@fopen($showimage_txt,"r"); $comments=preg_match_all('/(\[ )([0-9]{2})(\/)/',fread($fp,filesize($showimage_txt)),$comments_infile); fclose($fp); } return $comments; } // Read all GIF,JPG,PNG files in directory function get_images($location,$sort,$index) { global $restrict_access,$sort_thumbs,$sort_rating,$sort_hits,$sort_comments,$sort_hightolow,$visitor_sort; if ($visitor_sort) { if (isset($_REQUEST['sort'])) { if ($_REQUEST['sort']!='name') { $sort_hits=false; $sort_comments=false; $sort_rating=false; $sort_thumbs=false; if ($_REQUEST['sort']=='hitcounter') {$sort_hits=true;} if ($_REQUEST['sort']=='comments') {$sort_comments=true;} if ($_REQUEST['sort']=='rating') {$sort_rating=true;} if ($_REQUEST['sort']=='date') {$sort_thumbs=true;} } } } $file_names=array(); if ($dir=@opendir($location)) { while ($file=@readdir($dir)) { if (($file!='.') && ($file!='..') && !is_dir($file)) { $extension=strtolower(substr($file,strrpos($file,'.')+1,strlen($file))); if ($extension=='jpg' || $extension=='jpeg' || $extension=='png' || $extension=='gif') { if ($sort_hits && $sort) { $hits=gettotalhits($file); $totalhits=str_repeat('0',max(10-strlen($hits),0)).$hits.'!'; } else { $totalhits=''; } if ($sort_comments && $sort) { $comments=gettotalcomments($file); $totalcomments=str_repeat('0',max(10-strlen($comments),0)).$comments.'*'; } else { $totalcomments=''; } if ($sort_rating && $sort) { $score=gettotalvotes($file,false); $rating=str_repeat('0',max(10-strlen($score),0)).$score.'#'; } else { $rating=''; } if ($sort_thumbs && $sort) $date=getexif($file,'YmdHi','date').'@'; else $date=''; if (!strpos($file,'_thumb')) { if ($index) array_push($file_names,$totalhits.$totalcomments.$rating.$date.$file); else if (substr($file,0,strrpos($file,'.'))!='index') array_push($file_names,$totalhits.$totalcomments.$rating.$date.$file); } } } } @closedir($dir); } sort($file_names); if ($sort_thumbs || $sort_rating || $sort_hits || $sort_comments) { if ($sort) { if ($sort_hightolow) rsort($file_names); foreach ($file_names as $key => $filename) { if ($sort_hits) $file_names[$key]=substr($filename,strpos($filename,'!')+1); if ($sort_comments) $file_names[$key]=substr($filename,strpos($filename,'*')+1); if ($sort_rating) $file_names[$key]=substr($filename,strpos($filename,'#')+1); if ($sort_thumbs) $file_names[$key]=substr($filename,strpos($filename,'@')+1); } } } return($file_names); } // Retrieve multimedia file from directory function get_multimedia($image_filename,$return_array) { global $sound_formats,$movie_formats; $file_names=array(); $multimedia_filename=strtolower(substr($image_filename,0,strrpos($image_filename,'.'))); $found=''; $supportedformats=explode(',',$movie_formats.','.$sound_formats); if ($dir=@opendir(getcwd())) { while ($file=@readdir($dir)) { if (($file!='.') && ($file!='..') && !is_dir($file)) { $extension=strtolower(substr($file,strrpos($file,'.')+1,strlen($file))); if (in_array($extension,$supportedformats)) { $filename=strtolower(substr($file,0,strrpos($file,'.'))); if ($filename==$multimedia_filename) {$found=$file;} array_push($file_names,$file); } } } @closedir($dir); } if ($return_array) return($file_names); else return($found); } // Create multimedia images function create_mm($recreate_cache) { global $mm_dir; if (file_exists($mm_dir)) { $all_mm_images=get_images($mm_dir,false,false); if (!$recreate_cache) {$all_images=get_images(getcwd(),false,false);} else {$all_images=array();} $all_mm_files=get_multimedia('',true); $mm_images_with_extension=$all_mm_images; $mm_with_extension=$all_mm_files; foreach ($all_mm_images as $key => $filename) {$all_mm_images[$key]=strtolower(substr($filename,0,strrpos($filename,'.')));} foreach ($all_mm_files as $key => $filename) {$all_mm_files[$key]=strtolower(substr($filename,0,strrpos($filename,'.')));} foreach ($all_images as $key => $filename) {$all_images[$key]=strtolower(substr($filename,0,strrpos($filename,'.')));} if (is_dir('thumbnails')) {$mm_thumbdir='thumbnails/';} else {$mm_thumbdir='';} foreach ($all_mm_files as $key => $mm_file) { if (!in_array($mm_file,$all_images)) { if (in_array(strtolower(substr($mm_with_extension[$key],strrpos($mm_with_extension[$key],'.')+1,strlen($mm_with_extension[$key]))),$all_mm_images)) { $mm_index=array_search(strtolower(substr($mm_with_extension[$key],strrpos($mm_with_extension[$key],'.')+1,strlen($mm_with_extension[$key]))),$all_mm_images); @copy($mm_dir . $mm_images_with_extension[$mm_index],$mm_file.'.'.strtolower(substr($mm_images_with_extension[$mm_index],strrpos($mm_images_with_extension[$mm_index],'.')+1,strlen($mm_images_with_extension[$mm_index])))); @copy($mm_dir . $mm_images_with_extension[$mm_index],$mm_thumbdir.$mm_file.'_thumb.'.strtolower(substr($mm_images_with_extension[$mm_index],strrpos($mm_images_with_extension[$mm_index],'.')+1,strlen($mm_images_with_extension[$mm_index])))); } } else { if (in_array(strtolower(substr($mm_with_extension[$key],strrpos($mm_with_extension[$key],'.')+1,strlen($mm_with_extension[$key]))),$all_mm_images)) { $mm_index=array_search(strtolower(substr($mm_with_extension[$key],strrpos($mm_with_extension[$key],'.')+1,strlen($mm_with_extension[$key]))),$all_mm_images); if (@filemtime($mm_dir . $mm_images_with_extension[$mm_index])>@filemtime($mm_file.'.'.strtolower(substr($mm_images_with_extension[$mm_index],strrpos($mm_images_with_extension[$mm_index],'.')+1,strlen($mm_images_with_extension[$mm_index]))))) { @copy($mm_dir . $mm_images_with_extension[$mm_index],$mm_file.'.'.strtolower(substr($mm_images_with_extension[$mm_index],strrpos($mm_images_with_extension[$mm_index],'.')+1,strlen($mm_images_with_extension[$mm_index])))); @copy($mm_dir . $mm_images_with_extension[$mm_index],$mm_thumbdir.$mm_file.'_thumb.'.strtolower(substr($mm_images_with_extension[$mm_index],strrpos($mm_images_with_extension[$mm_index],'.')+1,strlen($mm_images_with_extension[$mm_index])))); } } } } } } // Delete files and directory - recursive function to delete subdirectories function removedir($dirname,$recursive) { clearstatcache(); if (file_exists($dirname)) { if (is_dir($dirname)) { if ($dir=@opendir($dirname)) { while ($file=@readdir($dir)) { if (($file!='.') && ($file!='..')) { $path=$dirname.'/'.$file; if ($recursive && is_dir($path)) { removedir($path,true); } else { @unlink($path); } } } @closedir($dir); @rmdir($dirname); } } } } // Unzip uploaded archive function unzipimages($file,$fileformats,$nickname) { if (file_exists($file)) { if (!file_exists('tmp')) {@mkdir('tmp');} @copy($file,'tmp/' . $file); @unlink($file); chdir('tmp'); @shell_exec('unzip ' . $file); chdir('../'); $supportedformats=explode(',',$fileformats); if ($dir=@opendir('tmp')) { while ($fileinzip=@readdir($dir)) { if (($fileinzip!='.') && ($fileinzip!='..')) { $extension=strtolower(substr($fileinzip,strrpos($fileinzip,'.')+1,strlen($fileinzip))); $imagefilename=substr($fileinzip,0,strrpos($fileinzip,'.')).$nickname.'.'.$extension; if (in_array($extension,$supportedformats) && $extension!='zip') {@copy('tmp/'.$fileinzip,'./'.$imagefilename);} } } @closedir($dir); } removedir(str_replace(chr(92),chr(47),getcwd()).'/tmp',true); } } // Retrieve EXIF info from jpg function getexif($image,$format,$info) { $date=''; $comment=''; if (file_exists($image) && extension_loaded('exif')) { $extension=strtolower(substr($image,strrpos($image,'.')+1,strlen($image))); if ($extension=='jpg' || $extension=='jpeg') { $exif=@exif_read_data($image,0,true); foreach($exif as $key=>$section) { foreach($section as $name=>$val) { if ($name=='DateTimeOriginal') {$date=$val;} if ($name=='DateTime') {$date=$val;} if ($name=='UserComment') {$comment.=$val . ' ';} } } } if ($date!='' && $date!="0000:00:00 00:00:00") { $date=preg_replace("/(\d{4}):(\d{2}):(\d{2}) (\d{2}):(\d{2}):(\d{2})/",'\1-\2-\3 \4:\5:\6',$date); $date=strtotime($date); if ($date===-1) {$date=@filemtime($image);} } else { $date=@filemtime($image); } } else if (file_exists($image)) { $date=@filemtime($image); } if ($format!='unix') {$date=date($format,$date);} if ($info=='date') return($date); else return(trim($comment)); } // Retrieve IPTC caption from jpg function iptc($image) { $caption=''; $size=@getimagesize($image,$info); if (isset($info["APP13"])) { $iptc=@iptcparse($info["APP13"]); if (is_array($iptc)) { foreach($iptc as $key=>$section) { foreach($section as $name=>$val) { if ($key=='2#120') {$caption.=$val . ' ';} } } } } return $caption; } // Resize image function resize($image,$resizeto) { global $gd2,$imagemagick,$imagemagick_path; $size=@GetImageSize($image); if (max($size[0],$size[1])!=$resizeto) { $date=getexif($image,'unix','date'); if ($size[0]>$size[1]) { $width=$resizeto; $height=ceil($size[1]/($size[0]/$width)); } else { $width=ceil($size[0]/($size[1]/$resizeto)); $height=$resizeto; } if ($imagemagick) { @exec($imagemagick_path . 'convert -resize '.$width.'x'.$height.' '.getcwd().'/'.$image.' '.getcwd().'/'.$image); } else { if ($size[2]==1) {$im=@imagecreatefromgif($image);} if ($size[2]==2) {$im=@imagecreatefromjpeg($image);} if ($size[2]==3) {$im=@imagecreatefrompng($image);} if ($size[2]==1 || $size[2]==2 || $size[2]==3) { if ($gd2) { if ($size[0]>$size[1]) $thumb=imagecreatetruecolor($width,ceil($size[1]/($size[0]/$width))); else $thumb=imagecreatetruecolor(ceil($size[0]/($size[1]/$height)),$height); } else { if ($size[0]>$size[1]) $thumb=imagecreate($width,ceil($size[1]/($size[0]/$width))); else $thumb=imagecreate(ceil($size[0]/($size[1]/$height)),$height); } if ($gd2) imagecopyresampled($thumb,$im,0,0,0,0,imagesx($thumb),imagesy($thumb),imagesx($im),imagesy($im)); else imagecopyresized($thumb,$im,0,0,0,0,imagesx($thumb),imagesy($thumb),imagesx($im),imagesy($im)); if ($size[2]==1) @imagegif($thumb,$image) or die('Resizing failed. Please enable write access to the files in this directory (chmod 0777 directory/ -R)'); if ($size[2]==2) @imagejpeg($thumb,$image,90) or die('Resizing failed. Please enable write access to the files in this directory (chmod 0777 directory/ -R)'); if ($size[2]==3) @imagepng($thumb,$image) or die('Resizing failed. Please enable write access to the files in this directory (chmod 0777 directory/ -R)'); @imagedestroy($im); @imagedestroy($thumb); } } // Attempt to set file-date to the orignal EXIF-date, so EXIF-date info does not get lost @touch($image,$date); } } // Rotate image 90 degrees - slow in PHP but good quality and works in 4.1.0 function rotate($image,$direction) { global $gd2,$title,$imagemagick,$imagemagick_path; $date=getexif($image,'unix','date'); $size=@GetImageSize($image); if ($imagemagick) { if ($size[0]>=$size[1]) {$pointer='>';} else {$pointer='<';} if ($direction=='r') @exec($imagemagick_path . "convert -rotate '90$pointer' ".getcwd().'/'.$image.' '.getcwd().'/'.$image); else @exec($imagemagick_path . "convert -rotate '-90$pointer' ".getcwd().'/'.$image.' '.getcwd().'/'.$image); } else { if ($size[2]==1) { if (imagetypes() & IMG_GIF) { $im=@imagecreatefromgif($image); } else { $title.=' - rotate failed no GIF support'; return; } } if ($size[2]==2) { if (imagetypes() & IMG_JPG) { $im=@imagecreatefromjpeg($image); } else { $title.=' - rotate failed no JPG support'; return; } } if ($size[2]==3) { if (imagetypes() & IMG_PNG) { $im=@imagecreatefrompng($image); } else { $title.=' - rotate failed no PNG support'; return; } } if ($size[2]==1 || $size[2]==2 || $size[2]==3) { if ($gd2) $newimage=imagecreatetruecolor($size[1],$size[0]); else $newimage=imagecreate($size[1],$size[0]); if ($direction=='r') { for ($px=0;$px<$size[0];$px++) { for ($py=0;$py<$size[1];$py++) imagecopy($newimage,$im,$size[1]-$py-1,$px,$px,$py,1,1); } } else { for ($px=0;$px<$size[0];$px++) { for ($py=0;$py<$size[1];$py++) imagecopy($newimage,$im,$py,$size[0]-$px-1,$px,$py,1,1); } } if ($size[2]==1) @imagegif($newimage,$image) or die('Rotate failed. Please enable write access to the files in this directory (chmod 0777 directory/ -R)'); if ($size[2]==2) @imagejpeg($newimage,$image,90) or die('Rotate failed. Please enable write access to the files in this directory (chmod 0777 directory/ -R)'); if ($size[2]==3) @imagepng($newimage,$image) or die('Rotate failed. Please enable write access to the files in this directory (chmod 0777 directory/ -R)'); @imagedestroy($im); @imagedestroy($newimage); } } // Attempt to set file-date to the EXIF-file date, so EXIF date info does not get lost @touch($image,$date); } // Login form function require_login() { global $admin_access,$enable_admin_keyboardshortcut,$home_page,$language_homepage,$language_login,$language_user,$language_passw,$admin_access,$admin_link; echo "$language_login\n"; echo "\n"; echo "\n"; html_css(); echo "
\n"; if ($admin_link!='') {$language_login='Administrator '.$language_login;} echo "

$language_login

 
"; if ($admin_access && $admin_link=='' && $enable_admin_keyboardshortcut && !isset($_REQUEST['showimage'])) { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
 
$language_user:
$language_passw:
 
 
 
"; if ($home_page!='') {echo "";} if ($admin_link!='') {echo "";} echo "
\n"; exit; } // Administrator section & form validation - really compact ;) function configuration() { global $page_color,$text_color,$text_hover_color,$title_color,$border_color,$table_color,$item_border_color,$line_color,$email_color,$menu_line_width,$menu_bar_width,$menu_bordertop_color,$menu_borderbottom_color,$menu_borderleft_color,$menu_borderright_color,$menu_bordertop_hover_color,$menu_borderbottom_hover_color,$menu_borderleft_hover_color,$menu_borderright_hover_color,$menu_text_color,$menu_texthover_color,$menu_background_color,$menu_background_hover_color,$hit_counter_linecolor,$hit_counter_segmentcolor,$hit_counter_textcolor,$rating_blockcolor,$rating_blockcolor_score; global $images_per_page,$columns_per_page,$popup,$image_border,$slideshow,$slideshow_delay,$page_header,$menu_line_width,$menu_bar_width,$language_homepage,$center_title,$center_album,$background_image,$background_position,$background_repeat,$visitor_comments,$meta_copyright_and_author,$meta_keywords,$meta_description,$use_main_config,$popup_browse,$use_album_config,$album_config,$thumbnail_rotation_degrees,$thumbnail_rotation,$mm_watermark,$mm_watermark_position,$mm_watermark_transparancy,$transparent_page,$sort_comments,$show_prev_next_below,$show_name_top,$show_thumb_name_top; global $title,$show_email_link,$show_poweredby_easyphpalbum,$thumb_size,$border_width,$show_bordershadow,$binder_spacing,$clip_corner,$clip_corner_round,$sort_thumbs,$sort_rating,$watermark,$watermark_position,$watermark_transparancy,$content_width,$content_leftmargin,$page_leftmargin,$indeximage_no_thumb,$show_statistics,$thumbnail_countcomments,$comment_email,$show_iptc_caption,$apply_thumbnail_borderpng,$play_multimedia,$download_multimedia,$enable_keyboard_arrows,$mm_thumbnail,$clip_randomly,$transparent_menu,$show_previous_next,$visitor_upload_size,$square_thumbnails; global $show_binder,$show_number,$show_name,$show_details,$show_date,$show_exif_comment,$show_download,$image_txtfile,$hit_counter,$hit_counter_random,$rating,$show_date_format,$config_version,$copyright_position,$menu_background_image,$show_bottommenu,$rating_text,$hit_counter_text,$info_bold,$info_italic,$name_bold,$name_italic,$shop,$shop_email,$shop_choice1,$shop_choice2,$shop_columns,$thumbnail_spacing,$embed_player,$link_player,$visitor_upload,$sound_formats,$mm_photo,$clip_bottomleft,$clip_bottomright,$valign_thumbnail,$show_prev_next_size,$show_prev_next_position; global $image_resize,$image_resizeto,$image_inflate,$image_greyscale,$image_sepia_depth,$image_noise_depth,$copyright,$restrict_access,$restrict_access_configured,$users,$users_configured,$gd2,$home_page,$create_thumbnail_cache,$sort_hits,$sort_hightolow,$imagemagick,$thumbnail_txtfile,$show_dir_up,$thumbnail_opacity,$opacity_level,$imagemagick_path,$ban_ip,$footer,$header,$comment_logip,$thumbnail_borderpng,$movie_formats,$mm_dir,$visitor_files,$upload_email,$visitor_sort,$clip_topleft,$clip_topright,$visitor_comments_dateformat,$visitor_upload_max_files,$show_topmenu; if ($_REQUEST['configuration']==2) { if ($fp=@fopen('configuration.php','wb')) { fwrite($fp,"'); fclose($fp); if (is_readable('configuration.php')) { include('configuration.php'); $users_configured=$users; } $ok=" - saved (version: $config_version)"; // Upload album art if (isset($_FILES['upload_albumart'])) { $imagefilename=str_replace('/','',$_FILES['upload_albumart']['name']); $imagefilename=str_replace('..','',$imagefilename); $extension=strtolower(substr($imagefilename,strrpos($imagefilename,'.')+1,strlen($imagefilename))); if ($extension=='jpg' || $extension=='jpeg' || $extension=='png' || $extension=='gif') { if (!file_exists('./gfx')) {@mkdir('./gfx');} if (@move_uploaded_file($_FILES['upload_albumart']['tmp_name'],str_replace(chr(92),chr(47),getcwd()).'/gfx/'.$imagefilename)) { if (filesize('./gfx/'.$imagefilename)==0) {@unlink('./gfx/'.$imagefilename);} } if ($_FILES['upload_albumart']['error']==UPLOAD_ERR_INI_SIZE) {$ok.=" - (upload failed: filesize too big)";} if ($_FILES['upload_albumart']['error']==UPLOAD_ERR_PARTIAL) {$ok.=" - (upload failed: upload interrupted)";} } } } else { $ok=' - failed (please enable write access)'; } } else { $ok=''; } if (!isset($config_version)) {$config_version=0;} if (!$album_config) { if (file_exists('configuration.php')) {include('configuration.php');} } if (isset($_REQUEST['mm_refresh'])) {create_mm(true);} echo "Configuration\n"; echo "\n"; echo "\n"; html_css(); echo "
\n"; echo "

Configuration $ok

 
"; echo "\n"; if ($popup) {$popup_checked='checked=\"checked\"';} else {$popup_checked='';} if ($popup_browse) {$popup_browse_checked='checked=\"checked\"';} else {$popup_browse_checked='';} if ($enable_keyboard_arrows) {$enable_keyboard_arrows_checked='checked=\"checked\"';} else {$enable_keyboard_arrows_checked='';} if ($image_border) {$image_border_checked='checked=\"checked\"';} else {$image_border_checked='';} if ($slideshow) {$slideshow_checked='checked=\"checked\"';} else {$slideshow_checked='';} if ($center_title) {$center_title_checked='checked=\"checked\"';} else {$center_title_checked='';} if ($center_album) {$center_album_checked='checked=\"checked\"';} else {$center_album_checked='';} if ($page_header) {$page_header_checked='checked=\"checked\"';} else {$page_header_checked='';} if ($transparent_page) {$transparent_page_checked='checked=\"checked\"';} else {$transparent_page_checked='';} if ($transparent_menu) {$transparent_menu_checked='checked=\"checked\"';} else {$transparent_menu_checked='';} if ($show_email_link) {$show_email_link_checked='checked=\"checked\"';} else {$show_email_link_checked='';} if ($show_dir_up) {$show_dir_up_checked='checked=\"checked\"';} else {$show_dir_up_checked='';} if ($show_thumb_name_top) {$show_thumb_name_top_checked='checked=\"checked\"';} else {$show_thumb_name_top_checked='';} if ($show_name_top) {$show_name_top_checked='checked=\"checked\"';} else {$show_name_top_checked='';} if ($show_statistics) {$show_statistics_checked='checked=\"checked\"';} else {$show_statistics_checked='';} if ($use_main_config) {$use_main_config_checked='checked=\"checked\"';} else {$use_main_config_checked='';} if ($show_poweredby_easyphpalbum) {$show_poweredby_easyphpalbum_checked='checked=\"checked\"';} else {$show_poweredby_easyphpalbum_checked='';} if ($show_bordershadow) {$show_bordershadow_checked='checked=\"checked\"';} else {$show_bordershadow_checked='';} if ($clip_corner_round) {$clip_corner_round_checked='checked=\"checked\"';} else {$clip_corner_round_checked='';} if ($clip_topleft) {$clip_topleft_checked='checked=\"checked\"';} else {$clip_topleft_checked='';} if ($clip_bottomleft) {$clip_bottomleft_checked='checked=\"checked\"';} else {$clip_bottomleft_checked='';} if ($clip_topright) {$clip_topright_checked='checked=\"checked\"';} else {$clip_topright_checked='';} if ($clip_bottomright) {$clip_bottomright_checked='checked=\"checked\"';} else {$clip_bottomright_checked='';} if ($clip_randomly) {$clip_randomly_checked='checked=\"checked\"';} else {$clip_randomly_checked='';} if ($square_thumbnails) {$square_thumbnails_checked='checked=\"checked\"';} else {$square_thumbnails_checked='';} if ($show_binder) {$show_binder_checked='checked=\"checked\"';} else {$show_binder_checked='';} if ($show_number) {$show_number_checked='checked=\"checked\"';} else {$show_number_checked='';} if ($sort_thumbs) {$sort_thumbs_checked='checked=\"checked\"';} else {$sort_thumbs_checked='';} if ($show_previous_next) {$show_previous_next_checked='checked=\"checked\"';} else {$show_previous_next_checked='';} if ($show_prev_next_below) {$show_prev_next_below_checked='checked=\"checked\"';} else {$show_prev_next_below_checked='';} if ($sort_comments) {$sort_comments_checked='checked=\"checked\"';} else {$sort_comments_checked='';} if ($visitor_sort) {$visitor_sort_checked='checked=\"checked\"';} else {$visitor_sort_checked='';} if ($sort_rating) {$sort_rating_checked='checked=\"checked\"';} else {$sort_rating_checked='';} if ($thumbnail_countcomments) {$thumbnail_countcomments_checked='checked=\"checked\"';} else {$thumbnail_countcomments_checked='';} if ($visitor_comments) {$visitor_comments_checked='checked=\"checked\"';} else {$visitor_comments_checked='';} if ($thumbnail_rotation) {$thumbnail_rotation_checked='checked=\"checked\"';} else {$thumbnail_rotation_checked='';} if ($sort_hits) {$sort_hits_checked='checked=\"checked\"';} else {$sort_hits_checked='';} if ($sort_hightolow) {$sort_hightolow_checked='checked=\"checked\"';} else {$sort_hightolow_checked='';} if ($show_name) {$show_name_checked='checked=\"checked\"';} else {$show_name_checked='';} if ($name_bold) {$name_bold_checked='checked=\"checked\"';} else {$name_bold_checked='';} if ($name_italic) {$name_italic_checked='checked=\"checked\"';} else {$name_italic_checked='';} if ($info_bold) {$info_bold_checked='checked=\"checked\"';} else {$info_bold_checked='';} if ($info_italic) {$info_italic_checked='checked=\"checked\"';} else {$info_italic_checked='';} if ($show_details) {$show_details_checked='checked=\"checked\"';} else {$show_details_checked='';} if ($show_date) { $show_date_no=''; if ($show_date_format=='d-m-Y H:i') {$show_date_1='selected';} else {$show_date_1='';} if ($show_date_format=='m-d-Y H:i') {$show_date_2='selected';} else {$show_date_2='';} if ($show_date_format=='d-m-Y') {$show_date_3='selected';} else {$show_date_3='';} if ($show_date_format=='m-d-Y') {$show_date_4='selected';} else {$show_date_4='';} } else { $show_date_no='selected'; $show_date_1=''; $show_date_2=''; $show_date_3=''; $show_date_4=''; } $show_date_no=''; if ($visitor_comments_dateformat=='d/m/Y H:i') {$visitor_comments_dateformat_1='selected';} else {$visitor_comments_dateformat_1='';} if ($visitor_comments_dateformat=='m/d/Y H:i') {$visitor_comments_dateformat_2='selected';} else {$visitor_comments_dateformat_2='';} if ($visitor_comments_dateformat=='d/m/Y') {$visitor_comments_dateformat_3='selected';} else {$visitor_comments_dateformat_3='';} if ($visitor_comments_dateformat=='m/d/Y') {$visitor_comments_dateformat_4='selected';} else {$visitor_comments_dateformat_4='';} if ($valign_thumbnail=='top') {$valign_thumbnail_1='selected';} else {$valign_thumbnail_1='';} if ($valign_thumbnail=='middle') {$valign_thumbnail_2='selected';} else {$valign_thumbnail_2='';} if ($valign_thumbnail=='bottom') {$valign_thumbnail_3='selected';} else {$valign_thumbnail_3='';} if ($show_prev_next_position=='top') {$show_prev_next_position_1='selected';} else {$show_prev_next_position_1='';} if ($show_prev_next_position=='middle') {$show_prev_next_position_2='selected';} else {$show_prev_next_position_2='';} if ($show_prev_next_position=='bottom') {$show_prev_next_position_3='selected';} else {$show_prev_next_position_3='';} if ($background_repeat) { $show_date_no=''; if ($background_repeat=='no-repeat') {$background_repeat_norepeat='selected';} else {$background_repeat_norepeat='';} if ($background_repeat=='repeat-x') {$background_repeat_x='selected';} else {$background_repeat_x='';} if ($background_repeat=='repeat-y') {$background_repeat_y='selected';} else {$background_repeat_y='';} if ($background_repeat=='repeat') {$background_repeat_repeat='selected';} else {$background_repeat_repeat='';} } else { $background_repeat_norepeat='selected'; $background_repeat_x=''; $background_repeat_y=''; $background_repeat_repeat=''; } if ($show_exif_comment) {$show_exif_comment_checked='checked=\"checked\"';} else {$show_exif_comment_checked='';} if ($show_iptc_caption) {$show_iptc_caption_checked='checked=\"checked\"';} else {$show_iptc_caption_checked='';} if ($comment_logip) {$comment_logip_checked='checked=\"checked\"';} else {$comment_logip_checked='';} if ($show_download) {$show_download_checked='checked=\"checked\"';} else {$show_download_checked='';} if ($show_bottommenu) {$show_bottommenu_checked='checked=\"checked\"';} else {$show_bottommenu_checked='';} if ($show_topmenu) {$show_topmenu_checked='checked=\"checked\"';} else {$show_topmenu_checked='';} if ($image_txtfile) {$image_txtfile_checked='checked=\"checked\"';} else {$image_txtfile_checked='';} if ($thumbnail_txtfile) {$thumbnail_txtfile_checked='checked=\"checked\"';} else {$thumbnail_txtfile_checked='';} if ($indeximage_no_thumb) {$indeximage_no_thumb_checked='checked=\"checked\"';} else {$indeximage_no_thumb_checked='';} if ($apply_thumbnail_borderpng) {$apply_thumbnail_borderpng_checked='checked=\"checked\"';} else {$apply_thumbnail_borderpng_checked='';} if ($hit_counter) {$hit_counter_checked='checked=\"checked\"';} else {$hit_counter_checked='';} if ($hit_counter_random) {$hit_counter_random_checked='checked=\"checked\"';} else {$hit_counter_random_checked='';} if ($hit_counter_text) {$hit_counter_text_checked='checked=\"checked\"';} else {$hit_counter_text_checked='';} if ($rating) {$rating_checked='checked=\"checked\"';} else {$rating_checked='';} if ($rating_text) {$rating_text_checked='checked=\"checked\"';} else {$rating_text_checked='';} if ($shop) {$shop_checked='checked=\"checked\"';} else {$shop_checked='';} if ($visitor_upload) {$visitor_upload_checked='checked=\"checked\"';} else {$visitor_upload_checked='';} if ($image_resize) {$image_resize_checked='checked=\"checked\"';} else {$image_resize_checked='';} if ($play_multimedia) {$play_multimedia_checked='checked=\"checked\"';} else {$play_multimedia_checked='';} if ($download_multimedia) {$download_multimedia_checked='checked=\"checked\"';} else {$download_multimedia_checked='';} if ($embed_player) {$embed_player_checked='checked=\"checked\"';} else {$embed_player_checked='';} if ($mm_thumbnail) {$mm_thumbnail_checked='checked=\"checked\"';} else {$mm_thumbnail_checked='';} if ($mm_photo) {$mm_photo_checked='checked=\"checked\"';} else {$mm_photo_checked='';} if ($link_player) {$link_player_checked='checked=\"checked\"';} else {$link_player_checked='';} if ($image_inflate) {$image_inflate_checked='checked=\"checked\"';} else {$image_inflate_checked='';} if ($image_greyscale) {$image_greyscale_checked='checked=\"checked\"';} else {$image_greyscale_checked='';} if ($thumbnail_opacity) {$thumbnail_opacity_checked='checked=\"checked\"';} else {$thumbnail_opacity_checked='';} if ($_REQUEST['configuration']!=1) if ($restrict_access) {$restrict_access_checked='checked=\"checked\"';} else {$restrict_access_checked='';} else if ($restrict_access_configured) {$restrict_access_checked='checked=\"checked\"';} else {$restrict_access_checked='';} if ($gd2) {$gd2_checked='checked=\"checked\"';} else {$gd2_checked='';} if ($create_thumbnail_cache) {$create_thumbnail_cache_checked='checked=\"checked\"';} else {$create_thumbnail_cache_checked='';} if ($imagemagick) {$imagemagick_checked='checked=\"checked\"';} else {$imagemagick_checked='';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $gfx_images=' '; if (is_dir('gfx')) { $album_art=get_images('./gfx',false,false); if (count($album_art)!=0) { $gfx_images=""; } } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
 
Use another configuration file (overrides all settings below!):
Use configuration from main gallery page:
Use configuration from album: enter the album (directory) name
 
Upload Album Art (borders, watermarks, etc.):
Upload image (jpg,png or gif):$gfx_images
 
EasyPhpAlbum layout:
Album title: (leave empty to display directory name)
Images per page:Images next to each other:Use popup window:
Show title:Show EasyPhpAlbum logo:Show email link:
Slideshow:Slideshow delay (sec*1000):Border around image:
Show bottom menu:Show 'dir up' link:Show album statistics:
Enable popup browsing:Enable arrowkeys:Enable visitor sort:
Show top menu:
 
Thumbnail layout:
Thumbnail size px:Thumbnail border width px:Thumbnail shadow:
Show binder:Binder spacing px:Show thumbnail number:
Show photo textfile:Ignore 'index' image:Thumbnail spacing px:
Sort thumbs by (exif) date:Sort thumbs by rating score:Sort thumbs by hits:
Sort by comments:Sort high/new to low/old:Thumbnail alignment
Clip topleft corner:Clip topright corner:Clip bottomleft corner:
Clip bottomright corner:Clip thumbnail corner %:Clip corners rounded:
Clip corners randomly:Show name above thumb:Square thumbnails:
Thumbnail opacity:Opacity level (0-100):Count comments:
Border image:(path of PNG image, example: gfx/border-leaves.png)
Rotate thumbnail:Degrees: (0=random, -45 or 45 degrees)
 
Menu layout:
Line width horizontal px:Line width vertical px:
Add new menu item with name: and with URL:
Menu background image URL (leave empty to disable):
Transparent background:
 
Page layout:
Background image URL (leave empty to disable):
Background image position: (based on %width and %height of page)
Repeat background:
Center title on page:
Center album on page:
Show previous/next thumbnail:
Show previous/next thumbnail below photo:
Previous/next thumbnail width in px:
Previous/next thumbnail alignment:
Transparent background:
Page left margin: (% or px, example: 0% or 20px)
Content width: (% or px, example: 85% or 800px)
Content left margin: (% or px, example: 5% or 10px)
Header image URL (leave empty to disable):
Footer image URL (leave empty to disable):
 
Photo information:
Show name:Show dimensions & size:Show EXIF/file date:
Show EXIF comment:Show download link:Show photo textfile:
Enable hitcounter:Hitcounter random display:Enable rating system:
Text based hitcounter:Text based rating:Info in italic:
Filename in bold:Filename in italic:Info in bold:
Allow visitor comments:Email comment to: (leave empty to disable)
Save IP with comment:Comment time format:
Show IPTC caption:Show name above photo:
 
Photo manipulation (on-the-fly, the original photos are not modified):
Resize photo:Resize to (0=autoresize) px:Allow enlarge image:
Convert to greyscale:Greyscale sephia (0=disable):Greyscale noise (0=disable):
Copyright notice:
Copyright position: (based on %width and %height of the photo, 50% 50% = centered)
Watermark image:(path of PNG image, example: gfx/watermark.png)
Watermark image position: (based on %width and %height of the photo, 100% 100% = bottom right)
Watermark transparancy: (0-100: 0=invisible)
Use border image: (applies thumbnail border image to photo)
 
Shop system:
Enable shop system:Images per page:
Shop choice 1: (comma separated, leave empty to disable)
Shop choice 2: (comma separated, leave empty to disable)
Shop email: (address for order confirmation)
 
Multimedia files (MP3, MPEG, AVI, etc.):
Enable multimedia: (include an image and multimediafile with the same name)
Embed player:Link to player:Add download link:
Movie formats: (extensions of supported formats)
Sound formats: (extensions of supported formats)
Watermark image: (PNG image, example: gfx/multimedia_watermark.png)
Watermark image position: (based on %width and %height of the image, 100% 100% = bottom right)
Watermark transparancy: (0-100: 0=invisible)
Icon directory: example: gfx/ (add mp3.jpg for MP3 files or avi.png for AVI files etc.)
Apply thumbnail settings: (applies thumbnail configuration to icon)
Refresh icon thumbnails: (recreates all multimedia thumbnails)
Apply photo settings: (applies photo manipulation to icon)
 
Album colors:
Page color:Text color:Text hover color:
Title color:Photo border color:Table color (=background):
Table border color:Header & footer line color:Email link color:
Hit counter linecolor:Hit counter color:Hit counter textcolor:
Rating color inactive:Rating color score:   
 
Menu colors:
Bordertop color:Borderbottom color:Borderleft color:
Borderright color:Bordertop hover color:Borderbottom hover color:
Borderleft hover color:Borderright hover color:Text color:
Text hover color:Background color:Background hover color:
 
Color chart:
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
ffffffffffccffff99ffff66ffff33ffff00ffccffffccccffcc99ffcc66ffcc33ffcc00
ff99ffff99ccff9999ff9966ff9933ff9900ff66ffff66ccff6699ff6666ff6633ff6600
ff33ffff33ccff3399ff3366ff3333ff3300ff00ffff00ccff0099ff0066ff0033ff0000
ccffffccffccccff99ccff66ccff33ccff00ccccffcccccccccc99cccc66cccc33cccc00
cc99ffcc99cccc9999cc9966cc9933cc9900cc66ffcc66cccc6699cc6666cc6633cc6600
cc33ffcc33cccc3399cc3366cc3333cc3300cc00ffcc00cccc0099cc0066cc0033cc0000
99ffff99ffcc99ff9999ff6699ff3399ff0099ccff99cccc99cc9999cc6699cc3399cc00
9999ff9999cc9999999999669999339999009966ff9966cc996699996666996633996600
9933ff9933cc9933999933669933339933009900ff9900cc990099990066990033990000
66ffff66ffcc66ff9966ff6666ff3366ff0066ccff66cccc66cc9966cc6666cc3366cc00
6699ff6699cc6699996699666699336699006666ff6666cc666699666666666633666600
6633ff6633cc6633996633666633336633006600ff6600cc660099660066660033660000
33ffff33ffcc33ff9933ff6633ff3333ff0033ccff33cccc33cc9933cc6633cc3333cc00
3399ff3399cc3399993399663399333399003366ff3366cc336699336666336633336600
3333ff3333cc3333993333663333333333003300ff3300cc330099330066330033330000
00ffff00ffcc00ff9900ff6600ff3300ff0000ccff00cccc00cc9900cc6600cc3300cc00
0099ff0099cc0099990099660099330099000066ff0066cc006699006666006633006600
0033ff0033cc0033990033660033330033000000ff0000cc000099000066000033000000
 
User Login*:
Enable login system:
Valid Users: name,password,name,password,...
 
*) To prevent display of a protected photo in the gallery index, add an 'index.jpg' photo or 'index.png' icon to the album.
 
Visitor File Upload:
Enable visitor upload:
Maximum filesize in kB:
Maximum files per upload: (1 minimum - 6 maximum)
Valid files: (file-extensions comma separated)
Email address: (notification address for new uploads)
 
Server configuration:
Server has GD2+:Create thumbnail cache:Use ImageMagick (resize/rotate):
Path to ImageMagick: (optional, example: /usr/bin/)
Ban IP's (comma separated): (ban from hitcounter, rating, comment and upload)
 
Meta information for Search Engines:
Album description:
Keywords (comma separated):
Author and copyright:
 
 
 
"; echo "
drug bags drug bags- dollar buy abortion pills buy abortion pills- been michelle meehan drug michelle meehan drug- tire honey vitamins honey vitamins- during ethics and methylphenidate ethics and methylphenidate- instrument inner ear health inner ear health- does principal dental homepage principal dental homepage- surprise smile choice dental smile choice dental- wave soehnle diet scale soehnle diet scale- phrase mens eyewear prescription mens eyewear prescription- never inovative vet diet inovative vet diet- power cpt diabetic nutrition cpt diabetic nutrition- before marijuana and constipation marijuana and constipation- fish hyper baric treatment hyper baric treatment- break mexican antibiotic safe mexican antibiotic safe- brought drug adion drug adion- glass kosher jewish diet kosher jewish diet- heat emla no prescription emla no prescription- heat interactive health websites interactive health websites- let apen dental portsmouth apen dental portsmouth- travel health indemnity plans health indemnity plans- roll hypoxemia nursing care hypoxemia nursing care- sing brooks health development brooks health development- string pill pressing machine pill pressing machine- rope pill identification l484 pill identification l484- in diet point calculation diet point calculation- since female chihuahua health female chihuahua health- mile dental hygienist org dental hygienist org- yard oxycontin graphs oxycontin graphs- cry heathwood nursing home heathwood nursing home- an health marinade ginger health marinade ginger- many allegra drug interactions allegra drug interactions- gentle british diabetic association british diabetic association- sign salmonella symptoms treatment salmonella symptoms treatment- receive home treatment gout home treatment gout- middle dental assessment forms dental assessment forms- shall marijuana grow kit marijuana grow kit- card crohns remedies crohns remedies- wall coq10 statins coq10 statins- answer natural diabetic aids natural diabetic aids- water nuvet vitamins nuvet vitamins- cow excessive sweat remedy excessive sweat remedy- dark magic herbal cigarette magic herbal cigarette- box esctacy the drug esctacy the drug- require healthfirst health plans healthfirst health plans- fall sedation dentist austin sedation dentist austin- see jokes about dentists jokes about dentists- column muscle jerk homeopathy muscle jerk homeopathy- solution inhalants solvents inhalants solvents- brother dog diet pills dog diet pills- kind dnr nursing newsletter dnr nursing newsletter- good kroger 4 generics kroger 4 generics- buy reuters vioxx news reuters vioxx news- rose hometown nursing center hometown nursing center- sheet bangor rabies clinic bangor rabies clinic- notice optimum anabolics reviews optimum anabolics reviews- fair orn nursing agency orn nursing agency- remember interstate nursing agency interstate nursing agency- gentle altace coughing altace coughing- shall effects alcohol viagra effects alcohol viagra- wheel albuquerqu dentists albuquerqu dentists- put salmonella cure treatment salmonella cure treatment- ran addison s disease levoxyl addison s disease levoxyl- story mental health technician mental health technician- next lime and health lime and health- position kitten health symptoms kitten health symptoms- horse pill watson 3250 pill watson 3250- care dizziness with zoloft dizziness with zoloft- both mt vernon clinic mt vernon clinic- radio dose valtrex dose valtrex- fresh hemlock treatment woolly hemlock treatment woolly- wonder dental financing implants dental financing implants- happy lactose tolerant diet lactose tolerant diet- guess allowed drugs humana allowed drugs humana- team hair vitamins reviews hair vitamins reviews- natural canine dental hygienists canine dental hygienists- my generic asthma drugs generic asthma drugs- behind drug smuggling incolombia drug smuggling incolombia- match prescription toothpaste cheap prescription toothpaste cheap- shop gastro diet gastro diet- book ascend health sc ascend health sc- every kaiser health care kaiser health care- gas lean diet lean diet- meet nursing orthopaedics nursing orthopaedics- lot dirty diet jokes dirty diet jokes- hot breast implants technique breast implants technique- thought prescription safety frames prescription safety frames- major etna health insurange etna health insurange- horse female topical stimulant female topical stimulant- take nursing scholarships bursaries nursing scholarships bursaries- measure nsi nursing solutions nsi nursing solutions- walk alumbaugh blake clinic alumbaugh blake clinic- symbol psychiatric nursing conferences psychiatric nursing conferences- post ass candy adderall ass candy adderall- chart gemfibrozil prescribing information gemfibrozil prescribing information- simple dentist oakland ca dentist oakland ca- here dental attachments dental attachments- card morphine glucuronide morphine glucuronide- want nebulized liquid morphine nebulized liquid morphine- iron pill for anger pill for anger- while psilocybin shelf life psilocybin shelf life- surprise marijuana cruises marijuana cruises- mother iowa city dentists iowa city dentists- contain e p57 pills e p57 pills- sun butenko lung treatment butenko lung treatment- straight arkansas health information arkansas health information- carry risperdal 25mg risperdal 25mg- also dr ian diet dr ian diet- pull darvaset drug tests darvaset drug tests- children hawaiian medical marijuana hawaiian medical marijuana- ear pravachol dosing pravachol dosing- cotton health clubs gymnasiums health clubs gymnasiums- horse ambien for anxiety ambien for anxiety- through accutane and diet accutane and diet- remember albuterol urticaria albuterol urticaria- salt burn nursing assessment burn nursing assessment- far appletree dental chicago appletree dental chicago- bone buy purging pills buy purging pills- a headlice treatment options headlice treatment options- decimal armenia health insurance armenia health insurance- pull ephedrine buy ephedrine buy- bring carolina spine clinic carolina spine clinic- determine rxlist top rxlist top- necessary bypass vs drugs bypass vs drugs- strange carotene free diet carotene free diet- teach allegra network llc allegra network llc- done diet spa diet spa- rub corn allergy diet corn allergy diet- doctor anyone taking xalatan anyone taking xalatan- voice bi polar mental health bi polar mental health- value loc colesterol diet loc colesterol diet- might ornish diet plan ornish diet plan- beauty ruster root ecstasy ruster root ecstasy- usual huntington s disease treatment huntington s disease treatment- felt eggs diet eggs diet- sugar pugs health problems pugs health problems- told leaches drugs leaches drugs- sense oxycodone tablets oxycodone tablets- blue dog prozac dog prozac- apple nec health nec health- finger leeds dental clinic leeds dental clinic- yard cost drug rehabilitation cost drug rehabilitation- shine iud nonhormonal pill iud nonhormonal pill- could cornerstone clinic ltd cornerstone clinic ltd- plane mental health acronyms mental health acronyms- second bradenton tmj treatment bradenton tmj treatment- should apple pach diet apple pach diet- strange overdosing on ultram overdosing on ultram- live dentist saginaw michigan dentist saginaw michigan- save psycho sematic illness psycho sematic illness- soft dhea fertility treatments dhea fertility treatments- pound generic legal disclaimers generic legal disclaimers- office drug scheduling drug scheduling- do diabetic sox diabetic sox- bird large drawing tablets large drawing tablets- some drug blocker drug blocker- swim dental gags dental gags- slow bangkok dental suppliers bangkok dental suppliers- field kitten treatment flu kitten treatment flu- plant jago pharma jago pharma- story apple patch diet apple patch diet- once adderall adult adderall adult- melody nursing convalescent home nursing convalescent home- sense kennel health management kennel health management- ear accountable health plans accountable health plans- here dentist scheffel beaverton dentist scheffel beaverton- great health match bc health match bc- guess methionine vitamin k methionine vitamin k- proper dental hygiene month dental hygiene month- act cti leg braces cti leg braces- syllable jason williams dentist jason williams dentist- door dental coding dental coding- corn garner s health food garner s health food- common atena health coverage atena health coverage- chord cooper s clinic cooper s clinic- the diabetes mellitus treatment diabetes mellitus treatment- case clinic equalizer clinic equalizer- age new ibs drug new ibs drug- dog leukemia and treatments leukemia and treatments- bar anabolic world tour anabolic world tour- soft dental digitalization dental digitalization- sun jackie breat implants jackie breat implants- material amoxil antibiotics amoxil antibiotics- bell psychodynamic treatment psychodynamic treatment- receive carbox treatments carbox treatments- grand now vitamin c now vitamin c- afraid adalat no prescription adalat no prescription- operate ot treatment activities ot treatment activities- west betahistine and diet betahistine and diet- town celexa no prescription celexa no prescription- street blue cross health blue cross health- street scripts clinic scripts clinic- people brewer pregnancy diet brewer pregnancy diet- exercise drug valet drug valet- chief drugs thin hair drugs thin hair- space school nursing guidelines school nursing guidelines- least joe walsh drugs joe walsh drugs- press erection implants erection implants- hand breckenridge nursing home breckenridge nursing home- every dental hygiene health dental hygiene health- basic dental anesthetics dental anesthetics- sent cancer free prescriptions cancer free prescriptions- again dr truth vitamins dr truth vitamins- bring athletes painkillers athletes painkillers- hole ks nursing schools ks nursing schools- inch krestin tablets krestin tablets- pitch rife clinic rife clinic- nine aladdi pill id aladdi pill id- soldier garland health garland health- rose pond treatment chemicals pond treatment chemicals- position soccer camps clinics soccer camps clinics- both organic effervescent vitamins organic effervescent vitamins- fruit men s health workout men s health workout- insect effexor pharming effexor pharming- noun diet nh diet nh- garden naltrexone drug naltrexone drug- poem garlic treatment fleas garlic treatment fleas- head pills cot 116 pills cot 116- gray bartells drugs bartells drugs- them diovan hct tabs diovan hct tabs- common evista warnings evista warnings- vary anemia causes treatments anemia causes treatments- root diet questionaire diet questionaire- party androgenetic alopecia treatment androgenetic alopecia treatment- but adkins diet unhealthy adkins diet unhealthy- even coumadin and fatigue coumadin and fatigue- be health dentistry cosmetic health dentistry cosmetic- favor calusa veterinary clinic calusa veterinary clinic- fear priaprism treatment priaprism treatment- tone adderall online consultation adderall online consultation- final enjoi party pills enjoi party pills- west osseous surgery dental osseous surgery dental- ran pivital health solutions pivital health solutions- corn behavioral health associates behavioral health associates- thus cumming veterinarian clinic cumming veterinarian clinic- stand marijuana chest pain marijuana chest pain- beat jim burke pharma jim burke pharma- search hunterdon behavioral health hunterdon behavioral health- morning laceration treatment laceration treatment- phrase purtain pride vitamin purtain pride vitamin- gentle homeopathic remedies shingles homeopathic remedies shingles- design lexipro and prozac lexipro and prozac- soft marijuana kills sperm marijuana kills sperm- bit michigan vein treatment michigan vein treatment- chance buckscounty health dept buckscounty health dept- dog malaysia dentists malaysia dentists- feel health imaging tallahassee health imaging tallahassee- finger generic oxy 20 generic oxy 20- duck natural remedy coughing natural remedy coughing- natural purchase marijuana purchase marijuana- guess health journals diabetes health journals diabetes- temperature parabens and health parabens and health- operate carb addict diet carb addict diet- check multi vibrational health multi vibrational health- dress allergic reactions penicillin allergic reactions penicillin- fit health gazett health gazett- high deleware dental association deleware dental association- cat orthotricycline pill orthotricycline pill- also sentara health system sentara health system- key mrsa sulfur treatment mrsa sulfur treatment- little marijuana body jewelery marijuana body jewelery- wave muskegon breast implants muskegon breast implants- branch diabetic popcorn diabetic popcorn- tie cna nursing insurance cna nursing insurance- position fort fairfield health fort fairfield health- word papillion health problems papillion health problems- instrument dental hearing protector dental hearing protector- floor psychological treatment impotence psychological treatment impotence- plural mercury mylan mercury mylan- operate singulair montelukast singulair montelukast- loud palm drugs palm drugs- determine absolute dental sparks absolute dental sparks- wait coupon science diet coupon science diet- whose natural galbladder remedies natural galbladder remedies- remember homeopathic remedies thuja homeopathic remedies thuja- look coke and pills coke and pills- rain everclear fasting diet everclear fasting diet- school generic oxycoton generic oxycoton- slave diabetic doggie mom diabetic doggie mom- divide risperdal induced parkinsonism risperdal induced parkinsonism- pass drug use addiction drug use addiction- snow lamar lyons drugs lamar lyons drugs- song marijuana gout marijuana gout- home hair growth pills hair growth pills- create prescription frequency prescription frequency- want health partners andover health partners andover- but dangers herbal tea dangers herbal tea- mountain natural dermititis treatment natural dermititis treatment- meat diabetic health diabetic health- children digitalis prescription prices digitalis prescription prices- since barton health barton health- up ingo health medicine ingo health medicine- wish generic outside noise generic outside noise- dear diabetic cooking classes diabetic cooking classes- bed nursing shift assessment nursing shift assessment- usual santa barbara clinics santa barbara clinics- usual dental case galleries dental case galleries- house nursing jokes nursing jokes- prove braces receding gums braces receding gums- art ba nursing programs ba nursing programs- look mendota health mendota health- held blacksmithing illness blacksmithing illness- write lifeforce and health lifeforce and health- leave centro dental centro dental- mine rivas remedies rivas remedies- root evangelical protestant health evangelical protestant health- shore sda health studies sda health studies- for diet mello yello diet mello yello- inch laser dentist canda laser dentist canda- symbol nursing jobs tx nursing jobs tx- bat denatl health presentation denatl health presentation- engine athletes feet treatment athletes feet treatment- among livonia family dentist livonia family dentist- gas homeopathy spain english homeopathy spain english- crowd delusions treatments delusions treatments- poor salvage treatment facility salvage treatment facility- separate indiana dental code indiana dental code- surface dr atkinson diet dr atkinson diet- type excelisor nursing program excelisor nursing program- tone nature wastewater treatment nature wastewater treatment- gold nursing board dc nursing board dc- wild brown spots treatments brown spots treatments- cost bronson vitamins promo bronson vitamins promo- girl feline uti antibiotic feline uti antibiotic- duck muskegon sleep dentist muskegon sleep dentist- contain delta dental atlantic delta dental atlantic- poem abortion pills india abortion pills india- wild elmbrook vet clinic elmbrook vet clinic- claim pill marked 123 pill marked 123- dry loestrin 21 loestrin 21- produce lo ovral progestine lo ovral progestine- hunt seizures and effexor seizures and effexor- ease prilosec codeine prilosec codeine- cat rabbits diet rabbits diet- began nutrient and diet nutrient and diet- feel bedwetting prescriptions bedwetting prescriptions- wear metabolize digestion pill metabolize digestion pill- best gorgia clinic gorgia clinic- practice new insulin drug new insulin drug- shoe nursing your lover nursing your lover- down buspar taper buspar taper- arm dexamethasone or prednisone dexamethasone or prednisone- blood indoco remedies ltd indoco remedies ltd- equate dental brigdes dental brigdes- suggest iron pernatal vitamins iron pernatal vitamins- root hormonal implants consequences hormonal implants consequences- eye bio medic supplements bio medic supplements- circle asthma clinics michigan asthma clinics michigan- prove health ministry atlanta health ministry atlanta- plane oxycontin 160 mg oxycontin 160 mg- quiet embryo clinic embryo clinic- fear drugs 1980 1989 drugs 1980 1989- count consistent carb diet consistent carb diet- whole aspirus health wisconsin aspirus health wisconsin- ease dentist in horseheads dentist in horseheads- sing quotations on nursing quotations on nursing- vowel canadian diabetic living canadian diabetic living- crease engine treatment television engine treatment television- sky nursing 1907 nursing 1907- map consciences of drugs consciences of drugs- hat kapaa animal clinic kapaa animal clinic- summer remedies in sales remedies in sales- also csc drug strategy csc drug strategy- whether dandruf treatment dandruf treatment- father birth contol pills birth contol pills- art dentist and morristown dentist and morristown- prepare diabetic sick day diabetic sick day- caught new dental patients new dental patients- chick enlarged liver treatment enlarged liver treatment- door carbon nitrite carbon nitrite- past argentina drug cartels argentina drug cartels- never maine animal clinic maine animal clinic- pound parent coping pills parent coping pills- touch k 9 prescription k 9 prescription- written lansing dental lab lansing dental lab- ocean learn fad diets learn fad diets- process arthritis treatment uk arthritis treatment uk- roll benzodiazepam and amphetamine benzodiazepam and amphetamine- success celebrex offlabel celebrex offlabel- ring drugs in sointula drugs in sointula- substance liquid baby vitamins liquid baby vitamins- has homeopathics remedies homeopathics remedies- stay dyer treatment center dyer treatment center- fear methodone vs hydrocodone methodone vs hydrocodone- good celebrity drug addicts celebrity drug addicts- compare little clinic kroger little clinic kroger- stretch diet snacks diet snacks- road sleep pills sleep pills- wonder health food rockland health food rockland- either hulen vision clinic hulen vision clinic- lie apo perscription pills apo perscription pills- letter loestrin chromium loestrin chromium- ring lake chelan clinic lake chelan clinic- born folk medicine remedies folk medicine remedies- cry flea allergy treatment flea allergy treatment- scale essence health insurance essence health insurance- new pitures of marijuana pitures of marijuana- weather slim quick diet slim quick diet- under buprenorphine drug test buprenorphine drug test- read beta blocker atenolol beta blocker atenolol- rest belize marijuana laws belize marijuana laws- to legal hyrdrocodone prescriptions legal hyrdrocodone prescriptions- clothe drugs cocaine ice drugs cocaine ice- call breast implant doctors breast implant doctors- card le vet pharma le vet pharma- necessary nursing license washington nursing license washington- energy mariana potency mariana potency- level encyclopedia drugs encyclopedia drugs- card canine diarhea treatment canine diarhea treatment- war seaweed pills seaweed pills- contain kilani clinic kilani clinic- favor origin of adderall origin of adderall- instrument dental dam supplier dental dam supplier- wrote rhinehart dental rhinehart dental- mix crista nursing center crista nursing center- vary
\n"; exit; } // CSS code function html_css() { global $text_hover_color,$border_color,$valign_thumbnail; global $menu_borderleft_color,$menu_borderright_color,$menu_borderleft_hover_color,$menu_borderright_hover_color; global $image_border,$page_header,$admin_link,$background_repeat,$background_position,$menu_background_image; if ($admin_link!='') { $page_color='#E5E5E5'; $title_color='#0A7FDC'; $text_color='#000000'; $table_color='#D2D2D2'; $item_border_color='#000000'; $line_color='#000000'; $center_title=false; $center_album=false; $menu_background_hover_color='#D2D2D2'; $menu_background_color='#E5E5E5'; $menu_text_color='#000000'; $menu_texthover_color='#000000'; $menu_line_width=1; $menu_bar_width=0; $menu_bordertop_color='#000000'; $menu_borderbottom_color='#000000'; $menu_borderleft_color='#000000'; $menu_borderright_color='#000000'; $menu_bordertop_hover_color='#000000'; $menu_borderbottom_hover_color='#000000'; $menu_background_image=''; $background_image='http://www.marfoto.com.pt/escolha_fotos/fundo.jpg'; $content_width='85%'; $content_leftmargin='10px'; $page_leftmargin='20px'; $transparent_page=false; $transparent_menu=false; } else { global $page_color,$title_color,$text_color,$menu_text_color,$table_color,$item_border_color,$line_color,$center_title,$menu_background_hover_color,$menu_line_width,$menu_bar_width,$menu_bordertop_color,$menu_borderbottom_color,$transparent_menu; global $menu_background_color,$menu_texthover_color,$menu_bordertop_hover_color,$menu_borderbottom_hover_color,$center_album,$background_image,$menu_background_image,$content_width,$content_leftmargin,$page_leftmargin,$transparent_page; } echo "\n"; return; } ?>