Includes {@link backend_html} class.

* * @package MaMML * @subpackage backend * @copyright © 2004-2005 Schmalls / Joshua Thompson / All Rights Reserved * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @author Schmalls / Joshua Thompson * @version 0.4.10 * @since 0.4.3 * @link http://www.schmalls.com */ /** * Ensures this file is being included by a parent file */ defined('_VALID_MOS') or die('Direct Access to this location is not allowed.'); /** * Class to display html output for backend * *

Includes a lot of functions used by {@link admin.mamml.php} to output * information.

* * @package MaMML * @subpackage backend * @author Schmalls / Joshua Thompson * @version 0.4.10 * @since 0.4.3 */ class backend_html { /** * Shows the subscribers * *

Creates a list of subscribers and their options and * subscriptions which can be updated. There is also a filter box, * which allows the subscribers to be narrowed. Also there are options * to move between different pages of users, and change the amount of * subscribers on each page.

* * @version 0.4.9 * @since 0.4.3 * @param array $subscribers the subscribers to display * @param array $letters the newsletter information * @param string $action the action to be passed on * @param int $listid the list to work on * @param int $start the subscriber to start on * @param int $limit the total number of subscribers to show * @param int $total the total number of subscribers * @param string $emailsearch the email search filter */ function showSubscribers($subscribers, $letters, $action, $listid, $start, $limit, $total, $showAdmin, $theLetterId, $emailsearch) { ?>

:

id == $theLetterId)) || (!$showAdmin)) { ?> id == $theLetterId)) || (!$showAdmin)) { ?> id; // check whether to show admin option box if ($showAdmin && ($theLetterId == $letterid)) { ?>
  ? ? list_name; ?>
  Subscribe all Unsubscribe all
onClick="checkcid(document.adminForm.elements['cid[]'])" /> onClick="checkcid(document.adminForm.elements['cid[]'])" /> onClick="checkcid(document.adminForm.elements['cid[]'])" />
<<     >> 
  $total) { $through = $total; } else { $through = $start + $limit; } // end if echo _RESULTS . ' ' . ($start + 1) . ' - ' . ($through) . ' of ' . $total; ?>
Creates a form to accept a new unregistered subscriber's * information. Javascript makes sure a name and email address are * entered.

* * @version 0.4.3 * @since 0.4.3 * @param string $action the action to be sent back * @param array $letters the newlsetters to display */ function newSubscriber($action, $letters) { ?>
list_name; ?>
Creates a form button to output the csv export file.

* * @version 0.4.3 * @since 0.4.3 * @param string $action the action to pass on * @param int $listid the list to work on */ function export($action, $listid) { ?>


Creates a form to input the import file location and submit * it.

* * @version 0.4.3 * @since 0.4.3 * @param string $action the action to pass on * @param int $listid the list to work on */ function import($action, $listid) { ?>
The default view for the backend, which displays a list of * images with links to the different admin options.

* * @version 0.4.3 * @since 0.4.3 */ function showMain() { ?>
Newsletter Management
Registered Subscribers
Unregistered Subscribers
Mailing Management
Statistics
Configuration
Update
Online Documentation
Creates a list of the newsletters with radio buttons to select * one of them.

* * @version 0.4.3 * @since 0.4.3 * @param array $letters the newsletter information */ function showLetters($letters, $action) { ?>
#
list_name; ?> sendername; ?>
Creates a form to create or edit a mailing. If it is an html * letter, then the configured wysiwyg editor will be used for html * fields. If we are editing, the fields will be filled with the * current values.

* * @version 0.4.5 * @since 0.4.3 * @param array $letter the letter options */ function showLetterEdit($letter) { // check whether this is a new newsletter if ($letter->id != 0) { $display = _CHANGE; } else { $display = _ENTER; } // end if // check whether it is html if ($letter->html != 0) { $html = true; } else { $html = false; } // end if ?>


:
:  
  list_desc , 'list_desc', 500, 150, '70', '10' ) ; ?>
:
:
:
:
  layout , 'layout', 500, 200, '70', '20' ) ; } else { echo ''; } // end if ?>

  subscribemessage , 'subscribemessage', 500, 200, '70', '20' ) ; } else { echo ''; } // end if ?>

  unsubscribemessage , 'unsubscribemessage', 500, 200, '70', '20' ) ; } else { echo ''; } // end if ?>
  :
html) { echo 'checked="checked"'; } ?> />
  :
