View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Max upload size

Thread began 6/21/2009 4:25 pm by twebb290214 | Last modified 9/24/2009 1:44 pm by twebb290214 | 5958 views | 32 replies

meister281653

I cant find it?

<?php
if (!function_exists("WADFP_getImageHeight")){
function WADFP_getImageHeight($fileField){
$WA_ImageContentTypes = array("image/gif" => true , "image/jpeg" => true, "image/pjpeg" => true, "image/x-png" => true, "image/png" => true);
$height = -1;

if(isset($fileField) && isset($fileField["tmp_name"]) && isset($fileField["type"]) && isset($WA_ImageContentTypes[$fileField["type"]]) ){
$dimensions = getimagesize($fileField["tmp_name"]);
$height = $dimensions[1];
}
return $height;
}
}
?>
<?php
if (!function_exists("WADFP_getImageWidth")){
function WADFP_getImageWidth($fileField){
$WA_ImageContentTypes = array("image/gif" => true , "image/jpeg" => true, "image/pjpeg" => true, "image/x-png" => true, "image/png" => true);
$width = -1;

if(isset($fileField) && isset($fileField["tmp_name"]) && isset($fileField["type"]) && isset($WA_ImageContentTypes[$fileField["type"]]) ){
$dimensions = getimagesize($fileField["tmp_name"]);
$width = $dimensions[0];
}
return $width;
}
}
?>
<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>
<?php require_once("WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
if (isset($_POST["button"])) {
$WAFV_Redirect = "";
$_SESSION['WAVT_upload_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ(((isset($_POST["VenueName"]))?$_POST["VenueName"]:"") . "",true,1);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["VenueStreet"]))?$_POST["VenueStreet"]:"") . "",true,2);
$WAFV_Errors .= WAValidateAN(((isset($_POST["VenuePostcode"]))?$_POST["VenuePostcode"]:"") . "",false,false,true,false,"",true,3);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["VenueCity"]))?$_POST["VenueCity"]:"") . "",true,4);
$WAFV_Errors .= WAValidateNM(((isset($_FILES["VenueImage"]))?$_FILES["VenueImage"]["size"]:"") . "",0,150,0,",.",true,5);
$WAFV_Errors .= WAValidateNM(WADFP_getImageWidth((isset($_FILES["VenueImage"]))?$_FILES["VenueImage"]:"") . "",0,1000,0,",.",true,6);
$WAFV_Errors .= WAValidateNM(WADFP_getImageHeight((isset($_FILES["VenueImage"]))?$_FILES["VenueImage"]:"") . "",0,1000,0,",.",true,7);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"upload");
}
}
?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "upload/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "2",
'ResizeWidth' => "300",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["button"])){
WA_DFP_UploadFiles("WA_UploadResult1", "VenueImage", "0", "", "JPG:100", $WA_UploadResult1_Params);
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Unbenanntes Dokument</title>
</head>

<body>
<form action="" method="post" enctype="multipart/form-data" name="FormUpload" id="FormUpload">
<p>Name:
<input type="text" name="VenueName" id="VenueName" />
</p>
<?php
if (ValidatedField('upload','upload')) {
if ((strpos((",".ValidatedField("upload","upload").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?><p>

Enter Venue Name
</p><?php //WAFV_Conditional upload.php upload(1:)
}
}
}?>

<p>Strasse:
<input type="text" name="VenueStreet" id="VenueStreet" />
</p><?php
if (ValidatedField('upload','upload')) {
if ((strpos((",".ValidatedField("upload","upload").","), "," . "2" . ",") !== false || "2" == "")) {
if (!(false)) {
?>
<p>Enter Street
</p>
<?php //WAFV_Conditional upload.php upload(2:)
}
}
}?>

<p>Postleitzahl:
<input type="text" name="VenuePostcode" id="VenuePostcode" />
</p>
<?php
if (ValidatedField('upload','upload')) {
if ((strpos((",".ValidatedField("upload","upload").","), "," . "3" . ",") !== false || "3" == "")) {
if (!(false)) {
?><p>

Enter Postcode
</p><?php //WAFV_Conditional upload.php upload(3:)
}
}
}?>
<p>Ort:
<input type="text" name="VenueCity" id="VenueCity" />
</p>
<?php
if (ValidatedField('upload','upload')) {
if ((strpos((",".ValidatedField("upload","upload").","), "," . "4" . ",") !== false || "4" == "")) {
if (!(false)) {
?><p>

Enter City
</p><?php //WAFV_Conditional upload.php upload(4:)
}
}
}?>
<p>Bild:
<input type="file" name="VenueImage" id="VenueImage" />
</p>
<?php
if (ValidatedField('upload','upload')) {
if ((strpos((",".ValidatedField("upload","upload").","), "," . "5" . ",") !== false || "5" == "")) {
if (!(false)) {
?><p>

Wrong Filesize
</p><?php //WAFV_Conditional upload.php upload(5:)
}
}
}?>
<?php
if (ValidatedField('upload','upload')) {
if ((strpos((",".ValidatedField("upload","upload").","), "," . "6" . ",") !== false || "6" == "") || (strpos((",".ValidatedField("upload","upload").","), "," . "7" . ",") !== false || "7" == "")) {
if (!(false)) {
?><p>

Wrong Width or Height
</p><?php //WAFV_Conditional upload.php upload(6,7:)
}
}
}?>
<p>Only Images</p>
<p>
<input type="submit" name="button" id="button" value="Senden" /></p>
</form>
</body>
</html>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...