Location: PHPKode > scripts > Prioritexter > pages/setcategory.php
<?
global $db;


$tasks = new Tasks();
foreach($tasks->tasks as $task) {
  switch ($task->category) {
  case "home":
    $category_id = 1;
  break;
  case "office":
    $category_id = 2;
  break;
  case "errand":
    $category_id = 3;
  break;
  case "call":
    $category_id = 4;
  break;
  case "social":
    $category_id = 5;
  break;
  case "misc":
    $category_id = 6;
  break;
  }
  $values["category_id"]=$category_id;
  $values["task_id"]=$task->id;
  $db->insert("task_category",$values);
  

}

?>
Return current item: Prioritexter