1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
$data = $_POST;
if ($_POST['do'] == "post" && !$err) // Si pas d erreur on envoie le formualire
{
if($image_verification) $captcha->resetCookie();
$data['price'] = 0 + str_replace(",", "", $data['price']);
$data['isevent'] = 0 + $data['isevent'];
$data['othercontactok'] = 0 + $data['othercontactok'];
// Generate code
$ip = $_SERVER['REMOTE_ADDR'];
$code = uniqid("$ip.");
$codemd5 = md5($code);
$data['adtitle'] = donne($data['adtitle']);
$data['addesc'] = FilterBadWords($data['addesc']);
$data['area'] = FilterBadWords($data['area']);
$data['name'] = FilterBadWords($data['name']);
foreach ($data as $k=>$v)
{
if ($k == "addesc") $data[$k] = mysql_escape_string(htmlspecialchars($v));
elseif (!is_array($v)) $data[$k] = mysql_escape_string(htmlspecialchars($v));
}
$sql_set = "SET adtitle = '$data[adtitle]',
addesc = '$data[addesc]',
cityid = '$data[cityid]',
area ='$data[area]',
phone ='$data[phone]',
name ='$data[name]',
email = '$data[email]',
showemail = '$data[showemail]',
password = '$data[password]',
code = '$code',
othercontactok = '$data[othercontactok]',
ip = '$ip',
verified = '$verified',
abused = 0,
enabled = '$enabled',
createdon = NOW(),
timestamp = NOW(),"; |
Partager