//check for the templates plugin //if a template id is given then process it $template_id = isset($_REQUEST['template_id']) ? $_REQUEST['template_id'] : 0; $contact_id = isset($_REQUEST['contact_id']) ? $_REQUEST['contact_id'] : 0; if ($mailing_group_id > 0 && $tp->get_contacts_from_mailing_group($mailing_group_id) == 0 && $tp->get_companies_from_mailing_group($mailing_group_id) == 0) { require $GO_THEME->theme_path . "header.inc"; $tabtable = new tabtable('templates_tab', $ml_attention, '600', '120'); $tabtable->print_head(); echo '<p>' . $ml_no_contacts_in_mailing_group . '</p><br />'; $button = new button($cmdClose, "javascript:window.close();"); $tabtable->print_foot(); require $GO_THEME->theme_path . "footer.inc"; exit; } if ($tp_plugin) { $template_count = $tp->get_subscribed_templates($GO_SECURITY->user_id, EMAIL_TEMPLATE); } if ($_SERVER['REQUEST_METHOD'] != "POST" && $tp_plugin && $template_id == 0 && $template_count > 0) { require $GO_THEME->theme_path . "header.inc"; echo '<form name="sendform" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; if ($uid > 0) { echo '<input type="hidden" name="account_id" value="' . $_REQUEST['account_id'] . '" />'; echo '<input type="hidden" name="uid" value="' . $uid . '" />'; echo '<input type="hidden" name="mailbox" value="' . $_REQUEST['mailbox'] . '" />'; echo '<input type="hidden" name="action" value="' . $_REQUEST['action'] . '" />'; } echo '<input type="hidden" name="mail_subject" value="' . $mail_subject . '" />'; echo '<input type="hidden" name="mail_body" value="' . smartstrip($mail_body, true) . '" />'; echo '<input type="hidden" name="mail_to" value="' . $mail_to . '" />'; echo '<input type="hidden" name="mail_cc" value="' . $mail_cc . '" />'; echo '<input type="hidden" name="mail_bcc" value="' . $mail_bcc . '" />';