PHP Classes

File: include/xoops_version.inc.php

Recommend this page to a friend!
  Classes of Goffy G   wgGallery   include/xoops_version.inc.php   Download  
File: include/xoops_version.inc.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: wgGallery
Image gallery module for XOOPS CMS
Author: By
Last change:
Date: 4 years ago
Size: 1,064 bytes
 

Contents

Class file image Download
<?php
/*
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

/**
 * @copyright XOOPS Project https://xoops.org/
 * @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
 * @package
 * @since
 * @author XOOPS Development Team
 * @param mixed $val
 */

/**
 * @param $val
 * @return float|int
 */
function wggalleryReturnBytes($val)
{
    switch (
mb_substr($val, -1)) {
        case
'K':
        case
'k':
            return (int)
$val * 1024;
        case
'M':
        case
'm':
            return (int)
$val * 1048576;
        case
'G':
        case
'g':
            return (int)
$val * 1073741824;
        default:
            return
$val;
    }
}