Lot's of updates for packages
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 16 Feb 2017 21:51:20 +0000 (16:51 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 16 Feb 2017 21:51:20 +0000 (16:51 -0500)
Text updates for removing Arnold Line ferry.
Text updates for the new 2017 year.
Removing Youth from the admin side of things.
Update the add package in admin to have correct dates.
Updating the dates to start and end the 2017 year for packages.

21 files changed:
.gitignore [new file with mode: 0644]
admin/packages/addPackage.php
admin/packages/js/order-form.js
admin/packages/orderForm.php
admin/packages/package.ini
admin/packages/templates/summary-report-member-sub-totals.html
admin/packages/templates/summary-report-member-totals.html
admin/packages/templates/summary-report.html
admin/packages/ticket_member.ini
classes/class_form_creator.inc
classes/class_members.inc
classes/class_order_form.inc
classes/class_package.inc
ferry-lines.php
ferry-lines2.php
order-form.php
promote.php
purchase.php
purchase.php.save
sample-itinerary.php
setup.phtml

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..bd9e9a0
--- /dev/null
@@ -0,0 +1,2 @@
+authorize/sequence.txt
+admin/packages/build
index d86bd07..d9d5005 100644 (file)
@@ -42,7 +42,7 @@ if( date("w",$min_time) == 0 )
     $min_time = mktime(0,0,0,date('m'),date('j')+6,date('Y'));
 }
 // min date for packages is May 15th (fort closed before this)
-$fort_opens = mktime(0,0,0,5,15,date('Y'));
+$fort_opens = mktime(0,0,0,5,13,date('Y'));
 if( $min_time < $fort_opens )
 {
     $min_time = $fort_opens;
@@ -58,7 +58,7 @@ else
 // min date for packages is May 13th (fort closed before this)
 $min_date = date("n/j/Y",$min_time);
 // max date for packages is Oct 2nd (fort closed after this)
-$max_time = mktime(0,0,0,10,3,date('Y'));
+$max_time = mktime(0,0,0,9,30,date('Y'));
 $max_date = date("n/j/Y",$max_time);
 $cal_set = ',pagedate: "'.$page_date.'",mindate: "'.$min_date.'",maxdate: "'.$max_date.'"';
 $fields[] = array('name'=>'cday','type'=>'hide');
@@ -78,7 +78,7 @@ $data['mail_ok'] = 't';
 
 //     $fields[] = array('title'=>'Ticket Amounts','type'=>'static_text');
 $fields[] = array('name'=>'adult','title'=>'Adults (18+) $'.number_format( $adult_price, 2 ).'','type'=>'drop','info'=>$people_sel,'req'=>0);
-$fields[] = array('name'=>'youth','title'=>'Youth (13-17) $'.number_format( $youth_price, 2) .'','type'=>'drop','info'=>$people_sel,'req'=>0);
+//$fields[] = array('name'=>'youth','title'=>'Youth (13-17) $'.number_format( $youth_price, 2) .'','type'=>'drop','info'=>$people_sel,'req'=>0);
 $fields[] = array('name'=>'child','title'=>'Children (5-12) $'.number_format( $child_price, 2 ).'','type'=>'drop','info'=>$people_sel,'req'=>0);
 
 $ship_type1 = '<div style="width:100%;"><div style="text-align:right;float:left;width:150px;"><b>Ship Package to me:</b></div>
index 0c30aac..0c943bf 100644 (file)
@@ -41,8 +41,8 @@ function validateFields()
        var ticketTotal = 0;
        var adultSel = document.getElementById('adult');
        ticketTotal += adultSel.value;
-       var youthSel = document.getElementById('youth');
-       ticketTotal += youthSel.value;
+       //var youthSel = document.getElementById('youth');
+       //ticketTotal += youthSel.value;
        var childSel = document.getElementById('child');
        ticketTotal += childSel.value;
        if( ticketTotal == 0 )
@@ -208,17 +208,17 @@ function calc_price()
        //      var child_price = 30.00;
        var adult = document.getElementById('adult').value * 1;
        var adult_total = adult * adult_price;
-       var youth = document.getElementById('youth').value * 1;
-       var youth_total = youth * youth_price;
+       //var youth = document.getElementById('youth').value * 1;
+       //var youth_total = youth * youth_price;
        var child = document.getElementById('child').value * 1;
        var child_total = child * child_price;
-       var grand_total = adult + youth + child;
-       var grand_total_price = adult_total + youth_total + child_total;
+       var grand_total = adult + child;
+       var grand_total_price = adult_total + child_total;
        var overnight = document.getElementById('overnight').value;
        grand_total_price += parseFloat( '9.00' );
        grand_total_price += parseFloat( overnight );
        var msg = 'adult: ' + adult + ' : ' + adult_total + '\n';
-       msg += 'adult: ' + youth + ' : ' + youth_total + '\n';
+       //msg += 'adult: ' + youth + ' : ' + youth_total + '\n';
        msg += 'adult: ' + child + ' : ' + child_total + '\n';
        msg += 'Total: ' + grand_total + ' : ' + grand_total_price;
        var total_out = document.getElementById('total-amount');
@@ -251,7 +251,7 @@ function init()
        {
                // shipping type radio 
                var adult = document.getElementById('adult').onchange = function(){calc_price()};
-               var youth = document.getElementById('youth').onchange = function(){calc_price()};
+               //var youth = document.getElementById('youth').onchange = function(){calc_price()};
                var child = document.getElementById('child').onchange = function(){calc_price()};
 
                var ship_out1 = document.getElementById('shipping1id1').onchange = function(){add_over_night()};
index f8ee791..8632442 100644 (file)
@@ -307,19 +307,19 @@ class orderForm extends form_creator
             $this->DB->db_exec($query) ;
         } else {
             // if they don't exists then setup INSERT
-            $query      = "INSERT INTO contact ($contact_fields) VALUES ('$contact_values');";
+            $query      = "INSERT INTO contact ($contact_fields) VALUES ('$contact_values') RETURNING id;";
             $res2       = $this->DB->db_exec($query) ;
-            $lastoid    = pg_getlastoid($res2) ;
-            $query      = "SELECT id FROM contact WHERE oid = $lastoid";
-            $res3       = $this->DB->db_exec($query) ;
-            $contact_id = pg_result($res3, 0, 'id') ;
+            //$lastoid    = pg_getlastoid($res2) ;
+            //$query      = "SELECT id FROM contact WHERE oid = $lastoid";
+            //$res3       = $this->DB->db_exec($query) ;
+            $contact_id = pg_result($res2, 0, 'id') ;
         }
-        $query      = "INSERT INTO package_req (contact_id,$fields) VALUES ($contact_id,'$values')";
+        $query      = "INSERT INTO package_req (contact_id,$fields) VALUES ($contact_id,'$values') RETURNING package_number;";
         $res        = $this->DB->db_exec($query) ;
-        $lastoid    = pg_getlastoid($res) ;
-        $query2     = "SELECT package_number FROM package_req WHERE oid = $lastoid";
-        $res2       = $this->DB->db_exec($query2) ;
-        $package_id = pg_result($res2, 0, 'package_number');
+        //$lastoid    = pg_getlastoid($res) ;
+        //$query2     = "SELECT package_number FROM package_req WHERE oid = $lastoid";
+        //$res2       = $this->DB->db_exec($query2) ;
+        $package_id = pg_result($res, 0, 'package_number');
         $this->send_cust_email($package_id) ;
         header('Location: index.php');exit;
     }
