[Openfirst-cvscommit] projects index.php,1.14,1.15
Brought to you by:
xtimg
From: <dav...@us...> - 2003-11-01 16:43:52
|
Update of /cvsroot/openfirst/projects In directory sc8-pr-cvs1:/tmp/cvs-serv7773 Modified Files: index.php Log Message: The index now displays the action register stats (totals such as number of groups, projects, tasks, notes etc.) I have note tested this yet as my IIS server is down. I will make changes later on if I find any errors. Index: index.php =================================================================== RCS file: /cvsroot/openfirst/projects/index.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** index.php 23 Oct 2003 13:47:27 -0000 1.14 --- index.php 1 Nov 2003 16:43:49 -0000 1.15 *************** *** 32,35 **** --- 32,37 ---- include_once($header); + $selectdate = date("F j, Y",time()); + if(! isset($user->user)){ ?> *************** *** 43,139 **** echo "<h2>Projects System</h2>Welcome <font color='green'>".$user->user."</font>, thank you for logging in!<br><br>"; ?> ! ! ! <table width="52%" border="0" cellspacing="0" cellpadding="6"> ! <tr> ! <th>Your Assigned Groups</th> </tr> </table> ! <table width="52%"> <tr> ! <td class="sub" width="4%"> </th> ! <td class="sub" width="20%">Task Name</th> ! <td class="sub" width="13%">Target Date</th> ! <td class="sub" width="30%">Assigned</th> </tr> ! <?php ! ! // Run through the current tasks ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks"); ! while($tasks = ofirst_dbfetch_object($query)){ ! ! $showtask = false; ! ! $assigned = explode(",",$tasks->Assigned); ! foreach($assigned As $member){ ! if($member == $user->user){ ! $showtask = true; ! } ! } ! ! if($showtask){ ! ! // If value is pending then select the proper information ! if($tasks->Pend == "none"){ ! $pend = false; ! } else { ! ! $taskquery = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE ID = '".$tasks->Pend."'"); ! $pendtask = ofirst_dbfetch_object($taskquery); ! ! if($pendtask->Completion == 100){ ! $pend = false; ! } else { ! $pend = true; ! } ! } ! } ! ?> ! <tr <?php if(date("F j, Y",time()) == date("F j, Y",$tasks->Dates)){ echo "bgColor='#CCCCCC'"; } ?>> ! <td><a href="notes.php?GroupID=<?php echo $_GET['GroupID']; ?>&TaskID=<?php echo $tasks->ID; ?>&ProjectID=<?php echo $_GET['ProjectID']; ?>"> <?php ! ! // If value is pending then show pend graphics ! if($pend){ ! echo "<img src='../members/icons/actions/encrypted.png' border='0'>"; ! } else { ! echo "<a href='notes.php?GroupID=".$tasks->GroupID."&TaskID=".$tasks->ID."&ProjectID=".$tasks->ProjectID."'><img src='../members/icons/filesystems/desktop.png' border='0'></a>"; ! } ! ! ?> ! </a></td> <td> <?php ! echo $tasks->TaskName." ("; ! if(! $pend){ ! echo $tasks->Completion."%"; ! } else { ! echo "PEND ON: ".$pendtask->TaskName; ! } ! echo ")"; ! ?> </td> <td> <?php ! echo date("F j, Y",$tasks->TarDate); ! ?> </td> - <td><?php echo str_replace(",", ", ",$tasks->Assigned); ?></td> </tr> ! <? ! } ! ! if(ofirst_dbnum_rows($query) == 0){ ! echo "\n <tr>\n <td> </td>\n <td>There are no tasks for this project!</td>\n <td> </td>\n <td> </td>\n </tr>"; ! } ! ?> <tr> ! <td width="4%"> </th> ! <td width="20%"> ! <td width="13%"> ! <td width="30%">[ <a href="mytask.php">Detailed Related Tasks</a> ]</tr> </table> - - <p>[ <a href="<?php echo $home.$basepath; ?>/manual/openfirst.projects/projects.php#howto">Project Help Manual</a> ]<br> --- 45,157 ---- echo "<h2>Projects System</h2>Welcome <font color='green'>".$user->user."</font>, thank you for logging in!<br><br>"; ?> ! <p>Welcome to the project system!</p> ! <table width="400"> ! <tr> ! <th>Total Commit Statistics</th> </tr> </table> ! <table width="400"> <tr> ! <td width="124"><div align="right"> Groups:</div></td> ! <td width="264"> <?php ! $groupquery = ofirst_dbquery("SELECT ID FROM ofirst_projects_groups;"); ! echo mysql_num_rows($groupquery); ! ?> ! </td> ! </tr> ! <tr> ! <td><div align="right"> Projects:</div></td> <td> <?php ! $projectquery = ofirst_dbquery("SELECT ID FROM ofirst_projects_projects;"); ! echo mysql_num_rows($projectquery); ! ?> </td> + </tr> + <tr> + <td><div align="right"> Tasks:</div></td> <td> <?php ! $taskquery = ofirst_dbquery("SELECT ID FROM ofirst_projects_tasks;"); ! echo mysql_num_rows($taskquery); ! ?> </td> </tr> ! <tr> ! <td><div align="right"> Notes:</div></td> ! <td> ! <?php ! $notesquery = ofirst_dbquery("SELECT ID FROM ofirst_projects_notes;"); ! echo mysql_num_rows($notesquery); ! ?> ! </td> ! </tr> ! </table> ! <table width="400"> ! <tr> ! <th>Todays Commit Statistics</th> ! </tr> ! </table> ! <table width="400"> ! <tr> ! <td width="124"><div align="right"> Projects:</div></td> ! <td width="264"> ! <?php ! // Find values that are related to today for projects ! $projnum = 0; ! $projectquery = ofirst_dbquery("SELECT Dates FROM ofirst_projects_projects;"); ! while($project = ofirst_dbfetch_object($projectquery)){ ! if($selectdate == date("F j, Y",$project->Dates)){ ! $projnum++; ! } ! } ! echo $projnum; ! ?> ! </td> ! </tr> ! <tr> ! <td><div align="right"> Tasks:</div></td> ! <td> ! <?php ! // Find values that are related to today for tasks ! $tasknum = 0; ! $taskquery = ofirst_dbquery("SELECT Dates FROM ofirst_projects_tasks;"); ! while($task = ofirst_dbfetch_object($tasksuery)){ ! if($selectdate == date("F j, Y",$task->Dates)){ ! $tasknum++; ! } ! } ! echo $tasknum; ! ?> ! </td> ! </tr> ! <tr> ! <td><div align="right"> Notes:</div></td> ! <td> ! <?php ! // Find values that are related to today for notes ! $notenum = 0; ! $notesquery = ofirst_dbquery("SELECT Dates FROM ofirst_projects_notes;"); ! while($notes = ofirst_dbfetch_object($notesquery)){ ! if($selectdate == date("F j, Y",$notes->Dates)){ ! $notenum++; ! } ! } ! echo $notenum; ! ?> ! </td> ! </tr> <tr> ! <td><div align="right">Total Day Commits:</div></td> ! <td> ! <?php ! $totel = $notenum + $tasknum + $projectnum; ! echo $total; ! ?> ! </td> ! </tr> </table> <p>[ <a href="<?php echo $home.$basepath; ?>/manual/openfirst.projects/projects.php#howto">Project Help Manual</a> ]<br> |