Beispiel #1
0
function print_message_review_form($bapi, $session_id, $reqinfo)
{
    $req_id = $reqinfo['uuid'];
    $account_id = $reqinfo['account_id'];
    $msg_id = $reqinfo['message_id'];
    $list_ids = $reqinfo['list_ids'];
    $seg_ids = $reqinfo['seg_ids'];
    $from_addr = $reqinfo['from_addr'];
    $from_name = $reqinfo['from_name'];
    $reply_addr = $reqinfo['reply_addr'];
    $delivery_date = $reqinfo['delivery_date'];
    $message = get_message($bapi, $msg_id, true, true);
    //error_log($bapi->__getLastResponse(), 3, REQUEST_DIR."/soap_response");
    $msg_name = $message->name;
    $msg_contents = $message->content;
    $msg_preview_url = $message->preview_url;
    ?>
<h2><?php 
    echo HEADER_REVIEW;
    ?>
 - Message Display and Approval</h2>

<iframe id="message_preview" src="<?php 
    echo $msg_preview_url;
    ?>
"></iframe>

<?php 
    $msg_preview_url = urlencode($msg_preview_url);
    print '<a href="#" onclick="open_win(\'' . $msg_preview_url . '\')">Click here to see all the links in the message</a>';
    print '<br />';
    ?>

<form method="post" action="<?php 
    echo REVIEW_SCRIPT;
    ?>
">
<input type="hidden" name="fm_stage" value="reviewed"/>
<input type="hidden" name="fm_substage" value="<?php 
    echo VERIFY_TYPE_APPROVE;
    ?>
"/>
<input type="hidden" name="fm_sessionid" value="<?php 
    echo $session_id;
    ?>
"/>
<input type="hidden" name="fm_requestid" value="<?php 
    echo $req_id;
    ?>
"/>
<input type="hidden" name="fm_msgid" value="<?php 
    echo $msg_id;
    ?>
"/>

<p>
Please review the message itself on the right, and the message information below.  Then select Approve to send
the message out to the intended recipient(s), or Reject to defer sending.
</p>

<p>
Message Name: <b><?php 
    echo $msg_name;
    ?>
</b>
</p>

<?php 
    /****
      foreach ($msg_contents as $msg_content) {
        $msg_type = $msg_content->type;
        $msg_subject = $msg_content->subject;
        $msg_data = $msg_content->content;
    
        echo("<div class=\"message_metadata\">\n".
             "<p>Message as <i>$msg_type</i>, with Subject ".
             "[<b>$msg_subject</b>]</p>\n".
             "</div>\n".
             "<div class=\"message\">\n$msg_data\n</div>\n");
        //error_log($msg_data, 3, REQUEST_DIR."/error_log");
      }
      ****/
    print_nonmessage_info($bapi, $list_ids, $seg_ids, $delivery_date, $from_addr, $from_name, $reply_addr);
    include './include/display_onbehalfof.php';
    //ab
    ?>

  <input type="button" value="Approve" onClick="document.forms[0].fm_substage.value='<?php 
    echo VERIFY_TYPE_APPROVE;
    ?>
'; submit()"/>
  &nbsp;&nbsp;
  <input type="button" value="Reject" onClick="document.forms[0].fm_substage.value='<?php 
    echo VERIFY_TYPE_REJECT;
    ?>
'; submit()"/>
  &nbsp;&nbsp;
  <input type="button" value="Cancel" onClick="window.location='<?php 
    echo REVIEW_SCRIPT;
    ?>
'"/>
  &nbsp;&nbsp;
  <input type="button" value="ReAssign" onClick="document.forms[0].fm_stage.value='reassign'; submit()"/>
</form>

<div style="clear:both"></div>
<?php 
}
Beispiel #2
0
function print_confirm_form($bapi, $session_id, $msg_id, $list_ids, $seg_ids, $year, $month, $day, $from_addr, $from_name, $reply_addr, $is_ccuser, $user_email, $cc_email)
{
    // Use API to retrieve messages, lists, and segments for client.
    if (!$bapi) {
        return false;
    }
    if (empty($list_ids)) {
        $list_ids = array();
    }
    if (empty($seg_ids)) {
        $seg_ids = array();
    }
    /**** no need to store CC address in cookie any longer, since the user's e-mail address is now stored in the DB.
      if ($cc_email == null && !empty($_COOKIE['email'])) {
        $cc_email = $_COOKIE['email'];
      }
      *****/
    $list_ids_str = implode(",", $list_ids);
    $seg_ids_str = implode(",", $seg_ids);
    $msg_name = get_message_name($bapi, $msg_id);
    $msg_preview = get_message_preview($bapi, $msg_id);
    ?>
<h2><?php 
    echo HEADER_REQUEST;
    ?>
 - Confirmation</h2>

<iframe id="message_preview" src="<?php 
    echo $msg_preview;
    ?>
"></iframe>

<form method="post" action="<?php 
    echo REQUEST_SCRIPT;
    ?>
">
<input type="hidden" name="fm_stage" value="confirm"/>
<input type="hidden" name="fm_sessionid" value="<?php 
    echo $session_id;
    ?>
"/>
<input type="hidden" name="fm_msgid" value="<?php 
    echo $msg_id;
    ?>
"/>
<?php 
    foreach ($list_ids as $id) {
        echo "<input type=\"hidden\" name=\"fm_listids[]\" value=\"{$id}\"/>\n";
    }
    foreach ($seg_ids as $id) {
        echo "<input type=\"hidden\" name=\"fm_segids[]\" value=\"{$id}\"/>\n";
    }
    ?>
<!-- old way was comma-separated list
<input type="hidden" name="fm_listids[]" value="<?php 
    echo $list_ids_str;
    ?>
"/>
<input type="hidden" name="fm_segids[]" value="<?php 
    echo $seg_ids_str;
    ?>
"/>
-->
<input type="hidden" name="fm_year" value="<?php 
    echo $year;
    ?>
"/>
<input type="hidden" name="fm_month" value="<?php 
    echo $month;
    ?>
"/>
<input type="hidden" name="fm_day" value="<?php 
    echo $day;
    ?>
"/>
<input type="hidden" name="fm_fromaddr" value="<?php 
    echo $from_addr;
    ?>
"/>
<input type="hidden" name="fm_fromname" value="<?php 
    echo $from_name;
    ?>
"/>
<input type="hidden" name="fm_replyaddr" value="<?php 
    echo $reply_addr;
    ?>
"/>

<p>
Message to be approved:
</p>

<p>
<b><?php 
    echo $msg_name;
    ?>
</b>
</p>


<?php 
    print_nonmessage_info($bapi, $list_ids, $seg_ids, "{$year}-{$month}-{$day}", $from_addr, $from_name, $reply_addr);
    $chk_flag = $is_ccuser == true ? "checked" : "";
    ?>

<p>
<input type="checkbox" name="fm_iscc" value="1" <?php 
    echo $chk_flag;
    ?>
/>
Send copy of request e-mail to me (<?php 
    echo $user_email;
    ?>
)
</p>
<p>
Send an (optional) additional copy to the address below:
<br/><input type="text" size="40" name="fm_ccemail" value="<?php 
    echo $cc_email;
    ?>
"/>
</p>

<input type="submit" value="Verify Content"/>
&nbsp;&nbsp;
<input type="button" value="Go Back" onclick="history.go(-1)"/>
</form>
<div style="clear:both"></div>


<?php 
}