<?php require_once ('connect.php'); ?>
<?php
$today = date("Y-m-d");
$cid = $_SERVER['REMOTE_ADDR'];
date_default_timezone_set("America/Chicago");
$todaydate = date("Y-m-d");
//Show Cart
$query_ShoppingCart = "SELECT * FROM Cart WHERE order != '' GROUP BY cid";
$ShoppingCart = mysqli_query($SMB, $query_ShoppingCart);
$totalRows_ShoppingCart = mysqli_num_rows($ShoppingCart);
if($totalRows_ShoppingCart > 0) {
while($row_ShoppingCart = mysqli_fetch_assoc($ShoppingCart)){
$ShoppingCart_id = $row_ShoppingCart['id'];
if($ShoppingCart_Status == 'Register'){
$Attending = $ShoppingCart_Name;
$Attendees .= '<p>'.$Attending.' - <strong>Price: $'.$ShoppingCart_Price.'</strong></p>';
$CountRegister = 1;
$TotalRegister = $CountRegister + $TotalRegister;
}
if ($TotalRegister > 0){
$CancelPolicy = '<h5>Cancellation Policy</h5><p>Cancellation policy:
All cancellation requests must be in writing. Full refund of the course fee will be granted for cancellation requests made seven (7) days or more prior to the scheduled course date. Fifty percent of the course fee will be refunded for cancellation requests received less than seven (7) days prior to the scheduled course date. Successful Medical Billing, LLC reserves the right to cancel any course, limit enrollment, modify the announced content, or change the location, time, date, and faculty of any course, as Successful Medical Billing, LLC may deem necessary or advisable. Should Successful Medical Billing, LLC cancel a course, Successful Medical Billing, LLCs liability is limited to a full refund of the course fee.</p>';
}
else {
$CancelPolicy = "";
}
if($ShoppingCart_Type == 'Claiming Wheels'){
$courseBooks = 1;
}
if($ShoppingCart_Type == 'Book'){
$courseBooks = 1;
}
$TotalAddBook = $AddBookCount + $TotalAddBook;
$TotalBooks = $ShoppingCart_Book + $TotalBooks;
$shippingTotal = $ShoppingCart_Ship + $shippingTotal;
if($ShoppingCart_Type == 'Dentist'){
$CountDentist = 1;
$TotalDentist = $CountDentist + $TotalDentist;
}
if($ShoppingCart_Type == 'Staff'){
$CountStaff = 1;
$TotalStaff = $CountStaff + $TotalStaff;
}
if($TotalDentist > 2){
$DentistBooks = 2;
$DentistDiscount = number_format((($TotalDentist - 2) * 275),2);
$ShowDentistDiscount = '<tr><td align="right" nowrap="nowrap" class="discount"><strong>Dentist Qty Discount:</strong></td><td align="right" nowrap="nowrap" class="discount"><strong>-$'.$DentistDiscount.'</strong></td>
</tr>';
}
else {
$DentistDiscount = 0.00;
$DentistBooks = $TotalDentist;
$ShowDentistDiscount = "";
}
if($TotalStaff > 2){
$StaffDiscount = number_format((($TotalStaff - 2) * 225),2);
$ShowStaffDiscount = '<tr><td align="right" nowrap="nowrap" class="discount"><strong>Staff Qty Discount:</strong></td><td align="right" nowrap="nowrap" class="discount"><strong>-$'.$StaffDiscount.'</strong></td></tr>';
}
else {
$ShowStaffDiscount = "";
}
if($shippingTotal > 0){
$shipping = 8.00;
$Showshipping = '<tr><td align="right" nowrap="nowrap"><strong>Shipping:</strong></td>
<td align="right" nowrap="nowrap"><strong>$'.number_format(8.00, 2).'</strong></td></tr>';
}
else {
$shipping = 0;
$Showshipping = "";
}
$courseBooks = $DentistBooks + $TotalAddBook;
if($courseBooks > 0){
$ShowBooks = '<tr><td align="right" nowrap="nowrap"><strong>Course Books Included:</strong></td><td align="right" nowrap="nowrap"><strong>'.$courseBooks.'</strong></td></tr>';
}
$ShoppingCart_TotalPrice = $ShoppingCart_Price * $ShoppingCart_Qty;
$ShoppingCart_TotalPrice2 = number_format($ShoppingCart_TotalPrice, 2);
$SubTotal = $ShoppingCart_TotalPrice + $SubTotal;
$SubTotal2 = number_format($SubTotal, 2);
$GrandTotal = ((($SubTotal + $shipping) - $StaffDiscount) - $DentistDiscount);
$GrandTotal2 = number_format($GrandTotal, 2);
$ShoppingCart_Output .= '<tr>';
$ShoppingCart_Output .= '<td align="left" valign="middle"></td>';
$ShoppingCart_Output .= '<td width="70%"align="left" valign="middle" nowrap="nowarp" height="40px">'.$ShoppingCart_Name.'</td>';
$ShoppingCart_Output .= ' <td width="10%" align="center" valign="middle" nowrap="nowrap">'.$ShoppingCart_Qty.'</td>';
$ShoppingCart_Output .= '<td width="10%"align="center" valign="middle" nowrap="nowrap">$'.$ShoppingCart_Price.'</td>';
$ShoppingCart_Output .= '<td width="10%" align="center" valign="middle" nowrap="nowrap"><span class="font100-small">$'.number_format($ShoppingCart_TotalPrice, 2).'</span></td>';
$ShoppingCart_Output .= '<td width="40" align="center" valign="middle" nowrap="nowrap"><form action="php/cart.php" method="post" name="form7" id="form7">
<input type="submit" value="" class="imgTrash" />
<input name="id" type="hidden" id="id" value="'.$ShoppingCart_id.'">
<input name="Delete" type="hidden" id="Delete" value="Yes">
</form></td>';
$ShoppingCart_Output .= '</tr>';
}
$Register_Output .= '<h5>Billing & Shipping Information</h5><form id="form1" name="form1" method="post">
<div class="ProcessForm"><input name="paractice" type="text" id="paractice" placeholder="Practice Name"></div>
<div class="ProcessForm"><input name="address" type="text" id="address" placeholder="Address"></div>
<div class="ProcessForm"><input name="city" type="text" id="city" placeholder="City"></div>
<div class="ProcessForm"><input name="state" type="text" id="state" placeholder="State"></div>
<div class="ProcessForm"><input name="zip" type="text" id="zip" placeholder="Zip Code"></div>
<div class="ProcessForm"><input name="phone" type="text" id="phone" placeholder="Phone Number"></div>
<div class="ProcessForm"><input name="email" type="text" id="email" placeholder="Email Address"></div>
<div class="ProcessForm"><input name="cc_number" type="text" id="cc_number" placeholder="Credit Card"></div>
<div class="ProcessForm"><input name="exp_date" type="text" id="exp_date" placeholder="Exp. Date"></div>
<div class="ProcessForm"><input name="billing_zip" type="text" id="billing_zip" placeholder="Billing Zip Code"></div>
<div class="ProcessForm"><input type="submit" formaction="cart.php" value="Checkout" class="submitBtn">
<input name="ProcessForm" type="hidden" id="process" value="Yes"></div>
</form>';
$Show_Attendees = '<div class="grid_7">
<h5 class=" wow fadeInLeft"></h5>
<h5 class=" wow fadeInLeft">Current Attendees</h5>
'.$Attendees.'
<a class="btn_02" href="cart.php">Go to Cart</a>
</div>';
if($courseBooks > 0){
$StaffPopUp = '<div id="footerSlideContainer">
<div id="footerSlideButton">ADD BOOK</div>
<div id="footerSlideContent">
<div id="footerSlideText">
<h3>Staff Only? Add a book for $150 </h3>
<p>Dentist registration is HIGHLY RECOMMENDED. Successful medical billing requires the dentist’s knowledge of the process and participation. Staff only registrations will be accepted on a space available basis and DOES NOT include a copy of “Successful Medical Billing: The Dentist’s Guide” in the registration fee. Seating is limited and placement in the course will be in the order received. Return the completed course registration form by email to chris@successfulmedicalbilling.com. Upon our receipt of this registration form, a confirmation email will be sent to you. Registration fees will be charged to your credit card upon our acceptance of your registration form. The charge for course fees will appear as Successful Medical Billing, LLC, on your credit card statement and will serve as your receipt of payment. Questions should be directed to Chris at chris@successfulmedicalbilling.com.</p>
<p> </p>
<form action="php/cart.php" method="post" name="form1" id="form2">
<p>
<input name="submit" type="submit" class="AddSumbit" id="submit" formaction="php/cart.php" formmethod="POST" value="Add Book to Cart">
<input name="Cart" type="hidden" id="Cart" value="Book">
<input name="cid" type="hidden" id="cid" value="'.$cid.'">
<input name="date" type="hidden" id="date" value="'.$todaydate.'">
</p>
<p> </p>
</form>
<p> </p>
</div>
</div>
</div>';
}
}
else {
$ShoppingCart_Output .= '<tr>';
$ShoppingCart_Output .= '<td colspan="6" align="center" valign="middle">Your Cart is Empty!</td>';
$ShoppingCart_Output .= '</tr>';
$shipping = number_format(0.00, 2);
$SubTotal2 = number_format(0.00, 2);
$GrandTotal2 = number_format(0.00, 2);
$Register_Output .= '';
$AllRegister_Output .= '';
$Show_Attendees .= '';
$StaffPopUp = '';
} |