Ir para conteúdo
Fórum Script Brasil
  • 0

Preciso De Ajuda Urgente


rafa24jp

Pergunta

pessoal preciso de uma ajuda queria tirar o o thumb desse codigo e deixar ele mostrando a imagen grande sem ter o thumb alguém pode me ajudar?não quero q quando a pessoa acessar o site ver as imagens em thumb quero q va direto nas images grandes alguém sabe tirar os thumb desse codigo? agradeco a ajuda de todos !!!!

Ps:o site com thumb http://p2pconection.no-ip.org/foto/albumteste/index.php?

Ps: quero q as fotos abram assim direto sem thumbs http://p2pconection.no-ip.org/foto/albumte...creenwidth=1024

###################### Codigo ##################]

<?php

// ### Server & navigation ###

$gd2=true;      // Set to true if your server has GDLib2+ (for better quality thumbnails)

$title='EasyPhpAlbum - v1.2.6';    // Page title - leave empty to display directory name

$home_page='http://easyphpalbum.sourceforge.net'; // Link to another page - leave empty to exclude

$show_email_link=false;    // Shows 'email' button (might not work with all browsers): true or false

$show_poweredby_easyphpalbum=true;  // Set to true or false. True is strongly recommended! wink.gif

// ### Thumbnail layout/creation ###

$thumb_size=160;    // Size in px for thumbnails (min. 30 pixels)

$border_width=10;    // Add border around photo - width in px (0=no border)

$show_bordershadow=true;    // Display shadow around border: true or false

$show_binder=true;    // 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

$show_number=false;    // Display photo number in thumbnail: true or false

$create_thumbnail_cache=false;    // Save thumbnails for faster display (recommended) - requires write access to (sub)directory: true or false

// ### Page layout/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)

$image_border=true;    // Display border around photo (only when $popup=false): true or false

$slideshow=true;    // Enable slideshow (only when $popup=false): true or false

$slideshow_delay=3000;    // Time between slides in milliseconds (1 second = 1000 milliseconds). Minimum 1 second.

// ### Photo information ###

$show_name=true;    // Display file name: true or false (tip: use filename as short description for photo)

$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_download=false;    // Show download link for photo in original size: true or false

$image_txtfile=false;    // Display text from a textfile (only when $popup=false). Filename for text file is same as photo (myphoto.jpg >> myphoto.txt): 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

$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

// ### Photo manipulation for display ###

$image_resize=false;    // Set to true to resize photo for display, use this to show large photos in a smaller size: true or false

$image_resizeto=0;    // Size in px for resize (min. 30 pixels) or 0 for auto-resize

$image_inflate=false;    // Allow photo to be enlarged: true or false

$copyright='EasyPhpAlbum';    // Add copyright notice to photo (only when $image_resize=true)

$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+

// ### Login - Restrict access ###

$restrict_access=false;    // Ask for valid login and password: true or false

$users='fred,1234,guest,guest';    // User(s) with access to this album: name,password comma separated

// ### Login - Administrator access ###

$admin_access=false;    // Enable this option to allow file upload/delete: true or false

$admins='admin,1234,admin2,abcd';  // Admin(s) with access to this album: name,password comma separated

$admin_ip='';      // Allow login from specified IP addresses only, one or multiple IP's comma separated - optional

// ### Page,Photo & Menu colors ###

$page_color='#ffffff';    // Page background color

$text_color='#000000';    // Text color

$text_hover_color='#ff0000';    // Text hover color

$title_color='#999999';    // Title color

$border_color='#ffffff';    // Photo border color

$table_color='#ffffff';    // Table background color

$item_border_color='#ffffff';    // Border color table

$line_color='#000000';    // Color for lines

$email_color='#ffff99';    // Color for email button

$menu_line_width='1px';    // Menu border line thickness (top+bottom)

$menu_bar_width='3px';    // Menu bar line thickness (left + right)

$menu_bordertop_color='#000000';  // Menu border top color

$menu_borderbottom_color='#000000';  // Menu border bottom color

$menu_borderleft_color='#000000';  // Menu border left color

$menu_borderright_color='#000000';  // Menu border right color

$menu_bordertop_hover_color='#000000';  // Menu border hover top color

$menu_borderbottom_hover_color='#000000';  // Menu border hover bottom color

