Ejemplo n.º 1
0
        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') {
Ejemplo n.º 2
0
/**
 * 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;
}
Ejemplo n.º 3
0
/**
 * 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);
}