<?php if (count($_POST) > 0) { $user = TaskData::getById($_POST["id"]); $user->title = $_POST["title"]; $category_id = "NULL"; if ($_POST["category_id"] != "") { $category_id = $_POST["category_id"]; } $user->category_id = $category_id; $project_id = "NULL"; if ($_POST["project_id"] != "") { $project_id = $_POST["project_id"]; } $user->project_id = $project_id; $user->description = $_POST["description"]; $user->update(); print "<script>window.location='index.php?view=tasks';</script>"; }
<?php $user = TaskData::getById($_GET["id"]); $user->del(); print "<script>window.location='index.php?view=tasks';</script>";
<?php $task = TaskData::getById($_GET["task_id"]); $task->is_done = isset($_GET["is_done"]) ? 1 : 0; $task->done();
<?php $reservation = TaskData::getById($_GET["id"]); $pacients = ProjectData::getAll(); $medics = CategoryData::getAll(); ?> <div class="row"> <div class="col-md-10"> <h1>Editar Tarea</h1> <br> <form class="form-horizontal" role="form" method="post" action="./?action=updatetask"> <div class="form-group"> <label for="inputEmail1" class="col-lg-2 control-label">Titulo</label> <div class="col-lg-10"> <input type="text" name="title" value="<?php echo $reservation->title; ?> " required class="form-control" id="inputEmail1" placeholder="Titulo"> </div> </div> <div class="form-group"> <label for="inputEmail1" class="col-lg-2 control-label">Descripcion</label> <div class="col-lg-10"> <textarea class="form-control" rows="5" name="description" placeholder="Descripcion"><?php echo $reservation->description; ?> </textarea> </div> </div> <div class="form-group">