$menu_borderleft_hover_color='#000000';  // Menu border hover left color

$menu_borderright_hover_color='#000000';  // Menu border hover right color

$menu_text_color='#000000';    // Menu text color

$menu_texthover_color='#000000';  // Menu text hover color

$menu_background_color='#ffffff';  // Menu background color

$menu_background_hover_color='#cccccc';  // 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

// ### Translations ###

$language_page='Page';      // Text for page number - Change this in your own language

$language_homepage='Home';      // Text for homepage button in menu - change this in your own language

$language_albums='Albums';      // Text for amount of albums - change this in your own language

$language_photos='Photos';      // Text for amount of photos - change this in your own language

$language_view='View';      // Text for tooltip image- change this in your own language

$language_viewmm='Play multimedia file';    // Text for tooltip multimedia file - change this in your own language

$language_dir_empty='No photos in directory (or PHP <4.1.0)';  // Text for empty directory - change this in your own language

$language_login='Login';      // Text for login - change this in your own language

$language_logout='Logout';      // Text for logout - change this in your own language

$language_user='Username';      // Text for username - change this in your own language

$language_passw='Password';      // Text for password - change this in your own language

$language_slideshow='start slideshow';    // Text for starting slideshow - change this in your own language

$language_stop_slideshow='stop slideshow';    // Text for stopping slideshow - change this in your own language

$language_hitcounter_tooltip='Hit counter';    // Text for tooltip of hit counter - change this in your own language

$language_email_alt='Email this page to a friend';  // Text for tooltip of email button - change this in your own language

$language_email_subject='EasyPhpAlbum';    // Text for email subject line - change this in your own language

$language_email_comment='Please copy this link in your browser:'; // Text for email comment line - change this in your own language

$language_download='(right-click to download photo)';  // Text for download link - change this in your own language

$language_admin_delete='Are you sure you want to delete: ';  // Text for administrator delete file - change this in your own language

$language_admin_filename='File name';    // Text for administrator file name - change this in your own language

$language_admin_date='Image date';    // Text for administrator image date - change this in your own language

$language_admin_dimensions='Dimensions';    // Text for administrator image dimensions - change this in your own language

$language_admin_size='Size';      // Text for administrator image size - change this in your own language

$language_admin_action='Action';    // Text for administrator action (delete file) - change this in your own language

$language_admin_upload='Upload photos and text files';  // Text for administrator upload button - change this in your own language

$language_admin_upload_wait='Please wait. Uploading files...';  // Text for administrator upload button wait... - change this in your own language

$language_admin_upload_err1='Upload failed - filesize too big';  // Text for administrator upload error filesize - change this in your own language

$language_admin_upload_err2='Upload failed - interrupted';  // Text for administrator upload error interrupted - change this in your own language

$language_admin_totalfiles='Total photos in album:';  // Text for administrator total photos in album - change this in your own language

$language_rating='rating:';      // Text for rating photo - change this in your own language

$language_rating_votes='votes';      // Text for rating photo amount of votes - change this in your own language

$language_rating_tooltip='Rating (5=excellent / 1=poor)';  // Text for rating tooltip - change this in your own language

$language_rating_choose='Choose a rating';    // Text for rating selection - change this in your own language

$language_rating_excellent='5 - Excellent';    // Text for rating selection - change this in your own language

$language_rating_verygood='4 - Very good';    // Text for rating selection - change this in your own language

$language_rating_good='3 - Good';    // Text for rating selection - change this in your own language

$language_rating_fair='2 - Fair';    // Text for rating selection - change this in your own language

$language_rating_poor='1 - Poor';    // Text for rating selection - change this in your own language

// ### Permanent image resize ###

$resizeimages=false;    // Set to true to resize all photos in directory permanently for smaller filesize - EXIF information is lost - write access required

$resizeto=640;      // Size in px for permanent resize (min. 30 pixels)

//set_time_limit(360);    // Optional: Allow more time for resizing and creation of thumbnails (when script times-out)

// End of configuration - Code starts from this line

//

// ***********************************************************************************************

// Check if a logout was requested

if (isset($_REQUEST['logout'])) {

session_start();

session_unset();

session_destroy();

setcookie('epa','',time()-3600);

if ($restrict_access)

  require_login();

}

