isUserLoggedIn(true)) { redirect('index.php', false);} ?> msg("d","Missing project id."); redirect('home.php'); } $activity = find_by_activity_id((int)$_GET['aid']); if(!$activity){ $session->msg("d","Missing activity id."); redirect('home.php'); } $all_tasks = all_tasks_cat(); $all_people = find_all_people(); $org = $activity; ?> $org['task_id']) { $query .=" task_id = {$p_task}"; $append = 1; } if ($p_assg <> $org['assigned_id']) { if ($append) : $query .= ", "; $append = 0; endif; $query .="assigned_id = {$p_assg}"; $append = 1; } if ($p_due <> $org['due_date']) { if ($append) : $query .= ", "; $append = 0; endif; $query .="due_date = {$p_due}"; $append = 1; } if ($p_done <> $org['completed']) { if ($append) : $query .= ", "; $append = 0; endif; $query .="completed = {$p_done}"; $append = 1; } $query .=") WHERE (id = {$activity['id']});"; $query .=" ON DUPLICATE KEY UPDATE name='{$p_name}'"; */ $session->msg('d', $query); $result = mysqli_query($con, $query); error_log("error = " . mysqli_error($con) . "\n",3, "./my-errors.txt"); if($result){ $session->msg('s',"Activity updated "); redirect('edit_project.php?id=' . $project['id'], false); } else { error_log("result = " . $result . "\n",3, "./my-errors.txt"); $session->msg('d',' Sorry failed to update!'); redirect('edit_project.php?id=' . $project['id'], false); // remove add_ } } else{ $session->msg("d", $errors); redirect('edit_project.php?id=' . $project['id'],false); } } ?>
Edit Activity
* required field.