@ 2015-11-23T18:32:21Z <?php
//Include the database
include ('../media/connect_mysql.php');
### Konfiguration ###
# Bitte passen Sie die folgenden Werte an, bevor Sie das Script benutzen!
# An welche Adresse sollen die Mails gesendet werden?
$strEmpfaenger = 'mail@hexdesign.de';
# Welche Adresse soll als Absender angegeben werden?
# (Manche Hoster lassen diese Angabe vor dem Versenden der Mail ueberschreiben)
$strFrom = '"Homepage Terra-Roxa" <terrarox@pt.lu>';
# Welchen Betreff sollen die Mails erhalten?
$strSubject = 'Bestellung von Terra-Roxa Homepage';
# Zu welcher Seite soll als "Danke-Seite" weitergeleitet werden?
# Wichtig: Sie muessen hier eine gueltige HTTP-Adresse angeben!
$strReturnhtml = 'http://www.terra-roxa.com/media/danke.htm';
# Welche(s) Zeichen soll(en) zwischen dem Feldnamen und dem angegebenen Wert stehen?
$strDelimiter = " : ";
$ip=$_SERVER["REMOTE_ADDR"];
echo mysql_error();
### Ende Konfiguration ###
if($_POST)
{
$strMailtext = "";
$strMailtext .= "\n"
. "Un ordre de " . $_POST["firma_rechnung"] . "\n"
. "\n"
. "Adresse De facturation \n"
. "\n"
. " Nom: " . $_POST["name_rechnung"] . "\n"
. " Adresse: " . $_POST["strasse_rechnung"] . "\n"
. " Code postal: " . $_POST["plz_rechnung"] . "\n"
. " Ville: " . $_POST["ort_rechnung"] . "\n"
. " Téléphone: " . $_POST["telefon_rechnung"] . "\n"
. " Email: " . $_POST["email_rechnung"] . "\n"
. "\n"
. "Votre message: " . $_POST["message"] . "\n"
. "\n"
. "Adresse de livraison (si différente)\n"
. "\n"
. " Adresse: " . $_POST["strasse_lieferung"] . "\n"
. " Code postal: " . $_POST["plz_lieferung"] . "\n"
. " Ville: " . $_POST["ort_lieferung"] . "\n"
. "\n"
. "IP-Adresse: " . $ip . "\n"
. "\n";
echo mysql_error();
while(list($strName,$value) = each($_POST))
{
if(is_array($value))
{
foreach($value as $value_array)
{
$strMailtext = str_replace("_", " ", $strMailtext);
$strMailtext .= $strDelimiter."\n";
}
}
elseif ($value != '0')
{
unset($_POST["firma_rechnung"]);
unset($_POST["name_rechnung"]);
unset($_POST["strasse_rechnung"]);
unset($_POST["plz_rechnung"]);
unset($_POST["ort_rechnung"]);
unset($_POST["telefon_rechnung"]);
unset($_POST["email_rechnung"]);
unset($_POST["message"]);
unset($_POST["strasse_lieferung"]);
unset($_POST["plz_lieferung"]);
unset($_POST["ort_lieferung"]);
$strMailtext = str_replace("_", " ", $strMailtext);
$strMailtext .= $strName. " Pièces par colis " .$strDelimiter.$value. " carton(s) \n";
$strMailtext = str_replace("_", " ", $strMailtext);
}
}
if(get_magic_quotes_gpc())
{
$strMailtext = stripslashes($strMailtext);
}
mail($strEmpfaenger, $strSubject, $strMailtext, "From: ".$strFrom)
or die("Die Mail konnte nicht versendet werden.");
header("Location: $strReturnhtml");
exit;
}
$manufact = array("Biscuits Filet Bleu","Chocolat Schönenberger AG","Confiserie De Fries","Confiserie Mathez","Dimabel bvba","dwp e.g.","Ethiquable","Fair Naturally","Fair Squared GmbH","Fair Wein GmbH","Gepa","Idé Coffee Systems","KeyPharm Laboratories","Label Place","Maya Fair trade","Moulin J.P. Dieschburg","Natur'Inov","NJD COSMETICS","Oxfam Fair trade","Savonnerie Marius FABRE","Vermeiren Princeps");
$label = array("DWP","ECOcert","Fair+bio","Fairtrade","Gepa Fair+","Max Havelaar","Naturland Fair","Oxfam Fairtrade","Transfair");
$q = "SELECT a.product_id, a.product_sku, a.product_s_desc, a.product_special, a.product_name,
a.product_packaging, b.product_id, b.product_price, b.shopper_group_id, c.product_id,
c.manufacturer_id, d.manufacturer_id, d.mf_name, e.category_id, e.category_name,
f.category_id, f.product_id
FROM jos_vm_product AS a, jos_vm_product_price AS b, jos_vm_product_mf_xref AS c,
jos_vm_manufacturer AS d, jos_vm_category AS e, jos_vm_product_category_xref AS f
WHERE a.product_id = b.product_id
AND a.product_id = f.product_id
AND e.category_id = f.category_id
AND b.product_id = c.product_id
AND b.shopper_group_id = '5'
AND NOT c.manufacturer_id = '186'
AND c.manufacturer_id = d.manufacturer_id
ORDER BY d.mf_name, e.category_name, b.product_id";
$result = mysql_query($q, $link);
echo mysql_error();
$max = 50;
?>
<!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" xml:lang="de">
<head>
<title>Bestellformular Terra-Roxa</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style>
p {
border-bottom: 2px solid #990000;
background-color: #CCCCCC;
padding: 0px;
clear: both;
}
</style>
<script type="text/javascript">
function berechnen() {
erg = document.getElementById('$row[feld1]').value * document.getElementById('$row[feld2]').value;
document.getElementById('$row[ergebnis]').innerHTML = erg;
}
</script>
</head>
<body>
<form action="<?php print $_SERVER['PHP_SELF']; ?>" method="post" name="autoSumForm">
<!-- Hier die eigentlichen Formularfelder eintragen. Die folgenden sind Beispielangaben. -->
<hr align="left" color="#990000" size="2" width="550">
<table width="550" border="0" bgcolor="#CCCCCC">
<tr>
<td colspan="2" height="30"><b>Adresse de facturation</b></td>
</tr>
<tr>
<td align="left" width="200">Société:</td>
<td align="left" width="220"><input type="text" size="30" name="firma_rechnung"></td>
</tr>
<tr>
<td align="left" width="200">Votre nom:</td>
<td align="left" width="220"><input type="text" size="30" name="name_rechnung"></td>
</tr>
<tr>
<td align="left" width="200">Votre rue:</td>
<td align="left" width="220"><input type="text" size="30" name="strasse_rechnung"></td>
</tr>
<tr>
<td align="left" width="200">Votre code postal:</td>
<td align="left" width="220"><input type="text" size="30" name="plz_rechnung" placeholder="12345"></td>
</tr>
<tr>
<td align="left" width="200">Votre lieu:</td>
<td align="left" width="220"><input type="text" size="30" name="ort_rechnung"></td>
</tr>
<tr>
<td align="left" width="200">Votre téléphone:</td>
<td align="left" width="220"><input type="text" size="30" name="telefon_rechnung"></td>
</tr>
<tr>
<td align="left" width="200">Votre E-Mail:</td>
<td align="left" width="220"><input type="text" size="30" name="email_rechnung"></td>
</tr>
<tr>
<td align="left" width="200">Message:</td>
<td colspan="4" width="300"><textarea name="message" size="300" rows="6" cols="59">Message</textarea></td>
</tr>
</table>
<hr align="left" color="#990000" size="2" width="550">
<table width="550" border="0" bgcolor="#CCCCCC">
<tr>
<td colspan="2" height="30"><b>Adresse de livraison (si différente)</b></td>
</tr>
<tr>
<td align="left" width="200">Votre rue:</td>
<td align="left" width="220"><input type="text" size="30" name="strasse_lieferung"></td>
</tr>
<tr>
<td align="left" width="200">Votre code postal:</td>
<td align="left" width="220"><input type="text" size="30" name="plz_lieferung" placeholder="12345"></td>
</tr>
<tr>
<td align="left" width="200">Votre lieu:</td>
<td align="left" width="220"><input type="text" size="30" name="ort_lieferung"></td>
</tr>
</table>
<hr align="left" color="#990000" size="2" width="550">
<br>
<table>
<tr>
<td><p>Produits fair-trade triés par fournisseur et catégorie</p></td>
</tr>
</table>
<table border="0">
<tr>
<td width="120"><p>Code article</p></td>
<td width="320"><p>Désignation</p></td>
<td width="150"><p>Label</p></td>
<td width="150"><p>Pièces par colis</p></td>
<td width="150"><p>Carton</p></td>
<td width="150"><p>Paquet</p></td>
</tr>
</table>
<?php
while($row = mysql_fetch_array($result))
{
$stueck = '';
$feld1 = $row['feld1'];
$feld2 = $row['feld2'];
$ergebnis = $row['ergebnis'];
$category_name = $row['category_name'];
$category_id = $row['category_id'];
$product_id = $row['product_id'];
$product_sku = $row['product_sku'];
$product_special = $row['product_special'];
$product_s_desc = $row['product_s_desc'];
if ($product_special == 'N')
{
$product_special = '-';
} else {
$product_special = 'Bio';
}
$product_s_desc = $row['product_s_desc'];
if ($product_s_desc == '0')
{
$product_s_desc = '-';
} else {
$product_s_desc = $product_s_desc;
}
$mf_name = $row['mf_name'];
$product_name = $row['product_name'];
$product_packaging = $row['product_packaging'];
$product_packaging .= " paquets";
$product_price = number_format($row['product_price'], 2, ',', ' ');
$product_price .= ' €';
$shopper_group_id = $row['shopper_group_id'];
if ($product_s_desc != '')
{
if ( $category_id == $category_id_old OR $category_name == $category_name_old )
{
echo "<table border='0'>";
echo "<tr>";
echo "<td width='120'>" . $row[product_sku] . "</td>";
echo "<td width='320'>" . $row[product_name] . "</td>";
echo "<td width='150'>" . $row[product_s_desc] . "</td>";
echo "<td width='150'>" . $row[product_packaging] . " Pièces par colis</td><input type='hidden' id='$row[feld1]' value='$row[product_packaging]' onChange='berechnen()'>";
echo "<td width='150'><input id='$row[feld2]' type='number' maxlength='3' size='1' name='$row[product_sku] $row[product_name] \t' value='0' onChange='berechnen()'></td>";
echo "<td width='150'><div id='row$[ergebnis]'></div></td>";
echo "</table>";
}
else
{
if ( $mf_name != $mf_name_old)
{
echo "<table border='0'>";
echo "<tr>";
echo "<td width='910'><p>" . $row[mf_name] . "</p></td>";
echo "</tr>";
echo "</table>";
}
else
{
$y_axis = $y_axis;
}
echo "<table border='0'>";
echo "<tr>";
echo "<td width='910' bgcolor='#CCCCCC'>" . $row[category_name] . "</td>";
echo "</tr>";
echo "</table>";
echo "<table border='0'>";
echo "<tr>";
echo "<td width='120'>" . $row[product_sku] . "</td>";
echo "<td width='320'>" . $row[product_name] . "</td>";
echo "<td width='150'>" . $row[product_s_desc] . "</td>";
echo "<td width='150'>" . $row[product_packaging] . " Pièces par colis</td><input type='hidden' id='$row[feld1]' value='$row[product_packaging]' onChange='berechnen()'>";
echo "<td width='150'><input id='$row[feld2]' type='number' maxlength='3' size='1' name='$row[product_sku] $row[product_name] \t' value='0' onChange='berechnen()'></td>";
echo "<td width='150'><div id='$row[ergebnis]'></div></td>";
}
}
$y_axis = $y_axis + 3;
$i = $i + 1;
$category_id_old = $category_id;
$category_name_old = $category_name;
$mf_name_old = $mf_name;
$feld1 = $feld1 + 1;
$feld2 = $feld2 + 1;
$ergebnis = $ergebnis + 1;
}
echo mysql_error();
mysql_close($link);
?>
<br><br>
<input type="submit" value="Absenden / Envoyer" />
<input type="reset" value="Reset / Effacer" />
</form>
<br><br><br>
</body>
</html>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 8.3.6 0.011 0.007 18.55 8.3.5 0.016 0.003 21.92 8.3.4 0.004 0.011 18.97 8.3.3 0.012 0.004 19.01 8.3.2 0.006 0.003 20.47 8.3.1 0.004 0.004 21.90 8.3.0 0.008 0.000 19.50 8.2.18 0.007 0.014 18.66 8.2.17 0.011 0.004 22.96 8.2.16 0.007 0.007 20.49 8.2.15 0.003 0.005 24.18 8.2.14 0.007 0.003 24.66 8.2.13 0.005 0.003 20.64 8.2.12 0.000 0.008 26.35 8.2.11 0.010 0.000 20.47 8.2.10 0.009 0.003 18.29 8.2.9 0.003 0.005 19.30 8.2.8 0.004 0.004 17.97 8.2.7 0.006 0.003 17.75 8.2.6 0.000 0.008 18.16 8.2.5 0.003 0.005 18.07 8.2.4 0.000 0.008 19.59 8.2.3 0.007 0.000 20.68 8.2.2 0.003 0.006 17.85 8.2.1 0.003 0.005 18.19 8.2.0 0.006 0.003 18.29 8.1.28 0.013 0.010 25.92 8.1.27 0.004 0.004 23.91 8.1.26 0.005 0.003 28.09 8.1.25 0.005 0.003 28.09 8.1.24 0.009 0.000 22.17 8.1.23 0.012 0.000 18.04 8.1.22 0.005 0.003 17.89 8.1.21 0.003 0.006 18.77 8.1.20 0.003 0.006 17.60 8.1.19 0.000 0.008 17.64 8.1.18 0.005 0.003 18.10 8.1.17 0.000 0.008 18.65 8.1.16 0.007 0.000 22.13 8.1.15 0.008 0.000 18.97 8.1.14 0.004 0.008 19.74 8.1.13 0.004 0.004 17.86 8.1.12 0.005 0.003 17.64 8.1.11 0.000 0.008 17.59 8.1.10 0.004 0.004 17.58 8.1.9 0.000 0.010 17.68 8.1.8 0.006 0.003 17.52 8.1.7 0.003 0.003 17.43 8.1.6 0.003 0.005 17.75 8.1.5 0.000 0.008 17.71 8.1.4 0.003 0.005 17.74 8.1.3 0.005 0.003 17.91 8.1.2 0.000 0.010 17.80 8.1.1 0.004 0.004 17.72 8.1.0 0.003 0.005 17.71 8.0.30 0.002 0.005 18.77 8.0.29 0.004 0.004 17.00 8.0.28 0.000 0.007 18.54 8.0.27 0.004 0.004 17.16 8.0.26 0.007 0.000 17.50 8.0.25 0.003 0.003 17.25 8.0.24 0.006 0.003 17.24 8.0.23 0.004 0.004 17.13 8.0.22 0.003 0.003 17.18 8.0.21 0.006 0.003 17.14 8.0.20 0.003 0.003 17.13 8.0.19 0.008 0.000 17.14 8.0.18 0.000 0.009 17.20 8.0.17 0.004 0.004 17.19 8.0.16 0.005 0.003 17.16 8.0.15 0.006 0.003 17.19 8.0.14 0.000 0.008 17.12 8.0.13 0.003 0.005 13.61 8.0.12 0.000 0.008 17.04 8.0.11 0.004 0.004 17.09 8.0.10 0.008 0.000 17.05 8.0.9 0.007 0.000 17.24 8.0.8 0.006 0.010 17.11 8.0.7 0.008 0.000 17.22 8.0.6 0.002 0.005 17.09 8.0.5 0.003 0.005 16.99 8.0.3 0.005 0.017 17.13 8.0.2 0.009 0.013 17.46 8.0.1 0.004 0.004 17.04 8.0.0 0.008 0.015 16.98 7.4.33 0.005 0.000 16.76 7.4.32 0.003 0.005 16.79 7.4.30 0.000 0.007 16.80 7.4.29 0.008 0.000 16.75 7.4.28 0.006 0.003 16.68 7.4.27 0.004 0.004 16.73 7.4.26 0.007 0.000 16.73 7.4.25 0.004 0.004 16.59 7.4.24 0.003 0.005 16.71 7.4.23 0.004 0.004 16.74 7.4.22 0.010 0.016 16.84 7.4.21 0.010 0.010 16.65 7.4.20 0.000 0.007 16.87 7.4.16 0.016 0.000 16.80 7.4.15 0.014 0.010 17.40 7.4.14 0.011 0.008 17.86 7.4.13 0.007 0.011 16.68 7.4.12 0.005 0.019 16.70 7.4.11 0.007 0.010 16.76 7.4.10 0.015 0.009 16.91 7.4.9 0.000 0.018 16.72 7.4.8 0.007 0.011 19.39 7.4.7 0.009 0.009 16.71 7.4.6 0.007 0.010 16.77 7.4.5 0.009 0.009 16.78 7.4.4 0.009 0.009 16.66 7.4.3 0.007 0.016 16.60 7.4.0 0.005 0.009 15.13 7.3.33 0.003 0.006 13.43 7.3.32 0.003 0.003 13.46 7.3.31 0.004 0.004 16.40 7.3.30 0.003 0.003 16.42 7.3.29 0.005 0.009 16.57 7.3.28 0.014 0.007 16.63 7.3.27 0.012 0.006 17.40 7.3.26 0.006 0.019 16.55 7.3.25 0.006 0.013 16.49 7.3.24 0.009 0.008 16.50 7.3.23 0.010 0.007 16.82 7.3.21 0.009 0.013 16.64 7.3.20 0.010 0.007 16.42 7.3.19 0.008 0.012 16.55 7.3.18 0.010 0.006 16.57 7.3.17 0.016 0.006 16.80 7.3.16 0.012 0.009 16.52 7.3.12 0.010 0.010 15.13 7.3.11 0.004 0.015 15.16 7.3.10 0.004 0.011 15.05 7.3.9 0.009 0.003 14.96 7.3.8 0.004 0.015 14.94 7.3.7 0.006 0.006 15.11 7.3.6 0.003 0.013 15.10 7.3.5 0.004 0.007 15.05 7.3.4 0.004 0.004 14.72 7.3.3 0.004 0.011 14.94 7.3.2 0.003 0.010 16.64 7.3.1 0.007 0.003 16.71 7.3.0 0.004 0.007 16.79 7.2.33 0.025 0.025 16.57 7.2.32 0.007 0.011 16.76 7.2.31 0.010 0.007 16.75 7.2.30 0.003 0.016 16.91 7.2.29 0.007 0.011 17.04 7.2.25 0.013 0.007 14.83 7.2.24 0.011 0.011 15.08 7.2.23 0.012 0.006 15.24 7.2.22 0.003 0.006 15.08 7.2.21 0.006 0.006 15.18 7.2.20 0.000 0.016 15.26 7.2.19 0.006 0.006 15.14 7.2.18 0.000 0.009 15.11 7.2.17 0.004 0.004 15.16 7.2.6 0.004 0.011 17.11 7.2.0 0.003 0.009 19.70 7.1.33 0.003 0.015 15.74 7.1.32 0.003 0.007 16.08 7.1.31 0.003 0.009 15.52 7.1.30 0.008 0.003 15.73 7.1.29 0.008 0.000 15.90 7.1.28 0.005 0.005 15.66 7.1.27 0.000 0.011 15.42 7.1.26 0.000 0.010 15.92 7.1.20 0.007 0.014 15.68 7.1.10 0.007 0.007 18.00 7.1.7 0.000 0.007 16.93 7.1.6 0.006 0.019 19.36 7.1.5 0.003 0.013 17.00 7.1.0 0.003 0.077 22.49 7.0.20 0.007 0.004 16.73 7.0.10 0.017 0.073 20.11 7.0.9 0.003 0.087 20.11 7.0.8 0.010 0.073 20.10 7.0.7 0.007 0.083 20.01 7.0.6 0.003 0.083 20.22 7.0.5 0.017 0.077 20.46 7.0.4 0.000 0.083 20.04 7.0.3 0.017 0.073 20.11 7.0.2 0.010 0.083 20.18 7.0.1 0.013 0.070 20.04 7.0.0 0.010 0.083 19.94 5.6.28 0.000 0.057 21.10 5.6.25 0.003 0.080 20.78 5.6.24 0.000 0.090 20.64 5.6.23 0.010 0.083 20.60 5.6.22 0.000 0.070 20.80 5.6.21 0.007 0.073 20.75 5.6.20 0.007 0.063 21.14 5.6.19 0.007 0.083 21.13 5.6.18 0.017 0.037 21.06 5.6.17 0.003 0.060 21.22 5.6.16 0.010 0.080 21.00 5.6.15 0.000 0.073 21.16 5.6.14 0.023 0.060 21.04 5.6.13 0.010 0.083 21.11 5.6.12 0.003 0.050 21.07 5.6.11 0.020 0.060 21.05 5.6.10 0.010 0.083 21.05 5.6.9 0.010 0.083 21.05 5.6.8 0.000 0.083 20.54 5.6.7 0.013 0.040 20.50 5.6.6 0.013 0.070 20.55 5.6.5 0.003 0.073 20.48 5.6.4 0.007 0.050 20.49 5.6.3 0.007 0.053 20.49 5.6.2 0.007 0.050 20.41 5.6.1 0.013 0.077 20.57 5.6.0 0.017 0.070 20.34 5.5.38 0.010 0.053 20.46 5.5.37 0.020 0.047 20.41 5.5.36 0.003 0.083 20.50 5.5.35 0.000 0.087 20.40 5.5.34 0.010 0.077 20.86 5.5.33 0.010 0.067 20.98 5.5.32 0.017 0.070 20.70 5.5.31 0.010 0.083 20.95 5.5.30 0.013 0.077 20.82 5.5.29 0.017 0.073 20.94 5.5.28 0.010 0.040 20.81 5.5.27 0.010 0.080 20.77 5.5.26 0.003 0.090 20.65 5.5.25 0.010 0.080 20.60 5.5.24 0.007 0.083 20.23 5.5.23 0.013 0.073 20.08 5.5.22 0.023 0.057 20.26 5.5.21 0.013 0.073 20.33 5.5.20 0.003 0.083 20.29 5.5.19 0.010 0.073 20.14 5.5.18 0.010 0.073 20.28 5.5.16 0.007 0.077 20.26 5.5.15 0.013 0.040 20.04 5.5.14 0.010 0.077 20.28 5.5.13 0.003 0.080 20.26 5.5.12 0.010 0.070 20.31 5.5.11 0.013 0.070 20.27 5.5.10 0.010 0.073 20.14 5.5.9 0.017 0.063 20.12 5.5.8 0.013 0.057 20.14 5.5.7 0.003 0.077 20.11 5.5.6 0.007 0.077 20.05 5.5.5 0.000 0.077 20.13 5.5.4 0.007 0.047 20.10 5.5.3 0.017 0.063 20.09 5.5.2 0.003 0.070 20.15 5.5.1 0.007 0.063 20.19 5.5.0 0.013 0.077 20.07
preferences:dark mode live preview
59.16 ms | 401 KiB | 5 Q