コード例 #1
0
ファイル: Process.php プロジェクト: paolopr/todolist
 /**
  * Restore a task that has been marked as completed
  * - Validate data
  * - set query statement
  * - excute and redirect
  * @param  array $post $_POST data
  * @return none
  */
 public function restore($post)
 {
     $this->itemId = Validate::isNumber($post['itemId']);
     $query = "UPDATE todo SET completed = 0 , active = 1, date_updated = NOW() WHERE list_item_id = {$this->itemId}";
     Connect::executeQuery($query);
     RouteCtrl::routeTo('/main/Task%20Restored');
 }