<?php $php_root_path = ".."; $privilege_root_path = "/admin"; require_once "includes/include_all_fns.inc"; session_start(); // extract ( $_SESSION , EXTR_REFS ) ; $err_message = " Unable to process your request due to the following problems: <br>\n"; $letterInfo = get_Letter_Info($_POST["letterID"]); if ($_POST["Submit"] == "Reset") { unset($_SESSION["arrUpdateEmails"]); if ($letterInfo->Title == "Paper Acceptance" || $letterInfo->Title == "Paper Rejection") { $url = "Location: mailing_list_by_papers.php?letterID=" . $_POST["letterID"] . "&recipientGroupName=" . $_POST["recipientGroupName"]; } else { $url = "Location: mailing_list.php?letterID=" . $_POST["letterID"] . "&recipientGroupName=" . $_POST["recipientGroupName"]; } header($url); exit; } //Update the session accordingly if ($_POST["to"] || isset($_SESSION["arrUpdateEmails"])) { /* echo "<br>Both post and session.<br>"; echo "<br><br>Session \$arrUpdateEmails Array is <pre>"; print_r($_SESSION["arrUpdateEmails"]); echo "</pre><br>Current Record \$arrCurrentRecords array is <pre>"; print_r($_SESSION["arrCurrentRecords"]); echo "</pre><br>";*/ if (count($_SESSION["arrCurrentRecords"]) > 0) { //Get the array without previous records
//Establish connection with database $db = adodb_connect(&$err_message); //Get the get and session variables if ($_GET["recipientGroupName"]) { $recipientGroupName = $_GET["recipientGroupName"]; } else { $recipientGroupName = $_POST["recipientGroupName"]; } if ($_GET["letterID"]) { $letterID = $_GET["letterID"]; unset($_SESSION["arrCurrentRecords"]); } else { $letterID = $_POST["letterID"]; } //Fetch letter information $letterInfo = get_Letter_Info($letterID); //Retrieve all the email $arrEmails = get_Already_Sent_EmailList($letterID); function limit_view_emails(&$emailSQL, &$sort, &$showing, &$sortStr, $max_view_emails = 5) { //Check the sorting by Title switch ($sort) { case 1: $emailSQL .= " ORDER BY M.MemberName ASC"; $sortStr = "UserName - Ascending"; break; case 2: $emailSQL .= " ORDER BY M.MemberName DESC"; $sortStr = "UserName - Descending"; break; case 3:
authentication($header, $accepted_privilegeID_arr, $accepted_phaseID_arr, $homepage, $php_root_path, $GLOBALS["DB_PREFIX"], &$err_message); //Get the session variable $arrLetterInfo =& $_SESSION["arrLetterInfo"]; if ($_POST["Submit"] == "Back") { unset($_SESSION["arrContent"]); $url = "Location: send_paper_info.php?lettertype=" . $arrLetterInfo["lettertype"]; header($url); exit; } //Get two array from session to process sending $arrEmails = $_SESSION["arrUpdateEmails"]; $arrContent = $_SESSION["arrContent"]; //get the conference info to get the contact mail $conferenceInfo = get_conference_info(); //Get the letter info and its constant $letterInfo = get_Letter_Info($arrLetterInfo["letterID"]); while (list($paperID, $email) = each($arrEmails)) { //Update the mail log $result = updateMailLog($paperID, $arrLetterInfo["letterID"]); //If can log the email if ($result === true) { //Send Email to user //~ $mail = new Mail(); //~ $mail -> Organization($conferenceInfo -> ConferenceCodeName); //~ $mail -> ReplyTo($conferenceInfo -> ConferenceContact); //~ $mail -> From($conferenceInfo -> ConferenceContact); //~ $mail -> To($email); //~ $mail -> Subject(stripslashes($arrLetterInfo["subject"])); //~ $mail -> Body($arrContent[$paperID]); //~ if ($arrLetterInfo["cc"] != "") //~ $mail -> Cc($arrLetterInfo["cc"]);
$url = "Location: " . $arrURL["edit"]; header($url); exit; } //Establish connection with database $db = adodb_connect(); if (!$db) { do_html_header("Database Conntection Fail"); $err_message .= "Could not connect to database server - please try later."; do_html_footer(&$err_message); exit; } //Retrieve the setting information $settingInfo = get_Conference_Settings(); //Fetch letter information $letterInfo = get_Letter_Info($_GET["letterID"]); //Format the content string and Store the content into the session $strContent = stripslashes($letterInfo->BodyContent) . "\n\n"; $strContent .= $settingInfo->EmailSignature . "\n"; //Highlight the dynamic contents $arrConstants = array("\$confname", "\$confcode"); $strSubject = highlight_Dynamic_Values($arrConstants, stripslashes($letterInfo->Subject)); //Get the constant of the letter and highlight the constants $arrConstants = evaluate_Letter_Constants($_GET["lettertype"]); //Highlight the dynamic contents $strContent = highlight_Dynamic_Values($arrConstants, $strContent); do_html_header($letterInfo->Title); ?> <form name="form1" method="post" action="view_each_letter.php"> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr>