tweak lucky number function
This commit is contained in:
@@ -784,24 +784,24 @@ function booking_schema() {
|
|||||||
);
|
);
|
||||||
$schema['booking_payment'] = array(
|
$schema['booking_payment'] = array(
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'payid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
'payid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
||||||
'booking_person_nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
'booking_person_nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
||||||
'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
||||||
'booking_mc_gross' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
|
'booking_mc_gross' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
|
||||||
'booking_mc_currency' => array('type' => 'varchar', 'length' => '10', 'not null' => FALSE),
|
'booking_mc_currency' => array('type' => 'varchar', 'length' => '10', 'not null' => FALSE),
|
||||||
'booking_mc_fee' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
|
'booking_mc_fee' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
|
||||||
'booking_quantity' => array('type' => 'int', 'length' => 11, 'not null' => FALSE, 'default' => 0),
|
'booking_quantity' => array('type' => 'int', 'length' => 11, 'not null' => FALSE, 'default' => 0),
|
||||||
'booking_invoice' => array('type' => 'varchar', 'length' => '150', 'not null' => FALSE),
|
'booking_invoice' => array('type' => 'varchar', 'length' => '150', 'not null' => FALSE),
|
||||||
'booking_payer_id' => array('type' => 'varchar', 'length' => '150', 'not null' => FALSE),
|
'booking_payer_id' => array('type' => 'varchar', 'length' => '150', 'not null' => FALSE),
|
||||||
'booking_payment_date' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
'booking_payment_date' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
||||||
'booking_payment_status' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
'booking_payment_status' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
||||||
'booking_first_name' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
'booking_first_name' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
||||||
'booking_last_name' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
'booking_last_name' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
||||||
'booking_buyer_email' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
'booking_buyer_email' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
||||||
'booking_payer_status' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
'booking_payer_status' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
||||||
'booking_item_name' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
'booking_item_name' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
||||||
'booking_ipn_track_id' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE)),
|
'booking_ipn_track_id' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE)),
|
||||||
'primary key' => array('payid'),
|
'primary key' => array('payid'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$schema['booking_variety_options'] = array(
|
$schema['booking_variety_options'] = array(
|
||||||
|
@@ -871,7 +871,7 @@ function booking_generate_luckynumbers() {
|
|||||||
$attendees = $attendee_query->fetchAll();
|
$attendees = $attendee_query->fetchAll();
|
||||||
|
|
||||||
//assuming there's less than 900 people, generate numbers within that range and shuffle the order
|
//assuming there's less than 900 people, generate numbers within that range and shuffle the order
|
||||||
$numbers = range(100,650);
|
$numbers = range(100,750);
|
||||||
shuffle($numbers);
|
shuffle($numbers);
|
||||||
|
|
||||||
foreach ($attendees as $attendee)
|
foreach ($attendees as $attendee)
|
||||||
|
@@ -1291,7 +1291,23 @@ function booking_payment_completed_page()
|
|||||||
global $event;
|
global $event;
|
||||||
$output = "";
|
$output = "";
|
||||||
$return_array = array();
|
$return_array = array();
|
||||||
|
/*
|
||||||
|
$parameters = drupal_get_query_parameters();
|
||||||
|
|
||||||
|
//check if we got a transaction token from paypal
|
||||||
|
if (isset($parameters['token'])) {
|
||||||
|
//check to make sure the value is something we're expecting
|
||||||
|
$paypal_token = $parameters['token'];
|
||||||
|
if (! preg_match('/^[0-9A-Fa-f\-]+$/', $paypal_token)) {
|
||||||
|
//parameter from url is not what we were expecting so ignore it and just use the site-wide tokens for this page
|
||||||
|
$tokens = booking_define_tokens();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//query the payments table to find the attendee that this paypal token belongs to
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
//set the page title
|
//set the page title
|
||||||
$bookingTitle = !empty($event->booking_eventname) ? $event->booking_eventname : 'Event';
|
$bookingTitle = !empty($event->booking_eventname) ? $event->booking_eventname : 'Event';
|
||||||
drupal_set_title($bookingTitle . ' Registration Completed');
|
drupal_set_title($bookingTitle . ' Registration Completed');
|
||||||
|
Reference in New Issue
Block a user