[Openfirst-cvscommit] projects groups.php,1.11,1.12 meetings.php,1.7,1.8 mytask.php,1.5,1.6 notes.ph
Brought to you by:
xtimg
Update of /cvsroot/openfirst/projects In directory sc8-pr-cvs1:/tmp/cvs-serv20757 Modified Files: groups.php meetings.php mytask.php notes.php projects.php projectsmodule.php tasks.php viewmeeting.php Log Message: Added new design and features to scripts. I am aware of the mysql commands that are in the module, but for the sake of documenting my work, I will upload the current versions. Index: groups.php =================================================================== RCS file: /cvsroot/openfirst/projects/groups.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** groups.php 10 Oct 2003 01:36:34 -0000 1.11 --- groups.php 12 Oct 2003 23:39:14 -0000 1.12 *************** *** 78,107 **** } - // Remove button process - if(isset($_POST['remove'])){ - - // If the confirmation button is selected then remove all group data - if(! isset($_POST['confirm'])){ - echo "<br><br>Your request to remove the group was denied because you have not confirmed! [ <a href='groups.php'>Groups</a> ]<br><br>"; - die(include($footer)); - } - - // Remove data from every table that is related - ofirst_dbquery("DELETE FROM ofirst_projects_groups WHERE ID = '".$_POST['group']."'") or die(ofirst_dberror()); - ofirst_dbquery("DELETE FROM ofirst_projects_notes WHERE GroupID = '".$_POST['group']."'") or die(ofirst_dberror()); - ofirst_dbquery("DELETE FROM ofirst_projects_tasks WHERE GroupID = '".$_POST['group']."'") or die(ofirst_dberror()); - ofirst_dbquery("DELETE FROM ofirst_projects_projects WHERE GroupID = '".$_POST['group']."'") or die(ofirst_dberror()); - - echo "<br><br>Group removed! [ <a href='groups.php'>Groups</a> ]<br><br>"; - die(include($footer)); - - } - ?> <h2>System Work Groups</h2> - <p>These are workgroups that are currently setup with the - action register system. Only administrators have<br> - access to editing - these groups. </p> <table width="100%" align="center" cellpadding="0" cellspacing="0"> <tr> --- 78,83 ---- *************** *** 118,162 **** <table width="100%"> <tr> ! <td class="sub" width="7%"> </td> ! <td class="sub" width="21%">Group Name</td> ! <td class="sub" width="10%">Projects</td> ! <td class="sub" width="44%">Description</td> ! <?php if($user->membertype == "administrator"){ ?><td class="sub" width="18%">Option</td><?php } ?> </tr> ! <?php // Query the current group values and loop through them ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups GROUP BY GroupName"); while($groups = ofirst_dbfetch_object($query)){ ?> <tr <?php if(date("F j, Y",time()) == date("F j, Y",$groups->Dates)){ echo "bgColor='#CCCCCC'"; } ?>> ! <td> ! <div align="center"><a href="projects.php?GroupID=<?php echo $groups->ID; ?>"><img src="../members/icons/apps/kuser.png" width="32" height="32" border="0"></a></div></td> <td><a href='projects.php?GroupID=<?php echo $groups->ID; ?>'><?php echo $groups->GroupName; ?></a></td> ! <td> ! <?php ! $projquery = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$groups->ID."'"); echo ofirst_dbnum_rows($projquery); ! ?> ! </td> ! <td><?php echo $groups->Description; ?></td> ! <?php if($user->membertype == "administrator"){ ?> ! <td><p align="center"><a href="admin/edit.php?ID=<?php echo $groups->ID; ?>">Edit</a> | <a href="admin/delete.php?ID=<?php echo $groups->ID; ?>">Delete</a></p> </td> ! <?php } ?> </tr> ! <?php ! } if(ofirst_dbnum_rows($query) == 0){ ! echo "<tr><td>--</td><td>--</td><td>--</td><td><center>No group has been found!</center></td><td>--</td><td>--</td>"; } ?> ! </table></td> </tr> </table> <br> ! <?php if($user->membertype == "administrator"){ ?> <form action='groups.php' method='POST'> <table width="39%"> --- 94,152 ---- <table width="100%"> <tr> ! <td class="sub" width="5%"> </td> ! <td class="sub" width="13%">Group Name</td> ! <td class="sub" width="7%">Projects</td> ! <td class="sub" width="62%">Description</td> ! <td class="sub" width="7%">Option</td> ! <?php if($user->membertype == "administrator"){ ?> ! <td class="sub" width="6%"><div align="center">Admin</div></td> ! <?php ! } ! ?> </tr> ! <?php // Query the current group values and loop through them ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups GROUP BY ID"); while($groups = ofirst_dbfetch_object($query)){ ?> <tr <?php if(date("F j, Y",time()) == date("F j, Y",$groups->Dates)){ echo "bgColor='#CCCCCC'"; } ?>> ! <td><div align="center"><a href="projects.php?GroupID=<?php echo $groups->ID; ?>"><img src="../members/icons/apps/kuser.png" width="32" height="32" border="0"></a></div></td> <td><a href='projects.php?GroupID=<?php echo $groups->ID; ?>'><?php echo $groups->GroupName; ?></a></td> ! <?php ! // Display number of related projects in group ! echo "<td>"; ! $projquery = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$groups->ID."'"); echo ofirst_dbnum_rows($projquery); ! echo "</td>"; ! ?> ! <td><?php echo $groups->Description; ?></td> ! <td><a href='viewmembers.php?GroupID=<?php echo $groups->ID; ?>'>Members</a></td> ! <?php ! // If administrator is logged in then show the admin edit option ! if($user->membertype == "administrator"){ ?> ! <td id="adminmenu" background="/openfirst/images/back-admin.png"><p align="center"><a href="admin/editgroups.php?GroupID=<?php echo $groups->ID; ?>">Edit</a></p></td>'; ! <?php } ! ?> </tr> ! <?php } + + // If there are no groups then display message if(ofirst_dbnum_rows($query) == 0){ ! echo "<tr><td> </td><td> </td><td> </td><td><center>No group has been found!</center></td><td> </td><td> </td>"; } ?> ! </table> ! </td> </tr> </table> <br> ! <?php ! // Allow to add groups if user is an administrator ! if($user->membertype == "administrator"){ ! ?> <form action='groups.php' method='POST'> <table width="39%"> *************** *** 204,206 **** </table> </form> ! <?php } } include($footer); ?> --- 194,199 ---- </table> </form> ! <?php ! } ! } include($footer); ! ?> Index: meetings.php =================================================================== RCS file: /cvsroot/openfirst/projects/meetings.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** meetings.php 13 Sep 2003 15:38:24 -0000 1.7 --- meetings.php 12 Oct 2003 23:39:14 -0000 1.8 *************** *** 85,100 **** ?> ! <h2><font face="Verdana, Arial, Helvetica, sans-serif"> Meetings Organizer</font></h2> ! <table width="100%"> <tr> <th>Upcoming Meetings</th> </tr> </table> ! <table width="100%"> <tr> ! <td class="sub" width="6%"> </td> ! <td class="sub" width="21%"><div align="center"><strong>Date</strong></div></td> ! <td class="sub" width="52%"><div align="center"><strong>Description</strong></div></td> ! <td class="sub" width="21%"><div align="center"><strong>Arranged For</strong></div></td> </tr> <?php --- 85,101 ---- ?> ! <h2><font face="Verdana, Arial, Helvetica, sans-serif"> Meeting Organizer</font></h2> ! <p><font face="Verdana, Arial, Helvetica, sans-serif">Click on the image to view ! more infomation about the meeting.</font></p> ! <table width="57%"> <tr> <th>Upcoming Meetings</th> </tr> </table> ! <table width="57%"> <tr> ! <td class="sub" width="7%"> </td> ! <td class="sub" width="28%"><div align="left">Date</div></td> ! <td class="sub" width="65%"><div align="left">Arranged For</div></td> </tr> <?php *************** *** 108,112 **** <td><div align="center"><a href="viewmeeting.php?ID=<?php echo $meeting->ID; ?>"><img src="../members/icons/apps/date.png" width="32" height="32" border="0"></a></div></td> <td><?php echo date("F j, Y",$meeting->ForDate); ?></td> - <td><?php echo $meeting->Description; ?></td> <td> <?php --- 109,112 ---- *************** *** 126,146 **** // If there are no values then output a no value message if(ofirst_dbnum_rows($meetquery) == 0){ ! echo "<tr><td> </td><td> </td><td>There are no planned meetings!</td><td> </td></tr>"; } ?> </table> ! <table width="100%"> <tr> <th>Past Meetings</th> </tr> </table> ! <table width="100%"> <tr> ! <td class="sub" width="6%"> </td> ! <td class="sub" width="21%">Date</th> ! <td class="sub" width="52%">Description</th> ! <td class="sub" width="21%">Arranged For</th> ! </tr> <?php // Check for passed meetings and preview them --- 126,150 ---- // If there are no values then output a no value message if(ofirst_dbnum_rows($meetquery) == 0){ ! echo "<tr><td> </td><td> </td><td>There are no planned meetings!</td></tr>"; } ?> </table> ! <br> ! <table width="57%"> <tr> <th>Past Meetings</th> </tr> </table> ! <table width="57%"> <tr> ! <td class="sub" width="7%"> </td> ! <td class="sub" width="28%"><div align="left">Date ! </th> ! </div> ! <td class="sub" width="65%"><div align="left">Arranged For ! </th> ! </div> ! </tr> <?php // Check for passed meetings and preview them *************** *** 152,156 **** <img src="../members/icons/apps/date.png" width="32" height="32" border="0"></a></div></td> <td><?php echo date("F j, Y",$meeting->ForDate); ?></td> - <td><?php echo $meeting->Description; ?></td> <td> <?php --- 156,159 ---- *************** *** 169,173 **** // If there are no values then output a message if(ofirst_dbnum_rows($query) == 0){ ! echo "<tr><td> </td><td> </td><td>There are no past meetings!</td><td> </td></tr>"; } --- 172,176 ---- // If there are no values then output a message if(ofirst_dbnum_rows($query) == 0){ ! echo "<tr><td> </td><td> </td><td>There are no past meetings!</td></tr>"; } *************** *** 175,178 **** --- 178,182 ---- </table> <br> + <?php if($user->membertype == "administrator"){ ?> <form onsubmit="return dhtmlEditorPrepareSubmit();" action='meetings.php' method='POST'> <table width="64%"> *************** *** 195,199 **** ?> ! </td> </tr> <tr> --- 199,203 ---- ?> ! </td> </tr> <tr> *************** *** 323,327 **** <br> <?php ! } include($footer); --- 327,331 ---- <br> <?php ! } } include($footer); Index: mytask.php =================================================================== RCS file: /cvsroot/openfirst/projects/mytask.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mytask.php 1 Sep 2003 17:29:10 -0000 1.5 --- mytask.php 12 Oct 2003 23:39:14 -0000 1.6 *************** *** 40,44 **** <h2>My Tasks Summarized</h2> <p>The information listed below is a list of summarized tasks that you have been ! assigned to.</p> <table width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> --- 40,46 ---- <h2>My Tasks Summarized</h2> <p>The information listed below is a list of summarized tasks that you have been ! assigned to<br> ! and that are currently active within the action register system (pend tasks ! are not shown). </p> <table width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> *************** *** 58,62 **** // Run through the current tasks ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks"); while($tasks = ofirst_dbfetch_object($query)){ --- 60,64 ---- // Run through the current tasks ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE Pend = 'none'"); while($tasks = ofirst_dbfetch_object($query)){ *************** *** 71,124 **** 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 $tasks->Description; ?></td> ! <td><?php echo $tasks->Assigned; ?></td> </tr> <? } --- 73,99 ---- if($showtask){ ?> <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 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 "<a href='notes.php?GroupID=".$tasks->GroupID."&TaskID=".$tasks->ID."&ProjectID=".$tasks->ProjectID."'>".$tasks->TaskName."</a> ("; ! echo $tasks->Completion."%)"; ?> </td> <td> ! <?php echo date("F j, Y",$tasks->TarDate); ?> </td> <td><?php echo $tasks->Description; ?></td> ! <td><?php echo str_replace(",",", ",$tasks->Assigned); ?></td> </tr> <? + } } Index: notes.php =================================================================== RCS file: /cvsroot/openfirst/projects/notes.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** notes.php 1 Sep 2003 17:29:10 -0000 1.8 --- notes.php 12 Oct 2003 23:39:14 -0000 1.9 *************** *** 77,102 **** ?> <h2>Notes and Descriptions</h2> ! <table width="540"> ! <tr> ! <td width="0" height="0"> <div align="left"><em>Location:</em> <a href="groups.php"><?php echo $group->GroupName; ?> ! Group</a> / <a href="projects.php?GroupID=<?php echo $_GET['GroupID']; ?>"><?php echo $project->ProjectName; ?> ! Project</a> / <a href="tasks.php?GroupID=<?php echo $_GET['GroupID']; ?>&ProjectID=<?php echo $_GET['ProjectID']; ?>"><?php echo $task->TaskName; ?> ! Task</a> / <a href="notes.php?GroupID=<?php echo $_GET['GroupID']; ?>&ProjectID=<?php echo $_GET['ProjectID']; ?>&TaskID=<?php echo $_GET['TaskID']; ?>"><strong>Notes</strong></a></div></td> ! </tr> ! </table> ! <br> ! <table width="100%" border="0" cellspacing="0" cellpadding="6"> ! <tr> ! <th>Notes for Task <?php echo $task->TaskName; ?></th> ! </tr> ! </table> ! <table width="100%"> <tr> ! <td class="sub" width="5%"> </td> ! <td class="sub" width="17%">Date</td> ! <td class="sub" width="63%">Note Write Up</td> ! <td class="sub" width="15%">Commiter</td> ! </tr> ! <?php // List the notes --- 77,102 ---- ?> <h2>Notes and Descriptions</h2> ! <h2></h2> ! <table width="100%" align="center" cellpadding="0" cellspacing="0"> <tr> ! <td width="22%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="6"> ! <tr> ! <th> Navigation </th> ! <tr> ! <td><?php projecttree("tasks",$_GET['ProjectID']); ?></td> ! </table></td> ! <td width="78%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="6"> ! <tr> ! <th>Notes for Task <font color='red'><?php echo $task->TaskName; ?></font></th> ! </tr> ! </table> ! <table width="100%"> ! <tr> ! <td class="sub" width="5%"> </td> ! <td class="sub" width="17%">Date</td> ! <td class="sub" width="63%">Note Write Up</td> ! <td class="sub" width="15%">Commiter</td> ! </tr> ! <?php // List the notes *************** *** 105,116 **** ?> ! ! <tr <?php if(date("F j, Y",time()) == date("F j, Y",$notes->Dates)){ echo "bgColor='#CCCCCC'"; } ?>> ! <td><img src="../members/icons/filesystems/files.png" width="32" height="32"></td> ! <td><?php echo date("F j, Y h:i a",$notes->Dates); ?></td> ! <td><?php echo $notes->Description; ?></td> ! <td><?php echo $notes->Commiter; ?></td> ! </tr> ! <?php } --- 105,115 ---- ?> ! <tr <?php if(date("F j, Y",time()) == date("F j, Y",$notes->Dates)){ echo "bgColor='#CCCCCC'"; } ?>> ! <td><img src="../members/icons/filesystems/files.png" width="32" height="32"></td> ! <td><?php echo date("F j, Y h:i a",$notes->Dates); ?></td> ! <td><?php echo $notes->Description; ?></td> ! <td><?php echo $notes->Commiter; ?></td> ! </tr> ! <?php } *************** *** 120,124 **** --- 119,126 ---- } ?> + </table></td> + </tr> </table> + <br> <?php *************** *** 131,134 **** --- 133,139 ---- } } + + // Show administrator the add option no matter what + if($user->membertype == "administrator"){ $show = true; } if($show){ *************** *** 160,201 **** <td><input name="create" type="submit" id="create2" value="Create Note"> <input type="reset" name="Reset" value="Reset"> </td> - </tr> - <tr> - <th> </th> - <th>Add Task Completion</th> - </tr> - <tr> - <td><div align="right">Completion:</div></td> - <td><select name="completion" id="completion"> - <option selected><?php echo $task->Completion; ?></option> - <option>----</option> - <option>CLOSE</option> - <option>0</option> - <option>5</option> - <option>10</option> - <option>15</option> - <option>20</option> - <option>25</option> - <option>30</option> - <option>35</option> - <option>40</option> - <option>45</option> - <option>50</option> - <option>55</option> - <option>60</option> - <option>65</option> - <option>70</option> - <option>75</option> - <option>80</option> - <option>85</option> - <option>90</option> - <option>95</option> - <option>100</option> - </select> - %</td> - </tr> - <tr> - <td> </td> - <td><input name="addcompletion" type="submit" id="create" value="Add Completion"></td> </tr> </table> --- 165,168 ---- Index: projects.php =================================================================== RCS file: /cvsroot/openfirst/projects/projects.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** projects.php 10 Oct 2003 11:19:38 -0000 1.10 --- projects.php 12 Oct 2003 23:39:14 -0000 1.11 *************** *** 101,105 **** <td width="78%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> ! <th>Project Listings for <?php echo $group->GroupName; ?> Group</th> </tr> </table> --- 101,105 ---- <td width="78%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> ! <th>Project Listings for <font color='red'><?php echo $group->GroupName; ?></font> Group</th> </tr> </table> *************** *** 107,119 **** <tr> <td class="sub" width="3%"> </td> ! <td class="sub" width="22%">Project Name</td> ! <td class="sub" width="15%">Completion</td> ! <td class="sub" width="41%">Description</td> ! <?php if($user->membertype == "administrator"){ ?><td class="sub" width="19%">Option</td><?php } ?> </tr> <?php // List current projects in database ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."' ORDER BY ProjectName;"); while($projects = ofirst_dbfetch_object($query)){ --- 107,122 ---- <tr> <td class="sub" width="3%"> </td> ! <td class="sub" width="19%">Project Name</td> ! <td class="sub" width="10%">Completion</td> ! <td class="sub" width="35%">Description</td> ! <td width="27%" class="sub">Assigned To Project </td> ! <?php if($user->membertype == "administrator"){ ?> ! <td class="sub" width="6%">Admin</td> ! <?php } ?> </tr> <?php // List current projects in database ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."' ORDER BY ID;"); while($projects = ofirst_dbfetch_object($query)){ *************** *** 137,141 **** <tr <?php if(date("F j, Y",time()) == date("F j, Y",$projects->Dates)){ echo "bgColor='#CCCCCC'"; } ?>> <td> ! <?php // If project completion is 100 then display completion graphic --- 140,144 ---- <tr <?php if(date("F j, Y",time()) == date("F j, Y",$projects->Dates)){ echo "bgColor='#CCCCCC'"; } ?>> <td> ! <?php // If project completion is 100 then display completion graphic *************** *** 150,154 **** // Decide on graphic depending on the value of pend if($pend){ ! echo "<img src='../members/icons/actions/encrypted.png' border='0'>"; } else { echo "<a href='tasks.php?GroupID=".$_GET['GroupID']."&ProjectID=".$projects->ID."'><img src='../members/icons/actions/project_open.png' border='0'></a>"; --- 153,157 ---- // Decide on graphic depending on the value of pend if($pend){ ! echo "<img src='project-pend.png' border='0'>"; } else { echo "<a href='tasks.php?GroupID=".$_GET['GroupID']."&ProjectID=".$projects->ID."'><img src='../members/icons/actions/project_open.png' border='0'></a>"; *************** *** 158,162 **** ?> </td> ! <td> <a href="tasks.php?GroupID=<?php echo $projects->GroupID; ?>&ProjectID=<?php echo $projects->ID; ?>"><?php echo $projects->ProjectName; ?></a></td> <td> <?php --- 161,173 ---- ?> </td> ! <td> ! <?php ! if(! $pend){ ! echo '<a href="tasks.php?GroupID='.$projects->GroupID.'&ProjectID='.$projects->ID.'">'.$projects->ProjectName.'</a>'; ! }else{ ! echo $projects->ProjectName; ! } ! ?> ! </td> <td> <?php *************** *** 169,173 **** </td> <td><?php echo $projects->Description; ?></td> ! <?php if($user->membertype == "administrator"){ ?><td><a href="edit.php">Edit</a> | <a href="delete.php">Delete</a> </td><?php } ?> </tr> <? --- 180,186 ---- </td> <td><?php echo $projects->Description; ?></td> ! <td><?php echo str_replace(",",", ",$projects->Assigned); ?></td> ! <?php if($user->membertype == "administrator"){ ?><td id="adminmenu" background="/openfirst/images/back-admin.png"><div align="center"><a href="edit.php">Edit</a></div></td> ! <?php } ?> </tr> <? *************** *** 217,221 **** <?php ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."'"); while($projects = ofirst_dbfetch_object($query)){ --- 230,234 ---- <?php ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."' ORDER BY 'ID'"); while($projects = ofirst_dbfetch_object($query)){ Index: projectsmodule.php =================================================================== RCS file: /cvsroot/openfirst/projects/projectsmodule.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** projectsmodule.php 10 Oct 2003 11:19:02 -0000 1.2 --- projectsmodule.php 12 Oct 2003 23:39:14 -0000 1.3 *************** *** 47,51 **** // Case if user wants to view tasks in a project case "tasks": ! $task_query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE ProjectID = ".$value); $task = ofirst_dbfetch_object($task_query); --- 47,51 ---- // 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); *************** *** 86,89 **** --- 86,90 ---- 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){ *************** *** 93,97 **** // Preview and image and name of task ! echo ' <img src="../members/icons/filesystems/desktop.png" width="18" height="20" border="0"> '.$task->TaskName.'<br>'; } --- 94,104 ---- // 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>"; } Index: tasks.php =================================================================== RCS file: /cvsroot/openfirst/projects/tasks.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tasks.php 10 Oct 2003 11:19:38 -0000 1.10 --- tasks.php 12 Oct 2003 23:39:14 -0000 1.11 *************** *** 81,104 **** } - // Remove button process - if(isset($_POST['remove'])){ - - // If a remove confirm is selected then allow the process to continue - if(! isset($_POST['confirm'])){ - echo "<br><br>Your request to remove the task was denied because you have not confirmed! [ <a href='tasks.php?GroupID=".$_GET['GroupID']."&ProjectID=".$_GET['ProjectID']."'>Tasks</a> ]<br><br>"; - die(include($footer)); - } - - // Remove every task related value in the database - ofirst_dbquery("DELETE FROM ofirst_projects_tasks WHERE ID = '".$_POST['task']."'") or die(ofirst_dberror()); - ofirst_dbquery("DELETE FROM ofirst_projects_notes WHERE TaskID = '".$_POST['task']."'") or die(ofirst_dberror()); - ofirst_dbquery("DELETE FROM ofirst_projects_tasks WHERE TaskID = '".$_POST['task']."'") or die(ofirst_dberror()); - ofirst_dbquery("DELETE FROM ofirst_projects_projects WHERE TaskID = '".$_POST['task']."'") or die(ofirst_dberror()); - - echo "<br><br>Task removed! [ <a href='tasks.php?GroupID=".$_GET['GroupID']."&ProjectID=".$_GET['ProjectID']."'>Projects</a> ]<br><br>"; - die(include($footer)); - - } - // Gather information to show the following tasks $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups WHERE ID = '".$_GET['GroupID']."'"); --- 81,84 ---- *************** *** 113,124 **** <tr> <td width="22%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="6"> ! <tr> ! <th> Navigation </th> ! <tr> ! <td><?php projecttree("tasks",$_GET['ProjectID']); ?></td> </table></td> ! <td width="78%" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> ! <th>Task Listings for <?php echo $project->ProjectName; ?> Project</th> </tr> </table> --- 93,102 ---- <tr> <td width="22%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="6"> ! <tr><th>Navigation</th><tr> ! <td><?php projecttree("tasks",$_GET['ProjectID']); ?></td> </table></td> ! <td width="78%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> ! <th>Task Listings for the <font color='red'><?php echo $project->ProjectName; ?></font> Project</th> </tr> </table> *************** *** 126,134 **** <tr> <td class="sub" width="3%"> </td> ! <td class="sub" width="17%">Task Name</td> <td class="sub" width="10%">Completion</td> <td class="sub" width="16%">Target Date</td> ! <td class="sub" width="37%">Description</td> ! <?php if($user->membertype == "administrator"){ ?><td class="sub" width="17%">Option</td><?php } ?> </tr> <?php --- 104,115 ---- <tr> <td class="sub" width="3%"> </td> ! <td class="sub" width="15%">Task Name</td> <td class="sub" width="10%">Completion</td> <td class="sub" width="16%">Target Date</td> ! <td class="sub" width="31%">Description</td> ! <td width="19%" class="sub">Assigned To Members</td> ! <?php if($user->membertype == "administrator"){ ?> ! <td class="sub" width="6%">Admin</td> ! <?php } ?> </tr> <?php *************** *** 160,175 **** <?php ! // If the task comletion is 100% then display the completion graphic if($tasks->Completion == "100"){ echo "<a href='notes.php?GroupID=".$_GET['GroupID']."&TaskID=".$tasks->ID."&ProjectID=".$_GET['ProjectID']."'><img src='../members/icons/actions/button_ok.png' border='0'></a>"; ! // If the task is closed then display the close value } elseif($tasks->Completion == "CLOSE") { echo "<a href='notes.php?GroupID=".$_GET['GroupID']."&TaskID=".$tasks->ID."&ProjectID=".$_GET['ProjectID']."'><img src='../members/icons/actions/button_cancel.png' border='0'></a>"; } else { ! // If the value is still pending then display the pend value if($pend){ ! echo "<img src='../members/icons/actions/encrypted.png' border='0'>"; } else { echo "<a href='notes.php?GroupID=".$_GET['GroupID']."&TaskID=".$tasks->ID."&ProjectID=".$_GET['ProjectID']."'><img src='../members/icons/filesystems/desktop.png' border='0'></a>"; --- 141,156 ---- <?php ! // If the task comletion is 100% then display the completion image if($tasks->Completion == "100"){ echo "<a href='notes.php?GroupID=".$_GET['GroupID']."&TaskID=".$tasks->ID."&ProjectID=".$_GET['ProjectID']."'><img src='../members/icons/actions/button_ok.png' border='0'></a>"; ! // If the task is closed then display the close value image } elseif($tasks->Completion == "CLOSE") { echo "<a href='notes.php?GroupID=".$_GET['GroupID']."&TaskID=".$tasks->ID."&ProjectID=".$_GET['ProjectID']."'><img src='../members/icons/actions/button_cancel.png' border='0'></a>"; } else { ! // If the value is still pending then display the pend value image if($pend){ ! echo "<img src='task-pend.png' border='0'>"; } else { echo "<a href='notes.php?GroupID=".$_GET['GroupID']."&TaskID=".$tasks->ID."&ProjectID=".$_GET['ProjectID']."'><img src='../members/icons/filesystems/desktop.png' border='0'></a>"; *************** *** 180,203 **** </td> <td> ! <?php ! // Decide between pend, close and completion value to display - echo "<a href='notes.php?GroupID=".$_GET['GroupID']."&TaskID=".$tasks->ID."&ProjectID=".$_GET['ProjectID']."'>".$tasks->TaskName."</a>"; if(! $pend){ ! if($tasks->Completion == "CLOSE"){ echo "--<b>CLOSED</b>"; } ! } else { ! echo "PEND ON: ".$pendtask->TaskName; } ?> </td> ! <td>dsfg</td> <td><?php echo date("F j, Y",$tasks->TarDate); ?></td> <td><?php echo $tasks->Description; ?></td> ! <?php if($user->membertype == "administrator"){ ?> ! <td><a href="edit.php">Edit</a> | <a href="delete.php">Close</a> | ! <a href="open.php">Open</a> </td><?php } ?> </tr> <? --- 161,196 ---- </td> <td> ! <?php ! // Show link or not for pend text ! if(! $pend){ ! echo "<a href='notes.php?GroupID=".$_GET['GroupID']."&TaskID=".$tasks->ID."&ProjectID=".$_GET['ProjectID']."'>".$tasks->TaskName."</a>"; ! }else{ ! echo $tasks->TaskName; ! } // Decide between pend, close and completion value to display if(! $pend){ ! if($tasks->Completion == "CLOSE"){ echo "-- <b>CLOSED</b>"; } } ?> </td> ! <td> ! <?php ! if(! $pend){ ! if($tasks->Completion == "CLOSE"){ echo "CLOSED"; }else{ echo $tasks->Completion."%"; } ! } else { ! echo "PEND ON: ".$pendtask->TaskName; ! } ! ?> ! </td> <td><?php echo date("F j, Y",$tasks->TarDate); ?></td> <td><?php echo $tasks->Description; ?></td> ! <td><?php echo str_replace(",",", ",$tasks->Assigned); ?></td> ! <?php ! if($user->membertype == "administrator"){ ! echo '<td id="adminmenu" background="/openfirst/images/back-admin.png"><center><a href="edit.php">Edit</a></center></td>'; ! } ?> </tr> <? *************** *** 223,226 **** --- 216,222 ---- } } + + // Give administrator access no matter what + if($user->membertype == "administrator"){ $show = true; } if($show){ Index: viewmeeting.php =================================================================== RCS file: /cvsroot/openfirst/projects/viewmeeting.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** viewmeeting.php 13 Sep 2003 15:38:24 -0000 1.5 --- viewmeeting.php 12 Oct 2003 23:39:14 -0000 1.6 *************** *** 108,112 **** </table> <br> ! <?php if($meeting->Status != "done"){ ?> <form onsubmit="return dhtmlEditorPrepareSubmit();" action='viewmeeting.php?ID=<?php echo $_GET['ID']; ?>' method='POST'> <table width="48%"> --- 108,115 ---- </table> <br> ! <?php ! if($meeting->Status != "done"){ ! if($user->membertype = "administrator"){ ! ?> <form onsubmit="return dhtmlEditorPrepareSubmit();" action='viewmeeting.php?ID=<?php echo $_GET['ID']; ?>' method='POST'> <table width="48%"> *************** *** 170,174 **** <br> <?php ! } } --- 173,177 ---- <br> <?php ! } } } |