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; } $tabs->addTab(s('Scheduling'), $tabbaseurl . '&tab=Scheduling'); ++$counttabs; $tabs->addTab(s('Lists'), $tabbaseurl . '&tab=Lists'); ++$counttabs; if ($_GET['tab']) { $tabs->setCurrent(s($_GET['tab'])); } else { $tabs->setCurrent(s('Content')); } $tabs->addLinkCode(' class="savechanges" '); ### allow plugins to add tabs $plugintabs = array(); foreach ($GLOBALS['plugins'] as $pluginname => $plugin) { # print $plugin->name; $plugintab = $plugin->sendMessageTab($id, $messagedata); if ($plugintab) { $plugintabname = substr(strip_tags($plugin->sendMessageTabTitle()), 0, 10); $plugintabs[$plugintabname] = $plugintab; $tabs->addTab($GLOBALS['I18N']->get($plugintabname), "{$tabbaseurl}&tab=" . urlencode($plugintabname)); if ($insertBefore = $plugin->sendMessageTabInsertBefore()) { $tabs->insertTabBefore(s($insertBefore), s($plugintabname));
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'); } print '<div class="minitabs">'; print $tabs->display(); print '</div>'; $filterDisplay = $_SESSION['messagefilter']; if ($filterDisplay == '') { $filterDisplay = ' --- filter --- '; } print '<div id="messagefilter" class="filterdiv fright">'; print formStart(' id="messagefilterform" '); print '<div><input type="text" name="filter" value="' . htmlspecialchars($filterDisplay) . '" id="filtertext" />'; print '<select name="numPP" class="numppOptions">';
$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"); if ($_GET["tab"]) { $tabs->setCurrent($GLOBALS['I18N']->get($_GET["tab"])); } else { $tabs->setCurrent($GLOBALS['I18N']->get("Content")); } if (defined("WARN_SAVECHANGES")) { $tabs->addLinkCode(' onClick="return savechanges();" '); } print $tabs->display(); } ?> <p></p> <script language="Javascript"> // some debugging stuff to see what happens function checkForm() { return true; for (var i=0;i<document.sendmessageform.elements.length;i++) {
$_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]); } } print '<p class="total">' . $total . ' ' . $GLOBALS['I18N']->get('Lists') . '</p>';
$_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; } $tabs->setCurrent($currentTab); if (ALLOW_DELETEBOUNCE && isset($_GET['action']) && $_GET['action']) { verifyCsrfGetToken(); switch ($_GET['action']) { case 'deleteunidentified': $req = Sql_Query(sprintf('delete from %s where comment = "unidentified bounce" and date_add(date,interval 2 month) < now()', $tables['bounce'])); $count = Sql_Num_Rows($req); $actionresult = s('%d unidentified bounces older than 2 months have been deleted', $count); break; case 'deleteprocessed': $req = Sql_Query(sprintf('delete from %s where comment != "not processed" and date_add(date,interval 2 month) < now()', $tables['bounce'])); $count = Sql_Num_Rows($req); $actionresult = s('%d processed bounces older than 2 months have been deleted', $count); break; case 'deleteall': Sql_Query(sprintf('truncate %s', $tables['bounce']));
#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)); while ($row = Sql_Fetch_Row($req)) { array_push($todelete, $row[0]); } } else { array_push($todelete, sprintf('%d', $_GET["delete"])); } foreach ($todelete as $delete) { # delete the index in delete $result = Sql_query("select id from " . $tables["message"] . " where id = {$delete} {$ownerselect_and}"); while ($row = Sql_Fetch_Row($result)) {
++$counttabs; if (ALLOW_ATTACHMENTS) { $tabs->addTab($GLOBALS['I18N']->get('Attach'), $tabbaseurl . '&tab=Attach'); ++$counttabs; } $tabs->addTab($GLOBALS['I18N']->get('Scheduling'), $tabbaseurl . '&tab=Scheduling'); ++$counttabs; # if (USE_RSS) { # $tabs->addTab("RSS",$baseurl.'&tab=RSS'); # } # $tabs->addTab($GLOBALS['I18N']->get("Criteria"),$tabbaseurl.'&tab=Criteria'); $tabs->addTab($GLOBALS['I18N']->get('Lists'), $tabbaseurl . '&tab=Lists'); ++$counttabs; # $tabs->addTab("Review and Send",$baseurl.'&tab=Review'); if ($_GET['tab']) { $tabs->setCurrent($GLOBALS['I18N']->get($_GET['tab'])); } else { $tabs->setCurrent($GLOBALS['I18N']->get('Content')); } // if (defined("WARN_SAVECHANGES")) { $tabs->addLinkCode(' class="savechanges" '); // } #$baseurl = sprintf('./?page=%s&id=%d',$_GET["page"],$id); ### allow plugins to add tabs $plugintabs = array(); foreach ($GLOBALS['plugins'] as $pluginname => $plugin) { # print $plugin->name; $plugintab = $plugin->sendMessageTab($id, $messagedata); if ($plugintab) { $plugintabname = substr(strip_tags($plugin->sendMessageTabTitle()), 0, 10); $plugintabs[$plugintabname] = $plugintab;
$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&tab=processed"), 'processed'); $tabs->addTab(s("unidentified"), PageUrl2("bounces&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 = '!='; $status = 'processed'; break; }
$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; } else { print formStart('class="bouncerulesListing"'); }
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'); } print '<div class="minitabs">'; print $tabs->display(); print '</div>'; $filterDisplay = $_SESSION['messagefilter']; if ($filterDisplay == '') { $filterDisplay = ' --- filter --- '; } print '<div id="messagefilter" class="filterdiv fright">'; print formStart(' id="messagefilterform" '); print '<div><input type="text" name="filter" value="' . htmlspecialchars($filterDisplay) . '" id="filtertext" />'; print '<select name="numPP" class="numppOptions">';
$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"); ?> <?php $columns = array();
$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'); } $columns = array(); $columns = explode(',', getConfig('membership_columns'));