Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************************************* QUICK START - ONE ALBUM Upload your photos and this index.php script to a directory on your webserver - thats all!! ******************************************************************************************* MULTIPLE ALBUMS & EASY CONFIGURATION Enable admin access, set a password and save this index.php file (edit line 74 and 75). Create a write-enabled directory for your albums on your webserver and upload this script. Enter the URL in your browser: http://www.yoursite.com/yourphotodir/index.php and press the 'Tab' key on your keyboard to get to the administrator login screen and create your album(s). Manual access: add ?admin=1 to the url: www.abc.com/photo/index.php?admin=1 *************************************************************************************************** INTEGRATION OF EASYPHPALBUM ON YOUR WEBSITE CMS : Add a menu item called 'wrapper'. Point the link to index.php in the photoalbum directory HTML: Add an 'iframe' to your page that points to this index.php script. Example: ADDING AN ALBUM INDEX PHOTO/ICON Add an 'index.jpg', 'index.gif' or 'index.png' to your album for the main album index page MULTIMEDIA SUPPORT Enable multimedia support, add a multimedia file to the album AND an image with the same name SPECIFIC ORDER Start directory/file names with a 3-digit number: '001 first directory' or '005 fifth photo' LIGHTBOX SUPPPORT - Download from: http://www.lokeshdhakar.com/projects/lightbox2/ Create a directory on your webserver that contains the 3 lightbox directories (js, images and css) In the configuration section enable lightbox support and provide the path to the directory TILTVIEWER SUPPORT - Download from: http://www.airtightinteractive.com/projects/tiltviewer/ Copy the 3 files TiltViewer.swf, index.html, swfobject.js to your album(s) or use the admin panel In the configuration section enable tiltviewer support and auto-create the gallery.xml file PICLENS SUPPORT - No installation required, scripts will be downloaded from piclens.com In the configuration section enable piclens support and auto-create the photos.rss file *************************************************************************************************** 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 in browser to access admin pages: true or false $admins='gravbrot,slingo1'; // Admin(s) with access to this album: 'loginname,password' comma separated - change this to your own loginname 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 $allow_create_album=true; // Allow creation of new albums: true or false $comment_size=250; // Maxmimum amount of characters in single visitor comment // Translations for the visitors $language_page='Page'; // Text for page number $language_homepage='Home'; // Text for homepage button in menu $language_albums='Albums'; // Text for amount of albums $language_photos='Photos'; // Text for amount of photos $language_view='View'; // 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='Click to view next image (or use arrow keys)'; // Text for tooltip image in popup window $language_viewmm='Play multimedia file'; // Text for tooltip multimedia file $language_dir_empty='Directory empty'; // Text for empty directory $language_login='Login'; // Text for login $language_logout='Logout'; // Text for logout $language_user='Username'; // Text for username $language_passw='Password'; // Text for password $language_slideshow='start slideshow'; // Text for starting slideshow $language_stop_slideshow='stop slideshow'; // Text for stopping slideshow $language_hitcounter_tooltip='Hit counter'; // Text for tooltip of hit counter $language_email_alt='Email this page to a friend'; // Text for tooltip of email button $language_email_subject='EasyPhpAlbum'; // Text for email subject line $language_email_comment='Please copy this link in your browser:'; // Text for email comment line $language_download='right-click to download: '; // Text for download link $language_rating='rating:'; // Text for rating photo $language_hits='hits:'; // Text for hits photo $language_countcomments='total comments: '; // Text for thumbnail comments counter $language_rating_votes='votes'; // Text for rating photo amount of votes $language_rating_tooltip='Rating (5=excellent / 1=poor)'; // Text for rating tooltip $language_rating_choose='Choose a rating'; // Text for rating selection $language_rating_excellent='5 - Excellent'; // Text for rating selection $language_rating_verygood='4 - Very good'; // Text for rating selection $language_rating_good='3 - Good'; // Text for rating selection $language_rating_fair='2 - Fair'; // Text for rating selection $language_rating_poor='1 - Poor'; // Text for rating selection $language_add_comment='add comment'; // Text for visitors to add a comment $language_add_file='Upload file'; // Text for visitors to add a file $language_save_comment='Save comment'; // Text for visitors to save the comment $language_upload_comment='Upload file(s)'; // Text for visitors to upload files $language_username_comment='Name'; // Text for visitors to add nickname to the comment or file upload $language_comment_max='Maxmimum amount of characters'; // Text for visitors maximum comment characters $language_up='Up'; // Text for menu directory up $language_shop_info='No. of copies and type:'; // Text for shop number of copies per photo $language_shop_order='Place order'; // Text for shop order button $language_shop_cancel='Cancel'; // Text for shop cancel button $language_shop_address='Your address:'; // Text for shop address $language_shop_email_address='Your email-address:'; // Text for shop address $language_shop_ordercomments='Your order and comments:'; // Text for shop address $language_shop_confirmation='Order send - we will contact you asap.'; // Text for shop address $language_sort_option1='standard album sort'; // Options for visitor album sort $language_sort_option2='sort by hitcounter'; // Options for visitor album sort $language_sort_option3='sort by comments'; // Options for visitor album sort $language_sort_option4='sort by rating'; // Options for visitor album sort $language_sort_option5='sort by date'; // Options for visitor album sort $language_search='Search'; // Text for search option $language_search_keyword='Keyword for search'; // Text for search option keyword $language_search_noresults='Search returned no hits'; // Text for search option nothing found $language_search_cancel='Back'; // Text for search option cancel $language_visitor_upload_message='Upload OK'; // Text for successful upload $language_visitor_upload_review='Uploaded content will be reviewed'; // Text for successful upload & admin review $language_over18='I am 18 or older - ENTER'; // Text for adult content $language_under18='I am under 18 - CANCEL'; // Text for teenagers $language_18='Disclaimer: This photoalbum contains explicit content'; // Text for explicit content $language_stats='Photos: '; // Text for total amount of photos in album $language_new='new!'; // Text for new photos $language_selectalbum='please select an album'; // Text for album selectionbox $language_lastupdated='Updated: days ago'; // Text for album 'last updated', the : must be included in the text // *************************************************************************************************** // CONFIGURATION SECTION B - Editable using the administrator web-interface (recommended) // A configuration.php file inside the album will override any changes you make here // Login - Restrict access for visitors $restrict_access=false; // Ask for valid login and password: true or false $users='fred,1234,guest,guestpassword'; // 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='EasyPhpAlbum 1.4.2'; // Page title - leave empty to display directory name $home_page='http://www.mywebmymail.com'; // 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=true; // 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; // Count all albums and photos and show on main page: true or false $show_album_statistics=false; // Count photos in individual albums and show 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 $charset='ISO-8859-15'; // Charset for EasyPhpAlbum $explicit_content=false; // Shows explicit content warning: true or false $show_topnavigation=false; // Show navigation on top of page; true or false $show_bottomnavigation=true; // Show navigation on bottom of page; true or false $show_album_selectbox=false; // Shows a selectionbox instead of the navigation menu: true or false $chmod_level='0755'; // The privileges on the server - use 0777 or 0755 - depends on hosting provider // 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 $animated_thumbnails=false; // Do not 'thumbnailise' GIF images: true or false $new=false; // Mark new photos with 'new' $new_days=14; // Max. age of photo for 'new' indication $last_updated=false; // Show text album last updated x days ago // Page layout and behaviour $images_per_page=6; // Number of photos to display per page $columns_per_page=3; // 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=false; // Display border around photo (only when $popup=false): true or false $slideshow=true; // Enable slideshow: true or false $slideshow_delay=6000; // 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 $visitor_search=false; // Allow visitors to search the photos by keyword in the album: true or false $visitor_search_columns=3; // Search result - amount of photos next to each other $background_image=''; // The URL for your background image (example: 'http://www.mywebmymail.com/bg.gif'), leave empty for no background $background_repeat='no-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=''; // The URL for your menu background image (example: 'http://www.mywebmymail.com/bg.gif'), leave empty for no background $backgroundtable_image=''; // The URL for your thumbnail background image (example: 'http://www.mywebmymail.com/bg.gif'), leave empty for no background $content_width='800px'; // 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 $content_topmargin='0px'; // The top margin of the page content: % or px, example: 5% or 10px $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=false; // 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' $link_bigimage=false; // Add a link to the photo to view it fullsize: true or false $imagefader=true; // Gradually fade a photo in (and out with slideshow enabled): true or false $show_topline=true; // Display the top line: true or false $show_bottomline=true; // Display the bottom line: true or false $fontfamily='Tahoma, Arial, Helvetica, sans-serif'; // Font type to use $aligntext_left=false; // Align photo textfile to the left (standard is centered): true or false // 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_password=false; // Require valid password for uploading files: 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,zip'; // Allow visitors to upload the specified file(s), comma separated $visitor_upload_adminreview=false; // Uploaded files will first be placed in the albums backup directory for review by the album administrator: true or false $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=480; // 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.mywebmymail.com'; // 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 // Lightbox v2.0+ support $lightbox=false; // Set to true to enable lightbox: true or false $lightbox_title=true; // Set to true to enable caption support: true or false $lightbox_group=true; // Set to true to enable caption support: true or false $lightbox_href=''; // Location of lightbox directory on your webserver, example 'http://www.abc.com/photoalbums/lightbox' // TiltViewer v1.3 support $tiltviewer=false; // Enable tiltviewer support - Enable admin access and open configuration page in your browser to create xml file // Piclens support $piclens=false; // Enable piclens support - Enable admin access and open configuration page in your browser to create rss file // Photo shop system $shop=false; // Use shop system: true or false $shop_email=''; // 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 $width_player=0; // Set width of embedded multimediaplayer in px, 0=autosize $height_player=0; // Set height of embedded multimediaplayer in px, 0=autosize // Automatic image resize $resizeimages=false; // Set to true to auto-resize all uploaded photos permanently for smaller filesize - EXIF information is lost - write access required: true or false $resizeto=640; // Size in px for permanent resize (min. 30 pixels) $donot_resize_gif=false; // Do not resize GIF images (for animated content): true or false // Colors for EasyPhpAlbum logo $logo_line_color='#FE9900'; // Logo line color $logo_text_color='#0A7FDC'; // Logo text color // 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='EasyPhpAlbum, an easy to use single script photo, music and movie album with lots of features.'; // Short description for your album $meta_keywords='easy,album,photo,movie,music,www.mywebmymail.com,easyphpalbum,gallery,thumbnails'; // Search keywords comma separated $meta_copyright_and_author='JF Nutbroek - www.mywebmymail.com'; // 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 $logged_in=false; if ($restrict_access || isset($_REQUEST['requirelogin'])) { 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(); } if ($visitor_password) {$logged_in=true;} } // Age check $explicit_ok=false; if ($explicit_content) { if (isset($_REQUEST['over18'])) { if ($_REQUEST['over18']==18) { setcookie('epa_18','true',time()+43200); $explicit_ok=true; } } if (isset($_COOKIE['epa_18']) || $admin_link!='') {$explicit_ok=true;} } // 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,true,'*'); removedir(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename.'/ratings',false,true,'*'); removedir(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename.'/textfiles',false,true,'*'); removedir(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename.'/thumbnails',false,true,'*'); removedir(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename.'/backup',false,true,'*'); removedir(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename.'/gfx',false,true,'*'); removedir(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename,false,true,'*'); } } // 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);} else {@chmod($imagefilename,octdec($chmod_level));} 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 {@chmod('textfiles/'.$imagefilename,octdec($chmod_level));} } } else { if (@move_uploaded_file($_FILES['uploadimage' . $i]['tmp_name'],str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename)) { if (filesize($imagefilename)==0) {@unlink($imagefilename);} else {@chmod($imagefilename,octdec($chmod_level));} } } 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'); @chmod('textfiles/'.substr($_REQUEST['newtxtfile'],0,strrpos($_REQUEST['newtxtfile'],'.')).'.txt',octdec($chmod_level)); } else { if (file_exists($_REQUEST['newtxtfile'])) @touch(substr($_REQUEST['newtxtfile'],0,strrpos($_REQUEST['newtxtfile'],'.')).'.txt'); @chmod(substr($_REQUEST['newtxtfile'],0,strrpos($_REQUEST['newtxtfile'],'.')).'.txt',octdec($chmod_level)); } } // Backup image(s) for($i=1;$i<($images_per_page+1);$i++) { if (isset($_REQUEST['backup_'.$i])) { if (!is_dir('backup')) {@mkdir('backup');@chmod('backup',octdec($chmod_level));} $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)) { if ($fp=@fopen($albumname.'/index.php','wb')) { fwrite($fp,"'); fclose($fp); } else { @copy('index.php',$albumname.'/index.php'); } @chmod($albumname,octdec($chmod_level)); @chmod($albumname.'/index.php',octdec($chmod_level)); if (file_exists('configuration.php')) {@copy('configuration.php',$albumname.'/configuration.php');@chmod($albumname.'/configuration.php',octdec($chmod_level));} if (!file_exists($albumname.'/hitcounters')) {@mkdir($albumname.'/hitcounters');@chmod($albumname.'/hitcounters',octdec($chmod_level));} if (!file_exists($albumname.'/ratings')) {@mkdir($albumname.'/ratings');@chmod($albumname.'/ratings',octdec($chmod_level));} if (!file_exists($albumname.'/textfiles')) {@mkdir($albumname.'/textfiles');@chmod($albumname.'/textfiles',octdec($chmod_level));} if (!file_exists($albumname.'/thumbnails')) {@mkdir($albumname.'/thumbnails');@chmod($albumname.'/thumbnails',octdec($chmod_level));} if (!file_exists($albumname.'/backup')) {@mkdir($albumname.'/backup');@chmod($albumname.'/backup',octdec($chmod_level));} } else { $title.=' - failed (please enable write access)'; } } else { $title.=' - failed (album already exists)'; } } } // Redirect to tiltviewer if (!isset($_REQUEST['admin']) && !isset($_REQUEST['configuration']) && $tiltviewer) {header("Location: index.html");} // 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); @chmod($stats_filename,octdec($chmod_level)); } } 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); @chmod($stats_filename,octdec($chmod_level)); } } } 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=''; if ($visitor_upload_adminreview) { if (!is_dir('backup')) {@mkdir('backup');@chmod('backup',octdec($chmod_level));} } 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 ($visitor_upload_adminreview && $extension!='zip' && file_exists('backup')) {$reviewdir='backup/';} else {$reviewdir='';} if (file_exists($reviewdir.$imagefilename)) $imagefilename=rand(0,999) . ' ' . $imagefilename; if (@move_uploaded_file($_FILES['uploadfile' . $i]['tmp_name'],str_replace(chr(92),chr(47),getcwd()).'/'.$reviewdir.$imagefilename)) { if (filesize($reviewdir.$imagefilename)==0) {@unlink($reviewdir.$imagefilename);} else {@chmod($reviewdir.$imagefilename,octdec($chmod_level));} if (in_array($extension,explode(',','png,gif,jpg,jpeg,swf'))) { if (!$check_file = @GetImageSize($reviewdir.$imagefilename)) {@unlink($reviewdir.$imagefilename);} } $uploaded_files.=$imagefilename.chr(10); if ($extension=='zip') {unzipimages($reviewdir.$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()); if ($uploaded_files!='' && !$visitor_upload_adminreview) {$title.=" | $language_visitor_upload_message";} if ($uploaded_files!='' && $visitor_upload_adminreview) {$title.=" | $language_visitor_upload_review";} } } // 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 { // Do not modify thumbnailindex file $is_index=substr($image,0,strrpos($image,'.')); if (strpos($is_index,'/')) {$is_index=substr($is_index,strrpos($is_index,'/')+1);} if ($is_index=='index' && $indeximage_no_thumb) { $thumb_size=$size[0]; $border_width=0; $show_bordershadow=false; $show_binder=false; $clip_corner=0; $show_number=false; $thumbnail_borderpng=''; $thumbnail_rotation=false; $square_thumbnails=false; } // 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) && ($centery+$vectory)>-1 && ($centery+$vectory)<($centery*2)) @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 && isset($_REQUEST['number'])) { $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'); @chmod($thumbfilename.'.gif',octdec($chmod_level)); } header("Content-type: image/gif"); imagegif($thumb); } else if ($size[2]==2) { if ($create_thumbnail_cache && !isset($_REQUEST['resize'])) { @imagejpeg($thumb,$thumbfilename.'.jpg',90); @chmod($thumbfilename.'.jpg',octdec($chmod_level)); } header("Content-type: image/jpeg"); imagejpeg($thumb,'',90); } else if ($size[2]==3) { if ($create_thumbnail_cache && !isset($_REQUEST['resize'])) { @imagepng($thumb,$thumbfilename.'.png'); @chmod($thumbfilename.'.png',octdec($chmod_level)); } header("Content-type: image/png"); imagepng($thumb); } else { header("Content-type: image/png"); $supportedformats=explode(',',$movie_formats.','.$sound_formats); if (in_array(strtolower(substr($image,strrpos($image,'.')+1,strlen($image))),$supportedformats)) {imagepng(invalid_image('No thumbnail'));} else {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 (count($images)>0 && $resizeto>30) { foreach ($images as $image) { $size=@GetImageSize($image); if (max($size[0],$size[1])>$resizeto && (!$donot_resize_gif || ($donot_resize_gif && $size[2]!=1))) 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); $subtract_index=0; foreach ($images as $firstimage) { if (substr($firstimage,0,strrpos($firstimage,'.'))=='index') { array_push($file_names,$file . '/' . $firstimage); $subtract_index=-1; 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)+$subtract_index; } } } @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); if ($dir=@opendir('backup')) { while ($file=@readdir($dir)) { if (($file!='.') && ($file!='..') && !is_dir($file)) array_push($backup_files,$file); } } 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 (isset($_REQUEST['old_searchkeyword'])) { // Filter results $searchresults=array(); foreach($file_names as $file) { if (strpos(strtolower($file),strtolower($_REQUEST['old_searchkeyword']))===false) {} else {array_push($searchresults,$file);} } $file_names=$searchresults; } } if ($_REQUEST['orderphotos']==2) {$order=2;} if ($_REQUEST['orderphotos']==3) {$order=3;} } else { $order=0; } // Change display configuration for search results if ($visitor_search && isset($_REQUEST['searchkeyword'])) { if (strlen($_REQUEST['searchkeyword'])>0) { $images_per_page=9999; if (isset($_REQUEST['page'])) {unset($_REQUEST['page']);} $columns_per_page=$visitor_search_columns; $thumbnail_txtfile=false; $thumbnail_countcomments=false; $popup=true; // Filter results if (is_dir('textfiles')) {$txtdir='textfiles/';} else {$txtdir='';} $searchresults=array(); foreach($file_names as $file) { if (strpos(strtolower($file),strtolower($_REQUEST['searchkeyword']))===false) {} else {array_push($searchresults,$file);} $txtfilename=substr($file,0,strrpos($file,'.')).'.txt'; if (file_exists($txtdir.$txtfilename)) { if ($fp=@fopen($txtdir.$txtfilename,'r')) { $comment=fread($fp,filesize($txtdir.$txtfilename)); if (strpos(strtolower($comment),strtolower($_REQUEST['searchkeyword']))===false) {} else {array_push($searchresults,$file);} fclose($fp); } } } $file_names=$searchresults; } } // Evaluate which thumbnails to show on current page if ($explicit_content && !$explicit_ok) { $file_names=null; if (isset($_REQUEST['showimage'])) {unset($_REQUEST['showimage']);} } $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"; if ($piclens) { echo ""; echo ""; } echo "\n"; // Insert CSS Styles html_css(); // Insert Lightbox Style & Javascripts if ($lightbox) {echo "";} // 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

