Esempio n. 1
0
    }
}
##############################
# 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');
            ++$counttabs;
        }
Esempio n. 2
0
    $_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';
    $tabs->setCurrent('sent');
Esempio n. 3
0
// 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");
        $tabs->addTab($GLOBALS['I18N']->get("Misc"), "{$baseurl}&amp;tab=Misc");
Esempio n. 4
0
        $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;
$countresult = Sql_query($countquery);
$total = Sql_Num_Rows($countresult);
if ($total == 0 && sizeof($aListCategories) && $current == '' && empty($_GET['tab'])) {
    ## reload to first category, if none found by default (ie all lists are categorised)
    if (!empty($aListCategories[0])) {
        Redirect('list&tab=' . $aListCategories[0]);
Esempio n. 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;
Esempio n. 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") {
        $req = Sql_Query(sprintf('select id from %s where status = "draft" and (subject = "" or subject = "(no subject)") %s', $tables["message"], $ownerselect_and));
Esempio n. 7
0
    }
}
##############################
# 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');
            $counttabs++;
        }
Esempio n. 8
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;
Esempio n. 9
0
}
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');
    $some = 0;
Esempio n. 10
0
    $_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';
    $tabs->setCurrent('sent');
Esempio n. 11
0
    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 
    echo $GLOBALS['I18N']->get("Tag all users in this page");
Esempio n. 12
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) {
     print '<input type="checkbox" name="checkall" class="checkallcheckboxes" />' . $GLOBALS['I18N']->get('Tag all users in this page');