// Check for administrator login

if ($admin_access && isset($_REQUEST['admin'])) {

$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 or session

if ($restrict_access) {

session_start();

$valid_users=explode(',',$users);

foreach ($valid_users as $key => $user)

  $valid_users[$key]=md5($user . date('d'));

// Check if cookie data is available and valid

if (isset($_COOKIE['epa'])) {

  $cookie_data=explode('@',$_COOKIE['epa']);

  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['user']=md5($_REQUEST['new_user'] . date('d'));

    $_SESSION['passw']=md5($_REQUEST['new_password'] . date('d'));

    $_SESSION['agent']=md5($_SERVER['HTTP_USER_AGENT']);

    setcookie('epa',$_SESSION['user'] . '@' . $_SESSION['passw'] . '@' . $_SESSION['agent'],time()+3600);

  }

  } else {

  require_login();

  }

// Check if current session is valid

} else if (isset($_SESSION['passw']) && isset($_SESSION['user']) && isset($_SESSION['agent'])) {

  if ($_SESSION['agent']!=md5($_SERVER['HTTP_USER_AGENT']))

  require_login();

  if (in_array($_SESSION['user'],$valid_users)) {

  $user_index=array_search($_SESSION['user'],$valid_users);

  if ($valid_users[$user_index+1]!=$_SESSION['passw'])

    require_login();

  } else {

  require_login();

  }

// Session data and form data is invalid

} else {

  require_login();

}

}

// Check for admin requests