";} if ($show_topline) {echo "

";} // Insert menu if ($show_topmenu && !isset($_REQUEST['slideshow'])) {album_menu('top');} // Main content for page placed in a table echo "
\n"; // Directory empty, search results or explicit content warning if ($max_files==0 && $admin_link=='') { if ($visitor_search && isset($_REQUEST['searchkeyword'])) { echo "\n"; } else if ($max_files==0 && !$explicit_content) { echo "\n"; } else if ($explicit_content && !$explicit_ok) { echo "\n"; echo "\n"; } } // Insert page navigation if ($show_topnavigation && $max_files!=0 && $admin_link=='') {album_navigation('top');} // 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']) && $allow_create_album) { 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"; $images_per_page=9999; } 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]"; 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\"";} else {{$border="border=\"0\"";}} $onload=''; if ($slideshow && isset($_REQUEST['slideshow']) && !$imagefader) {$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 && count($file_names)>2) { 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)) { if ($width_player<>0 && $height_player<>0) { $mm_width="width=\"$width_player\""; $mm_height="height=\"$height_player\""; } else { $mm_width=''; $mm_height=''; } $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"; $nowrap=""; if (!$image_resize) { $image_width=''; $image_height=''; } if ($link_bigimage && $multimedia_href1=='') { $multimedia_href1=""; $multimedia_href2=''; } if ($animated_thumbnails && $size[2]==1) {$image_resize=false;} if ($previous_thumb=='') {$previous_thumb=' ';} if ($next_thumb=='') {$next_thumb=' ';} 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="nowrap=\"nowrap\"";} if ($content!='') {echo "\n";} // Display textfile if ($image_txtfile) { $showimage_txt=substr($showimage,0,strrpos($showimage,'.')).'.txt'; if ($aligntext_left) {$textclass='class="tablecell2"';} else {$textclass='class="tablecell"';} 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 for animated GIF's if ($animated_thumbnails && $size[2]==1) { $valid_thumb=true; if (!file_exists($thumb_filename)) $thumb_filename=$subdir . $thumbdir . $file_names[$count]; } // 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 ($new && $show_thumb_name_top) { if (@filemtime($file_names[$count])>(time()-($new_days*24*60*60))) {$content.=' '.$language_new.'
';} } 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 ($lightbox_group) {$lightbox_groupcode='[group]';} else {$lightbox_groupcode='';} if ($lightbox_title) {$lightbox_titlecode="title=\"$file_name\"";} else {$lightbox_titlecode='';} if ($valid_thumb) { if (strpos($file_names[$count],'/')===false && $size[0]) { $onclick=''; if ($hit_counter) {$onclick="onclick=\"updatestats('$file_names[$count]','')\"";} if ($multimedia_href1=='') { if ($lightbox) $content.="\"$language_view
"; else $content.="\"$language_view
"; } else if ($popup) { $content.="$multimedia_href1\"$language_viewmm$multimedia_href2
"; } else { if ($lightbox) $content.="\"$language_view
"; else $content.="\"$language_view
"; } } else if ($size[0]) { $content.="\"$language_view
"; } else { $content.="
"; } } else { if (strpos($file_names[$count],'/')===false && $size[0]) { $onclick=''; if ($hit_counter) {$onclick="onclick=\"updatestats('$file_names[$count]','')\"";} if ($multimedia_href1=='') { if ($lightbox) $content.="\"$language_view
"; else $content.="\"$language_view
"; } else if ($popup) { $content.="$multimedia_href1\"$language_viewmm$multimedia_href2
"; } else { if ($lightbox) $content.="\"$language_view
"; else $content.="\"$language_view
"; } } else if ($size[0]) { $content.="\"$language_view
"; } else { $content.="
"; } } if ($new && !$show_thumb_name_top) { if (@filemtime($file_names[$count])>(time()-($new_days*24*60*60))) {$content.=' '.$language_new.'
';} } 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_album_statistics && $total_amount_albums>0) {$content.=$language_stats . count(get_images(substr($file_names[$count],0,strpos($file_names[$count],'/')),false,false)) . "
";} 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') . "
";} if ($last_updated && !strpos($file_names[$count],'/')===false) { $original_sort=$sort_thumbs; $sort_thumbs=true; $lastupdated_files=array(); $lastupdated_files=get_images(substr($file_names[$count],0,strpos($file_names[$count],'/')),true,false); $days=intval((time()-filemtime(substr($file_names[$count],0,strpos($file_names[$count],'/')).'/'.$lastupdated_files[0]))/86400); $daystext=str_replace(':',': ' . $days,$language_lastupdated); $sort_thumbs=$original_sort; $content.= "$daystext
"; } $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.=strip_tags($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.=strip_tags($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"; } } } if ($piclens && !isset($_REQUEST['showimage']) && $max_files!=0 && count($dir_names)==0) {echo "\n";} echo "\n"; if ($shop && $order==1) echo "\n"; // Show page navigation if (($show_bottomnavigation && $max_files!=0) || $admin_link!='') {album_navigation('bottom');} echo "
$language_search_noresults
$language_dir_empty
$language_18

