deletetask.blade.php
778 Bytes
<?php
if($wakka->GetUser())
{
$tid=Input::get("tid");
if($wakka->IsAdmin()||strstr($wakka->HRCoreVars["HRManagerUsers"],$wakka->GetUserName()))
{
$tasks=$wakka->LoadSingle("select * from hrms_tasks where id='$tid'");
if($tasks)
{
$wakka->Query("delete from hrms_tasks where id=$tid limit 1;");
echo "<div class='message success close'><h2>Success!</h2><p>Task Deleted.</p></div><script>simpleNotification('success','topRight','Deleted Task');</script>";
}
else echo "<script>simpleNotification('error','topRight','Task not Found');</script>";
}
else
{
echo "<div class='message error close'><h2>Error!</h2><p>No Access to Delete.</p></div><script>simpleNotification('error','topRight','No Access To Delete Task');</script>";
}
}
?>