|
|
'',
'content' => '',
'module' => '');
$nInfo = new objectInfo($parameters);
if (isset($HTTP_GET_VARS['nID'])) {
$form_action = 'update';
$nID = tep_db_prepare_input($HTTP_GET_VARS['nID']);
$newsletter_query = tep_db_query("select title, content, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int)$nID . "'");
$newsletter = tep_db_fetch_array($newsletter_query);
$nInfo->objectInfo($newsletter);
} elseif ($HTTP_POST_VARS) {
$nInfo->objectInfo($HTTP_POST_VARS);
}
$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], '.')));
}
?>
|
|
module); ?> |
|
|
title, '', true); ?> |
|
|
content); ?> |
|
|
' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . ''; ?> |
|
' . tep_image_button('button_back.gif', IMAGE_BACK) . ''; ?> |
content); ?> |
' . tep_image_button('button_back.gif', IMAGE_BACK) . ''; ?> |
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);
?>
show_choose_audience) { echo $module->choose_audience(); } else { echo $module->confirm(); } ?> |
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);
?>
confirm(); ?> |
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);
?>
|
send($nInfo->newsletters_id);
?>
|
|
|
' . tep_image_button('button_back.gif', IMAGE_BACK) . ''; ?> |
|
|
|
|
|
|
newsletters_id) ) {
echo ' ' . "\n";
} else {
echo ' ' . "\n";
}
?>
' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . ' ' . $newsletters['title']; ?> |
|
|
|
0) { echo tep_image(DIR_WS_ICONS . 'locked.gif', ICON_LOCKED); } else { echo tep_image(DIR_WS_ICONS . 'unlocked.gif', ICON_UNLOCKED); } ?> |
newsletters_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ''; } ?> |
display_count($newsletters_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_NEWSLETTERS); ?> |
display_links($newsletters_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?> |
' . tep_image_button('button_new_newsletter.gif', IMAGE_NEW_NEWSLETTER) . ''; ?> |
|
|
'' . $nInfo->title . '');
$contents = array('form' => tep_draw_form('newsletters', FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $nInfo->newsletters_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
$contents[] = array('text' => ' ' . $nInfo->title . '');
$contents[] = array('align' => 'center', 'text' => ' ' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' ' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
default:
if (is_object($nInfo)) {
$heading[] = array('text' => '' . $nInfo->title . '');
if ($nInfo->locked > 0) {
$contents[] = array('align' => 'center', 'text' => '' . tep_image_button('button_edit.gif', IMAGE_EDIT) . ' ' . tep_image_button('button_delete.gif', IMAGE_DELETE) . ' ' . tep_image_button('button_preview.gif', IMAGE_PREVIEW) . ' ' . tep_image_button('button_send.gif', IMAGE_SEND) . ' ' . tep_image_button('button_unlock.gif', IMAGE_UNLOCK) . '');
} else {
$contents[] = array('align' => 'center', 'text' => '' . tep_image_button('button_preview.gif', IMAGE_PREVIEW) . ' ' . tep_image_button('button_lock.gif', IMAGE_LOCK) . '');
}
$contents[] = array('text' => ' ' . TEXT_NEWSLETTER_DATE_ADDED . ' ' . tep_date_short($nInfo->date_added));
if ($nInfo->status == '1') $contents[] = array('text' => TEXT_NEWSLETTER_DATE_SENT . ' ' . tep_date_short($nInfo->date_sent));
}
break;
}
if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
echo ' ' . "\n";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' | ' . "\n";
}
?>
|
|