[Openfirst-cvscommit] projects projectsmodule.php,1.3,1.4
Brought to you by:
xtimg
From: <xt...@us...> - 2003-10-23 17:38:37
|
Update of /cvsroot/openfirst/projects In directory sc8-pr-cvs1:/tmp/cvs-serv19922 Modified Files: projectsmodule.php Log Message: Fix indenting/spacing/style issues Index: projectsmodule.php =================================================================== RCS file: /cvsroot/openfirst/projects/projectsmodule.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** projectsmodule.php 12 Oct 2003 23:39:14 -0000 1.3 --- projectsmodule.php 23 Oct 2003 13:12:06 -0000 1.4 *************** *** 29,111 **** // Tree preview function for projects module ! function projecttree($option,$value = ""){ ! // Prepare tree data so the script may loop through and find info ! switch($option){ ! // Case if user wants to view group tree ! case "groups": ! $groups = ""; ! $projects = ""; ! $tasks = ""; ! break; ! // Case if user wants to view projects in a group ! case "projects": ! $groups = $value; ! $projects = $value; ! $tasks = ""; ! break; ! // Case if user wants to view tasks in a project ! case "tasks": ! $task_query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE ProjectID = ".$value." ORDER BY 'ID'"); ! $task = ofirst_dbfetch_object($task_query); ! ! // If you do not set the group value then nothing will show. So we must get ! // the value directly by querying the related project value. ! if(ofirst_dbnum_rows($task_query) == 0){ ! ! $project_query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE ID = ".$value); ! $project = ofirst_dbfetch_object($project_query); ! $groups = $project->GroupID; ! }else{ ! $groups = $task->GroupID; ! } ! $projects = $value; ! $tasks = $value; ! break; ! ! } ! // Begin to loop through tree information, beginning with groups list first ! $group_query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups"); ! while($group = ofirst_dbfetch_object($group_query)){ ! // Show image and name for this group ! echo '<img height="20" width="18" src="../members/icons/apps/kuser.png"> <a href="projects.php?GroupID='.$group->ID.'">'.$group->GroupName.'</a><br>'; ! ! // Preview current projects ! if($projects != "" && $group->ID == $groups){ ! // Gather list of projects which relate to the selected group and loop through ! $project_query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = ".$groups); ! while($project = ofirst_dbfetch_object($project_query)){ ! ! // Preview image and name of project ! echo ' <img src="../members/icons/actions/project_open.png" width="18" height="20" border="0"> <a href="tasks.php?GroupID='.$groups.'&ProjectID='.$project->ID.'">'.$project->ProjectName.'</a><br>'; ! ! ! // Preview current tasks ! if($tasks != "" && $project->ID == $projects){ ! // Gather a list of tasks which relate to the selected project and loop through ! $task_query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE GroupID = $groups AND ProjectID = $projects"); ! while($task = ofirst_dbfetch_object($task_query)){ ! ! // Preview and image and name of task ! echo ' <img src="../members/icons/filesystems/desktop.png" width="18" height="20" border="0"><a href="notes.php?GroupID='.$task->GroupID.'&ProjectID='.$task->ProjectID.'&TaskID='.$task->ID.'"> '; ! if(isset($_GET['TaskID']) && $_GET['TaskID'] == $task->ID){ ! echo "<b>".$task->TaskName."</b>"; ! }else{ ! echo $task->TaskName; ! } ! echo "</a><br>"; ! ! } ! } ! } } } - } ! ?> \ No newline at end of file --- 29,106 ---- // Tree preview function for projects module ! function projecttree($option,$value = "") { ! // Prepare tree data so the script may loop through and find info ! switch($option) { ! // Case if user wants to view group tree ! case "groups": ! $groups = ""; ! $projects = ""; ! $tasks = ""; ! break; ! // Case if user wants to view projects in a group ! case "projects": ! $groups = $value; ! $projects = $value; ! $tasks = ""; ! break; ! // Case if user wants to view tasks in a project ! case "tasks": ! $task_query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE ProjectID = ".$value." ORDER BY 'ID'"); ! $task = ofirst_dbfetch_object($task_query); ! // If you do not set the group value then nothing will show. So we must get ! // the value directly by querying the related project value. ! if(ofirst_dbnum_rows($task_query) == 0) { ! $project_query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE ID = ".$value); ! $project = ofirst_dbfetch_object($project_query); ! $groups = $project->GroupID; ! } else { ! $groups = $task->GroupID; ! } ! $projects = $value; ! $tasks = $value; ! break; ! } ! ! // Begin to loop through tree information, beginning with groups list first ! $group_query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups"); ! while($group = ofirst_dbfetch_object($group_query)) { ! // Show image and name for this group ! echo '<img height="20" width="18" src="../members/icons/apps/kuser.png"> <a href="projects.php?GroupID='.$group->ID.'">'.$group->GroupName.'</a><br>'; ! // Preview current projects ! if($projects != "" && $group->ID == $groups) { ! ! // Gather list of projects which relate to the selected group and loop through ! $project_query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = ".$groups); ! while($project = ofirst_dbfetch_object($project_query)) { ! // Preview image and name of project ! echo ' <img src="../members/icons/actions/project_open.png" width="18" height="20" border="0"> <a href="tasks.php?GroupID='.$groups.'&ProjectID='.$project->ID.'">'.$project->ProjectName.'</a><br>'; ! ! // Preview current tasks ! if($tasks != "" && $project->ID == $projects) { ! // Gather a list of tasks which relate to the selected project and loop through ! $task_query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE GroupID = $groups AND ProjectID = $projects"); ! while($task = ofirst_dbfetch_object($task_query)) { ! ! // Preview and image and name of task ! echo ' <img src="../members/icons/filesystems/desktop.png" width="18" height="20" border="0"><a href="notes.php?GroupID='.$task->GroupID.'&ProjectID='.$task->ProjectID.'&TaskID='.$task->ID.'"> '; ! if(isset($_GET['TaskID']) && $_GET['TaskID'] == $task->ID) { ! echo "<b>".$task->TaskName."</b>"; ! } else { ! echo $task->TaskName; ! } ! echo "</a><br>"; ! } ! } ! } ! } } } ! ?> |