hidden != 0 ) { echo 'checked="checked"'; } ?> />
 
auto_add != 0 ) { echo 'checked="checked"'; } ?> />
 
Creates a form to create or edit a mailing. If it is an html * mailing, then the configured wysiwyg editor will be used for html * fields. If we are editing, the fields are filled with their current * values.

* * @version 0.4.9 * @since 0.4.3 * @param Object $letter the mailing information * @param Object $layout the layout and html information * @param int $new tells whether this is a new mailing or not * @param array $contentitems array of content item objects * @param string $action the action that is being performed * @param int $listid the list's id * @global string the filesystem path to the mambo root directory */ function showMailingEdit($letter, $layout, $new, $contentitems, $action, $listid) { global $mosConfig_absolute_path; ?>
:

:

 
:
:
:
:
  \{contentitem:(.{1,5})\|(.{1})}/','', $letter->list_content); $content = preg_replace('/\n\r\{contentitem:(.{1,5})\|(.{1})}/','', $content); $alt_content = preg_replace('/\n\r\{contentitem:(.{1,5})\|(.{1})}/','', $letter->list_textonly); // check if the html editing area should be shown or not if($layout->html != 0){ editorArea( 'editor1', $content , 'content', 750, 450, '100', '30' ); ?>
:
 
:
 
:
 
Creates a form to enter receiver information for a preview * mailing.

* * @version 0.4.9 * @since 0.4.3 * @param int $listid the list to work with * @param string $fromname sender information to pass through * @param string $fromemail sender information to pass through * @param string $frombounce sender information to pass through */ function previewMailing($listid, $fromname, $fromemail, $frombounce){ ?> :

Creates a form ti input change the configuration options.

* * @version 0.4.5 * @since 0.4.3 * @param array $newsletterConfig the configuration options */ function showConfigurationEdit($newsletterConfig) { ?>
 
 
mail.site.com

 
Creates two tabs: one with overall statistics, and the other * with detailed statistics. They can be switched back and forth.

* * @version 0.4.3 * @since 0.4.3 * @param object $letter the letter details * @param object $mailing the mailing details * @param object $globalStats the global statistics for the mailing * @param array $html_read the mailings that are html and have been read * @param array $html_unread the mailings that are html and have not been read * @param array $text the mailings that are text * @param int $listid the list's id */ function showStatistics($letter, $mailing, $globalStats, $html_read, $html_unread, $text, $listid) { ?>
   
:
: list_name; ?>
: list_desc; ?>
 
: send_date; ?>
: list_subject;?>
 
html == 1) { // if so, show html stats ?>
: html_sent; ?>
: html_read; ?>
: text_sent; ?>
 
0) { // if so, show them foreach ($html_read as $htmlread){ echo $htmlread->name . ' (' . $htmlread->email . ')
'; } // end foreach } // end if ?>
0) { // if so, show them foreach ($html_unread as $htmlunread){ echo $htmlunread->name . ' (' . $htmlunread->email . ')
'; } // end foreach } // end if ?>
0) { // if so, show them foreach ($text as $atext){ echo $atext->name . ' (' . $atext->email . ')
'; } // end foreach } // end if ?>
Creates a list of mailings for a newsletter with radio buttons * so that one can be selected.

* * @version 0.4.3 * @since 0.4.3 * @param array $mailings the mailings * @param string $action the action to be performed * @param int $listid the list's id */ function showMailings($mailings, $action, $listid) { ?>
visible == 1) { // if not, set the image to published $img = 'publish_y.png'; } else { // if so, set the image to not published $img = 'publish_x.png'; } // end if ?>
 
send_date; ?> list_subject; ?>
Displays a message's subject, senddate, html content, and text * content.

* * @version 0.4.9 * @since 0.4.3 * @param object $mailing the mailing to show */ function viewArchive($mailing) { ?>
:
list_subject; ?>
:
send_date; ?>
:
list_content; ?>
:
list_textonly); ?>
Creates a list of files that need update, added, and removed.

* * @version 0.4.10 * @since 0.4.3 * @param array $localMammlVersion the local mamml version array * @param array $globalMammlVersion the global mamml version array * @param array $needUpdated array of files which need updated * @param array $needAdded array of files which need added * @param array $needRemoved array of files which need removed * @param string $message the message to display */ function showUpdateOptions($localMammlVersion, $globalMammlVersion, $needUpdated, $needAdded, $needRemoved, $message) { if (!empty($error)) { echo '

' . $message . '

'; } // end if ?>