Exemplo n.º 1
0
        $result_message = db_get_records($dbh, $table_name, $key_field, $key_value, $sortby = null);
        $table_name = 'user';
        $key_field = 'username';
        $key_value = $_POST['username'];
        if ($key_value != 'reviewer1') {
            $result = db_get_records($dbh, $table_name, $key_field, $key_value, $sortby = null);
            if ($result != null) {
                $to_addr = $result[0]['email'];
                $to_name = $result[0]['firstname'] . ' ' . $result[0]['lastname'];
                $key_value = $_POST['fm_username'];
                $result = db_get_records($dbh, $table_name, $key_field, $key_value, $sortby = null);
                $from_addr = $result[0]['email'];
                $from_name = $result[0]['firstname'] . ' ' . $result[0]['lastname'];
                $cc_addrs = array();
                $subject = 'Message with request ID# ' . $fm_requestid . ' is reassigned to you.';
                $url_str = get_review_url($fm_requestid);
                $body = "Hello " . $to_name . "!\n\n" . "{$from_name} has assigned a T-Reqs email approval request to you, for the email titled " . $result_message[0]['message_name'] . ".\n\n" . "Please use the link below to sign into the T-Reqs website, review the message, and either approve or reject it based on Senate guidelines." . ".\n\n" . "    {$url_str}\n\n\n" . "Please reference the information provided below " . "with technical questions.\n\n" . "Request Details:\n" . "    Request ID: {$fm_requestid}\n" . "    Message Name: " . $result_message[0]['message_name'] . "\n" . "    Site Name: " . $result_message[0]['account_name'] . "\n\n" . "\n\n\n" . "Sincerely,\n\n" . "{$from_name}\n" . "(via " . APP_NAME . ")\n\n";
                send_email_message($from_addr, $from_name, $to_addr, $to_name, $cc_addrs, $subject, $body);
            }
        }
    } else {
        $result = db_get_records($dbh, "request", "uuid", $fm_requestid, $sortby = null);
        db_update_request_status_user($dbh, $fm_requestid, $result[0]['status'], $result[0]['request_notes'], $result[0]['reviewer']);
    }
    include 'display_listrequest.php';
    //AB //show request list
    print_requestid_form();
} else {
    print '<h2>T-Reqs blast e-mail message ID# ' . $fm_requestid . ' to be either reassigned to a different reviewer or to a different status.</h2>';
    print '<h2>To put it back to the queue, just choose Default Reviewer and Awaiting Review otherwise choose a reviewer and Under Review to reassign.</h2>';
    review_re_assign_form($dbh, 'user', 'role', 'REVIEWER', $fm_requestid);
Exemplo n.º 2
0
function send_request_to_reviewer($reqinfo, $senderinfo, $recipinfo)
{
    $revfnm = $recipinfo['firstname'];
    $revlnm = $recipinfo['lastname'];
    $revemail = $recipinfo['email'];
    $user_name = $senderinfo['firstname'] . " " . $senderinfo['lastname'];
    $useremail = $senderinfo['email'];
    $sitename = $senderinfo['sitename'];
    $req_id = $reqinfo['uuid'];
    $msg_name = $reqinfo['message_name'];
    $reqnotes = $reqinfo['request_notes'];
    $reqnotes = empty($reqnotes) ? "N/A" : $reqnotes;
    $cc_emails = array();
    if ($reqinfo['cc_user'] == 1) {
        $cc_emails[] = $useremail;
    }
    if (!empty($reqinfo['cc_email'])) {
        $cc_emails[] = $reqinfo['cc_email'];
    }
    $url_str = get_review_url($req_id);
    $subject = APP_FULLNAME . " E-mail Approval Request [{$req_id}]";
    $body = "Hello " . $revfnm . "!\n\n" . "You have received a request from {$user_name} ({$useremail}) to approve " . "an e-mail message that is queued up for delivery.\n\n" . "Please use the link below to sign into the " . APP_NAME . " website, review the message, " . "and either approve or reject it based on Senate guidelines.\n\n\n" . "    {$url_str}\n\n\n" . "Please reference the information provided below when contacting Senate support staff " . "with technical questions.\n\n" . "Request Details:\n" . "    Request ID: {$req_id}\n" . "    Message Name: {$msg_name}\n" . "    Site Name: {$sitename}\n\n" . "    Notes: {$reqnotes}\n\n" . "Thank you for your attention to this matter.\n\n\n" . "Sincerely,\n\n" . "{$user_name}\n" . "(via " . APP_NAME . ")\n\n";
    return send_email_message($useremail, $user_name, $revemail, $revfnm . " " . $revlnm, $cc_emails, $subject, $body);
}
Exemplo n.º 3
0
function print_send_form($reqinfo)
{
    $req_id = $reqinfo['uuid'];
    $msg_name = $reqinfo['message_name'];
    $url_str = get_review_url($req_id);
    ?>
<h2><?php 
    echo HEADER_REQUEST;
    ?>
 - Send Request</h2>

<form method="post" action="<?php 
    echo REQUEST_SCRIPT;
    ?>
">
<input type="hidden" name="fm_stage" value="start"/>
<input type="hidden" name="fm_requestid" value="<?php 
    echo $req_id;
    ?>
"/>

<p>
Thank you for submitting your request to approve a blast e-mail.
</p>

<p>
Your request ID is <b><?php 
    echo $req_id;
    ?>
</b>
</p>

<p>
Your request to send the message <b><?php 
    echo $msg_name;
    ?>
</b> has been forwarded to an authorized
Senate reviewer via e-mail.
</p>

<p>
If you wish to send the request to another authorized reviewer, you can copy and paste the following link
into an e-mail message and send it to the appropriate reviewer for approval:
</p>

<p>
<a href="<?php 
    echo $url_str;
    ?>
"><?php 
    echo $url_str;
    ?>
</a>
</p>

<input type="submit" value="Start Over"/>
</form>

<?php 
}