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


PHP PMA_Util::toggleButton方法代码示例

本文整理汇总了PHP中PMA_Util::toggleButton方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Util::toggleButton方法的具体用法?PHP PMA_Util::toggleButton怎么用?PHP PMA_Util::toggleButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PMA_Util的用法示例。


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

示例1: PMA_getVersionStatus

        echo $version_data['version'];
        ?>
</td>
            <td><?php 
        echo $version_data['date_created'];
        ?>
</td>
            <td><?php 
        echo $version_data['date_updated'];
        ?>
</td>
            <td>
            <?php 
        $state = PMA_getVersionStatus($version_data);
        $options = array(0 => array('label' => __('not active'), 'value' => 'deactivate_now', 'selected' => $state != 'active'), 1 => array('label' => __('active'), 'value' => 'activate_now', 'selected' => $state == 'active'));
        echo PMA_Util::toggleButton($tmp_link . '&amp;version=' . $version_data['version'], 'toggle_activation', $options, null);
        ?>
            </td>
            <td>
            <a class="delete_tracking_anchor ajax"
               href="<?php 
        echo $delete_link;
        ?>
" >
            <?php 
        echo $delete;
        ?>
</a>
        <?php 
        echo '</td>' . '<td>' . '<a href="' . $tmp_link . '">' . $versions . '</a>' . '&nbsp;&nbsp;' . '<a href="' . $tmp_link . '&amp;report=true&amp;version=' . $version_data['version'] . '">' . $report . '</a>' . '&nbsp;&nbsp;' . '<a href="' . $tmp_link . '&amp;snapshot=true&amp;version=' . $version_data['version'] . '">' . $structure . '</a>' . '</td>' . '</tr>';
        if ($style == 'even') {
开发者ID:plabong,项目名称:phpmyadmin,代码行数:31,代码来源:db_tracking.php

示例2: PMA_EVN_getFooterLinks

/**
 * Creates a fieldset for adding a new event, if the user has the privileges.
 *
 * @return string    HTML code with containing the fotter fieldset
 */
function PMA_EVN_getFooterLinks()
{
    global $db, $url_query;
    /**
     * For events, we show the usual 'Add event' form and also
     * a form for toggling the state of the event scheduler
     */
    // Init options for the event scheduler toggle functionality
    $es_state = $GLOBALS['dbi']->fetchValue("SHOW GLOBAL VARIABLES LIKE 'event_scheduler'", 0, 1);
    $es_state = strtolower($es_state);
    $options = array(0 => array('label' => __('OFF'), 'value' => "SET GLOBAL event_scheduler=\"OFF\"", 'selected' => $es_state != 'on'), 1 => array('label' => __('ON'), 'value' => "SET GLOBAL event_scheduler=\"ON\"", 'selected' => $es_state == 'on'));
    // Generate output
    $retval = "<!-- FOOTER LINKS START -->\n";
    $retval .= "<div class='doubleFieldset'>\n";
    // show the usual footer
    $retval .= PMA_RTE_getFooterLinks('CREATE_EVENT', 'EVENT', 'EVENT');
    $retval .= "    <fieldset class='right'>\n";
    $retval .= "        <legend>\n";
    $retval .= "            " . __('Event scheduler status') . "\n";
    $retval .= "        </legend>\n";
    $retval .= "        <div class='wrap'>\n";
    // show the toggle button
    $retval .= PMA_Util::toggleButton("sql.php?{$url_query}&amp;goto=db_events.php" . urlencode("?db={$db}"), 'sql_query', $options, 'PMA_slidingMessage(data.sql_query);');
    $retval .= "        </div>\n";
    $retval .= "    </fieldset>\n";
    $retval .= "    <div style='clear: both;'></div>\n";
    $retval .= "</div>";
    $retval .= "<!-- FOOTER LINKS END -->\n";
    return $retval;
}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:35,代码来源:rte_footer.lib.php

示例3: PMA_displayStatusButton

/**
 * Display tracking status button
 *
 * @param array  $version_data data about tracking versions
 * @param string $tbl_link     link for tbl_tracking.php
 *
 * @return void
 */
function PMA_displayStatusButton($version_data, $tbl_link)
{
    $state = PMA_getVersionStatus($version_data);
    $options = array(0 => array('label' => __('not active'), 'value' => 'deactivate_now', 'selected' => $state != 'active'), 1 => array('label' => __('active'), 'value' => 'activate_now', 'selected' => $state == 'active'));
    echo PMA_Util::toggleButton($tbl_link . '&amp;version=' . $version_data['version'], 'toggle_activation', $options, null);
}
开发者ID:FuhrerMalkovich,项目名称:Blogpost,代码行数:14,代码来源:tracking.lib.php


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