index f2ba843..484fde3 100755 (executable)
@@ -83,11 +83,11 @@ title = Adult
 type = text
 view = v
 
-[youth]
-name = youth
-title = Youth
-type = text
-view = v
+;[youth]
+;name = youth
+;title = Youth
+;type = text
+;view = v
 
 [child]
 name = child
index 8842d13..5c39156 100755 (executable)
@@ -2,8 +2,6 @@
        <td><!-- name --></td>
        <td><!-- adult_total --></td>
        <td><!-- adult_price_total --></td>
-       <td><!-- youth_total --></td>
-       <td><!-- youth_price_total --></td>
        <td><!-- child_total --></td>
        <td><!-- child_price_total --></td>
        <td><!-- total_price --></td>
index 98da9ae..f6a90bf 100755 (executable)
@@ -2,8 +2,6 @@
        <td><!-- name --></td>
        <td><!-- adult_total --></td>
        <td><!-- adult_price_total --></td>
-       <td><!-- youth_total --></td>
-       <td><!-- youth_price_total --></td>
        <td><!-- child_total --></td>
        <td><!-- child_price_total --></td>
        <td><!-- total_price --></td>
index 5db69e6..8dc867b 100755 (executable)
                <td align="right"># of Adult</td>
                <td align="right"><!-- adult --></td>
        </tr>
-       <tr>
-               <td align="right"># of Youth</td>
-               <td align="right"><!-- youth --></td>
-       </tr>
        <tr>
                <td align="right"># of Child</td>
                <td align="right"><!-- child --></td>
@@ -25,8 +21,6 @@
                                        <th>Member Name</th>
                                        <th>Adults</th>
                                        <th>Adults Price</th>
-                                       <th>Youths</th>
-                                       <th>Youths Price</th>
                                        <th>Children</th>
                                        <th>Children Price</th>
                                        <th>Total Price</th>
index f5cddd6..272706e 100755 (executable)
@@ -24,11 +24,11 @@ title = "Amount (adult)"
 type = numeric
 req = 1
 
-[youth]
-name = youth
-title = "Amount (youth)"
-type = numeric
-req = 1
+;[youth]
+;name = youth
+;title = "Amount (youth)"
+;type = numeric
+;req = 1
 
 [child]
 name = child
