Beispiel #1
0
            print Info($GLOBALS['I18N']->get('Removed Attachment '));
        }
    }
}
##############################
# Stacked attributes, processing and calculation
##############################
## moved to plugin
##############################
# Stacked attributes, end
##############################
echo $errormsg;
if (!$done) {
    #$baseurl = sprintf('./?page=%s&id=%d',$_GET["page"],$id);
    if ($id) {
        $tabs = new WebblerTabs();
        $tabbaseurl = preg_replace('/&tab=[^&]+/', '', $baseurl);
        $tabs->addTab(s('Content'), $tabbaseurl . '&tab=Content');
        $counttabs = 1;
        if (USE_MANUAL_TEXT_PART) {
            $tabs->addTab(s('Text'), $tabbaseurl . '&tab=Text');
            ++$counttabs;
        }
        if (FORWARD_ALTERNATIVE_CONTENT) {
            $tabs->addTab(s('Forward'), $tabbaseurl . '&tab=Forward');
            ++$counttabs;
        }
        $tabs->addTab(s('Format'), $tabbaseurl . '&tab=Format');
        ++$counttabs;
        if (ALLOW_ATTACHMENTS) {
            $tabs->addTab(s('Attach'), $tabbaseurl . '&tab=Attach');
Beispiel #2
0
} elseif (isset($_GET['tab'])) {
    $_SESSION['lastmessagetype'] = $_GET['tab'];
}
if (!isset($_SESSION['messagesortby'])) {
    $_SESSION['messagesortby'] = '';
}
if (isset($_POST['sortBy'])) {
    if (in_array($_POST['sortBy'], array_keys($messageSortOptions))) {
        $_SESSION['messagesortby'] = $_POST['sortBy'];
    }
}
print '<div class="actions"><div class="fright">';
print PageLinkActionButton('send&amp;new=1', $GLOBALS['I18N']->get('Start a new campaign'));
print '</div><div class="clear"></div></div>';
### Print tabs
$tabs = new WebblerTabs();
$tabs->addTab($GLOBALS['I18N']->get('sent'), PageUrl2('messages&amp;tab=sent'), 'sent');
$tabs->addTab($GLOBALS['I18N']->get('active'), PageUrl2('messages&amp;tab=active'), 'active');
$tabs->addTab($GLOBALS['I18N']->get('draft'), PageUrl2('messages&amp;tab=draft'), 'draft');
#$tabs->addTab($GLOBALS['I18N']->get("queued"),PageUrl2("messages&amp;tab=queued"));#
if (USE_PREPARE) {
    $tabs->addTab($GLOBALS['I18N']->get('static'), PageUrl2('messages&amp;tab=static'), 'static');
}
//obsolete, moved to rssmanager plugin
#if (ENABLE_RSS) {
#  $tabs->addTab("rss",PageUrl2("messages&amp;tab=rss"));
#}
if (!empty($_GET['tab'])) {
    $tabs->setCurrent($_GET['tab']);
} else {
    $_GET['tab'] = 'sent';
Beispiel #3
0
// If $id wasn't passed in (if it was passed, then $_POST should have
// the database value in it already, and if it's empty, then we should
// leave it empty) and $footer is blank, load the default.
if (!$footer) {
    $footer = getConfig("messagefooter");
}
echo $errormsg;
if (!$done) {
    if (ALLOW_ATTACHMENTS) {
        $enctype = 'enctype="multipart/form-data"';
    } else {
        $enctype = '';
    }
    #$baseurl = sprintf('./?page=%s&amp;id=%d',$_GET["page"],$_GET["id"]);
    if ($_GET["id"]) {
        $tabs = new WebblerTabs();
        $tabs->addTab($GLOBALS['I18N']->get("Content"), "{$baseurl}&amp;tab=Content");
        if (FORWARD_ALTERNATIVE_CONTENT) {
            $tabs->addTab($GLOBALS['I18N']->get("Forward"), "{$baseurl}&amp;tab=Forward");
        }
        $tabs->addTab($GLOBALS['I18N']->get("Format"), "{$baseurl}&amp;tab=Format");
        if (ALLOW_ATTACHMENTS) {
            $tabs->addTab($GLOBALS['I18N']->get("Attach"), "{$baseurl}&amp;tab=Attach");
        }
        $tabs->addTab($GLOBALS['I18N']->get("Scheduling"), "{$baseurl}&amp;tab=Scheduling");
        #    if (USE_RSS) {
        #      $tabs->addTab("RSS","$baseurl&amp;tab=RSS");
        #    }
        $tabs->addTab($GLOBALS['I18N']->get("Criteria"), "{$baseurl}&amp;tab=Criteria");
        $tabs->addTab($GLOBALS['I18N']->get("Lists"), "{$baseurl}&amp;tab=Lists");
        #    $tabs->addTab("Review and Send","$baseurl&amp;tab=Review");
Beispiel #4
0
    }
    /*
     *
     * hmm, if lists are marked for a category, which is then removed, this would
     * cause them to not show up
      if (!in_array($current,$aConfiguredListCategories)) {
        $current = '';#$aListCategories[0];
      }
    */
    $_SESSION['last_list_category'] = $current;
    if ($subselect == '') {
        $subselect = ' where category = "' . $current . '"';
    } else {
        $subselect .= ' and category = "' . $current . '"';
    }
    $tabs = new WebblerTabs();
    foreach ($aListCategories as $category) {
        $category = trim($category);
        if ($category == '') {
            $category = $GLOBALS['I18N']->get('Uncategorised');
        }
        $tabs->addTab($category, $baseurl . '&amp;tab=' . urlencode($category));
    }
    if ($current != '') {
        $tabs->setCurrent($current);
    } else {
        $tabs->setCurrent(s('Uncategorised'));
    }
    print $tabs->display();
}
$countquery = ' select *' . ' from ' . $tables['list'] . $subselect;
Beispiel #5
0
<?php

require_once dirname(__FILE__) . '/accesscheck.php';
$result = '';
if (isset($_REQUEST['delete']) && $_REQUEST['delete']) {
    $result .= s('deleting bounce %d', $_REQUEST['delete']) . "..\n";
    if ($GLOBALS['require_login'] && !isSuperUser()) {
    } else {
        deleteBounce($_REQUEST['delete']);
    }
    $result .= $GLOBALS['I18N']->get('done');
    print ActionResult($result);
}
$tabs = new WebblerTabs();
$tabs->addTab(s('processed'), PageUrl2('bounces&tab=processed'), 'processed');
$tabs->addTab(s('unidentified'), PageUrl2('bounces&tab=unidentified'), 'unidentified');
if (!isset($_GET['tab'])) {
    $_GET['tab'] = 'processed';
}
$currentTab = 'processed';
switch ($_GET['tab']) {
    case 'unidentified':
        $status_compare = '=';
        $status = 'unidentified';
        $currentTab = 'unidentified';
        break;
    case 'processed':
    default:
        $status_compare = '!=';
        $status = 'processed';
        break;
Beispiel #6
0
}
# remember last one listed
if (!isset($_GET["type"]) && $_SESSION["lastmessagetype"]) {
    $_GET["type"] = $_SESSION["lastmessagetype"];
} elseif (isset($_GET["type"])) {
    $_SESSION["lastmessagetype"] = $_GET["type"];
}
#print '<p>'.PageLink2("messages&type=sent","Sent Messages").'&nbsp;&nbsp;&nbsp;';
#print PageLink2("messages&type=draft","Draft Messages").'&nbsp;&nbsp;&nbsp;';
#print PageLink2("messages&type=queue","Queued Messages").'&nbsp;&nbsp;&nbsp;';
#print PageLink2("messages&type=stat","Static Messages").'&nbsp;&nbsp;&nbsp;';
#if (ENABLE_RSS) {
#  print PageLink2("messages&type=rss","RSS Messages").'&nbsp;&nbsp;&nbsp;';
#}
#print '</p>';
$tabs = new WebblerTabs();
$tabs->addTab($GLOBALS['I18N']->get("sent"), PageUrl2("messages&type=sent"));
$tabs->addTab($GLOBALS['I18N']->get("draft"), PageUrl2("messages&type=draft"));
$tabs->addTab($GLOBALS['I18N']->get("queued"), PageUrl2("messages&type=queued"));
#
if (USE_PREPARE) {
    $tabs->addTab($GLOBALS['I18N']->get("static"), PageUrl2("messages&type=static"));
}
#if (ENABLE_RSS) {
#  $tabs->addTab("rss",PageUrl2("messages&type=rss"));
#}
$tabs->setCurrent($_GET["type"]);
print $tabs->display();
if ($_GET["delete"]) {
    $todelete = array();
    if ($_GET["delete"] == "draft") {
Beispiel #7
0
            print Info($GLOBALS['I18N']->get("Removed Attachment "));
        }
    }
}
##############################
# Stacked attributes, processing and calculation
##############################
## moved to plugin
##############################
# Stacked attributes, end
##############################
echo $errormsg;
if (!$done) {
    #$baseurl = sprintf('./?page=%s&amp;id=%d',$_GET["page"],$id);
    if ($id) {
        $tabs = new WebblerTabs();
        $tabbaseurl = preg_replace('/&tab=[^&]+/', '', $baseurl);
        $tabs->addTab($GLOBALS['I18N']->get("Content"), $tabbaseurl . '&amp;tab=Content');
        $counttabs = 1;
        if (USE_MANUAL_TEXT_PART) {
            $tabs->addTab($GLOBALS['I18N']->get("Text"), $tabbaseurl . '&amp;tab=Text');
            $counttabs++;
        }
        if (FORWARD_ALTERNATIVE_CONTENT) {
            $tabs->addTab($GLOBALS['I18N']->get("Forward"), $tabbaseurl . '&amp;tab=Forward');
            $counttabs++;
        }
        $tabs->addTab($GLOBALS['I18N']->get("Format"), $tabbaseurl . '&amp;tab=Format');
        $counttabs++;
        if (ALLOW_ATTACHMENTS) {
            $tabs->addTab($GLOBALS['I18N']->get("Attach"), $tabbaseurl . '&amp;tab=Attach');
Beispiel #8
0
<?php

require_once dirname(__FILE__) . '/accesscheck.php';
$result = '';
if (isset($_REQUEST['delete']) && $_REQUEST['delete']) {
    # delete the index in delete
    $result .= $GLOBALS['I18N']->get('deleting') . ' ' . $_REQUEST['delete'] . "..\n";
    if ($GLOBALS["require_login"] && !isSuperUser()) {
    } else {
        deleteBounce($_REQUEST['delete']);
    }
    $result .= $GLOBALS['I18N']->get('done');
    print ActionResult($result);
}
$tabs = new WebblerTabs();
$tabs->addTab(s("processed"), PageUrl2("bounces&amp;tab=processed"), 'processed');
$tabs->addTab(s("unidentified"), PageUrl2("bounces&amp;tab=unidentified"), 'unidentified');
if (!empty($_GET['tab'])) {
    $tabs->setCurrent($_GET["tab"]);
} else {
    $_GET['tab'] = 'processed';
    $tabs->setCurrent('processed');
}
switch ($_GET['tab']) {
    case 'unidentified':
        $status_compare = '=';
        $status = 'unidentified';
        break;
    case 'processed':
    default:
        $status_compare = '!=';
Beispiel #9
0
    Redirect('bouncerules' . $url);
}
if (isset($_POST['newrule']) && $_POST['newrule']) {
    Sql_Query(sprintf('insert into %s (regex,action,comment,admin,status) values("%s","%s","%s",%d,"active")', $GLOBALS['tables']['bounceregex'], sql_escape($_POST['newrule']), sql_escape($_POST['action']), sql_escape($_POST['comment']), $_SESSION['logindetails']['id']), 1);
    $num = Sql_Affected_Rows();
    if ($num < 0) {
        print '<p class="information">' . $GLOBALS['I18N']->get('That rule exists already') . '</p>';
    } else {
        Redirect('bouncerules' . $url);
    }
}
$count = Sql_Query(sprintf('select status, count(*) as num from %s group by status', $GLOBALS['tables']['bounceregex']));
while ($row = Sql_Fetch_Array($count)) {
    printf($GLOBALS['I18N']->get('Number of %s rules: %d') . '<br/>', $row['status'], $row['num']);
}
$tabs = new WebblerTabs();
$tabs->addTab($GLOBALS['I18N']->get('active'), PageUrl2('bouncerules&amp;type=active'));
$tabs->addTab($GLOBALS['I18N']->get('candidate'), PageUrl2('bouncerules&amp;type=candidate'));
if ($type == 'candidate') {
    $tabs->setCurrent($GLOBALS['I18N']->get('candidate'));
} else {
    $tabs->setCurrent($GLOBALS['I18N']->get('active'));
}
print "<p><div class='minitabs'>\n";
print $tabs->display();
print "</div></p>\n";
$some = 1;
$req = Sql_Query(sprintf('select * from %s where status = "%s" order by listorder,regex', $GLOBALS['tables']['bounceregex'], $type));
$ls = new WebblerListing($GLOBALS['I18N']->get('Bounce Regular Expressions'));
if (!Sql_Num_Rows($req)) {
    print $GLOBALS['I18N']->get('No Rules found');
Beispiel #10
0
} elseif (isset($_GET["tab"])) {
    $_SESSION["lastmessagetype"] = $_GET["tab"];
}
if (!isset($_SESSION['messagesortby'])) {
    $_SESSION['messagesortby'] = '';
}
if (isset($_POST['sortBy'])) {
    if (in_array($_POST['sortBy'], array_keys($messageSortOptions))) {
        $_SESSION['messagesortby'] = $_POST['sortBy'];
    }
}
print '<div class="actions"><div class="fright">';
print PageLinkActionButton('send&amp;new=1', $GLOBALS['I18N']->get('Start a new campaign'));
print '</div><div class="clear"></div></div>';
### Print tabs
$tabs = new WebblerTabs();
$tabs->addTab($GLOBALS['I18N']->get("sent"), PageUrl2("messages&amp;tab=sent"), 'sent');
$tabs->addTab($GLOBALS['I18N']->get("active"), PageUrl2("messages&amp;tab=active"), 'active');
$tabs->addTab($GLOBALS['I18N']->get("draft"), PageUrl2("messages&amp;tab=draft"), 'draft');
#$tabs->addTab($GLOBALS['I18N']->get("queued"),PageUrl2("messages&amp;tab=queued"));#
if (USE_PREPARE) {
    $tabs->addTab($GLOBALS['I18N']->get("static"), PageUrl2("messages&amp;tab=static"), 'static');
}
//obsolete, moved to rssmanager plugin
#if (ENABLE_RSS) {
#  $tabs->addTab("rss",PageUrl2("messages&amp;tab=rss"));
#}
if (!empty($_GET['tab'])) {
    $tabs->setCurrent($_GET["tab"]);
} else {
    $_GET['tab'] = 'sent';
Beispiel #11
0
    $paging = '';
    if ($total > MAX_USER_PP) {
        if ($start > 0) {
            $listing = sprintf(s("Listing subscriber %d to %d", $start, $start + MAX_USER_PP));
            $limit = "limit {$start}," . MAX_USER_PP;
        } else {
            $listing = s("Listing subscriber 1 to 50");
            $limit = "limit 0,50";
        }
        $paging = simplePaging("members&{$pagingKeep}&amp;id=" . $id, $start, $total, MAX_USER_PP, $GLOBALS['I18N']->get('subscribers'));
    }
    $query = ' select u.*' . " from %s lu" . "    join %s u" . '       on lu.userid = u.id' . ' where lu.listid = ?' . ' and ' . $confirmedSelection . ' order by confirmed desc, email' . ' limit ' . MAX_USER_PP . ' offset ' . $offset;
    // TODO Consider using a subselect.  select user where uid in select uid from list
    $query = sprintf($query, $tables['listuser'], $tables['user']);
    $result = Sql_Query_Params($query, array($id));
    $tabs = new WebblerTabs();
    $tabs->addTab(s("confirmed"), PageUrl2("members&id=" . $id), 'confirmed');
    $tabs->addTab(s("unconfirmed"), PageUrl2("members&tab=unconfirmed&id=" . $id), 'unconfirmed');
    if (!empty($_GET['tab'])) {
        $tabs->setCurrent($_GET["tab"]);
    } else {
        $_GET['tab'] = 'confirmed';
        $tabs->setCurrent('confirmed');
    }
    print $tabs->display();
    print "<p>" . s('%d subscribers', $total) . '</p>';
    print formStart(' name="users" class="membersProcess" ');
    printf('<input type="hidden" name="id" value="%d" />', $id);
    ?>

  <input type="checkbox" name="checkall" class="checkallcheckboxes" /><?php 
Beispiel #12
0
     if ($start > 0) {
         $listing = sprintf(s('Listing subscriber %d to %d', $start, $start + MAX_USER_PP));
         $limit = "limit {$start}," . MAX_USER_PP;
     } else {
         $listing = s('Listing subscriber 1 to 50');
         $limit = 'limit 0,50';
     }
     $paging = simplePaging("members&{$pagingKeep}&amp;id=" . $id, $start, $total, MAX_USER_PP, $GLOBALS['I18N']->get('subscribers'));
 }
 if (!$listAll) {
     $result = Sql_Query(sprintf('select u.* from %s lu join %s u on lu.userid = u.id where lu.listid = %d and ' . $confirmedSelection . ' limit %d offset %d', $tables['listuser'], $tables['user'], $id, MAX_USER_PP, $offset));
 } else {
     $query = sprintf(' select u.* from %s u where ' . $confirmedSelection . ' limit %d offset %d', $tables['user'], MAX_USER_PP, $offset);
     $result = Sql_Query($query);
 }
 $tabs = new WebblerTabs();
 $tabs->addTab(s('confirmed'), PageUrl2('members&id=' . $id), 'confirmed');
 $tabs->addTab(s('unconfirmed'), PageUrl2('members&tab=unconfirmed&id=' . $id), 'unconfirmed');
 if (!empty($_GET['tab'])) {
     $tabs->setCurrent($_GET['tab']);
 } else {
     $_GET['tab'] = 'confirmed';
     $tabs->setCurrent('confirmed');
 }
 print "<div class='minitabs'>\n";
 print $tabs->display();
 print "</div>\n";
 print '<p>' . s('%d subscribers', $total) . '</p>';
 print formStart(' name="users" class="membersProcess" ');
 printf('<input type="hidden" name="id" value="%d" />', $id);
 if (!$listAll) {