kan iemand helpen alle if werken niet
het gaat om dit stukje
PHP:
<?
include("config.php");
$get = "1";
$speed = rand(70,90);
$nieuw = rand(100,9999);
if($get == "1"){
echo "<B>IPhoto</b>: is ofline for Updates!!";
exit;
}else{
//verander de onderstaande gegevens
$locatie="upload/"; //of een andere map, vergeet niet de w-rechten
$toegestaan = "jpg, gif, png, bmp"; // extensies die toegestaan zijn
$max_size = 5120; //maximale grootte van het bestand in bytes
//stop met veranderen
if(isset($_POST['upload'])) {
if(strlen($_POST['Email']) < 7) {
echo "Error: <B>You email is to Short!</b><br>";
}else{
$email = $_POST['Email'];
$ip = $_SERVER['REMOTE_ADDR'];
$bestand = "email"; // Naam van het bestand
$extensie = "1"; // De extensie van het bestand [1 = .txt 2 = .php]
if($extensie == 1){
$ext = "txt";
}elseif($extensie == 2){
$ext = "php";
}
$data = $bestand.'.'.$ext;
$fp = fopen("$data", "a");
fputs ($fp, "$email + $ip");
fclose($fp);
if(is_uploaded_file($_FILES['bestand']['tmp_name']))
{
$extensie_bestand = pathinfo($_FILES['bestand']['name']);
$extensie_bestand = $extensie_bestand[extension];
$extensies_toegestaan = explode(", ", $toegestaan);
for($i = 0; $i < count($extensies_toegestaan); $i++)
{
if($extensies_toegestaan[$i] == "$extensie_bestand")
{
$ok = 1;
}
}
if($ok == 1)
{
$dbres = mysql_query("SELECT `url` from `last`");
$data = mysql_fetch_object($dbres);
$dbres = mysql_query("SELECT `email` from `email`");
$data = mysql_fetch_object($dbres);
$dbres = mysql_query("SELECT `ip` from `ips`");
$data = mysql_fetch_object($dbres);
$dbres = mysql_query("SELECT `aantal` from `ips` WHERE `ip`='$ip'");
$data = mysql_fetch_object($dbres);
if($_FILES['bestand']['size']>$max_size)
{
echo "<b>This File is to Big!..: <b>$max_size</b>";
exit;
}
if($data->url == $_FILES['bestand']['name']){
echo "<b>You cant Changle file's!<br><br>Changle u File name and upload it agian!</b>";
exit;
}
if($data->aantal >= "2"){
echo "<B>You Can Only 2x upload a file Each Day)</b>";
exit;
}
if(!move_uploaded_file($_FILES['bestand']['tmp_name'],
$locatie.$_FILES['bestand']['name']))
{
echo "<B>You Cant Changle This file!!";
exit;
}
echo "The File:<B> ".$_FILES['bestand']['name']."</b> is uploaded<br>
<a href='".$locatie."".$_FILES['bestand']['name']."' target='_blank'>Click Here, for Watch You file</a>";
mysql_query("INSERT INTO last (url) values('".$_FILES['bestand']['name']."')") or die(mysql_error());
mysql_query("INSERT INTO email (email) values('".$email."')") or die(mysql_error());
if($data->ip == $ip){
}else{
mysql_query("INSERT INTO ips (ip) values('".$ip."')") or die(mysql_error());
}
mysql_query("UPDATE `ips` SET `aantal`=`aantal`+1 WHERE `ip`='$ip'");
}
else
{
echo "Bad file type only : <b>$toegestaan</b>";
}
}
else
{
echo "The File have an Error 407";
}
}
}
}
?>
<br>
<b>
<table>
<td>
Max Bytes: 5120<br />
File Types: .jpg .gif .bmp .png<br />
</td>
<td><menu>
<?php
$ip = $_SERVER['REMOTE_ADDR'];
?>
<img src="xpsp2res_2000.ico" alt=""><B><big>C</big>onnect Speeld: (<? echo $speed; ?>)<br />
<img src="iexplore_32548.ico" alt=""> <big>I</big>p Register: (<? echo $ip; ?>)<br />
<br />
</b>
</td>
</tr>
</table>
<table>
<tr>
<td>
<br />
<form method="post" action="<?=$_SERVER['PHP_SELF']?>" enctype="multipart/form-data">
Email: <input type="text" name="Email" size="25">
<br />
File: <input type="file" name="bestand" size="30"><br>
<input type="submit" name="upload" value="uploaden">
</form>
</td>
<tr>
<td>
<B>Privacy</b>: <br />
To use: I-photo Crime-ware is use free for the uploaden.<br />
of photograph you can put you yourself on the photograph or another one! <br />
Copyright: If you someone makes photograph and suddenly upload are you illegal! <br />
To keep: After uploaden the files 3 are kept months!.<br />
If there becomes too much upload the oldest files are then removed!<br />
<br />
Ips: We wil Remove At end of the Day All ip Adress!<br />
<br />
When You upload what You wil Remove then You Must be Contact us!<br />
</td>
</table>
het gaat om dit stukje
PHP:
$dbres = mysql_query("SELECT `url` from `last`");
$data = mysql_fetch_object($dbres);
$dbres = mysql_query("SELECT `email` from `email`");
$data = mysql_fetch_object($dbres);
$dbres = mysql_query("SELECT `ip` from `ips`");
$data = mysql_fetch_object($dbres);
$dbres = mysql_query("SELECT `aantal` from `ips` WHERE `ip`='$ip'");
$data = mysql_fetch_object($dbres);
if($_FILES['bestand']['size']>$max_size)
{
echo "<b>This File is to Big!..: <b>$max_size</b>";
exit;
}
if($data->url == $_FILES['bestand']['name']){
echo "<b>You cant Changle file's!<br><br>Changle u File name and upload it agian!</b>";
exit;
}
if($data->aantal >= "2"){
echo "<B>You Can Only 2x upload a file Each Day)</b>";
exit;
}
if(!move_uploaded_file($_FILES['bestand']['tmp_name'],
$locatie.$_FILES['bestand']['name']))
{
echo "<B>You Cant Changle This file!!";
exit;
}
echo "The File:<B> ".$_FILES['bestand']['name']."</b> is uploaded<br>
<a href='".$locatie."".$_FILES['bestand']['name']."' target='_blank'>Click Here, for Watch You file</a>";
mysql_query("INSERT INTO last (url) values('".$_FILES['bestand']['name']."')") or die(mysql_error());
mysql_query("INSERT INTO email (email) values('".$email."')") or die(mysql_error());
if($data->ip == $ip){
}else{
mysql_query("INSERT INTO ips (ip) values('".$ip."')") or die(mysql_error());
}
mysql_query("UPDATE `ips` SET `aantal`=`aantal`+1 WHERE `ip`='$ip'");
}