Within 7 days after making payment you have the right to ask us to cancel your advert and receive a full refund.
';
/*$formcontrol->formObject = $_SESSION['advert_data'];
//put a back to advert button on the payment gateway page so the user can go back
//and change the advert if they remember something etc.
$form = "\n".'';
$form .= $formcontrol->createjs();
$CONTENT .= $form;*/
break;
/*
* Login/Register - Personal details
*/
case 'register':
$title = ' - Personal Details';
/*
* We have a logged in user
*/
if(!empty($_SESSION['user'])){
$_SESSION['advert_action'] = 'pay';
header('Location: /classified/advert.html');
exit();
/*
* Make them login or register
*/
} else {
define("REGISTRATION",1);
define("CLASSIFIEDS",1);
define("ACTION",'add');
/*
* Redirect for login tries
*/
if(!empty($_POST['submit_login'])){
$id['pass'] = md5($_POST['pass']);
$id['username'] = $_POST['username'];
$user = userDB::getItem(2,$id);
if(!empty($user)){
$_SESSION['user'] = $user;
$_SESSION['advert_action'] = 'pay';
header('Location: /classified/advert.html');
exit();
}
}
$loginform .= '
';
$CONTENT .= $loginform;
include('../admin/_includes/actions/aeUsers.php');
$CONTENT .= $form;
}
break;
/*
* Preview the advert and show costs
*/
case 'preview':
$title = ' - Preview';
$advert = '
';
//if there is a photo but all other requirements for free advert are met, display a message telling them that
//without the image the ad would be free
if(!empty($_SESSION['advert_data']['photo1_name'])
&& $words<=$basewords
&& $itemprice < 100
&& $_SESSION['advert_data']['id_advert_category'] == 31) {
$CONTENT .= '
If you remove the picture your advert would be eligable
for the Bargain Basement promotion - pay £0 for adverts with
up to '.$basewords.' words on items under £100.
';
}
//if all requirements are met for bargain basement apart from the category, display a message
if(empty($_SESSION['advert_data']['photo1_name'])
&& $words<=$basewords
&& $itemprice < 100
&& $_SESSION['advert_data']['id_advert_category'] != 31) {
$CONTENT .= '
If you select the Bargain Basement category for your advert, it would be eligable
for the Bargain Basement promotion - pay £0 for adverts with
up to '.$basewords.' words and no image on items under £100.
';
}
//if there is a photo but all other requirements for free advert are met, display a message telling them that
//without the image the ad would be free
if(!empty($_SESSION['advert_data']['photo1_name'])
&& $words<=$basewords
&& $itemprice < 100
&& $_SESSION['advert_data']['id_advert_category'] != 31) {
$CONTENT .= '
If you remove the picture and select the Bargain Basement category
your advert would be eligable for the Bargain Basement promotion - pay £0
for adverts with up to '.$basewords.' words and no image on items under £100.
';
}
$CONTENT .= '
';
//ad went here
$formcontrol->formObject = $_SESSION['advert_data'];
/* THIS HAS BEEN COMMENTED OUT BECAUSE IT WAS CAUSING THE LOGIN FORM TO THINK
THAT IT HAD BEEN SUBMITTED EMPTY AND MAKING THE ERROR MESSAGES APPEAR */
/*$form .= $formcontrol->hidden("process",array(
FC_FILLFROM => $fillfrom
));*/
$form .= $formcontrol->hidden("advert_title",array(
FC_FILLFROM => $fillfrom
));
$form .= $formcontrol->hidden("content",array(
FC_FILLFROM => $fillfrom
));
$form .= $formcontrol->hidden("email",array(
FC_FILLFROM => $fillfrom
));
$form .= $formcontrol->hidden("phone",array(
FC_FILLFROM => $fillfrom
));
$form .= $formcontrol->hidden("website",array(
FC_FILLFROM => $fillfrom
));
$form .= $formcontrol->hidden("price",array(
FC_FILLFROM => $fillfrom
));
$form .= $formcontrol->hidden("issues",array(
FC_FILLFROM => $fillfrom
));
$form .= $formcontrol->hidden("id_advert_category",array(
FC_FILLFROM => $fillfrom
));
$form .= '