00001 <?php if(!function_exists('startedIndexPhp')) { header("location:../index.php"); exit();}
00002 # streber - a php5 based project management system (c) 2005-2007 / www.streber-pm.org
00003 # Distributed under the terms and conditions of the GPL as stated in lang/license.html
00004
00005 require_once("db/class_task.inc.php");
00006 require_once("db/class_project.inc.php");
00007
00008
00024 function taskAjax()
00025 {
00026 trigger_error('blub');
00027 if($task_id=intval(get('tsk'))) {
00028 require_once("render/render_wiki.inc.php");
00029
00030 ### headline ###
00031
00032 echo "<h3>". asHtml($task->name)."</h3>";
00033
00034 $editable= false; # flag, if this task can be edited
00035
00036 if($task= Task::getEditableById($task_id)) {
00037 $editable= true;
00038 }
00039 else if(!$task=Task::getVisibleById($task_id)) {
00040 echo "Failure";
00041 }
00042
00043
00044 if($editable) {
00045 echo wiki2html($task->description, $project, $task->id, 'description');
00046 }
00047 else {
00048 echo wiki2html($task->description, $project);
00049 }
00050 }
00051 }
00052
00053
00054
00055
00056 ?>