Thread: [Openfirst-cvscommit] projects groups.php,1.7,1.8 index.php,1.8,1.9 meetings.php,1.4,1.5 mytask.php,
Brought to you by:
xtimg
Update of /cvsroot/openfirst/projects In directory sc8-pr-cvs1:/tmp/cvs-serv20649 Modified Files: groups.php index.php meetings.php mytask.php notes.php preferences.php projects.php tasks.php today.php viewmeeting.php Log Message: Fix whitespace errors Index: groups.php =================================================================== RCS file: /cvsroot/openfirst/projects/groups.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** groups.php 30 Aug 2003 00:17:53 -0000 1.7 --- groups.php 30 Aug 2003 14:42:57 -0000 1.8 *************** *** 32,106 **** include($header); ! // Check if user is a member ! if(! ISSET($user->user)){ ! showlogin(); ! }else{ ! // Create button process ! if(ISSET($_POST['create'])){ ! // Check if any assigned members have been added ! if(! ISSET($_POST['members'])){ ! echo "<br><br>You must assign users to this task! Click back to continue.<br><br><br>"; ! die(include($footer)); } ! // Check if any assigned moderators have been added ! if(! ISSET($_POST['moderators'])){ ! echo "<br><br>You must assign users to this task! Click back to continue.<br><br><br>"; ! die(include($footer)); ! } ! // Check if the value has come as a single value or array then use appropriate value in modera variable ! if(is_array($_POST['moderators'])){ ! $modera = implode(",",$_POST['moderators']); ! }else{ ! $modera = $_POST['moderators']; ! } ! // Check if the value has come as a single value or array then use appropriate value in mem variable ! if(is_array($_POST['members'])){ ! $mem = implode(",",$_POST['members']); ! }else{ ! $mem = $_POST['members']; ! } // 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)); } ! // 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> <table width="540"> ! <tr> ! <td width="0" height="0"> <div align="left"><em>Location:</em> <a href="groups.php"><strong>Groups</strong></a> / </div></td> </tr> --- 32,106 ---- include($header); ! // Check if user is a member ! if(! isset($user->user)){ ! showlogin(); ! } else { ! // Create button process ! if(isset($_POST['create'])){ ! // Check if any assigned members have been added ! if(! isset($_POST['members'])){ ! echo "<br><br>You must assign users to this task! Click back to continue.<br><br><br>"; ! die(include($footer)); } ! // Check if any assigned moderators have been added ! if(! isset($_POST['moderators'])){ ! echo "<br><br>You must assign users to this task! Click back to continue.<br><br><br>"; ! die(include($footer)); ! } ! // Check if the value has come as a single value or array then use appropriate value in modera variable ! if(is_array($_POST['moderators'])){ ! $modera = implode(",",$_POST['moderators']); ! } else { ! $modera = $_POST['moderators']; ! } ! // Check if the value has come as a single value or array then use appropriate value in mem variable ! if(is_array($_POST['members'])){ ! $mem = implode(",",$_POST['members']); ! } else { ! $mem = $_POST['members']; ! } // 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)); } ! // 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> <table width="540"> ! <tr> ! <td width="0" height="0"> <div align="left"><em>Location:</em> <a href="groups.php"><strong>Groups</strong></a> / </div></td> </tr> *************** *** 108,118 **** <br> <table width="100%" border="0" cellspacing="0" cellpadding="6"> ! <tr> ! <th> Groups Listings </th> </table> <table width="100%" bordercolor="#999999"> ! <tr bgcolor="#999999"> <td width="5%"> </td> <td width="20%">Group Name</td> --- 108,118 ---- <br> <table width="100%" border="0" cellspacing="0" cellpadding="6"> ! <tr> ! <th> Groups Listings </th> </table> <table width="100%" bordercolor="#999999"> ! <tr bgcolor="#999999"> <td width="5%"> </td> <td width="20%">Group Name</td> *************** *** 123,127 **** </tr> <?php ! // Query the current group values and loop through them $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups"); --- 123,127 ---- </tr> <?php ! // Query the current group values and loop through them $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups"); *************** *** 129,152 **** ?> ! <tr <?php if(date("F j, Y",time()) == date("F j, Y",$groups->Dates)){ echo "bgColor='#CCCCCC'"; } ?> onMouseOver="this.style.backgroundColor='#cccccc'" onMouseOut="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff"> ! <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><?php echo $groups->GroupName; ?></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> ! <td><?php echo $groups->Moderators; ?></td> <td><?php echo $groups->Members; ?> </td> </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>"; ! } ?> --- 129,152 ---- ?> ! <tr <?php if(date("F j, Y",time()) == date("F j, Y",$groups->Dates)){ echo "bgColor='#CCCCCC'"; } ?> onMouseOver="this.style.backgroundColor='#cccccc'" onMouseOut="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff"> ! <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><?php echo $groups->GroupName; ?></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> ! <td><?php echo $groups->Moderators; ?></td> <td><?php echo $groups->Members; ?> </td> </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>"; ! } ?> *************** *** 155,204 **** <form action='groups.php' method='POST'> <table width="39%"> ! <tr> <th> </th> <th>Add New Group</th> </tr> ! <tr> <td width="19%"><div align="right">Group Name:</div></td> <td width="31%"><input name="groupname" type="text" id="groupname"></td> </tr> ! <tr> <td><div align="right">Description:</div></td> <td><textarea name="description" id="description"></textarea></td> </tr> ! <tr> <td><div align="right">Moderators:</div></td> <td><select name="moderators[]" size="6" multiple="multiple" style="width: 250px;"> <?php ! $query = ofirst_dbquery("SELECT * FROM ofirst_members ORDER BY user;"); ! while($members = ofirst_dbfetch_object($query)){ ! echo "<option>".$members->user."</option>"; ! } ! ?> </select></td> </tr> ! <tr> <td valign="top"> <div align="right">Members:</div></td> <td><select name="members[]" size="6" multiple="multiple" style="width: 250px;"> <?php ! $query = ofirst_dbquery("SELECT * FROM ofirst_members ORDER BY user;"); ! while($members = ofirst_dbfetch_object($query)){ ! echo "<option>".$members->user."</option>"; ! } ! ?> </select> ! </td> </tr> ! <tr> <td> </td> ! <td><input name="create" type="submit" id="create2" value="Create Group"> <input type="reset" name="Reset" value="Reset"> </td> </tr> ! <tr> <th> </th> <th>Remove Group</th> </tr> ! <tr> <td><div align="right">Group Name:</div></td> <td><select name="group" size="1" id="group"> --- 155,204 ---- <form action='groups.php' method='POST'> <table width="39%"> ! <tr> <th> </th> <th>Add New Group</th> </tr> ! <tr> <td width="19%"><div align="right">Group Name:</div></td> <td width="31%"><input name="groupname" type="text" id="groupname"></td> </tr> ! <tr> <td><div align="right">Description:</div></td> <td><textarea name="description" id="description"></textarea></td> </tr> ! <tr> <td><div align="right">Moderators:</div></td> <td><select name="moderators[]" size="6" multiple="multiple" style="width: 250px;"> <?php ! $query = ofirst_dbquery("SELECT * FROM ofirst_members ORDER BY user;"); ! while($members = ofirst_dbfetch_object($query)){ ! echo "<option>".$members->user."</option>"; ! } ! ?> </select></td> </tr> ! <tr> <td valign="top"> <div align="right">Members:</div></td> <td><select name="members[]" size="6" multiple="multiple" style="width: 250px;"> <?php ! $query = ofirst_dbquery("SELECT * FROM ofirst_members ORDER BY user;"); ! while($members = ofirst_dbfetch_object($query)){ ! echo "<option>".$members->user."</option>"; ! } ! ?> </select> ! </td> </tr> ! <tr> <td> </td> ! <td><input name="create" type="submit" id="create2" value="Create Group"> <input type="reset" name="Reset" value="Reset"> </td> </tr> ! <tr> <th> </th> <th>Remove Group</th> </tr> ! <tr> <td><div align="right">Group Name:</div></td> <td><select name="group" size="1" id="group"> *************** *** 208,222 **** while($groups = ofirst_dbfetch_object($query)){ ! echo "<option value='".$groups->ID."'>".$groups->GroupName."</option>"; ! } ! ?> </select></td> </tr> ! <tr> <td><div align="right"> <input name="confirm" type="checkbox" id="confirm" value="checkbox"> </div></td> ! <td>Click here to confirm the removal of this group. Without checking the group will not be removed.</td> </tr> --- 208,222 ---- while($groups = ofirst_dbfetch_object($query)){ ! echo "<option value='".$groups->ID."'>".$groups->GroupName."</option>"; ! } ! ?> </select></td> </tr> ! <tr> <td><div align="right"> <input name="confirm" type="checkbox" id="confirm" value="checkbox"> </div></td> ! <td>Click here to confirm the removal of this group. Without checking the group will not be removed.</td> </tr> *************** *** 227,229 **** </table> </form> ! <?php } include($footer); ?> --- 227,229 ---- </table> </form> ! <?php } include($footer); ?> Index: index.php =================================================================== RCS file: /cvsroot/openfirst/projects/index.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** index.php 30 Aug 2003 00:08:03 -0000 1.8 --- index.php 30 Aug 2003 14:42:57 -0000 1.9 *************** *** 32,47 **** include($header); ! if(! ISSET($user->user)){ ?> <p> </p> ! <p>Welcome to the projects module! Only team members are able to access the projects module.<br> Please use the login form below this:</p> <?php ! showlogin(); ! }else{ echo "<p> </p><p>Welcome ".$user->user.", thank you for logging in!<br><br>"; } include($footer); ! ?> --- 32,47 ---- include($header); ! if(! isset($user->user)){ ?> <p> </p> ! <p>Welcome to the projects module! Only team members are able to access the projects module.<br> Please use the login form below this:</p> <?php ! showlogin(); ! } else { echo "<p> </p><p>Welcome ".$user->user.", thank you for logging in!<br><br>"; } include($footer); ! ?> \ No newline at end of file Index: meetings.php =================================================================== RCS file: /cvsroot/openfirst/projects/meetings.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** meetings.php 30 Aug 2003 00:17:53 -0000 1.4 --- meetings.php 30 Aug 2003 14:42:57 -0000 1.5 *************** *** 31,96 **** $header_condense = true; include($header); ! // Check if user is a member ! if(! ISSET($user->user)){ ! showlogin(); ! }else{ ! // Create button process ! if(ISSET($_POST['create'])){ ! ! // Check if members have been assigned to the meeting ! if(! ISSET($_POST['assign'])){ ! echo "<br><br>You must assign an arranged for field to this meeting! Click back to continue.<br><br><br>"; ! die(include($footer)); ! } // Check if assign is a single value or array then give variable a value if(is_array($_POST['assign'])){ ! $assign = implode(",",$_POST['assign']); ! }else{ ! $assign = $_POST['assign']; ! } // Collect date and combine it $fordate = strtotime($_POST['month']." ".$_POST['day'].",".$_POST['year']." ".$_POST['hour'].":".$_POST['minute']." ".$_POST['ampm']); ! // Put value into database ofirst_dbquery("INSERT INTO ofirst_projects_meetings SET ! ForDate = '".$fordate."', ! Description = '".$_POST['description']."', ! ArrangedFor = '".$assign."', ! 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)); } ! // Remove button process ! if(ISSET($_POST['remove'])){ ! ! // If remove process is confirmed ! if(! ISSET($_POST['confirm'])){ ! echo "<br><br>Your request to remove the project was denied because you have not confirmed! [ <a href='projects.php?GroupID=".$_GET['GroupID']."'>Projects</a> ]<br><br>"; ! die(include($footer)); ! } ! ! // 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)); ! } ! ?> <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 bgcolor="#999999"> <td width="6%"> </td> <td width="21%"><div align="center"><strong>Date</strong></div></td> --- 31,96 ---- $header_condense = true; include($header); ! // Check if user is a member ! if(! isset($user->user)){ ! showlogin(); ! } else { ! // Create button process ! if(isset($_POST['create'])){ ! ! // Check if members have been assigned to the meeting ! if(! isset($_POST['assign'])){ ! echo "<br><br>You must assign an arranged for field to this meeting! Click back to continue.<br><br><br>"; ! die(include($footer)); ! } // Check if assign is a single value or array then give variable a value if(is_array($_POST['assign'])){ ! $assign = implode(",",$_POST['assign']); ! } else { ! $assign = $_POST['assign']; ! } // Collect date and combine it $fordate = strtotime($_POST['month']." ".$_POST['day'].",".$_POST['year']." ".$_POST['hour'].":".$_POST['minute']." ".$_POST['ampm']); ! // Put value into database ofirst_dbquery("INSERT INTO ofirst_projects_meetings SET ! ForDate = '".$fordate."', ! Description = '".$_POST['description']."', ! ArrangedFor = '".$assign."', ! 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)); } ! // Remove button process ! if(isset($_POST['remove'])){ ! ! // If remove process is confirmed ! if(! isset($_POST['confirm'])){ ! echo "<br><br>Your request to remove the project was denied because you have not confirmed! [ <a href='projects.php?GroupID=".$_GET['GroupID']."'>Projects</a> ]<br><br>"; ! die(include($footer)); ! } ! ! // 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)); ! } ! ?> <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 bgcolor="#999999"> <td width="6%"> </td> <td width="21%"><div align="center"><strong>Date</strong></div></td> *************** *** 99,103 **** </tr> <?php ! // Check for meetings that have not passed yet $meetquery = ofirst_dbquery("SELECT * FROM ofirst_projects_meetings WHERE Status='wait'"); --- 99,103 ---- </tr> <?php ! // Check for meetings that have not passed yet $meetquery = ofirst_dbquery("SELECT * FROM ofirst_projects_meetings WHERE Status='wait'"); *************** *** 105,127 **** ?> ! <tr> <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 ! $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; ! } ! ?> ! </td> </tr> <?php } ! // If there are no values then output a no value message if(ofirst_dbnum_rows($meetquery) == 0){ --- 105,127 ---- ?> ! <tr> <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 ! $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; ! } ! ?> ! </td> </tr> <?php } ! // If there are no values then output a no value message if(ofirst_dbnum_rows($meetquery) == 0){ *************** *** 132,148 **** </table> <table width="100%"> ! <tr> <th>Past Meetings</th> </tr> </table> <table width="100%"> ! <tr bgcolor="#999999"> ! <td width="6%"> </td> ! <td width="21%"><div align="center"><strong>Date</strong></div></td> ! <td width="52%"><div align="center"><strong>Description</strong></div></td> ! <td width="21%"><div align="center"><strong>Arranged For</strong></div></td> </tr> <?php ! // Check for passed meetings and preview them $query = ofirst_dbquery("SELECT * FROM ofirst_projects_meetings WHERE Status='done'"); --- 132,148 ---- </table> <table width="100%"> ! <tr> <th>Past Meetings</th> </tr> </table> <table width="100%"> ! <tr bgcolor="#999999"> ! <th width="6%"> </td> ! <th width="21%">Date</th> ! <th width="52%">Description</th> ! <th width="21%">Arranged For</th> </tr> <?php ! // Check for passed meetings and preview them $query = ofirst_dbquery("SELECT * FROM ofirst_projects_meetings WHERE Status='done'"); *************** *** 150,172 **** ?> ! <tr> <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 ! $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; ! } ! ?> ! </td> </tr> <?php } ! // If there are no values then output a message if(ofirst_dbnum_rows($query) == 0){ --- 150,172 ---- ?> ! <tr> <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 ! $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; ! } ! ?> ! </td> </tr> <?php } ! // If there are no values then output a message if(ofirst_dbnum_rows($query) == 0){ *************** *** 179,203 **** <form onsubmit="return dhtmlEditorPrepareSubmit();" action='meetings.php' method='POST'> <table width="64%"> ! <tr> <th width="19%"> </th> <th width="31%">Plan New Meeting</th> </tr> ! <tr> <td valign="top"> <div align="right">Description:</div></td> <td> <?php ! // If the WYSIWYG function is set then use the WYSIWYG module ! if (function_exists("make_wysiwyg")) { ! make_wysiwyg("description",500,255,""); ! }else{ echo "<textarea name='description'></textarea>"; } ?> ! </td> </tr> ! <tr> <td><div align="right">Meeting Date:</div></td> <td><select name="month" id="month"> --- 179,203 ---- <form onsubmit="return dhtmlEditorPrepareSubmit();" action='meetings.php' method='POST'> <table width="64%"> ! <tr> <th width="19%"> </th> <th width="31%">Plan New Meeting</th> </tr> ! <tr> <td valign="top"> <div align="right">Description:</div></td> <td> <?php ! // If the WYSIWYG function is set then use the WYSIWYG module ! if (function_exists("make_wysiwyg")) { ! make_wysiwyg("description",500,255,""); ! } else { echo "<textarea name='description'></textarea>"; } ?> ! </td> </tr> ! <tr> <td><div align="right">Meeting Date:</div></td> <td><select name="month" id="month"> *************** *** 252,260 **** <option>31</option> </select> ! , <select name="year" id="year"> <option selected><?php echo date("Y",time()); ?></option> ! <option>----</option> ! <option>2003</option> <option>2004</option> <option>2005</option> --- 252,260 ---- <option>31</option> </select> ! , <select name="year" id="year"> <option selected><?php echo date("Y",time()); ?></option> ! <option>----</option> ! <option>2003</option> <option>2004</option> <option>2005</option> *************** *** 266,270 **** </select> <input name="hour" type="text" id="hour" size="2"> ! : <input name="minute" type="text" id="minute" size="2"> <select name="ampm" id="ampm"> <option selected>AM</option> --- 266,270 ---- </select> <input name="hour" type="text" id="hour" size="2"> ! : <input name="minute" type="text" id="minute" size="2"> <select name="ampm" id="ampm"> <option selected>AM</option> *************** *** 272,301 **** </select> </td> </tr> ! <tr> <td><div align="right">Arranged For:</div></td> ! <td><p> <select name="assign[]" size="6" multiple="multiple" style="width: 250px;" id="assign"> <?php - - // 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>"; - } ! ?> </select> <font size="2"></font></p></td> </tr> ! <tr> <td> </td> ! <td><input name="create" type="submit" id="create2" value="Create Meeting"> <input type="reset" name="Reset" value="Reset"> </td> </tr> ! <tr> <th> </th> <th>Remove Meeting</th> </tr> ! <tr> <td><div align="right">Meeting Date:</div></td> <td><select name="project" id="project"> --- 272,301 ---- </select> </td> </tr> ! <tr> <td><div align="right">Arranged For:</div></td> ! <td><p> <select name="assign[]" size="6" multiple="multiple" style="width: 250px;" id="assign"> <?php ! // 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>"; ! } ! ! ?> </select> <font size="2"></font></p></td> </tr> ! <tr> <td> </td> ! <td><input name="create" type="submit" id="create2" value="Create Meeting"> <input type="reset" name="Reset" value="Reset"> </td> </tr> ! <tr> <th> </th> <th>Remove Meeting</th> </tr> ! <tr> <td><div align="right">Meeting Date:</div></td> <td><select name="project" id="project"> *************** *** 305,322 **** $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>"; ! } ! ?> </select></td> </tr> ! <tr> ! <td><div align="right"> <input name="confirm" type="checkbox" id="confirm" value="checkbox"> </div></td> ! <td>Click here to confirm the removal of this meeting. Without checking the meeting will not be removed.</td> </tr> ! <tr> <td> </td> <td><input name="remove" type="submit" id="remove" value="Remove"></td> --- 305,322 ---- $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>"; ! } ! ?> </select></td> </tr> ! <tr> ! <td><div align="right"> <input name="confirm" type="checkbox" id="confirm" value="checkbox"> </div></td> ! <td>Click here to confirm the removal of this meeting. Without checking the meeting will not be removed.</td> </tr> ! <tr> <td> </td> <td><input name="remove" type="submit" id="remove" value="Remove"></td> Index: mytask.php =================================================================== RCS file: /cvsroot/openfirst/projects/mytask.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mytask.php 30 Aug 2003 00:04:02 -0000 1.3 --- mytask.php 30 Aug 2003 14:42:57 -0000 1.4 *************** *** 33,119 **** // Check if user is a member ! if(! ISSET($user->user)){ ! showlogin(); ! }else{ ! ?> <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> ! <td bgcolor="#666666"> <div align="center"><font color="#FFFFFF">Your Current ! Tasks </font></div></td> </tr> </table> <table width="100%" bordercolor="#999999"> ! <tr bgcolor="#999999"> ! <td width="4%"> </td> ! <td width="20%">Task Name</td> ! <td width="13%">Target Date</td> ! <td width="33%">Description</td> ! <td width="30%">Assigned</td> </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 onMouseOver="this.style.backgroundColor='#cccccc'" onMouseOut="this.style.backgroundColor='#ffffff'" <?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> --- 33,119 ---- // Check if user is a member ! if(! isset($user->user)){ ! showlogin(); ! } else { ! ?> <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> ! <th>Your Current ! Tasks </th> </tr> </table> <table width="100%" bordercolor="#999999"> ! <tr bgcolor="#999999"> ! <th width="4%"> </th> ! <th width="20%">Task Name</th> ! <th width="13%">Target Date</th> ! <th width="33%">Description</th> ! <th 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 onMouseOver="this.style.backgroundColor='#cccccc'" onMouseOut="this.style.backgroundColor='#ffffff'" <?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> *************** *** 122,130 **** <? } ! 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>"; } ! ?> </table> --- 122,130 ---- <? } ! 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>"; } ! ?> </table> Index: notes.php =================================================================== RCS file: /cvsroot/openfirst/projects/notes.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** notes.php 30 Aug 2003 00:04:02 -0000 1.6 --- notes.php 30 Aug 2003 14:42:57 -0000 1.7 *************** *** 33,85 **** // If the user is logged in ! if(ISSET($user->user)){ ! // Create button process ! if(ISSET($_POST['create'])){ ! ofirst_dbquery("INSERT INTO ofirst_projects_notes SET ! TaskID = '".$_GET['TaskID']."', ! GroupID = '".$_GET['GroupID']."', ! ProjectID = '".$_GET['ProjectID']."', ! 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>"; ! die(include($footer)); ! } ! ! // Addcompletion button process ! if(ISSET($_POST['addcompletion'])){ ! ofirst_dbquery("INSERT INTO ofirst_projects_notes SET ! TaskID = '".$_GET['TaskID']."', ! GroupID = '".$_GET['GroupID']."', ! ProjectID = '".$_GET['ProjectID']."', ! 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>"; ! die(include($footer)); ! } ! ! // 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); ! ?> <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> --- 33,85 ---- // If the user is logged in ! if(isset($user->user)){ ! // Create button process ! if(isset($_POST['create'])){ ! ofirst_dbquery("INSERT INTO ofirst_projects_notes SET ! TaskID = '".$_GET['TaskID']."', ! GroupID = '".$_GET['GroupID']."', ! ProjectID = '".$_GET['ProjectID']."', ! 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>"; ! die(include($footer)); ! } ! // Addcompletion button process ! if(isset($_POST['addcompletion'])){ ! ofirst_dbquery("INSERT INTO ofirst_projects_notes SET ! TaskID = '".$_GET['TaskID']."', ! GroupID = '".$_GET['GroupID']."', ! ProjectID = '".$_GET['ProjectID']."', ! 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>"; ! die(include($footer)); ! } ! // 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); ! ! ?> <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> *************** *** 87,96 **** <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%" bordercolor="#999999"> ! <tr bgcolor="#999999"> <td width="5%"> </td> <td width="17%">Date</td> --- 87,96 ---- <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%" bordercolor="#999999"> ! <tr bgcolor="#999999"> <td width="5%"> </td> <td width="17%">Date</td> *************** *** 100,109 **** <?php ! // 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)){ ?> ! <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> --- 100,109 ---- <?php ! // 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)){ ?> ! <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> *************** *** 113,175 **** </tr> <?php ! } ! ! // 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"; ! } ?> </table> <?php ! // If current user is a member of this task then allow him to add/edit a note ! $allowed = explode(",",$task->Assigned); ! $show = false; ! foreach($allowed as $allow){ ! if($allow == $user->user){ ! $show = true; ! } ! } ! ! if($show){ ?> <br> <form onsubmit="return dhtmlEditorPrepareSubmit();" action='notes.php?GroupID=<?php echo $_GET['GroupID']; ?>&ProjectID=<?php echo $_GET['ProjectID']; ?>&TaskID=<?php echo $_GET['TaskID'];?>' method='POST'> <table width="39%"> ! <tr> <th width="19%"> </th> ! <th width="31%"><div align="center">Add New Note</div></th> </tr> ! <tr> <td valign="top"> <div align="right">Description: </div></td> <td> <?php ! // If the WYSIWYG function is set then display the WYSIWYG box ! if (function_exists("make_wysiwyg")) { ! make_wysiwyg("description",500,255,""); ! }else{ ! echo "<textarea name='description'></textarea>"; ! } ?> ! </td> </tr> ! <tr> <td> </td> ! <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> --- 113,175 ---- </tr> <?php ! } ! ! // 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"; ! } ?> </table> <?php ! // If current user is a member of this task then allow him to add/edit a note ! $allowed = explode(",",$task->Assigned); ! $show = false; ! foreach($allowed as $allow){ ! if($allow == $user->user){ ! $show = true; ! } ! } ! ! if($show){ ?> <br> <form onsubmit="return dhtmlEditorPrepareSubmit();" action='notes.php?GroupID=<?php echo $_GET['GroupID']; ?>&ProjectID=<?php echo $_GET['ProjectID']; ?>&TaskID=<?php echo $_GET['TaskID'];?>' method='POST'> <table width="39%"> ! <tr> <th width="19%"> </th> ! <th width="31%">Add New Note</th> </tr> ! <tr> <td valign="top"> <div align="right">Description: </div></td> <td> <?php ! // If the WYSIWYG function is set then display the WYSIWYG box ! if (function_exists("make_wysiwyg")) { ! make_wysiwyg("description",500,255,""); ! } else { ! echo "<textarea name='description'></textarea>"; ! } ?> ! </td> </tr> ! <tr> <td> </td> ! <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> *************** *** 201,208 **** </table> </form> ! <?php ! } } include($footer); ! ?> \ No newline at end of file --- 201,208 ---- </table> </form> ! <?php ! } } include($footer); ! ?> Index: preferences.php =================================================================== RCS file: /cvsroot/openfirst/projects/preferences.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** preferences.php 30 Aug 2003 00:04:02 -0000 1.6 --- preferences.php 30 Aug 2003 14:42:57 -0000 1.7 *************** *** 31,66 **** $header_condense = true; include($header); ! // 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)); ! } ! ?> <h2><font face="Verdana, Arial, Helvetica, sans-serif">Preferences</font><br> </h2> <form action='preferences.php' method='POST'> <table width="527" align="center"> ! <tr> <th>Update Mailer</th> </tr> ! <tr> <td height="190"> ! <p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Your ! E-Mail Address: <strong><?php if(! ISSET($user->email)){ echo "You must configure your user account in order for this to automatically set."; }else{ echo $user->email; } ?></strong></font></p> ! <p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Would ! you like to be sent daily updates? <select name="updates" id="updates"> ! <option selected><?php echo $user->ProjectsUpdates; ?></option> <option>-----</option> <option value="On">Yes</option> --- 31,66 ---- $header_condense = true; include($header); ! // 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)); ! } ! ! ?> <h2><font face="Verdana, Arial, Helvetica, sans-serif">Preferences</font><br> </h2> <form action='preferences.php' method='POST'> <table width="527" align="center"> ! <tr> <th>Update Mailer</th> </tr> ! <tr> <td height="190"> ! <p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Your ! E-Mail Address: <strong><?php if(! isset($user->email)){ echo "You must configure your user account in order for this to automatically set."; }else{ echo $user->email; } ?></strong></font></p> ! <p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Would ! you like to be sent daily updates? <select name="updates" id="updates"> ! <option selected><?php echo $user->ProjectsUpdates; ?></option> <option>-----</option> <option value="On">Yes</option> *************** *** 68,73 **** </select> </font></p> ! <p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">What ! kind of updates would you like to be sent? <select name="template" id="template"> <option selected><?php echo $user->ProjectsSendTemplate; ?></option> --- 68,73 ---- </select> </font></p> ! <p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">What ! kind of updates would you like to be sent? <select name="template" id="template"> <option selected><?php echo $user->ProjectsSendTemplate; ?></option> *************** *** 77,82 **** </select> </font></p> ! <p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">What ! kind of updates would you like to be sent? <select name="select" id="select"> <option selected><?php echo $user->ProjectsCommitSelect; ?></option> --- 77,82 ---- </select> </font></p> ! <p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">What ! kind of updates would you like to be sent? <select name="select" id="select"> <option selected><?php echo $user->ProjectsCommitSelect; ?></option> *************** *** 86,90 **** </select> </font></p> ! <p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> <input name="save" type="submit" id="save" value="Save Preferences"> <br> --- 86,90 ---- </select> </font></p> ! <p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> <input name="save" type="submit" id="save" value="Save Preferences"> <br> *************** *** 98,100 **** include($footer); ! ?> \ No newline at end of file --- 98,100 ---- include($footer); ! ?> Index: projects.php =================================================================== RCS file: /cvsroot/openfirst/projects/projects.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** projects.php 30 Aug 2003 00:17:53 -0000 1.7 --- projects.php 30 Aug 2003 14:42:57 -0000 1.8 *************** *** 31,97 **** $header_condense = true; include($header); ! // Check if user is a member ! if(! ISSET($user->user)){ ! showlogin(); ! }else{ ! ! // Create project button process ! if(ISSET($_POST['create'])){ ! ! // Check if members are assigned ! if(! ISSET($_POST['assign'])){ ! echo "<br><br>You must assign users to this task! Click back to continue.<br><br><br>"; ! die(include($footer)); ! } ! ! // Check if value is single or array then give it a value for the database insert ! if(is_array($_POST['assign'])){ ! $assign = implode(",",$_POST['assign']); ! }else{ $assign = $_POST['assign']; ! } ! ! // Create database record ! ofirst_dbquery("INSERT INTO ofirst_projects_projects SET ! ProjectName = '".$_POST['projectname']."', ! GroupID = '".$_GET['GroupID']."', ! Completion = '0', ! Pend = '".$_POST['pend']."', ! Description = '".$_POST['description']."', ! 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)); ! } ! ! // Remove button process ! if(ISSET($_POST['remove'])){ ! ! if(! ISSET($_POST['confirm'])){ ! echo "<br><br>Your request to remove the project was denied because you have not confirmed! [ <a href='projects.php?GroupID=".$_GET['GroupID']."'>Projects</a> ]<br><br>"; ! die(include($footer)); ! } ! ! // 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)); ! ! } ! ! // Collect information about projects ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups WHERE ID = '".$_GET['GroupID']."' ORDER BY GroupName;"); ! $group = ofirst_dbfetch_object($query); ! ! ?> <h2>Project Listings</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']; ?>"><strong>Projects</strong></a></div></td> </tr> --- 31,97 ---- $header_condense = true; include($header); ! // Check if user is a member ! if(! isset($user->user)){ ! showlogin(); ! } else { ! ! // Create project button process ! if(isset($_POST['create'])){ ! ! // Check if members are assigned ! if(! isset($_POST['assign'])){ ! echo "<br><br>You must assign users to this task! Click back to continue.<br><br><br>"; ! die(include($footer)); ! } ! ! // Check if value is single or array then give it a value for the database insert ! if(is_array($_POST['assign'])){ ! $assign = implode(",",$_POST['assign']); ! } else { $assign = $_POST['assign']; ! } ! // Create database record ! ofirst_dbquery("INSERT INTO ofirst_projects_projects SET ! ProjectName = '".$_POST['projectname']."', ! GroupID = '".$_GET['GroupID']."', ! Completion = '0', ! Pend = '".$_POST['pend']."', ! Description = '".$_POST['description']."', ! 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)); ! } ! ! ! // Remove button process ! if(isset($_POST['remove'])){ ! ! if(! isset($_POST['confirm'])){ ! echo "<br><br>Your request to remove the project was denied because you have not confirmed! [ <a href='projects.php?GroupID=".$_GET['GroupID']."'>Projects</a> ]<br><br>"; ! die(include($footer)); ! } ! ! // 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)); ! ! } ! ! // Collect information about projects ! $query = ofirst_dbquery("SELECT * FROM ofirst_projects_groups WHERE ID = '".$_GET['GroupID']."' ORDER BY GroupName;"); ! $group = ofirst_dbfetch_object($query); ! ! ?> <h2>Project Listings</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']; ?>"><strong>Projects</strong></a></div></td> </tr> *************** *** 99,108 **** <br> <table width="100%" border="0" cellspacing="0" cellpadding="6"> ! <tr> <th>Project Listings for <?php echo $group->GroupName; ?> Group</th> </tr> </table> <table width="100%" bordercolor="#999999"> ! <tr bgcolor="#999999"> ... [truncated message content] |