<?php
  require_once('includes/load.php');
  // Checkin What level user has permission to view this page
  page_require_level(1);
?>
<?php
  $plan = find_by_id_new('dailyplandetails',(int)$_GET['DailyId'],'Id');
  if(!$plan){
    $session->msg("d","Missing plan details.");
    redirect('DailyPlan.php');
  }


  $delete_ids = delete_by_id_new('dailyplandetails',(int)$_GET['DailyId'],'Id');
  if($delete_ids){
      $session->msg("s","Plan deleted.");
      redirect('DailyPlan.php');
  } else {
      $session->msg("d","Plan deletion failed.");
      redirect('DailyPlan.php');
  }
?>
