add(ERROR_NEWSLETTER_TITLE, 'error'); $newsletter_error = true; } if (empty($newsletter_module)) { $messageStack->add(ERROR_NEWSLETTER_MODULE, 'error'); $newsletter_error = true; } if ($newsletter_error == false) { $sql_data_array = array('title' => $title, 'content' => $content, 'content_html' => $content_html, 'module' => $newsletter_module); if ($action == 'insert') { $sql_data_array['date_added'] = 'now()'; $sql_data_array['status'] = '0'; zen_db_perform(TABLE_NEWSLETTERS, $sql_data_array); $newsletter_id = zen_db_insert_id(); } elseif ($action == 'update') { zen_db_perform(TABLE_NEWSLETTERS, $sql_data_array, 'update', "newsletters_id = '" . (int)$newsletter_id . "'"); } zen_redirect(zen_href_link(FILENAME_NEWSLETTERS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'nID=' . $newsletter_id)); } else { $action = 'new'; } break; case 'deleteconfirm': $newsletter_id = zen_db_prepare_input($_GET['nID']); $db->Execute("delete from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int)$newsletter_id . "'"); zen_redirect(zen_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'])); break; case 'delete': case 'new': if (!isset($_GET['nID'])) break; case 'send': // demo active test if (zen_admin_demo()) { $_GET['action']= ''; $messageStack->add_session(ERROR_ADMIN_DEMO, 'caution'); zen_redirect(zen_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'])); } } } if ($_GET['mail_sent_to']) { $messageStack->add(sprintf(NOTICE_EMAIL_SENT_TO, $_GET['mail_sent_to']), 'success'); } ?> > <?php echo TITLE; ?>
'', 'content' => '', 'content_html' => '', 'module' => ''); $nInfo = new objectInfo($parameters); if (isset($_GET['nID'])) { $form_action = 'update'; $nID = zen_db_prepare_input($_GET['nID']); $newsletter = $db->Execute("select title, content, content_html, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int)$nID . "'"); $nInfo->objectInfo($newsletter->fields); } elseif ($_POST) { $nInfo->objectInfo($_POST); } $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.')); $directory_array = array(); if ($dir = dir(DIR_WS_MODULES . 'newsletters/')) { while ($file = $dir->read()) { if (!is_dir(DIR_WS_MODULES . 'newsletters/' . $file)) { if (substr($file, strrpos($file, '.')) == $file_extension) { $directory_array[] = $file; } } } sort($directory_array); $dir->close(); } for ($i=0, $n=sizeof($directory_array); $i<$n; $i++) { $modules_array[] = array('id' => substr($directory_array[$i], 0, strrpos($directory_array[$i], '.')), 'text' => substr($directory_array[$i], 0, strrpos($directory_array[$i], '.'))); } ?> Execute("select title, content, content_html, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int)$nID . "'"); $nInfo = new objectInfo($newsletter->fields); ?> Execute("select title, content, content_html, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int)$nID . "'"); $nInfo = new objectInfo($newsletter->fields); include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/newsletters/' . $nInfo->module . substr($PHP_SELF, strrpos($PHP_SELF, '.'))); include(DIR_WS_MODULES . 'newsletters/' . $nInfo->module . substr($PHP_SELF, strrpos($PHP_SELF, '.'))); $module_name = $nInfo->module; $module = new $module_name($nInfo->title, $nInfo->content, $nInfo->content_html); ?> Execute("select title, content, content_html, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int)$nID . "'"); $nInfo = new objectInfo($newsletter->fields); include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/newsletters/' . $nInfo->module . substr($PHP_SELF, strrpos($PHP_SELF, '.'))); include(DIR_WS_MODULES . 'newsletters/' . $nInfo->module . substr($PHP_SELF, strrpos($PHP_SELF, '.'))); $module_name = $nInfo->module; $module = new $module_name($nInfo->title, $nInfo->content, $nInfo->content_html); ?> Execute("select newsletters_id, title, content, content_html, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int)$nID . "'"); $nInfo = new objectInfo($newsletter->fields); include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/newsletters/' . $nInfo->module . substr($PHP_SELF, strrpos($PHP_SELF, '.'))); include(DIR_WS_MODULES . 'newsletters/' . $nInfo->module . substr($PHP_SELF, strrpos($PHP_SELF, '.'))); $module_name = $nInfo->module; $module = new $module_name($nInfo->title, $nInfo->content, $nInfo->content_html, $_POST['audience_selected']); ?>
'; } ?>
module); ?>
title, 'size="50"', true); ?>
Value = $nInfo->content_html ; $oFCKeditor->Width = '97%' ; $oFCKeditor->Height = '350' ; // $oFCKeditor->Create() ; $output = $oFCKeditor->CreateHtml() ; echo $output; } else { // using HTMLAREA or just raw "source" echo zen_draw_textarea_field('message_html', 'soft', '100%', '30', $nInfo->content_html,'id="message_html" class="editorHook"'); } ?>
content, 'class="noEditor"'); ?>
' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . ''; ?>
' . zen_image_button('button_back.gif', IMAGE_BACK) . ''; ?>


content_html); ?>


content); ?>
' . zen_image_button('button_back.gif', IMAGE_BACK) . ''; ?>
show_choose_audience) { echo $module->choose_audience(); } else { echo $module->confirm(); } ?>
confirm(); ?>
send($nInfo->newsletters_id); ?>

' . zen_image_button('button_back.gif', IMAGE_BACK) . ''; ?>
'' . $nInfo->title . ''); $contents = array('form' => zen_draw_form('newsletters', FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '
' . $nInfo->title . ''); $contents[] = array('align' => 'center', 'text' => '
' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' ' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . ''); break; default: if (is_object($nInfo)) { $heading[] = array('text' => '' . $nInfo->title . ''); $contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '' . zen_image_button('button_preview.gif', IMAGE_PREVIEW) . '' . zen_image_button('button_send.gif', IMAGE_SEND) . ''); $contents[] = array('text' => '
' . TEXT_NEWSLETTER_DATE_ADDED . ' ' . zen_date_short($nInfo->date_added)); if ($nInfo->status == '1') $contents[] = array('text' => TEXT_NEWSLETTER_DATE_SENT . ' ' . zen_date_short($nInfo->date_sent)); } break; } if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) { echo ' ' . "\n"; } ?>
Execute($newsletters_query_raw); while (!$newsletters->EOF) { if ((!isset($_GET['nID']) || (isset($_GET['nID']) && ($_GET['nID'] == $newsletters->fields['newsletters_id']))) && !isset($nInfo) && (substr($action, 0, 3) != 'new')) { $nInfo = new objectInfo($newsletters->fields); } if (isset($nInfo) && is_object($nInfo) && ($newsletters->fields['newsletters_id'] == $nInfo->newsletters_id) ) { echo ' ' . "\n"; } else { echo ' ' . "\n"; } ?> MoveNext(); } ?>
 
fields['newsletters_id'] . '&action=preview') . '">' . zen_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . ' ' . $newsletters->fields['title']; ?> fields['content_length']+$newsletters->fields['content_html_length']) . ' bytes'; ?> fields['module']; ?> fields['status'] == '1') { echo zen_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK); } else { echo zen_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS); } ?>   fields['newsletters_id'] == $nInfo->newsletters_id) ) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ''; } ?> 
display_count($newsletters_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_NEWSLETTERS); ?> display_links($newsletters_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?>
' . zen_image_button('button_new_newsletter.gif', IMAGE_NEW_NEWSLETTER) . ''; ?>
' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo '