Plugin Directory

Changeset 1333789


Ignore:
Timestamp:
01/22/2016 03:05:14 PM (10 years ago)
Author:
avdude
Message:

Resolved #_Request issues

Location:
event-registration/trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • event-registration/trunk/attendee/evr_admin_attendee_add.php

    r941152 r1333789  
    66    (is_numeric($_REQUEST['event_id'])) ? $event_id = $_REQUEST['event_id'] : $event_id = "0";
    77    $event = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . get_option ( 'evr_event' ). " WHERE id = %d", $event_id ) );
     8$reg_form_defaults = (array)@unserialize($event->reg_form_defaults);
     9    if ($reg_form_defaults !=""){
     10                    if (in_array("Address", $reg_form_defaults)) {$inc_address = "Y";} else {$inc_address = "N";}
     11                    if (in_array("City", $reg_form_defaults)) {$inc_city = "Y";} else {$inc_city = "N";}
     12                    if (in_array("State", $reg_form_defaults)) {$inc_state = "Y";} else {$inc_state = "N";}
     13                    if (in_array("Zip", $reg_form_defaults)) {$inc_zip = "Y";} else {$inc_zip = "N";}
     14                    if (in_array("Phone", $reg_form_defaults)) {$inc_phone = "Y";} else {$inc_phone = "N";}
     15                    if (in_array("Company", $reg_form_defaults)) {$inc_comp = "Y";} else {$inc_comp = "N";}
     16                    if (in_array("CoAddress", $reg_form_defaults)) {$inc_coadd = "Y";} else {$inc_coadd = "N";}
     17                    if (in_array("CoCity", $reg_form_defaults)) {$inc_cocity = "Y";} else {$inc_cocity = "N";}
     18                    if (in_array("CoState", $reg_form_defaults)) {$inc_costate = "Y";} else {$inc_costate = "N";}
     19                    if (in_array("CoPostal", $reg_form_defaults)) {$inc_copostal = "Y";} else {$inc_copostal = "N";}
     20                    if (in_array("CoPhone", $reg_form_defaults)) {$inc_cophone = "Y";} else {$inc_cophone = "N";}
     21                    }
     22                    else {
     23                        $inc_address = "N";
     24                        $inc_city = "N";
     25                        $inc_state = "N";
     26                        $inc_zip = "N";
     27                        $inc_phone = "N";
     28                        $inc_comp = "N";
     29                        $inc_coadd = "N";
     30                        $inc_cocity = "N";
     31                        $inc_costate = "N";
     32                        $inc_copostal = "N";
     33                        $inc_cophone = "N";
     34                       
     35                    }
     36    $event_category = (array)@unserialize($event->event_category);
     37
     38    $event_category = (array)@unserialize($event->event_category);
     39    $reg_limit = $event->reg_limit;
     40    $event_name = stripslashes($event->event_name);
     41    $use_coupon = $event->use_coupon;
     42
     43
    844?>
    945<div class="wrap">
     
    191227                            </script>
    192228                            <hr />
    193                             <?php if ($ER_org_data['captcha'] == 'Y') { ?>
    194                             <p>Enter the security code as it is shown (required):<script type="text/javascript">sjcap("altTextField");</script>
    195                                     <noscript><p>[This resource requires a Javascript enabled browser.]</p></noscript>
    196                             <?php } ?>
     229                           
    197230                            <input type="hidden" name="action" value="post_attendee"/>
    198231                            <input type="hidden" name="event_id" value="<?php echo $event_id; ?>"/>
  • event-registration/trunk/attendee/evr_admin_attendee_case.php

    r623144 r1333789  
    11<?php
    22function evr_attendee_admin(){
    3  $action = $_REQUEST['action'];
     3 $action = (string)@$_REQUEST['action'];
    44    switch ($action) {
    55      case "view_attendee":
  • event-registration/trunk/attendee/evr_admin_attendee_edit.php

    r941152 r1333789  
    11<?php
    22function evr_admin_edit_attendee(){
    3     global $wpdb;
     3    global $wpdb, $company_options;
    44    //$event_id = $_REQUEST['event_id'];
    55    (is_numeric($_REQUEST['event_id'])) ? $event_id = $_REQUEST['event_id'] : $event_id = "0";
    66    $event = $wpdb->get_row('SELECT * FROM ' . get_option('evr_event') . ' WHERE id = ' . $event_id);
    7     $reg_form_defaults = unserialize($event->reg_form_defaults);
     7    $reg_form_defaults = (array)@unserialize($event->reg_form_defaults);
    88    if ($reg_form_defaults !=""){
    9                             if (in_array("Address", $reg_form_defaults)) {$inc_address = "Y";}
    10                             if (in_array("City", $reg_form_defaults)) {$inc_city = "Y";}
    11                             if (in_array("State", $reg_form_defaults)) {$inc_state = "Y";}
    12                             if (in_array("Zip", $reg_form_defaults)) {$inc_zip = "Y";}
    13                             if (in_array("Phone", $reg_form_defaults)) {$inc_phone = "Y";}
    14                             }
    15     $event_category = unserialize($event->event_category);
     9                    if (in_array("Address", $reg_form_defaults)) {$inc_address = "Y";} else {$inc_address = "N";}
     10                    if (in_array("City", $reg_form_defaults)) {$inc_city = "Y";} else {$inc_city = "N";}
     11                    if (in_array("State", $reg_form_defaults)) {$inc_state = "Y";} else {$inc_state = "N";}
     12                    if (in_array("Zip", $reg_form_defaults)) {$inc_zip = "Y";} else {$inc_zip = "N";}
     13                    if (in_array("Phone", $reg_form_defaults)) {$inc_phone = "Y";} else {$inc_phone = "N";}
     14                    if (in_array("Company", $reg_form_defaults)) {$inc_comp = "Y";} else {$inc_comp = "N";}
     15                    if (in_array("CoAddress", $reg_form_defaults)) {$inc_coadd = "Y";} else {$inc_coadd = "N";}
     16                    if (in_array("CoCity", $reg_form_defaults)) {$inc_cocity = "Y";} else {$inc_cocity = "N";}
     17                    if (in_array("CoState", $reg_form_defaults)) {$inc_costate = "Y";} else {$inc_costate = "N";}
     18                    if (in_array("CoPostal", $reg_form_defaults)) {$inc_copostal = "Y";} else {$inc_copostal = "N";}
     19                    if (in_array("CoPhone", $reg_form_defaults)) {$inc_cophone = "Y";} else {$inc_cophone = "N";}
     20                    }
     21                    else {
     22                        $inc_address = "N";
     23                        $inc_city = "N";
     24                        $inc_state = "N";
     25                        $inc_zip = "N";
     26                        $inc_phone = "N";
     27                        $inc_comp = "N";
     28                        $inc_coadd = "N";
     29                        $inc_cocity = "N";
     30                        $inc_costate = "N";
     31                        $inc_copostal = "N";
     32                        $inc_cophone = "N";
     33                       
     34                    }
     35    $event_category = (array)@unserialize($event->event_category);
    1636    $reg_limit = $event->reg_limit;
    1737    $event_name = stripslashes($event->event_name);
     
    3757                            <div class="padding">       
    3858                            <form method="post" action="<?php echo $_SERVER['REQUEST_URI'];?>" onSubmit="return validateForm(this)">
    39                             <ul>
    40                                 <li><label for="fname"><?php _e('First Name','evr_language');?></label><input id="fname" name="fname" value="<?php echo $attendee->fname;?>" /></li>
    41                                 <li><label for="lname"><?php _e('Last Name','evr_language');?></label><input id="lname" name="lname" value="<?php echo $attendee->lname;?>"/></li>
    42                                 <li><label for="email" ><?php _e('Email Address','evr_language');?></label><input id="email" name="email" value="<?php echo $attendee->email;?>"/></li>
     59                            <table>
     60                                <tr><td><label for="fname"><?php _e('First Name','evr_language');?></label>  <input id="fname" name="fname" value="<?php echo $attendee->fname;?>" /></td></tr>
     61                                <tr><td><label for="lname"><?php _e('Last Name','evr_language');?></label>  <input id="lname" name="lname" value="<?php echo $attendee->lname;?>"/></td></tr>
     62                                <tr><td><label for="email" ><?php _e('Email Address','evr_language');?></label>  <input id="email" name="email" value="<?php echo $attendee->email;?>"/></td></tr>
    4363                                    <?php if ($inc_phone == "Y") { ?>
    44                                 <li><label for="phone" ><?php _e('Phone Number','evr_language');?></label><input id="phone" name="phone" value="<?php echo $attendee->phone;?>"/></li>
     64                                <tr><td><label for="phone" ><?php _e('Phone Number','evr_language');?></label>  <input id="phone" name="phone" value="<?php echo $attendee->phone;?>"/></td></tr>
    4565                                    <?php } ?>
    4666                                    <?php if ($inc_address == "Y") { ?>
    47                                 <li><label for="address"><?php _e('Address','evr_language');?></label><input id="address" name="address" value="<?php echo $attendee->address;?>" /></li>
     67                                <tr><td><label for="address"><?php _e('Address','evr_language');?></label>  <input id="address" name="address" value="<?php echo $attendee->address;?>" /></td></tr>
    4868                                    <?php } ?>
    4969                                    <?php if ($inc_city == "Y") { ?>
    50                                 <li><label for="city"><?php _e('City','evr_language');?></label><input id="city" name="city" value="<?php echo $attendee->city;?>"/></li>
     70                                <tr><td><label for="city"><?php _e('City','evr_language');?></label>  <input id="city" name="city" value="<?php echo $attendee->city;?>"/></td></tr>
    5171                                    <?php } ?>
    5272                                    <?php if ($inc_state == "Y") { ?>
    53                                 <li><label for="state"><?php _e('State/Province','evr_language');?></label><input id="state" name="state" value="<?php echo $attendee->state;?>"/></li>
     73                                <tr><td><label for="state"><?php _e('State/Province','evr_language');?></label>  <input id="state" name="state" value="<?php echo $attendee->state;?>"/></td></tr>
    5474                                    <?php } ?>
    5575                                    <?php if ($inc_zip == "Y") { ?>
    56                                 <li><label for="zip"><?php _e('Zip/Postal Code','evr_language');?></label><input id="zip" name="zip" value="<?php echo $attendee->zip;?>" /></li>
     76                                <tr><td><label for="zip"><?php _e('Zip/Postal Code','evr_language');?></label><input id="zip" name="zip" value="<?php echo $attendee->zip;?>" /></td></tr>
    5777                                    <?php } ?>       
    5878                                    <?php if ($use_coupon == "Y") { ?>
    59                                 <li><label for="coupon"><?php _e('Enter coupon code for discount off primary registration?','evr_language');?></label><input id="coupon" name="coupon" value="<?php echo $attendee->coupon;?>"/></li>
     79                                <tr><td><label for="coupon"><?php _e('Enter coupon code for discount off primary registration?','evr_language');?></label><input id="coupon" name="coupon" value="<?php echo $attendee->coupon;?>"/></td></tr>
    6080                                    <?php } ?>
    6181                                    <?php     
     
    6383                                    if ($questions) {
    6484                                        for($i = 0; $i < count ( $questions ); $i ++) {
    65                                         echo "<li><label>".$questions [$i]->question."</label>";
     85                                        echo "<tr><td><label>".$questions [$i]->question."</label>  ";
    6686                                        $question_id = $questions [$i]->id;
    6787                                            $answer = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . get_option('evr_answer'). " WHERE registration_id = %d AND question_id = %d", $attendee_id,$question_id ) );
    68                                             $answers = $answer->answer;
     88                                            $answers = (string)@$answer->answer;
    6989                                            evr_form_build_edit ( $questions [$i], $answers );
    70                                             echo "</li>";
     90                                            echo "</td></tr>";
    7191                                                }
    7292                                                                }
    7393                                    ?>
     94                                    </table>
    7495                                    <hr />
    75                             <li><b><label for="attendees"><?php _e('Attendees','evr_language');?></label></b></li><br/>
     96                           <b><label for="attendees"><?php _e('Attendees','evr_language');?></label></b><br/>
     97                           <table>
    7698                             <?php         
    7799                             $attendee_array = unserialize($attendee->attendees);
     
    80102                             do {
    81103                                $person = $i + 1;
    82                                 echo 'Attendee #'.$person.' First Name: <input name="attendee['.$i.'][first_name]"';
     104                                echo '<tr><td> Attendee #'.$person.' First Name: <input name="attendee['.$i.'][first_name]"';
    83105                                if ($i=="0" && $attendee_array[$i]["first_name"]==""){ echo 'value ="'.$attendee->fname.'"'; }
    84106                                else {echo 'value ="'.$attendee_array[$i]["first_name"].'"';}
    85107                                echo '/>';
    86                                 echo '  Last Name: <input name="attendee['.$i.'][last_name]"';
     108                                echo '</td><td>  Last Name: <input name="attendee['.$i.'][last_name]"';
    87109                                 if ($i=="0" && $attendee_array[$i]["last_name"]==""){ echo 'value ="'.$attendee->lname.'"'; }
    88110                                else {echo 'value ="'.$attendee_array[$i]["last_name"].'"';}
    89                                 echo '/></br>';
     111                                echo '/></tr>';
    90112                             ++$i;
    91113                             } while ($i < $attendee->quantity);
    92114                            }
    93115                             ?>
    94                           </ul>
     116                             </table>
     117                         
    95118                            <?php
    96119                            $num = 0;                             
     
    263286</script>
    264287                            <hr />
    265                             <?php if ($ER_org_data['captcha'] == 'Y') { ?>
    266                             <p>Enter the security code as it is shown (required):<script type="text/javascript">sjcap("altTextField");</script>
    267                                     <noscript><p>[This resource requires a Javascript enabled browser.]</p></noscript>
    268                             <?php } ?>
    269288                            <input type="hidden" name="action" value="update_attendee"/>
    270289                            <input type="hidden" name="event_id" value="<?php echo $event_id; ?>"/>
  • event-registration/trunk/attendee/evr_admin_attendee_listing.php

    r944628 r1333789  
    3434                        $p->limit($record_limit); // Limit entries per page
    3535                        $p->target("admin.php?page=attendee");
    36                         $p->currentPage($_GET[$p->paging]); // Gets and validates the current page
     36                        $p->currentPage((string)@$_GET[$p->paging]); // Gets and validates the current page
    3737                        $p->calculate(); // Calculates what to show
    3838                        $p->parameterName('paging');
     
    101101                                        $end_time       = $event->end_time;
    102102                                        $conf_mail      = $event->conf_mail;
    103                                         $custom_mail    = $event->custom_mail;
     103                                        //$custom_mail    = $event->custom_mail;
    104104                                        $start_date     = $event->start_date;
    105105                                        $end_date       = $event->end_date;
  • event-registration/trunk/attendee/evr_admin_attendee_post.php

    r941152 r1333789  
    77    (is_numeric($_REQUEST['event_id'])) ? $event_id = $_REQUEST['event_id'] : $event_id = "0";
    88    //Begin gather registrtion data for database input
    9     $fname = $_REQUEST['fname'];
    10     $lname = $_REQUEST['lname'];
    11     $address = $_REQUEST['address'];
    12     $city = $_REQUEST['city'];
    13     $state = $_REQUEST['state'];
    14     $zip = $_REQUEST['zip'];
    15     $phone = $_REQUEST['phone'];
    16     $email = $_REQUEST['email'];
     9    $fname = (string)@$_REQUEST['fname'];
     10    $lname = (string)@$_REQUEST['lname'];
     11    $address = (string)@$_REQUEST['address'];
     12    $city = (string)@$_REQUEST['city'];
     13    $state = (string)@$_REQUEST['state'];
     14    $zip = (string)@$_REQUEST['zip'];
     15    $phone = (string)@$_REQUEST['phone'];
     16    $email = (string)@$_REQUEST['email'];
    1717    (is_numeric($_REQUEST['event_id'])) ? $event_id = $_REQUEST['event_id'] : $event_id = "0";
    1818    //$event_id = $_REQUEST['event_id'];
    19     $payment = $_REQUEST['total'];
    20     $coupon = $_REQEUST['coupon'];
    21     $reg_type = $_REQUEST['reg_type'];
     19    $payment = (string)@$_REQUEST['total'];
     20    $coupon = (string)@$_REQEUST['coupon'];
     21    $reg_type = (string)@$_REQUEST['reg_type'];
    2222   //Break Flow
    2323      $items = $wpdb->get_results( "SELECT * FROM ". get_option('evr_cost') . " WHERE event_id = " . $event_id. " ORDER BY sequence ASC" );
     
    3939            if ($item_custom_cur == "USD"){$item_custom_cur = "$";}   
    4040            $item_post = str_replace(".", "_", $item_price);
    41             $item_qty = $_REQUEST['PROD_' . $event_id . '-' . $item_id . '_' . $item_post];
     41            $item_qty = (string)@$_REQUEST['PROD_' . $event_id . '-' . $item_id . '_' . $item_post];
    4242            if ($item_cat == "REG"){$num_people = $num_people + $item_qty;}
    4343            $item_info = array('ItemID' => $item_id, 'ItemEventID' => $event_id, 'ItemCat'=>$item_cat,
  • event-registration/trunk/attendee/evr_admin_attendee_update.php

    r1139772 r1333789  
    22function evr_update_attendee(){
    33    global $wpdb;
    4     $attendee_id = $_REQUEST['attendee_id'];
     4    $attendee_id = (string)@$_REQUEST['attendee_id'];
    55    $num_people = 0;
    66    $item_order = array();
     
    88    (is_numeric($_REQUEST['event_id'])) ? $event_id = $_REQUEST['event_id'] : $event_id = "0";
    99    //Begin gather registrtion data for database input
    10     $fname = $_REQUEST['fname'];
    11     $lname = $_REQUEST['lname'];
    12     $address = $_REQUEST['address'];
    13     $city = $_REQUEST['city'];
    14     $state = $_REQUEST['state'];
    15     $zip = $_REQUEST['zip'];
    16     $phone = $_REQUEST['phone'];
    17     $email = $_REQUEST['email'];
     10    $fname = (string)@$_REQUEST['fname'];
     11    $lname = (string)@$_REQUEST['lname'];
     12    $address = (string)@$_REQUEST['address'];
     13    $city = (string)@$_REQUEST['city'];
     14    $state = (string)@$_REQUEST['state'];
     15    $zip = (string)@$_REQUEST['zip'];
     16    $phone = (string)@$_REQUEST['phone'];
     17    $email = (string)@$_REQUEST['email'];
    1818    //$event_id = $_REQUEST['event_id'];
    1919    (is_numeric($_REQUEST['event_id'])) ? $event_id = $_REQUEST['event_id'] : $event_id = "0";
    20     $payment = $_REQUEST['total'];
    21     $coupon = $_REQEUST['coupon'];
    22     $reg_type = $_REQUEST['reg_type'];
    23     $attendee_array = $_REQUEST['attendee'];
     20    $payment = (string)@$_REQUEST['total'];
     21    $coupon = (string)@$_REQEUST['coupon'];
     22    $reg_type = (string)@$_REQUEST['reg_type'];
     23    $attendee_array = (array)@$_REQUEST['attendee'];
    2424    $attendee_list = serialize($attendee_array);
    2525    $items = $wpdb->get_results( "SELECT * FROM ". get_option('evr_cost') . " WHERE event_id = " . $event_id. " ORDER BY sequence ASC" );
  • event-registration/trunk/attendee/evr_admin_attendee_view.php

    r944628 r1333789  
    1313                            if (in_array("Phone", $reg_form_defaults)) {$inc_phone = "Y";}
    1414                            }
    15     $event_category = unserialize($event->event_category);
     15    $event_category = (array)@unserialize($event->event_category);
    1616   /* if ($event->start_date <= date('Y-m-d')){
    1717                                $active_event = '<span style="color: #F00; font-weight:bold;">EXPIRED EVENT</span>';
     
    6464                        $p->limit($record_limit); // Limit entries per page
    6565                        $p->target("admin.php?page=attendee&action=view_attendee&event_id=".$event_id);
    66                         $p->currentPage($_GET[$p->paging]); // Gets and validates the current page
     66                        $p->currentPage((string)@$_GET[$p->paging]); // Gets and validates the current page
    6767                        $p->calculate(); // Calculates what to show
    6868                        $p->parameterName('paging');
  • event-registration/trunk/evr_excel.php

    r941292 r1333789  
    22function evr_excel($event_id){
    33global $wpdb;
     4$today = date('j F Y');
    45$events_answer_tbl = get_option('evr_answer');
    56$events_question_tbl = get_option('evr_question');
     
    1314        $event_id = $_REQUEST['id'];
    1415        $event = $wpdb->get_row($wpdb->prepare("SELECT * FROM ". get_option('evr_event') ." WHERE id = %d",$event_id));
    15         switch ($_REQUEST['action']) {
     16        switch ((string)@$_REQUEST['action']) {
    1617               case "attendee":
    1718                //create filename for excel export 
     
    2324            $s = $et . $st;
    2425            //Base array for cell column headings
    25             if ($waiver == "Y"){
     26            if ($event->waiver == "Y"){
    2627                $basic_header = array('Reg ID', 'Reg Date','Type','Agreed to Waiver','Last Name', 'First Name', 'Attendees', 'Email', 'Address',
    2728                    'City', 'State', 'Zip', 'Phone','Co Name', 'Co Address', 'Co City', 'Co State/Prov', 'Co Postal','Num People', 'Payment','Tickets');
  • event-registration/trunk/payments/evr_admin_payments-case.php

    r1104456 r1333789  
    11<?php
    22function evr_admin_payments(){
    3     $action = $_REQUEST['action'];
     3    $action = (string)@$_REQUEST['action'];
    44    switch ($action) {
    55    case "view_payments":
  • event-registration/trunk/payments/evr_admin_payments-event_list.php

    r1332458 r1333789  
    3838                        $p->limit($record_limit); // Limit entries per page
    3939                        $p->target("admin.php?page=payments");
    40                         $p->currentPage($_GET[$p->paging]); // Gets and validates the current page
     40                        $p->currentPage((string)@$_GET[$p->paging]); // Gets and validates the current page
    4141                        $p->calculate(); // Calculates what to show
    4242                        $p->parameterName('paging');
     
    109109                                    $end_time       = $event->end_time;
    110110                                    $conf_mail      = $event->conf_mail;
    111                                     $custom_mail    = $event->custom_mail;
     111                                    //$custom_mail    = $event->custom_mail;
    112112                                    $start_date     = $event->start_date;
    113113                                    $end_date       = $event->end_date;
  • event-registration/trunk/payments/evr_admin_payments-view.php

    r1332458 r1333789  
    4848                                    $p->limit($record_limit); // Limit entries per page
    4949                                    $p->target("admin.php?page=payments&action=view_payments&event_id=".$event_id);
    50                                     $p->currentPage($_GET[$p->paging]); // Gets and validates the current page
     50                                    $p->currentPage((string)@$_GET[$p->paging]); // Gets and validates the current page
    5151                                    $p->calculate(); // Calculates what to show
    5252                                    $p->parameterName('paging');
  • event-registration/trunk/questions/evr_admin_questions-case.php

    r462905 r1333789  
    22function evr_admin_questions(){
    33   
    4     $action = $_REQUEST['action'];
     4    $action = (string)@$_REQUEST['action'];
    55   
    66    switch ($action){
  • event-registration/trunk/questions/evr_admin_questions-default.php

    r944628 r1333789  
    2828                        $p->limit($record_limit); // Limit entries per page
    2929                        $p->target("admin.php?page=questions");
    30                         $p->currentPage($_GET[$p->paging]); // Gets and validates the current page
     30                        $p->currentPage((string)@$_GET[$p->paging]); // Gets and validates the current page
    3131                        $p->calculate(); // Calculates what to show
    3232                        $p->parameterName('paging');
     
    8484                                        $end_time       = $event->end_time;
    8585                                        $conf_mail      = $event->conf_mail;
    86                                         $custom_mail    = $event->custom_mail;
     86                                        //$custom_mail    = $event->custom_mail;
    8787                                        $start_date     = $event->start_date;
    8888                                        $end_date       = $event->end_date;
  • event-registration/trunk/readme.txt

    r1332593 r1333789  
    116116* Fixed bug where coordinator email was not defaulting to system default
    117117* Fixed bug in adding and editing events where options did not always render
     118* Fixed bugs in editing/adding attendees
     119* Fixed bugs in editing/adding payments
    118120
    119121
Note: See TracChangeset for help on using the changeset viewer.