本文整理汇总了PHP中PageURL2函数的典型用法代码示例。如果您正苦于以下问题:PHP PageURL2函数的具体用法?PHP PageURL2怎么用?PHP PageURL2使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PageURL2函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sprintf
$ls->addElement($element);
$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?') . '\\n' . s('This will NOT remove the subscribers that are on this list.') . '\\n' . s('You can reconnect subscribers to lists on the Reconcile Subscribers page.'), 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'], s('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>
示例2: sprintf
} else {
$enctype = '';
}
### variable initialisation and sanity checks
if (isset($_GET['id'])) {
$id = sprintf('%d', $_GET['id']);
} else {
$id = 0;
}
## page actions
$send = isset($_POST['send']);
$prepare = isset($_POST['prepare']);
$save = !empty($_POST['save']) || !empty($_POST['followupto']);
$savedraft = !empty($_POST['savedraft']);
$sendtest = !empty($_POST['sendtest']);
$baseurl = PageURL2($_GET['page'] . '&id=' . $id);
if (!isset($_GET['tab'])) {
$_GET['tab'] = '';
}
$_GET['tab'] = strip_tags($_GET['tab']);
if (!empty($_GET['tab'])) {
$baseurl .= '&tab=' . $_GET['tab'];
}
### if we're not working on an existing message, create one and redirect to edit it
if (!$id) {
$defaulttemplate = getConfig('defaultmessagetemplate');
$defaultfooter = getConfig('messagefooter');
Sql_Query(sprintf('insert into %s (subject, status, entered, sendformat, embargo, repeatuntil, owner, template, tofield, replyto,footer)
values("(no title)", "draft", now(), "HTML", now(), now(), %d, %d, "", "", "%s" )', $GLOBALS['tables']['message'], $_SESSION['logindetails']['id'], $defaulttemplate, sql_escape($defaultfooter)));
$id = Sql_Insert_Id();
if (isset($_GET['list'])) {
示例3: SaveConfig
SaveConfig($id, $_POST["values"][$id], 0);
Redirect("configure");
exit;
}
}
}
if (!$id) {
while (list($key, $val) = each($default_config)) {
if (is_array($val)) {
$dbval = getConfig($key);
if (isset($dbval)) {
$value = $dbval;
} else {
$value = $val[0];
}
printf('<p><a href="%s">%s</a> <b>%s</b><br/>', PageURL2("configure", "", "id={$key}"), $GLOBALS['I18N']->get('edit'), $GLOBALS['I18N']->get($val[1]));
print nl2br(htmlspecialchars(stripslashes($value))) . "<br/><hr/>";
}
}
} else {
$val = $default_config[$id];
printf('%s<p>' . $GLOBALS['I18N']->get('editing') . ' <b>%s</b><br/>', formStart(), $GLOBALS['I18N']->get($val[1]));
printf('<input type=hidden name="id" value="%s">', $id);
$dbval = getConfig($id);
# print $dbval.'<br/>';
if (isset($dbval)) {
$value = $dbval;
} else {
$value = $val[0];
}
# print $value . " ".$website . " ".$domain.'<br/>';
示例4: PageURL2
$bouncels->addElement($row["bounce"], PageURL2("bounce", $GLOBALS['I18N']->get('view'), "id=" . $row["bounce"]));
$bouncels->addColumn($row["bounce"], $GLOBALS['I18N']->get('msg'), $row["message"]);
$bouncels->addColumn($row["bounce"], $GLOBALS['I18N']->get('time'), $row["ftime"]);
$bounces[$row["message"]] = $row["ftime"];
}
}
$ls = new WebblerListing($GLOBALS['I18N']->get('Messages'));
$msgs = Sql_Query(sprintf('select messageid,entered,viewed,(viewed = 0 or viewed is null) as notviewed,
abs(unix_timestamp(entered) - unix_timestamp(viewed)) as responsetime from %s where userid = %d and status = "sent"', $tables["usermessage"], $user["id"]));
$num = Sql_Affected_Rows();
printf('%d ' . $GLOBALS['I18N']->get('messages sent to this user') . '<br/>', $num);
if ($num) {
$resptime = 0;
$totalresp = 0;
while ($msg = Sql_Fetch_Array($msgs)) {
$ls->addElement($msg["messageid"], PageURL2("message", $GLOBALS['I18N']->get('view'), "id=" . $msg["messageid"]));
if (CLICKTRACK) {
$clicks = Sql_Fetch_Row_Query(sprintf('select sum(clicked) as numclicks from %s where userid = %s and messageid = %s', $GLOBALS['tables']['linktrack'], $user['id'], $msg['messageid']));
$ls->addColumn($msg["messageid"], $GLOBALS['I18N']->get('clicks'), PageLink2('userclicks&userid=' . $user['id'] . '&msgid=' . $msg['messageid'], $clicks[0]));
}
$ls->addColumn($msg["messageid"], $GLOBALS['I18N']->get('sent'), formatDateTime($msg["entered"], 1));
if (!$msg['notviewed']) {
$ls->addColumn($msg["messageid"], $GLOBALS['I18N']->get('viewed'), formatDateTime($msg["viewed"], 1));
$ls->addColumn($msg["messageid"], $GLOBALS['I18N']->get('responsetime'), $msg['responsetime']);
$resptime += $msg['responsetime'];
$totalresp += 1;
}
$ls->addColumn($msg["messageid"], $GLOBALS['I18N']->get('bounce'), $bounces[$msg["messageid"]]);
}
if ($totalresp) {
$avgresp = sprintf('%d', $resptime / $totalresp);
示例5: date
}
include $GLOBALS["coderoot"] . "date.php";
$errormsg = '';
$rss_content = '';
$done = 0;
$messageid = 0;
$duplicate_atribute = 0;
# not actually used it seems @@@ check
$embargo = new date("embargo");
$embargo->useTime = true;
$repeatuntil = new date("repeatuntil");
$repeatuntil->useTime = true;
if (empty($_GET['id'])) {
$_GET['id'] = '';
}
$baseurl = PageURL2($_GET["page"] . '&id=' . $_GET["id"]);
echo '<script language="Javascript" src="js/jslib.js" type="text/javascript"></script><hr><p>';
// load some variables in a register globals-safe fashion
if (isset($_POST['send'])) {
$send = $_POST["send"];
// Only get this from the POST variable (not session or anywhere else)
} else {
$send = '';
}
if (isset($_POST['prepare'])) {
$prepare = $_POST["prepare"];
} else {
$prepage = '';
}
if (isset($_GET['id'])) {
$id = sprintf('%d', $_GET["id"]);
示例6: simplePaging
exit;
# print '<div id="actionresult" class="result">'.$actionresult .'</div>';
}
if ($total > MAX_USER_PP) {
$paging = simplePaging("bounces&tab={$currentTab}", $start, $total, MAX_USER_PP, $status . ' ' . $GLOBALS['I18N']->get('bounces'));
$query = sprintf('select * from %s where status %s "unidentified bounce" order by date desc limit %s offset %s', $tables['bounce'], $status_compare, $limit, $offset);
$result = Sql_Query($query);
} else {
$paging = '';
$query = sprintf('select * from %s where status ' . $status_compare . ' "unidentified bounce" order by date desc', $tables['bounce']);
$result = Sql_Query($query);
}
$buttons = new ButtonGroup(new Button(PageURL2('bounces'), s('delete')));
$buttons->addButton(new ConfirmButton($GLOBALS['I18N']->get('are you sure you want to delete all unidentified bounces older than 2 months') . '?', PageURL2("{$baseurl}&action=deleteunidentified"), $GLOBALS['I18N']->get('delete all unidentified (> 2 months old)')));
$buttons->addButton(new ConfirmButton($GLOBALS['I18N']->get('are you sure you want to delete all bounces older than 2 months') . '?', PageURL2("{$baseurl}&action=deleteprocessed"), $GLOBALS['I18N']->get('delete all processed (> 2 months old)')));
$buttons->addButton(new ConfirmButton($GLOBALS['I18N']->get('are you sure you want to delete all bounces') . '?', PageURL2("{$baseurl}&action=deleteall"), $GLOBALS['I18N']->get('Delete all')));
print "<div class='actions'>\n";
print "<div class='minitabs'>\n";
print $tabs->display();
print "</div>\n";
print PageLinkButton('listbounces', $GLOBALS['I18N']->get('view bounces by list'));
if (ALLOW_DELETEBOUNCE) {
print '<div class="fright">' . $buttons->show() . '</div>';
}
print "</div><!-- .actions div-->\n";
if (!Sql_Num_Rows($result)) {
switch ($status) {
case 'unidentified':
print '<p class="information">' . s('no unidentified bounces available') . '</p>';
break;
case 'processed':
示例7: PageLinkButton
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');
}
示例8: printf
} else {
$listing = $GLOBALS['I18N']->get('Listing 1 to 50');
$limit = "limit 0,50";
$start = 0;
}
printf('<table border="1"><tr><td colspan="4" align="center">%s</td></tr><tr><td>%s</td><td>%s</td><td>
%s</td><td>%s</td></tr></table><p><hr>', $listing, PageLink2("eventlog", "<<", "start=0" . $find_url), PageLink2("eventlog", "<", sprintf('start=%d', max(0, $start - MAX_USER_PP)) . $find_url), PageLink2("eventlog", ">", sprintf('start=%d', min($total, $start + MAX_USER_PP)) . $find_url), PageLink2("eventlog", ">>", sprintf('start=%d', $total - MAX_USER_PP) . $find_url));
$result = Sql_query(sprintf('select * from %s %s order by entered desc,id desc %s', $tables["eventlog"], $where, $limit));
} else {
$result = Sql_Query(sprintf('select * from %s %s order by entered desc, id desc', $tables["eventlog"], $where));
}
printf("[ <a href=\"javascript:deleteRec2('%s','%s');\">%s</a> |\n <a href=\"javascript:deleteRec2('%s','%s');\">%s</a> ] ", $GLOBALS['I18N']->get('Are you sure you want to delete all events older than 2 months?'), PageURL2("eventlog", "Delete", "start={$start}&action=deleteprocessed"), $GLOBALS['I18N']->get('Delete all (> 2 months old)'), $GLOBALS['I18N']->get('Are you sure you want to delete all events matching this filter?'), PageURL2("eventlog", "Delete", "start={$start}&action=deleteall{$find_url}"), $GLOBALS['I18N']->get('Delete all'));
if (!Sql_Affected_Rows()) {
print '<p>' . $GLOBALS['I18N']->get('No events available') . '</p>';
}
print '<br/><br/>';
printf('<form method="get">
<input type="hidden" name="page" value="eventlog">
<input type="hidden" name="s" value="%d">
%s: <input type=text name="filter" value="%s"> %s <input type="checkbox" name="exclude" value="1" %s>
</form><br/>', $s, $GLOBALS['I18N']->get('Filter'), $filter, $GLOBALS['I18N']->get('Exclude filter'), $exclude == 1 ? 'checked' : '');
$ls = new WebblerListing($GLOBALS['I18N']->get('events'));
# @@@@ Looks like there are a few del, page, date, message which may not be i18nable.
while ($event = Sql_fetch_array($result)) {
$ls->addElement($event["id"]);
$ls->addColumn($event["id"], $GLOBALS['I18N']->get('del'), sprintf('<a href="javascript:deleteRec(\'%s\');">%s</a>', PageURL2("eventlog", "delete", "start={$start}&delete=" . $event["id"]), $GLOBALS['I18N']->get('del')));
$ls->addColumn($event["id"], $GLOBALS['I18N']->get('page'), $event["page"]);
$ls->addColumn($event["id"], $GLOBALS['I18N']->get('date'), $event["entered"]);
$ls->addColumn($event["id"], $GLOBALS['I18N']->get('message'), $event["entry"]);
}
print $ls->display();
示例9: sprintf
} else {
$enctype = '';
}
### variable initialisation and sanity checks
if (isset($_GET['id'])) {
$id = sprintf('%d', $_GET['id']);
} else {
$id = 0;
}
## page actions
$send = isset($_POST["send"]);
$prepare = isset($_POST['prepare']);
$save = !empty($_POST["save"]) || !empty($_POST['followupto']);
$savedraft = !empty($_POST["savedraft"]);
$sendtest = !empty($_POST["sendtest"]);
$baseurl = PageURL2($_GET["page"] . '&id=' . $id);
if (!isset($_GET['tab'])) {
$_GET['tab'] = '';
}
if (!empty($_GET['tab'])) {
$baseurl .= '&tab=' . $_GET['tab'];
}
### if we're not working on an existing message, create one and redirect to edit it
if (!$id) {
$defaulttemplate = getConfig('defaultmessagetemplate');
$defaultfooter = getConfig('messagefooter');
$query = " insert into %s" . " (subject, status, entered, sendformat, embargo" . " , repeatuntil, owner, template, tofield, replyto,footer)" . " values" . " ('(no subject)', 'draft', current_timestamp, 'HTML'" . " , current_timestamp, current_timestamp, ?, ?, '', '', ? )";
$query = sprintf($query, $GLOBALS['tables']['message']);
Sql_Query_Params($query, array($_SESSION['logindetails']['id'], $defaulttemplate, $defaultfooter));
$id = Sql_Insert_Id($GLOBALS['tables']['message'], 'id');
if (isset($_GET['list'])) {
示例10: sprintf
', $msg["bouncecount"]) : "");
} else {
$status = $msg['status'] . '<br/>' . $msg['rsstemplate'];
if ($msg['status'] == 'inprocess') {
$status .= '<br/>' . '<meta http-equiv="Refresh" content="300">' . $messagedata['to process'] . ' ' . $GLOBALS['I18N']->get('still to process') . '<br/>' . $GLOBALS['I18N']->get('ETA') . ': ' . $messagedata['ETA'] . '<br/>' . $GLOBALS['I18N']->get('Processing') . ' ' . sprintf('%d', $messagedata['msg/hr']) . ' ' . $GLOBALS['I18N']->get('msgs/hr');
}
$sendstats = '';
}
if ($msg['status'] == 'inprocess' || $msg['status'] == 'submitted') {
$status .= '<br/>' . PageLink2('messages&suspend=' . $msg['id'], $GLOBALS['I18N']->get('Suspend Sending'));
}
$totalsent = $msg['astext'] + $msg['ashtml'] + $msg['astextandhtml'] + $msg['aspdf'] + $msg['astextandpdf'];
printf('
<td>
%s<br />
</td><td>
%s<br />
%s<br />
%s<br />
%s
<a href="javascript:deleteRec(\'%s\');">' . $GLOBALS['I18N']->get("delete") . '</a>
</td>
</tr>', $status . $sendstats, PageLink2("message", $GLOBALS['I18N']->get("View"), "id=" . $msg["id"]), $msg['status'] != 'inprocess' ? PageLink2("messages", $GLOBALS['I18N']->get("Requeue"), "resend=" . $msg["id"]) : $totalsent . " " . $GLOBALS['I18N']->get("sent"), $msg["status"] != 'prepared' ? PageLink2("send", $GLOBALS['I18N']->get("Edit"), "id=" . $msg["id"]) : PageLink2("preparesend", $GLOBALS['I18N']->get("Edit"), "id=" . $msg["id"]), $clicks[0] && CLICKTRACK ? PageLink2("mclicks", $GLOBALS['I18N']->get("click stats"), "id=" . $msg["id"]) . '<br/>' : '', PageURL2("messages{$url_keep}", "", "delete=" . $msg["id"]));
}
}
?>
</table>
示例11: array
<input type=checkbox name="checkall" onClick="checkAll()"><?php
echo $GLOBALS['I18N']->get("Tag all users in this page");
?>
<?php
$columns = array();
$columns = explode(',', getConfig('membership_columns'));
$columns = array('country', 'Lastname');
$ls = new WebblerListing($GLOBALS['I18N']->get("Members"));
while ($user = Sql_fetch_array($result)) {
$ls->addElement($user["email"], PageUrl2("user&id=" . $user["id"]));
$ls->addColumn($user["email"], $GLOBALS['I18N']->get("confirmed"), $user["confirmed"] ? $GLOBALS["img_tick"] : $GLOBALS["img_cross"]);
if ($access != "view") {
$ls->addColumn($user["email"], $GLOBALS['I18N']->get("tag"), sprintf('<input type=checkbox name="user[%d]" value="1">', $user["id"]));
}
if ($access != "view") {
$ls->addColumn($user["email"], $GLOBALS['I18N']->get("del"), sprintf('<a href="javascript:deleteRec(\'%s\');">' . $GLOBALS['I18N']->get('Del') . '</a>', PageURL2("members", "", "start={$start}&id={$id}&delete=" . $user["id"])));
}
$msgcount = Sql_Fetch_Row_Query("select count(*) from {$tables["listmessage"]},{$tables["usermessage"]}\n where {$tables["listmessage"]}.listid = {$id} and {$tables["listmessage"]}.messageid = {$tables["usermessage"]}.messageid\n and {$tables["usermessage"]}.userid = {$user["id"]}");
$ls->addColumn($user["email"], $GLOBALS['I18N']->get("# msgs"), $msgcount[0]);
if (ENABLE_RSS) {
$msgcount = Sql_Fetch_Row_Query("select count(*) from {$tables["rssitem"]},{$tables["rssitem_user"]}\n where {$tables["rssitem"]}.list = {$id} and {$tables["rssitem"]}.id = {$tables["rssitem_user"]}.itemid and\n {$tables["rssitem_user"]}.userid = {$user["id"]}");
if ($msgcount[0]) {
$ls->addColumn($user["email"], $GLOBALS['I18N']->get("# rss"), $msgcount[0]);
}
if ($user["rssfrequency"]) {
$ls->addColumn($user["email"], $GLOBALS['I18N']->get("rss freq"), $user["rssfrequency"]);
}
$last = Sql_Fetch_Row_Query("select last from {$tables["user_rss"]} where userid = " . $user["id"]);
if ($last[0]) {
$ls->addColumn($user["email"], $GLOBALS['I18N']->get("last sent"), $last[0]);
}
示例12: Sql_query
?>
<p><?php
echo $GLOBALS["I18N"]->get("addnew") . " " . $data["name"] . ', ' . $GLOBALS["I18N"]->get("oneperline");
?>
<br />
<textarea name="itemlist" rows=20 cols=50></textarea><br />
<input type="Submit" name="addnew" value="<?php
echo $GLOBALS["I18N"]->get("addnew") . " " . $data["name"];
?>
"><br />
<?php
}
$result = Sql_query("SELECT * FROM {$table} order by listorder,name");
$num = Sql_Affected_Rows();
if ($num < 100 && $num > 25) {
printf('<input type=submit name=action value="%s"><br />', $GLOBALS["I18N"]->get("changeorder"));
}
while ($row = Sql_Fetch_array($result)) {
printf('<a href="javascript:deleteRec(\'%s\');">' . $GLOBALS['I18N']->get('Delete') . '</a> |', PageURL2("editattributes", "", "id={$id}&delete=" . $row["id"]));
if ($num < 100) {
printf(' <input type=text name="listorder[%d]" value="%s" size=5>', $row["id"], $row["listorder"]);
}
printf(' %s %s <br />', $row["name"], $row["name"] == $data["default_value"] ? $GLOBALS['I18N']->get('Default') : "");
}
if ($num && $num < 100) {
printf('<input type=submit name=action value="%s">', $GLOBALS["I18N"]->get("changeorder"));
}
?>
</form>
示例13: Sql_Fetch_Assoc_query
}
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()) {
示例14: formStart
echo formStart('action=""');
?>
<input type="hidden" name="id" value="<?php
echo $listid;
?>
">
<?php
echo $GLOBALS['I18N']->get('Find an admin');
?>
: <input type=text name="find" value="<?php
echo htmlspecialchars($find);
?>
" size="40"><input type="submit" value="<?php
echo $GLOBALS['I18N']->get('Go');
?>
">
</form></td></tr></table>
<?php
$ls = new WebblerListing($GLOBALS['I18N']->get('Administrators'));
$ls->usePanel($paging);
while ($admin = Sql_fetch_array($result)) {
$delete_url = sprintf("<a href=\"javascript:deleteRec('%s');\">" . $GLOBALS['I18N']->get('del') . "</a>", PageURL2("admins", "Delete", "start={$start}&delete=" . $admin["id"]));
$ls->addElement($admin["loginname"], PageUrl2("admin", $GLOBALS['I18N']->get('Show'), "start={$start}&id=" . $admin["id"] . $remember_find));
if (!$external && $admin['id'] != $_SESSION['logindetails']['id']) {
$ls->addColumn($admin["loginname"], $GLOBALS['I18N']->get('Del'), $delete_url);
}
}
print $ls->display();
print '<br/><hr/>';
print PageLinkButton("admin", $GLOBALS['I18N']->get('Add a new administrator'), "start={$start}" . $remember_find);
print '<p class="button">' . PageLink2("importadmin", $GLOBALS['I18N']->get('Import list of admins')) . '</p>';
示例15: Info
Info($GLOBALS['I18N']->get('Deleted') . " {$delete}");
}
print formStart('name="pagelist" class="spageEdit" ');
print '<input type="hidden" name="active[-1]" value="1" />';
## to force the active array to exist
$ls = new WebblerListing($GLOBALS['I18N']->get('subscribe pages'));
$req = Sql_Query(sprintf('select * from %s %s order by title', $tables["subscribepage"], $subselect));
while ($p = Sql_Fetch_Array($req)) {
$ls->addElement($p["id"]);
$ls->setClass($p["id"], 'row1');
$ls->addColumn($p["id"], $GLOBALS['I18N']->get('title'), stripslashes($p["title"]));
if ($require_login && isSuperUser() || !$require_login) {
$ls->addColumn($p["id"], $GLOBALS['I18N']->get('owner'), adminName($p["owner"]));
if ($p["id"] == $default) {
$checked = 'checked="checked"';
} else {
$checked = "";
}
$ls->addColumn($p["id"], $GLOBALS['I18N']->get('default'), sprintf('<input type="radio" name="default" value="%d" %s onchange="document.pagelist.submit()" />', $p["id"], $checked));
} else {
$adminname = "";
$isdefault = "";
}
$ls->addColumn($p["id"], s('active'), sprintf('<input type="checkbox" name="active[%d]" value="1" %s onchange="document.pagelist.submit()" />', $p["id"], $p["active"] ? 'checked="checked"' : ''));
$ls->addRow($p["id"], $p["active"] ? '<span class="yes" title="' . $GLOBALS['I18N']->get('active') . '"></span>' : '<span class="no" title="' . $GLOBALS['I18N']->get('not active') . '"></span>', sprintf('<span class="edit"><a class="button" href="%s&id=%d" title="' . $GLOBALS['I18N']->get('edit') . '">%s</a></span>', PageURL2("spageedit", ""), $p["id"], $GLOBALS['I18N']->get('edit')) . sprintf('<span class="delete"><a class="button" href="javascript:deleteRec(\'%s\');" title="' . $GLOBALS['I18N']->get('delete') . '">%s</a></span>', PageURL2("spage", "", "delete=" . $p["id"]), $GLOBALS['I18N']->get('del')) . sprintf('<span class="view"><a class="button" href="%s&id=%d" title="' . $GLOBALS['I18N']->get('view') . '">%s</a></span>', getConfig("subscribeurl"), $p["id"], $GLOBALS['I18N']->get('view')));
}
print $ls->display();
print '<p class="button">' . PageLink2("spageedit", s('Add a new subscribe page')) . '</p>';
?>
</form>