this.focus()
| [x] Close |
| Preview Sent Successfully |
| A preview of your newsletter has been sent to " . $PreviewEmail . ". |
| HTML Content | |
| ';
$FORM_ITEMS[$FORM_REQUIRED_ITEM . "HTML Content"]="wysiwyg|HTMLBODY:64:10:".str_replace("|", "|", str_replace(":",'$$COLON$$',stripslashes($Composed["HTMLBody"])));
$FORM_ITEMS[-4]="spacer| [ Insert HTML Custom Field ]"; $FORM_ITEMS[-3]="spacer| "; $FORM_ITEMS[$FORM_NOT_REQUIRED_ITEM . "OR HTML Content from URL"]="textfield|HTMLFile:1000:100:http://"; $HELP_ITEMS["HTMLFile"]["Title"] = "HTML Content from URL"; $HELP_ITEMS["HTMLFile"]["Content"] = "If you have already uploaded your newsletter as a HTML file, enter the URL of the file and it will be downloaded and saved as the content of your newsletter."; $FORM_ITEMS[$FORM_NOT_REQUIRED_ITEM . "OR HTML Content From File"]="file|HTMLContentFile"; $HELP_ITEMS["HTMLContentFile"]["Title"] = "HTML Content from File"; $HELP_ITEMS["HTMLContentFile"]["Content"] = "Select a file from your local hard drive to use as content for this newsletter."; $FORM_ITEMS[-4]="spacer| [ Insert HTML Custom Field ] [ Insert Unsubscribe Link ]"; if($Format == 3) { $FORM_ITEMS[-9]="spacer| [ Extract Text from HTML » ] Note: On some browsers, you may lose line breaks. As a workaround, simply select all the content in the HTML editor (Ctrl A), then copy and paste into the Text editor below.')\" src='" . $ROOTURL . "admin/images/help.gif' width='24' height='16' border='0'>"; } } if($Format == 1 || $Format > 2) { $FORM_ITEMS['-400'] = 'spacer| | |
| Text Content | |
| ';
$FORM_ITEMS[$FORM_REQUIRED_ITEM . "Text Content"]="textarea|TEXTBODY:60:30:".str_replace("|", "|",str_replace(":",'$$COLON$$',stripslashes($Composed["TextBody"])));
$FORM_ITEMS[-8]="spacer| "; $FORM_ITEMS[$FORM_NOT_REQUIRED_ITEM . "OR Text Content from URL"]="textfield|TextFile:1000:100:http://"; $HELP_ITEMS["TextFile"]["Title"] = "Text Content from URL"; $HELP_ITEMS["TextFile"]["Content"] = "If you have already uploaded your newsletter as a text file, enter the URL of the file and it will be downloaded and saved as the content of your newsletter."; $FORM_ITEMS[$FORM_NOT_REQUIRED_ITEM . "OR Text Content from File"]="file|TextContentFile"; $HELP_ITEMS["TextContentFile"]["Title"] = "Text Content from File"; $HELP_ITEMS["TextContentFile"]["Content"] = "Select a file from your local hard drive to use as content for this newsletter."; $FORM_ITEMS[-8]="spacer| [Insert Text Custom Field] [ Insert Unsubscribe Link ] "; } if ($Format == 1) { $OUTPUT .= ' '; } /* $FORM_ITEMS[$FORM_NOT_REQUIRED_ITEM . "Add Attachment"]="raw|Add Attachment"; */ $attachments_query = "SELECT AttachmentID, AttachmentName, AttachmentDescription FROM " . $TABLEPREFIX . "attachments WHERE Status='1'"; if (!isset($CURRENTADMIN['Manager']) || $CURRENTADMIN['Manager'] != 1) $attachments_query .= " AND AdminID='".addslashes($CURRENTADMIN['AdminID']) . "'"; $attachments_query .= " ORDER BY AttachmentDescription"; $attachments = ''; $result = mysql_query($attachments_query); while($temp = mysql_fetch_assoc($result)) { $attachments .= stripslashes($temp['AttachmentID']) . '->'. stripslashes($temp['AttachmentDescription']) . ' (' . stripslashes($temp['AttachmentName']).');'; } if ($attachments != '') { $FORM_ITEMS[$FORM_NOT_REQUIRED_ITEM . "Include Attachments"]="select|AttachmentIDs[]:5:$attachments:".str_replace(':', '~', $Composed['AttachmentIDs']).":multiple"; $HELP_ITEMS["AttachmentIDs"]["Title"] = "Include Attachments?"; $HELP_ITEMS["AttachmentIDs"]["Content"] = "If you would like to put attachments with this email, choose them here. To select more than one, hold down the CTRL key. To unselect one, hold down the CTRL key and click it again."; } $FORM_ITEMS['-100'] = 'spacer| | |
| Preview Newsletter | ||||||||||||||||||||||||
| ';
$FORM_ITEMS[$FORM_NOT_REQUIRED_ITEM . "Email Address"]="textfield|PreviewEmail:100:44::0: ";
$HELP_ITEMS["PreviewEmail"]["Title"] = "Email Address";
$HELP_ITEMS["PreviewEmail"]["Content"] = "If you\'d like to preview this newsletter before it\'s sent out, then enter your email address here, and click on the \'Send Preview\' button below.";
// $FORM_ITEMS[-6]="spacer| ";
$FORM_ITEMS[-1]="submit|Finish:1-compose";
$RandomKey=uniqid("p");
$FORM_ITEMS[-12]="hidden|RandomKey:$RandomKey";
$FORM=new AdminForm;
$FORM->title="EditEmail";
$FORM->items=$FORM_ITEMS;
$FORM->action=MakeAdminLink("compose?Action=EditEmail&Format=$Format&ComposedID=$ComposedID&Save=Yes");
$FORM->MakeForm("Newsletter Content");
$FORM->output = $intro . $FORM->output;
if($SubAction == '')
$OUTPUT.=MakeBox("Create Newsletter (Step 2 of 2)",$FORM->output);
else
$OUTPUT.=MakeBox("Update Newsletter",$FORM->output);
$OUTPUT .= '
';
}
}
if($OrigAction != 'EditEmail')
{
$Total = 0;
$PerPage = 20;
$Pages = 0;
$TO = '';
$ListName = 'All Lists';
if($Action=='')
{
if($CURRENTADMIN['Manager'] == 1)
{
$Total = mysql_result(mysql_query("SELECT COUNT(*) FROM " . $TABLEPREFIX . "composed_emails"), 0, 0);
$templates = mysql_query("SELECT * FROM " . $TABLEPREFIX . "composed_emails ORDER BY EmailName LIMIT ".($OffSet*$PerPage).",$PerPage");
}
else
{
$Total = mysql_result(mysql_query("SELECT COUNT(*) FROM " . $TABLEPREFIX . "composed_emails WHERE AdminID = '" . addslashes($CURRENTADMIN['AdminID']) . "'"), 0, 0);
$templates = mysql_query("SELECT * FROM " . $TABLEPREFIX . "composed_emails WHERE AdminID = '" . addslashes($CURRENTADMIN['AdminID']) . "' ORDER BY EmailName LIMIT ".($OffSet*$PerPage).",$PerPage");
}
if($Total > 0){
$DisplayPage = floor($OffSet / $PerPage);
if($Total <= $PerPage) {
$Pages = 1;
}else{
$Pages = ceil($Total/$PerPage);
}
if($Total > 0)
{
$TO = '
Use the form below to review, edit and send your newsletters. To create a new newsletter, click on the "Create Newsletter" button below.
'; } else { $TO .= 'No newsletters have been created. '; } } $OUTPUT.=MakeBox("Manage Newsletters",$TO); } else { if(AllowSection(11)) { $TO .= 'No newsletters have been created. Click the "Create Newsletter" button to create one. '; } else { $TO .= 'No newsletters have been created. '; } $OUTPUT.=MakeBox("Manage Newsletters",$TO); } } } if($Action == 'Add') { if($CURRENTADMIN['Manager'] == 1) { $templates=mysql_query("SELECT * FROM " . $TABLEPREFIX . "templates ORDER BY TemplateName ASC"); } else { $templates=mysql_query("SELECT * FROM " . $TABLEPREFIX . "templates WHERE AdminID = '" . addslashes($CURRENTADMIN['AdminID']) . "' ORDER BY TemplateName ASC"); } $alltemps = ''; while($temp=mysql_fetch_assoc($templates)) { $alltemps.=stripslashes($temp['TemplateID']).'->'.stripslashes($temp['TemplateName']).';'; } $FORM_ITEMS[$FORM_REQUIRED_ITEM . "Newsletter Name"]="textfield|Name:100:44:"; $HELP_ITEMS["Name"]["Title"] = "Newsletter Name"; $HELP_ITEMS["Name"]["Content"] = "What do you want to call this newsletter? This name will only be used to show you a \'friendly name\' for this newsletter in the control panel."; $FORM_ITEMS[$FORM_REQUIRED_ITEM . "Newsletter Format"]="select|Format:1:1->Text;2->HTML;3->HTML and Text"; $HELP_ITEMS["Format"]["Title"] = "Newsletter Format"; $HELP_ITEMS["Format"]["Content"] = "How will this newsletter be composed and sent? Select HTML if you want to include colored text, images, tables, etc. Choose text to create and send your newsletter in plain-text. Alternatively, you can choose \'Both HTML and Text\' to create 2 versions of your newsletter. Subscribers who can view HTML will see the HTML version. Those that can\'t will see the plain-text version only."; $FORM_ITEMS[$FORM_NOT_REQUIRED_ITEM . "Use Template"]="select|TempID:5:$alltemps::onDblClick=\"showTemplatePreview(this)\""; $HELP_ITEMS["TempID"]["Title"] = "Use Template?"; $HELP_ITEMS["TempID"]["Content"] = "If you have created a template, you can choose to use it from the list below. The content from that template will then be included in your newsletter content on the next page. Double click on a template to preview it."; $FORM_ITEMS[-1]="submit|Next »:1-compose"; $FORM=new AdminForm; $FORM->title="AddTemplate"; $FORM->items=$FORM_ITEMS; $FORM->action=MakeAdminLink("compose?Action=AddEmail"); $FORM->MakeForm("New Newsletter Details"); $FORM->output = "Complete the form below to create a new newsletter. Double click on a template to preview it before continuing. Click on the \"Next\" button to continue." . $FORM->output; $FORM->output .= ' '; $OUTPUT.=MakeBox("Create Newsletter (Step 1 of 2)",$FORM->output); } ?> | ||||||||||||||||||||||||