當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。