$mail->partMessage = $strings["noti_support_team_new2"]; $subject = $mail->partSubject . ": " . $requestDetail->sr_id[0]; $body = $mail->partMessage . ""; $body .= "" . $requestDetail->sr_pro_name[0] . ""; } $body .= "\n\n" . $strings["id"] . " : " . $requestDetail->sr_id[0] . "\n" . $strings["subject"] . " : " . $requestDetail->sr_subject[0] . "\n" . $strings["status"] . " : " . $requestStatus[$requestDetail->sr_status[0]] . "\n" . $strings["details"] . " : "; if ($listTeam->tea_mem_profil[$i] == 3) { $body .= "{$root}/general/login.php?url=projects_site/home.php%3Fproject=" . $requestDetail->sr_project[0] . "\n\n"; } else { $body .= "{$root}/general/login.php?url=support/viewrequest.php%3Fid={$num} \n\n"; } if ($listTeam->tea_mem_email_work[$i] != "") { $mail->Subject = $subject; $mail->Priority = "3"; $mail->Body = $body; $mail->AddAddress($listTeam->tea_mem_email_work[$i], $listTeam->tea_mem_name[$i]); $mail->Send(); $mail->ClearAddresses(); } } } else { $tmpquery = "WHERE mem.id = '1'"; $userDetail = new request(); $userDetail->openMembers($tmpquery); if ($userDetail->mem_email_work[0] != "") { $mail->partSubject = $strings["support"] . " " . $strings["support_id"]; $mail->partMessage = $strings["noti_support_request_new2"]; $subject = $mail->partSubject . ": " . $requestDetail->sr_id[0]; $body = $mail->partMessage . ""; $body .= "" . $requestDetail->sr_subject[0] . ""; $body .= "\n\n" . $strings["id"] . " : " . $requestDetail->sr_id[0] . "\n" . $strings["subject"] . " : " . $requestDetail->sr_subject[0] . "\n" . $strings["status"] . " : " . $requestStatus[$requestDetail->sr_status[0]] . "\n" . $strings["details"] . " : ";
$mail = new notification(); $mail->getUserinfo($idSession, "from"); $mail->partSubject = $strings["noti_prioritytaskchange1"]; $mail->partMessage = $strings["noti_prioritytaskchange2"]; if ($projectNoti->pro_org_id[0] == "1") { $projectNoti->pro_org_name[0] = $strings["none"]; } $complValue = $taskNoti->tas_completion[0] > 0 ? $taskNoti->tas_completion[0] . "0 %" : $taskNoti->tas_completion[0] . " %"; $idStatus = $taskNoti->tas_status[0]; $idPriority = $taskNoti->tas_priority[0]; $body = $mail->partMessage . "\n\n" . $strings["task"] . " : " . $taskNoti->tas_name[0] . "\n" . $strings["start_date"] . " : " . $taskNoti->tas_start_date[0] . "\n" . $strings["due_date"] . " : " . $taskNoti->tas_due_date[0] . "\n" . $strings["completion"] . " : " . $complValue . "\n" . $strings["priority"] . " : {$priority[$idPriority]}\n" . $strings["status"] . " : {$status[$idStatus]}\n" . $strings["description"] . " : " . $taskNoti->tas_description[0] . "\n\n" . $strings["project"] . " : " . $projectNoti->pro_name[0] . " (" . $projectNoti->pro_id[0] . ")\n" . $strings["organization"] . " : " . $projectNoti->pro_org_name[0] . "\n\n" . $strings["noti_moreinfo"] . "\n"; if ($taskNoti->tas_mem_organization[0] == "1") { $body .= "{$root}/general/login.php?url=tasks/viewtask.php%3Fid={$id}"; } else { if ($taskNoti->tas_mem_organization[0] != "1" && $projectNoti->pro_published[0] == "0" && $taskNoti->tas_published[0] == "0") { $body .= "{$root}/general/login.php?url=projects_site/home.php%3Fproject=" . $projectNoti->pro_id[0]; } } $body .= "\n\n" . $mail->footer; $subject = $mail->partSubject . " " . $taskNoti->tas_name[0]; $mail->Subject = $subject; if ($taskNoti->tas_priority[0] == "4" || $taskNoti->tas_priority[0] == "5") { $mail->Priority = "1"; } else { $mail->Priority = "3"; } $mail->Body = $body; $mail->AddAddress($listNotifications->not_mem_email_work[0], $listNotifications->not_mem_name[0]); $mail->Send(); $mail->ClearAddresses(); }
$sql = "SELECT tas.id, tas.name, pro.id, pro.name, tas.priority, tas.status, tas.due_date\r\n FROM " . $tableCollab["tasks"] . " tas, " . $tableCollab["projects"] . " pro\r\n WHERE tas.status IN (2,3) \r\n AND tas.project = pro.id\r\n AND tas.assigned_to = '{$staffid}'\r\n ORDER BY tas.due_date, tas.status"; $rows = mysql_query($sql, $res); while ($row = mysql_fetch_row($rows)) { if ($row[6] < $datenow) { $content .= task_row($row, $late_task_color); } elseif ($row[6] == $datenow) { $content .= task_row($row, $today_task_color); } else { $content .= task_row($row, $normal_task_color); } } $content .= task_footer(); // set up the email object $tasknotice = new notification(); $tasknotice->From = $from_email; $tasknotice->FromName = $from_name; $tasknotice->Subject = $subject_txt; $tasknotice->Body = $content; $tasknotice->AddAddress($email); // $tasknotice->getUserinfo($staffid,"to"); if ($send_html) { $tasknotice->IsHTML("true"); $tasknotice->AltBody = "this message uses html entities, but you prefer plain text !"; } // send the email if (!$tasknotice->Send()) { echo "Message was not sent\n"; echo "Mailer Error: " . $tasknotice->ErrorInfo . "\n\n"; } } @mysql_close($res);
* Copyright (c) 2003 by the NetOffice developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ $mail = new notification(); $mail->getUserinfo($_SESSION['idSession'], "from"); $tmpquery = "WHERE sr.id = '{$id}'"; $requestDetail = new request(); $requestDetail->openSupportRequests($tmpquery); $tmpquery = "WHERE mem.id = '" . $requestDetail->sr_user[0] . "'"; $userDetail = new request(); $userDetail->openMembers($tmpquery); $mail->partSubject = $strings["support"] . " " . $strings["support_id"]; $mail->partMessage = $strings["noti_support_status2"]; $subject = $mail->partSubject . ": " . $requestDetail->sr_id[0]; $body = $mail->partMessage . ""; $body .= "\n\n" . $strings["id"] . " : " . $requestDetail->sr_id[0] . "\n" . $strings["subject"] . " : " . $requestDetail->sr_subject[0] . "\n" . $strings["status"] . " : " . $requestStatus[$requestDetail->sr_status[0]] . "\n" . $strings["details"] . " : "; if ($listTeam->tea_mem_profil[$i] == 3) { $body .= "{$root}/general/login.php?url=projects_site/home.php%3Fproject=" . $requestDetail->sr_project[0] . "\n\n"; } else { $body .= "{$root}/general/login.php?url=support/viewrequest.php%3Fid={$num} \n\n"; } $mail->Subject = $subject; $mail->Priority = "3"; $mail->Body = $body; $mail->AddAddress($userDetail->mem_email_work[0], $userDetail->mem_name[0]); $mail->Send(); $mail->ClearAddresses();
$mail = new notification(); $mail->message_type = "alt"; // Get list of members and notification settings $query = "SELECT {$membersTable}.id, \n {$membersTable}.name,\n {$membersTable}.email_work\n FROM {$membersTable}, {$notificationsTable} \n WHERE {$membersTable}.id = {$notificationsTable}.member\n AND {$notificationsTable}.dailyAlert = 0"; // Gpet result $alert->query($query); // Loop to retrieve all rows while ($alert->fetch()) { // Set member $assignedTo = $row[0]; // Clear all recipients in TO array $mail->ClearAddresses(); // Set email info $mail->FromName = $row[1]; $mail->From = $row[2]; $mail->AddAddress($row[2], $row[1]); $mail->Subject = $strings['daily_alert_subject']; // Set default priority until otherwise notified $mail->Priority = "3"; // Initialize body $body = ''; // Initialize counts $taskCount = 0; $subtaskCount = 0; // See if there are any tasks pending $query = "SELECT {$tasksTable}.id,\n {$tasksTable}.name,\n {$tasksTable}.priority, \n {$tasksTable}.status, \n {$tasksTable}.completion,\n {$tasksTable}.start_date, \n {$tasksTable}.due_date,\n {$tasksTable}.description,\n {$projectsTable}.id, \n {$projectsTable}.name\n FROM {$tasksTable}, {$projectsTable}, {$membersTable}\n WHERE {$tasksTable}.assigned_to = " . $assignedTo . "\n AND {$tasksTable}.status != 1 \n AND {$tasksTable}.due_date = '" . $today . "'\n AND {$tasksTable}.project = {$projectsTable}.id\n AND {$tasksTable}.assigned_to = {$membersTable}.id\n ORDER BY {$tasksTable}.priority"; $alertSub->query($query); // Create email body with link while ($alertSub->fetch()) { // Set task body if ($taskCount == 0) {