if ($msg['status'] == 'inprocess' || $msg['status'] == 'submitted') { $actionbuttons .= '<span class="suspend">' . PageLinkButton('messages&suspend=' . $msg['id'], $GLOBALS['I18N']->get('Suspend'), '', '', s('Suspend')) . '</span>'; } elseif ($msg['status'] != 'draft') { $actionbuttons .= '<span class="resend">' . PageLinkButton('messages', $GLOBALS['I18N']->get('Requeue'), 'resend=' . $msg['id'], '', s('Requeue')) . '</span>'; } $actionbuttons .= '<span class="view">' . PageLinkButton('message', $GLOBALS['I18N']->get('View'), 'id=' . $msg['id'], '', s('View')) . '</span>'; if ($clicks[0] && CLICKTRACK) { $actionbuttons .= '<span class="stats">' . PageLinkButton('statsoverview', $GLOBALS['I18N']->get('statistics'), 'id=' . $msg['id'], '', s('Statistics')) . '</span>'; } #0012081: Add new 'Mark as sent' button if ($msg['status'] == 'suspended') { $actionbuttons .= '<span class="marksent">' . PageLinkButton('messages&markSent=' . $msg['id'], $GLOBALS['I18N']->get('Mark sent'), '', '', s('Mark sent')) . '</span>'; $actionbuttons .= '<span class="edit">' . PageLinkButton('send', $GLOBALS['I18N']->get('Edit'), 'id=' . $msg['id'], '', s('Edit')) . '</span>'; } elseif ($msg['status'] == 'draft' || !empty($messagedata['istestcampaign'])) { ## only draft messages should be deletable, the rest isn't $deletebutton = new ConfirmButton(s('Are you sure you want to delete this campaign?'), PageURL2("messages{$url_keep}&delete=" . $msg['id']), s('delete this campaign'), '', 'button'); # $actionbuttons .= sprintf('<span class="delete"><a href="javascript:deleteRec(\'%s\');" class="button" title="'.$GLOBALS['I18N']->get("delete").'">'.$GLOBALS['I18N']->get("delete").'</a></span>',PageURL2("messages$url_keep","","delete=".$msg["id"])); $actionbuttons .= '<span class="edit">' . PageLinkButton('send', $GLOBALS['I18N']->get('Edit'), 'id=' . $msg['id'], '', s('Edit')) . '</span>'; if (empty($clicks[0])) { ## disallow deletion when there are stats $actionbuttons .= '<span class="delete">' . $deletebutton->show() . '</span>'; } } $ls->addColumn($listingelement, $GLOBALS['I18N']->get('Action'), '<div class="messageactions">' . $actionbuttons . '</div>'); } } print $ls->display(); if ($total > 5 && $_GET['tab'] == 'active') { print PageLinkButton('messages', $GLOBALS['I18N']->get('Suspend All'), 'action=suspall'); print PageLinkButton('messages', $GLOBALS['I18N']->get('Mark All Sent'), 'action=markallsent'); }
print "<h3>" . $GLOBALS['I18N']->get('subscriber is blacklisted since') . " "; $blacklist_info = Sql_Fetch_Array_Query(sprintf('select * from %s where email = "%s"', $tables["user_blacklist"], $user["email"])); print $blacklist_info["added"] . "</h3><br/>"; print ''; $isSpamReport = false; $ls = new WebblerListing($GLOBALS['I18N']->get('Blacklist info')); $req = Sql_Query(sprintf('select * from %s where email = "%s"', $tables["user_blacklist_data"], $user["email"])); while ($row = Sql_Fetch_Array($req)) { $ls->addElement($row["name"]); $isSpamReport = $isSpamReport || $row['data'] == 'blacklisted due to spam complaints'; $ls->addColumn($row["name"], $GLOBALS['I18N']->get('value'), stripslashes($row["data"])); } $ls->addElement('<!-- remove -->'); if (!$isSpamReport) { $button = new ConfirmButton(htmlspecialchars($GLOBALS['I18N']->get('are you sure you want to delete this subscriber from the blacklist')) . "?\\n" . htmlspecialchars($GLOBALS['I18N']->get('it should only be done with explicit permission from this subscriber')), PageURL2("userhistory&unblacklist={$user["id"]}&id={$user["id"]}", "button", s('remove subscriber from blacklist')), s('remove subscriber from blacklist')); $ls->addRow('<!-- remove -->', s('remove'), $button->show()); } else { $ls->addRow('<!-- remove -->', s('remove'), s('For this subscriber to be removed from the blacklist, you need to ask them to re-subscribe using the phpList subscribe page')); } print $ls->display(); } $ls = new WebblerListing($GLOBALS['I18N']->get('Subscription History')); $req = Sql_Query(sprintf('select * from %s where userid = %d order by date desc', $tables["user_history"], $user["id"])); if (!Sql_Affected_Rows()) { print $GLOBALS['I18N']->get('no details found'); } while ($row = Sql_Fetch_Array($req)) { $ls->addElement($row["id"]); $ls->setClass($row["id"], 'row1'); $ls->addColumn($row["id"], $GLOBALS['I18N']->get('ip'), $row["ip"]); $ls->addColumn($row["id"], $GLOBALS['I18N']->get('date'), $row["date"]);
Redirect('configure'); } if (empty($_REQUEST['id'])) { $id = ''; } else { $id = $_REQUEST['id']; if (!isset($default_config[$id])) { print $GLOBALS['I18N']->get('invalid request'); return; } } #print '<div class="actions">'.PageLinkButton('configure&resetdefault=yes',s('Reset to default')).'</div>'; if (empty($_GET['id'])) { ## @@TODO might be an idea to allow reset on an "id" as well $button = new ConfirmButton(s('Are you sure you want to reset the configuration to the default?'), PageURL2('configure&resetdefault=yes', 'reset', ''), s('Reset to default')); print '<div class="fright">' . $button->show() . '</div>'; print Info(s('You can edit all of the values in this page, and click the "save changes" button once to save all the changes you made.'), 1); } $configCategories = array(); $configTypes = array(); foreach ($default_config as $item => $details) { if (empty($details['category'])) { $details['category'] = 'other'; } if (empty($details['type'])) { $details['type'] = 'undefined'; } if (!isset($configCategories[strtolower($details['category'])])) { $configCategories[strtolower($details['category'])] = array(); } if (!isset($configTypes[$details['type']])) {
$ls->setClass($element, 'rows row1'); $ls->addColumn($element, $GLOBALS['I18N']->get('Members'), '<div style="display:inline-block;text-align:right;width:50%;float:left;">' . $membersDisplay . '</div><span class="view" style="text-align:left;display:inline-block;float:right;width:48%;"><a class="button " href="./?page=members&id=' . $row["id"] . '" title="' . $GLOBALS['I18N']->get('View Members') . '">' . $GLOBALS['I18N']->get('View Members') . '</a></span>'); $ls->addColumn($element, $GLOBALS['I18N']->get('Public'), sprintf('<input type="checkbox" name="active[%d]" value="1" %s %s />', $row["id"], $row["active"] ? 'checked="checked"' : '', listUsedInSubscribePage($row["id"]) ? ' disabled="disabled" ' : '')); /* $owner = adminName($row['owner']); if (!empty($owner)) { $ls->addColumn($element, $GLOBALS['I18N']->get('Owner'),$GLOBALS['require_login'] ? adminName($row['owner']):$GLOBALS['I18N']->get('n/a')); } if (trim($desc) != '') { $ls->addRow($element, $GLOBALS['I18N']->get('Description'),$desc); } */ $ls->addColumn($element, $GLOBALS['I18N']->get('Order'), sprintf('<input type="text" name="listorder[%d]" value="%d" size="3" class="listorder" />', $row['id'], $row['listorder'])); $deletebutton = new ConfirmButton(s('Are you sure you want to delete this list?'), PageURL2("list&delete=" . $row["id"]), s('delete this list')); $ls->addRow($element, '', '<span class="edit-list"><a class="button" href="?page=editlist&id=' . $row["id"] . '" title="' . $GLOBALS['I18N']->get('Edit this list') . '"></a></span>' . '<span class="send-list">' . PageLinkButton('send&new=1&list=' . $row['id'], $GLOBALS['I18N']->get('send'), '', '', $GLOBALS['I18N']->get('start a new campaign targetting this list')) . '</span>' . '<span class="add_member">' . PageLinkDialogOnly('importsimple&list=' . $row["id"], $GLOBALS['I18N']->get('Add Members')) . '</span>' . '<span class="delete">' . $deletebutton->show() . '</span>', '', '', 'actions nodrag'); $some = 1; } $ls->addSubmitButton('update', $GLOBALS['I18N']->get('Save Changes')); if (!$some) { echo $GLOBALS['I18N']->get('No lists, use Add List to add one'); } else { print $ls->display('', 'draggable'); } /* echo '<table class="x" border="0"> <tr> <td>'.$GLOBALS['I18N']->get('No').'</td> <td>'.$GLOBALS['I18N']->get('Name').'</td> <td>'.$GLOBALS['I18N']->get('Order').'</td> <td>'.$GLOBALS['I18N']->get('Functions').'</td>
require_once $coderoot . 'structure.php'; $result = Sql_Fetch_Assoc_query(sprintf('select id, subject from %s where id = %d %s', $tables['message'], $id, $owner_select_and)); if (empty($result['id'])) { print $GLOBALS['I18N']->get('No such campaign'); return; } $campaignTitle = $result['subject']; $msgdata = loadMessageData($id); if ($msgdata['status'] == 'draft' || $msgdata['status'] == 'suspended') { print '<div class="actions">'; print '<p>' . PageLinkButton('send&id=' . $id, $GLOBALS['I18N']->get('Edit this message')) . '</p>'; print '</div>'; } else { print '<div class="actions">'; $editbutton = new ConfirmButton(s('Editing an active or finished campaign will place it back in the draft queue, continue?'), PageURL2('send&id=' . $id), s('Edit campaign')); print $editbutton->show(); print '</div>'; } $content = '<table class="messageView">'; $format = '<tr><td valign="top" class="dataname">%s</td><td valign="top">%s</td></tr>'; $content .= sprintf($format, s('entered'), stripslashes($msgdata['entered'])); $content .= sprintf($format, s('fromfield'), stripslashes($msgdata['fromfield'])); $content .= sprintf($format, s('message'), stripslashes($msgdata['message'])); $content .= sprintf($format, s('textmessage'), nl2br(stripslashes($msgdata['textmessage']))); $content .= sprintf($format, s('footer'), stripslashes($msgdata['footer'])); $finishSending = mktime($msgdata['finishsending']['hour'], $msgdata['finishsending']['minute'], 0, $msgdata['finishsending']['month'], $msgdata['finishsending']['day'], $msgdata['finishsending']['year']); $embargoTime = mktime($msgdata['embargo']['hour'], $msgdata['embargo']['minute'], 0, $msgdata['embargo']['month'], $msgdata['embargo']['day'], $msgdata['embargo']['year']); $repeatuntilTime = mktime($msgdata['repeatuntil']['hour'], $msgdata['repeatuntil']['minute'], 0, $msgdata['repeatuntil']['month'], $msgdata['repeatuntil']['day'], $msgdata['repeatuntil']['year']); $requeueuntilTime = mktime($msgdata['requeueuntil']['hour'], $msgdata['requeueuntil']['minute'], 0, $msgdata['requeueuntil']['month'], $msgdata['requeueuntil']['day'], $msgdata['requeueuntil']['year']); if ($embargoTime > time()) { $content .= sprintf($format, s('Embargoed until'), date('Y-m-d H:i:s', $embargoTime));
} ?> <div class="panel"><div class="header"></div><!-- ENDOF .header --> <div class="content"> <h3 id="attribute-name"><?php echo htmlspecialchars(stripslashes($data["name"])); ?> </h3> <div class="actions"> <?php print PageLinkButton("attributes", s('Back to attributes'), ""); if (!isset($_GET['action']) || $_GET['action'] != 'new') { echo PageLinkButton("editattributes", $GLOBALS['I18N']->get('add new'), "id={$id}&action=new"); } $button = new ConfirmButton(s('Are you sure you want to delete all values?'), PageURL2("editattributes&id={$id}&deleteall=yes", s('delete all')), s('Delete all')); print $button->show(); ?> </div> <hr/> <?php echo formStart(' class="editattributesAdd" '); ?> <input type="hidden" name="action" value="add" /> <input type="hidden" name="id" value="<?php echo $id; ?> " /> <?php
$membership .= '<li>' . PageLink2('editlist', $lst['name'], 'id=' . $lst['listid']) . '</li>'; array_push($subscribed, $lst['listid']); } if (!$membership) { $membership = $GLOBALS['I18N']->get('No Lists'); } print '<div class="actions">'; print ' ' . PageLinkButton("userhistory&id={$id}", $GLOBALS['I18N']->get('History')); if (!empty($GLOBALS['config']['plugins']) && is_array($GLOBALS['config']['plugins'])) { foreach ($GLOBALS['config']['plugins'] as $pluginName => $plugin) { print $plugin->userpageLink($id); } } if ($access == 'all') { $delete = new ConfirmButton(htmlspecialchars(s('Are you sure you want to remove this subscriber from the system.')), PageURL2("user&delete={$id}" . addCsrfGetToken(), 'button', s('remove subscriber')), s('remove subscriber')); print $delete->show(); } print '</div>'; } else { if (!empty($_POST['subscribe'])) { foreach ($_POST['subscribe'] as $idx => $listid) { array_push($subscribed, $listid); } } $id = 0; print '<h3>' . s('Add a new subscriber') . '</h3>'; if (empty($_POST['email'])) { print formStart(); print s('Email address') . ': ' . '<input type="text" name="email" value="" />'; print '<input type="submit" name="change" value="' . s('Continue') . '">'; print '</form>';