Exemple #1
0
            break;
    }
    //Limit the records according to max_view_emails
    $emailSQL .= " LIMIT " . $showing . "," . $max_view_emails;
    return $emailSQL;
}
//end of function
if ($_POST["showing"]) {
    $_GET["showing "] = $_POST["showing"];
}
if ($_POST["sort"]) {
    $_GET["sort"] = $_POST["sort"];
}
//Call function to evaluate showing
$_GET["showing"] = evaluate_showing($_GET["showing"]);
$emailSQL = get_Recipient_Group_SQL($recipientGroupName);
$emailResult = $db->Execute($emailSQL);
$num_rows = $emailResult->RecordCount();
$emailSQL = limit_view_emails($emailSQL, $_GET["sort"], $_GET["showing"], $sortStr, MAX_EMAILS);
//echo $emailSQL;
$emailResult = $db->Execute($emailSQL);
if (!$emailResult) {
    echo "Could not retrieve user email information - try again";
    exit;
}
$limit_rows = $emailResult->RecordCount();
//Update the session accordingly
if ($_POST["to"] || isset($_SESSION["arrUpdateEmails"])) {
    /*
    		echo "<br>Both post and session.<br>";
    		
            $emailSQL .= " ORDER BY PP.PaperID ASC";
            $sortStr = "PaperID - Ascending";
            break;
    }
    //Limit the records according to max_view_emails
    $emailSQL .= " LIMIT " . $showing . "," . $max_view_emails;
    return $emailSQL;
}
//end of function
//if($_POST["showing"])
//	$_GET["showing "] = $_POST["showing"];
//if($_POST["sort"])
//	$_GET["sort"] = $_POST["sort"];
//Call function to evaluate showing
$_GET["showing"] = evaluate_showing($_GET["showing"]);
$emailSQL = get_Recipient_Group_SQL($letterInfo->RecipientGroupName);
//echo "<br><br>".$emailSQL."<br>";
$emailResult = $db->Execute($emailSQL);
$num_rows = $emailResult->RecordCount();
$emailSQL = limit_view_emails($emailSQL, $_GET["sort"], $_GET["showing"], $sortStr, MAX_EMAILS);
// echo $emailSQL;
$emailResult = $db->Execute($emailSQL);
if (!$emailResult) {
    echo "Could not retrieve user email information - try again";
    exit;
}
$limit_rows = $emailResult->RecordCount();
//Update the session accordingly
if ($_POST["to"] || isset($_SESSION["arrUpdateEmails"])) {
    /*
    		echo "<br>Both post and session.<br>";