error = true; $plugin = AVideoPlugin::loadPluginIfEnabled('Scheduler'); if(!User::isAdmin()){ $obj->msg = "You cant do this"; die(json_encode($obj)); } $id = intval($_POST['id']); $row = new Scheduler_commands($id); $obj->error = !$row->delete(); die(json_encode($obj)); ?>