<tr>
        <th><?php 
    echo $th[$ttype];
    ?>
</th>
        <th><?php 
    echo _pgettext('for MIME transformation', 'Description');
    ?>
</th>
    </tr>
    </thead>
    <tbody>
    <?php 
    $odd_row = true;
    foreach ($types[$ttype] as $key => $transform) {
        $desc = PMA_getTransformationDescription($types[$ttype . '_file'][$key]);
        ?>
        <tr class="<?php 
        echo $odd_row ? 'odd' : 'even';
        ?>
">
            <td><?php 
        echo $transform;
        ?>
</td>
            <td><?php 
        echo $desc;
        ?>
</td>
        </tr>
        <?php 
/**
 * Function to get html for transformations
 *
 * @param int    $columnNumber   column number
 * @param int    $ci             cell index
 * @param int    $ci_offset      cell index offset
 * @param array  $available_mime available mime
 * @param array  $columnMeta     column meta
 * @param array  $mime_map       mime map
 * @param string $type_prefix    prefix for type of transformation
 *                               '' or 'input'
 *
 * @return string
 */
function PMA_getHtmlForTransformation($columnNumber, $ci, $ci_offset, $available_mime, $columnMeta, $mime_map, $type_prefix)
{
    $type = $type_prefix . 'transformation';
    $html = '<select id="field_' . $columnNumber . '_' . ($ci - $ci_offset) . '" size="1" name="field_' . $type . '[' . $columnNumber . ']">';
    $html .= '    <option value="" title="' . __('None') . '"></option>';
    if (isset($available_mime[$type]) && is_array($available_mime[$type])) {
        foreach ($available_mime[$type] as $mimekey => $transform) {
            $checked = isset($columnMeta['Field']) && isset($mime_map[$columnMeta['Field']][$type]) && preg_match('@' . preg_quote($available_mime[$type . '_file'][$mimekey]) . '3?@i', $mime_map[$columnMeta['Field']][$type]) ? 'selected ' : '';
            $tooltip = PMA_getTransformationDescription($available_mime[$type . '_file'][$mimekey], false);
            $html .= '<option value="' . $available_mime[$type . '_file'][$mimekey] . '" ' . $checked . ' title="' . htmlspecialchars($tooltip) . '">' . htmlspecialchars($transform) . '</option>';
        }
    }
    $html .= '</select>';
    return $html;
}
Exemplo n.º 3
0
        $content_cells[$i][$ci] = '<select id="field_' . $i . '_' . ($ci - $ci_offset) . '" size="1" name="field_mimetype[' . $i . ']">';
        $content_cells[$i][$ci] .= '    <option value="">&nbsp;</option>';
        if (is_array($available_mime['mimetype'])) {
            foreach ($available_mime['mimetype'] as $mimekey => $mimetype) {
                $checked = isset($row['Field']) && isset($mime_map[$row['Field']]['mimetype']) && $mime_map[$row['Field']]['mimetype'] == str_replace('/', '_', $mimetype) ? 'selected ' : '';
                $content_cells[$i][$ci] .= '    <option value="' . str_replace('/', '_', $mimetype) . '" ' . $checked . '>' . htmlspecialchars($mimetype) . '</option>';
            }
        }
        $content_cells[$i][$ci] .= '</select>';
        $ci++;
        $content_cells[$i][$ci] = '<select id="field_' . $i . '_' . ($ci - $ci_offset) . '" size="1" name="field_transformation[' . $i . ']">';
        $content_cells[$i][$ci] .= '    <option value="" title="' . __('None') . '"></option>';
        if (is_array($available_mime['transformation'])) {
            foreach ($available_mime['transformation'] as $mimekey => $transform) {
                $checked = isset($row['Field']) && isset($mime_map[$row['Field']]['transformation']) && preg_match('@' . preg_quote($available_mime['transformation_file'][$mimekey]) . '3?@i', $mime_map[$row['Field']]['transformation']) ? 'selected ' : '';
                $tooltip = PMA_getTransformationDescription($available_mime['transformation_file'][$mimekey], false);
                $content_cells[$i][$ci] .= '<option value="' . $available_mime['transformation_file'][$mimekey] . '" ' . $checked . ' title="' . htmlspecialchars($tooltip) . '">' . htmlspecialchars($transform) . '</option>';
            }
        }
        $content_cells[$i][$ci] .= '</select>';
        $ci++;
        $content_cells[$i][$ci] = '<input id="field_' . $i . '_' . ($ci - $ci_offset) . '"' . ' type="text" name="field_transformation_options[' . $i . ']"' . ' size="16" class="textfield"' . ' value="' . (isset($row['Field']) && isset($mime_map[$row['Field']]['transformation_options']) ? htmlspecialchars($mime_map[$row['Field']]['transformation_options']) : '') . '"' . ' />';
        //$ci++;
    }
}
// end for
?>
<script src="./js/keyhandler.js" type="text/javascript"></script>
<script type="text/javascript">
// <![CDATA[
var switch_movement = 0;
Exemplo n.º 4
0
<tr>
    <th><?php 
echo __('Browser transformation');
?>
</th>
    <th><?php 
echo _pgettext('for MIME transformation', 'Description');
?>
</th>
</tr>
</thead>
<tbody>
<?php 
$odd_row = true;
foreach ($types['transformation'] as $key => $transform) {
    $desc = PMA_getTransformationDescription($types['transformation_file'][$key]);
    ?>
    <tr class="<?php 
    echo $odd_row ? 'odd' : 'even';
    ?>
">
        <td><?php 
    echo $transform;
    ?>
</td>
        <td><?php 
    echo $desc;
    ?>
</td>
    </tr>
    <?php