Esempio n. 1
0
<?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);
$Staff = new Staff($dbBean);
$rows = $Staff->getStaffmemberById($_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"/>

<link rel="stylesheet" type="text/css" href="<?php 
echo ADMIN_URL;
Esempio n. 2
0
 public static function deleteStaffmember($large_img_path, $thumb_img_path, $idsToDelete)
 {
     global $dbBean;
     if (count($idsToDelete) <= 0) {
         return false;
     }
     $edited = false;
     foreach ($idsToDelete as $ids) {
         $s = Staff::getStaffmemberById($ids);
         $image = $s->image;
         $cond = array("id" => $ids);
         $fieldvalues = array('is_deleted' => '1');
         if (!($edited = $dbBean->UpdateRows("staff", $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;
 }