Does not work :-(
how do I know to change that regex thing :-( But it still does not work. maybe its a bug?
<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>
<?php require_once("webassist/file_manipulation/helperphp.php"); ?>
<?php
if (isset($_POST["button"])) {
$WAFV_Redirect = "";
$_SESSION['WAVT_upload_432_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ(((isset($_FILES["image"]))?$_FILES["image"]["name"]:"") . "",true,1);
$WAFV_Errors .= WAValidateFE(((isset($_FILES["image"]))? preg_replace('/^[^\.]*/', '', $_FILES["image"]["name"]) :"") . "",".gif .jpg .jpeg .png",true,2);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"upload_432");
}
}
?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "_upload/",
'FileName' => "test_[FileName]",
'DefaultFileName' => "",
'ResizeType' => "2",
'ResizeWidth' => "300",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["button"])){
WA_DFP_UploadFiles("WA_UploadResult1", "image", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult1_Params);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Unbenanntes Dokument</title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data" id="form1">
<p>
<input type="file" name="image" id="image" />
</p>
<p>
<?php
if (ValidatedField('upload_432','upload_432')) {
if ((strpos((",".ValidatedField("upload_432","upload_432").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
Bitte ein Bild auswählen!
<?php //WAFV_Conditional upload.php upload_432(1:)
}
}
}?>
</p>
<p>
<?php
if (ValidatedField('upload_432','upload_432')) {
if ((strpos((",".ValidatedField("upload_432","upload_432").","), "," . "2" . ",") !== false || "2" == "")) {
if (!((strpos((",".ValidatedField("upload_432","upload_432").","), "," . "1" . ",") !== false || "1" == ""))) {
?>
Bitte nur Bilder hochladen!
<?php //WAFV_Conditional upload.php upload_432(2:1)
}
}
}?>
</p>
<p>
<input type="submit" name="button" id="button" value="Senden" />
</p>
</form>
</body>
</html>