index bc053f0..1293523 100755 (executable)
@@ -499,8 +499,10 @@ class form_creator extends GLM_TOOLBOX {
                $this->form_scripts .= '<div id="cal'.$type.'Container" style="display:none;">&nbsp;</div>
        <script type="text/javascript">
        YAHOO.example.calendar.cal'.$type.' = new YAHOO.widget.Calendar("cal'.$type.'","cal'.$type.'Container", { title: \'Select a Date\', close:true, iframe: true '.$fObject->info.' });
-    YAHOO.example.calendar.cal'.$type.'.addRenderer("6/01/'.date('Y').'-6/03/'.date('Y').'", YAHOO.example.calendar.cal'.$type.'.renderBodyCellRestricted);
-    YAHOO.example.calendar.cal'.$type.'.addRenderer("9/23/'.date('Y').'-9/25/'.date('Y').'", YAHOO.example.calendar.cal'.$type.'.renderBodyCellRestricted);
+    //YAHOO.example.calendar.cal'.$type.'.addRenderer("6/01/'.date('Y').'-6/03/'.date('Y').'", YAHOO.example.calendar.cal'.$type.'.renderBodyCellRestricted);
+    YAHOO.example.calendar.cal'.$type.'.addRenderer("5/31/'.date('Y').'", YAHOO.example.calendar.cal'.$type.'.renderBodyCellRestricted);
+    YAHOO.example.calendar.cal'.$type.'.addRenderer("6/01/'.date('Y').'-6/02/'.date('Y').'", YAHOO.example.calendar.cal'.$type.'.renderBodyCellRestricted);
+    YAHOO.example.calendar.cal'.$type.'.addRenderer("9/22/'.date('Y').'-9/24/'.date('Y').'", YAHOO.example.calendar.cal'.$type.'.renderBodyCellRestricted);
     YAHOO.example.calendar.cal'.$type.'.render();
        YAHOO.util.Event.addListener("'.$type.'_trigger", "click", YAHOO.example.calendar.cal'.$type.'.show, YAHOO.example.calendar.cal'.$type.', true);
        YAHOO.util.Event.addListener("'.$type.'", "click", YAHOO.example.calendar.cal'.$type.'.show, YAHOO.example.calendar.cal'.$type.', true);
index 594fa48..65d0673 100755 (executable)
@@ -69,7 +69,7 @@ class glm_member extends GLM_TOOLBOX
                $adult_amount = $child_amount = 0.00;
                // not a ferry list
                $headers = array('id'=>'Function','name'=>'Member Names','amount_adult'=>'Amount (Adult)','amount_child'=>'Amount (child)');
-               $query = "select id,name,adult,youth,child from ticket_member order by ferry,name;";
+               $query = "select id,name,adult,child from ticket_member order by ferry,name;";
                if( $data = $this->DB->db_auto_get_data( $query ) )
                {
                        foreach( $data as $key => $row )
index 1b058f2..3c191fe 100755 (executable)
@@ -366,24 +366,24 @@ class order_form extends form_creator
             $this->DB->db_exec($query) ;
         } else {
             // if they don't exists then setup INSERT
-            $lastoid    = pg_getlastoid($res2) ;
-            $query      = "INSERT INTO contact ($contact_fields) VALUES ('$contact_values');";
+            //$lastoid    = pg_getlastoid($res2) ;
+            $query      = "INSERT INTO contact ($contact_fields) VALUES ('$contact_values') RETURNING id;";
             $res2       = $this->DB->db_exec($query);
-               $lastoid    = pg_getlastoid($res2) ;
-            $query      = "SELECT id FROM contact WHERE oid = $lastoid";
-            $res3       = $this->DB->db_exec($query) ;
-            $contact_id = pg_result($res3, 0, 'id') ;
+               //$lastoid    = pg_getlastoid($res2) ;
+            //$query      = "SELECT id FROM contact WHERE oid = $lastoid";
+            //$res3       = $this->DB->db_exec($query) ;
+            $contact_id = pg_result($res2, 0, 'id') ;
         }
         if (!$contact_id) {
             $query = "INSERT INTO package_req (contact_id,$fields) VALUES (null,'$values')";
         } else {
-            $query = "INSERT INTO package_req (contact_id,$fields) VALUES ($contact_id,'$values')";
+            $query = "INSERT INTO package_req (contact_id,$fields) VALUES ($contact_id,'$values') RETURNING package_number;";
         }
         $res        = $this->DB->db_exec($query) ;
-        $lastoid    = pg_getlastoid($res) ;
-        $query2     = "SELECT package_number FROM package_req WHERE oid = $lastoid";
-        $res2       = $this->DB->db_exec($query2) ;
-        $package_id = pg_result($res2, 0, 'package_number');
+        //$lastoid    = pg_getlastoid($res) ;
+        //$query2     = "SELECT package_number FROM package_req WHERE oid = $lastoid";
+        //$res2       = $this->DB->db_exec($query2) ;
+        $package_id = pg_result($res, 0, 'package_number');
 
         $confirmation
             = $this->send_cust_email($package_id) ;
index 8a77e21..9f7cb28 100755 (executable)
@@ -51,7 +51,7 @@ class package extends GLM_TOOLBOX
                $pdf =& new Creport(array(0,0,595.35,785.295),'portrait');                              // page size 
                $pdf->selectFont(BASE."fonts/Helvetica.afm");           // page font
                $pdf->ezSetMargins(0,0,30,30);                                  // page margins (top,bottom,left,right)
-               $type_array = array('adult'=>'Adult','youth'=>'Youth','child'=>'Child');
+               $type_array = array('adult'=>'Adult','child'=>'Child');
                $query = "select *,to_char(package_date,'MM-DD-YYYY') as package_date from package_req where id = ".$_GET['id'];
                if( $data = $this->DB->db_auto_get_data( $query ) )
                {
@@ -273,10 +273,10 @@ class package extends GLM_TOOLBOX
                $out = $this->ferry_vouchers();
                $prices = $this->package_prices[$this->ferry_members[$_GET['ferry']]];
                $adult_price = $prices['adult'];
-               $youth_price = $prices['youth'];
+               //$youth_price = $prices['youth'];
                $child_price = $prices['child'];
                $adult = $youth = $child = 0;
-               $query = "select package_number,adult,youth,child from package_req where ferry_id = ".$_GET['ferry'];
+               $query = "select package_number,adult,child from package_req where ferry_id = ".$_GET['ferry'];
                //echo '<p>'.$query.'</p>';
                if( $data = $this->DB->db_auto_get_data( $query ) )
                {
@@ -288,22 +288,18 @@ class package extends GLM_TOOLBOX
                                  <th>Package #</th>
                                  <th>Adult</th>
                                  <th>Adult Price</th>
-                                 <th>Youth</th>
-                                 <th>Youth Price</th>
                                  <th>Child</th>
                                  <th>Child Price</th>
                                </tr>';
                        foreach( $data as $row )
                        {
                                $adult += $row['adult'];
-                               $youth += $row['youth'];
+                               //$youth += $row['youth'];
                                $child += $row['child'];
                                $out .= '<tr>
                                          <td>'.$row['package_number'].'</td>
                                          <td>'.$row['adult'].'</td>
                                          <td>$'.( number_format( $row['adult'] * $adult_price , 2 ) ) .'</td>
-                                         <td>'.$row['youth'].'</td>
-                                         <td>$'.( number_format( $row['youth'] * $youth_price , 2 ) ).'</td>
                                          <td>'.$row['child'].'</td>
                                          <td>$'.( number_format( $row['child'] * $child_price , 2 ) ).'</td>
                                        </tr>';
@@ -312,8 +308,6 @@ class package extends GLM_TOOLBOX
                                  <td>Totals</td>
                                  <td>'. $adult.'</td>
                                  <td>$'.( number_format(  $adult * $adult_price , 2 ) ) .'</td>
-                                 <td>'. $youth.'</td>
-                                 <td>$'.( number_format(  $youth * $youth_price , 2 ) ).'</td>
                                  <td>'. $child.'</td>
                                  <td>$'.( number_format(  $child * $child_price , 2 ) ).'</td>
                                </tr>';
@@ -476,21 +470,21 @@ class package extends GLM_TOOLBOX
                        unset( $t_dat );
                        $adult = (int)$package_data[$member_id]['adult'];
                        $adult_price += (float)$package_data[$member_id]['adult_price'];
-                       $youth = (int)$package_data[$member_id]['youth'];
-                       $youth_price += (float)$package_data[$member_id]['youth_price'];
+                       //$youth = (int)$package_data[$member_id]['youth'];
+                       //$youth_price += (float)$package_data[$member_id]['youth_price'];
                        $child = (int)$package_data[$member_id]['child'];
                        $child_price += (float)$package_data[$member_id]['child_price'];
                        $total = (int)$package_data[$member_id]['total_packages_sold'];
                        $t_dat['name'] = $ticket_row;
                        $t_dat['adult_total'] = $package_data[$member_id]['adult'];
                        $t_dat['adult_price_total'] = '$'.number_format($package_data[$member_id]['adult_price'],2);
-                       $t_dat['youth_total'] = $package_data[$member_id]['youth'];
-                       $t_dat['youth_price_total'] = '$'.number_format($package_data[$member_id]['youth_price'],2);
+                       //$t_dat['youth_total'] = $package_data[$member_id]['youth'];
+                       //$t_dat['youth_price_total'] = '$'.number_format($package_data[$member_id]['youth_price'],2);
                        $t_dat['child_total'] = $package_data[$member_id]['child'];
                        $t_dat['child_price_total'] = '$'.number_format($package_data[$member_id]['child_price'],2);
                        $t_dat['total'] = $package_data[$member_id]['adult_price'];
                        $member_total_price = (float)$package_data[$member_id]['adult_price'];
-                       $member_total_price += (float)$package_data[$member_id]['youth_price'];
+                       //$member_total_price += (float)$package_data[$member_id]['youth_price'];
                        $member_total_price += (float)$package_data[$member_id]['child_price'];
                        $t_dat['total_price'] = '$'.number_format($member_total_price,2);
                        $total_price += $member_total_price;
@@ -503,19 +497,19 @@ class package extends GLM_TOOLBOX
                // need a online ferry total 
                unset( $dat );
                $adult_price += (float)$ferry_package_data[1]['adult_price'];
-               $youth_price += (float)$ferry_package_data[1]['youth_price'];
+               //$youth_price += (float)$ferry_package_data[1]['youth_price'];
                $child_price += (float)$ferry_package_data[1]['child_price'];
                $total += (int)$ferry_package_data[1]['total_packages_sold'];
                $t_dat['name'] = 'Ferry Lines';
                $t_dat['adult_total'] = $ferry_package_data[1]['adult'];
                $t_dat['adult_price_total'] = '$'.number_format($ferry_package_data[1]['adult_price'],2);
-               $t_dat['youth_total'] = $ferry_package_data[1]['youth'];
-               $t_dat['youth_price_total'] = '$'.number_format($ferry_package_data[1]['youth_price'],2);
+               //$t_dat['youth_total'] = $ferry_package_data[1]['youth'];
+               //$t_dat['youth_price_total'] = '$'.number_format($ferry_package_data[1]['youth_price'],2);
                $t_dat['child_total'] = $ferry_package_data[1]['child'];
                $t_dat['child_price_total'] = '$'.number_format($ferry_package_data[1]['child_price'],2);
                $t_dat['total'] = $ferry_package_data[1]['adult_price'];
                $member_total_price = (float)$ferry_package_data[1]['adult_price'];
-               $member_total_price += (float)$ferry_package_data[1]['youth_price'];
+               //$member_total_price += (float)$ferry_package_data[1]['youth_price'];
                $member_total_price += (float)$ferry_package_data[1]['child_price'];
                $t_dat['total_price'] = '$'.number_format($member_total_price,2);
                $total_price += $member_total_price;
@@ -526,8 +520,8 @@ class package extends GLM_TOOLBOX
                $dat['name'] = 'Sub Total Amounts';
                $dat['adult_total'] = '';//$adult;
                $dat['adult_price_total'] = '$'.number_format($adult_price,2);
-               $dat['youth_total'] = '';//$youth;
-               $dat['youth_price_total'] = '$'.number_format($youth_price,2);
+       //      $dat['youth_total'] = '';//$youth;
+       //      $dat['youth_price_total'] = '$'.number_format($youth_price,2);
                $dat['child_total'] = '';//$child;
                $dat['child_price_total'] = '$'.number_format($child_price,2);
                $dat['total'] = '';//$total;
@@ -604,8 +598,8 @@ class package extends GLM_TOOLBOX
                $dat['name'] = 'Handling & Processing Fees';
                $dat['adult_total'] = '';
                $dat['adult_price_total'] = '';
-               $dat['youth_total'] = '';
-               $dat['youth_price_total'] = '';
+       //      $dat['youth_total'] = '';
+       //      $dat['youth_price_total'] = '';
                $dat['child_total'] = '';
                $dat['child_price_total'] = '';
                $dat['total'] = '';
@@ -617,8 +611,8 @@ class package extends GLM_TOOLBOX
                $dat['name'] = 'Grand Total';
                $dat['adult_total'] = '';
                $dat['adult_price_total'] = '';
-               $dat['youth_total'] = '';
-               $dat['youth_price_total'] = '';
+       //      $dat['youth_total'] = '';
+       //      $dat['youth_price_total'] = '';
                $dat['child_total'] = '';
                $dat['child_price_total'] = '';
                $dat['total'] = '';
@@ -630,7 +624,7 @@ class package extends GLM_TOOLBOX
                $summary_report['total_packages_sold'] = $total_packages;
                $summary_report['summary_type'] = '<b>Confirmed &amp; Processed Packages</b>';
                $summary_report['adult'] = $adult;
-               $summary_report['youth'] = $youth;
+       //      $summary_report['youth'] = $youth;
                $summary_report['child'] = $child;
                $summary_report['ticket_member_total_table'] = $package_member_summary_table;
                $summary_table .= $this->explode_template( SUMMARY_REPORT,$summary_report );
@@ -650,21 +644,21 @@ class package extends GLM_TOOLBOX
                        unset( $t_dat );
                        $adult += (int)$member_data[$member_id]['adult'];
                        $adult_price += (float)$member_data[$member_id]['adult_price'];
-                       $youth += (int)$member_data[$member_id]['youth'];
-                       $youth_price += (float)$member_data[$member_id]['youth_price'];
+               //      $youth += (int)$member_data[$member_id]['youth'];
+               //      $youth_price += (float)$member_data[$member_id]['youth_price'];
                        $child += (int)$member_data[$member_id]['child'];
                        $child_price += (float)$member_data[$member_id]['child_price'];
                        $total += (int)$member_data[$member_id]['total_packages_sold'];
                        $t_dat['name'] = $ticket_row;
                        $t_dat['adult_total'] = $member_data[$member_id]['adult'];
                        $t_dat['adult_price_total'] = '$'.number_format($member_data[$member_id]['adult_price'],2);
-                       $t_dat['youth_total'] = $member_data[$member_id]['youth'];
-                       $t_dat['youth_price_total'] = '$'.number_format($member_data[$member_id]['youth_price'],2);
+       //              $t_dat['youth_total'] = $member_data[$member_id]['youth'];
+               //      $t_dat['youth_price_total'] = '$'.number_format($member_data[$member_id]['youth_price'],2);
                        $t_dat['child_total'] = $member_data[$member_id]['child'];
                        $t_dat['child_price_total'] = '$'.number_format($member_data[$member_id]['child_price'],2);
                        $t_dat['total'] = $member_data[$member_id]['adult_price'];
                        $member_total_price = (float)$member_data[$member_id]['adult_price'];
-                       $member_total_price += (float)$member_data[$member_id]['youth_price'];
+               //      $member_total_price += (float)$member_data[$member_id]['youth_price'];
                        $member_total_price += (float)$member_data[$member_id]['child_price'];
                        $total_price += $member_total_price;
                        $t_dat['total_price'] = '$'.number_format($member_total_price,2);
@@ -680,21 +674,21 @@ class package extends GLM_TOOLBOX
                        unset( $t_dat );
                        $adult = (int)$member_data[$member_id]['adult'];
                        $adult_price += (float)$member_data[$member_id]['adult_price'];
-                       $youth = (int)$member_data[$member_id]['youth'];
-                       $youth_price += (float)$member_data[$member_id]['youth_price'];
+               //      $youth = (int)$member_data[$member_id]['youth'];
+               //      $youth_price += (float)$member_data[$member_id]['youth_price'];
                        $child = (int)$member_data[$member_id]['child'];
                        $child_price += (float)$member_data[$member_id]['child_price'];
                        $total = (int)$member_data[$member_id]['total_packages_sold'];
                        $t_dat['name'] = $ticket_row;
                        $t_dat['adult_total'] = $member_data[$member_id]['adult'];
                        $t_dat['adult_price_total'] = '$'.number_format($member_data[$member_id]['adult_price'],2);
-                       $t_dat['youth_total'] = $member_data[$member_id]['youth'];
-                       $t_dat['youth_price_total'] = '$'.number_format($member_data[$member_id]['youth_price'],2);
+               //      $t_dat['youth_total'] = $member_data[$member_id]['youth'];
+               //      $t_dat['youth_price_total'] = '$'.number_format($member_data[$member_id]['youth_price'],2);
                        $t_dat['child_total'] = $member_data[$member_id]['child'];
                        $t_dat['child_price_total'] = '$'.number_format($member_data[$member_id]['child_price'],2);
                        $t_dat['total'] = $member_data[$member_id]['adult_price'];
                        $member_total_price = (float)$member_data[$member_id]['adult_price'];
-                       $member_total_price += (float)$member_data[$member_id]['youth_price'];
+               //      $member_total_price += (float)$member_data[$member_id]['youth_price'];
                        $member_total_price += (float)$member_data[$member_id]['child_price'];
                        $t_dat['total_price'] = '$'.number_format($member_total_price,2);
                        $total_price += $member_total_price;
@@ -711,8 +705,8 @@ class package extends GLM_TOOLBOX
                $dat['name'] = 'Handling & Processing Fees';
                $dat['adult_total'] = '';
                $dat['adult_price_total'] = '';
-               $dat['youth_total'] = '';
-               $dat['youth_price_total'] = '';
+       //      $dat['youth_total'] = '';
+       //      $dat['youth_price_total'] = '';
                $dat['child_total'] = '';
                $dat['child_price_total'] = '';
                $dat['total'] = '';
@@ -721,7 +715,7 @@ class package extends GLM_TOOLBOX
 
                $summary_report['total_packages_sold'] = $total_packages;
                $summary_report['adult'] = $adult;
-               $summary_report['youth'] = $youth;
+       //      $summary_report['youth'] = $youth;
                $summary_report['child'] = $child;
                $summary_report['ticket_member_total_table'] = $package_member_summary_table;
                $summary_table .= $this->explode_template( SUMMARY_REPORT,$summary_report );
@@ -745,7 +739,7 @@ class package extends GLM_TOOLBOX
                $query = "select 
                        count(id) as total,
                        sum(adult) as adult,
-                       sum(youth) as youth,
+                       -- sum(youth) as youth,
                        sum(child) as child,
                        sum(handling_fee) as handling_fee,
                        sum(overnight) as overnight
@@ -753,7 +747,7 @@ class package extends GLM_TOOLBOX
                if( $data = $this->DB->db_auto_get_data( $query ) )
                {
                        $adult = $data[0]['adult'];
-                       $youth = $data[0]['youth'];
+               //      $youth = $data[0]['youth'];
                        $child = $data[0]['child'];
                        $handling_fee = (float)$data[0]['handling_fee'];
                        $overnight = (float)$data[0]['overnight'];
@@ -775,8 +769,8 @@ class package extends GLM_TOOLBOX
                        $out_array[$member_id] = array(
                                'adult'=>$adult,
                                'adult_price'=> $this->package_prices[$member_name]['adult'] * $adult,
-                               'youth'=>$youth,
-                               'youth_price'=>$this->package_prices[$member_name]['youth'] * $youth,
+                       //      'youth'=>$youth,
+                       //      'youth_price'=>$this->package_prices[$member_name]['youth'] * $youth,
                                'child'=>$child,
                                'child_price'=>$this->package_prices[$member_name]['child'] * $child,
                                'handling_fee'=>$handling_fee,
@@ -803,7 +797,7 @@ class package extends GLM_TOOLBOX
                $query = "select 
                        count(id) as total,
                        sum(adult) as adult,
-                       sum(youth) as youth,
+               --      sum(youth) as youth,
                        sum(child) as child,
                        sum(handling_fee) as handling_fee,
                        sum(overnight) as overnight
@@ -811,7 +805,7 @@ class package extends GLM_TOOLBOX
                if( $data = $this->DB->db_auto_get_data( $query ) )
                { 
                        $adult = $data[0]['adult'];
-                       $youth = $data[0]['youth'];
+               //      $youth = $data[0]['youth'];
                        $child = $data[0]['child'];
                        $handling_fee = (float)$data[0]['handling_fee'];
                        $overnight = (float)$data[0]['overnight'];
@@ -832,8 +826,8 @@ class package extends GLM_TOOLBOX
                        $out_array[$member_id] = array(
                                'adult'=>$adult,
                                'adult_price'=> $this->package_prices[$member_name]['adult'] * $adult,
-                               'youth'=>$youth,
-                               'youth_price'=>$this->package_prices[$member_name]['youth'] * $youth,
+                       //      'youth'=>$youth,
+                       //      'youth_price'=>$this->package_prices[$member_name]['youth'] * $youth,
                                'child'=>$child,
                                'child_price'=>$this->package_prices[$member_name]['child'] * $child,
                                'handling_fee'=>$handling_fee,
@@ -954,14 +948,14 @@ class package extends GLM_TOOLBOX
                                        $total_paid_ar[$drow['ticket_member_id']] += (float)$drow['amount'];
                                }
                        }
-                       $query = "select sum(adult) as adult,sum(youth) as youth,sum(child) as child from package_req where status = 2 $where;";
+                       $query = "select sum(adult) as adult,sum(child) as child from package_req where status = 2 $where;";
                        if( $data = $this->DB->db_auto_get_data( $query ))
                        {
                                $adult = $data[0]['adult'];
-                               $youth = $data[0]['youth'];
+                       //      $youth = $data[0]['youth'];
                                $child = $data[0]['child'];
                        }
-                       $query = "set datestyle to 'sql,us';select id,settlement_date,ferry,name,adult,youth,child,total_paid from ticket_member order by id;";
+                       $query = "set datestyle to 'sql,us';select id,settlement_date,ferry,name,adult,child,total_paid from ticket_member order by id;";
                        if( $data2 = $this->DB->db_auto_get_data( $query ) )
                        {
                                $out .= '<style type="text/css">
@@ -1007,27 +1001,27 @@ class package extends GLM_TOOLBOX
                                        $ptotal = ( $total_paid_ar[$row['id']] ) ? $total_paid_ar[$row['id']] : '0';
                                        if( $row['ferry'] == 't' )
                                        {
-                                               $query = "select sum(adult) as adult,sum(youth) as youth,sum(child) as child from package_req where ferry_id = ".$row['id']." and status = 2 $where;";
+                                               $query = "select sum(adult) as adult,sum(child) as child from package_req where ferry_id = ".$row['id']." and status = 2 $where;";
                                                if( $data2 = $this->DB->db_auto_get_data( $query ) )
                                                {
                                                        $total_adult = (float)((float)$row['adult'] * (float)$data2[0]['adult']);
-                                                       $total_youth = (float)((float)$row['youth'] * (float)$data2[0]['youth']);
+                                               //      $total_youth = (float)((float)$row['youth'] * (float)$data2[0]['youth']);
                                                        $total_child = (float)((float)$row['child'] * (float)$data2[0]['child']);
                                                }
                                                else
                                                {
                                                        $total_adult = (float)0.00;
-                                                       $total_youth = (float)0.00;
+                                               //      $total_youth = (float)0.00;
                                                        $total_child = (float)0.00;
                                                }
                                        }
                                        else
                                        {
                                                $total_adult = (float)((float)$adult * (float)$row['adult']);
-                                               $total_youth = (float)((float)$youth * (float)$row['youth']);
+                                       //      $total_youth = (float)((float)$youth * (float)$row['youth']);
                                                $total_child = (float)((float)$child * (float)$row['child']);
                                        }
-                                       $total_receipts = (float)((float)$total_adult + (float)$total_youth + (float)$total_child);
+                                       $total_receipts = (float)((float)$total_adult + (float)$total_child);
                                        (float)$due = (float)((float)$total_receipts - (float)$ptotal);
                                        $out .= '<tr>
                                                <td width="300">'.$row["name"].'</td>
@@ -1314,13 +1308,13 @@ class package extends GLM_TOOLBOX
 
        function get_package_prices()
        {
-               $query = "select name,adult,youth,child from ticket_member";
+               $query = "select name,adult,child from ticket_member";
                if( $data = $this->DB->db_auto_get_data( $query ) )
                {
                        foreach( $data as $row )
                        {
                                $out_array[$row['name']]['adult'] = $row['adult'];
-                               $out_array[$row['name']]['youth'] = $row['youth'];
+                       //      $out_array[$row['name']]['youth'] = $row['youth'];
                                $out_array[$row['name']]['child'] = $row['child'];
                        }
                        return( $out_array );
index f28f3d8..0f96691 100755 (executable)
                <h1>Ferry Lines</h1>
                <div id="details">
                        <div id="details-inner">
-                               <img src="assets/logo-arnold.gif" width="150" height="150" alt="" style="float: right; 
-position: relative; margin: 0 0 10px 10px;">
-                               <h2>Arnold Transit Co.</h2>
-                               <p>
-                                       Arnold Mackinac Island Ferry offers the comfort of on-board restrooms, handicapped 
-friendly aisles, the largest seating capacities & more covered seating than any other ferry. Guests receive free on-site day 
-& overnight parking, luggage handling, as well as shuttles to & from our dock. Your adventure begins on Arnold, as much a 
-part of Mackinac Island history as bicycles, horses & fudge!                                   
-                                       <br>
-                                       <a href="http://www.arnoldline.com" rel="external">www.arnoldline.com</a>
-                               </p>
-                <br>
-                <br>
-                               
                                <img src="assets/logo-sheplers.gif" width="225" height="132" alt="" style="float: right; position: relative; margin: 0 0 10px 10px;">
                                <h2>Shepler&#39;s</h2>
                                <p>
index 1183aa3..0f96691 100755 (executable)
                <h1>Ferry Lines</h1>
                <div id="details">
                        <div id="details-inner">
-                               <img src="assets/logo-arnold.gif" width="225" height="51" alt="" style="float: right; position: relative; margin: 0 0 10px 10px;">
-                               <h2>Arnold Transit Co.</h2>
-                               <p>
-                                       Only the Arnold Line offers state of the art Catamaran service that provides a fast, smooth ride with luxurious cabins and exciting open deck seating.  Rates &quot;Best Ferry to Mackinac Island&quot; by the Detroit News in 2006 choose the Arnold Line and you will enjoy the Greatest Ride to Mackinac!
-                                       <br>
-                                       <a href="http://www.arnoldline.com" rel="external">www.arnoldline.com</a>
-                               </p>
-                               
                                <img src="assets/logo-sheplers.gif" width="225" height="132" alt="" style="float: right; position: relative; margin: 0 0 10px 10px;">
                                <h2>Shepler&#39;s</h2>
                                <p>
index 94b985e..75e975e 100755 (executable)
@@ -34,7 +34,7 @@
 
        $fields[] = array('title'=>'Ticket Amounts','type'=>'static_text');
        $fields[] = array('name'=>'adult','title'=>'Adults (18+) $59.00','type'=>'drop','info'=>$people_sel,'req'=>1);
-       $fields[] = array('name'=>'youth','title'=>'Youth (13-17) $54.00','type'=>'drop','info'=>$people_sel,'req'=>1);
+       //$fields[] = array('name'=>'youth','title'=>'Youth (13-17) $54.00','type'=>'drop','info'=>$people_sel,'req'=>1);
        $fields[] = array('name'=>'child','title'=>'Children (6-12) $30.00','type'=>'drop','info'=>$people_sel,'req'=>1);
 
        $ship_type = '<div style="float:left;"><input disabled id="ship_type1" type="radio" name="ship_type">Ship Package to me.
index 2d42f83..ed3e921 100755 (executable)
@@ -15,7 +15,7 @@ include_once 'setup.phtml';
                <h1>Promote This Package</h1>
                <div id="details">
                        <div id="details-inner">
-                               <p>The Mackinac Island Experience Package is brought to you by the Mackinac Island Carriage Tour Company, serving visitors to Mackinac Island for over 100 years. In cooperation with Grand Hotel, Mackinac State Historic Parks, Wings of Mackinac Butterfly Conservatory, Arnold Transit Company, Shepler&#39;s Mackinac Island Ferry and Star Line Mackinac Island Hydro-Jet Ferry.</p>
+                               <p>The Mackinac Island Experience Package is brought to you by the Mackinac Island Carriage Tour Company, serving visitors to Mackinac Island for over 100 years. In cooperation with Grand Hotel, Mackinac State Historic Parks, Wings of Mackinac Butterfly Conservatory, Shepler&#39;s Mackinac Island Ferry and Star Line Mackinac Island Hydro-Jet Ferry.</p>
                                <p>Please help us to promote this package by adding our logo and link to your Website. There are no fees or charges for helping us to promote this package and we 
 appreciate your cooperation and hope that it directly benefits your business. Our goal is to increase the number visitors to Mackinac Island and increase their enjoyment of a true Mackinac Island Experience!</p>
                                <div id="detail-images">
index 2fd143b..ca85ccf 100755 (executable)
@@ -47,7 +47,7 @@ type="text/javascript"></script>
                        <div id="details-inner">
                 <?php if (!$_POST) {?>
                               <div id="form-text-only">
-                                        <p>The Mackinac Island Experience Package is brought to you by the Mackinac Island Carriage Tour Company, serving visitors to Mackinac Island for over 100 years. In cooperation with Grand Hotel, Mackinac State Historic Parks, Wings of Mackinac Butterfly Conservatory, Arnold Transit Company, Shepler's Mackinac Island Ferry and Star Line Mackinac Island Hydro-Jet Ferry.</p>
+                                        <p>The Mackinac Island Experience Package is brought to you by the Mackinac Island Carriage Tour Company, serving visitors to Mackinac Island for over 100 years. In cooperation with Grand Hotel, Mackinac State Historic Parks, Wings of Mackinac Butterfly Conservatory, Shepler's Mackinac Island Ferry and Star Line Mackinac Island Hydro-Jet Ferry.</p>
                                         <p>Your package voucher will either be mailed or available for pick up at will-call depending on your order and arrival dates. Only one voucher is issued per package purchase which is exchanged for tickets at each attraction. </p>
                                         <p>This is an all inclusive package. No partial refunds will be given. Your package voucher tickets will either be mailed or available for pick up at will-call depending on your order and arrival dates.</p>
                                 </div>
@@ -55,10 +55,12 @@ type="text/javascript"></script>
                <div id="detail-images">
                </div>
 <?php
-                       //echo $order_form->form;
-                       //echo $order_form->form_scripts;
+                       echo $order_form->form;
+                       echo $order_form->form_scripts;
 ?>
+<!--
 <p style="font-weight:bold;">2017 Packages will be available soon!</p>
+-->
 
                                <div class="clearer"></div>
                        </div>
index e67c6a1..71634db 100755 (executable)
@@ -47,7 +47,7 @@ type="text/javascript"></script>
                        <div id="details-inner">
                 <?php if (!$_POST) {?>
                               <div id="form-text-only">
-                                        <p>The Mackinac Island Experience Package is brought to you by the Mackinac Island Carriage Tour Company, serving visitors to Mackinac Island for over 100 years. In cooperation with Grand Hotel, Mackinac State Historic Parks, Wings of Mackinac Butterfly Conservatory, Arnold Transit Company, Shepler's Mackinac Island Ferry and Star Line Mackinac Island Hydro-Jet Ferry.</p>
+                                        <p>The Mackinac Island Experience Package is brought to you by the Mackinac Island Carriage Tour Company, serving visitors to Mackinac Island for over 100 years. In cooperation with Grand Hotel, Mackinac State Historic Parks, Wings of Mackinac Butterfly Conservatory, Shepler's Mackinac Island Ferry and Star Line Mackinac Island Hydro-Jet Ferry.</p>
                                         <p>Your package voucher will either be mailed or available for pick up at will-call depending on your order and arrival dates. Only one voucher is issued per package purchase which is exchanged for tickets at each attraction. </p>
                                         <p>This is an all inclusive package. No partial refunds will be given. Your package voucher tickets will either be mailed or available for pick up at will-call depending on your order and arrival dates.</p>
                                 </div>
index d5c8d8c..54b1a86 100755 (executable)
@@ -20,9 +20,9 @@
 <img src="assets/sill-island.jpg" width="200" height="216" alt="" style="float: right; position: relative; margin: 0 0 10px 10px;">
 <h2>Early to Mid-Morning</h2>
 <ul>
-       <li>Board your choice of ferry service to Mackinac Island. Arnold Line, Shepler&#39;s or Star Line. Mackinac Island ferries feature regularly scheduled daily departures from either St. Ignace or Mackinaw City. (15-20 minutes)</li>
+       <li>Board your choice of ferry service to Mackinac Island. Shepler&#39;s or Star Line. Mackinac Island ferries feature regularly scheduled daily departures from either St. Ignace or Mackinaw City. (16-40 minutes)</li>
        <li>Arrive on Mackinac.  Board Mackinac Island Carriage Tours for a horse-drawn carriage tour downtown Mackinac Island (30 minutes)</li>
-       <li>Arrive at Surrey Hills.  Tour Mackinac Island Butterfly Conservatory (30 - 45 minutes)</li>
+       <li>Arrive at Surrey Hills.  Tour Wings of Mackinac Butterfly Conservatory (30 - 45 minutes)</li>
 </ul>
 
 <div class="clearer"></div>
@@ -51,7 +51,8 @@
 to receive your admission pass. You may also use this on the same day as your admission
 for a $10.00 discount per adult on the Grand Luncheon Buffet, served daily from 12:00 p.m.
 to 2:00 p.m. in the hotel's Main Dining Room. Casual resort wear is appropriate during the
-day at Grand Hotel. No tank tops or cut offs are permitted.</li>
+day at Grand Hotel. No tank tops or cut offs are permitted. Please check with Grand Hotel 
+regarding black out dates for Grand Luncheon Buffet 906-847-3331.</li>
 </ul>  
 
 <div class="clearer"></div>
index 80d709b..56ce2ff 100755 (executable)
@@ -119,8 +119,9 @@ if( !isset($SITEINFO) )
                                define("BASE_SECURE_URL", $BASE_SECURE_URL."/");         // url used for the secur site
                                $BASE_URL = "http://".$base_url;                                         // This needs to be set to the real url ie. http://www.upnorth.net
                        }
+                       define("AUTH_TEST_MODE","TRUE");
                        define("BASE_INSECURE_URL", $BASE_URL."/");                     
-                       define("CONN_STR", "dbname=mackinacislandpackages");                     // DB connection string
+                       define("CONN_STR", "user=nobody dbname=mackinacislandpackages");                         // DB connection string
                        define("OWNER_EMAIL", "mackinacpackage@mict.com");               // site owner's email address
                        define("FROM_NEWS_EMAIL", "mackinacpackage@mict.com");          // site owner's email address
                        define("REPLY_TO", "mackinacpackage@mict.com");                  // the reply-to field for email's