本文整理汇总了PHP中WebblerListing::display方法的典型用法代码示例。如果您正苦于以下问题:PHP WebblerListing::display方法的具体用法?PHP WebblerListing::display怎么用?PHP WebblerListing::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebblerListing
的用法示例。
在下文中一共展示了WebblerListing::display方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
while ($row = Sql_fetch_array($result)) {
$ls->addElement($row['id']);
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('filename'), $row['remotefile']);
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('desc'), $row['description']);
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('size'), formatBytes($row['size']));
$totalSize += $row['size'];
$phys_file = $GLOBALS['attachment_repository'] . '/' . $row['filename'];
if (is_file($phys_file) && filesize($phys_file)) {
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('file'), $GLOBALS['img_tick']);
} else {
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('file'), $GLOBALS['img_cross']);
}
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('del'), sprintf('<input type="checkbox" name="deleteattachments[]" value="%s"/>', $row['linkid']));
}
$ls->addButton(s('Delete checked'), 'javascript:document.sendmessageform.submit()');
$att_content .= '<div>' . $ls->display() . '</div>';
}
if (defined('MAX_MAILSIZE') && 3 * $totalSize > MAX_MAILSIZE) {
## the 3 is roughly the size increase to encode the string
$att_content .= Warn(s('The total size of attachments is very large. Sending this campaign may fail due to resource limits.'));
}
for ($att_cnt = 1; $att_cnt <= NUMATTACHMENTS; ++$att_cnt) {
$att_content .= sprintf('<div>%s</div><div><input type="file" name="attachment%d"/> <input class="submit" type="submit" name="save" value="%s"/></div>', $GLOBALS['I18N']->get('New Attachment'), $att_cnt, $GLOBALS['I18N']->get('Add (and save)'));
if (FILESYSTEM_ATTACHMENTS) {
$att_content .= sprintf('<div><b>%s</b> %s:</div><div><input type="text" name="localattachment%d" size="50"/></div>', $GLOBALS['I18N']->get('or'), $GLOBALS['I18N']->get('Path to file on server'), $att_cnt, $att_cnt);
}
$att_content .= sprintf('<div>%s:</div>
<div><textarea name="attachment%d_description" cols="65" rows="3" wrap="virtual"></textarea></div>', $GLOBALS['I18N']->get('Description of attachment'), $att_cnt);
}
$att_content .= '</div>';
# $shader = new WebblerShader("Attachments");
示例2: max
max(um.viewed) as lastview, count(um.viewed) as viewcount,
abs(unix_timestamp(um.entered) - unix_timestamp(um.viewed)) as responsetime
from %s um, %s user, %s msg where um.messageid = %d and um.messageid = msg.id and um.userid = user.id and um.status = "sent" and um.viewed is not null %s
group by userid %s', $GLOBALS['tables']['usermessage'], $GLOBALS['tables']['user'], $GLOBALS['tables']['message'], $id, $subselect, $limit));
$summary = array();
while ($row = Sql_Fetch_Array($req)) {
if ($download) {
## with download, the 50 per page limit is not there.
set_time_limit(60);
$element = $row['email'];
} else {
$element = shortenTextDisplay($row['email'], 15);
}
$ls->addElement($element, PageUrl2('userhistory&id=' . $row['userid']));
$ls->setClass($element, 'row1');
$ls->addRow($element, '<div class="listingsmall gray">' . $GLOBALS['I18N']->get('sent') . ': ' . formatDateTime($row['sent'], 1) . '</div>', '');
if ($row['viewcount'] > 1) {
$ls->addColumn($element, $GLOBALS['I18N']->get('firstview'), formatDateTime($row['firstview'], 1));
$ls->addColumn($element, $GLOBALS['I18N']->get('lastview'), formatDateTime($row['lastview']));
$ls->addColumn($element, $GLOBALS['I18N']->get('views'), $row['viewcount']);
} else {
$ls->addColumn($element, $GLOBALS['I18N']->get('firstview'), formatDateTime($row['firstview'], 1));
$ls->addColumn($element, $GLOBALS['I18N']->get('responsetime'), secs2time($row['responsetime']));
}
}
if ($download) {
ob_end_clean();
print $ls->tabDelimited();
} else {
print $ls->display();
}
示例3: array
$columns = array();
if (!Sql_Affected_Rows()) {
$ls->addColumn($table, "exist", $GLOBALS["img_cross"]);
}
while ($row = Sql_Fetch_Array($req)) {
$columns[strtolower($row["Field"])] = $row["Type"];
}
$tls = new WebblerListing($table);
$struct = $DBstruct[$table];
$haserror = 0;
foreach ($struct as $column => $colstruct) {
if (!ereg("index_", $column) && !ereg("^unique_", $column) && $column != "primary key") {
$tls->addElement($column);
$exist = isset($columns[strtolower($column)]);
if ($exist) {
$tls->addColumn($column, "exist", $GLOBALS["img_tick"]);
} else {
$haserror = 1;
$tls->addColumn($column, "exist", $GLOBALS["img_cross"]);
}
}
}
if (!$haserror) {
$tls->collapse();
$ls->addColumn($table, "ok", $GLOBALS["img_tick"]);
} else {
$ls->addColumn($table, "ok", $GLOBALS["img_cross"]);
}
$ls->addColumn($table, "check", $tls->display());
}
print $ls->display();
示例4: sprintf
$ls->addColumn($row["id"], $GLOBALS['I18N']->get('filename'), $row["remotefile"]);
$ls->addColumn($row["id"], $GLOBALS['I18N']->get('desc'), $row["description"]);
$ls->addColumn($row["id"], $GLOBALS['I18N']->get('size'), $row["size"]);
$phys_file = $GLOBALS["attachment_repository"] . "/" . $row["filename"];
if (is_file($phys_file) && filesize($phys_file)) {
$ls->addColumn($row["id"], $GLOBALS['I18N']->get('file'), $GLOBALS["img_tick"]);
} else {
$ls->addColumn($row["id"], $GLOBALS['I18N']->get('file'), $GLOBALS["img_cross"]);
}
$ls->addColumn($row["id"], $GLOBALS['I18N']->get('del'), sprintf('<input type=checkbox name="deleteattachments[]" value="%s">', $row["linkid"]));
// Probably need to check security rights here...
# $tabletext .= "<td><input type=checkbox name=\"deleteattachments[]\" value=\"".$row["linkid"]."\"></td>";
# $tabletext .= "</tr>\n";
}
$ls->addButton($GLOBALS['I18N']->get('delchecked'), "javascript:document.sendmessageform.submit()");
$att_content .= '<tr><td colspan=2>' . $ls->display() . '</td></tr>';
# if ($tabletext) {
# print "<tr><td colspan=2><table border=1><tr><td>Filename</td><td>Description</td><td>Size</td><td> </td></tr>\n";
# print "$tabletext";
# print "<tr><td colspan=4 align=\"center\"><input type=submit name=deleteatt value=\"Delete Checked\"></td></tr>";
# print "</table></td></tr>\n";
# }
}
for ($att_cnt = 1; $att_cnt <= NUMATTACHMENTS; $att_cnt++) {
$att_content .= sprintf('<tr><td>%s</td><td><input type=file name="attachment%d"> <input type=submit name="save" value="%s"></td></tr>', $GLOBALS['I18N']->get('newattachment'), $att_cnt, $GLOBALS['I18N']->get('addandsave'));
if (FILESYSTEM_ATTACHMENTS) {
$att_content .= sprintf('<tr><td><b>%s</b> %s:</td><td><input type=text name="localattachment%d" size="50"></td></tr>', $GLOBALS['I18N']->get('or'), $GLOBALS['I18N']->get('pathtofile'), $att_cnt, $att_cnt);
}
$att_content .= sprintf('<tr><td colspan=2>%s:</td></tr>
<tr><td colspan=2><textarea name="attachment%d_description" cols=65 rows=3 wrap="virtual"></textarea></td></tr>', $GLOBALS['I18N']->get('attachmentdescription'), $att_cnt);
}
示例5: sprintf
}
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>
<td>'.$GLOBALS['I18N']->get('Active').'</td>
<td>'.$GLOBALS['I18N']->get('Owner').'</td>
<td>'.$html . '
<tr>
<td colspan="6" align="center">
<input type="submit" name="update" value="'.$GLOBALS['I18N']->get('Save Changes').'"></td>
</tr>
示例6: s
$exists = Sql_Query(sprintf('select id,foreignkey,email from %s where foreignkey = "%s"', $tables['user'], sql_escape($user)));
} else {
$exists = Sql_Query(sprintf('select id,foreignkey,email from %s where email = "%s"', $tables['user'], sql_escape($user)));
}
if (Sql_Num_Rows($exists)) {
$id = Sql_Fetch_Array($exists);
$element = strip_tags($user);
$lsexist->addElement($element, PageUrl2('user&id=' . $id['id']));
$lsexist->addColumn($element, $GLOBALS['I18N']->get('email'), $id['email']);
$lsexist->addColumn($element, $GLOBALS['I18N']->get('key'), $id['foreignkey']);
} else {
$lsnonexist->addElement(strip_tags($user));
}
}
print $lsexist->display();
print $lsnonexist->display();
} else {
$_POST['usercheck'] = '';
}
/*
print $GLOBALS["I18N"]->get("Page to check the existence of users in the database");
*/
$content .= '<form method="post" action="">';
$content .= '<table class="usercheckForm">';
$content .= '<tr><td>' . s('What is the type of information you want to check') . '</td></tr>';
$content .= '<tr><td><label for="foreignkey">' . s('Foreign Key') . '</label> <input type="radio" id="foreignkey" name="check" value="foreignkey"></td></tr>';
$content .= '<tr><td><label for="email">' . s('Email') . '</label> <input type="radio" id="email" name="check" value="email"></td></tr>';
$content .= '<tr><td>' . s('Paste the values to check in this box, one per line') . '</td></tr>';
$content .= '<tr><td><input type="submit" name="continue" value="' . s('Continue') . '" class="button"></td></tr>';
$content .= '<tr><td><textarea name="usercheck" rows=30 cols=65>' . htmlspecialchars(stripslashes($_POST['usercheck'])) . '</textarea></td></tr>';
$content .= '<tr><td><input type="submit" name="continue" value="' . s('Continue') . '" class="button"></td></tr>';
示例7: addslashes
}
}
if ($num) {
$userselection_query = "select {$select_clause} where {$where_clause}";
# $count_query = addslashes($count_query);
if ($_GET["calculate"]) {
ob_end_flush();
print "<h3>{$userselection_query}</h3>";
print '<p class="information">Calculating ...';
flush();
$req = Sql_Query($userselection_query);
print '.. ' . Sql_Num_Rows($req) . " users apply</p>";
}
$ls->addButton("Calculate", $baseurl . '&tab=' . $_GET["tab"] . '&calculate="1"');
$ls->addButton("Reset", $baseurl . '&tab=' . $_GET["tab"] . '&reset="1"');
$existing_criteria = $ls->display();
}
$att_js = '
<script language="Javascript" type="text/javascript">
var values = Array();
var operators = Array();
var value_divs = Array();
var value_default = Array();
';
if (sizeof($used_attributes)) {
$already_used = ' and id not in (' . join(',', $used_attributes) . ')';
} else {
$already_used = "";
}
$attreq = Sql_Query(sprintf('select * from %s where type in ("select","radio","date","checkboxgroup","checkbox") %s', $tables["attribute"], $already_used));
while ($att = Sql_Fetch_array($attreq)) {
示例8: PageLinkClass
$ls->addColumn($element, " ", PageLinkClass('upgrade', $GLOBALS['I18N']->get('Upgrade'), '', 'hometext'));
$ls->setClass($element, "upgrade");
}
if (checkAccess("dbcheck")) {
$some = 1;
$element = $GLOBALS['I18N']->get('dbcheck');
$ls->addElement($element, PageURL2("dbcheck"));
$ls->addColumn($element, " ", PageLinkClass('dbcheck', $GLOBALS['I18N']->get('Check Database structure'), '', 'hometext'));
$ls->setClass($element, "dbcheck");
}
if (checkAccess("eventlog")) {
$some = 1;
$element = $GLOBALS['I18N']->get('eventlog');
$ls->addElement($element, PageURL2("eventlog"));
$ls->addColumn($element, " ", PageLinkClass('eventlog', $GLOBALS['I18N']->get('View the eventlog'), '', 'hometext'));
$ls->setClass($element, "view-log");
}
if (checkAccess("admin") && $GLOBALS["require_login"] && !isSuperUser()) {
$some = 1;
$element = $GLOBALS['I18N']->get('admin');
$ls->addElement($element, PageURL2("admin"));
$ls->addColumn($element, " ", PageLinkClass('admin', $GLOBALS['I18N']->get('Change your details (e.g. password)'), '', 'hometext'));
$ls->setClass($element, "change-pass");
}
if ($some) {
print '<h3><a name="system">' . $GLOBALS['I18N']->get('System Functions') . '</a></h3>';
$ls->noShader();
$ls->noHeader();
print '<div>' . $ls->display() . '</div>';
}
print '</div>';
示例9: printf
$ls->addColumn($row["id"],"desc",$row["description"]);
$ls->addColumn($row["id"],"size",$row["size"]);
$phys_file = $GLOBALS["attachment_repository"]."/".$row["filename"];
if (is_file($phys_file) && filesize($phys_file)) {
$ls->addColumn($row["id"],"file",$GLOBALS["img_tick"]);
} else {
$ls->addColumn($row["id"],"file",$GLOBALS["img_cross"]);
}
$ls->addColumn($row["id"],"del",sprintf('<input type=checkbox name="deleteattachments[]" value="%s">',$row["linkid"]));
// Probably need to check security rights here...
# $tabletext .= "<td><input type=checkbox name=\"deleteattachments[]\" value=\"".$row["linkid"]."\"></td>";
# $tabletext .= "</tr>\n";
}
$ls->addButton("Delete Checked","javascript:document.sendmessageform.submit()");
print '<tr><td colspan=2>'.$ls->display().'</td></tr>';
# if ($tabletext) {
# print "<tr><td colspan=2><table border=1><tr><td>Filename</td><td>Description</td><td>Size</td><td> </td></tr>\n";
# print "$tabletext";
# print "<tr><td colspan=4 align=\"center\"><input type=submit name=deleteatt value=\"Delete Checked\"></td></tr>";
# print "</table></td></tr>\n";
# }
}
for ($att_cnt = 1;$att_cnt <= NUMATTACHMENTS;$att_cnt++) {
printf ('<tr><td>New Attachment</td><td><input type=file name="attachment%d"> <input type=submit name="save" value="Add (and save)"></td></tr>',$att_cnt);
if (FILESYSTEM_ATTACHMENTS) {
printf('<tr><td><b>or</b> path to file on server:</td><td><input type=text name="localattachment%d" size="50"></td></tr>',$att_cnt,$att_cnt);
}
printf ('<tr><td colspan=2>Description of attachment:</td></tr>
<tr><td colspan=2><textarea name="attachment%d_description" cols=45 rows=3 wrap="virtual"></textarea></td></tr>',$att_cnt);