View Single Post
  #1  
Old 01-20-2003, 04:18 AM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default why does this show up blank?

this generates a blank page when i access it without a query string even...anyone know why?

PHP Code:
<?php
require("../forums/global.php");
if (
$action=="upload") {
  if (
$folderid=="") {
    eval(
"standarderror(\"".gettemplate("error_gallery_nofolder")."\");");
    exit;
  }
  if (
$caption=="") {
    eval(
"standarderror(\"".gettemplate("error_gallery_nocaption")."\");");
    exit;
  }
  if (
$picfile=="") {
    eval(
"standarderror(\"".gettemplate("error_gallery_nopic")."\");");
    exit;
  }
  
$picsize=getimagesize($_FILES['picfile']['tmp_name']);
  if (
$picsize[0]<200) {
    eval(
"standarderror(\"".gettemplate("error_gallery_pictoosmall")."\");");
    exit;
  }
  if (!
eregi("jpeg",$_FILES['picfile']['type'])) {
    eval(
"standarderror(\"".gettemplate("error_gallery_invalidtype")."\");");
    exit;
  }
  
$securitycheck=$DB_site->query_first("SELECT * FROM galfolder WHERE galfolderid='$folder'");
  if (
$securitycheck['userid']!=$bbuserinfo['userid']) exit;
  
$DB_site->query("INSERT INTO galphoto (galphotoid,galfolderid,caption,dateline) VALUES ('0','$folder','$caption','".time()."'");
  
$pictureid=$DB_site->insert_id();
  if (
$picsize[0]>500) {
    
$aspectratio=$picsize[0]/500;
    
$newwidth=500;
    
$newheight=round($aspectratio*$picsize[1]);
  } else {
    
$newwidth=$picsize[0];
    
$newheight=$picsize[1];
  }
  
$srcimg=imagecreatefromjpeg($_FILES['picfile']['tmp_name']);
  
$dstimg=imagecreatetruecolor($newwidth,$newheight);
  
imagecopyresampled($dstimg,$srcimg,0,0,0,0,$newwidth,$newheight,$picsize[0],$picsize[1]);
  
$color=imagecolorallocate($dstimg,0,0,100);
  
$fontx=$newwidth-100;
  
$fonty=$newheight-6;
  
imagettftext($dstimg,14,0,$fontx,$fonty,$color,"../images/fonts/serpentine.ttf","V-Driveboat.com");
  
imagejpeg($dstimg,"../images/gallery/photos/".$pictureid.".jpg","100");
  
imagedestroy($dstimg);
  
$naspectratio=80/$picsize[0];
  
$newheight=round($naspectratio*$picsize[1]);
  
$thmimg=imagecreatetruecolor(80,$nheight);
  
imagecopyresampled($thmimg,$srcimg,0,0,0,0,80,$nheight,$picsize[0],$picsize[1]);
  
imagejpeg($thmimg,"../images/gallery/thumbs/".$pictureid.".jpg","100");
  
imagedestroy($thmimg);
  
imagedestroy($srcimg);
  eval(
"dooutput(\"".gettemplate("gallery_uploaddone")."\");");
  exit;
}
eval(
"dooutput(\"".gettemplate("gallery_upload")."\");");
?>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01614 seconds
  • Memory Usage 1,815KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete