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


PHP hed函数代码示例

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


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

示例1: doLoginForm

function doLoginForm($message)
{
    include txpath . '/lib/txplib_head.php';
    pagetop(gTxt('login'), $message);
    $stay = (cs('txp_login') and !gps('logout') ? 1 : 0);
    $reset = gps('reset');
    $name = join(',', array_slice(explode(',', cs('txp_login')), 0, -1));
    echo n . '<div id="login_container" class="txp-container">';
    echo form('<div class="txp-login">' . n . hed(gTxt($reset ? 'password_reset' : 'login_to_textpattern'), 2) . n . graf('<span class="login-label"><label for="login_name">' . gTxt('name') . '</label></span>' . n . '<span class="login-value">' . fInput('text', 'p_userid', $name, '', '', '', INPUT_REGULAR, '', 'login_name') . '</span>', ' class="login-name"') . ($reset ? '' : n . graf('<span class="login-label"><label for="login_password">' . gTxt('password') . '</label></span>' . n . '<span class="login-value">' . fInput('password', 'p_password', '', '', '', '', INPUT_REGULAR, '', 'login_password') . '</span>', ' class="login-password"')) . ($reset ? '' : graf(checkbox('stay', 1, $stay, '', 'login_stay') . n . '<label for="login_stay">' . gTxt('stay_logged_in') . '</label>' . sp . popHelp('remember_login'), ' class="login-stay"')) . ($reset ? n . hInput('p_reset', 1) : '') . n . graf(fInput('submit', '', gTxt($reset ? 'password_reset_button' : 'log_in_button'), 'publish')) . n . ($reset ? graf('<a href="index.php">' . gTxt('back_to_login') . '</a>', ' class="login-return"') : graf('<a href="?reset=1">' . gTxt('password_forgotten') . '</a>', ' class="login-forgot"')) . (gps('event') ? eInput(gps('event')) : '') . '</div>', '', '', 'post', '', '', 'login_form') . '</div>' . n . script_js(<<<EOSCR
// Focus on either username or password when empty
\$(document).ready(
\tfunction() {
\t\tvar has_name = \$("#login_name").val().length;
\t\tvar password_box = \$("#login_password").val();
\t\tvar has_password = (password_box) ? password_box.length : 0;
\t\tif (!has_name) {
\t\t\t\$("#login_name").focus();
\t\t} else if (!has_password) {
\t\t \t\$("#login_password").focus();
\t\t}
\t}
);
EOSCR
) . n . '</div><!-- /txp-body -->' . n . '</body>' . n . '</html>';
    exit(0);
}
开发者ID:balcides,项目名称:Cathartic_server,代码行数:26,代码来源:txp_auth.php

示例2: header

 function header()
 {
     global $txp_user;
     $out[] = hed(htmlspecialchars($GLOBALS["prefs"]["sitename"]), 1, ' class="txp-accessibility"');
     $out[] = '<nav role="navigation" id="masthead" aria-label="' . gTxt('navigation') . '">';
     $out[] = '<ul id="nav">';
     foreach ($this->menu as $tab) {
         $class = $tab['active'] ? ' active' : '';
         $out[] = '<li class="primary' . $class . '">' . href($tab["label"], array('event' => $tab['event']));
         if (!empty($tab['items'])) {
             $out[] = '<ul>';
             foreach ($tab['items'] as $item) {
                 $class = $item['active'] ? ' active' : '';
                 $out[] = '<li class="secondary' . $class . '">' . href($item["label"], array('event' => $item['event'])) . '</li>';
             }
             $out[] = '</ul>';
         }
         $out[] = '</li>';
     }
     $out[] = '<li id="view-site" class="primary tabdown inactive">' . href(gTxt('tab_view_site'), hu, ' target="_blank"') . '</li>';
     if ($txp_user) {
         $out[] = '<li id="logout" class="primary tabdown inactive">' . href(gTxt('logout'), 'index.php?logout=1', ' onclick="return verify(\'' . gTxt('are_you_sure') . '\')"') . '</li>';
     }
     $out[] = '</ul>';
     $out[] = '</nav>';
     $out[] = '<div id="messagepane">' . $this->announce($this->message) . '</div>' . n;
     return join(n, $out);
 }
开发者ID:bgarrels,项目名称:textpattern,代码行数:28,代码来源:remora.php

示例3: header

 function header()
 {
     $out[] = hed(htmlspecialchars($GLOBALS["prefs"]["sitename"]), 1, ' class="txp-accessibility"');
     $out[] = '<div id="masthead">';
     $out[] = '<div id="navpop">' . navPop(1) . '</div>';
     $out[] = hed('Textpattern', 1, ' id="branding"');
     $out[] = '</div>';
     if (!$this->is_popup) {
         $out[] = '<nav role="navigation" aria-label="' . gTxt('navigation') . '">';
         $out[] = '<div class="nav-tabs" id="nav-primary">';
         $out[] = '<ul>';
         $secondary = '';
         foreach ($this->menu as $tab) {
             $tc = $tab['active'] ? 'tabup' : 'tabdown';
             $out[] = '<li>' . href($tab["label"], array('event' => $tab['event']), ' class="' . $tc . '"') . '</li>';
             if ($tab['active'] && !empty($tab['items'])) {
                 $secondary = '<div class="nav-tabs" id="nav-secondary">' . n . '<ul>';
                 foreach ($tab['items'] as $item) {
                     $tc = $item['active'] ? 'tabup' : 'tabdown';
                     $secondary .= n . '<li>' . href($item['label'], array('event' => $item['event']), ' class="' . $tc . '"') . '</li>';
                 }
                 $secondary .= n . '</ul>' . n . '</div>';
             }
         }
         $out[] = '<li id="view-site">' . href(gTxt('tab_view_site'), hu, ' class="tabdown" target="_blank"') . '</li>';
         $out[] = '</ul>';
         $out[] = '</div>';
         $out[] = $secondary;
         $out[] = '</nav>';
     }
     $out[] = '<div id="messagepane">' . $this->announce($this->message) . '</div>' . n;
     return join(n, $out);
 }
开发者ID:hcgtv,项目名称:textpattern,代码行数:33,代码来源:classic.php

示例4: header

 function header()
 {
     global $txp_user;
     $out[] = hed(htmlspecialchars($GLOBALS["prefs"]["sitename"]), 1);
     if ($txp_user) {
         $out[] = '<button class="txp-nav-toggle collapsed" type="button" data-toggle="collapse" data-target=".txp-nav"><span class="txp-accessibility">' . gTxt('navigation') . '</span></button>';
         $out[] = '<nav class="txp-nav" aria-label="' . gTxt('navigation') . '">';
         $out[] = '<ul class="data-dropdown">';
         $txpnavdrop = 0;
         foreach ($this->menu as $tab) {
             $txpnavdrop++;
             $class = $tab['active'] ? ' selected' : '';
             $out[] = '<li class="dropdown' . $class . '">' . n . href($tab['label'], '#', ' class="dropdown-toggle" id="txp-nav-drop' . $txpnavdrop . '" role="button" aria-controls="txp-nav-drop' . $txpnavdrop . '-menu" data-toggle="dropdown"');
             if (!empty($tab['items'])) {
                 $out[] = '<ul class="dropdown-menu" id="txp-nav-drop' . $txpnavdrop . '-menu" role="menu" aria-labelledby="txp-nav-drop' . $txpnavdrop . '">';
                 foreach ($tab['items'] as $item) {
                     $class = $item['active'] ? ' class="selected"' : '';
                     $out[] = '<li' . $class . ' role="presentation">' . href($item["label"], array('event' => $item['event']), ' role="menuitem" tabindex="-1"') . '</li>';
                 }
                 $out[] = '</ul>';
             }
             $out[] = '</li>';
         }
         $out[] = '</ul>';
         $out[] = '</nav>';
         $out[] = graf(href(span(htmlspecialchars($GLOBALS["prefs"]["sitename"]), array('class' => 'txp-view-site-name')), hu, array('rel' => 'external', 'target' => '_blank', 'title' => gTxt('tab_view_site'))), array('class' => 'txp-view-site'));
         $out[] = graf(href(gTxt('logout'), 'index.php?logout=1', ' onclick="return verify(\'' . gTxt('are_you_sure') . '\')"'), array('class' => 'txp-logout'));
     }
     return join(n, $out);
 }
开发者ID:scar45,项目名称:textpattern,代码行数:30,代码来源:hive.php

示例5: doLoginForm

/**
 * Renders and outputs a login form.
 *
 * This function outputs a full HTML document,
 * including &lt;head&gt; and footer.
 *
 * @param string|array $message The activity message
 */
function doLoginForm($message)
{
    global $textarray_script, $event, $step;
    include txpath . '/lib/txplib_head.php';
    $event = 'login';
    if (gps('logout')) {
        $step = 'logout';
    } elseif (gps('reset')) {
        $step = 'reset';
    }
    pagetop(gTxt('login'), $message);
    $stay = (cs('txp_login') and !gps('logout') ? 1 : 0);
    $reset = gps('reset');
    $name = join(',', array_slice(explode(',', cs('txp_login')), 0, -1));
    $out = array();
    if ($reset) {
        $out[] = hed(gTxt('password_reset'), 2, array('id' => 'txp-login-heading')) . graf(n . span(tag(gTxt('name'), 'label', array('for' => 'login_name')), array('class' => 'txp-label')) . n . span(fInput('text', 'p_userid', $name, '', '', '', INPUT_REGULAR, '', 'login_name'), array('class' => 'txp-value')), ' class="login-name"') . graf(fInput('submit', '', gTxt('password_reset_button'), 'publish') . n) . graf(href(gTxt('back_to_login'), 'index.php'), array('class' => 'login-return')) . hInput('p_reset', 1);
    } else {
        $out[] = hed(gTxt('login_to_textpattern'), 2, array('id' => 'txp-login-heading')) . graf(n . span(tag(gTxt('name'), 'label', array('for' => 'login_name')), array('class' => 'txp-label')) . n . span(fInput('text', 'p_userid', $name, '', '', '', INPUT_REGULAR, '', 'login_name'), array('class' => 'txp-value')), array('class' => 'login-name')) . graf(n . span(tag(gTxt('password'), 'label', array('for' => 'login_password')), array('class' => 'txp-label')) . n . span(fInput('password', 'p_password', '', '', '', '', INPUT_REGULAR, '', 'login_password'), array('class' => 'txp-value')), array('class' => 'login-password')) . graf(checkbox('stay', 1, $stay, '', 'login_stay') . n . tag(gTxt('stay_logged_in'), 'label', array('for' => 'login_stay')) . popHelp('remember_login') . n, array('class' => 'login-stay')) . graf(fInput('submit', '', gTxt('log_in_button'), 'publish') . n) . graf(href(gTxt('password_forgotten'), '?reset=1'), array('class' => 'login-forgot'));
        if (gps('event')) {
            $out[] = eInput(gps('event'));
        }
    }
    echo form(tag(join('', $out), 'section', array('role' => 'region', 'class' => 'txp-login', 'aria-labelledby' => 'txp-login-heading')), '', '', 'post', '', '', 'login_form') . script_js('textpattern.textarray = ' . json_encode($textarray_script)) . n . '</main><!-- /txp-body -->' . n . '</body>' . n . '</html>';
    exit(0);
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:34,代码来源:txp_auth.php

示例6: page_edit

/**
 * The main Page editor panel.
 *
 * @param string|array $message The activity message
 */
function page_edit($message = '')
{
    global $event, $step;
    pagetop(gTxt('edit_pages'), $message);
    extract(array_map('assert_string', gpsa(array('copy', 'save_error', 'savenew'))));
    $name = sanitizeForPage(assert_string(gps('name')));
    $newname = sanitizeForPage(assert_string(gps('newname')));
    if ($step == 'page_delete' || empty($name) && $step != 'page_new' && !$savenew) {
        $name = safe_field('page', 'txp_section', "name = 'default'");
    } elseif ((($copy || $savenew) && $newname || $newname && $newname != $name) && !$save_error) {
        $name = $newname;
    }
    $buttons = n . tag(gTxt('page_name'), 'label', array('for' => 'new_page')) . br . fInput('text', 'newname', $name, 'input-medium', '', '', INPUT_MEDIUM, '', 'new_page', false, true);
    if ($name) {
        $buttons .= span(href(gTxt('duplicate'), '#', array('id' => 'txp_clone', 'class' => 'clone', 'title' => gTxt('page_clone'))), array('class' => 'txp-actions'));
    } else {
        $buttons .= hInput('savenew', 'savenew');
    }
    $html = !$save_error ? fetch('user_html', 'txp_page', 'name', $name) : gps('html');
    // 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_links = '';
    foreach ($tagbuild_items as $tb => $item) {
        $tagbuild_links .= wrapRegion($item[1] . '_group', taglinks($tb), $item[1], $item[0], 'page_' . $item[1]);
    }
    echo hed(gTxt('tab_pages'), 1, array('class' => 'txp-heading'));
    echo n . tag(n . tag(hed(gTxt('tagbuilder'), 2) . $tagbuild_links, 'div', array('id' => 'tagbuild_links', 'class' => 'txp-layout-cell txp-layout-1-4')) . n . tag(form(graf($buttons) . graf(tag(gTxt('page_code'), 'label', array('for' => 'html')) . br . '<textarea class="code" id="html" name="html" cols="' . INPUT_LARGE . '" rows="' . TEXTAREA_HEIGHT_LARGE . '" dir="ltr">' . txpspecialchars($html) . '</textarea>') . graf(fInput('submit', '', gTxt('save'), 'publish') . eInput('page') . sInput('page_save') . hInput('name', $name)), '', '', 'post', 'edit-form', '', 'page_form'), 'div', array('id' => 'main_content', 'class' => 'txp-layout-cell txp-layout-2-4')) . n . tag(graf(sLink('page', 'page_new', gTxt('create_new_page')), ' class="action-create"') . page_list($name) . n, 'div', array('id' => 'content_switcher', 'class' => 'txp-layout-cell txp-layout-1-4')) . n, 'div', array('id' => $event . '_container', 'class' => 'txp-layout-grid'));
}
开发者ID:hcgtv,项目名称:textpattern,代码行数:33,代码来源:txp_page.php

示例7: css_edit_raw

function css_edit_raw()
{
    global $event, $step;
    $default_name = safe_field('css', 'txp_section', "name = 'default'");
    extract(gpsa(array('name', 'newname', 'copy', 'savenew')));
    if ($step == 'css_delete' || empty($name) && $step != 'pour' && !$savenew) {
        $name = $default_name;
    } elseif (($copy || $savenew) && trim(preg_replace('/[<>&"\']/', '', $newname))) {
        $name = $newname;
    }
    if (empty($name)) {
        $buttons = '<div class="edit-title">' . gTxt('name_for_this_style') . ': ' . fInput('text', 'newname', '', 'edit', '', '', 20) . hInput('savenew', 'savenew') . '</div>';
        $thecss = gps('css');
    } else {
        $buttons = '<div class="edit-title">' . gTxt('you_are_editing_css') . sp . strong(htmlspecialchars($name)) . '</div>';
        $thecss = fetch("css", 'txp_css', 'name', $name);
    }
    if (!empty($name)) {
        $copy = '<span class="copy-as"><label for="copy-css">' . gTxt('copy_css_as') . '</label>' . sp . fInput('text', 'newname', '', 'edit', '', '', '', '', 'copy-css') . sp . fInput('submit', 'copy', gTxt('copy'), 'smallerbox') . '</span>';
    } else {
        $copy = '';
    }
    $right = '<div id="content_switcher">' . hed(gTxt('all_stylesheets'), 2) . graf(sLink('css', 'pour', gTxt('create_new_css')), ' class="action-create smallerbox"') . css_list($name, $default_name) . '</div>';
    echo '<div id="' . $event . '_container" class="txp-container txp-edit">' . startTable('edit') . tr(td(form('<div id="main_content">' . $buttons . '<textarea id="css" class="code" name="css" cols="78" rows="32">' . htmlspecialchars($thecss) . '</textarea>' . br . fInput('submit', '', gTxt('save'), 'publish') . eInput('css') . sInput('css_save') . hInput('name', $name) . $copy . '</div>', '', '', 'post', 'edit-form', '', 'style_form'), '', 'column') . tdtl($right, ' class="column"')) . endTable() . '</div>';
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:25,代码来源:txp_css.php

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

示例9: getDbInfo

function getDbInfo()
{
    $temp_txpath = dirname(__FILE__);
    $temp_doc_root = $_SERVER['DOCUMENT_ROOT'];
    echo '<form action="setup.php" method="post">', '<table id="setup" cellpadding="0" cellspacing="0" border="0">', tr(tda(hed('Welcome to Textpattern', 3) . graf('Inevitably, we need a few details.', ' style="margin-bottom:3em"') . hed('MySQL', 3) . graf('Note that the database you specify must exist; 
			  		Textpattern won&#8217;t create it for you.'), ' width="400" height="50" colspan="4", align="left"')), tr(fLabelCell('MySQL login') . fInputCell('duser', '', 1) . fLabelCell('MySQL password') . fInputCell('dpass', '', 2)), tr(fLabelCell('MySQL server') . fInputCell('dhost', '', 3) . fLabelCell('MySQL database') . fInputCell('ddb', '', 4)), tr(fLabelCell('Table prefix') . fInputCell('dprefix', '', 5) . tdcs(small('(Use ONLY for multiple installations in one database)'), 2)), tr(tdcs('&nbsp;', 4)), tr(tdcs(hed('Site Paths', 3) . graf('Please confirm the following paths to your site root and to the Textpattern directory.'), 4)), tr(fLabelCell('Full path to server\'s web root') . tdcs(fInput('text', 'doc_root', $temp_doc_root, 'edit', '', '', 40) . popHelp('doc_root'), 3)), tr(fLabelCell('Full path to Textpattern') . tdcs(fInput('text', 'txpath', $temp_txpath, 'edit', '', '', 40) . popHelp('full_path'), 3));
    echo tr(td() . td(fInput('submit', 'Submit', 'Next', 'publish')) . td() . td());
    echo endTable(), sInput('printConfig'), '</form>';
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:9,代码来源:setup.php

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

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

示例12: show_mentions

function show_mentions()
{
    global $id;
    if ($id) {
        $rs = safe_rows("*", "txp_log_mention", "article_id='{$id}'");
        if ($rs) {
            foreach ($rs as $a) {
                extract($a);
                $out[] = '<a href="http://' . $refpage . '" title="' . $excerpt . '">' . $reftitle . '</a>';
            }
            return hed(gTxt('mentions'), 3) . graf(join(br, $out));
        }
    }
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:14,代码来源:mention.php

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

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

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


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