DavyJansen
Nieuwe gebruiker
- Lid geworden
- 13 jul 2014
- Berichten
- 2
Hoi,
Ik heb dringend hulp nodig met het inbouwen van een loading animatie na het klikken op de verzend knop in onderstaande code.
Dit is een formulier voor het plaatsen van een advertentie en ik wil dat de bezoeker na het invullen en toevoegen van afbeelding niet een stilstaand formulier te zien krijgen vanwege het op de achtergrond verwerken en uploaden van afbeeldingen wat afhankelijk van de gebruikers verbinding en de grote van foto's tegenwoordig enige tijd kan duren, en om de bezoeker niet te motiveren om de weg te gaan of de verzend knop nog tien keer in de drukken wil ik tijdens dit process dus een loading animatie tonen.
Kan iemand mij helpen met een kant en klare code voorbeeld? Alle hulp is welkom! alvast bedankt
Ik heb dringend hulp nodig met het inbouwen van een loading animatie na het klikken op de verzend knop in onderstaande code.
Dit is een formulier voor het plaatsen van een advertentie en ik wil dat de bezoeker na het invullen en toevoegen van afbeelding niet een stilstaand formulier te zien krijgen vanwege het op de achtergrond verwerken en uploaden van afbeeldingen wat afhankelijk van de gebruikers verbinding en de grote van foto's tegenwoordig enige tijd kan duren, en om de bezoeker niet te motiveren om de weg te gaan of de verzend knop nog tien keer in de drukken wil ik tijdens dit process dus een loading animatie tonen.
Kan iemand mij helpen met een kant en klare code voorbeeld? Alle hulp is welkom! alvast bedankt
Code:
[html]
<!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" lang="NL" xml:lang="NL">
<head>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title></title>
<meta name="Description" content="" />
<meta name="Keywords" content="" />
<meta name="robots" content="index, follow" />
<meta http-equiv="Content-Language" content="nl" />
<meta name="author" content="website.nl" />
<link rel="canonical" href="http://www.website.nl" />
<link rel="shortcut icon" href="http://www.website.nl/favicon.ico" />
<link rel="stylesheet" type="text/css" href="http://www.website.nl/css/main.css" media="screen" />
[/html]
[php]
include("/home/website/domains/website.nl/public_html/include/pass.php");
error_reporting(0);
include("/home/website/domains/website.nl/public_html/top.php");
include("inc.functions.picture.php");
include('htmLawed.php');
$config = array('safe'=>1, 'elements'=>'* -script -object');
function verwijder_url($url){
$url = str_replace("\\r","\r",$url);
$url = str_replace("\\n","\n<BR>",$url);
$url = str_replace("\\n\\r","\n\r",$url);
$in=array(
'`((?:https?|ftp)://\S+[[:alnum:]]/?)`si',
'`((?<!//)(www\.\S+[[:alnum:]]/?))`si'
);
return preg_replace($in,'<b>[LINK VERWIJDERD]</b>',$url);
}
if(isset($_COOKIE['CookieLogin']))
{
$query = mysql_query("SELECT * FROM leden WHERE lid_id = '" . addslashes($_COOKIE['CookieLogin']) . "'");
$result = mysql_num_rows($query);
while($object = mysql_fetch_object($query))
{
$lid_id = $object->lid_id;
$voornaam = $object->voornaam;
$achternaam = $object->achternaam;
$telefoonnummer = $object->telefoonnummer;
$email = $object->email;
$internet = $object->internet;
$plaats = $object->plaats;
$postcode = $object->postcode;
$provincie = $object->provincie;
}
}
if(isset($_POST["Subcategorie"]))
{
$Subcategorie = addslashes($_POST['Subcategorie']);
}
elseif(isset($_GET["Subcategorie"]) || isset($sub_au))
{
$Subcategorie = addslashes($_GET['Subcategorie']);
}
else
{
echo" ";
}
if($sub_au) {
$categorie_id = intval($_GET["Subcategorie"]);
} else {
$query = mysql_query("SELECT * FROM subcategorie WHERE subcategorie_id = '$Subcategorie'");
$result = mysql_num_rows($query);
while($object = mysql_fetch_object($query))
{
$subcategorie_id = $object->subcategorie_id;
$categorie_id = $object->categorie_id;
$subomschrijving = $object->omschrijving;
}
}
$query = mysql_query("SELECT * FROM categorie WHERE categorie_id = '$categorie_id'");
$result = mysql_num_rows($query);
while($object = mysql_fetch_object($query))
{
$categorie_id = $object->categorie_id;
$omschrijving = $object->omschrijving;
}
$query = mysql_query("SELECT * FROM categorie ");
$result = mysql_num_rows($query);
while($object = mysql_fetch_object($query))
{
$titel = $object->titel;
$keywords = $object->keywords;
$discription = $object->discription;
}
$sql = mysql_query("SELECT * FROM site");
$cssres = mysql_fetch_assoc($sql);
[/php]
<script type="text/javascript">
function textCounter(textarea, countdown, maxlimit)
{
textareaid = document.getElementById(textarea);
if (textareaid.value.length > maxlimit)
textareaid.value = textareaid.value.substring(0, maxlimit);
else
document.getElementById(countdown).value = '(Nog '+(maxlimit-textareaid.value.length)+' letters over)';
}
</script>
<script type="text/javascript">
function text2Counter(input, countdown, maxlimit)
{
inputid = document.getElementById(input);
if (inputid.value.length > maxlimit)
inputid.value = inputid.value.substring(0, maxlimit);
else
document.getElementById(countdown).value = '(Nog '+(maxlimit-inputid.value.length)+' letters over)';
}
</script>
<script type="text/javascript">
<!--
function maak_venster()
{
var popupURL = "opmaaktips.php";
window.open(popupURL,"venster",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=450,height=500');
}
function displayHTML(form)
{
var achternaam = document.form.InpAchternaam.value;
var email = document.form.InpEmail.value;
var telefoonnummer = document.form.InpTelefoonnummer.value;
var plaats = document.form.InpPlaats.value;
var land = document.form.InpProvincie.value;
var soort = document.form.InpSoort.value;
if (document.form.InpPrijs2.value == "")
var prijs = document.form.InpPrijs1.value;
else
var prijs = document.form.InpPrijs2.value;
var titel = document.form.InpTitel.value;
var tekst = document.form.InpTekst.value;
win = window.open("", 'popup', 'width=300, height=400, toolbar = no, status = no');
win.document.write("<html><head></head><body bgcolor=#ffffff leftmargin=0 topmargin=0>")
win.document.write("<table width=300 cellpadding=0 cellspacing=0>");
win.document.write("<tr><center><font color=#FFFFFF><h2><?=$taal[447];?></h2></font></center></tr>");
win.document.write("<tr bgcolor=#eeeeee>" + '<b><?=$taal[403];?></b> ' + achternaam + "<br>");
win.document.write("<tr bgcolor=#FFFFFF>" + '<b><?=$taal[289];?></b> ' + email + "<br>");
win.document.write("<tr bgcolor=#eeeeee>" + '<b><?=$taal[287];?></b> ' + telefoonnummer + "<br>");
win.document.write("<tr bgcolor=#FFFFFF>" + '<b><?=$taal[405];?></b> ' + plaats + "<br>");
win.document.write("<tr bgcolor=#eeeeee>" + '<b><?=$taal[448];?></b> ' + soort + "<br>");
win.document.write("<tr bgcolor=#FFFFFF>" + '<b><?=$taal[449];?></b> ' + prijs + "<br><br>");
win.document.write("<tr bgcolor=#eeeeee>" + '<b><?=$taal[450]?></b> ' + titel + "<br>");
win.document.write("<tr bgcolor=#FFFFFF>" + '<b><?=$taal[451];?></b> <br>' + tekst + "");
win.document.write("</table>");
win.document.write("</body></html>");
}
</script>
</head>
<body>
<script>
function CheckForm()
{
if (document.form.InpAchternaam.value == "")
{
alert("Vul een naam in");
document.form.InpAchternaam.focus();
}
else if (document.form.InpEmail.value == "")
{
alert("<?=$taal[48];?>\n<?=$taal[453];?>");
document.form.InpEmail.focus();
}
else if (document.form.InpPlaats.value == "")
{
alert("<?=$taal[48];?>\n<?=$taal[455];?>");
document.form.InpPlaats.focus();
}
else if (document.form.InpPostcode.value == "")
{
alert("<?=$taal[48];?>\n<?=$taal[454];?>");
document.form.InpPostcode.focus();
}
else if (document.form.InpProvincie.value == "")
{
alert("<?=$taal[48];?>\n<?=$taal[456];?>");
document.form.InpProvincie.focus();
}
else if (document.form.InpTitel.value == "")
{
alert("<?=$taal[48];?>\n<?=$taal[458]?>");
document.form.InpTitel.focus();
}
else if (document.form.InpTekst.value == "")
{
alert("<?=$taal[48];?>\n<? echo 'voer een beschrijving in van uw produkt/dienst' ?>");
document.form.InpTekst.focus();
}
else if (document.form.InpSoort.value == "")
{
alert("<?=$taal[48];?>\n<?=$taal[457]?>");
document.form.InpSoort.focus();
}
<?php if($omschrijving == "Auto's") { ?>
else if (document.form.InpBouwjaar.value == "")
{
alert("<?=$taal[48];?>\n<?=$taal[1163]?>");
document.form.InpBouwjaar.focus();
}
else if (document.form.InpBrandstof.value == "")
{
alert("<?=$taal[48];?>\n<?=$taal[1164]?>");
document.form.InpBrandstof.focus();
}
<?php } ?>
else
{
document.form.submit();
}
}
//-->
</script>
[php]
$omschrijving = stripslashes($omschrijving);
$subomschrijving = stripslashes($subomschrijving);
$len = strlen ($subomschrijving);
if ($len >= 26)
{
$achtervoegsel = "..";
$subomschrijving = substr ("$subomschrijving", 0, 26);
$subomschrijving .= $achtervoegsel;
}
[/php]
[html]
<div class="pagina_inhoud_categorie padding margin rounded-corners">
<div class="pagina_inhoud_titel margin-top">
U plaatst een <b>gratis</b> advertentie in: <b><? echo "$omschrijving" ?>-<? echo "$subomschrijving" ?></b> <a href="http://gratis-adverteren.website.nl">(wijzigen)</a>
</div>
<!----------begin van formulier-------------->
<div class="pagina_inhoud_gedeelte rounded-corners margin-top padding">
<form name="form" action="advertentie_plaatsen_vervolg.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="Action" value="Nieuw"/>
<input type="hidden" name="Bestand" value=""/>
<input type="hidden" name="Bestand1" value=""/>
<input type="hidden" name="Bestand2" value=""/>
<input type="hidden" name="Bestand3" value=""/>
<input type="hidden" name="Categorie" value="<? echo $categorie_id ?>"/>
<input type="hidden" name="Subcategorie" value="<? echo $subcategorie_id ?>"/>
<input type="hidden" name="lid_id" value="<? echo $lid_id ?>"/>
[/html]
[php]
if(isset($_COOKIE['CookieLogin']))
{
[/php]
[html]
<div class="float_left margin">
<div class="label_links small_font">
uw naam
</div>
<div class="label_rechts">
<input type="text" name="InpAchternaam" maxlength="100" class="input_velden" value="<? echo "{$voornaam}$achternaam"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
uw email
</div>
<div class="label_rechts">
<input type="text" name="InpEmail" maxlength="100" class="input_velden" value="<? echo "$email"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Telefoonnummer
</div>
<div class="label_rechts">
<input type="text" name="InpTelefoonnummer" maxlength="11" class="input_velden" value="<? echo "$telefoonnummer"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Woonplaats
</div>
<div class="label_rechts">
<input type="text" name="InpPlaats" maxlength="50" class="input_velden" value="<? echo "$plaats"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Postcode
</div>
<div class="label_rechts">
<input type="text" name="InpPostcode" maxlength="10" class="input_velden" value="<? echo "$postcode"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Provincie
</div>
<div class="label_rechts">
<select size="1" name="InpProvincie" class="input_velden">
[/html]
[php]
echo "<option value=\"$provincie\" SELECTED>$provincie</option>";
include "../include/provincie.php";
foreach($provincie as $key => $value) { ?>
<option value="<?=$value;?>"><?=$value;?></option>
<?php } ?>
</select>
</div>
</div>
<?
}
else
{
[/php]
[html]
<div class="float_left margin">
<div class="label_links small_font">
uw naam
</div>
<div class="label_rechts">
<input type="text" name="InpAchternaam" maxlength="100" class="input_velden" value="<? echo "{$voornaam}$achternaam"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
uw email
</div>
<div class="label_rechts">
<input type="text" name="InpEmail" maxlength="100" class="input_velden" value="<? echo "$email"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Telefoonnummer
</div>
<div class="label_rechts">
<input type="text" name="InpTelefoonnummer" maxlength="11" class="input_velden" value="<? echo "$telefoonnummer"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Woonplaats
</div>
<div class="label_rechts">
<input type="text" name="InpPlaats" maxlength="50" class="input_velden" value="<? echo "$plaats"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Postcode
</div>
<div class="label_rechts">
<input type="text" name="InpPostcode" maxlength="10" class="input_velden" value="<? echo "$postcode"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Provincie
</div>
<div class="label_rechts">
<select size="1" name="InpProvincie" class="input_velden">
[/html]
[php]
echo "<option value=\"$provincie\" SELECTED>$provincie</option>";
include "../include/provincie.php";
foreach($provincie as $key => $value) { ?>
<option value="<?=$value;?>"><?=$value;?></option>
<?php } ?>
</select>
</div>
</div>
[/php]
}
if($omschrijving == "Autos en diversen") { ?>
[html]
<div class="float_left margin">
<div class="label_links small_font">
Brandstof
</div>
<div class="label_rechts">
<select size="1" name="InpBrandstof">
<option value=""></option>
<option value="<?=$taal[1156];?>"><?=$taal[1156];?></option>
<option value="<?=$taal[1157];?>"><?=$taal[1157];?></option>
<option value="<?=$taal[1158];?>"><?=$taal[1158];?></option>
<option value="<?=$taal[1159];?>"><?=$taal[1159];?></option>
<option value="<?=$taal[1160];?>"><?=$taal[1160];?></option>
<option value="<?=$taal[1161];?>"><?=$taal[1161];?></option>
</select>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Bouwjaar
</div>
<div class="label_rechts">
<select size="1" name="InpBouwjaar">
<option value=""></option>
<?php
while ($i <= 50) {
$yy = date('Y') - $i;
echo ' <option value="'.$yy.'">'.$yy.'</option>';
$i++;
}
?>
</select>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Kilometer stand
</div>
<div class="label_rechts">
<input type="text" name="Inpkilometerstand" maxlength="11" class="input_velden" value="<? echo "$kilometerstand"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Gewicht
</div>
<div class="label_rechts">
<input type="text" name="Inpgewicht" maxlength="20" class="input_velden" value="<? echo "$gewicht"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Apk tot
</div>
<div class="label_rechts">
<input type="text" name="Inpapk" maxlength="20" class="input_velden" value="<? echo "$apk"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Vermogen
</div>
<div class="label_rechts">
<input type="text" name="Inpvermogen" maxlength="20" class="input_velden" value="<? echo "$vermogen"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Versnellingen
</div>
<div class="label_rechts">
<select size="1" name="Inpversnellingen">
<option value=""></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="Automaat">Automaat</option>
</select>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Aantal deuren
</div>
<div class="label_rechts">
<input type="text" name="Inpdeuren" maxlength="5" class="input_velden" value="<? echo "$deuren"; ?>"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Kleur
</div>
<div class="label_rechts">
<input type="text" name="Inpkleur" maxlength="20" class="input_velden" value="<? echo "$kleur"; ?>"/>
</div>
</div>
<?php } ?>
<div class="float_left margin">
<div class="label_links small_font">
Titel advertentie
</div>
<div class="label_rechts">
<input type="text" name="InpTitel" maxlength="50" class="input_velden"/></div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Beschrijving
</div>
<div class="label_rechts">
<textarea id="InpTekst" name="InpTekst" class="input_textarea"></textarea>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Soort
</div>
<div class="label_rechts">
<select size="1" name="InpSoort" class="input_velden">
<option value="Aangeboden">Aangeboden</option>
<option value="Gezocht">Gezocht</option>
</select>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Prijs
</div>
<div class="label_rechts">
<input type="text" name="InpPrijs1" maxlength="12" class="input_velden"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Of
</div>
<div class="label_rechts">
<select size="1" name="InpPrijs2" class="input_velden">
<option value=""></option>
<option value="Bieden">Bieden</option>
<option value="Ruilen">Ruilen</option>
<option value="Gratis">Gratis</option>
<option value="N.o.t.k">N.o.t.k (nader overeen te komen)</option>
<option value="N.v.t.">N.v.t. (niet van toepassing)</option>
<option value="T.e.a.b.">T.e.a.b. (tegen elk aannemelijk bod)</option>
<option value="Zie omschrijving">Zie omschrijving</option>
<option value="Op aanvraag">Op aanvraag</option>
</select></div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Levering
</div>
<div class="label_rechts">
<select size="1" name="InpLevering" class="input_velden">
<option value="Kies">Kies</option>
<option value="Ophalen">Ophalen</option>
<option value="Verzenden">Verzenden</option>
<option value="Ophalen of verzenden">Ophalen of verzenden</option>
</select>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Conditie
</div>
<div class="label_rechts">
<select size="1" name="Inpconditie" class="input_velden">
<option value="Kies">Kies</option>
<option value="Nieuw">Nieuw</option>
<option value="Zo goed als nieuw">Zo goed als nieuw</option>
<option value="Gebruikt">Gebruikt</option>
</select>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Website
</div>
<div class="label_rechts">
[/html]
[php]
if ($internet)
{
echo "<input type=\"text\" name=\"InpInternet\" class=\"input_velden\" value=\"$internet\">";
}
else
{
echo "<input type=\"text\" name=\"InpInternet\" class=\"input_velden\" value=\"http://\">";
}
[/php]
[html]
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Bieden
</div>
<div class="label_rechts">
<select size="1" name="InpBieden" class="input_velden">
<option value="1">Ja</option>
<option value="0">Nee</option>
</select>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Hoofdfoto
</div>
<div class="label_rechts">
<input name="bestand" type="file" id="bestand" class="input_velden"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Foto 2
</div>
<div class="label_rechts">
<input name="bestand_extra" type="file" id="bestand" class="input_velden"/>
</div>
</div>
<div class="float_left margin">
<div class="label_links small_font">
Foto 3
</div>
<div class="label_rechts">
<input name="bestand_extra1" type="file" id="bestand" class="input_velden"/>
</div>
<div class="label_rechts margin">
<input type="button" onClick="CheckForm();" class="input_velden" value="Plaats advertentie"/>
</div>
</div>
</form>
</div>
[/html]
[php]
if($_POST['Action'] == "Nieuw")
{
$Ip = $_SERVER['REMOTE_ADDR'];
$Categorie = $_POST['Categorie'];
$Categorie = htmLawed($Categorie, $config);
$Subcategorie = $_POST['Subcategorie'];
$Subcategorie = htmLawed($Subcategorie, $config);
$InpNaam = trim(strip_tags($_POST["InpAchternaam"]));
$InpNaam = htmLawed($InpNaam, $config);
$InpNaam = strip_tags($InpNaam);
$InpNaam = str_replace("<", "", $InpNaam);
$InpNaam = str_replace(">", "", $InpNaam);
//------------------------------------------
$InpEmail = $_POST['InpEmail'];
$InpEmail = htmLawed($InpEmail, $config);
$InpEmail = strip_tags($InpEmail);
$InpEmail = mysql_real_escape_string($InpEmail);
$InpEmail = str_replace("\"", """, $InpEmail);
$InpEmail = str_replace("<", "", $InpEmail);
$InpEmail = str_replace(">", "", $InpEmail);
//------------------------------------------
$InpWachtwoord = mysql_real_escape_string($_POST['InpWachtwoord']);
$InpWachtwoord = htmLawed($InpWachtwoord, $config);
$InpTelefoonnummer = $_POST['InpTelefoonnummer'];
$InpTelefoonnummer = htmLawed($InpTelefoonnummer, $config);
$InpTelefoonnummer = strip_tags($InpTelefoonnummer);
$InpTelefoonnummer = mysql_real_escape_string($InpTelefoonnummer);
$InpTelefoonnummer = str_replace("<", "", $InpTelefoonnummer);
$InpTelefoonnummer = str_replace(">", "", $InpTelefoonnummer);
$InpPlaats = $_POST['InpPlaats'];
$InpPlaats = htmLawed($InpPlaats, $config);
$InpPlaats = strip_tags($InpPlaats);
$InpPlaats = mysql_real_escape_string($InpPlaats);
$InpPlaats = str_replace("\"", """, $InpPlaats);
$InpPlaats = str_replace("<", "", $InpPlaats);
$InpPlaats = str_replace(">", "", $InpPlaats);
$InpProvincie = mysql_real_escape_string($_POST['InpProvincie']);
$InpProvincie = str_replace("\"", """, $InpProvincie);
$InpPostcode = $_POST['InpPostcode'];
$InpPostcode = htmLawed($InpPostcode, $config);
$InpPostcode = strip_tags($InpPostcode);
$InpPostcode = mysql_real_escape_string($InpPostcode);
$InpPostcode = str_replace("\"", """, $InpPostcode);
$InpPostcode = str_replace("<", "", $InpPostcode);
$InpPostcode = str_replace(">", "", $InpPostcode);
$InpSoort = mysql_real_escape_string($_POST['InpSoort']);
$InpSoort = str_replace("\"", """, $InpSoort);
$InpLevering = mysql_real_escape_string($_POST['InpLevering']);
$levering = str_replace("\"", """, $InpLevering);
$Inpconditie = mysql_real_escape_string($_POST['Inpconditie']);
$conditie = str_replace("\"", """, $Inpconditie);
$InpPrijs1 = $_POST['InpPrijs1'];
$InpPrijs1 = htmLawed($InpPrijs1, $config);
$InpPrijs1 = mysql_real_escape_string($InpPrijs1);
$InpPrijs1 = str_replace("\"", """, $InpPrijs1);
$InpPrijs1 = str_replace(",", ".", $InpPrijs1);
$InpPrijs1 = str_replace("<", "", $InpPrijs1);
$InpPrijs1 = str_replace(">", "", $InpPrijs1);
$InpPrijs2 = $_POST['InpPrijs2'];
$InpPrijs2 = htmLawed($InpPrijs2, $config);
$InpPrijs2 = mysql_real_escape_string($InpPrijs2);
$InpPrijs2 = str_replace("\"", """, $InpPrijs2);
$InpPrijs2 = str_replace("<", "", $InpPrijs2);
$InpPrijs2 = str_replace(">", "", $InpPrijs2);
# $InpPrijs2 = str_replace(",", ".", $InpPrijs2);
$InpTitel = $_POST['InpTitel'];
$InpTitel = htmLawed($InpTitel, $config);
$InpTitel = strip_tags($InpTitel);
$InpTitel = mysql_real_escape_string($InpTitel);
$InpTitel = str_replace("\"", """, $InpTitel);
$InpTitel = str_replace("?", "", $InpTitel);
$InpTitel = str_replace("<", "", $InpTitel);
$InpTitel = str_replace(">", "", $InpTitel);
//-----------------------------------------
$InpTekst = $_POST['InpTekst'];
$InpTekst = htmLawed($InpTekst, $config);
$InpTekst = strip_tags($InpTekst);
$InpTekst = mysql_real_escape_string($InpTekst);
$InpTekst = str_replace("\"", """, $InpTekst);
$InpTekst = str_replace("?", "", $InpTekst);
$InpTekst = str_replace("<", "", $InpTekst);
$InpTekst = str_replace(">", "", $InpTekst);
//-----------------------------------------
$InpInternet = $_POST['InpInternet'];
$InpInternet = htmLawed($InpInternet, $config);
$InpInternet = strip_tags($InpInternet);
$InpInternet = mysql_real_escape_string($InpInternet);
$InpInternet = str_replace("\"", """, $InpInternet);
$InpInternet = str_replace("<", "", $InpInternet);
$InpInternet = str_replace(">", "", $InpInternet);
$InpBieden = $_POST['InpBieden'];
$InpBieden = htmLawed($InpBieden, $config);
$InpBieden = strip_tags($InpBieden);
$InpBieden = mysql_real_escape_string($InpBieden);
$InpPaypal = $_POST['InpPaypal'];
$InpPaypal = htmLawed($InpPaypal, $config);
$InpPaypal = strip_tags($InpPaypal);
$InpPaypal = mysql_real_escape_string($InpPaypal);
$InpFilm = $_POST['InpFilm'];
$InpFilm = htmLawed($InpFilm, $config);
$InpFilm = strip_tags($InpFilm);
$InpFilm = mysql_real_escape_string($InpFilm);
$InpFilm = str_replace("\"", """, $InpFilm);
$InpFilm = str_replace("<", "", $InpFilm);
$InpFilm = str_replace(">", "", $InpFilm);
$kilometerstand = $_POST['Inpkilometerstand'];
$kilometerstand = htmLawed($kilometerstand);
$kilometerstand = addslashes($kilometerstand);
$brandstof = $_POST['InpBrandstof'];
$brandstof = htmLawed($brandstof);
$brandstof = mysql_real_escape_string($brandstof);
$bouwjaar = $_POST['InpBouwjaar'];
$bouwjaar = htmLawed($bouwjaar);
$bouwjaar = mysql_real_escape_string($bouwjaar);
$woorden = $_POST['Inpwoorden'];
$woorden = htmLawed($woorden, $config);
$woorden = strip_tags($woorden);
$woorden = str_replace(" ", " ", $woorden);
$woorden = str_replace(" ", " ", $woorden);
$woorden = str_replace(" ", " ", $woorden);
$woorden = str_replace(" ", ", ", $woorden);
$woorden = mysql_real_escape_string($woorden);
$vermogen = $_POST['Inpvermogen'];
$vermogen = htmLawed($vermogen);
$vermogen = strip_tags($vermogen);
$vermogen = mysql_real_escape_string($vermogen);
$deuren = $_POST['Inpdeuren'];
$deuren = htmLawed($deuren, $config);
$deuren = strip_tags($deuren);
$deuren = mysql_real_escape_string($deuren);
$apk = $_POST['Inpapk'];
$apk = htmLawed($apk, $config);
$apk = strip_tags($apk);
$apk = mysql_real_escape_string($apk);
$versnellingen = $_POST['Inpversnellingen'];
$versnellingen = htmLawed($versnellingen, $config);
$versnellingen = strip_tags($versnellingen);
$versnellingen = addslashes($versnellingen);
$kleur = $_POST['Inpkleur'];
$kleur = htmLawed($kleur, $config);
$kleur = strip_tags($kleur);
$kleur = mysql_real_escape_string($kleur);
$gewicht = $_POST['Inpgewicht'];
$gewicht = htmLawed($gewicht, $config);
$gewicht = strip_tags($gewicht);
$gewicht = mysql_real_escape_string($gewicht);
$acctmail = $_POST['accountemail'];
$acctmail = htmLawed($acctmail, $config);
$acctmail = strip_tags($acctmail);
$acctmail = mysql_real_escape_string($acctmail);
$acctmail = str_replace("\"", """, $acctmail);
$acctmail = str_replace("<", "", $acctmail);
$acctmail = str_replace(">", "", $acctmail);
$rembours = $_POST['rembours'];
$rembours = htmLawed($rembours, $config);
$rembours = strip_tags($rembours);
$rembours = mysql_real_escape_string($rembours);
$rembours = str_replace("\"", """, $rembours);
$vooruit = $_POST['vooruit'];
$vooruit = htmLawed($vooruit, $config);
$vooruit = strip_tags($vooruit);
$vooruit = mysql_real_escape_string($vooruit);
$vooruit = str_replace("\"", """, $vooruit);
$impressie = 0;
$populair2 = 0;
$bevestigd = 0;
function random_char($string)
{
$lenght = strlen($string);
$position = mt_rand(0, $lenght - 1);
return($string[$position]);
}
function random_string($charset_string, $lenght)
{
$return_string = "";
for ($x = 0; $x < $lenght; $x++)
{
$return_string .= random_char($charset_string);
}
return($return_string);
}
$cijfercode = rand(00000,9999999999);
mt_srand((double)microtime() * 1000000);
$charset = "abcdefghijklmnopqrstuvwxyz";
$random_string = random_string($charset, 5);
$code = $random_string;
$code .= $cijfercode;
if ($InpPrijs1 == "")
{
$InpPrijs = $InpPrijs2;
}
else
{
$InpPrijs = $InpPrijs1;
}
//alle checks gedaan, begin invoegen user en advertentie
if(!isset($_COOKIE['CookieLogin'])){
//}else{
$query = mysql_query("SELECT lid_id FROM leden WHERE email = '$InpEmail' ORDER BY lid_id DESC LIMIT 1");
$result = mysql_num_rows($query);
$object = mysql_fetch_array($query);
$lid_id = $object[lid_id];
if($result >= 1){
$mail_sturen_lid = 1;
}else{
$InpWachtwoord = rand(00000,99999);
//echo "INSERT INTO leden VALUES ('','$InpNaam', '', '$InpEmail', '$InpInternet', '$InpTelefoonnummer', '$InpPlaats', '$_POST[InpPostcode]', '$InpProvincie', '$InpWachtwoord')";
mysql_query("INSERT INTO leden VALUES ('','$InpNaam', '', '$InpEmail', '$InpInternet', '$InpTelefoonnummer', '$InpPlaats', '$InpPostcode', '$InpProvincie', '$InpWachtwoord')")or die(mysql_error());
$lid_id = mysql_insert_id();
}
/*$query = mysql_query("SELECT lid_id FROM leden WHERE email = '$InpEmail' ORDER BY lid_id DESC LIMIT 1");
$result = mysql_num_rows($query);
$object = mysql_fetch_object($query);
$lid_id = $object->lid_id;*/
}
//---$datum = date("Y-m-d");-----------
$naam = str_replace(" ","-",$InpTitel);
$naam = str_replace("'","-",$naam);
$naam = str_replace("\\","",$naam);
$naam = str_replace("/","",$naam);
$naam = str_replace("%","",$naam);
//---nieuw toegevoegd------------------
$naam = str_replace("(","-",$naam);
$naam = str_replace(")","-",$naam);
$naam = str_replace(":","-",$naam);
$naam = str_replace(";","-",$naam);
$naam = str_replace("?","-",$naam);
$naam = str_replace("!","-",$naam);
$naam = str_replace("€","-",$naam);
$naam = str_replace("@","-",$naam);
$naam = str_replace(array('.', ','), '-' , $naam);
$naam = str_replace("_","-",$naam);
$naam = str_replace("---","-",$naam);
$naam = str_replace("--","-",$naam);
//-------------------------------------
$naam = strtolower($naam);
$query2 = mysql_query("SELECT * FROM advertentie WHERE titel = '$naam' ");
$result = mysql_num_rows($query2);
if($result > 0)
{
$naam .= "$result";
}
$InpPostcode=strip_tags($InpPostcode);
$acctmail=strip_tags($acctmail);
$InpPrijs=strip_tags($InpPrijs);
$InpInternet=strip_tags($InpInternet);
//$InpTekst=strip_tags($InpTekst);
//---verwijdert alls behalve letters-cijfers en spaties en onderstaande leestekens----
//$InpTekst = preg_replace("/[^a-z \d+&@#\/%?=~_|!:)(,.;-]/i", "", $InpTekst);
//------------------------------------------------------------------------------------
//$InpTekst = verwijder_url($InpTekst);
//$InpTekst = htmLawed($InpTekst);
//---------htmLawed xss beveiliging benodigdheden-------------------------------------
//include("xss3.php");
//$InpTekst2 = stripslashes($InpTekst);
//$config = array('safe'=>1);
//$InpTekst = htmLawed($InpTekst2);
//------------------------------------------------------------------------------------
mysql_query("INSERT INTO advertentie VALUES ('','$lid_id','$Categorie','$Subcategorie', now(), '$InpSoort', '$InpPrijs', '$InpTitel', '$InpTekst', '$levering', '$conditie', '$impressie', '$bevestigd', '$code', '$Ip', '$InpInternet', '$InpBieden', '$InpPaypal', '$acctmail', '$rembours', '$vooruit', now(), '','$plaatje','' ,'','','','', '$naam', '','','$InpFilm', '$bouwjaar', '$brandstof', '$gewicht', '$kleur', '$vermogen', '$apk', '$versnellingen', '$deuren', '$kilometerstand', '$woorden', '$populair2')") or die(mysql_error()." op lijn ". __LINE__);
//mysql_query("INSERT INTO advertentie VALUES ('','$lid_id','$Categorie','$Subcategorie', now(), '$InpSoort', '$InpPrijs', '$InpTitel', '$InpTekst', '$InpLevering', '$impressie', '$bevestigd', '$code', '$Ip', '$InpInternet', '$InpBieden', '$InpPaypal', '$acctmail', '$rembours', '$vooruit', now(), '','$plaatje','' ,'','','','', '$naam', '','','$InpFilm', '$bouwjaar', '$brandstof')") or die(mysql_error()." op lijn ". __LINE__);
$advertentie_id = mysql_insert_id();
//krijg user id en advertentie id
/*
$query = mysql_query("SELECT * FROM advertentie ORDER BY advertentie_id DESC LIMIT 1 ");
$result = mysql_num_rows($query);
while($object = mysql_fetch_object($query))
{
$advertentie_id = $object->advertentie_id;
}*/
//$aan = $InpEmail;
$locatie = ("/home/website/domains/website.nl/public_html/advertenties/thumbs");
//////////////////////////////////////////////Plaatje/////////////////////////////////////////////////
upload_picture_1($_FILES['bestand']['tmp_name'],$locatie ,'612',$advertentie_id);
upload_picture_2($_FILES['bestand_extra']['tmp_name'],$locatie,'612',$advertentie_id);
upload_picture_3($_FILES['bestand_extra1']['tmp_name'],$locatie,'612',$advertentie_id);
upload_picture_4($_FILES['bestand_extra2']['tmp_name'],$locatie,'612',$advertentie_id);
upload_picture_5($_FILES['bestand_extra3']['tmp_name'],$locatie,'612',$advertentie_id);
upload_picture_6($_FILES['bestand_extra4']['tmp_name'],$locatie,'612',$advertentie_id);
//verkrijg lid informatie
$query = mysql_query("SELECT email,voornaam,achternaam FROM leden WHERE lid_id = '$lid_id'");
$result = mysql_num_rows($query);
while($object = mysql_fetch_object($query)){
$aan = $object->email;
$naam_lid = $object->voornaam;
$naam_lid .= " ";
$naam_lid .= $object->achternaam;
}
/*
if(isset($_COOKIE['CookieLogin'])){
}elseif($mail_sturen_lid == 1){
}else{
$onderwerp = "$taal[524] $sitenaam";
$naam = "$sitenaam";
$email = "$sitemail";
$InpNaam = str_replace("\'", "'", $InpNaam);
$body = "$taal[70] $InpNaam,\n\n";
$body .= "$taal[524] $sitenaam. $taal[525] \n\n";
$body .= "$taal[526] \n";
$body .= "$taal[45] $InpEmail\n";
$body .= "$taal[527] $InpWachtwoord\n\n";
$body .= "$taal[528] \n\n";
$body .= "$taal[529] \n\n";
$body .= "$taal[75] \n\n";
$body .= "$taal[76] $sitenaam\n";
$body .= "$siteurl\n";
$body .= "$sitemail\n\n\n";
$body .= "$taal[77] \n $taal[78] \n\n";
$body = str_replace(" ", " ", $body);
mail($aan, $onderwerp, $body,"From: $naam <$email>\r\nReply-To: $email\r\n");
}
*/
$query = mysql_query("SELECT * FROM subcategorie WHERE subcategorie_id = '$Subcategorie'");
$result = mysql_num_rows($query);
while($object = mysql_fetch_object($query))
{
$categorie_id = $object->categorie_id;
$subomschrijving = $object->omschrijving;
}
$query = mysql_query("SELECT * FROM categorie WHERE categorie_id = '$categorie_id'");
$result = mysql_num_rows($query);
while($object = mysql_fetch_object($query))
{
$omschrijving = $object->omschrijving;
}
$query = mysql_query("SELECT * FROM site LIMIT 0,1");
$result = mysql_num_rows($query);
while($object = mysql_fetch_object($query))
{
$limiet = $object->betaal_prijs2;
$bedrag = $object->bedrag;
}
include("taal.php");
$onderwerp = "$taal[530]";
// $body = "$taal[70] $InpNaam,\n\n";
/////////////////////////////////////////////
// Hier kiezen voor betaald of niet betaald//
$betaalde_advertenties = "Nee";
// //
/////////////////////////////////////////////
// $InpPrijs = number_format($InpPrijs, 2);
$limiet = number_format($limiet, 2);
/*if ($betaalde_advertenties == "Ja"){
if (($InpPrijs != "Bieden") && ($InpPrijs != "Ruilen") && ($InpPrijs != "Gratis") && ($InpPrijs != "N.o.t.k.") && ($InpPrijs != "N.v.t.") && ($InpPrijs != "T.e.a.b.")){
if ($InpPrijs >= $limiet){
$tarief = number_format($tarief,2);
$body .= "$taal[531] $tarief. $taal[532] \n\n";
}else{
$body .= "$taal[533] \n\n";
$body .= "$siteurl/verkopen/bevestigen.php?advertentiecode=$code&advertentie_id=$advertentie_id\n\n";
$body .= "$taal[534] \n\n";
}}else{
$body .= "$taal[533] \n\n";
$body .= "$siteurl/verkopen/bevestigen.php?advertentiecode=$code&advertentie_id=$advertentie_id\n\n";
$body .= "$taal[534] \n\n";
}
}else{
$body .= "$taal[533] \n\n";
$body .= "$siteurl/verkopen/bevestigen.php?advertentiecode=$code&advertentie_id=$advertentie_id\n\n";
$body .= "$taal[534] \n\n";
}
*/
if($mail_sturen_lid != 1){
/*-----------------------*/
//$onderwerp = "$taal[524] $sitenaam";
if(empty($InpWachtwoord)) {
$result = mysql_query("SELECT * FROM leden WHERE email = '$InpEmail' ") or die(mysql_error());
while($rij = mysql_fetch_array($result)) {
$InpWachtwoord = $rij['wachtwoord'];
}
}
$naam = "$sitenaam";
$email = "$sitemail";
$InpNaam = str_replace("\'", "'", $InpNaam);
$body = "$taal[70] $InpNaam,\n\n";
$body .= "$taal[524] $sitenaam. $taal[525] \n\n";
$body .= "$taal[526] \n";
$body .= "$taal[45] $InpEmail \n";
$body .= "$taal[527] $InpWachtwoord \n\n ------------------------------\n\n";
$body = str_replace(" ", " ", $body);
/*-----------------------*/
}else{
$body .= "$taal[70] $naam_lid,\n\n";
$body .= "$taal[543] $sitenaam $taal[544] $omschrijving $taal[545] $subomschrijving.\n\n";
}
$body .= "TIP!: surf naar je zojuist geplaatste advertentie op website.nl en 'tweet' en/of 'like' je eigen advertentie met de op de pagina aanwezige twitter en facebook knoppen. \n\n";
$body .= "$taal[33881] \n";
$body .= "https://twitter.com \n\n";
$body .= "$taal[33882] \n";
$body .= "https://www. \n\n";
$body .= "$taal[533] \n\n";
$body .= "$taal[5332] \n";
$body .= "$taal[5333] \n\n";
$body .= "$siteurl/advertenties/verlengen-omhoog.php?advertentie_id=$advertentie_id \n\n";
$body .= "$taal[534] \n\n";
$body .= "$taal[546]:\n";
$body .= "$siteurl/advertenties/advertentie.php?id=$advertentie_id\n\n";
$body .= "$taal[547]:\n";
$body .= "$siteurl/advertenties/wijzigen.php?advertentiecode=$code&advertentie_id=$advertentie_id\n\n";
$body .= "$taal[731]:\n";
$body .= "$siteurl/advertenties/wijzigen_categorie.php?advertentiecode=$code&advertentie_id=$advertentie_id\n\n";
$body .= "$taal[548]:\n";
$body .= "$siteurl/advertenties/verwijderen.php?advertentiecode=$code&advertentie_id=$advertentie_id\n\n";
$body .= "$taal[549]:\n";
$body .= "$siteurl/advertenties/bieding_verwijderen.php?advertentiecode=$code&advertentie_id=$advertentie_id\n\n";
/*-----------------------*/
$soort = $cssres[soort_betalen];
if ($cssres["show_18plus_top"])
$count = 1;
else {
$sql_18 = "select * from advertentie as a, categorie as c, subcategorie as s where a.advertentie_id=$advertentie_id and a.subcategorie_id=s.subcategorie_id and c.categorie_id=s.categorie_id and c.erotiek=0 and s.erotiek=0";
$result_18 = mysql_query($sql_18);
$count = mysql_num_rows($result_18);
mysql_free_result($result_18);
}
$body .= "$taal[535] \n";
$body .= "$taal[441] $omschrijving\n";
$body .= "$taal[443] $subomschrijving\n\n";
$InpTekst = str_replace("</p>", "\n\n", $InpTekst);
$InpTekst = str_replace("'", "'", $InpTekst);
$x = strpos($InpTekst, "<");
$y = strpos($InpTekst, ">");
$InpTekst1 = "";
$InpTekst2 = "";
while ($y > 0) {
if ($x > 0)
$InpTekst1 = substr($InpTekst, 0, $x);
$InpTekst2 = substr($InpTekst, $y + 1);
$InpTekst = $InpTekst1 . $InpTekst2;
$x = strpos($InpTekst, "<");
$y = strpos($InpTekst, ">");
}
$InpTitel = stripslashes($InpTitel);
$InpTitel = str_replace("\'", "'", $InpTitel);
$body .= "$taal[536] $InpTitel\n";
$body .= "$taal[537] $InpPrijs\n\n";
$body .= "$InpTekst\n\n";
$body .= "$taal[75] \n\n";
$body .= "$taal[76] $sitenaam\n";
$body .= "$siteurl\n";
$body .= "$sitemail\n\n\n";
$body = str_replace(" ", " ", $body);
// if (mail("$aan", "$onderwerp", "$body" ,"From: $sitenaam <$sitemail>\r\nReply-To: $sitemail\r\n"))
//echo "mail($aan, $onderwerp, $body,\"From: $sitenaam <$sitemail>\r\nReply-To: $sitemail\r\n\")"; die();
if (mail($aan, $onderwerp, $body,"From: $sitenaam <$sitemail>\r\nReply-To: $sitemail\r\n"))
{
?>
<script language="javascript">
alert("<?=$taal[538];?>");
</script>
<?
echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; url=bevestigen.php?advertentiecode=$code&advertentie_id=$advertentie_id\">";
}
else
{
?>
<script language="javascript">
alert("Mislukt...vul een geldige emailadress in aub!");
</script> <?
echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; url=http://adverteren.website.nl\">";
}
}
[/php]
<? echo "$analytics"; ?>
</body>
Laatst bewerkt: