getList(); $count = count($list); $col1 = ceil($count/3); $col2 = ceil($count/3); $col3 = $count - $col1 - $col2; # captcha #include_once 'admin/models/captcha/Securimage.php'; $Securimage = new Securimage; if($_POST['action']=='submit') { $Validate = new validate(); $Validate->set('name','trim|name'); $Validate->set('email','trim|email'); $Validate->set('password','trim|required'); $Validate->set('terms_agree','trim|required', "Terms and Conditions", "Please read and agree to the Terms and Conditions before creating your account."); $validateResult = $Validate->run(); $form = $Validate->get(); if($Securimage->check($_POST['captcha_code']) == false) { trigger_error("The security code entered was incorrect. Please try again.",512); } else { if($validateResult === false) # not valid { trigger_error($Validate->errors(),512); if($Listings->checkEmailAddress($form['email'])) { trigger_error("The email address that you provided is already used on an account. You can't have two accounts with the same email address.",512); } } else # valid { if($Listings->checkEmailAddress($form['email'])) { trigger_error("The email address that you provided is already used on an account. You can't have two accounts with the same email address.",512); } else { $form['status'] = 'disabled'; $form['created'] = date("Y-m-d H:i:s"); $form['listing_expires'] = date("Y-m-d H:i:s", mktime(0,0,0,date("m"),date("d"),date("Y")+1) ); $form['last_renewed'] = date("Y-m-d H:i:s"); $form['password'] = hash('sha1', $form['password']); $form['path'] = cleaner::filePath(str_replace(' ','-',$form['name'])); $listingId = $Listings->set($form); setcookie("signupid", $listingId, time() + 10800, "/", COOKIE_DOMAIN); $options = array( 'action'=>'subscription', 'return_url'=>'http://www.lpig.org/listing-signup-conformation.html', 'return_type'=>'post', 'return_cancel_url'=>'http://www.lpig.org/listing-signup-cancel.html', 'invoice'=>$listingId, 'interval'=>'y', 'duration'=>'1', 'modify'=>'n' ); $item[] = array( 'title'=>'1 Year Directory Listing', 'amount'=>'35.00' ); $Paypal = new tcPaypal($Preferences->listings_paypal_email, $options, $item); #echo $Paypal->getUrl(); error_log("\r".$Paypal->getUrl(), 3, DIR_TRUELISTINGS_LOGS."paypal.log"); header("Location: ".$Paypal->getUrl()); exit; } } } } include SITE_HEADER; include DIR_ROOT_SITE_VIEWS.'listing-signup.tpl'; include SITE_FOOTER; ?>