Example #1
0
     $completion_time = 0;
 }
 //substract timezone offset
 if (isset($_POST['reminder'])) {
     $remind_style = $_POST['remind_style'];
     if ($remind_style == REMIND_BEFORE_STARTTIME) {
         $remind_time = $start_time - $_POST['remind_interval'];
     } else {
         $remind_time = $due_time - $_POST['remind_interval'];
     }
 } else {
     $remind_style = '0';
     $remind_time = '0';
 }
 if ($todo_id > 0) {
     if (!$todos->update_todo($todo_id, $_POST['contact_id'], $_POST['res_user_id'], $start_time, $due_time, $status, $_POST['priority'], $completion_time, $remind_time, $remind_style, $name, smart_addslashes($_POST['description']), smart_addslashes($_POST['location']), $_POST['background'])) {
         $feedback = '<p class="Error">' . $strSaveError . '</p>';
     } else {
         if ($_POST['close'] == 'true') {
             header('Location: ' . $return_to);
             exit;
         }
     }
 } else {
     if (!($todo_id = $todos->add_todo($GO_SECURITY->user_id, $_POST['contact_id'], $_POST['res_user_id'], $start_time, $due_time, $status, $_POST['priority'], $completion_time, $remind_time, $remind_style, $name, smart_addslashes($_POST['description']), smart_addslashes($_POST['location']), $_POST['background']))) {
         $feedback = '<p class="Error">' . $strSaveError . '</p>';
     } else {
         if ($_POST['close'] == 'true') {
             header('Location: ' . $return_to);
             exit;
         }