Changeset 1335553
- Timestamp:
- 01/25/2016 02:24:26 PM (10 years ago)
- Location:
- event-registration/trunk
- Files:
-
- 10 edited
-
evr_ipn.php (modified) (7 diffs)
-
evr_support_functions.php (modified) (2 diffs)
-
questions/evr_admin_questions-case.php (modified) (1 diff)
-
questions/evr_admin_questions-delete.php (modified) (1 diff)
-
questions/evr_admin_questions-edit.php (modified) (1 diff)
-
questions/evr_admin_questions-new.php (modified) (1 diff)
-
questions/evr_admin_questions-post.php (modified) (2 diffs)
-
questions/evr_admin_questions-reorder.php (modified) (1 diff)
-
questions/evr_admin_questions-update.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
event-registration/trunk/evr_ipn.php
r1332455 r1335553 255 255 'payer_business_name'=>$payer_business_name, 'payment_status'=>$payment_status, 256 256 'pending_reason'=>$pending_reason, 'reason_code'=>$reason_code, 'txn_type'=>$txn_type ); 257 257 258 $sql_data = array('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s', 258 '%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s');259 '%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s'); 259 260 $attendee = $wpdb->get_row($wpdb->prepare("SELECT * FROM ". get_option('evr_attendee') ." WHERE id = %d",$id)); 260 261 $attendee_email = $attendee->email; … … 331 332 $events_attendee_tbl = get_option('evr_attendee'); 332 333 $id=""; 333 $id=$_REQUEST['id'];//This is the id of the registrant 334 //$id=$_REQUEST['id'];//This is the id of the registrant 335 $id=$_REQUEST['x_cust_id'];//This is the id of the registrant 334 336 if ($id ==""){ 335 337 echo "ID not supplied."; … … 342 344 else { 343 345 //store the results in reusable variables 344 $payer_id = $id; 345 $payment_date = $today; 346 $txn_id = $_POST['x_trans_id']; 347 $first_name = $_POST['x_first_name']; 348 $last_name = $_POST['x_last_name']; 349 $payer_email = $_POST['x_email']; 350 $payer_status = $_POST['x_response_code']; 351 $payment_type = $p->ipn_data['payment_type']; 352 $memo = $p->ipn_data['memo']; 353 $item_name = $_POST['x_description']; 354 $item_number = $_POST['x_invoice_num']; 355 $quantity = "1"; 356 $amount_pd = $_POST['x_amount']; 357 //$mc_currency = $p->ipn_data['mc_currency']; 358 $address_name = $_POST['x_first_name']." ".$_POST['x_last_name'];; 346 $payer_id = $id;//required 347 $event_id = $_POST['x_invoice_num'];//required 348 $payment_date = $today; 349 $txn_id = $_POST['x_trans_id'];//required 350 $first_name = $_POST['x_first_name'];//required 351 $last_name = $_POST['x_last_name'];//required 352 $payer_email = $_POST['x_email'];//required 353 $payer_status = $_POST['x_response_code'];//required 354 355 $payment_type = $_POST['x_method'];//required 356 357 $memo = "memo";//required 358 $item_name = $_POST['x_description'];//required 359 $item_number = $_POST['x_invoice_num'];//required 360 $quantity = "1";//required 361 $amount_pd = $_POST['x_amount'];//required mc gross 362 $mc_currency = "USD";//required 363 $address_name = $_POST['x_first_name']." ".$_POST['x_last_name']; 359 364 $address_street = nl2br($_POST['x_address']); 360 365 $address_city = $_POST['x_city']; … … 363 368 $address_country = $_POST['x_country']; 364 369 $phone= $_POST['x_phone']; 365 $payment_status = $_POST['x_response_reason_code'];//limited to 17 char 366 //$pending_reason = $p->ipn_data['pending_reason'];//limited to 14 char 367 //$reason_code =$_POST['x_response_reason_text'];//limited to 15 char 368 $txn_type = $_POST['x_type'];//limited to 20 char 370 $payment_status = $_POST['x_response_reason_code'];//limited to 17 char - required 371 $pending_reason = "pending";//limited to 14 char 372 $reason_code =$_POST['x_response_reason_text'];//limited to 15 char 373 $txn_type = $_POST['x_type'];//limited to 20 char - required 374 375 $payer_business_name = $address_name; 376 $address_status="status"; 369 377 global $wpdb; 370 378 $events_attendee_tbl = get_option('evr_attendee'); … … 372 380 //$sql="UPDATE ". $events_attendee_tbl . " SET payment_status = '$payment_status', amount_pd = '$amount_pd', payment_date ='$payment_date' WHERE id = '$id'"; 373 381 $wpdb->query($wpdb->prepare("UPDATE ". $events_attendee_tbl . " SET payment_status = '$payment_status', amount_pd = '$amount_pd', payment_date ='$payment_date' WHERE id = %d",$id)); 374 (is_numeric($_REQUEST['event_id'])) ? $event_id = $_REQUEST['event_id'] : $event_id = "0"; 382 383 //(is_numeric($_REQUEST['x_invoice_num'])) ? $event_id = $_REQUEST['x_invoice_num'] : $event_id = "0"; 375 384 376 385 $sql = "SELECT * FROM ". get_option('evr_event') ." WHERE id = $event_id"; 377 386 378 387 $event = $wpdb->get_row($sql); 379 388 $event_id = $event->id; … … 407 416 'pending_reason'=>$pending_reason, 'reason_code'=>$reason_code, 'txn_type'=>$txn_type ); 408 417 $sql_data = array('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s', 409 '%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s'); 418 '%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s'); 419 410 420 411 421 $attendee = $wpdb->get_row($wpdb->prepare("SELECT * FROM ". get_option('evr_attendee') ." WHERE id = %d",$id)); … … 418 428 //$wpdb->insert( get_option('evr_payment'), $sql, $sql_data ); 419 429 if ($wpdb->insert( get_option('evr_payment'), $sql, $sql_data )){ 430 431 420 432 $headers = "From: " . $company_options['company'] . " <". $company_options['company_email'] . ">\r\n"; 421 433 $headers .= "Reply-To: " . $company_options['company'] . " <" . $company_options['company_email'] . ">\r\n"; -
event-registration/trunk/evr_support_functions.php
r941152 r1335553 296 296 foreach ( $values as $key => $value ) { 297 297 $checked = in_array ( $value, $answers ) ? " checked=\"checked\"" : ""; 298 echo "<p class=\"hanging-indent radio_rows\"><input id=\"SINGLE_$question->id _$key\"$required name=\"SINGLE_$question->id\" title=\"$question->question\" type=\"radio\" value=\"$value\"$checked /> $value </p>";298 echo "<p class=\"hanging-indent radio_rows\"><input id=\"SINGLE_$question->id\" $required name=\"SINGLE_$question->id\" title=\"$question->question\" type=\"radio\" value=\"$value\"$checked /> $value </p>"; 299 299 } 300 300 break; … … 370 370 <ul> 371 371 <li>Event Registration Version <input name="evr_ver" value=" <?php echo $evr_ver;?>"/></li> 372 <li>Date EVR Activated <input size="50" name="evr_dt" value=" <?php echo date( r,get_option('evr_date_installed'));?>"/></li>372 <li>Date EVR Activated <input size="50" name="evr_dt" value=" <?php echo date("r",get_option('evr_date_installed'));?>"/></li> 373 373 <input type="hidden" name="key" value="<?php echo get_option('plug-evr-activate');?>"/> 374 374 </ul> -
event-registration/trunk/questions/evr_admin_questions-case.php
r1333789 r1335553 26 26 break; 27 27 case "edit": 28 28 evr_return_question_button(); 29 29 evr_questions_edit(); 30 evr_return_question_button();30 31 31 evr_questions_reorder(); 32 32 //evr_check_form_submission(); -
event-registration/trunk/questions/evr_admin_questions-delete.php
r462905 r1335553 5 5 //$event_id = $_REQUEST['event_id']; 6 6 (is_numeric($_REQUEST['event_id'])) ? $event_id = $_REQUEST['event_id'] : $event_id = "0"; 7 $event_name = $_REQUEST['event_name'];7 $event_name = @$_REQUEST['event_name']; 8 8 $question_id = $_REQUEST['question_id']; 9 9 -
event-registration/trunk/questions/evr_admin_questions-edit.php
r616585 r1335553 3 3 function evr_questions_edit(){ 4 4 global $wpdb; 5 $event_name = $_REQUEST['event_name'];5 $event_name = @$_REQUEST['event_name']; 6 6 //$event_id = $_REQUEST['event_id']; 7 7 (is_numeric($_REQUEST['event_id'])) ? $event_id = $_REQUEST['event_id'] : $event_id = "0"; -
event-registration/trunk/questions/evr_admin_questions-new.php
r944628 r1335553 3 3 $record_limit = "10"; 4 4 global $wpdb; 5 $event_name = $_REQUEST['event_name'];5 $event_name = @$_REQUEST['event_name']; 6 6 //$event_id = $_REQUEST['event_id']; 7 7 (is_numeric($_REQUEST['event_id'])) ? $event_id = $_REQUEST['event_id'] : $event_id = "0"; -
event-registration/trunk/questions/evr_admin_questions-post.php
r941152 r1335553 3 3 global $wpdb; 4 4 (is_numeric($_REQUEST['event_id'])) ? $event_id = $_REQUEST['event_id'] : $event_id = "0"; 5 $event_name = $_REQUEST['event_name'];6 $question = $_REQUEST ['question'];7 $question_type = $_REQUEST ['question_type'];8 $values = $_REQUEST ['values'];9 $required = $_REQUEST ['required'] ? 'Y' : 'N';10 $remark = $_REQUEST['remark'];5 $event_name = (string)@$_REQUEST['event_name']; 6 $question = (string)@$_REQUEST ['question']; 7 $question_type = (string)@$_REQUEST ['question_type']; 8 $values = (string)@$_REQUEST ['values']; 9 $required = (string)@$_REQUEST ['required'] ? 'Y' : 'N'; 10 $remark = (string)@$_REQUEST['remark']; 11 11 $sequence = $wpdb->get_var ( "SELECT max(sequence) FROM ".get_option('evr_question')." where event_id = '$event_id'" ) + 1; 12 if ($wpdb->query ( "INSERT INTO ".get_option('evr_question')." (`event_id`, `sequence`, `question_type`, `question`, `response`, `required`,`remark`)" . " values('$event_id', '$sequence', '$question_type', '$question', '$values', '$required', '$remark')" )){ ?> 12 13 if ($question != ""){ 14 if ($wpdb->query ( "INSERT INTO ".get_option('evr_question')." (`event_id`, `sequence`, `question_type`, `question`, `response`, `required`,`remark`)" . " values('$event_id', '$sequence', '$question_type', '$question', '$values', '$required', '$remark')" )){ ?> 13 15 <div id="message" class="updated fade"><p><strong><?php _e('The question has been added.','evr_language');?> </strong></p> 14 16 <p><strong><?php _e(' . . .Now returning you to Question Managment . . ','evr_language');?><meta http-equiv="Refresh" content="1; url=admin.php?page=questions&action=new&event_id=<?php echo $event_id;?>&event_name=<?php echo $event_name;?>"></strong></p></div> … … 19 21 <?php } 20 22 } 23 else { 24 ?> 25 <div id="message" class="error"><p><strong><?php _e('There was an error in your submission (No question provided!), please try again. The question was not saved!','evr_language');?><?php print $wpdb->last_error; ?>.</strong></p> 26 <p><strong><?php _e(' . . .Now returning you to Question Management . . ','evr_language');?><meta http-equiv="Refresh" content="3; url=admin.php?page=questions&action=new&event_id=<?php echo $event_id;?>&event_name=<?php echo $event_name;?>"></strong></p> 27 </div> 28 <?php 29 30 } 31 } 21 32 ?> -
event-registration/trunk/questions/evr_admin_questions-reorder.php
r944628 r1335553 4 4 global $wpdb; 5 5 $event_id = $_REQUEST['event_id']; 6 $event_name = $_REQUEST['event_name'];6 $event_name = @$_REQUEST['event_name']; 7 7 ?> 8 8 -
event-registration/trunk/questions/evr_admin_questions-update.php
r616585 r1335553 8 8 $question_type = $_REQUEST ['question_type']; 9 9 $values = $_REQUEST ['values']; 10 $required = $_REQUEST ['required'] ? 'Y' : 'N';10 $required = @$_REQUEST ['required'] ? 'Y' : 'N'; 11 11 $remark = $_REQUEST['remark']; 12 $wpdb->query ( "UPDATE ".get_option('evr_question')." set `question_type` = '$question_type', `question` = '$question_text', " . " `response` = '$values', `required` = '$required', `remark` = '$remark' where id = $question_id " ); 12 if ($wpdb->query ( "UPDATE ".get_option('evr_question')." set `question_type` = '$question_type', `question` = '$question_text', " . " `response` = '$values', `required` = '$required', `remark` = '$remark' where id = $question_id " )){ 13 ?> 14 <div id="message" class="updated fade"><p><strong><?php _e('The question has been updated.','evr_language');?> </strong></p> 15 <p><strong><?php _e(' . . .Now returning you to Question Managment . . ','evr_language');?><meta http-equiv="Refresh" content="1; url=admin.php?page=questions&action=new&event_id=<?php echo $event_id;?>&event_name=<?php echo $event_name;?>"></strong></p></div> 16 <?php }else { ?> 17 <div id="message" class="error"><p><strong><?php _e('There was an error in your submission, please try again. The question was not updated!','evr_language');?><?php print $wpdb->last_error; ?>.</strong></p> 18 <p><strong><?php _e(' . . .Now returning you to Question Management . . ','evr_language');?><meta http-equiv="Refresh" content="3; url=admin.php?page=questions&action=new&event_id=<?php echo $event_id;?>&event_name=<?php echo $event_name;?>"></strong></p> 19 </div> 20 <?php } 21 22 13 23 ?> 14 24 <META HTTP-EQUIV="refresh" content="0;URL=admin.php?page=questions&action=new&event_id=<?php echo $event_id . "&event_name=" . $event_name;?>"> -
event-registration/trunk/readme.txt
r1334833 r1335553 105 105 106 106 == Change Log == 107 108 = Version 6.02.03 109 * Fixed bug that allowed blank questions on custom question creation 110 * Added confirmation for new and edit questions added to db 111 * Fixed bug in Attendee Management - Edit when having custom questions with single choice options not listing properly 112 * Fixed date bug in Activation Date on Registration Area 113 107 114 108 115 = Version 6.02.02
Note: See TracChangeset
for help on using the changeset viewer.