[Openfirst-cvscommit] projects updates.php,1.8,1.9
Brought to you by:
xtimg
From: <xt...@us...> - 2003-10-23 20:00:25
|
Update of /cvsroot/openfirst/projects In directory sc8-pr-cvs1:/tmp/cvs-serv26611 Modified Files: updates.php Log Message: Fix indenting issues, replace include() with include_once() where appropriate Index: updates.php =================================================================== RCS file: /cvsroot/openfirst/projects/updates.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** updates.php 14 Oct 2003 00:04:54 -0000 1.8 --- updates.php 23 Oct 2003 13:43:08 -0000 1.9 *************** *** 28,47 **** // Include globals and set header condense (not coded yet) ! include("../config/globals.php"); $mailgroupquery = ofirst_dbquery("SELECT * FROM ofirst_members WHERE ProjectsUpdates = 'On'") or die(mysql_error()); while($mailgroup = ofirst_dbfetch_object($mailgroupquery)){ ! if(! isset($mailgroup->email)){ ! continue; ! } ! if($mailgroup->ProjectsUpdates == "Off"){ ! continue; ! } ! $message = ""; ! $message .= "<html><h2>$title Action Register Updater</h2> <div align='left'>Update Template: ".$mailgroup->ProjectsSendTemplate." | Commit Types: ".$mailgroup->ProjectsCommitSelect."</div> <table width='100%' border='0' cellspacing='0' cellpadding='6'> --- 28,47 ---- // Include globals and set header condense (not coded yet) ! include_once("../config/globals.php"); $mailgroupquery = ofirst_dbquery("SELECT * FROM ofirst_members WHERE ProjectsUpdates = 'On'") or die(mysql_error()); while($mailgroup = ofirst_dbfetch_object($mailgroupquery)){ ! if(! isset($mailgroup->email)){ ! continue; ! } ! if($mailgroup->ProjectsUpdates == "Off"){ ! continue; ! } ! $message = ""; ! $message .= "<html><h2>$title Action Register Updater</h2> <div align='left'>Update Template: ".$mailgroup->ProjectsSendTemplate." | Commit Types: ".$mailgroup->ProjectsCommitSelect."</div> <table width='100%' border='0' cellspacing='0' cellpadding='6'> *************** *** 56,60 **** while($group = ofirst_dbfetch_object($groupquery)){ ! $message .= "<table width='100%' border='0' cellspacing='0' cellpadding='6'> <tr> <td bgcolor='#CCCCCC'> <div align='center'><font color='#000000'><strong>".$group->GroupName."</strong></font> --- 56,60 ---- while($group = ofirst_dbfetch_object($groupquery)){ ! $message .= "<table width='100%' border='0' cellspacing='0' cellpadding='6'> <tr> <td bgcolor='#CCCCCC'> <div align='center'><font color='#000000'><strong>".$group->GroupName."</strong></font> *************** *** 72,82 **** </tr>"; ! // Listed the newly added projects for this day ! $projectquery = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$group->ID."'"); ! while($project = ofirst_dbfetch_object($projectquery)){ ! if(date('F j, Y',time()) == date("F j, Y",$project->Dates)){ ! $message .=" <tr> <td><img src='$home/$basepath/members/icons/actions/project_open.png' width='32' height='32'></td> --- 72,82 ---- </tr>"; ! // Listed the newly added projects for this day ! $projectquery = ofirst_dbquery("SELECT * FROM ofirst_projects_projects WHERE GroupID = '".$group->ID."'"); ! while($project = ofirst_dbfetch_object($projectquery)){ ! if(date('F j, Y',time()) == date("F j, Y",$project->Dates)){ ! $message .=" <tr> <td><img src='$home/$basepath/members/icons/actions/project_open.png' width='32' height='32'></td> *************** *** 91,104 **** } ! // 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."'"); ! $taskproject = ofirst_dbfetch_object($taskprojquery); ! ! if(date('F j, Y',time()) == date("F j, Y",$task->Dates)){ ! $message .= "<tr > <td><img src='$home/$basepath/members/icons/filesystems/desktop.png' width='32' height='32'></td> <td>New Task</td> --- 91,104 ---- } ! // 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."'"); ! $taskproject = ofirst_dbfetch_object($taskprojquery); ! if(date('F j, Y',time()) == date("F j, Y",$task->Dates)){ ! ! $message .= "<tr > <td><img src='$home/$basepath/members/icons/filesystems/desktop.png' width='32' height='32'></td> <td>New Task</td> *************** *** 109,128 **** </tr>"; ! } ! } ! // 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(date('F j, Y',time()) == date('F j, Y',$note->Dates)){ ! $message .= "<tr> <td><img src='$home/$basepath/members/icons/filesystems/files.png' width='32' height='32'></td> <td>New Note Commited</td> --- 109,128 ---- </tr>"; ! } ! } ! // 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(date('F j, Y',time()) == date('F j, Y',$note->Dates)){ ! $message .= "<tr> <td><img src='$home/$basepath/members/icons/filesystems/files.png' width='32' height='32'></td> <td>New Note Commited</td> *************** *** 133,158 **** </tr>"; ! } ! } ! $message .="</table></html>"; ! } ! ! if(function_exists("multipartmail")){ ! multipartmail($mailgroup->email,"$title Daily Update ".date('F j, Y',time()),$message); ! echo "<br> Sent to: $mailgroup->email (multipart)"; ! }else{ ! $headers = "MIME-Version: 1.0\r\n"; ! $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; ! $headers .= "From: $mailfrom\r\n"; ! $headers .= "Reply-To: ".$mailgroup->email."\r\n"; ! $headers .= "X-Priority: 1\r\n"; ! $headers .= "X-MSMail-Priority: High\r\n"; ! mail($mailgroup->email,"$title Daily Update ".date('F j, Y',time()),$message,$headers); ! echo "<br> Sent to: $mailgroup->email (mail)"; } } ! ?> \ No newline at end of file --- 133,158 ---- </tr>"; ! } ! } ! $message .="</table></html>"; ! } ! if(function_exists("multipartmail")){ ! multipartmail($mailgroup->email,"$title Daily Update ".date('F j, Y',time()),$message); ! echo "<br> Sent to: $mailgroup->email (multipart)"; ! } else { ! $headers = "MIME-Version: 1.0\r\n"; ! $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; ! $headers .= "From: $mailfrom\r\n"; ! $headers .= "Reply-To: ".$mailgroup->email."\r\n"; ! $headers .= "X-Priority: 1\r\n"; ! $headers .= "X-MSMail-Priority: High\r\n"; ! ! mail($mailgroup->email,"$title Daily Update ".date('F j, Y',time()),$message,$headers); ! echo "<br> Sent to: $mailgroup->email (mail)"; } } ! ?> |