예제 #1
0
 * Copyright: dtbaker 2012
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
$search = isset($_REQUEST['search']) && is_array($_REQUEST['search']) ? $_REQUEST['search'] : array();
if (isset($show_draft)) {
    $search['draft'] = 1;
}
if (isset($show_pending)) {
    $search['pending'] = 1;
}
$newsletters = module_newsletter::get_newsletters($search);
$header = array('title' => isset($show_draft) && $show_draft ? _l('Newsletter Drafts (have not been sent yet)') : _l('Newsletters'), 'type' => 'h2', 'main' => true, 'button' => array());
$header['button'] = array('url' => module_newsletter::link_open('new'), 'title' => _l('Add New newsletter'), 'type' => 'add');
print_heading($header);
?>


<form action="" method="post">

<?php 
$search_bar = array('elements' => array('name' => array('title' => _l('Subject:'), 'field' => array('type' => 'text', 'name' => 'search[generic]', 'value' => isset($search['generic']) ? $search['generic'] : '', 'size' => 15))));
echo module_form::search_bar($search_bar);
$table_manager = module_theme::new_table_manager();
$columns = array();
$columns['newsletter_subject'] = array('title' => 'Email Subject', 'callback' => function ($newsletter) {
    echo module_newsletter::link_open($newsletter['newsletter_id'], true, $newsletter);
예제 #2
0
if (isset($load_pages[1]) && $load_pages[1] == 'newsletter_send') {
    array_unshift($links, array("name" => "Send", 'm' => 'newsletter', 'p' => 'newsletter_send', 'order' => $menu_position++, 'menu_include_parent' => 0, 'allow_nesting' => 1));
}
if (isset($load_pages[1]) && $load_pages[1] == 'newsletter_queue') {
    array_unshift($links, array("name" => "Send", 'm' => 'newsletter', 'p' => 'newsletter_queue', 'order' => $menu_position++, 'menu_include_parent' => 1, 'allow_nesting' => 1, 'args' => array('send_id' => (int) $_REQUEST['send_id'])));
}
if (isset($load_pages[1]) && $load_pages[1] == 'newsletter_queue_watch') {
    array_unshift($links, array("name" => "Sending", 'm' => 'newsletter', 'p' => 'newsletter_queue_watch', 'order' => $menu_position++, 'menu_include_parent' => 0, 'allow_nesting' => 1, 'args' => array('send_id' => (int) $_REQUEST['send_id'])));
}
if (isset($load_pages[1]) && $load_pages[1] == 'newsletter_statistics') {
    array_unshift($links, array("name" => "Statistics", 'm' => 'newsletter', 'p' => 'newsletter_statistics', 'order' => $menu_position++, 'menu_include_parent' => 0, 'allow_nesting' => 1, 'args' => array('newsletter_id' => (int) $_REQUEST['newsletter_id'], 'send_id' => (int) $_REQUEST['send_id'])));
}
if (isset($load_pages[1]) && $load_pages[1] == 'newsletter_preview') {
    array_unshift($links, array("name" => "Preview", 'm' => 'newsletter', 'p' => 'newsletter_preview', 'order' => $menu_position++, 'menu_include_parent' => 0, 'allow_nesting' => 1));
}
$past = module_newsletter::get_newsletters();
if (mysql_num_rows($past)) {
    $past_label = _l('Past Newsletters') . '<span class="menu_label">' . mysql_num_rows($past) . '</span>';
} else {
    $past_label = _l('Past Newsletters');
}
array_unshift($links, array("name" => $past_label, 'm' => 'newsletter', 'p' => 'newsletter_list', 'order' => $menu_position++, 'menu_include_parent' => 0, 'allow_nesting' => 1, 'args' => array('newsletter_id' => false)));
/*if(module_newsletter::can_i('view','Newsletter Campaigns')){
    array_unshift($links,array(
        "name"=>"Campaigns",
        'm' => 'newsletter',
        'p' => 'newsletter_campaign',
        'order' => $menu_position++,
        'menu_include_parent' => 1,
        'allow_nesting' => 1,
        'args' => array('newsletter_id'=>false),