pages/custom_projViewFiles.inc.php

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 
00009 require_once(confGet('DIR_STREBER') . "db/class_task.inc.php");
00010 require_once(confGet('DIR_STREBER') . "db/class_project.inc.php");
00011 require_once(confGet('DIR_STREBER') . "db/class_projectperson.inc.php");
00012 require_once(confGet('DIR_STREBER') . "db/db_itemperson.inc.php");
00013 require_once(confGet('DIR_STREBER') . "render/render_list.inc.php");
00014 require_once(confGet('DIR_STREBER') . "lists/list_taskfolders.inc.php");
00015 require_once(confGet('DIR_STREBER') . "lists/list_comments.inc.php");
00016 require_once(confGet('DIR_STREBER') . "lists/list_tasks.inc.php");
00017 require_once(confGet('DIR_STREBER') . "lists/list_project_team.inc.php");
00018 
00019 
00020 function projViewFiles() 
00021 {
00022     global $PH;
00023     global $auth;
00024     require_once(confGet('DIR_STREBER') . "render/render_wiki.inc.php");
00025 
00026 
00027     ### get current project ###
00028     $id=getOnePassedId('prj','projects_*');
00029     $project= Project::getVisibleById($id);
00030     if(!$project || !$project->id) {
00031         $PH->abortWarning(__("invalid project-id"));
00032         return;
00033     }
00034 
00035     ### define from-handle ###
00036     $PH->defineFromHandle(array('prj'=>$project->id));
00037 
00038     ## is viewed by user ##
00039     $project->nowViewedByUser();
00040 
00041     ## next milestone ##
00042     $next=$project->getNextMilestone();
00043 
00044     ### set up page ####
00045     {
00046         $page= new Page();
00047 
00048         $page->crumbs= build_project_crumbs($project);
00049         $page->options= build_projView_options($project);
00050 
00051         $page->cur_tab='projects';
00052         $page->title=$project->name;
00053         $page->title_minor=__("Downloads");
00054 
00055         if($project->status == STATUS_TEMPLATE) {
00056             $page->type=__("Project Template");
00057         }
00058         else if ($project->status >= STATUS_COMPLETED){
00059             $page->type=__("Inactive Project");
00060         }
00061         else {
00062             $page->type=__("Project","Page Type");
00063         }
00064 
00065 
00066         ### render title ###
00067         echo(new PageHeader);
00068     }
00069     echo (new PageContentOpen);
00070 
00071     measure_stop('init2');
00072     measure_start('info');
00073 
00074 
00075     {
00076         $block=new PageBlock(array('id'=>'support'));
00077         $block->render_blockStart();
00078         echo "<div class=text>";
00079 
00080         if($task= Task::getVisibleById(3645)) {
00081             echo wiki2html($task->description, $project);
00082         }
00083 
00084         echo "</div>";
00085 
00086         $block->render_blockEnd();
00087 
00088         
00089     }
00090 
00091     echo (new PageContentClose);
00092     echo (new PageHtmlEnd());
00093     
00094 }
00095 
00096 
00097 
00098 ?>

Generated on Sun Mar 4 17:19:31 2007 for streber by  doxygen 1.5.1-p1