<?php for ($i = 0; $i < count($arrActivities); $i++) { $strActivityName = $db->dbIDToField('mbs_activities', 'activity_id', $arrActivities[$i]['activity_id'], 'activity_name'); ?> <li><strong><?php echo $strActivityName; ?> </strong> in <?php echo $html->getMonthName($arrActivities[$i]['booking_activity_month']) . " " . $arrActivities[$i]['booking_activity_year']; $arrProducts = $db->getProductsInActivity($arrActivities[$i]['booking_activity_id']); if (strpos($strActivityName, "Gondola End") !== false && strpos($strActivityName, "Supplier Merchandised") !== false) { ?> <br><br /><em><u>Supplier Contact</u></em>; <?php $rowSupplierAccount = DB::getSupplierAccount($row['supplier_id']); ?> <br>Name : <?php echo $rowSupplierAccount['supplier_contact_name']; ?> <br>Phone : <?php echo $rowSupplierAccount['supplier_contact_phone_number']; ?> <br>Email : <?php echo $rowSupplierAccount['supplier_contact_email']; ?> <br> <?php } if (is_array($arrProducts) && count($arrProducts) > 0) { ?>
<?php /************************************************************************************************** * EW Web Apps Process File * @Author : Erick Wellem (me@erickwellem.com) * October 2009 * This version: February 2013 * * @Desc: Process file using Ajax **************************************************************************************************/ include '../config.php'; require_once '../lib/db.php'; $db = new DB(); $db->dbConnect(); $intSupplierId = $_REQUEST['supplier_id']; $rowSupplierAccount = DB::getSupplierAccount($intSupplierId); if (empty($rowSupplierAccount['supplier_contact_name']) || empty($rowSupplierAccount['supplier_contact_phone_number']) || empty($rowSupplierAccount['supplier_contact_email'])) { echo json_encode(array("status" => 0)); } else { echo json_encode(array("status" => 1)); }
function updateBookingActivityDescription($intBookingActivityID) { global $db, $strProductResult; $db->dbConnect(); #$strBookingActivityDesc = $db->dbIDToField('mbs_bookings_activities', 'booking_activity_id', $intBookingActivityID, 'booking_activity_description'); // get booking activity $query = "SELECT * FROM `mbs_bookings_activities` WHERE `booking_activity_id` = '" . $intBookingActivityID . "' LIMIT 1"; $result = mysql_query($query); $strActivityDescription = ""; if ($result) { $row = mysql_fetch_assoc($result); $strActivityName = DB::dbIDToField('mbs_activities', 'activity_id', $row['activity_id'], 'activity_name'); $strActivityDescription .= "<strong>" . $strActivityName . "</strong>"; $strActivityPrice = floatval($row['booking_activity_price']); if ($strActivityPrice) { $strActivityDescription .= " @ \$" . number_format($strActivityPrice, 2) . " "; } //-- filter the store id, make sure the input is clean n,n,n format if ($row['store_id']) { $arrStoreID = explode(',', $row['store_id']); if (is_array($arrStoreID) && count($arrStoreID) > 0) { $strStoreID = ""; for ($i = 0; $i < count($arrStoreID); $i++) { if ($arrStoreID[$i] && strlen($arrStoreID[$i]) > 0 && $arrStoreID[$i] !== '0' && $arrStoreID[$i] !== 'undefined') { $strStoreID .= $arrStoreID[$i]; if ($i == count($arrStoreID) - 1) { $strStoreID .= ""; } else { $strStoreID .= ","; } } } if (substr($strStoreID, -1) == ",") { $strStoreID = substr_replace($strStoreID, '', -1); } } //-- set activity description related to store ID's if ($strStoreID) { $strStoreIDConv = explode(',', $strStoreID); $strStoreResult = ""; if (count($strStoreIDConv) > 0) { $strStoreResult .= " for "; if (count($strStoreIDConv) > 1) { $strStoreResult .= count($strStoreIDConv) . " stores: "; } else { $strStoreResult .= " store: "; } for ($i = 0; $i < count($strStoreIDConv); $i++) { $strStoreResult .= $db->dbIDToField('mbs_stores', 'store_id', $strStoreIDConv[$i], 'store_name'); if ($i == count($strStoreIDConv) - 2) { $strStoreResult .= " and "; } elseif ($i == count($strStoreIDConv) - 1) { $strStoreResult .= ""; } else { $strStoreResult .= ", "; } } } } //-- Activity description for Store results if ($strStoreResult) { $strActivityDescription .= $strStoreResult . ". "; } } // if ($row['store_id']) $queryProduct = "SELECT * FROM `mbs_bookings_products` AS product INNER JOIN `mbs_departments` as department ON product.booking_department_id = department.department_id WHERE `booking_activity_id` = '" . $row['booking_activity_id'] . "' ORDER BY `booking_product_name`, `booking_product_id`"; $resultProduct = mysql_query($queryProduct); $strProductResult = ""; if (strpos($strActivityName, "Gondola End") !== false && strpos($strActivityName, "Supplier Merchandised") !== false) { $intSupplierId = DB::dbIDToField('mbs_bookings', 'booking_id', $row['booking_id'], 'supplier_id'); $strProductResult .= "<br><br /><em><u>Supplier Contact</u></em>"; $rowSupplierAccount = DB::getSupplierAccount($intSupplierId); $strProductResult .= "<br>Name : " . $rowSupplierAccount['supplier_contact_name']; $strProductResult .= "<br>Phone : " . $rowSupplierAccount['supplier_contact_phone_number']; $strProductResult .= "<br>Email : " . $rowSupplierAccount['supplier_contact_email'] . "<br>"; } if ($resultProduct) { while ($rowProduct = mysql_fetch_assoc($resultProduct)) { //-- Set activity description related to product if ($rowProduct['booking_product_code'] || $_REQUEST['booking_product_name']) { $strProductResult .= "<br /><br />\n\n<em><u>Product Detail:</u></em>"; if ($rowProduct['booking_product_code']) { $strProductResult .= "<br />\nUPI Code: " . $rowProduct['booking_product_code'] . ", "; } if ($rowProduct['booking_product_name']) { $strProductResult .= "<br />\nName: " . $rowProduct['booking_product_name'] . ", "; } if ($rowProduct['booking_department_id']) { $strProductResult .= "<br />\nDepartment: " . $rowProduct['department_name'] . ", "; } if ($rowProduct['booking_product_normal_retail_price']) { $strProductResult .= "<br />\nNormal Retail Price: \$" . $rowProduct['booking_product_normal_retail_price'] . ", "; } if ($rowProduct['booking_product_promo_price']) { $strProductResult .= "<br />\nPromo Price: \$" . $rowProduct['booking_product_promo_price'] . ", "; } if ($rowProduct['booking_product_cost_price']) { $strProductResult .= "<br />\nCost Price: \$" . $rowProduct['booking_product_cost_price'] . ", "; } if ($rowProduct['booking_product_recommended_retail_price']) { $strProductResult .= "<br />\nRRP: \$" . $rowProduct['booking_product_recommended_retail_price'] . ", "; } if ($rowProduct['booking_product_discount']) { $strProductResult .= "<br />\nDiscount: " . $rowProduct['booking_product_discount'] . " % , "; } if ($rowProduct['booking_product_special_offer_details']) { $strProductResult .= "<br />\nSpecial Offer: " . $rowProduct['booking_product_special_offer_details'] . ""; } } } // while ($rowProduct = mysql_fetch_assoc($resultProduct)) } // if ($resultProduct) } // if ($result) //-- Activity description for Product results if ($strProductResult) { $strActivityDescription .= $strProductResult; } $query = "UPDATE `mbs_bookings_activities` SET `booking_activity_description` = '" . $strActivityDescription . "' WHERE `booking_activity_id` = '" . $intBookingActivityID . "' LIMIT 1"; $result = mysql_query($query); if ($result) { return 1; } }
function listBooking() { global $arrSiteConfig; global $STR_URL; global $TABLE_MAX_ROW_PER_PAGE; DB::dbConnect(); // If page number not set, set it to 1 if (!$_REQUEST['page_num']) { $_REQUEST['page_num'] = 1; } // Setting queries and pages $offset = ($_REQUEST['page_num'] - 1) * $TABLE_MAX_ROW_PER_PAGE; $this->conn = DB::dbConnect(); $strSearchText = stripslashes($_REQUEST['frm_search_text']); // sort variables if (!$_REQUEST['sortmode']) { $_REQUEST['sortmode'] = "asc"; } $strSortMode = $_REQUEST['sortmode']; if ($_REQUEST['frm_search_text']) { // search query ********************************************************************************* $query = "SELECT * FROM `mbs_bookings` \n\n\n\n\t\t\t\t\t \t\t WHERE (`booking_name` LIKE '%" . mysql_real_escape_string($strSearchText) . "%'\n\n\n\n\t\t\t\t\t \t\t \t\t OR `booking_code` LIKE '%" . mysql_real_escape_string($strSearchText) . "%' \n\n\n\n\t\t\t\t\t \t\t\t OR `booking_description` LIKE '%" . mysql_real_escape_string($strSearchText) . "%')\n\n\n\n\t\t\t\t\t \t\t\t ORDER BY "; if ($_REQUEST['sortby']) { $query .= "`" . mysql_real_escape_string($_REQUEST['sortby']) . "` " . $strSortMode . ", `booking_id`"; } else { $query .= "`booking_code` ASC, `booking_name` ASC, `booking_created_date` DESC"; } $query .= " LIMIT " . $offset . "," . $TABLE_MAX_ROW_PER_PAGE; // search query total *************************************************************************** $queryTotal = "SELECT COUNT(*) FROM `mbs_bookings` \n\n\n\n\t\t\t\t\t \t\t\t WHERE (`booking_name` LIKE '%" . mysql_real_escape_string($strSearchText) . "%' \n\n\n\n\t\t\t\t\t \t\t\t \t OR `booking_code` LIKE '%" . mysql_real_escape_string($strSearchText) . "%'\n\n\n\n\t\t\t\t\t \t\t\t OR `booking_description` LIKE '%" . mysql_real_escape_string($strSearchText) . "%')"; } else { // the query ************************************************************************************ $query = "SELECT * FROM `mbs_bookings` ORDER BY "; if ($_REQUEST['sortby']) { $query .= " `" . mysql_real_escape_string($_REQUEST['sortby']) . "` " . $strSortMode . ", `booking_id`"; } else { $query .= " `booking_date` DESC, `booking_code`"; } $query .= " LIMIT " . $offset . "," . $TABLE_MAX_ROW_PER_PAGE; // the query total ****************************************************************************** $queryTotal = "SELECT COUNT(*) FROM `mbs_bookings`"; } $result = mysql_query($query, $this->conn); $resultTotal = mysql_query($queryTotal, $this->conn); $rowTotal = mysql_fetch_row($resultTotal); $totalPage = ceil($rowTotal[0] / $TABLE_MAX_ROW_PER_PAGE); $strResult = ""; #echo "<div style=\"padding:15px; background-color:#eee;\">"; #echo "<strong>Query:</strong> " . $query . "<br /><br />"; #echo "<strong>Query Total:</strong> " . $queryTotal . "<br /><br />"; #echo "</div>"; // javascript to pop up message $strResult .= "\n\n\n\n\t\t\n\n\n\n\t\t\t\t\t"; // search form $strResult .= "\n\n\n\n\t\t\t<form name=\"search_booking_data\" method=\"post\" action=\"" . $STR_URL . "booking_list.php\">\n\n\n\n\t\t\t\t<input type=\"hidden\" name=\"frm_search_referer\" value=\"" . $_SERVER['PHP_SELF'] . "\" />\n\n\n\n\t\t\t\t<input type=\"text\" name=\"frm_search_text\" placeholder=\"Enter text to search\" size=\"40\" maxlength=\"128\" value=\""; if ($_REQUEST['frm_search_text']) { $strResult .= stripslashes($_REQUEST['frm_search_text']); } $strResult .= "\" />\t\t\t\t\n\n\n\n\t\t\t\t<input class=\"btn btn-popover\" type=\"submit\" rel=\"popover\" data-content=\"Search Booking's Name/Code based on keywords\" data-original-title=\"Search Bookings\" type=\"submit\" name=\"frm_search_submit\" value=\"Search Bookings\" onclick=\"return validateSearch(this.form)\" /><br />\n\n\n\n\t\t\t</form>\n\n\n\n\t\t\t"; // the form $strResult .= "\n\n\n\n\t\t\t<form id=\"frm_booking\" method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\" />\n\n\n\n\t\t\t"; $strResult .= "<div align=\"right\">"; // the refresh link if ($_SESSION['user']['type'] == 'admin' || ADMIN::getModulePrivilege('bookings', 'list') !== 0) { $strResult .= "<a class=\"btn btn-popover\" href=\"" . $STR_URL . ADMIN::getModuleFile('bookings', 'list') . "\" rel=\"popover\" data-content=\"Refresh the Booking List to the latest update\" data-original-title=\"Refresh Booking List\" title=\"Booking List\"><img src=\"" . $STR_URL . "img/refresh_icon.png\" /> Refresh</a>"; } $strResult .= " "; // the add link if ($_SESSION['user']['type'] == 'admin' || ADMIN::getModulePrivilege('bookings', 'add') !== 0) { $strResult .= "<a class=\"btn btn-popover\" href=\"" . $STR_URL . ADMIN::getModuleFile('bookings', 'add') . "?action=add\" rel=\"popover\" data-content=\"Insert new Booking to the database\" data-original-title=\"New Booking\" title=\"New Booking\"><img src=\"" . $STR_URL . "img/add_icon.png\" /> New Booking</a>"; } $strResult .= "<br /><br />"; $strResult .= "<a class=\"btn btn-popover\" href=\"booking_list_print.php?action=print\" target=\"_blank\" rel=\"popover\" data-content=\"Print the Booking List from the browser. A new tab and a Print dialog will be popped up\" data-original-title=\"Print Booking List\"><img src=\"" . $STR_URL . "img/print_icon.png\" /> Print</a>"; $strResult .= " "; $strResult .= "<a class=\"btn btn-popover ajax callbacks cboxElement\" href=\"booking_list_email.php?action=email&pop=yes\" rel=\"popover\" data-content=\"Send the Booking List to a certain email\" data-original-title=\"Send Booking List to Email\"><img src=\"" . $STR_URL . "img/email_icon.png\" /> Email</a>"; $strResult .= " "; $strResult .= "<a class=\"btn btn-popover\" href=\"documentation_list.php#bookings\" rel=\"popover\" data-content=\"Look up for the Documentation about Booking module\" data-original-title=\"Help\" title=\"Help\"><i class=\"icon-info-sign\"></i> Help</a>"; $strResult .= "\t</div>"; if ($strSortMode == "asc") { $strSortMode = "desc"; } elseif ($strSortMode == "desc") { $strSortMode = "asc"; } // the table $strResult .= "\t\t\t\n\n\n\n\t\t\t<div align=\"center\"><h2>Booking List</h2></div>\n\n\n\n\t\t\t<div align=\"right\">" . HTML::showPaging($rowTotal[0], $totalPage, 4, array(array('frm_search_text', urlencode($_REQUEST['frm_search_text'])), array('sortby', urlencode($_REQUEST['sortby'])), array('sortmode', urlencode($_REQUEST['sortmode'])))) . "</div>\n\n\n\n\n\n\n\n\t\t\t<section id=\"table_booking_list\">\n\n\n\n\t\t\t<table class=\"table table-bordered table-hover\" summary=\"Booking List\">\n\n\n\n\t\t\t<caption>Booking List</caption>\n\n\n\n\t\t\t<thead class=\"well\">\n\n\n\n\t\t\t\t<tr>\t\t\t\t\t\n\n\n\n\t\t\t\t\t<th scope=\"col\" width=\"5%\"><div align=\"center\">No</div></th>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\n\n\t\t\t\t\t<th scope=\"col\" width=\"10%\"><div align=\"center\"><a href=\"" . $_SERVER['PHP_SELF'] . "?page_num=" . intval($_REQUEST['page_num']) . "&frm_search_text=" . urlencode($_REQUEST['frm_search_text']) . "&sortby=booking_date&sortmode=" . $strSortMode . "\">Date</a></div></th>\n\n\n\n\t\t\t\t\t<th scope=\"col\" width=\"30%\"><div align=\"center\"><a href=\"" . $_SERVER['PHP_SELF'] . "?page_num=" . intval($_REQUEST['page_num']) . "&frm_search_text=" . urlencode($_REQUEST['frm_search_text']) . "&sortby=booking_code&sortmode=" . $strSortMode . "\">Code/Name</a></div></th>\n\n\n\n\t\t\t\t\t<th scope=\"col\"><div align=\"center\">Activities</div></th>\n\n\n\n\t\t\t\t\t"; // edit / delete column if ($_SESSION['user']['type'] == 'admin' || ADMIN::getModulePrivilege('bookings', 'edit') !== 0 && $_SESSION['user']['type'] == 'user' || ADMIN::getModulePrivilege('bookings', 'delete') !== 0 && $_SESSION['user']['type'] == 'user') { $strResult .= "\t\n\n\n\n\t\t\t\t\t<th scope=\"col\" width=\"20%\"><div align=\"center\">Edit/Delete</div></th>\n\n\n\n\t\t\t\t\t"; } $strResult .= "\n\n\n\n\t\t\t\t</tr>\n\n\n\n\t\t\t</thead>\t\n\n\n\n\t\t\t\n\n\n\n\t\t\t<tbody>\n\n\n\n\t\t\t"; if ($rowTotal[0] > 0) { $no = $offset; while ($row = mysql_fetch_assoc($result)) { $no++; // link $strLink = ADMIN::getModuleFile('bookings', 'view') . "?booking_id=" . urlencode($row['booking_id']) . "&frm_search_text=" . urlencode($_REQUEST['frm_search_text']) . "&page_num=" . $_REQUEST['page_num'] . ""; // activities $arrActivities = DB::getActivitiesInBooking($row['booking_id']); #print_r($arrActivities); $strResult .= "\n\n\n\n\t\t\t\t\t\t<tr "; if ($no % 2 == 0) { $strResult .= "class=\"odd\""; } $strResult .= ">\n\n\n\n\t\t\t\t\t\t\t<td id=\"r" . $row['booking_id'] . "\"><div align=\"right\">" . $no . ".</div></td>\t\t\t\t\t\t\n\n\n\n\t\t\t\t\t\t\t<td><div align=\"center\">" . HTML::convertDateTime($row['booking_date']) . "</div></td>\n\n\n\n\t\t\t\t\t\t\t<td><div align=\"left\">"; if ($_SESSION['user']['type'] == 'admin' || $strPrivView == "yes") { $strResult .= "<a href=\"" . $STR_URL . $strLink . "\" title=\"" . html_entity_decode(strtoupper($row['booking_code'])) . "\">"; } $strResult .= "<strong>" . stripslashes(htmlspecialchars($row['booking_code'])) . " / " . stripslashes(htmlspecialchars($row['booking_name'])) . "</strong>"; if ($_SESSION['user']['type'] == 'admin' || $strPrivView == "yes") { "</a>"; } $strResult .= "</div></td>\n\n\n\n\t\t\t\t\t\t\t<td><div align=\"left\">"; if (is_array($arrActivities) && count($arrActivities) > 0) { $strResult .= "<ul style=\"margin-left:20px;\">"; for ($i = 0; $i < count($arrActivities); $i++) { $strActivityName = DB::dbIDToField('mbs_activities', 'activity_id', $arrActivities[$i]['activity_id'], 'activity_name'); $strResult .= "<li><strong>" . $strActivityName . "</strong> in " . HTML::getMonthName($arrActivities[$i]['booking_activity_month']) . " " . $arrActivities[$i]['booking_activity_year']; if (strpos($strActivityName, "Gondola End") !== false && strpos($strActivityName, "Supplier Merchandised") !== false) { $strResult .= "<br><br /><em><u>Supplier Contact</u></em>"; $rowSupplierAccount = DB::getSupplierAccount($row['supplier_id']); $strResult .= "<br>Name : " . $rowSupplierAccount['supplier_contact_name']; $strResult .= "<br>Phone : " . $rowSupplierAccount['supplier_contact_phone_number']; $strResult .= "<br>Email : " . $rowSupplierAccount['supplier_contact_email'] . "<br>"; } $arrProducts = DB::getProductsInActivity($arrActivities[$i]['booking_activity_id']); if (is_array($arrProducts) && count($arrProducts) > 0) { $strResult .= "<br /><em><u>Products:</u></em>"; $strResult .= "<ul style=\"margin-left:20px;\">"; for ($j = 0; $j < count($arrProducts); $j++) { $strResult .= "<li>" . $arrProducts[$j]['booking_product_name'] . "</li>"; } $strResult .= "</ul>"; } $strResult .= "</li>"; } $strResult .= "</ul>"; } $strResult .= "</div></td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\n\n\t\t\t\t\t\t"; // action column if ($_SESSION['user']['type'] == 'admin' || ADMIN::getModulePrivilege('bookings', 'edit') !== 0 && $_SESSION['user']['type'] == 'user' || ADMIN::getModulePrivilege('bookings', 'delete') !== 0 && $_SESSION['user']['type'] == 'user') { $strResult .= "<td><div align=\"center\">"; // edit if ($_SESSION['user']['type'] == 'admin' || ADMIN::getModulePrivilege('bookings', 'edit') !== 0 && $_SESSION['user']['type'] == 'user') { $strResult .= "<a class=\"btn btn-small\" href=\"" . $STR_URL . "booking.php?booking_id=" . html_entity_decode($row['booking_id']) . "&action=edit\" title=\"Edit Booking\"><img src=\"" . $STR_URL . "img/edit_icon.png\" /> Edit</a>"; } $strResult .= " "; // copy //if ($_SESSION['user']['type'] == 'admin' || (ADMIN::getModulePrivilege('bookings', 'edit') !== 0 && $_SESSION['user']['type'] == 'user')) //{ $strResult .= "<a class=\"btn btn-small\" href=\"" . $STR_URL . "booking_copy.php?booking_id=" . html_entity_decode($row['booking_id']) . "\" title=\"Copy Booking\"><span class=\"icon-file\"></span> Copy</a>"; //} $strResult .= " "; // delete if ($_SESSION['user']['type'] == 'admin' || ADMIN::getModulePrivilege('bookings', 'delete') !== 0 && $_SESSION['user']['type'] == 'user') { $strResult .= "<a id=\"frm_delete_button_" . $row['booking_id'] . "\" class=\"btn btn-small\" href=\"" . $STR_URL . "booking_list.php?booking_id=" . $row['booking_id'] . "&action=delete\" title=\"Delete Booking\"><img src=\"" . $STR_URL . "img/delete_icon.png\" /> Delete</a> "; } $strResult .= "</div></td>"; } $strResult .= "\n\n\n\n\t\t\t\t\t\t</tr>\n\n\n\n\t\t\t\t\t\t"; } // end while($row = ) } else { $strResult .= "<tr><td colspan=\"5\"><div align=\"center\">Found no data</div></td></tr>"; } $strResult .= "\n\n\n\n\t\t\t</tbody>\n\n\n\n\t\t\t<tfoot>\n\n\n\n\t\t\t\t<tr>\n\n\n\n\t\t\t\t\t<th scope=\"row\" colspan=\"2\">Total: " . $rowTotal[0] . "</th>\t\t\t\t\t\n\n\n\n\t\t\t\t\t<td colspan=\"3\">" . HTML::showPaging($rowTotal[0], $totalPage, 4, array(array('frm_search_text', urlencode($_REQUEST['frm_search_text'])), array('sortby', urlencode($_REQUEST['sortby'])), array('sortmode', urlencode($_REQUEST['sortmode'])))) . "</td>\n\n\n\n\t\t\t\t</tr>\n\n\n\n\t\t\t</tfoot>\n\n\n\n\t\t\t</table>\n\n\n\n\t\t\t</section>\n\n\n\n\t\t\t</form>\n\n\n\n\t\t\t<a class=\"btn\" href=\"#content\"><i class=\"icon-arrow-up\"></i> Back to top</a>\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t<script>\n\n\n\n\t\t\t\t\$(document).ready(function () {\n\n\n\n\t\t\t\t\tvar strID;\n\n\n\n\t\t\t\t\tvar intID;\n\n\n\n\t\t\t\t\tvar deleteConf;\t\n\n\n\n\t\t\t\n\n\n\n\t\t\t\t\t\$('a').click(function(event) {\n\n\n\n \t\t\t\tstrID = event.target.id; \t\t\t\t \t\t\t\t\n\n\n\n\t\t\t\t\t\tintID = strID.replace('frm_delete_button_', '');\t\t\t\t\t\t\n\n\n\n\n\n\n\n\t\t\t\t\t\tif (intID && intID !== '')\n\n\n\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\n\n\n\t\t\t\t\t\t\tif (confirmDeleteBooking())\n\n\n\n\t\t\t\t\t\t\t{\n\n\n\n\t\t\t\t\t\t\t\t\$(this).closest('tr').remove();\t\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\tvar dataString = 'action=delete&booking_id=' + intID;\t\t\t\t\t\t\t\n\n\n\n\t\t \t\t\t\t \n\n\n\n\t\t\t\t\t\t\t\tvar request = \$.ajax({\t\t\t\t\t\t\t \n\n\n\n\t\t\t\t\t\t\t\t\turl: 'ajax/booking_proc.php',\n\n\n\n\t\t\t\t\t\t\t\t\ttype: 'post', \n\n\n\n\t\t\t\t\t\t\t\t\tdata: dataString,\n\n\n\n\t\t\t\t\t\t\t\t\tsuccess: function(msg) {\n\n\n\n\t\t\t\t\t\t\t\t\t\t\n\n\n\n\t\t\t\t\t\t\t\t\t\t\$.gritter.add({\t\t\t\t\n\n\n\n\t\t\t\t\t\t\t\t\t\t\ttitle: 'Info',\t\t\t\t\n\n\n\n\t\t\t\t\t\t\t\t\t\t\ttext: '<p>' + msg + '</p>',\t\t\t\t\n\n\n\n\t\t\t\t\t\t\t\t\t\t\timage: '" . $STR_URL . "img/accepted.png',\t\t\t\t\n\n\n\n\t\t\t\t\t\t\t\t\t\t\tsticky: false,\t\t\t\t\n\n\n\n\t\t\t\t\t\t\t\t\t\t\ttime: '3000'\n\n\n\n\t\t\t\t\t\t\t\t\t\t});\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t \n\n\n\n\t\t\t\t\t\t\t\t});\t\t\n\n\n\n\t\t\t\t\t\t\t\t\n\n\n\n\t\t\t\t\t\t\t}\n\n\n\n\n\n\n\n\t\t\t\t\t\t\treturn false;\t\n\n\n\n\t\t\t\t\t\t\t\t\t\t\n\n\n\n\t\t\t\t\t\t}\t\t\t\n\n\n\n\t\t\t\t\t\t\n\n\n\n \t\t\t\t});\n\n\n\n \n\n\n\n\t\t\t\t});\n\n\n\n\t\t\t</script>\n\n\n\n\t\t\t<script>\n\n\n\n\t\t\t\t\$(function () { \n\n\n\n\t\t\t\t\t\$('.btn-popover').popover({ \n\n\n\n\t\t\t\t\t\ttrigger: 'hover',\n\n\n\n\t\t\t\t\t\tplacement: 'top'\n\n\n\n\t\t\t\t\t});\n\n\n\n\t\t\t\t});\n\n\n\n\t\t\t</script>\n\n\n\n\t\t\t"; // The Log $strLog = "View the Booking List"; $queryLog = "INSERT INTO `logs` (`log_id`, \n\n\n\n\t\t\t\t\t\t\t\t\t\t `log_user`, \n\n\n\n\t\t\t\t\t\t\t\t\t\t `log_action`, \n\n\n\n\t\t\t\t\t\t\t\t\t\t `log_time`, \n\n\n\n\t\t\t\t\t\t\t\t\t\t `log_from`, \n\n\n\n\t\t\t\t\t\t\t\t\t\t `log_logout`)\n\n\n\n\n\n\n\n\t\t\t\t\tVALUES (NULL, \n\n\n\n\t\t\t\t\t\t\t'" . $_SESSION['user']['login_name'] . "',\n\n\n\n\t\t\t\t\t\t\t'" . mysql_real_escape_string($strLog) . "',\n\n\n\n\t\t\t\t\t\t\t'" . date('Y-m-d H:i:s') . "',\n\n\n\n\t\t\t\t\t\t\t'" . $_SESSION['user']['ip_address'] . "', \n\n\n\n\t\t\t\t\t\t\tNULL)"; $resultLog = mysql_query($queryLog); echo $strResult; }