本文整理汇总了PHP中WebblerListing::addELement方法的典型用法代码示例。如果您正苦于以下问题:PHP WebblerListing::addELement方法的具体用法?PHP WebblerListing::addELement怎么用?PHP WebblerListing::addELement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebblerListing
的用法示例。
在下文中一共展示了WebblerListing::addELement方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Redirect
Redirect('list');
} else {
Info(s('Categories saved'), true);
}
}
$req = Sql_Query(sprintf('select * from %s %s', $tables['list'], $subselect));
if (!Sql_Affected_Rows()) {
Info(s('All lists have already been assigned a category') . '<br/>' . PageLinkButton('list', s('Back')), true);
}
print '<div class="fright">' . PageLinkButton('catlists&show=all', s('Re-edit all lists')) . '</div>';
print '<div class="fright">' . PageLinkButton('configure&id=list_categories&ret=catlists', $I18N->get('Configure Categories')) . '</div>';
$ls = new WebblerListing(s('Categorise lists'));
$aListCategories = listCategories();
if (count($aListCategories)) {
while ($row = Sql_Fetch_Assoc($req)) {
$ls->addELement($row['id']);
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('Name'), stripslashes($row['name']));
$catselect = '<select name="category[' . $row['id'] . ']">';
$catselect .= '<option value="">-- ' . s('choose category') . '</option>';
$catselect .= '<option value="">-- ' . s('none') . '</option>';
foreach ($aListCategories as $category) {
$category = trim($category);
$catselect .= sprintf('<option value="%s" %s>%s</option>', $category, $category == $row['category'] ? 'selected="selected"' : '', $category);
}
$catselect .= '</select>';
$ls->addColumn($row['id'], s('Category'), $catselect);
}
}
$ls->addButton(s('save'), 'javascript:document.categoryedit.submit();');
print $ls->display();
print '</form>';