当前位置: 首页>>代码示例>>PHP>>正文


PHP stackRows函数代码示例

本文整理汇总了PHP中stackRows函数的典型用法代码示例。如果您正苦于以下问题:PHP stackRows函数的具体用法?PHP stackRows怎么用?PHP stackRows使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了stackRows函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: section_list

function section_list($message = '')
{
    pagetop(gTxt('sections'), $message);
    global $url_mode, $txpac, $wlink;
    $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));
    $pageslist = safe_column("name", "txp_page", "1");
    $styleslist = safe_column("name", "txp_css", "1");
    $rs = safe_rows("*", "txp_section", "name!='' order by name");
    if ($rs) {
        foreach ($rs as $a) {
            extract($a);
            if ($name == 'default') {
                continue;
            }
            if ($url_mode) {
                $wlink = !check_sections($name) ? sp . wLink('section', 'missing_section_file', 'name', $name) : '';
            }
            $deletelink = dLink('section', 'section_delete', 'name', $name, '', 'type', 'section');
            $form = startTable('edit') . stackRows(fLabelCell(gTxt('section_name') . ':') . fInputCell('name', $name, 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 . $wlink) . td($form) . td($deletelink));
        }
    }
    echo startTable('list') . join('', $out) . endTable();
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:26,代码来源:txp_section.php

示例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();
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:25,代码来源:txp_section.php

示例3: article_edit