if ($admin_link!=') {

if (isset($_REQUEST['imagefilename])) {

  $imagefilename=str_replace('/','',$_REQUEST['imagefilename']);

  $imagefilename=str_replace('..','',$imagefilename);

  $extension=@ltrim(strtolower(substr($imagefilename,-4)),'.');

  if ($extension==jpg' || $extension=='jpeg' || $extension=='png' || $extension=='gif' || $extension='txt') {

  if (file_exists($imagefilename))

    @unlink($imagefilename);

  else if (file_exists('textfiles/'.$imagefilename))

    @unlink('textfiles/'.$imagefilename);

  }

}

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=@ltrim(strtolower(substr($imagefilename,-4)),'.');

    if ($extension==jpg' || $extension=='jpeg' || $extension=='png' || $extension=='gif' || $extension='txt') {

    if ($extension!='txt')

      @move_uploaded_file($_FILES['uploadimage' . $i]['tmp_name],str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename);

    else if (is_dir('textfiles'))

      @move_uploaded_file($_FILES['uploadimage' . $i]['tmp_name'],str_replace(chr(92),chr(47),getcwd()).'/textfiles/'.$imagefilename);

    else

      @move_uploaded_file($_FILES['uploadimage' . $i]['tmp_name'],str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename);

    if ($_FILES['uploadimage' . $i]['error']==UPLOAD_ERR_INI_SIZE)

      $title.= - ($language_admin_upload_err1)";

    if ($_FILES['uploadimage' . $i]['error]==UPLOAD_ERR_PARTIAL)

      $title.=" - ($language_admin_upload_err2)";

    }

  }

  }

}

}

// Display EasyPhpAlbum logo

if ($show_poweredby_easyphpalbum && isset($_REQUEST['poweredby'])) {

header("Content-type: image/png");

imagepng(poweredby_image());

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'];

$file_explode=explode('.',$image);

if (count($file_explode)>2)

  $stats_filename=$file_explode[0] . '.' . $file_explode[1] . '.stat';

else

  $stats_filename=$file_explode[0] . '.stat';

if (is_dir('hitcounters'))

  $stats_filename=hitcounters/'.$stats_filename;

if (!file_exists($stats_filename) && file_exists($image)) {

  if (touch($stats_filename)) {

  if ($fp=fopen($stats_filename,'w')) {

    fwrite($fp,'0');

    fclose($fp);

  }

  } else {

  $hit_counter_random=false;

  header("HTTP/1.1 202 Accepted");

  header("Content-type: image/png");

  imagepng(hitcounter_image('ERROR'));

  }

}

if (is_writable($stats_filename)) {

  if ($fp=fopen($stats_filename,'r+')) {

  if ($_REQUEST['statistics]==1) {

    $stats=explode('@',fread($fp,filesize($stats_filename)));

    if (!in_array($_SERVER['REMOTE_ADDR'],$stats)) {

    rewind($fp);

    fwrite($fp,1+$stats[0] . '@' . $_SERVER['REMOTE_ADDR'] . str_repeat('@',16-strlen($_SERVER['REMOTE_ADDR'])));

    }

  } 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'];

$file_explode=explode('.',$image);

if (count($file_explode)>2)

  $stats_filename=$file_explode[0] . '.' . $file_explode[1] . '.rate';

else

  $stats_filename=$file_explode[0] . '.rate';

if (is_dir('ratings'))

  $stats_filename=ratings/'.$stats_filename;

if (!file_exists($stats_filename) && file_exists($image)) {

  if (touch($stats_filename)) {

  if ($fp=fopen($stats_filename,'w')) {

    fwrite($fp,'0');

    fclose($fp);

  }

  }

}

if (is_writable($stats_filename)) {

  if ($fp=fopen($stats_filename,'r+')) {

  if ($score>0 && $score<6) {

    $stats=explode('@',fread($fp,filesize($stats_filename)));

    if (!in_array($_SERVER['REMOTE_ADDR],$stats)) {

    rewind($fp);

    if (count($stats)>3)

      $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;

    fwrite($fp,1+$stats[0] . '@' . $score . '@' . $_SERVER['REMOTE_ADDR'] . str_repeat('@',16-strlen($_SERVER['REMOTE_ADDR'])));

    fclose($fp);

    }

  } else {

    $stats=explode('@',fread($fp,filesize($stats_filename)));

    if (count($stats)>3)

    $score=$stats[1];

    fclose($fp);

    header("HTTP/1.1 202 Accepted");

    header("Content-type: image/png");

    imagepng(rating_image(floor($score+0)));

    exit;

  }

  }

}

}

// 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 {

  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;

    $show_number=false;

    $show_binder=false;

    $border_width=0;

    $show_bordershadow=false;

    $clip_corner=0;

  }

  if ($show_binder)

    $border_offset=3;

  else

    $border_offset=2;

  if ($gd2) {

    if ($size[0]>$size[1])

    $thumb=imagecreatetruecolor($border_width*$border_offset+$thumb_size,$border_width*2+ceil($size[1]/($size[0]/$thumb_size)));

    else

    $thumb=imagecreatetruecolor($border_width*$border_offset+ceil($size[0]/($size[1]/$thumb_size)),$border_width*2+$thumb_size);

  } else {

    if ($size[0]>$size[1])

    $thumb=imagecreate($border_width*$border_offset+$thumb_size,$border_width*2+ceil($size[1]/($size[0]/$thumb_size)));

    else

    $thumb=imagecreate($border_width*$bortider_offset+ceil($size[0]/($size[1]/$thumb_size)),$border_width*2+$thumb_size);

  }

  $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)-4,imagesy($thumb)-4,imagecolorallocate($thumb,hexdec(substr($border_color,1,2)),hexdec(substr($border_color,3,2)),hexdec(substr($border_color,5,2))));

  if ($show_bordershadow) {

    imagerectangle($thumb,$bind_offset,0,imagesx($thumb)-4,imagesy($thumb)-4,$gray);

    imageline($thumb,$bind_offset+2,imagesy($thumb)-3,imagesx($thumb),imagesy($thumb)-3,$darkgray);

    imageline($thumb,imagesx($thumb)-3,2,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);

  }

  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 {

      imageline($im,0,$i,$clip_corner-$i,$i,$bgcolor);

      imageline($im,imagesx($im)-$clip_corner+$i,imagesy($im)-$i-1,imagesx($im)+$clip_corner-$i,imagesy($im)-$i-1,$bgcolor);

      imageline($im,imagesx($im)-$clip_corner+$i,$i,imagesx($im)+$clip_corner-$i,$i,$bgcolor);

      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));

    imagefilledpolygon($im,$points_tl,count($points_tl)/2,$bgcolor);

    imagefilledpolygon($im,$points_br,count($points_br)/2,$bgcolor);

    imagefilledpolygon($im,$points_tr,count($points_tr)/2,$bgcolor);

    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 palette (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)));

    }

  }

  if ($gd2)

    imagecopyresampled($thumb,$im,$border_width*($border_offset-1),$border_width,0,0,imagesx($thumb)-($border_offset*$border_width),imagesy($thumb)-2*$border_width,imagesx($im),imagesy($im));

  else

    imagecopyresized($thumb,$im,$border_width*($border_offset-1),$border_width,0,0,imagesx($thumb)-($border_offset*$border_width),imagesy($thumb)-2*$border_width,imagesx($im),imagesy($im));

  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=imagecolorallocate($thumb,0,0,0);

    else

    $textcolor=imagecolorallocate($thumb,255,255,255);

    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,1,($_REQUEST['number']+1) . '/' . $_REQUEST['total'],$textcolor);

  }

  if ($show_binder) {

    $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);

    }

  }

  if (isset($_REQUEST['resize']) && $copyright!=') {

    $colors=array();

    for ($i=5;$i<ceil(imagesx($thumb)*0.2);$i++) {

    $indexis=ImageColorAt($thumb,$i,imagesy($thumb)-10);

    $rgbarray=ImageColorsForIndex($thumb,$indexis);

    array_push($colors,$rgbarray['red],$rgbarray['green'],$rgbarray['blue']);

    }

    if (array_sum($colors)/count($colors)>180)

    $textcolor=imagecolorallocate($thumb,0,0,0);

    else

    $textcolor=imagecolorallocate($thumb,255,255,255);

    if ($show_binder)

    $number_offset=$border_width*2;

    else

    $number_offset=$border_width;

    imagestring($thumb,1,$number_offset,imagesy($thumb)-10,' ' . $copyright,$textcolor);

  }

  }

  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),strpos($image,'.')-strlen($subdir)) . '_thumbindex';

  else

  $thumbfilename=$subdir . $thumbdir . substr($image,0,strpos($image,'.')) . '_thumb';

  if ($size[2]==1) {

  if ($create_thumbnail_cache && !isset($_REQUEST['resize']))

    @imagegif($thumb,$thumbfilename.'.gif');

  header("Content-type: image/gif");

  imagegif($thumb);

  } else if ($size[2]==2) {

  if ($create_thumbnail_cache && !isset($_REQUEST['resize']))

    @imagejpeg($thumb,$thumbfilename.'.jpg',90);

  header("Content-type: image/jpeg");

  imagejpeg($thumb,'',90);

  } else if ($size[2]==3) {

  if ($create_thumbnail_cache && !isset($_REQUEST['resize']))

    @imagepng($thumb,$thumbfilename.'.png');

  header("Content-type: image/png");

  imagepng($thumb);

  } else {

  header("Content-type: image/png");

  imagepng(invalid_image('Invalid Image'));

  }

} else {

  header("Content-type: image/png");

  imagepng(invalid_image('File not found'));

}

