[Openfirst-cvscommit] projects groups.php,1.5,1.6 index.php,1.6,1.7 meetings.php,1.2,1.3 mytask.php,
Brought to you by:
xtimg
Update of /cvsroot/openfirst/projects In directory sc8-pr-cvs1:/tmp/cvs-serv7756 Modified Files: groups.php index.php meetings.php mytask.php notes.php preferences.php projects.php tasks.php today.php viewmeeting.php Log Message: Add multiple database support, alphabetical ordering of group names and user names Index: groups.php =================================================================== RCS file: /cvsroot/openfirst/projects/groups.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** groups.php 29 Aug 2003 15:50:35 -0000 1.5 --- groups.php 30 Aug 2003 00:04:02 -0000 1.6 *************** *** 35,39 **** // Check if user is a member if(! ISSET($user->user)){ ! showLogin(); }else{ --- 35,39 ---- // Check if user is a member if(! ISSET($user->user)){ ! showlogin(); }else{ *************** *** 68,77 **** // Insert data into the database ! mysql_query("INSERT INTO ofirst_projects_groups SET GroupName = '".$_POST['groupname']."', Description = '".$_POST['description']."', Moderators = '$modera', Members = '$mem', ! Dates = '".time()."'") or die(mysql_error()); echo "<br><br>Group created! [ <a href='groups.php'>Groups</a> ]<br><br>"; die(include($footer)); --- 68,77 ---- // Insert data into the database ! ofirst_dbquery("INSERT INTO ofirst_projects_groups SET GroupName = '".$_POST['groupname']."', Description = '".$_POST['description']."', Moderators = '$modera', Members = '$mem', ! Dates = '".time()."'") or die(ofirst_dberror()); echo "<br><br>Group created! [ <a href='groups.php'>Groups</a> ]<br><br>"; die(include($footer)); *************** *** 88,95 **** // Remove data from every table that is related ! mysql_query("DELETE FROM ofirst_projects_groups WHERE ID = '".$_POST['group']."'") or die(mysql_error()); ! mysql_query("DELETE FROM ofirst_projects_notes WHERE GroupID = '".$_POST['group']."'") or die(mysql_error()); ! mysql_query("DELETE FROM ofirst_projects_tasks WHERE GroupID = '".$_POST['group']."'") or die(mysql_error()); ! mysql_query("DELETE FROM ofirst_projects_projects WHERE GroupID = '".$_POST['group']."'") or die(mysql_error()); echo "<br><br>Group removed! [ <a href='groups.php'>Groups</a> ]<br><br>"; --- 88,95 ---- // 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>"; *************** *** 125,130 **** // Query the current group values and loop through them ! $query = mysql_query("SELECT * FROM ofirst_projects_groups"); ! while($groups = mysql_fetch_object($query)){ ?> --- 125,130 ---- // Query the current group values and loop through them ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups"); ! while($groups = ofirst_dbfetch_object($query)){ ?> *************** *** 135,140 **** <td> <?php ! $projquery = mysql_query("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$groups->ID."'"); ! echo mysql_num_rows($projquery); ?> </td> --- 135,140 ---- <td> <?php ! $projquery = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$groups->ID."'"); ! echo ofirst_dbnum_rows($projquery); ?> </td> *************** *** 146,150 **** } ! if(mysql_num_rows($query) == 0){ echo "<tr><td>--</td><td>--</td><td>--</td><td><center>No group has been found!</center></td><td>--</td><td>--</td>"; } --- 146,150 ---- } ! 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>"; } *************** *** 171,176 **** <td><select name="moderators[]" size="6" multiple width='40'> <?php ! $query = mysql_query("SELECT * FROM ofirst_members"); ! while($members = mysql_fetch_object($query)){ echo "<option>".$members->user."</option>"; } --- 171,176 ---- <td><select name="moderators[]" size="6" multiple width='40'> <?php ! $query = ofirst_dbquery("SELECT * FROM ofirst_members ORDER BY user;"); ! while($members = ofirst_dbfetch_object($query)){ echo "<option>".$members->user."</option>"; } *************** *** 183,188 **** <td><select name="members[]" size="6" multiple width='40'> <?php ! $query = mysql_query("SELECT * FROM ofirst_members"); ! while($members = mysql_fetch_object($query)){ echo "<option>".$members->user."</option>"; } --- 183,188 ---- <td><select name="members[]" size="6" multiple width='40'> <?php ! $query = ofirst_dbquery("SELECT * FROM ofirst_members ORDER BY user;"); ! while($members = ofirst_dbfetch_object($query)){ echo "<option>".$members->user."</option>"; } *************** *** 205,211 **** <?php ! $query = mysql_query("SELECT * FROM ofirst_projects_groups"); ! while($groups = mysql_fetch_object($query)){ echo "<option value='".$groups->ID."'>".$groups->GroupName."</option>"; } --- 205,211 ---- <?php ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups ORDER BY GroupName;"); ! while($groups = ofirst_dbfetch_object($query)){ echo "<option value='".$groups->ID."'>".$groups->GroupName."</option>"; } *************** *** 227,229 **** </table> </form> ! <?php } include($footer); ?> \ No newline at end of file --- 227,229 ---- </table> </form> ! <?php } include($footer); ?> Index: index.php =================================================================== RCS file: /cvsroot/openfirst/projects/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** index.php 29 Aug 2003 15:50:35 -0000 1.6 --- index.php 30 Aug 2003 00:04:02 -0000 1.7 *************** *** 39,43 **** Please use the login form below this:</p> <?php ! showLogin(); }else{ echo "<p> </p><p>Welcome ".$user->user.", thank you for loggin in!<br><br>"; --- 39,43 ---- Please use the login form below this:</p> <?php ! showlogin(); }else{ echo "<p> </p><p>Welcome ".$user->user.", thank you for loggin in!<br><br>"; Index: meetings.php =================================================================== RCS file: /cvsroot/openfirst/projects/meetings.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** meetings.php 29 Aug 2003 15:50:35 -0000 1.2 --- meetings.php 30 Aug 2003 00:04:02 -0000 1.3 *************** *** 34,38 **** // Check if user is a member if(! ISSET($user->user)){ ! showLogin(); }else{ --- 34,38 ---- // Check if user is a member if(! ISSET($user->user)){ ! showlogin(); }else{ *************** *** 57,61 **** // Put value into database ! mysql_query("INSERT INTO ofirst_projects_meetings SET ForDate = '".$fordate."', Description = '".$_POST['description']."', --- 57,61 ---- // Put value into database ! ofirst_dbquery("INSERT INTO ofirst_projects_meetings SET ForDate = '".$fordate."', Description = '".$_POST['description']."', *************** *** 63,67 **** AbsentList = 'none', Status = 'wait', ! Dates = '".time()."'") or die(mysql_error()); echo "<br><br>Meeting created! [ <a href='meetings.php'>Meetings</a> ]<br><br>"; die(include($footer)); --- 63,67 ---- AbsentList = 'none', Status = 'wait', ! Dates = '".time()."'") or die(ofirst_dberror()); echo "<br><br>Meeting created! [ <a href='meetings.php'>Meetings</a> ]<br><br>"; die(include($footer)); *************** *** 78,82 **** // Remove meeting information ! mysql_query("DELETE FROM ofirst_projects_meetings WHERE ID = '".$_POST['project']."'") or die(mysql_error()); echo "<br><br>Meetings removed! [ <a href='meetings.php'>Meetings</a> ]<br><br>"; die(include($footer)); --- 78,82 ---- // Remove meeting information ! ofirst_dbquery("DELETE FROM ofirst_projects_meetings WHERE ID = '".$_POST['project']."'") or die(ofirst_dberror()); echo "<br><br>Meetings removed! [ <a href='meetings.php'>Meetings</a> ]<br><br>"; die(include($footer)); *************** *** 101,106 **** // Check for meetings that have not passed yet ! $meetquery = mysql_query("SELECT * FROM ofirst_projects_meetings WHERE Status='wait'"); ! while($meeting = mysql_fetch_object($meetquery)){ ?> --- 101,106 ---- // Check for meetings that have not passed yet ! $meetquery = ofirst_dbquery("SELECT * FROM ofirst_projects_meetings WHERE Status='wait'"); ! while($meeting = ofirst_dbfetch_object($meetquery)){ ?> *************** *** 113,118 **** $assign = explode(",",$meeting->ArrangedFor); foreach($assign as $assign){ ! $query = mysql_query("SELECT * FROM ofirst_projects_groups WHERE ID = '".$assign."'"); ! $group = mysql_fetch_object($query); echo "<br>".$group->GroupName; } --- 113,118 ---- $assign = explode(",",$meeting->ArrangedFor); foreach($assign as $assign){ ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups WHERE ID = '".$assign."'"); ! $group = ofirst_dbfetch_object($query); echo "<br>".$group->GroupName; } *************** *** 125,129 **** // If there are no values then output a no value message ! if(mysql_num_rows($meetquery) == 0){ echo "<tr><td> </td><td> </td><td>There are no planned meetings!</td><td> </td></tr>"; } --- 125,129 ---- // 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>"; } *************** *** 146,151 **** // Check for passed meetings and preview them ! $query = mysql_query("SELECT * FROM ofirst_projects_meetings WHERE Status='done'"); ! while($meeting = mysql_fetch_object($query)){ ?> --- 146,151 ---- // Check for passed meetings and preview them ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_meetings WHERE Status='done'"); ! while($meeting = ofirst_dbfetch_object($query)){ ?> *************** *** 158,163 **** $assign = explode(",",$meeting->ArrangedFor); foreach($assign as $assign){ ! $query = mysql_query("SELECT * FROM ofirst_projects_groups WHERE ID = '".$assign."'"); ! $group = mysql_fetch_object($query); echo $group->GroupName; } --- 158,163 ---- $assign = explode(",",$meeting->ArrangedFor); foreach($assign as $assign){ ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups WHERE ID = '".$assign."'"); ! $group = ofirst_dbfetch_object($query); echo $group->GroupName; } *************** *** 170,174 **** // If there are no values then output a message ! if(mysql_num_rows($query) == 0){ echo "<tr><td> </td><td> </td><td>There are no past meetings!</td><td> </td></tr>"; } --- 170,174 ---- // 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>"; } *************** *** 279,284 **** // Output a list of current groups ! $query = mysql_query("SELECT * FROM ofirst_projects_groups"); ! while($group = mysql_fetch_object($query)){ echo "<option value='".$group->ID."'>".$group->GroupName."</option>"; } --- 279,284 ---- // Output a list of current groups ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups ORDER BY GroupName;"); ! while($group = ofirst_dbfetch_object($query)){ echo "<option value='".$group->ID."'>".$group->GroupName."</option>"; } *************** *** 303,308 **** // Output a list of meetings by date ! $query = mysql_query("SELECT * FROM ofirst_projects_meetings"); ! while($meeting = mysql_fetch_object($query)){ echo "<option value='".$meeting->ID."'>".date("F j, Y h:i a",$meeting->ForDate)."</option>"; } --- 303,308 ---- // Output a list of meetings by date ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_meetings ORDER BY ForDate"); ! while($meeting = ofirst_dbfetch_object($query)){ echo "<option value='".$meeting->ID."'>".date("F j, Y h:i a",$meeting->ForDate)."</option>"; } *************** *** 328,330 **** } include($footer); ! ?> \ No newline at end of file --- 328,330 ---- } include($footer); ! ?> Index: mytask.php =================================================================== RCS file: /cvsroot/openfirst/projects/mytask.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mytask.php 29 Aug 2003 15:50:35 -0000 1.2 --- mytask.php 30 Aug 2003 00:04:02 -0000 1.3 *************** *** 34,38 **** // Check if user is a member if(! ISSET($user->user)){ ! showLogin(); }else{ --- 34,38 ---- // Check if user is a member if(! ISSET($user->user)){ ! showlogin(); }else{ *************** *** 58,63 **** // Run through the current tasks ! $query = mysql_query("SELECT * FROM ofirst_projects_tasks"); ! while($tasks = mysql_fetch_object($query)){ $showtask = false; --- 58,63 ---- // Run through the current tasks ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks"); ! while($tasks = ofirst_dbfetch_object($query)){ $showtask = false; *************** *** 77,82 **** }else{ ! $taskquery = mysql_query("SELECT * FROM ofirst_projects_tasks WHERE ID = '".$tasks->Pend."'"); ! $pendtask = mysql_fetch_object($taskquery); if($pendtask->Completion == 100){ --- 77,82 ---- }else{ ! $taskquery = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE ID = '".$tasks->Pend."'"); ! $pendtask = ofirst_dbfetch_object($taskquery); if($pendtask->Completion == 100){ *************** *** 123,127 **** } ! if(mysql_num_rows($query) == 0){ echo "\n <tr>\n <td> </td>\n <td> </td>\n <td> </td>\n <td>There are no tasks for this project!</td>\n <td> </td>"; } --- 123,127 ---- } ! if(ofirst_dbnum_rows($query) == 0){ echo "\n <tr>\n <td> </td>\n <td> </td>\n <td> </td>\n <td>There are no tasks for this project!</td>\n <td> </td>"; } Index: notes.php =================================================================== RCS file: /cvsroot/openfirst/projects/notes.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** notes.php 29 Aug 2003 15:50:35 -0000 1.5 --- notes.php 30 Aug 2003 00:04:02 -0000 1.6 *************** *** 37,41 **** // Create button process if(ISSET($_POST['create'])){ ! mysql_query("INSERT INTO ofirst_projects_notes SET TaskID = '".$_GET['TaskID']."', GroupID = '".$_GET['GroupID']."', --- 37,41 ---- // Create button process if(ISSET($_POST['create'])){ ! ofirst_dbquery("INSERT INTO ofirst_projects_notes SET TaskID = '".$_GET['TaskID']."', GroupID = '".$_GET['GroupID']."', *************** *** 43,47 **** Description = '".$_POST['description']."', Commiter = '".$user->user."', ! Dates = '".time()."'") or die(mysql_error()); echo "<br><br>Note created! [ <a href='notes.php?GroupID=".$_GET['GroupID']."&ProjectID=".$_GET['ProjectID']."&TaskID=".$_GET['TaskID']."'>Notes</a> ]<br><br>"; --- 43,47 ---- Description = '".$_POST['description']."', Commiter = '".$user->user."', ! Dates = '".time()."'") or die(ofirst_dberror()); echo "<br><br>Note created! [ <a href='notes.php?GroupID=".$_GET['GroupID']."&ProjectID=".$_GET['ProjectID']."&TaskID=".$_GET['TaskID']."'>Notes</a> ]<br><br>"; *************** *** 51,55 **** // Addcompletion button process if(ISSET($_POST['addcompletion'])){ ! mysql_query("INSERT INTO ofirst_projects_notes SET TaskID = '".$_GET['TaskID']."', GroupID = '".$_GET['GroupID']."', --- 51,55 ---- // Addcompletion button process if(ISSET($_POST['addcompletion'])){ ! ofirst_dbquery("INSERT INTO ofirst_projects_notes SET TaskID = '".$_GET['TaskID']."', GroupID = '".$_GET['GroupID']."', *************** *** 57,63 **** Description = '<b>Task completion set to: </b>".$_POST['completion']."%', Commiter = '".$user->user."', ! Dates = '".time()."'") or die(mysql_error()); ! mysql_query("UPDATE ofirst_projects_Tasks SET Completion = '".$_POST['completion']."' WHERE ID = '".$_GET['TaskID']."'") or die(mysql_error()); echo "<br><br>Task completion changed to: ".$_POST['completion']."% [ <a href='notes.php?GroupID=".$_GET['GroupID']."&ProjectID=".$_GET['ProjectID']."&TaskID=".$_GET['TaskID']."'>Notes</a> ]<br><br>"; --- 57,63 ---- Description = '<b>Task completion set to: </b>".$_POST['completion']."%', Commiter = '".$user->user."', ! Dates = '".time()."'") or die(ofirst_dberror()); ! ofirst_dbquery("UPDATE ofirst_projects_Tasks SET Completion = '".$_POST['completion']."' WHERE ID = '".$_GET['TaskID']."'") or die(ofirst_dberror()); echo "<br><br>Task completion changed to: ".$_POST['completion']."% [ <a href='notes.php?GroupID=".$_GET['GroupID']."&ProjectID=".$_GET['ProjectID']."&TaskID=".$_GET['TaskID']."'>Notes</a> ]<br><br>"; *************** *** 66,77 **** // Get information related to these notes ! $query = mysql_query("SELECT * FROM ofirst_projects_groups WHERE ID = '".$_GET['GroupID']."'"); ! $group = mysql_fetch_object($query); ! $query = mysql_query("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."' AND ID = '".$_GET['ProjectID']."'"); ! $project = mysql_fetch_object($query); ! $query = mysql_query("SELECT * FROM ofirst_projects_tasks WHERE GroupID = '".$_GET['GroupID']."' AND ProjectID = '".$_GET['ProjectID']."' AND ID = '".$_GET['TaskID']."'"); ! $task = mysql_fetch_object($query); ?> --- 66,77 ---- // Get information related to these notes ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups WHERE ID = '".$_GET['GroupID']."'"); ! $group = ofirst_dbfetch_object($query); ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."' AND ID = '".$_GET['ProjectID']."'"); ! $project = ofirst_dbfetch_object($query); ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE GroupID = '".$_GET['GroupID']."' AND ProjectID = '".$_GET['ProjectID']."' AND ID = '".$_GET['TaskID']."'"); ! $task = ofirst_dbfetch_object($query); ?> *************** *** 101,106 **** // List the notes ! $query = mysql_query("SELECT * FROM ofirst_projects_notes WHERE GroupID = '".$_GET['GroupID']."' AND ProjectID = '".$_GET['ProjectID']."' AND TaskID = '".$_GET['TaskID']."'"); ! while($notes = mysql_fetch_object($query)){ ?> --- 101,106 ---- // List the notes ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_notes WHERE GroupID = '".$_GET['GroupID']."' AND ProjectID = '".$_GET['ProjectID']."' AND TaskID = '".$_GET['TaskID']."'"); ! while($notes = ofirst_dbfetch_object($query)){ ?> *************** *** 116,120 **** // If no notes are present then display message ! if(mysql_num_rows($query) == 0){ echo "\n <tr>\n <td> </td>\n <td> </td>\n <td>There are no notes for this task!</td>\n <td> </td>\n </tr>\n"; } --- 116,120 ---- // If no notes are present then display message ! if(ofirst_dbnum_rows($query) == 0){ echo "\n <tr>\n <td> </td>\n <td> </td>\n <td>There are no notes for this task!</td>\n <td> </td>\n </tr>\n"; } Index: preferences.php =================================================================== RCS file: /cvsroot/openfirst/projects/preferences.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** preferences.php 29 Aug 2003 15:50:35 -0000 1.5 --- preferences.php 30 Aug 2003 00:04:02 -0000 1.6 *************** *** 34,46 **** // Check if user is a member if(! ISSET($user->user)){ ! showLogin(); }else{ // Save button process if(ISSET($_POST['save'])){ ! mysql_query("UPDATE ofirst_members SET ProjectsUpdates = '".$_POST['updates']."', ProjectsCommitSelect = '".$_POST['select']."', ! ProjectsSendTemplate = '".$_POST['template']."' WHERE user = '".$user->user."'") or die(mysql_error()); echo "<br><br><br>Your account options have been updated! [ <a href='preferences.php'>Preferences</a> ]<br><br><br>"; die(include($footer)); --- 34,46 ---- // Check if user is a member if(! ISSET($user->user)){ ! showlogin(); }else{ // Save button process if(ISSET($_POST['save'])){ ! ofirst_dbquery("UPDATE ofirst_members SET ProjectsUpdates = '".$_POST['updates']."', ProjectsCommitSelect = '".$_POST['select']."', ! ProjectsSendTemplate = '".$_POST['template']."' WHERE user = '".$user->user."'") or die(ofirst_dberror()); echo "<br><br><br>Your account options have been updated! [ <a href='preferences.php'>Preferences</a> ]<br><br><br>"; die(include($footer)); Index: projects.php =================================================================== RCS file: /cvsroot/openfirst/projects/projects.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** projects.php 29 Aug 2003 15:50:35 -0000 1.5 --- projects.php 30 Aug 2003 00:04:02 -0000 1.6 *************** *** 34,38 **** // Check if user is a member if(! ISSET($user->user)){ ! showLogin(); }else{ --- 34,38 ---- // Check if user is a member if(! ISSET($user->user)){ ! showlogin(); }else{ *************** *** 54,58 **** // Create database record ! mysql_query("INSERT INTO ofirst_projects_projects SET ProjectName = '".$_POST['projectname']."', GroupID = '".$_GET['GroupID']."', --- 54,58 ---- // Create database record ! ofirst_dbquery("INSERT INTO ofirst_projects_projects SET ProjectName = '".$_POST['projectname']."', GroupID = '".$_GET['GroupID']."', *************** *** 62,66 **** Assigned = '".$assign."', TarDate = 'date', ! Dates = '".time()."'") or die(mysql_error()); echo "<br><br>Project created! [ <a href='projects.php?GroupID=".$_GET['GroupID']."'>Projects</a> ]<br><br>"; die(include($footer)); --- 62,66 ---- Assigned = '".$assign."', TarDate = 'date', ! Dates = '".time()."'") or die(ofirst_dberror()); echo "<br><br>Project created! [ <a href='projects.php?GroupID=".$_GET['GroupID']."'>Projects</a> ]<br><br>"; die(include($footer)); *************** *** 77,83 **** // Remove all values related to this project ! mysql_query("DELETE FROM ofirst_projects_projects WHERE ID = '".$_POST['project']."'") or die(mysql_error()); ! mysql_query("DELETE FROM ofirst_projects_notes WHERE ProjectID = '".$_POST['project']."'") or die(mysql_error()); ! mysql_query("DELETE FROM ofirst_projects_tasks WHERE ProjectID = '".$_POST['project']."'") or die(mysql_error()); echo "<br><br>Project removed! [ <a href='projects.php?GroupID=".$_GET['GroupID']."'>Projects</a> ]<br><br>"; die(include($footer)); --- 77,83 ---- // Remove all values related to this project ! ofirst_dbquery("DELETE FROM ofirst_projects_projects WHERE ID = '".$_POST['project']."'") or die(ofirst_dberror()); ! ofirst_dbquery("DELETE FROM ofirst_projects_notes WHERE ProjectID = '".$_POST['project']."'") or die(ofirst_dberror()); ! ofirst_dbquery("DELETE FROM ofirst_projects_tasks WHERE ProjectID = '".$_POST['project']."'") or die(ofirst_dberror()); echo "<br><br>Project removed! [ <a href='projects.php?GroupID=".$_GET['GroupID']."'>Projects</a> ]<br><br>"; die(include($footer)); *************** *** 86,91 **** // Collect information about projects ! $query = mysql_query("SELECT * FROM ofirst_projects_groups WHERE ID = '".$_GET['GroupID']."'"); ! $group = mysql_fetch_object($query); ?> --- 86,91 ---- // Collect information about projects ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups WHERE ID = '".$_GET['GroupID']."' ORDER BY GroupName;"); ! $group = ofirst_dbfetch_object($query); ?> *************** *** 114,119 **** // List current projects in database ! $query = mysql_query("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."'"); ! while($projects = mysql_fetch_object($query)){ // If record is not pending then set pend value false --- 114,119 ---- // List current projects in database ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."' ORDER BY GroupName;"); ! while($projects = ofirst_dbfetch_object($query)){ // If record is not pending then set pend value false *************** *** 123,128 **** // If pend value of the pend project is 100 then set as false or else pend is true ! $projquery = mysql_query("SELECT * FROM ofirst_projects_projects WHERE ID = '".$projects->Pend."'"); ! $pendproj = mysql_fetch_object($projquery); if($pendproj->Completion == 100){ --- 123,128 ---- // If pend value of the pend project is 100 then set as false or else pend is true ! $projquery = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE ID = '".$projects->Pend."'"); ! $pendproj = ofirst_dbfetch_object($projquery); if($pendproj->Completion == 100){ *************** *** 176,180 **** // Display no record response ! if(mysql_num_rows($query) == 0){ echo "\n <tr>\n <td> </td>\n <td> </td>\n <td> </td>\n <td>No new projects!</td>\n <td> </td>\n </tr>"; } --- 176,180 ---- // Display no record response ! if(ofirst_dbnum_rows($query) == 0){ echo "\n <tr>\n <td> </td>\n <td> </td>\n <td> </td>\n <td>No new projects!</td>\n <td> </td>\n </tr>"; } *************** *** 216,222 **** <?php ! $query = mysql_query("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."'"); ! while($projects = mysql_fetch_object($query)){ echo "<option value='".$projects->ID."'>".$projects->ProjectName."</option>"; } --- 216,222 ---- <?php ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."'"); ! while($projects = ofirst_dbfetch_object($query)){ echo "<option value='".$projects->ID."'>".$projects->ProjectName."</option>"; } *************** *** 321,326 **** // Display current member list from the assigned values ! $query = mysql_query("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."'"); ! while($projects = mysql_fetch_object($query)){ echo "<option value='".$projects->ID."'>".$projects->ProjectName."</option>"; } --- 321,326 ---- // Display current member list from the assigned values ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."'"); ! while($projects = ofirst_dbfetch_object($query)){ echo "<option value='".$projects->ID."'>".$projects->ProjectName."</option>"; } Index: tasks.php =================================================================== RCS file: /cvsroot/openfirst/projects/tasks.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tasks.php 29 Aug 2003 15:50:35 -0000 1.5 --- tasks.php 30 Aug 2003 00:04:02 -0000 1.6 *************** *** 56,60 **** // Insert record into database ! mysql_query("INSERT INTO ofirst_projects_tasks SET TaskName = '".$_POST['taskname']."', GroupID = '".$_GET['GroupID']."', --- 56,60 ---- // Insert record into database ! ofirst_dbquery("INSERT INTO ofirst_projects_tasks SET TaskName = '".$_POST['taskname']."', GroupID = '".$_GET['GroupID']."', *************** *** 65,69 **** Assigned = '".$assign."', TarDate = '".$strdate."', ! Dates = '".time()."'") or die(mysql_error()); echo "<br><br>Task created! [ <a href='tasks.php?GroupID=".$_GET['GroupID']."&ProjectID=".$_GET['ProjectID']."'>Tasks</a> ]<br><br>"; --- 65,69 ---- Assigned = '".$assign."', TarDate = '".$strdate."', ! Dates = '".time()."'") or die(ofirst_dberror()); echo "<br><br>Task created! [ <a href='tasks.php?GroupID=".$_GET['GroupID']."&ProjectID=".$_GET['ProjectID']."'>Tasks</a> ]<br><br>"; *************** *** 75,79 **** // Update completion value in databaes ! mysql_query("UPDATE ofirst_projects_projects SET Completion = '".$_POST['completion']."' WHERE ID = '".$_GET['ProjectID']."'") or die(mysql_error()); echo "<br><br>Project completion changed to: ".$_POST['completion']."% [ <a href='projects.php?GroupID=".$_GET['GroupID']."'>Notes</a> ]<br><br>"; --- 75,79 ---- // Update completion value in databaes ! ofirst_dbquery("UPDATE ofirst_projects_projects SET Completion = '".$_POST['completion']."' WHERE ID = '".$_GET['ProjectID']."'") or die(ofirst_dberror()); echo "<br><br>Project completion changed to: ".$_POST['completion']."% [ <a href='projects.php?GroupID=".$_GET['GroupID']."'>Notes</a> ]<br><br>"; *************** *** 91,98 **** // Remove every task related value in the database ! mysql_query("DELETE FROM ofirst_projects_tasks WHERE ID = '".$_POST['task']."'") or die(mysql_error()); ! mysql_query("DELETE FROM ofirst_projects_notes WHERE TaskID = '".$_POST['task']."'") or die(mysql_error()); ! mysql_query("DELETE FROM ofirst_projects_tasks WHERE TaskID = '".$_POST['task']."'") or die(mysql_error()); ! mysql_query("DELETE FROM ofirst_projects_projects WHERE TaskID = '".$_POST['task']."'") or die(mysql_error()); echo "<br><br>Task removed! [ <a href='tasks.php?GroupID=".$_GET['GroupID']."&ProjectID=".$_GET['ProjectID']."'>Projects</a> ]<br><br>"; --- 91,98 ---- // 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>"; *************** *** 102,110 **** // Gather information to show the following tasks ! $query = mysql_query("SELECT * FROM ofirst_projects_groups WHERE ID = '".$_GET['GroupID']."'"); ! $group = mysql_fetch_object($query); ! $query = mysql_query("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."' AND ID = '".$_GET['ProjectID']."'"); ! $project = mysql_fetch_object($query); ?> --- 102,110 ---- // Gather information to show the following tasks ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups WHERE ID = '".$_GET['GroupID']."'"); ! $group = ofirst_dbfetch_object($query); ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$_GET['GroupID']."' AND ID = '".$_GET['ProjectID']."' ORDER BY GroupName;"); ! $project = ofirst_dbfetch_object($query); ?> *************** *** 134,139 **** // Run through the current tasks in the database related to this project and group ! $query = mysql_query("SELECT * FROM ofirst_projects_tasks WHERE ProjectID = '".$_GET['ProjectID']."' AND GroupID = '".$_GET['GroupID']."'"); ! while($tasks = mysql_fetch_object($query)){ // If a pend is not set then make value false --- 134,139 ---- // Run through the current tasks in the database related to this project and group ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE ProjectID = '".$_GET['ProjectID']."' AND GroupID = '".$_GET['GroupID']."'"); ! while($tasks = ofirst_dbfetch_object($query)){ // If a pend is not set then make value false *************** *** 143,148 **** // If the value is true then find the value of the task its pending on ! $taskquery = mysql_query("SELECT * FROM ofirst_projects_tasks WHERE ID = '".$tasks->Pend."'"); ! $pendtask = mysql_fetch_object($taskquery); // If the pend task is 100% then dont continue pend value --- 143,148 ---- // If the value is true then find the value of the task its pending on ! $taskquery = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE ID = '".$tasks->Pend."'"); ! $pendtask = ofirst_dbfetch_object($taskquery); // If the pend task is 100% then dont continue pend value *************** *** 202,206 **** // If no values are found then output a response ! if(mysql_num_rows($query) == 0){ echo "\n <tr>\n <td> </td>\n <td> </td>\n <td> </td>\n <td>There are no tasks for this project!</td>\n <td> </td>"; } --- 202,206 ---- // If no values are found then output a response ! if(ofirst_dbnum_rows($query) == 0){ echo "\n <tr>\n <td> </td>\n <td> </td>\n <td> </td>\n <td>There are no tasks for this project!</td>\n <td> </td>"; } *************** *** 242,248 **** <?php ! $query = mysql_query("SELECT * FROM ofirst_projects_tasks WHERE GroupID = '".$_GET['GroupID']."' AND ProjectID = '".$_GET['ProjectID']."'"); ! while($tasks = mysql_fetch_object($query)){ echo "<option value='".$tasks->ID."'>".$tasks->TaskName."</option>"; } --- 242,248 ---- <?php ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE GroupID = '".$_GET['GroupID']."' AND ProjectID = '".$_GET['ProjectID']."'"); ! while($tasks = ofirst_dbfetch_object($query)){ echo "<option value='".$tasks->ID."'>".$tasks->TaskName."</option>"; } *************** *** 342,347 **** // View a list of tasks ! $query = mysql_query("SELECT * FROM ofirst_projects_tasks WHERE GroupID = '".$_GET['GroupID']."' AND ProjectID = '".$_GET['ProjectID']."'"); ! while($tasks = mysql_fetch_object($query)){ echo "<option value='".$tasks->ID."'>".$tasks->TaskName."</option>"; } --- 342,347 ---- // View a list of tasks ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE GroupID = '".$_GET['GroupID']."' AND ProjectID = '".$_GET['ProjectID']."'"); ! while($tasks = ofirst_dbfetch_object($query)){ echo "<option value='".$tasks->ID."'>".$tasks->TaskName."</option>"; } *************** *** 406,408 **** } include($footer); ! ?> \ No newline at end of file --- 406,408 ---- } include($footer); ! ?> Index: today.php =================================================================== RCS file: /cvsroot/openfirst/projects/today.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** today.php 29 Aug 2003 15:50:35 -0000 1.2 --- today.php 30 Aug 2003 00:04:02 -0000 1.3 *************** *** 34,38 **** // Check if user is a member if(! ISSET($user->user)){ ! showLogin(); }else{ --- 34,38 ---- // Check if user is a member if(! ISSET($user->user)){ ! showlogin(); }else{ *************** *** 122,127 **** // Run through the current list of groups to preview there related information ! $groupquery = mysql_query("SELECT * FROM ofirst_projects_groups"); ! while($group = mysql_fetch_object($groupquery)){ ?> --- 122,127 ---- // Run through the current list of groups to preview there related information ! $groupquery = ofirst_dbquery("SELECT * FROM ofirst_projects_groups ORDER BY GroupName;"); ! while($group = ofirst_dbfetch_object($groupquery)){ ?> *************** *** 143,148 **** // Listed the newly added projects for this day ! $projectquery = mysql_query("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$group->ID."'"); ! while($project = mysql_fetch_object($projectquery)){ if($selectdate == date("F j, Y",$project->Dates)){ --- 143,148 ---- // Listed the newly added projects for this day ! $projectquery = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$group->ID."' ORDER BY GroupName"); ! while($project = ofirst_dbfetch_object($projectquery)){ if($selectdate == date("F j, Y",$project->Dates)){ *************** *** 163,171 **** // List the newly added tasks for this day ! $taskquery = mysql_query("SELECT * FROM ofirst_projects_tasks WHERE GroupID = '".$group->ID."'"); ! while($task = mysql_fetch_object($taskquery)){ ! $taskprojquery = mysql_query("SELECT ProjectName FROM ofirst_projects_projects WHERE ID = '".$task->ProjectID."'"); ! $taskproject = mysql_fetch_object($taskprojquery); if($selectdate == date("F j, Y",$task->Dates)){ --- 163,171 ---- // List the newly added tasks for this day ! $taskquery = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE GroupID = '".$group->ID."'"); ! while($task = ofirst_dbfetch_object($taskquery)){ ! $taskprojquery = ofirst_dbquery("SELECT ProjectName FROM ofirst_projects_projects WHERE ID = '".$task->ProjectID."' ORDER BY ProjectName;"); ! $taskproject = ofirst_dbfetch_object($taskprojquery); if($selectdate == date("F j, Y",$task->Dates)){ *************** *** 186,197 **** // List the newly added notes for this day ! $notequery = mysql_query("SELECT * FROM ofirst_projects_notes WHERE GroupID = '".$group->ID."'"); ! while($note = mysql_fetch_object($notequery)){ ! $noteprojquery = mysql_query("SELECT ProjectName FROM ofirst_projects_projects WHERE ID = '".$note->ProjectID."'"); ! $noteproject = mysql_fetch_object($noteprojquery); ! $notetasquery = mysql_query("SELECT * FROM ofirst_projects_tasks WHERE ID = '".$note->TaskID."'"); ! $notetask = mysql_fetch_object($notetasquery); if($selectdate == date("F j, Y",$note->Dates)){ --- 186,197 ---- // List the newly added notes for this day ! $notequery = ofirst_dbquery("SELECT * FROM ofirst_projects_notes WHERE GroupID = '".$group->ID."'"); ! while($note = ofirst_dbfetch_object($notequery)){ ! $noteprojquery = ofirst_dbquery("SELECT ProjectName FROM ofirst_projects_projects WHERE ID = '".$note->ProjectID."'"); ! $noteproject = ofirst_dbfetch_object($noteprojquery); ! $notetasquery = ofirst_dbquery("SELECT * FROM ofirst_projects_tasks WHERE ID = '".$note->TaskID."'"); ! $notetask = ofirst_dbfetch_object($notetasquery); if($selectdate == date("F j, Y",$note->Dates)){ *************** *** 217,219 **** } include($footer); ! ?> \ No newline at end of file --- 217,219 ---- } include($footer); ! ?> Index: viewmeeting.php =================================================================== RCS file: /cvsroot/openfirst/projects/viewmeeting.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** viewmeeting.php 29 Aug 2003 15:50:35 -0000 1.2 --- viewmeeting.php 30 Aug 2003 00:04:02 -0000 1.3 *************** *** 34,38 **** // Check if user is a member if(! ISSET($user->user)){ ! showLogin(); }else{ --- 34,38 ---- // Check if user is a member if(! ISSET($user->user)){ ! showlogin(); }else{ *************** *** 54,61 **** // Update information in the database ! mysql_query("UPDATE ofirst_projects_meetings SET Notes = '".$_POST['notes']."', AbsentList = '$absentlist', ! Status = 'done' WHERE ID = '".$_GET['ID']."'") or die(mysql_error()); echo "<br><br>Meeting updated! [ <a href='meetings.php'>Meetings</a> ]<br><br>"; die(include($footer)); --- 54,61 ---- // Update information in the database ! ofirst_dbquery("UPDATE ofirst_projects_meetings SET Notes = '".$_POST['notes']."', AbsentList = '$absentlist', ! Status = 'done' WHERE ID = '".$_GET['ID']."'") or die(ofirst_dberror()); echo "<br><br>Meeting updated! [ <a href='meetings.php'>Meetings</a> ]<br><br>"; die(include($footer)); *************** *** 63,68 **** // Collect information for the current meeting ! $query = mysql_query("SELECT * FROM ofirst_projects_meetings WHERE ID = '".$_GET['ID']."'"); ! $meeting = mysql_fetch_object($query); ?> --- 63,68 ---- // Collect information for the current meeting ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_meetings WHERE ID = '".$_GET['ID']."'"); ! $meeting = ofirst_dbfetch_object($query); ?> *************** *** 85,90 **** $assign = explode(",",$meeting->ArrangedFor); foreach($assign as $assign){ ! $query = mysql_query("SELECT * FROM ofirst_projects_groups WHERE ID = '".$assign."'"); ! $group = mysql_fetch_object($query); echo "<br>".$group->GroupName; } --- 85,90 ---- $assign = explode(",",$meeting->ArrangedFor); foreach($assign as $assign){ ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups WHERE ID = '".$assign."' ORDER BY GroupName;"); ! $group = ofirst_dbfetch_object($query); echo "<br>".$group->GroupName; } *************** *** 144,149 **** // Run through the groups and find values ! $query = mysql_query("SELECT * FROM ofirst_projects_groups WHERE ID = '".$assign."'"); ! $group = mysql_fetch_object($query); $people = explode(",",$group->Members); --- 144,149 ---- // Run through the groups and find values ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups WHERE ID = '".$assign."'"); ! $group = ofirst_dbfetch_object($query); $people = explode(",",$group->Members); |