$language_over18 | $language_under18

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) . ".$backup_only$file_date$size[0] x $size[1]" . floor($file_size/1024) . " Kbbackup (not published)
" . ($count+1) . ".$backup_only$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 strip_tags($line).$textarea2;} if (count($lines)==0) {echo "Description for photo";} echo "$textarea3$textarea4
  $textarea1"; $lines=file('textfiles/'.$showimage_txt); foreach ($lines as $line) {echo strip_tags($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 strip_tags($line) . "
";} echo "
\n"; $lines=file('textfiles/'.$showimage_txt); foreach ($lines as $line) {echo strip_tags($line)."
";} echo "
$language_shop_address
$language_shop_email_address
$language_shop_ordercomments
\n"; echo "
$language_shop_confirmation
 
 
$content
$content$content$content
 
 
$language_slideshow
 
"; // 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'])) { if (!$visitor_password || ($visitor_password && $logged_in)) { echo "
\n"; echo "\n"; echo "
$language_username_comment:
"; for($i=1;$i<($visitor_upload_max_files+1);$i++) {echo "
";} echo "
\n"; echo "\n"; } } // Visitor search if ($visitor_search && !isset($_REQUEST['showimage'])) { echo "
\n"; echo "
$language_search_keyword:
\n"; if (isset($_REQUEST['searchkeyword'])) {echo "";} } // Add javascript for hide/show div-section if ($visitor_upload || $visitor_search || $visitor_comments) { echo "\n"; } if ($show_bottomline) {echo "

