<?php include_once 'config.php'; include_once '../checkAdminPagePermissions.php'; $dbBean = new DatabaseBean(); $general = new General($dbBean); $menu_id = empty($_REQUEST['menu_id']) ? $_SESSION['menu_id'] : $_REQUEST['menu_id']; $heading = $general->getPageHeading($menu_id); $Servicecategory = new Servicecategory($dbBean); $rows = $Servicecategory->getServicecategoryById($_REQUEST['id']); ?> <!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en"> <!--<![endif]--> <!-- BEGIN HEAD --> <head> <?php include '../common.php'; ?> <!-- BEGIN PAGE LEVEL STYLES --> <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_URL; ?> /assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css"/> <!-- END PAGE LEVEL STYLES --> <?php
public static function deleteServicecategory($large_img_path, $thumb_img_path, $idsToDelete) { global $dbBean; if (count($idsToDelete) <= 0) { return false; } $edited = false; foreach ($idsToDelete as $ids) { $s = Servicecategory::getServicecategoryById($ids); $image = $s->image; $cond = array("id" => $ids); $fieldvalues = array('is_deleted' => '1'); if (!($edited = $dbBean->UpdateRows("servicecategory", $fieldvalues, $cond))) { break; } if ($image != '') { if (file_exists($large_img_path . $image)) { unlink($large_img_path . $image); } if (file_exists($thumb_img_path . $image)) { unlink($thumb_img_path . $image); } } } return $edited; }