本文整理汇总了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 . '&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>' . ' ' . '<a href="' . $tmp_link . '&report=true&version=' . $version_data['version'] . '">' . $report . '</a>' . ' ' . '<a href="' . $tmp_link . '&snapshot=true&version=' . $version_data['version'] . '">' . $structure . '</a>' . '</td>' . '</tr>';
if ($style == 'even') {
示例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}&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;
}
示例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 . '&version=' . $version_data['version'], 'toggle_activation', $options, null);
}