<?php require_once('php/connect.php'); ?>
<?php include ('php/access.php');?>
<?php include ('php/nav.php');?>
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
if (isset($_GET['id'])) {
$colname_Order_Info = $_GET['id'];
}
$query_Order_Info = "SELECT * FROM GE_customer WHERE id = '$colname_Order_Info'";
$Order_Info = mysqli_query($LogoMasters, $query_Order_Info);
$row_Order_Info = mysqli_fetch_assoc($Order_Info);
$totalRows_Order_Info = mysqli_num_rows($Order_Info);
$OrderID = $row_Order_Info['id'];
$CID = $row_Order_Info['customer_id'];
$Status = $row_Order_Info['status'];
$Inquiry_Num = "GE".$row_Order_Info['id'];
if($Status == ''){
$Status = 'Inquiry';
}
else {
$Status = $row_Order_Info['status'];
}
$query_cart = "SELECT * FROM GE_cart WHERE customer_id = '$CID'";
$cart = mysqli_query($LogoMasters, $query_cart);
$totalRows_cart = mysqli_num_rows($cart);
if($totalRows_cart > 0){
while($row_cart = mysqli_fetch_array($cart)){
$cart_id = $row_cart["id"];
$cart_pid = $row_cart["product_id"];
$cart_name = $row_cart["product_name"];
$cart_make = $row_cart["Manufacture"];
$cart_num = $row_cart["unit_number"];
$cart_image = $row_cart["image"];
$cart_color = $row_cart["color"];
$cart_thread = $row_cart["thread"];
$cart_size = $row_cart["size"];
$cart_qty = $row_cart["qty"];
$cart_price = $row_cart["price"];
$cart_style = $row_cart["style"];
$cart_ChestLocation = $row_cart["chest_location"];
$cart_ChestLogo = $row_cart["chest_logo"];
$cart_ChestSite = $row_cart["chest_site"];
$cart_SleeveRight = $row_cart["sleeve_right"];
$cart_SleeveLeft = $row_cart["sleeve_left"];
$cart_BackLocation = $row_cart["back_location"];
$cart_LogoType = $row_cart["LogoType"];
$cart_AddOn = $row_cart["AddOn"];
if($cart_ChestSite != ''){
$ShowDepartment = '</br><strong>Site Name (+ $4.00): </strong>' . $cart_ChestSite .'';
}
else {
$ShowDepartment = '';
$AddOn = 0.00;
}
$cart_price = $cart_price + $cart_AddOn;
$Chest_Logo = '<img src="https://logomastersintl.com/GE/assets/'.$cart_ChestLogo.'" width="50" alt="GE Logo"/>';
$RightSleeve_Logo = '<img src="https://logomastersintl.com/GE/assets/'.$cart_SleeveRight.'" width="50" alt="GE Logo"/>';
$LeftSleeve_Logo = '<img src="https://logomastersintl.com/GE/assets/'.$cart_SleeveLeft.'" width="50" alt="GE Logo"/>';
$Back_Logo = '<img src="https://logomastersintl.com/GE/assets/'.$cart_BackLocation.'" width="50" alt="GE Logo"/>';
if($cart_ChestLogo != '' && $cart_LogoType == 'shirt'){
$Show_Chest_Logo = '<strong>Chest Logo </strong></br>' . $Chest_Logo . '';
}
else {
$Show_Chest_Logo = '';
}
if($cart_SleeveRight != '' && $cart_LogoType == 'shirt'){
$Show_RightSleeve_Logo = '<strong>Right Sleeve Logo (+ $4.00) </strong></br>' . $RightSleeve_Logo . '';
}
else {
$Show_RightSleeve_Logo = '';
}
if($cart_SleeveLeft != '' && $cart_LogoType == 'shirt'){
$Show_LeftSleeve_Logo = '<strong>Left Sleeve Logo (+ $4.00) </strong></br>'.$LeftSleeve_Logo. '';
}
else {
$Show_LeftSleeve_Logo = '';
}
if($cart_ChestLocation != '' && $cart_LogoType == 'shirt'){
$Show_cart_ChestLocation = '<strong>Chest Logo Location: </strong></br>' . $cart_ChestLocation . '';
}
else {
$Show_cart_ChestLocation = '';
}
if($cart_ChestLogo != '' && $cart_LogoType == 'bag'){
$Show_Front_BagLogo = '<strong>Logo </strong></br>' . $Chest_Logo . '';
}
else {
$Show_Front_BagLogo = '';
}
if($cart_ChestLogo != '' && $cart_LogoType == 'hat'){
$Show_Front_Logo = '<strong>Front Logo </strong></br>' . $Chest_Logo . '';
}
else {
$Show_Front_Logo = '';
}
if($cart_SleeveRight != '' && $cart_LogoType == 'hat'){
$Show_RightSide_Logo = '<strong>Right Side Logo (+ $4.00) </strong></br>' . $RightSleeve_Logo . '';
}
else {
$Show_RightSide_Logo = '';
}
if($cart_SleeveLeft != '' && $cart_LogoType == 'hat'){
$Show_LeftSide_Logo = '<strong>Left Side Logo (+ $4.00) </strong></br>'.$LeftSleeve_Logo. '';
}
else {
$Show_LeftSide_Logo = '';
}
if($cart_BackLocation != '' && $cart_LogoType == 'hat'){
$Show_cart_BackLocation = '<strong>Back Logo (+ $4.00): </strong></br>' . $Back_Logo . '';
}
else {
$Show_cart_BackLocation = '';
}
if($cart_thread != ''){
$Show_cart_thread = '<strong>Logo Color: </strong>'. $cart_thread . '</br>';
}
else {
$Show_cart_thread = '';
}
if($cart_style == 'Embroidery') {
$NewPrice = number_format(($cart_price), 2);
}
if($cart_style == 'Screen Print') {
$NewPrice = number_format(($cart_price), 2);
}
if($cart_style == 'team') {
$NewPrice = number_format(($cart_price), 2);
}
if($cart_style == 'Blank') {
$NewPrice = number_format(($cart_price), 2);
}
$cartQty = $cart_qty + $cartQty;
$totalprice = number_format(($NewPrice * $cart_qty),2);
$cartTotal = $totalprice + $cartTotal;
$subtotal = $cartTotal;
$Qty_Total = $cart_qty + $Qty_Total;
if($cart_style == 'Blank'){
$ShowLogo_Cart = '';
}
elseif($cart_LogoType == 'shirt' && $cart_style != 'Blank'){
$ShowLogo_Cart = '</br>'.$Show_cart_thread.''. $Show_cart_ChestLocation . '</br>' . $Show_Chest_Logo . '</br>'.$Show_LeftSleeve_Logo. '</br>' . $Show_RightSleeve_Logo . '' . $ShowDepartment.'';
}
elseif($cart_LogoType == 'hat' && $cart_style != 'Blank'){
$ShowLogo_Cart = '</br>'.$Show_cart_thread.'</br>' . $Show_Front_Logo . '</br>'.$Show_LeftSide_Logo. '</br>' . $Show_RightSide_Logo . '</br>' . $Show_cart_BackLocation.'';
}
elseif($cart_LogoType == 'bag' && $cart_style != 'Blank'){
$ShowLogo_Cart = '</br>'.$Show_cart_thread.'</br>' . $Show_Front_BagLogo . '';
}
$cartOutput.= '<tr>
<td align="center" valign="top"><img src="https://logomastersintl.com/largeimage/' . $cart_image . '" width="100" alt=""/></td>
<td align="left" valign="middle"><strong>'.$cart_make.'</strong><br>
'.$cart_name.'<br>
<strong>Unit#:</strong> '.$cart_num.'<br>
<strong>Size:</strong> '.$cart_size.'<br>
<strong>Color:</strong> '.$cart_color.'
' .$ShowLogo_Cart. '
<td align="center" valign="middle">$'.$NewPrice.'</td>
<td align="center" valign="middle">'.$cart_qty.'</td>
<td align="center" valign="middle">$'.$totalprice.'</td>
</tr>';
}}
else {
$cartOutput.= '<tr>
<td colspan="7" align="left" valign="middle"><strong>No Cart Items</strong></td>
</tr>';
}
?>
<!doctype html>
<html><head>
<meta charset="utf-8">
<title>GE Inquiry - Logo Masters Intl</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" class="shadow">
<tr>
<td height="100" colspan="2" align="center" valign="middle" bgcolor="#000066"><table width="850" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="324" rowspan="2"><span class="cpanel_hdr">cPanel</span></td>
<td width="526" align="right" valign="top" class="whitefont_1"><a style="color: #FFF" href="<?php echo $logoutAction; ?>"><strong>LOGOUT</strong></a></td>
</tr>
<tr>
<td align="center" class="whitefont_2">Logo Masters International, Inc.</td>
</tr>
</table></td>
</tr>
<tr>
<td width="249" height="500" align="center" valign="top" bgcolor="#ebe6e6"><?php echo $Nav_Output; ?></td>
<td width="651" align="center" valign="top" bgcolor="#FFFFFF"><table width="625" border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="left" valign="middle" bgcolor="#FFFFFF" class="font_1"><table width="625" border="0" cellspacing="2" cellpadding="2">
<tr>
<td colspan="2" align="left" valign="middle" class="font_1"><form action="php/editInquiry.php" method="post" name="form1" id="form2">
<table width="625" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="left" valign="middle" class="font_1"><table width="100%" border="0" cellspacing="2" cellpadding="2">
<tbody>
<tr>
<td width="19%" align="left" valign="middle" nowrap="nowrap"><strong>Manage Status:</strong></td>
<td width="55%" align="left" valign="middle"><select name="status" id="status" required>
<option value="">Select Status</option>
<option value="Inquiry" <?php if($row_Order_Info['status'] =='Inquiry') echo ' selected'; ?>>Inquiry</option>
<option value="Paid" <?php if($row_Order_Info['status'] =='Paid') echo ' selected'; ?>>Paid</option>
<option value="Invoiced" <?php if($row_Order_Info['status'] =='Invoiced') echo ' selected'; ?>>Invoiced</option>
<option value="Items Ordered" <?php if($row_Order_Info['status'] =='Items Ordered') echo ' selected'; ?>>Items Ordered</option>
<option value="In Progress" <?php if($row_Order_Info['status'] =='In Progress') echo ' selected'; ?>>In Progress</option>
<option value="Back Ordered" <?php if($row_Order_Info['status'] =='Back Ordered') echo ' selected'; ?>>Back Ordered</option>
<option value="Ready to Run" <?php if($row_Order_Info['status'] =='Ready to Run') echo ' selected'; ?>>Ready to Run</option>
<option value="Shipped" <?php if($row_Order_Info['status'] =='Shipped') echo ' selected'; ?>>Shipped</option>
<option value="Shipped Incomplete" <?php if($row_Order_Info['status'] =='Shipped Incomplete') echo ' selected'; ?>>Shipped Incomplete</option>
<option value="Void" <?php if($row_Order_Info['status'] =='Void') echo ' selected'; ?>>Void</option>
</select></td>
<td width="26%" align="left" valign="middle"> </td>
</tr>
<tr>
<td colspan="3" align="left" valign="middle"><label for="order_notes"><strong>Inquiry Notes:</strong></label>
<textarea name="order_notes" id="order_notes"><?php echo $row_Order_Info['order_notes']; ?></textarea></td>
</tr>
<tr>
<td colspan="3" align="left" valign="middle"><input name="submit" type="submit" class="submit" id="submit" value="Update">
<input name="id" type="hidden" id="id" value="<?php echo $colname_Order_Info; ?>">
<input name="Inquiry_Status" type="hidden" id="Inquiry_Status" value="GE"></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td align="left" valign="middle" class="font_1"> </td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td colspan="2" align="left" valign="middle" class="font_1"> </td>
</tr>
<tr>
<td align="left" valign="middle" class="font_1"><h1>Inquiry Details</h1></td>
<td align="right" valign="middle" class="font_1"><strong><a href="print-GE-inquiry.php?id=<?php echo $colname_Order_Info; ?>" target="_blank">PRINT INQUIRY</a></strong></td>
</tr>
<tr>
<td colspan="2" align="left" valign="middle" class="font_1"><table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="left" valign="top"><strong>Date: </strong><?php echo $row_Order_Info['date']; ?></td>
</tr>
<tr>
<td align="left" valign="top"><strong>Inquiry #:</strong> <?php echo $Inquiry_Num; ?></td>
</tr>
<tr>
<td align="left" valign="top"><strong>Status:</strong> <?php echo $Status; ?></td>
</tr>
<tr>
<td align="left" valign="top"><strong>Qty Total:</strong> <?php echo $Qty_Total; ?></td>
</tr>
<tr>
<td align="left" valign="top"> </td>
</tr>
<tbody>
<tr>
<td align="left" valign="top"><strong>Customer Information</strong></td>
</tr>
<tr>
<td align="left" valign="top"><p><strong>Full Name:</strong> <?php echo $row_Order_Info['first_name']; ?> <?php echo $row_Order_Info['last_name']; ?><br>
<strong>Email Address:</strong> <?php echo $row_Order_Info['email_address']; ?><br>
<strong>Phone Number:</strong> <?php echo $row_Order_Info['phone_number']; ?><br>
<strong>Location:</strong> <?php echo $row_Order_Info['location']; ?><br>
<strong>Department:</strong> <?php echo $row_Order_Info['department']; ?></p>
<p><strong>Shipping Address: </strong><br>
<?php echo $row_Order_Info['shipping_address']; ?><br>
<?php echo $row_Order_Info['city']; ?>, <?php echo $row_Order_Info['state']; ?> <?php echo $row_Order_Info['zip_code']; ?> </p></td>
</tr>
<tr>
<td align="left" valign="top"><strong>Comments:</strong></td>
</tr>
<tr>
<td align="left" valign="top"><?php echo $row_Order_Info['comments']; ?></td>
</tr>
<tr>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td align="left" valign="top"><strong>Order Details:</strong></td>
</tr>
<tr>
<td align="left" valign="top"><table width="100%" border="0" cellspacing="2" cellpadding="2">
<tbody>
<tr>
<td width="10%" align="center" valign="middle"><strong>Image</strong></td>
<td width="33%" align="left" valign="middle"><strong>Product Description</strong></td>
<td width="9%" align="center" valign="middle"><strong>Price</strong></td>
<td width="8%" align="center" valign="middle"><strong>Qty</strong></td>
<td width="9%" align="center" valign="middle"><strong>Total</strong></td>
</tr>
<?php echo $cartOutput; ?>
<tr>
<td align="left" valign="middle"> </td>
<td align="left" valign="middle"> </td>
<td align="left" valign="middle"> </td>
<td align="left" valign="middle"> </td>
<td align="center" valign="middle"> </td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td align="right" valign="top"><strong>Cart Total: <?php echo $row_Order_Info['cart_total']; ?></strong></td>
</tr>
<tr>
<td align="right" valign="top"> </td>
</tr>
</tbody>
</table></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.3/jquery-ui.js"></script>
<script>
$(document).ready(function(){
$('ul.tabs li').click(function(){
var tab_id = $(this).attr('data-tab');
$('ul.tabs li').removeClass('current');
$('.tab-content').removeClass('current');
$(this).addClass('current');
$("#"+tab_id).addClass('current');
})
})
</script>
</body>
</html> |