@imagedestroy($im);

@imagedestroy($thumb);

exit;

}

// Resize images permanently

if ($resizeimages) {

$images=get_images(getcwd());

if ($images && $resizeto>30) {

  foreach ($images as $image) {

  $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 ($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('Permanent batch 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('Permanent batch 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('Permanent batch resizing failed. Please enable write access to the files in this directory (chmod 0777 directory/ -R)');

    // Attempt to set file-date to the EXIF-file date, will mostly likely fail due to permission issues

    @touch($image,$date);

    @imagedestroy($im);

    @imagedestroy($thumb);

    }

  }

  }

}

}

// 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')) {

  $images=get_images($file);

  if (count($images)!=0) {

    array_push($dir_names,$file);

    array_push($file_names,$file . '/' . $images[0]);

    $album_show=true;

    $total_amount_images=$total_amount_images+count($images);

  }

  }

}

}

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))) {

    $images=get_images('../' . $file);

    if (count($images)!=0)

    array_push($dir_names,'../' . $file);

  }

  }

}

sort($dir_names);

$file_names=array();

$file_names=get_images('./');

sort($file_names);

}

// 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)))

  $title=trim(substr($title,3));

}

// Evaluate which thumbnails to show on current page

$max_files=count($file_names);

if (isset($_REQUEST['page]))

  $page=abs((int) $_REQUEST['page']);

else

$page=0;

$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 "<html><head><title>$title</title>\n";

echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-1\"><meta http-equiv=\"content-style-type\" content=\"text/css\"><meta http-equiv=\"content-script-type\" content=\"text/javascript\">\n";

echo "</head><body marginwidth=\"0\" marginheight=\"0\" topmargin=\"0\" leftmargin=\"0\" bgcolor=\"ffffff\" color=\"ffffff\">\n";

// Insert CSS Styles

html_css();

// Javascript

echo "<div id=\"content\"><form name=\"browser\" method=\"POST\" action=\"index.php?$admin_link\" enctype=\"multipart/form-data\"><input type=\"hidden\" name=\"page\" value=\"$page\"><input type=\"hidden\" name=\"imagefilename\">\n";

echo "<script language=\"JavaScript\">\n";

echo "var popup=null;\n";

echo "function showpage(page) {\n";

echo "document.browser.page.value=page;\n";

echo "if (popup && popup.open) popup.close();\n";

echo "document.browser.submit();\n";

echo "}\n";

echo "function viewer(image,name,width,height) {\n";

if ($popup) {

// Change image width for auto-adjust

if ($image_resize && $image_resizeto==0) {

  echo "image_resizeto=screen.width/1.6;\n";

  echo "if (image_resizeto>width && image_resizeto>height)\n";

  echo " image_resizeto=Math.max(width,height);\n";

  echo "if (width>height) {\n";

  echo " popup_width=image_resizeto;\n";

  echo " popup_height=(height/(width/popup_width));\n";

  echo "} else {\n";

  echo " popup_width=(width/(height/image_resizeto));\n";

  echo " popup_height=image_resizeto;\n";

  echo "}\n";

  echo "width=popup_width;\n";

  echo "height=popup_height;\n";

}

// Center pop-up window on page

echo "if (popup && popup.open) popup.close();\n";

echo "var poswx=(screen.width > width ? (screen.width - width)/2 : 0);\n";

echo "var poswy=(screen.height > height ? (screen.height - height)/3 : 0);\n";

echo "if (poswx==0 && poswy==0) {\n";

echo " popup=window.open(\"\",\"popup\",\"width=\" + (screen.width-10) + \",height=\" + (screen.height-55) + \",status=no,hotkeys=no,menubar=no,toolbar=no,resizable=no,scrollbars=yes,top=\" + poswy + \",left=\" + poswx + \",dependent=yes,alwaysRaised=yes\");\n";

echo "} else if (poswx==0) {\n";

echo " popup=window.open(\"\",\"popup\",\"width=\" + (screen.width-10) + \",height=\" + (height+1) + \",status=no,hotkeys=no,menubar=no,toolbar=no,resizable=no,scrollbars=yes,top=\" + poswy + \",left=\" + poswx + \",dependent=yes,alwaysRaised=yes\");\n";

echo "} else if (poswy==0) {\n";

echo " popup=window.open(\"\",\"popup\",\"width=\" + (width+1) + \",height=\" + (screen.height-55) + \",status=no,hotkeys=no,menubar=no,toolbar=no,resizable=no,scrollbars=yes,top=\" + poswy + \",left=\" + poswx + \",dependent=yes,alwaysRaised=yes\");\n";

echo "} else {\n";

echo " popup=window.open(\"\",\"popup\",\"width=\" + (width+1) + \",height=\" + (height+1) + \",status=no,hotkeys=no,menubar=no,toolbar=no,resizable=no,scrollbars=no,top=\" + poswy + \",left=\" + poswx + \",dependent=yes,alwaysRaised=yes\");\n";

echo "}\n";

// Write html to popup window

if ($popup_force_focus)

  echo "popup.document.write(\"<html><head><title>\" + name + \"</title><meta http-equiv=content-type' content='text/html; charset=ISO-8859-1'><body marginwidth='0' marginheight='0' topmargin='0' leftmargin='0' onBlur='window.focus()'>\");\n";

else

  echo "popup.document.write(\"<html><head><title>\" + name + \"</title><meta http-equiv='content-type' content='text/html; charset=ISO-8859-1'><body marginwidth='0' marginheight='0' topmargin='0' leftmargin='0'>\");\n";

if ($image_resize) {

  echo "popup.document.write(\"<img src='index.php?resize=1&image=\" + escape(image) + \"&screenwidth=\" + screen.width + \"' border='0'>\");\n";

} else {

  echo "popup.document.write(\"<img src='\" + escape(image) + \"' width='\" + width + \"' height='\" + height + \"' border='0'>\");\n";

}

echo "popup.document.write(\"</body></html>\");\n";

echo "popup.document.close();\n";

echo "popup.focus();\n";

// Update statistics

if ($hit_counter) {

  echo "updatestats(image);\n";

}

} else {

// Display photo on page

if ($slideshow && isset($_REQUEST['slideshow]))

  echo " location.href='index.php?slideshow=1&showimage=' + escape(image) + '&screenwidth=' + screen.width;\n";

else

  echo " location.href='index.php?showimage=' + escape(image) + '&screenwidth=' + screen.width;\n";

}

echo "}\n";

if (isset($_REQUEST['slideshow'])) {

if (isset($_REQUEST['showimage'])) {

  if (in_array($_REQUEST['showimage'],$file_names)) {

  $forward=array_search($_REQUEST['showimage'],$file_names)+1;

  $count=count($file_names);

  if ($forward==$count)

    $next_slide=$file_names[0];

  else

    $next_slide=$file_names[$forward];

  echo "function starttimer() {\n";

    echo " id=window.setTimeout(\"viewer('$next_slide','',0,0)\",$slideshow_delay);\n";

  echo "}\n";

  }

}

}

// Update statistics

if ($hit_counter) {

echo "function updatestats(image) {\n";

echo " counter = new Image;\n";

echo " counter.src = \"index.php?statistics=1&image=\" + escape(image);\n";

echo "}\n";

}

if ($admin_link!='') {

echo "function deletefile(name,page) {\n";

echo " if (confirm(\"" . $language_admin_delete . " \" + name + \" ?\")) {\n";

echo " document.browser.imagefilename.value=name;\n";

echo " document.browser.page.value=page;\n";

echo " document.browser.submit(); }\n";

echo "}\n";

}

echo "</script>\n";

echo "<h1>$title</h1><div class=\"line\"> &nbsp;</div><div id=\"leftmargin\">";

echo "<center><table class=\"tablesmaller\">\n";

// No image files in directory or PHP version < 4.1.0

if ($max_files==0 && $admin_link=='')

echo "<tr><td colspan=\"$columns_per_page\" nowrap=\"nowrap\" align=\"center\">$language_dir_empty</td></tr>\n";

if ($admin_link!='') {

// Show files & upload form for the administrator section

$columns_per_page=6;

if ($max_files==0) {

  echo "<tr><td colspan=\"$columns_per_page\" nowrap=\"nowrap\" align=\"center\">&nbsp; </td></tr>\n";

  echo "<tr><td colspan=\"$columns_per_page\" nowrap=\"nowrap\" align=\"center\">$language_dir_empty</td></tr>\n";

} else {

  echo "<tr><td nowrap=\"nowrap\">&nbsp; </td><td nowrap=\"nowrap\"><b>$language_admin_filename</b></td><td nowrap=\"nowrap\" class=\"tablecell\"><b>$language_admin_date</b></td><td nowrap=\"nowrap\" class=\"tablecell\"><b>$language_admin_dimensions</b></td><td nowrap=\"nowrap\" class=\"tablecell\"><b>$language_admin_size</b></td><td nowrap=\"nowrap\" class=\"tablecell\"><b>$language_admin_action</b></td></tr>\n";

  for ($count=$page;$count<$show_files;$count++) {

  $size=@GetImageSize('./' . $file_names[$count]);

  $file_size=@filesize($file_names[$count]);

  $file_date=getexif($file_names[$count],$show_date_format,'date');

  $image_filename=rawurlencode($file_names[$count]);

  echo "<tr><td nowrap=\"nowrap\">" . ($count+1) . ".</td><td nowrap=\"nowrap\"><a href=\"$file_names[$count]\" target=\"_blank\">$file_names[$count]</a></td><td nowrap=\"nowrap\" class=\"tablecell\">$file_date</td><td nowrap=\"nowrap\" class=\"tablecell\">$size[0] x $size[1]</td><td nowrap=\"nowrap\" class=\"tablecell\">" . floor($file_size/1024) . " Kb</td><td nowrap=\"nowrap\" class=\"tablecell\"><a href=\"#link\" onclick=\"deletefile('$file_names[$count]',$page);\">delete</a></td></tr>\n";

  $file_explode=explode('.',$file_names[$count]);

  if (count($file_explode)>2)

    $showimage_txt=$file_explode[0] . '.' . $file_explode[1] . '.txt';

  else

    $showimage_txt=$file_explode[0] . '.txt';

  if (file_exists($showimage_txt))

    echo "<tr><td nowrap=\"nowrap\" class=\"tablecell\">&nbsp; </td><td nowrap=\"nowrap\"><a href=\"$showimage_txt\" target=\"_blank\">$showimage_txt</a></td><td nowrap=\"nowrap\" class=\"tablecell\">&nbsp; </td><td nowrap=\"nowrap\" class=\"tablecell\">&nbsp; </td><td nowrap=\"nowrap\" class=\"tablecell\">&nbsp; </td><td nowrap=\"nowrap\" class=\"tablecell\"><a href=\"#link\" onclick=\"deletefile('$showimage_txt',$page);\">delete</a></td></tr>\n";

  else if (file_exists('textfiles/'.$showimage_txt))

    echo "<tr><td nowrap=\"nowrap\" class=\"tablecell\">&nbsp; </td><td nowrap=\"nowrap\"><a href=\"textfiles/$showimage_txt\" target=\"_blank\">$showimage_txt</a></td><td nowrap=\"nowrap\" class=\"tablecell\">&nbsp; </td><td nowrap=\"nowrap\" class=\"tablecell\">&nbsp; </td><td nowrap=\"nowrap\" class=\"tablecell\">&nbsp; </td><td nowrap=\"nowrap\" class=\"tablecell\"><a href=\"#link\" onclick=\"deletefile('$showimage_txt',$page);\">delete</a></td></tr>\n";

  }

}

echo "<tr><td nowrap=\"nowrap\" class=\"tablecell\" colspan=\"$columns_per_page\">&nbsp; </td></tr>\n";

echo "<tr><td nowrap=\"nowrap\" class=\"tablecell\" colspan=\"$columns_per_page\"><input type=\"file\" name=\"uploadimage1\" class=\"input\"> <input type=\"file\" name=\"uploadimage2\" class=\"input\"><br><input type=\"file\" name=\"uploadimage3\" class=\"input\"> <input type=\"file\" name=\"uploadimage4\" class=\"input\"><br><input type=\"file\" name=\"uploadimage5\" class=\"input\"> <input type=\"file\" name=\"uploadimage6\" class=\"input\"></td></tr>\n";

echo "<tr><td nowrap=\"nowrap\" class=\"tablecell\" colspan=\"$columns_per_page\"><input type=\"submit\" name=\"upload\" value=\"$language_admin_upload\" onclick=\"this.form.upload.value='$language_admin_upload'; this.form.upload.value='

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

  • 0

// ### Thumbnail layout/creation ###

$thumb_size=[COLOR=red]160[/COLOR];    // Size in px for thumbnails (min. 30 pixels)
$border_width=10;    // Add border around photo - width in px (0=no border)
$show_bordershadow=true;    // Display shadow around border: true or false
$show_binder=true;    // 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
$show_number=false;    // Display photo number in thumbnail: true or false
$create_thumbnail_cache=false;    // Save thumbnails for faster display (recommended) - requires write access to (sub)directory: true or false

C você mudar o tamanho não da certo, sm precisar alterar o codigo ???

Link para o comentário
Compartilhar em outros sites

  • 0
// ### Thumbnail layout/creation ###

$thumb_size=[COLOR=red]160[/COLOR];    // Size in px for thumbnails (min. 30 pixels)
$border_width=10;    // Add border around photo - width in px (0=no border)
$show_bordershadow=true;    // Display shadow around border: true or false
$show_binder=true;    // 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
$show_number=false;    // Display photo number in thumbnail: true or false
$create_thumbnail_cache=false;    // Save thumbnails for faster display (recommended) - requires write access to (sub)directory: true or false

C você mudar o tamanho não da certo, sm precisar alterar o codigo ???

Como assim? então eu queria na verdade tira o thumb!!! não entendi o que você disse em mudar o tamanho!!!!

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,7k
×
×
  • Criar Novo...