本文整理汇总了PHP中tda函数的典型用法代码示例。如果您正苦于以下问题:PHP tda函数的具体用法?PHP tda怎么用?PHP tda使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tda函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: plugin_help
function plugin_help()
{
$name = gps('name');
pagetop(gTxt('plugin_help'));
$help = $name ? safe_field('help', 'txp_plugin', "name = '" . doSlash($name) . "'") : '';
echo startTable('edit') . tr(tda($help, ' width="600"')) . endTable();
}
示例2: sec_section_list
function sec_section_list($message = '')
{
pagetop(gTxt('sections'), $message);
global $wlink;
$pageslist = safe_column("name", "txp_page", "1=1");
$styleslist = safe_column("name", "txp_css", "1=1");
$out[] = tr(tdcs(strong(gTxt('section_head')) . popHelp('section_category'), 3));
$out[] = tr(tdcs(form(fInput('text', 'name', '', 'edit', '', '', 10) . fInput('submit', '', gTxt('Create'), 'smallerbox') . eInput('section') . sInput('section_create')), 3));
$defrow = safe_row("page, css", "txp_section", "name like 'default'");
$out[] = form(tr(td(gTxt('default')) . td(startTable('edit', 'left', '') . tr(fLabelCell(gTxt('uses_page') . ':') . td(selectInput('page', $pageslist, $defrow['page']) . popHelp('section_uses_page'), '', 'noline')) . tr(fLabelCell(gTxt('uses_style') . ':') . td(selectInput('css', $styleslist, $defrow['css']) . popHelp('section_uses_css'), '', 'noline')) . tr(tda(fInput('submit', '', gTxt('save_button'), 'smallerbox'), ' colspan="2" style="border:0"')) . endTable()) . td()) . eInput('section') . sInput('section_save') . hInput('name', 'default'));
$rs = safe_rows_start("*", "txp_section", "name!='' order by name");
if ($rs) {
while ($a = nextRow($rs)) {
extract($a);
if ($name == 'default') {
continue;
}
$deletelink = dLink('section', 'section_delete', 'name', $name, '', 'type', 'section');
$form = startTable('edit') . stackRows(fLabelCell(gTxt('section_name') . ':') . fInputCell('name', $name, 1, 20), fLabelCell(gTxt('section_longtitle') . ':') . fInputCell('title', $title, 1, 20), fLabelCell(gTxt('uses_page') . ':') . td(selectInput('page', $pageslist, $page) . popHelp('section_uses_page'), '', 'noline'), fLabelCell(gTxt('uses_style') . ':') . td(selectInput('css', $styleslist, $css) . popHelp('section_uses_css'), '', 'noline'), fLabelCell(gTxt('selected_by_default') . '?') . td(yesnoradio('is_default', $is_default) . popHelp('section_is_default'), '', 'noline'), fLabelCell(gTxt('on_front_page') . '?') . td(yesnoradio('on_frontpage', $on_frontpage) . popHelp('section_on_frontpage'), '', 'noline'), fLabelCell(gTxt('syndicate') . '?') . td(yesnoradio('in_rss', $in_rss) . popHelp('section_syndicate'), '', 'noline'), fLabelCell(gTxt('include_in_search') . '?') . td(yesnoradio('searchable', $searchable) . popHelp('section_searchable'), '', 'noline'), tda(fInput('submit', '', gTxt('save_button'), 'smallerbox'), ' colspan="2" style="border:0"')) . endTable() . eInput('section') . sInput('section_save') . hInput('old_name', $name);
$form = form($form);
$out[] = tr(td($name) . td($form) . td($deletelink));
}
}
echo startTable('list') . join('', $out) . endTable();
}
示例3: header
function header()
{
$out[] = '<table id="pagetop" cellpadding="0" cellspacing="0">' . n . '<tr id="branding"><td><h1 id="textpattern">Textpattern</h1></td><td id="navpop">' . navPop(1) . '</td></tr>' . n . '<tr id="nav-primary"><td align="center" class="tabs" colspan="2">';
if (!$this->is_popup) {
$out[] = '<table cellpadding="0" cellspacing="0" align="center">' . n . '<tr><td id="messagepane"> ' . $this->announce($this->message) . '</td>';
$secondary = '';
foreach ($this->menu as $tab) {
$tc = $tab['active'] ? 'tabup' : 'tabdown';
$atts = ' class="' . $tc . '"';
$hatts = ' href="?event=' . $tab['event'] . '" class="plain"';
$out[] = tda(tag($tab['label'], 'a', $hatts), $atts);
if ($tab['active'] && !empty($tab['items'])) {
$secondary = '</td></tr><tr id="nav-secondary"><td align="center" class="tabs" colspan="2">' . n . '<table cellpadding="0" cellspacing="0" align="center">' . n . '<tr>';
foreach ($tab['items'] as $item) {
$tc = $item['active'] ? 'tabup' : 'tabdown2';
$secondary .= '<td class="' . $tc . '"><a href="?event=' . $item['event'] . '" class="plain">' . $item['label'] . '</a></td>';
}
$secondary .= '</tr></table>';
}
}
$out[] = '<td id="view-site" class="tabdown"><a href="' . hu . '" class="plain" target="_blank">' . gTxt('tab_view_site') . '</a></td>';
$out[] = '</tr></table>';
$out[] = $secondary;
}
$out[] = '</td></tr></table>';
return join(n, $out);
}
示例4: areatab
function areatab($label, $event, $tarea, $area)
{
$tc = $area == $event ? 'tabup' : 'tabdown';
$atts = ' class="' . $tc . '" onclick="window.location.href=\'?event=' . $tarea . '\'"';
$hatts = ' href="?event=' . $tarea . '" class="plain"';
return tda(tag($label, 'a', $hatts), $atts);
}
示例5: areatab
function areatab($label, $event, $tarea, $area)
{
$tc = $area == $event ? 'tabup' : 'tabdown';
$atts = ' class="' . $tc . '"';
$hatts = ' href="?event=' . $tarea . '" class="plain"';
return n . t . t . t . tda(tag($label, 'a', $hatts), $atts);
}
示例6: discuss_list
function discuss_list($message = '')
{
pagetop(gTxt('list_discussions'), $message);
extract(doSlash(gpsa(array('page', 'crit'))));
extract(get_prefs());
$total = safe_count('txp_discuss', "1=1");
$limit = max(@$comment_list_pageby, 25);
$numPages = ceil($total / $limit);
$page = !$page ? 1 : $page;
$offset = ($page - 1) * $limit;
$nav[] = $page > 1 ? PrevNextLink("discuss", $page - 1, gTxt('prev'), 'prev') : '';
$nav[] = sp . small($page . '/' . $numPages) . sp;
$nav[] = $page != $numPages ? PrevNextLink("discuss", $page + 1, gTxt('next'), 'next') : '';
$criteria = $crit ? "message like '%{$crit}%'" : '1=1';
$rs = safe_rows_start("*, unix_timestamp(posted) as uPosted", "txp_discuss", "{$criteria} order by posted desc limit {$offset}, {$limit}");
echo pageby_form('discuss', $comment_list_pageby);
if ($rs) {
echo '<form action="index.php" method="post" name="longform" onsubmit="return verify(\'' . gTxt('are_you_sure') . '\')">', startTable('list'), assHead('date', 'name', 'message', 'parent', '');
while ($a = nextRow($rs)) {
extract($a);
$dmessage = $visible == SPAM ? short_preview($message) : $message;
$date = "" . date("M d, g:ia", $uPosted + tz_offset()) . "";
$editlink = eLink('discuss', 'discuss_edit', 'discussid', $discussid, $date);
$cbox = fInput('checkbox', 'selected[]', $discussid);
$tq = fetch('Title', 'textpattern', 'ID', $parentid);
$parent = !$tq ? gTxt('article_deleted') : $tq;
echo assRow(array($editlink => 100, $name => 100, $dmessage => 250, $parent => 100, $cbox => 20), ' class="' . ($visible == VISIBLE ? 'visible' : ($visible == SPAM ? 'spam' : 'moderate')) . '"');
}
echo tr(tda(select_buttons() . discuss_multiedit_form(), ' colspan="5" style="text-align:right;border:0px"'));
echo endTable() . '</form>';
echo startTable('edit'), tr(td(form(fInput('text', 'crit', '', 'edit') . fInput('submit', 'search', gTxt('search'), 'smallbox') . eInput("discuss") . sInput("list"))) . td(graf(join('', $nav)))) . tr(tda(graf('<a href="index.php?event=discuss' . a . 'step=ipban_list">' . gTxt('list_banned_ips') . '</a>'), ' colspan="2" align="center" valign="middle"')), endTable();
} else {
echo graf(gTxt('no_comments_recorded'), ' align="center"');
}
}
示例7: page_edit
function page_edit($message = '')
{
global $step;
pagetop(gTxt('edit_pages'), $message);
extract(gpsa(array('name', 'div', 'newname', 'copy')));
$name = (!$name or $step == 'page_delete') ? 'default' : $name;
$name = $copy && trim(preg_replace('/[<>&"\']/', '', $newname)) ? $newname : $name;
echo startTable('edit') . tr(tda(n . hed(gTxt('tagbuilder'), 2) . n . n . hed('<a href="#article-tags" onclick="toggleDisplay(\'article-tags\'); return false;">' . gTxt('page_article_hed') . '</a>', 3, ' class="plain"') . n . '<div id="article-tags">' . taglinks('page_article') . '</div>' . n . n . hed('<a href="#article-nav-tags" onclick="toggleDisplay(\'article-nav-tags\'); return false;">' . gTxt('page_article_nav_hed') . '</a>', 3, ' class="plain"') . n . '<div id="article-nav-tags" style="display: none;">' . taglinks('page_article_nav') . '</div>' . n . n . hed('<a href="#nav-tags" onclick="toggleDisplay(\'nav-tags\'); return false;">' . gTxt('page_nav_hed') . '</a>', 3, ' class="plain"') . n . '<div id="nav-tags" style="display: none;">' . taglinks('page_nav') . '</div>' . n . n . hed('<a href="#xml-tags" onclick="toggleDisplay(\'xml-tags\'); return false;">' . gTxt('page_xml_hed') . '</a>', 3, ' class="plain"') . n . '<div id="xml-tags" style="display: none;">' . taglinks('page_xml') . '</div>' . n . n . hed('<a href="#misc-tags" onclick="toggleDisplay(\'misc-tags\'); return false;">' . gTxt('page_misc_hed') . '</a>', 3, ' class="plain"') . n . '<div id="misc-tags" style="display: none;">' . taglinks('page_misc') . '</div>' . n . n . hed('<a href="#file-tags" onclick="toggleDisplay(\'file-tags\'); return false;">' . gTxt('page_file_hed') . '</a>', 3, ' class="plain"') . n . '<div id="file-tags" style="display: none;">' . taglinks('page_file') . '</div>', ' class="column"') . tda(page_edit_form($name), ' class="column"') . tda(hed(gTxt('all_pages'), 2) . page_list($name), ' class="column"')) . endTable();
}
示例8: page_edit
function page_edit($message = '')
{
global $step;
pagetop(gTxt('edit_pages'), $message);
extract(gpsa(array('name', 'div')));
$name = (!$name or $step == 'page_delete') ? 'default' : $name;
$divline = $step == "div_edit" ? graf(gTxt('you_are_editing_div') . sp . strong($div)) : '';
echo startTable('edit') . tr(td() . td(graf(gTxt('you_are_editing_page') . sp . strong($name)) . $divline) . td()) . tr(tda(hed(gTxt('useful_tags'), 2) . graf(gTxt('page_article_hed') . br . small(taglinks('page_article')), ' class="column"') . graf(gTxt('page_article_nav_hed') . br . small(taglinks('page_article_nav')), ' class="column"') . graf(gTxt('page_nav_hed') . br . small(taglinks('page_nav')), ' class="column"') . graf(gTxt('page_xml_hed') . br . small(taglinks('page_xml')), ' class="column"') . graf(gTxt('page_misc_hed') . br . small(taglinks('page_misc')), ' class="column"') . graf(gTxt('page_file_hed') . br . small(taglinks('page_file')), ' class="column"')) . tda(page_edit_form($name), ' class="column"') . tda(hed(gTxt('all_pages'), 2) . page_list($name), ' class="column"')) . endTable();
}
示例9: list_list
function list_list($message = "", $post = '')
{
extract(get_prefs());
$lvars = array("page", "sort", "dir", "crit", 'method');
extract(gpsa($lvars));
global $statuses, $step;
pagetop("Textpattern", $message);
$total = getCount('textpattern', "1");
$limit = $article_list_pageby ? $article_list_pageby : 25;
$numPages = ceil($total / $limit);
$page = !$page ? 1 : $page;
$offset = ($page - 1) * $limit;
if (!$sort) {
$sort = "Posted";
}
if (!$dir) {
$dir = "desc";
}
if ($dir == "desc") {
$linkdir = "asc";
} else {
$linkdir = "desc";
}
if ($crit) {
$critsql = array('title_body' => "Title rlike '{$crit}' or Body rlike '{$crit}'", 'author' => "AuthorID rlike '{$crit}'", 'categories' => "Category1 rlike '{$crit}' or Category2 rlike '{$crit}'", 'section' => "Section rlike '{$crit}'", 'status' => "Status rlike '{$crit}'");
$criteria = $critsql[$method];
$limit = 500;
} else {
$criteria = 1;
}
$rs = safe_rows("*, unix_timestamp(Posted) as uPosted", "textpattern", "{$criteria} order by {$sort} {$dir} limit {$offset},{$limit}");
echo !$crit ? list_nav_form($page, $numPages, $sort, $dir) : '', list_searching_form($crit, $method);
if ($rs) {
echo '<form action="index.php" method="post" onsubmit="return verify(\'' . gTxt('are_you_sure') . '\')">', startTable('list'), '<tr>', column_head('posted', 'Posted', 'list', 1, $linkdir), column_head('title', 'Title', 'list', 1, $linkdir), $use_sections ? column_head('section', 'Section', 'list', 1, $linkdir) : '', $use_categories ? column_head('category1', 'Category1', 'list', 1, $linkdir) . column_head('category2', 'Category2', 'list', 1, $linkdir) : '', hCell(gTxt('Author')), column_head(gTxt('status'), 'Status', 'list', 1, $linkdir), td(), '</tr>';
foreach ($rs as $a) {
extract($a);
if ($use_categories == 1) {
$cat1 = $Category1;
$cat2 = $Category2;
}
$stat = !empty($Status) ? $statuses[$Status] : '';
if ($use_sections == 1) {
$sect = $Section;
}
$adate = date("d M y", $uPosted + $timeoffset);
$alink = eLink('article', 'edit', 'ID', $ID, $adate);
$tlink = eLink('article', 'edit', 'ID', $ID, $Title);
$modbox = fInput('checkbox', 'selected[]', $ID);
echo "<tr>" . n, td($alink), td($tlink, 200), $use_sections ? td($sect, 75) : '', $use_categories ? td($cat1, 75) . td($cat2, 75) : '', td($AuthorID), td($stat, 45), td($modbox), '</tr>' . n;
}
echo tr(tda(list_multiedit_form(), ' colspan="8" style="text-align:right;border:0px"'));
echo "</table></form>";
echo pageby_form('list', $article_list_pageby);
unset($sort);
}
}
示例10: page_edit
function page_edit($message = '')
{
global $step;
pagetop(gTxt('edit_pages'), $message);
extract(gpsa(array('name', 'newname', 'copy')));
if (!$name or $step == 'page_delete') {
$name = safe_field('page', 'txp_section', "name = 'default'");
}
$name = $copy && trim(preg_replace('/[<>&"\']/', '', $newname)) ? $newname : $name;
echo startTable('edit') . tr(tda(n . hed(gTxt('tagbuilder'), 2) . n . n . hed('<a href="#article-tags">' . gTxt('page_article_hed') . '</a>', 3, ' class="plain lever expanded"') . n . '<div id="article-tags" class="toggle on" style="display:block">' . taglinks('page_article') . '</div>' . n . n . hed('<a href="#article-nav-tags">' . gTxt('page_article_nav_hed') . '</a>', 3, ' class="plain lever"') . n . '<div id="article-nav-tags" class="toggle" style="display:none">' . taglinks('page_article_nav') . '</div>' . n . n . hed('<a href="#nav-tags">' . gTxt('page_nav_hed') . '</a>', 3, ' class="plain lever"') . n . '<div id="nav-tags" class="toggle" style="display:none">' . taglinks('page_nav') . '</div>' . n . n . hed('<a href="#xml-tags">' . gTxt('page_xml_hed') . '</a>', 3, ' class="plain lever"') . n . '<div id="xml-tags" class="toggle" style="display:none">' . taglinks('page_xml') . '</div>' . n . n . hed('<a href="#misc-tags">' . gTxt('page_misc_hed') . '</a>', 3, ' class="plain lever"') . n . '<div id="misc-tags" class="toggle" style="display:none">' . taglinks('page_misc') . '</div>' . n . n . hed('<a href="#file-tags">' . gTxt('page_file_hed') . '</a>', 3, ' class="plain lever"') . n . '<div id="file-tags" class="toggle" style="display:none">' . taglinks('page_file') . '</div>', ' class="column"') . tda(page_edit_form($name), ' class="column"') . tda(hed(gTxt('all_pages'), 2) . page_list($name), ' class="column"')) . endTable();
}
示例11: list_plugins
function list_plugins($message = '')
{
pagetop(gTxt('edit_plugins'), $message);
echo startTable('list') . tr(tda(plugin_form() . plugin_form_old(), ' colspan="5" style="border:0;height:50px"')) . assHead('plugin', 'author', 'version', 'description', 'active', '');
$rs = safe_rows("*", "txp_plugin", "1 order by name");
foreach ($rs as $a) {
extract($a);
// nice to have eval() do a syntax check on the plugin here
echo tr(td(eLink('plugin', 'edit', 'name', $name, $name), 150) . td('<a href="' . $author_uri . '">' . $author . '</a>', 100) . td($version, 10) . td($description, 260) . td(status_link($status, $name, yes_no($status)), 30) . td(dLink('plugin', 'delete', 'name', $name), 30));
unset($name, $page, $deletelink);
}
echo endTable();
}
示例12: sec_section_list
function sec_section_list($message = '')
{
global $wlink;
pagetop(gTxt('sections'), $message);
$default = safe_row('page, css', 'txp_section', "name = 'default'");
$pages = safe_column('name', 'txp_page', "1 = 1");
$styles = safe_column('name', 'txp_css', "1 = 1");
echo n . n . startTable('list') . n . n . tr(tda(n . n . hed(gTxt('section_head') . sp . popHelp('section_category'), 1) . n . n . form(fInput('text', 'name', '', 'edit', '', '', 10) . fInput('submit', '', gTxt('create'), 'smallerbox') . eInput('section') . sInput('section_create')), ' colspan="3"')) . n . n . tr(td(gTxt('default')) . td(form('<table>' . tr(fLabelCell(gTxt('uses_page') . ':') . td(selectInput('page', $pages, $default['page']) . sp . popHelp('section_uses_page'), '', 'noline')) . tr(fLabelCell(gTxt('uses_style') . ':') . td(selectInput('css', $styles, $default['css']) . sp . popHelp('section_uses_css'), '', 'noline')) . tr(tda(fInput('submit', '', gTxt('save_button'), 'smallerbox') . eInput('section') . sInput('section_save') . hInput('name', 'default'), ' colspan="2" class="noline"')) . endTable())) . td());
$rs = safe_rows_start('*', 'txp_section', "name != 'default' order by name");
if ($rs) {
while ($a = nextRow($rs)) {
extract($a);
echo n . n . tr(n . td($name) . n . td(form('<table>' . n . n . tr(fLabelCell(gTxt('section_name') . ':') . fInputCell('name', $name, 1, 20)) . n . n . tr(fLabelCell(gTxt('section_longtitle') . ':') . fInputCell('title', $title, 1, 20)) . n . n . tr(fLabelCell(gTxt('uses_page') . ':') . td(selectInput('page', $pages, $page) . sp . popHelp('section_uses_page'), '', 'noline')) . n . n . tr(fLabelCell(gTxt('uses_style') . ':') . td(selectInput('css', $styles, $css) . sp . popHelp('section_uses_css'), '', 'noline')) . n . n . tr(fLabelCell(gTxt('selected_by_default')) . td(yesnoradio('is_default', $is_default, '', $name) . sp . popHelp('section_is_default'), '', 'noline')) . n . n . tr(fLabelCell(gTxt('on_front_page')) . td(yesnoradio('on_frontpage', $on_frontpage, '', $name) . sp . popHelp('section_on_frontpage'), '', 'noline')) . n . n . tr(fLabelCell(gTxt('syndicate')) . td(yesnoradio('in_rss', $in_rss, '', $name) . sp . popHelp('section_syndicate'), '', 'noline')) . n . n . tr(fLabelCell(gTxt('include_in_search')) . td(yesnoradio('searchable', $searchable, '', $name) . sp . popHelp('section_searchable'), '', 'noline')) . n . n . tr(tda(fInput('submit', '', gTxt('save_button'), 'smallerbox') . eInput('section') . sInput('section_save') . hInput('old_name', $name), ' colspan="2" class="noline"')) . endTable(), '', '', 'post', '', 'section-' . $name)) . td(dLink('section', 'section_delete', 'name', $name, '', 'type', 'section')), " id=\"section-{$name}\"");
}
}
echo n . n . endTable();
}
示例13: switch_tool
function switch_tool()
{
global $vars, $event, $step, $tools;
extract(gpsa($vars));
pagetop(gTxt('txp_import'), '');
?>
<script type="text/javascript">
<!--//
function showHideFields($sel)
{
if(document.getElementById){
document.getElementById('mtblogid').style.display = ($sel=='mtdb') ? 'block': 'none';
document.getElementById('wponly').style.display = ($sel=='wp') ? 'block': 'none';
document.getElementById('databased').style.display = ($sel=='wp' || $sel=='mtdb' || $sel=='b2')? 'block':'none';
}
}
//-->
</script>
<?php
$content = startTable('edit');
$content .= tr(tdcs(hed(gTxt('txp_import'), 3), 2));
//Select tool
$content .= tr(fLabelCell('select_tool', 'import', 'from') . td(tag(type_options($tools), 'select', " name=\"import_tool\" onchange=\"showHideFields(this.value);\""), '', 'from'), ' class="import-from"');
//Some data we collect
$content .= tr(fLabelCell('import_section', 'import_section', 'section') . td(import_section_popup(''), '', 'section'), ' class="import-section"');
$status_options = array(4 => gTxt('live'), 1 => gTxt('draft'), 2 => gTxt('hidden'), 3 => gTxt('pending'));
$content .= tr(fLabelCell('import_status', 'import_status', 'status') . td(type_select($status_options), '', 'status'), ' class="import-status"');
$content .= tr(fLabelCell('import_invite', 'import_invite', 'comment-invite') . td(fInput('text', 'comments_invite', gTxt('comments'), 'edit'), '', 'comment-invite'), ' class="import-comment"');
//DataBase imports only
$databased = tr(tdcs(hed(gTxt('database_stuff'), 3), 2)) . tr(fLabelCell('import_database', 'import_database', 'database') . td(fInput('text', 'importdb', '', 'edit'), '', 'database'), ' class="import-database"') . tr(fLabelCell('import_login', 'import_login', 'login') . td(fInput('text', 'importdblogin', '', 'edit'), '', 'login'), ' class="import-login"') . tr(fLabelCell('import_password', 'import_password', 'password') . td(fInput('text', 'importdbpass', '', 'edit'), '', 'password'), ' class="import-password"') . tr(fLabelCell('import_host', 'import_host', 'host') . td(fInput('text', 'importdbhost', '', 'edit'), '', 'host'), ' class="import-host"');
//Ugly, but a way to present a clean screen with only required fields
//while we keep JavaScript code at minimum
$content .= tr(tda(tag($databased, 'table', ' id="databased" style="display: none; border: none;"'), ' colspan="2"'));
//MT-DB Specific
$mtblogid = tr(fLabelCell('import_blogid', 'import_blogid', 'blog-id') . td(fInput('text', 'blog_id', '', 'edit'), '', 'blog-id'), ' class="import-blog-id"');
$content .= tr(tda(tag($mtblogid, 'table', ' id="mtblogid" style="display: none; border: none;"'), ' colspan="2"'));
//WordPress specific option
$wponly = tr(fLabelCell('import_wpprefix', 'import_wpprefix', 'wp-prefix') . td(fInput('text', 'wpdbprefix', 'wp_', 'edit'), '', 'wp-prefix'), ' class="import-wp-prefix"');
$content .= tr(tda(tag($wponly, 'table', ' id="wponly" style="display: none; border: none;"'), ' colspan="2"'));
$content .= endTable();
$content .= tag(fInput('submit', 'choose', gTxt('continue'), 'publish'), 'p', ' style="text-align:center"');
$content .= sInput('start_import') . eInput('import');
echo '<div id="' . $event . '_container" class="txp-container txp-edit">' . form($content, '', '', 'post', '', '', 'import') . '</div>';
}
示例14: sec_section_list
function sec_section_list($message = '')
{
global $wlink;
pagetop(gTxt('sections'), $message);
$default = safe_row('page, css', 'txp_section', "name = 'default'");
$home = safe_row('page, css', 'txp_section', "name = 'home'");
$pages = safe_column('name', 'txp_page', "1 = 1");
$styles = safe_column('name', 'txp_css', "1 = 1");
echo n . n . startTable('list') . n . n . tr(tda(n . n . hed(gTxt('section_head') . sp . popHelp('section_category'), 1) . n . n . form(fInput('text', 'name', '', 'edit', '', '', 10) . fInput('submit', '', gTxt('create'), 'smallerbox') . eInput('section') . sInput('section_create')), ' colspan="3"')) . n . n . tr(tda(gTxt('home'), ' onclick="toggleDisplay(\'section_home\'); return false;"') . td(form('<table id="section_home">' . tr(fLabelCell(gTxt('uses_page') . ':') . td(selectInput('page', $pages, $home['page']) . sp . popHelp('section_uses_page'), '', 'noline')) . tr(fLabelCell(gTxt('uses_style') . ':') . td(selectInput('css', $styles, $home['css']) . sp . popHelp('section_uses_css'), '', 'noline')) . pluggable_ui('section_ui', 'extend_detail_form', '', $home) . tr(tda(fInput('submit', '', gTxt('save_button'), 'smallerbox') . eInput('section') . sInput('section_save') . hInput('name', 'home'), ' colspan="2" class="noline"')) . endTable())) . td()) . n . n . tr(tda(gTxt('default'), ' onclick="toggleDisplay(\'section_default\'); return false;"') . td(form('<table id="section_default">' . tr(fLabelCell(gTxt('uses_page') . ':') . td(selectInput('page', $pages, $default['page']) . sp . popHelp('section_uses_page'), '', 'noline')) . tr(fLabelCell(gTxt('uses_style') . ':') . td(selectInput('css', $styles, $default['css']) . sp . popHelp('section_uses_css'), '', 'noline')) . pluggable_ui('section_ui', 'extend_detail_form', '', $default) . tr(tda(fInput('submit', '', gTxt('save_button'), 'smallerbox') . eInput('section') . sInput('section_save') . hInput('name', 'default'), ' colspan="2" class="noline"')) . endTable())) . td());
$rs = safe_rows_start('*', 'txp_section', "name != 'default' AND name != 'home' order by name");
if ($rs) {
while ($a = nextRow($rs)) {
extract($a);
echo n . n . tr(n . tda($name, ' onclick="toggleDisplay(\'section_' . $name . '\'); return false;"') . n . td(form('<table id="section_' . $name . '">' . n . n . tr(fLabelCell(gTxt('section_name') . ':') . fInputCell('name', $name, 1, 20)) . n . n . tr(fLabelCell(gTxt('section_longtitle') . ':') . fInputCell('title', $title, 1, 20)) . n . n . tr(fLabelCell(gTxt('uses_page') . ':') . td(selectInput('page', $pages, $page) . sp . popHelp('section_uses_page'), '', 'noline')) . n . n . tr(fLabelCell(gTxt('uses_style') . ':') . td(selectInput('css', $styles, $css) . sp . popHelp('section_uses_css'), '', 'noline')) . n . n . tr(fLabelCell(gTxt('selected_by_default')) . td(yesnoradio('is_default', $is_default, '', $name) . sp . popHelp('section_is_default'), '', 'noline')) . n . n . tr(fLabelCell(gTxt('on_front_page')) . td(yesnoradio('on_frontpage', $on_frontpage, '', $name) . sp . popHelp('section_on_frontpage'), '', 'noline')) . n . n . tr(fLabelCell(gTxt('syndicate')) . td(yesnoradio('in_rss', $in_rss, '', $name) . sp . popHelp('section_syndicate'), '', 'noline')) . n . n . tr(fLabelCell(gTxt('include_in_search')) . td(yesnoradio('searchable', $searchable, '', $name) . sp . popHelp('section_searchable'), '', 'noline')) . n . n . tr(fLabelCell(gTxt('section_descr') . ':') . fTextCell('descr', $descr, 1, 4, 20)) . n . n . tr(fLabelCell(gTxt('section_metakey') . ':') . fInputCell('metakey', $metakey, 1, 20)) . n . n . tr(fLabelCell(gTxt('section_metadesc') . ':') . fTextCell('metadesc', $metadesc, 1, 4, 20)) . pluggable_ui('section_ui', 'extend_detail_form', '', $a) . n . n . tr(tda(fInput('submit', '', gTxt('save_button'), 'smallerbox') . eInput('section') . sInput('section_save') . hInput('old_name', $name), ' colspan="2" class="noline"')) . endTable(), '', '', 'post', '', 'section-' . $name)) . td(dLink('section', 'section_delete', 'name', $name, '', 'type', 'section')), " id=\"section-{$name}\" class=\"jsection\" ");
}
}
echo n . n . endTable();
}
示例15: page_edit
function page_edit($message = '')
{
global $event, $step;
pagetop(gTxt('edit_pages'), $message);
extract(gpsa(array('name', 'newname', 'copy', 'savenew')));
if ($step == 'page_delete' || empty($name) && $step != 'page_new' && !$savenew) {
$name = safe_field('page', 'txp_section', "name = 'default'");
} elseif (($copy || $savenew) && trim(preg_replace('/[<>&"\']/', '', $newname))) {
$name = $newname;
}
// Format of each entry is popTagLink -> array ( gTxt() string, class/ID)
$tagbuild_items = array('page_article' => array('page_article_hed', 'article-tags'), 'page_article_nav' => array('page_article_nav_hed', 'article-nav-tags'), 'page_nav' => array('page_nav_hed', 'nav-tags'), 'page_xml' => array('page_xml_hed', 'xml-tags'), 'page_misc' => array('page_misc_hed', 'misc-tags'), 'page_file' => array('page_file_hed', 'file-tags'));
$tagbuild_options = '';
foreach ($tagbuild_items as $tb => $item) {
$tagbuild_options .= n . n . '<div class="' . $item[1] . '">' . hed('<a href="#' . $item[1] . '">' . gTxt($item[0]) . '</a>', 3, ' class="plain lever' . (get_pref('pane_page_' . $item[1] . '_visible') ? ' expanded' : '') . '"') . n . '<div id="' . $item[1] . '" class="toggle" style="display:' . (get_pref('pane_page_' . $item[1] . '_visible') ? 'block' : 'none') . '">' . taglinks($tb) . '</div></div>';
}
echo '<div id="' . $event . '_container" class="txp-container txp-edit">' . startTable('edit', '', 'edit-pane') . tr(tda('<div id="tagbuild_links">' . n . hed(gTxt('tagbuilder'), 2) . $tagbuild_options . n . '</div>', ' class="column"') . tda(page_edit_form($name), ' class="column"') . tda('<div id="content_switcher">' . hed(gTxt('all_pages'), 2) . graf(sLink('page', 'page_new', gTxt('create_new_page')), ' class="action-create smallerbox"') . page_list($name) . '</div>', ' class="column"')) . endTable() . '</div>';
}