17
OK. Fixed the email form!
It's a register_globals thing. Mine are off.
I defined the vars in the new contact.php you posted and made a few other minor changes so the price and price 'type' now show in the email.
After line 12, add:
le="color: #000000"><?php if ($_POST['submit']) { // line 12 $id = !isset($_REQUEST['id'])? NULL : $_REQUEST['id']; $date = !isset($_REQUEST['date'])? NULL : $_REQUEST['date']; $namep = !isset($_REQUEST['namep'])? NULL : $_REQUEST['namep']; $ipnumber = !isset($_REQUEST['ipnumber'])? NULL : $_REQUEST['ipnumber']; $message = !isset($_REQUEST['message'])? NULL : $_REQUEST['message']; $monnaie = !isset($_REQUEST['monnaie'])? NULL : $_REQUEST['monnaie']; $typeprice = !isset($_REQUEST['typeprice'])? NULL : $_REQUEST['typeprice']; $pk_price = !isset($_REQUEST['pk_price'])? NULL : $_REQUEST['pk_price'];
Line 19, change:
le="color: #000000"><?php $result = $xoopsDB->query("select email, submitter, title, type, description, price FROM ".$xoopsDB->prefix("ads_listing")." WHERE lid = '$id'");
to:
le="color: #000000"><?php $result = $xoopsDB->query("select email, submitter, title, type, description, price, typeprice FROM ".$xoopsDB->prefix("ads_listing")." WHERE lid=$id");
Line 34, rem out:
le="color: #000000"><?php if ($price) { $price = ""._ADS_PRICE." ".$xoopsModuleConfig['ads_monnaie']." $price"; } else { $price = ""; }
And add:
le="color: #000000"><?php // pk build new price var if ($price > 0) { $pk_price .= ""._ADS_PRICE." ". $xoopsModuleConfig['ads_monnaie']." $monnaie $price - $typepricen"; }
Line 49 change:
le="color: #000000"><?php $message .= "$type : $titlen$pricen"._ADS_ANNONCE." :n $descriptionnn";
to:
le="color: #000000"><?php $message .= "$type : $titlen$pk_pricen"._ADS_ANNONCE." :n$descriptionnn";
It now correctly adds the IP address to the database too.
Only issue remaining AFAIK is the error generated if users fail to complete their 'real name' field in their profile.
A thread is for life. Not just for Christmas.