| 184 |
'#required' => TRUE, |
'#required' => TRUE, |
| 185 |
); |
); |
| 186 |
|
|
| 187 |
|
$options = array( |
| 188 |
|
'0'=>'0 Minutes', |
| 189 |
|
'900'=>'15 Minutes', |
| 190 |
|
'1800'=>'30 Minutes', |
| 191 |
|
'2700'=>'45 Minutes', |
| 192 |
|
'3600'=>'60 Minutes', |
| 193 |
|
'4500' =>'75 Minutes', |
| 194 |
|
'5400' =>'90 Minutes', |
| 195 |
|
'6300' =>'105 Minutes', |
| 196 |
|
'7200' => '120 Minutes', |
| 197 |
|
); |
| 198 |
|
|
| 199 |
|
$form['availability_instant']=array( |
| 200 |
|
'#type' => 'select', |
| 201 |
|
'#title' => t('Availability instant hold time'), |
| 202 |
|
'#default_value' => variable_get('accommodation_hold_instant_time',3600), |
| 203 |
|
'#options' => $options, |
| 204 |
|
'#description' => t('How long before an item mark as instant is processed.'), |
| 205 |
|
'#multiple' => NULL, |
| 206 |
|
'#required' => TRUE, |
| 207 |
|
); |
| 208 |
|
|
| 209 |
$options = array('21600'=>'6 hours','43200'=>'12 hours','64800'=>'18 hours','86400'=>'24 hours','108000'=>'30 hours','129600'=>'36 hours','151200'=>'42 hours','172800'=>'48 hours'); |
$options = array('21600'=>'6 hours','43200'=>'12 hours','64800'=>'18 hours','86400'=>'24 hours','108000'=>'30 hours','129600'=>'36 hours','151200'=>'42 hours','172800'=>'48 hours'); |
| 210 |
|
|
| 211 |
$form['availability_response']=array( |
$form['availability_response']=array( |
| 407 |
|
|
| 408 |
function _accommodation_process_instant(){ |
function _accommodation_process_instant(){ |
| 409 |
$time = time(); |
$time = time(); |
| 410 |
$result = db_query('SELECT txnid FROM {ec_transaction} WHERE (payment_status =7 OR payment_status =2) AND workflow =1 AND created < %d',$time - 3600); |
$result = db_query('SELECT txnid FROM {ec_transaction} WHERE (payment_status =7 OR payment_status =2) AND workflow =1 AND created < %d',$time - variable_get('accommodation_hold_instant_time',3600)); |
| 411 |
while($txnid = db_fetch_object($result)){ |
while($txnid = db_fetch_object($result)){ |
| 412 |
$t = store_transaction_load($txnid->txnid); |
$t = store_transaction_load($txnid->txnid); |
| 413 |
$t->workflow = 3; |
$t->workflow = 3; |
| 1030 |
array('data' =>l($item->title, "node/" . $item->nid),'width'=>'170px','class'=>'unitlink'), |
array('data' =>l($item->title, "node/" . $item->nid),'width'=>'170px','class'=>'unitlink'), |
| 1031 |
t('Sleeps') . " " . $item->occupancy, |
t('Sleeps') . " " . $item->occupancy, |
| 1032 |
payment_format($item->price).' '.$confirmation, |
payment_format($item->price).' '.$confirmation, |
| 1033 |
l($linktext,'booknow/accommodation/' . $item->bid . '/' . $edit['arrive_db'] . '/' . $edit['depart_db'] . '/' . $item->iid . '/'. $edit['num_people'],array('class'=>'booknow')), |
l('Book now','booknow/accommodation/' . $item->bid . '/' . $edit['arrive_db'] . '/' . $edit['depart_db'] . '/' . $item->iid . '/'. $edit['num_people'],array('class'=>'booknow')), |
| 1034 |
), |
), |
| 1035 |
); |
); |
| 1036 |
} |
} |