} } ############################## # 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; }
$_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&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&tab=sent'), 'sent'); $tabs->addTab($GLOBALS['I18N']->get('active'), PageUrl2('messages&tab=active'), 'active'); $tabs->addTab($GLOBALS['I18N']->get('draft'), PageUrl2('messages&tab=draft'), 'draft'); #$tabs->addTab($GLOBALS['I18N']->get("queued"),PageUrl2("messages&tab=queued"));# if (USE_PREPARE) { $tabs->addTab($GLOBALS['I18N']->get('static'), PageUrl2('messages&tab=static'), 'static'); } //obsolete, moved to rssmanager plugin #if (ENABLE_RSS) { # $tabs->addTab("rss",PageUrl2("messages&tab=rss")); #} if (!empty($_GET['tab'])) { $tabs->setCurrent($_GET['tab']); } else { $_GET['tab'] = 'sent'; $tabs->setCurrent('sent');
// 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&id=%d',$_GET["page"],$_GET["id"]); if ($_GET["id"]) { $tabs = new WebblerTabs(); $tabs->addTab($GLOBALS['I18N']->get("Content"), "{$baseurl}&tab=Content"); if (FORWARD_ALTERNATIVE_CONTENT) { $tabs->addTab($GLOBALS['I18N']->get("Forward"), "{$baseurl}&tab=Forward"); } $tabs->addTab($GLOBALS['I18N']->get("Format"), "{$baseurl}&tab=Format"); if (ALLOW_ATTACHMENTS) { $tabs->addTab($GLOBALS['I18N']->get("Attach"), "{$baseurl}&tab=Attach"); } $tabs->addTab($GLOBALS['I18N']->get("Scheduling"), "{$baseurl}&tab=Scheduling"); # if (USE_RSS) { # $tabs->addTab("RSS","$baseurl&tab=RSS"); # } $tabs->addTab($GLOBALS['I18N']->get("Criteria"), "{$baseurl}&tab=Criteria"); $tabs->addTab($GLOBALS['I18N']->get("Lists"), "{$baseurl}&tab=Lists"); # $tabs->addTab("Review and Send","$baseurl&tab=Review"); $tabs->addTab($GLOBALS['I18N']->get("Misc"), "{$baseurl}&tab=Misc");
$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 . '&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]);
<?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;
# 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").' '; #print PageLink2("messages&type=draft","Draft Messages").' '; #print PageLink2("messages&type=queue","Queued Messages").' '; #print PageLink2("messages&type=stat","Static Messages").' '; #if (ENABLE_RSS) { # print PageLink2("messages&type=rss","RSS Messages").' '; #} #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));
} } ############################## # 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($GLOBALS['I18N']->get("Content"), $tabbaseurl . '&tab=Content'); $counttabs = 1; if (USE_MANUAL_TEXT_PART) { $tabs->addTab($GLOBALS['I18N']->get("Text"), $tabbaseurl . '&tab=Text'); $counttabs++; } if (FORWARD_ALTERNATIVE_CONTENT) { $tabs->addTab($GLOBALS['I18N']->get("Forward"), $tabbaseurl . '&tab=Forward'); $counttabs++; } $tabs->addTab($GLOBALS['I18N']->get("Format"), $tabbaseurl . '&tab=Format'); $counttabs++; if (ALLOW_ATTACHMENTS) { $tabs->addTab($GLOBALS['I18N']->get("Attach"), $tabbaseurl . '&tab=Attach'); $counttabs++; }
<?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;
} 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&type=active')); $tabs->addTab($GLOBALS['I18N']->get('candidate'), PageUrl2('bouncerules&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;
$_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&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&tab=sent"), 'sent'); $tabs->addTab($GLOBALS['I18N']->get("active"), PageUrl2("messages&tab=active"), 'active'); $tabs->addTab($GLOBALS['I18N']->get("draft"), PageUrl2("messages&tab=draft"), 'draft'); #$tabs->addTab($GLOBALS['I18N']->get("queued"),PageUrl2("messages&tab=queued"));# if (USE_PREPARE) { $tabs->addTab($GLOBALS['I18N']->get("static"), PageUrl2("messages&tab=static"), 'static'); } //obsolete, moved to rssmanager plugin #if (ENABLE_RSS) { # $tabs->addTab("rss",PageUrl2("messages&tab=rss")); #} if (!empty($_GET['tab'])) { $tabs->setCurrent($_GET["tab"]); } else { $_GET['tab'] = 'sent'; $tabs->setCurrent('sent');
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}&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");
$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}&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');