diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-18 11:34:19 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-18 11:34:19 +0000 |
commit | c4f61dd4c1b5a28a7c073c734f003ffd45b820d4 (patch) | |
tree | 46054d2ccb246d3133c4523d010a3480cf4d84ac /mod/tasklist/index.php | |
parent | 4e7d013c52cdb2ae00f5faf6bae7519bf3dc72ed (diff) | |
download | elgg-c4f61dd4c1b5a28a7c073c734f003ffd45b820d4.tar.gz elgg-c4f61dd4c1b5a28a7c073c734f003ffd45b820d4.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* Added VERY simple tasklist plugin.
git-svn-id: https://code.elgg.org/elgg/trunk@247 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/tasklist/index.php')
-rw-r--r-- | mod/tasklist/index.php | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/mod/tasklist/index.php b/mod/tasklist/index.php new file mode 100644 index 000000000..5491baea8 --- /dev/null +++ b/mod/tasklist/index.php @@ -0,0 +1,52 @@ +<?php + require_once("../../engine/start.php"); + + global $CONFIG; + + //$_SESSION['id'] = 2; + + // Get the user + $owner_id = page_owner(); + $owner = get_user(page_owner()); + + $description = get_input("task"); + $status = get_input("status"); + $action = get_input("action"); + $guid = get_input("guid"); + + $limit = get_input("limit",10); + $offset = get_input("offset",0); + + switch ($action) + { + case 'newtask' : + $taskid = create_entity("object", "task", $owner_id, 0); + + if ($taskid) + { + $entity = get_entity($taskid); + + $entity->setMetaData('task', $task, 'text'); + $entity->setMetaData('status', 'notdone', 'text'); + + + $entity->save(); + } else echo "error"; + + break; + + case 'tick' : + $entity = get_entity($guid); + + $entity->setMetaData('status', 'done', 'text'); + break; + } + + $body = elgg_view("tasklist/main", array( + "name" => $owner->name, + "tasklist" => tasklist_drawtasks($owner_id, $limit, $offset), + "newtask" => tasklist_draw_newtask_form($owner_id) + )); + page_draw("Tasklist",$body); + +?>
\ No newline at end of file |