Blame Scripts/CentOS-Web/admin/includes/functions/html.php

1f953a
1f953a
/***
1f953a
 * Function collection for html admin needs
1f953a
 *
1f953a
 * ...
1f953a
 */
1f953a
1f953a
//-----------/* Show admonition
1f953a
             /* Description: Useful to show actions results */
1f953a
             /* $message : is an string with the message itself */
1f953a
             /* $severity : may be green, orange, red, violet or blue */
1f953a
1f953a
    function show_message( $message , $severity = 'blue' )
1f953a
    {
1f953a
   
1f953a
        $html = '
';
1f953a
        $html .= $message;
1f953a
        $html .= '';
1f953a
1f953a
        return $html;
1f953a
    }
1f953a
1f953a
//-------/* Show action selector form field
1f953a
1f953a
    function show_action_field( $action = 'default' )
1f953a
    {
1f953a
        $html = ucfirst(translate('action')) . ': <select name="action">';
1f953a
        switch ( $action )
1f953a
        {
1f953a
            case 'update':
1f953a
                $html .= '<option value="update">' . ucfirst(translate('update')) . '</option>';
1f953a
            break;
1f953a
1f953a
            case 'delete':
1f953a
                $html .= '<option value="delete">' . ucfirst(translate('delete')) . '</option>';
1f953a
            break;
1f953a
1f953a
            default:
1f953a
                $html .= '<option value="update">' . ucfirst(translate('update')) . '</option>';
1f953a
                $html .= '<option value="delete">' . ucfirst(translate('delete')) . '</option>';
1f953a
        }
1f953a
        $html .= '</select>';
1f953a
1f953a
        return $html;
1f953a
1f953a
    }
1f953a
?>