\n";} // Insert menu if ($show_bottommenu && !isset($_REQUEST['slideshow'])) {album_menu('bottom');} if ($show_poweredby_easyphpalbum && !isset($_REQUEST['slideshow'])) echo "

\"v1.4.2\"

\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 "

 

"; // Add you own php footer here (in the table instead of  ) 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; } // Album navigation function album_navigation($nav_loc) { global $file_names,$images_per_page,$columns_per_page,$order,$albumpage,$language_page,$play_multimedia,$language_slideshow; global $language_view_previous,$language_view_next,$enable_keyboard_arrows,$slideshow,$language_stop_slideshow,$rating,$piclens; global $visitor_comments,$language_add_comment,$visitor_search,$admin_link,$language_search_cancel,$language_search,$shop,$language_email_comment; global $visitor_upload,$max_album_size,$visitor_password,$logged_in,$language_add_file,$show_email_link,$language_email_subject,$hit_counter; global $fadeinorout,$language_email_alt,$language_shop_order,$visitor_sort,$language_sort_option1,$language_sort_option2,$language_sort_option3,$language_sort_option4,$language_sort_option5; // Page numbers - back & forward browsing etc. if ((count($file_names)/$images_per_page)>29) {$nowrap='';} else {$nowrap="nowrap=\"nowrap\"";} echo ""; if (!isset($_REQUEST['slideshow'])) { if ((count($file_names)>$images_per_page || isset($_REQUEST['showimage'])) && $order==0) { if ($albumpage==1) echo "$language_page 1"; else echo "$language_page 1"; } if ($order==0) { 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 { if ($piclens) echo " | $language_slideshow"; else echo " | $language_slideshow"; } } } if ($visitor_comments && isset($_REQUEST['showimage']) && !isset($_REQUEST['slideshow'])) echo " | $language_add_comment"; if ($visitor_search && !isset($_REQUEST['showimage']) && $admin_link=='' && $order==0) { if (count($file_names)>$images_per_page) {$separator=' | ';} else {$separator='';} if (isset($_REQUEST['searchkeyword']) && $images_per_page==9999) {echo "$separator$language_search_cancel | ";} echo "$separator$language_search "; if ($images_per_page==9999 && $shop) {echo " | ";} } if ($visitor_upload && !isset($_REQUEST['showimage']) && $admin_link=='' && !$shop && $images_per_page!=9999) { $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 ($visitor_password && !$logged_in) {$action="javascript:document.location.href='index.php?requirelogin=1'";} else {$action="expandCollapse('upload')";} 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 && $images_per_page!=9999) { $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 && $images_per_page!=9999) { 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"; } // Footer & Bottom menu function album_menu($menu_location) { global $total_amount_albums,$show_statistics,$language_albums,$language_photos,$total_amount_images,$language_homepage,$home_page,$max_files,$language_search_cancel,$language_selectalbum; global $show_dir_up,$language_up,$album_show,$order,$dir_names,$file_names,$admin_link,$restrict_access,$language_logout,$visitor_password,$logged_in,$visitor_search,$show_album_selectbox; echo "
    \n"; if ($admin_link=='') { if ($total_amount_albums!=0 && $show_statistics) { echo "
    $language_albums: $total_amount_albums | $language_photos: $total_amount_images
    "; } else if ($show_statistics) { echo "
    $language_photos: " . count($file_names) . "
    "; } if ($home_page!='' && $order==0 && !$show_album_selectbox) {echo "
  • $language_homepage
  • ";} if ($show_dir_up && !$show_album_selectbox) {echo "
  • $language_up
  • \n";} if (!$album_show && $order==0) { $album_selection="\n";} } } if ($restrict_access) { if ($admin_link!='') echo "
  • $language_logout
  • \n"; else echo "
  • $language_logout
  • \n"; } else if ($visitor_password && $logged_in) { echo "
  • $language_logout
  • \n"; } echo "
\n"; if ($menu_location=='top') {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,$visitor_search; 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 (!file_exists(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,$delete_dir,$file_type) { 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,true,'*'); } else { if ($file_type=='*') @unlink($path); else if (strtolower(substr($path,strrpos($path,'.')+1,strlen($path)))==$file_type) @unlink($path); } } } @closedir($dir); if ($delete_dir) @rmdir($dirname); } } } } // Unzip uploaded archive function unzipimages($file,$fileformats,$nickname) { global $visitor_upload_adminreview; if (file_exists($file)) { if (!file_exists('tmp')) {@mkdir('tmp');@chmod('tmp',octdec($chmod_level));} @copy($file,'tmp/' . $file); @unlink($file); chdir('tmp'); @shell_exec('unzip ' . $file); chdir('../'); $supportedformats=explode(',',$fileformats); if ($visitor_upload_adminreview) { if (!is_dir('backup')) {@mkdir('backup');@chmod('backup',octdec($chmod_level));} if (file_exists('backup')) {$reviewdir='backup/';} else {$reviewdir='';} } 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,'./'.$reviewdir.$imagefilename);@chmod('./'.$reviewdir.$imagefilename,octdec($chmod_level));} } } @closedir($dir); } removedir(str_replace(chr(92),chr(47),getcwd()).'/tmp',true,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 . ' ';} } } } else { $date=@filemtime($image); } 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,$visitor_password,$charset; echo "$language_login\n"; echo "\n"; echo "\n"; html_css(); if ($visitor_password && isset($_REQUEST['requirelogin'])) {$action='&requirelogin=1';} else {$action='';} 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,$link_bigimage; 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,$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,$visitor_search_columns; 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,$visitor_search; 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,$visitor_password; global $animated_thumbnails,$imagefader,$visitor_upload_adminreview,$content_topmargin,$show_topline,$show_bottomline,$fontfamily,$backgroundtable_image,$width_player,$height_player,$explicit_content,$charset,$resizeimages,$resizeto,$donot_resize_gif,$logo_line_color,$logo_text_color,$show_album_statistics,$new,$new_days,$show_topnavigation,$show_bottomnavigation,$aligntext_left,$show_album_selectbox,$last_updated,$lightbox,$lightbox_title,$lightbox_href,$lightbox_group,$tiltviewer,$piclens,$chmod_level; if ($_REQUEST['configuration']==2) { if ($fp=@fopen('configuration.php','wb')) { fwrite($fp,"'); fclose($fp); // Configuration wizzard $wizzard=''; if (isset($_REQUEST['classiclayout'])) {$wizzard='classic.txt';} if (isset($_REQUEST['binderlayout'])) {$wizzard='binder.txt';} if (isset($_REQUEST['framelayout'])) {$wizzard='frame.txt';} if (isset($_REQUEST['photographylayout'])) {$wizzard='photography.txt';} if (isset($_REQUEST['cloudlayout'])) {$wizzard='cloud.txt';} if (isset($_REQUEST['siteintegrationlayout'])) {$wizzard='siteintegration.txt';} if (isset($_REQUEST['shadowlayout'])) {$wizzard='shadow.txt';} if (isset($_REQUEST['modernlayout'])) {$wizzard='modern.txt';} if (isset($_REQUEST['techlayout'])) {$wizzard='tech.txt';} if ($wizzard!='') { $data=@file_get_contents('http://www.mywebmymail.com/easyphpalbum/supportfiles/wizzard/' . $wizzard); @unlink('configuration.php');@file_put_contents('configuration.php',$data);@chmod('configuration.php',octdec($chmod_level)); if (!file_exists('gfx')) {@mkdir('gfx');@chmod('gfx',octdec($chmod_level));} // Get the images if ($wizzard=='frame.txt' && !file_exists('gfx/border-blueportrait.png')) { $data=@file_get_contents('http://www.mywebmymail.com/easyphpalbum/supportfiles/wizzard/border-blueportrait.png'); @file_put_contents('gfx/border-blueportrait.png',$data);@chmod('gfx/border-blueportrait.png',octdec($chmod_level)); } if ($wizzard=='photography.txt' && !file_exists('gfx/diaborder.png')) { $data=@file_get_contents('http://www.mywebmymail.com/easyphpalbum/supportfiles/wizzard/diaborder.png'); @file_put_contents('gfx/diaborder.png',$data);@chmod('gfx/diaborder.png',octdec($chmod_level)); $data=@file_get_contents('http://www.mywebmymail.com/easyphpalbum/supportfiles/wizzard/filmborder.jpg'); @file_put_contents('gfx/filmborder.jpg',$data);@chmod('gfx/filmborder.jpg',octdec($chmod_level)); $data=@file_get_contents('http://www.mywebmymail.com/easyphpalbum/supportfiles/wizzard/watermark.png'); @file_put_contents('gfx/watermark.png',$data);@chmod('gfx/watermark.png',octdec($chmod_level)); } if ($wizzard=='cloud.txt' && !file_exists('gfx/cloud.png')) { $data=@file_get_contents('http://www.mywebmymail.com/easyphpalbum/supportfiles/wizzard/cloud.png'); @file_put_contents('gfx/cloud.png',$data);@chmod('gfx/cloud.png',octdec($chmod_level)); } } // Remove tiltviewer for this album if (isset($_REQUEST['deletetiltviewer'])) { if (file_exists('TiltViewer.swf')) {@unlink('TiltViewer.swf');} if (file_exists('index.html')) {@unlink('index.html');} if (file_exists('swfobject.js')) {@unlink('swfobject.js');} } // Create gallery.xml for tiltviewer if (isset($_REQUEST['tiltviewer'])) { if (isset($_REQUEST['downloadtiltviewer']) && (!file_exists('TiltViewer.swf') || !file_exists('index.html') || !file_exists('swfobject.js'))) { $data=@file_get_contents('http://www.mywebmymail.com/easyphpalbum/supportfiles/tiltviewer/TiltViewer.swf'); @file_put_contents('TiltViewer.swf',$data); $data=@file_get_contents('http://www.mywebmymail.com/easyphpalbum/supportfiles/tiltviewer/swfobject.js'); @file_put_contents('swfobject.js',$data); $data=@file_get_contents('http://www.mywebmymail.com/easyphpalbum/supportfiles/tiltviewer/index.html'); @file_put_contents('index.html',$data); } if ($fp=@fopen('gallery.xml','wb')) { fwrite($fp,"\n"); fwrite($fp,"\n"); $allimages=array();$allimages=get_images(getcwd(),false,false); foreach($allimages as $image) { fwrite($fp,"\n"); if ($show_name || $show_name_top) { $imagename=substr($image,0,strpos($image,'.'));$imagename=str_replace('_',' ',$imagename); if (ereg("([0-9]{3})",substr($imagename,0,3))) { if (substr($imagename,3,1)==' ') {$imagename=trim(substr($imagename,3));} } fwrite($fp,"$imagename\n"); } // Display textfile if ($image_txtfile) { $showimage_txt=substr($image,0,strrpos($image,'.')).'.txt'; if (file_exists($showimage_txt)) { fwrite($fp,"\n"); } else if (file_exists('textfiles/'.$showimage_txt)) { fwrite($fp,"\n"); } } fwrite($fp,"\n"); } fwrite($fp,"\n"); fwrite($fp,"\n"); fclose($fp); } } if (isset($_REQUEST['piclens'])) { if ($fp=@fopen('photos.rss','wb')) { fwrite($fp,"\n"); fwrite($fp,"\n"); fwrite($fp,"\n"); $allimages=array();$allimages=get_images(getcwd(),false,false); if (is_dir($subdir . 'thumbnails')) {$thumbdir='thumbnails/';} else {$thumbdir='';} foreach($allimages as $image) { fwrite($fp,"\n"); $imagename=substr($image,0,strpos($image,'.'));$imagename=str_replace('_',' ',$imagename); if (ereg("([0-9]{3})",substr($imagename,0,3))) { if (substr($imagename,3,1)==' ') {$imagename=trim(substr($imagename,3));} } fwrite($fp,"$imagename\n"); fwrite($fp,"$image\n"); $extension='.'.strtolower(substr($image,strrpos($image,'.')+1,strlen($image))); $image_thumb=$thumbdir . substr($image,0,strrpos($image,'.')) . '_thumb' . $extension; fwrite($fp,"\n"); fwrite($fp,"\n"); fwrite($fp,"\n"); } fwrite($fp,"\n"); fwrite($fp,"\n"); 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');@chmod('gfx',octdec($chmod_level));} 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);} else {@chmod('gfx/'.$imagefilename,octdec($chmod_level));} } 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);} if (isset($_REQUEST['reset_hitcounters'])) { if (file_exists('hitcounters')) {removedir('hitcounters',false,false,'stat');} else {removedir('./',false,false,'stat');} } if (isset($_REQUEST['reset_ratings'])) { if (file_exists('ratings')) {removedir('ratings',false,false,'rate');} else {removedir('./',false,false,'rate');} } if (isset($_REQUEST['reset_textfiles'])) { if (file_exists('textfiles')) {removedir('textfiles',false,false,'txt');} else {removedir('./',false,false,'txt');} } if (isset($_REQUEST['reset_thumbnails'])) { if (file_exists('thumbnails')) {removedir('thumbnails',false,false,'*');} if ($dir=@opendir(getcwd())) { while ($file=@readdir($dir)) { if (($file!='.') && ($file!='..')) { $filename=strtolower(substr($file,strrpos($file,'_'),strlen($file))); if (substr($filename,0,7)=='_thumb.') @unlink($file); } } @closedir($dir); } } echo "Configuration\n"; echo "\n"; echo "\n"; html_css(); echo "\n"; echo "

Configuration $ok

EasyPhpAlbum 1.4.2


"; 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 ($resizeimages) {$resizeimages_checked='checked=\"checked\"';} else {$resizeimages_checked='';} if ($donot_resize_gif) {$donot_resize_gif_checked='checked=\"checked\"';} else {$donot_resize_gif_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 ($imagefader) {$imagefader_checked='checked=\"checked\"';} else {$imagefader_checked='';} if ($show_binder) {$show_binder_checked='checked=\"checked\"';} else {$show_binder_checked='';} if ($lightbox) {$lightbox_checked='checked=\"checked\"';} else {$lightbox_checked='';} if ($tiltviewer) {$tiltviewer_checked='checked=\"checked\"';} else {$tiltviewer_checked='';} if ($piclens) {$piclens_checked='checked=\"checked\"';} else {$piclens_checked='';} if ($lightbox_title) {$lightbox_title_checked='checked=\"checked\"';} else {$lightbox_title_checked='';} if ($lightbox_group) {$lightbox_group_checked='checked=\"checked\"';} else {$lightbox_group_checked='';} if ($explicit_content) {$explicit_content_checked='checked=\"checked\"';} else {$explicit_content_checked='';} if ($new) {$new_checked='checked=\"checked\"';} else {$new_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 ($last_updated) {$last_updated_checked='checked=\"checked\"';} else {$last_updated_checked='';} if ($link_bigimage) {$link_bigimage_checked='checked=\"checked\"';} else {$link_bigimage_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 ($visitor_upload_adminreview) {$visitor_upload_adminreview_checked='checked=\"checked\"';} else {$visitor_upload_adminreview_checked='';} if ($animated_thumbnails) {$animated_thumbnails_checked='checked=\"checked\"';} else {$animated_thumbnails_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 ($visitor_search) {$visitor_search_checked='checked=\"checked\"';} else {$visitor_search_checked='';} if ($visitor_password) {$visitor_password_checked='checked=\"checked\"';} else {$visitor_password_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 ($show_album_statistics) {$show_album_statistics_checked='checked=\"checked\"';} else {$show_album_statistics_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 ($show_topnavigation) {$show_topnavigation_checked='checked=\"checked\"';} else {$show_topnavigation_checked='';} if ($show_bottomnavigation) {$show_bottomnavigation_checked='checked=\"checked\"';} else {$show_bottomnavigation_checked='';} if ($show_topline) {$show_topline_checked='checked=\"checked\"';} else {$show_topline_checked='';} if ($show_bottomline) {$show_bottomline_checked='checked=\"checked\"';} else {$show_bottomline_checked='';} if ($show_album_selectbox) {$show_album_selectbox_checked='checked=\"checked\"';} else {$show_album_selectbox_checked='';} if ($image_txtfile) {$image_txtfile_checked='checked=\"checked\"';} else {$image_txtfile_checked='';} if ($aligntext_left) {$aligntext_left_checked='checked=\"checked\"';} else {$aligntext_left_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"; if (!file_exists('TiltViewer.swf') || !file_exists('index.html') || !file_exists('swfobject.js')) { echo "\n"; echo "\n"; } else { 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 "\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 "
\"Valid
 
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.) to directory: gfx/
Upload image (jpg,png or gif):$gfx_images
 
Select a standard layout:
 
Wizzard:
EasyPhpAlbum layout:Binder layout:Blue frame layout:
Photography layout:Cloud layout:Site integration layout:
Shadow layout:Modern layout:Tech layout:
Note: Configuration will be downloaded from www.mywebmymail.com. Your current configuration settings will be overwritten. Manual download
 
Lightbox: (http://www.lokeshdhakar.com/projects/lightbox2/)
Enable lightbox support:Show captions:Group images:
URL to lightbox directory: (example: http://www.123.com/photoalbums/lightbox)
Note: Download lightbox and copy it to your webserver, edit lightbox.css & lightbox.js and make sure the lightbox images are in the right location
 
Tiltviewer: (http://www.airtightinteractive.com/projects/tiltviewer/)
Enable tiltviewer support: (and re-save the configuration to update the gallery.xml file)
Install tiltviewer for this album: (if the auto-installation fails, please try manually)
Manual install: Copy the 3 files TiltViewer.swf, index.html, swfobject.js to this album
Delete tiltviewer for this album: (if the auto-delete fails, please delete manually)
Note: If you enable tiltviewer you can only access the configuration by adding ?admin=1 to the url: http://www.123.com/photoalbum/index.php?admin=1
 
Piclens: (http://www.piclens.com/lite/webmasterguide.php)
Enable piclens slideshow: (and re-save the configuration to update the photos.rss file)
Note: No additional files required, scripts will be downloaded from piclens.com
 
Customize your album in detail:
 
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:Enable search:Search result group images by:
Enable fader:Show top line:Show bottom line:
Explicit content disclaimer:Mark new photo's:Max. days for 'new' indication:
Show bottom navigation:Show top navigation:Show album selectbox:
 
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,45 or -45):Show album last updated:
GIF's are animated:Show album statistics:Delete thumbnails !:
 
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:
Font type to use:
Page background image URL (leave empty to disable):
Page background image position: (based on %width and %height of page)
Page repeat background:
Thumbnail background image URL (leave empty to disable):
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:
Align photo-text to the left:
Album width: (% or px, example: 85% or 800px)
Album left margin: (% or px, example: 5% or 10px)
Album top 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:Add link to fullsize image:
Reset all hitcounters !:Reset all ratings !:Delete all comments/textfiles !:
 
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)
Icon directory: example: gfx/ (add mp3.jpg for MP3 files or avi.png for AVI files etc.)
Embed player:Link to player:Add download link:
Movie formats: (extensions of supported formats)
Embedded player width: (in px, 0=autowidth)
Embedded player height: (in px, 0=autoheight)
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)
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:
Logo line color:Logo text color:   
 
Color chart:  Color preview: 
\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
 
Visitor Login*:
Enable visitor album login:
Valid users/passwords: 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 file upload:
Require upload login: (uses the same users/passwords as visitor login)
Review before posting: (uploads to the albums backup directory, click 'restore' to post photo)
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)
 
Automatic photo resize (resizes all uploaded photos - old and new - for smaller filesize):
Enable autoresize:Resize to in px:Do not resize GIF's:
 
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)
Server chmod level: (0777 or 0755)
 
Meta information for search engines and characterset:
Album description:
Keywords (comma separated):
Author and copyright:
Charset (language):
 
 

\n"; exit; } // CSS code function html_css() { global $image_border,$page_header,$admin_link,$background_repeat,$background_position,$valign_thumbnail,$fontfamily; 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_borderleft_hover_color='#000000';$menu_borderright_hover_color='#000000';$menu_background_image='';$background_image='';$content_width='85%';$content_leftmargin='10px'; $content_topmargin='0px';$transparent_page=false;$transparent_menu=false;$text_hover_color='#000000';$border_color='#000000'; } 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_borderleft_color,$menu_borderright_color,$menu_borderleft_hover_color,$menu_borderright_hover_color; global $text_hover_color,$border_color,$content_topmargin,$backgroundtable_image; 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,$transparent_page; } echo "\n"; return; } ?>