function article_edit()
{
    pagetop(gTxt('categories'));
    extract(gpsa(array('name', 'parent')));
    $row = safe_row("*", "txp_category", "name='{$name}' and type='article'");
    if ($row) {
        extract($row);
        $out = stackRows(fLabelCell('article_category_name') . fInputCell('name', $name, 1, 20), fLabelCell('parent') . td(parent_pop($parent, 'article')), tdcs(fInput('submit', '', gTxt('save_button'), 'smallerbox'), 2));
    }
    $out .= eInput('category') . sInput('article_save') . hInput('old_name', $name);
    echo form(startTable('edit') . $out . endTable());
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:12,代码来源:txp_category.php

示例4: discuss_edit

function discuss_edit()
{
    $discussid = gps('discussid');
    extract(safe_row("*", "txp_discuss", "discussid='{$discussid}'"));
    $ta = '<textarea name="message" cols="60" rows="15">' . htmlspecialchars($message) . '</textarea>';
    if (fetch('ip', 'txp_discuss_ipban', 'ip', $ip)) {
        $banstep = 'ipban_unban';
        $bantext = gTxt('unban');
    } else {
        $banstep = 'ipban_add';
        $bantext = gTxt('ban');
    }
    $banlink = '[<a href="?event=discuss' . a . 'step=' . $banstep . a . 'ip=' . $ip . a . 'name=' . urlencode($name) . a . 'discussid=' . $discussid . '">' . $bantext . '</a>]';
    pagetop(gTxt('edit_comment'));
    echo form(startTable('edit') . stackRows(fLabelCell('name') . fInputCell('name', $name), fLabelCell('email') . fInputCell('email', $email), fLabelCell('website') . fInputCell('web', $web), td() . td($ta), fLabelCell('visible') . td(checkbox('visible', 1, $visible)), fLabelCell('IP') . td($ip . sp . $banlink), td() . td(fInput('submit', 'step', gTxt('save'), 'publish')), hInput("discussid", $discussid) . hInput('ip', $ip) . eInput('discuss') . sInput('discuss_save')) . endTable());
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:16,代码来源:txp_discuss.php

示例5: discuss_edit

function discuss_edit()
{
    $discussid = gps('discussid');
    extract(safe_row("*", "txp_discuss", "discussid='{$discussid}'"));
    $ta = '<textarea name="message" cols="60" rows="15">' . preg_replace(array('/</', '/>/'), array('&lt;', '&gt;'), $message) . '</textarea>';
    if (fetch('ip', 'txp_discuss_ipban', 'ip', $ip)) {
        $banstep = 'ipban_unban';
        $bantext = gTxt('unban');
    } else {
        $banstep = 'ipban_add';
        $bantext = gTxt('ban');
    }
    $banlink = '[<a href="?event=discuss' . a . 'step=' . $banstep . a . 'ip=' . $ip . a . 'name=' . urlencode($name) . a . 'discussid=' . $discussid . '">' . $bantext . '</a>]';
    pagetop(gTxt('edit_comment'));
    echo form(startTable('edit') . stackRows(fLabelCell('name') . fInputCell('name', $name), fLabelCell('email') . fInputCell('email', $email), fLabelCell('website') . fInputCell('web', $web), td() . td($ta), fLabelCell('visible') . td(selectInput('visible', array(VISIBLE => gTxt('visible'), SPAM => gTxt('spam'), MODERATE => gTxt('unmoderated')), $visible, false)), fLabelCell('IP') . td($ip . sp . $banlink), td() . td(fInput('submit', 'step', gTxt('save'), 'publish')), hInput("discussid", $discussid) . hInput('ip', $ip) . hInput('parentid', $parentid) . eInput('discuss') . sInput('discuss_save')) . endTable());
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:16,代码来源:txp_discuss.php

示例6: cat_event_category_edit

function cat_event_category_edit($evname)
{
    pagetop(gTxt('categories'));
    $id = assert_int(gps('id'));
    $parent = doSlash(gps('parent'));
    $row = safe_row("*", "txp_category", "id={$id}");
    if ($row) {
        extract($row);
        $out = stackRows(fLabelCell($evname . '_category_name') . fInputCell('name', $name, 1, 20), fLabelCell('parent') . td(cat_parent_pop($parent, $evname, $id)), fLabelCell($evname . '_category_title') . fInputCell('title', $title, 1, 30), pluggable_ui('category_ui', 'extend_detail_form', '', $row), hInput('id', $id), tdcs(fInput('submit', '', gTxt('save_button'), 'smallerbox'), 2));
    }
    $out .= eInput('category') . sInput('cat_' . $evname . '_save') . hInput('old_name', $name);
    echo '<div id="category_container" class="txp-container txp-edit">' . form(startTable('edit', '', 'edit-pane') . $out . endTable(), '', '', 'post', 'edit-form') . '</div>';
}
开发者ID:psic,项目名称:websites,代码行数:13,代码来源:txp_category.php

示例7: discuss_edit

function discuss_edit()
{
    pagetop(gTxt('edit_comment'));
    extract(gpsa(array('discussid', 'sort', 'dir', 'page', 'crit', 'search_method')));
    $discussid = assert_int($discussid);
    $rs = safe_row('*, unix_timestamp(posted) as uPosted', 'txp_discuss', "discussid = {$discussid}");
    if ($rs) {
        extract($rs);
        $message = htmlspecialchars($message);
        if (fetch('ip', 'txp_discuss_ipban', 'ip', $ip)) {
            $ban_step = 'ipban_unban';
            $ban_text = gTxt('unban');
        } else {
            $ban_step = 'ipban_add';
            $ban_text = gTxt('ban');
        }
        $ban_link = '[<a href="?event=discuss' . a . 'step=' . $ban_step . a . 'ip=' . $ip . a . 'name=' . urlencode($name) . a . 'discussid=' . $discussid . '">' . $ban_text . '</a>]';
        echo form(startTable('edit') . stackRows(fLabelCell('name') . fInputCell('name', $name), fLabelCell('IP') . td("{$ip} {$ban_link}"), fLabelCell('email') . fInputCell('email', $email), fLabelCell('website') . fInputCell('web', $web), fLabelCell('date') . td(safe_strftime('%d %b %Y %X', $uPosted)), tda(gTxt('message')) . td('<textarea name="message" cols="60" rows="15">' . $message . '</textarea>'), fLabelCell('status') . td(selectInput('visible', array(VISIBLE => gTxt('visible'), SPAM => gTxt('spam'), MODERATE => gTxt('unmoderated')), $visible, false)), td() . td(fInput('submit', 'step', gTxt('save'), 'publish')), hInput('sort', $sort) . hInput('dir', $dir) . hInput('page', $page) . hInput('crit', $crit) . hInput('search_method', $search_method) . hInput('discussid', $discussid) . hInput('parentid', $parentid) . hInput('ip', $ip) . eInput('discuss') . sInput('discuss_save')) . endTable());
    } else {
        echo graf(gTxt('comment_not_found'), ' class="indicator"');
    }
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:22,代码来源:txp_discuss.php

示例8: cat_event_category_edit

function cat_event_category_edit($evname)
{
    pagetop(gTxt('categories'));
    $id = assert_int(gps('id'));
    $parent = doSlash(gps('parent'));
    $row = safe_row("*", "txp_category", "id={$id}");
    if ($row) {
        extract($row);
        $out = stackRows(fLabelCell($evname . '_category_name') . fInputCell('name', $name, 1, 20), fLabelCell('parent') . td(cat_parent_pop($parent, $evname, $id)), fLabelCell($evname . '_category_title') . fInputCell('title', $title, 1, 30), hInput('id', $id), tdcs(fInput('submit', '', gTxt('save_button'), 'smallerbox'), 2));
    }
    $out .= eInput('category') . sInput('cat_' . $evname . '_save') . hInput('old_name', $name);
    echo form(startTable('edit') . $out . endTable());
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:13,代码来源:txp_category.php

示例9: edit_view

 function edit_view()
 {
     $id = assert_int(gps('id'));
     $type = ps('type');
     $row = safe_row('*', 'txp_category', "id = {$id}");
     if ($row) {
         extract($row);
         echo form(n . startTable('edit') . stackRows(n . tdcs(n . hed(gTxt($type . '_category'), 1), 2), fLabelCell('name') . fInputCell('name', $name, 1, 20), fLabelCell('parent') . n . td($this->cat_parent_pop('parent', $type, $id, $parent)), fLabelCell('title') . fInputCell('title', $title, 1, 30), n . tdcs(fInput('submit', '', gTxt('save_button'), 'smallerbox'), 2)) . endTable() . n . eInput('category') . n . sInput('edit') . n . hInput('id', $id) . n . hInput('old_name', $name) . n . hInput('type', $type));
     }
 }
开发者ID:bgarrels,项目名称:textpattern,代码行数:10,代码来源:txp_category.php

示例10: zem_event_cat_tab_edit

function zem_event_cat_tab_edit()
{
    pagetop(gTxt('categories'));
    $id = assert_int(gps('id'));
    $parent = doSlash(gps('parent'));
    $row = safe_row('*', 'txp_category', "id = {$id}");
    if ($row) {
        extract($row);
        $out = stackRows(fLabelCell(zem_event_gTxt('category_name')) . fInputCell('name', $name, 1, 20), fLabelCell('parent') . td(zem_event_cat_parent_pop($parent, 'event', $id)), fLabelCell(zem_event_gTxt('category_title')) . fInputCell('title', $title, 1, 30), hInput('id', $id), tdcs(fInput('submit', '', gTxt('save_button'), 'smallerbox'), 2));
    }
    echo form(startTable('edit') . $out . eInput('zem_event_cats') . sInput('save') . hInput('old_name', $name) . endTable());
}
开发者ID:gbp,项目名称:zem_event,代码行数:12,代码来源:zem_event.php


注:本文中的stackRows函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。