Sindbad~EG File Manager

Current Path : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt-mobile/functions/helper/
Upload File :
Current File : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt-mobile/functions/helper/skin.php

<?php
/*
 * Security 	: blocking direct access
 * Source		: http://codex.wordpress.org/Theme_Development#Template_Files
*/
defined('ABSPATH') or die("Access Restricted");

/*
 * Function Description	: Add color to category name or single post title or archive title
 * Author Name			: Mouad achemli
 * Function Source		: http://www.mwordpress.net
 * Note					: this function is important do not remove from here
 *
*/
function mwp_csa_color() {
	if (mwp_option('mobile-theme-color') == 1) :
		$color = 'skin1-color';
	elseif (mwp_option('mobile-theme-color') == 2) :
		$color = 'skin2-color';
	elseif (mwp_option('mobile-theme-color') == 3) :
		$color = 'skin3-color';
	elseif (mwp_option('mobile-theme-color') == 4) :
		$color = 'skin4-color';
	elseif (mwp_option('mobile-theme-color') == 5) :
		$color = 'skin5-color';
	elseif (mwp_option('mobile-theme-color') == 6) :
		$color = 'skin6-color';
	elseif (mwp_option('mobile-theme-color') == 7) :
		$color = 'skin7-color';
	elseif (mwp_option('mobile-theme-color') == 8) :
		$color = 'skin8-color';
	endif;
	return $color;
}
/*
 * Function Description	: Add border color to category or single post or archive
 * Author Name			: Mouad achemli
 * Function Source		: http://www.mwordpress.net
 * Note					: this function is important do not remove from here
 *
*/
function mwp_csa_border() {
	if (mwp_option('mobile-theme-color') == 1) :
		$border = 'skin1-border';
	elseif (mwp_option('mobile-theme-color') == 2) :
		$border = 'skin2-border';
	elseif (mwp_option('mobile-theme-color') == 3) :
		$border = 'skin3-border';
	elseif (mwp_option('mobile-theme-color') == 4) :
		$border = 'skin4-border';
	elseif (mwp_option('mobile-theme-color') == 5) :
		$border = 'skin5-border';
	elseif (mwp_option('mobile-theme-color') == 6) :
		$border = 'skin6-border';
	elseif (mwp_option('mobile-theme-color') == 7) :
		$border = 'skin7-border';
	elseif (mwp_option('mobile-theme-color') == 8) :
		$border = 'skin8-border';
	endif;
	return $border;
}
function mwp_csa_border_top() {
	if (mwp_option('mobile-theme-color') == 1) :
		$border = 'skin1-border-top';
	elseif (mwp_option('mobile-theme-color') == 2) :
		$border = 'skin2-border-top';
	elseif (mwp_option('mobile-theme-color') == 3) :
		$border = 'skin3-border-top';
	elseif (mwp_option('mobile-theme-color') == 4) :
		$border = 'skin4-border-top';
	elseif (mwp_option('mobile-theme-color') == 5) :
		$border = 'skin5-border-top';
	elseif (mwp_option('mobile-theme-color') == 6) :
		$border = 'skin6-border-top';
	elseif (mwp_option('mobile-theme-color') == 7) :
		$border = 'skin7-border-top';
	elseif (mwp_option('mobile-theme-color') == 8) :
		$border = 'skin8-border-top';
	endif;
	return $border;
}
/*
 * Function Description	: Add background color to category or single post or archive
 * Author Name			: Mouad achemli
 * Function Source		: http://www.mwordpress.net
 * Note					: this function is important do not remove from here
 *
*/
function mwp_csa_background() {
	if (mwp_option('mobile-theme-color') == 1) :
		$background = 'skin1-background';
	elseif (mwp_option('mobile-theme-color') == 2) :
		$background = 'skin2-background';
	elseif (mwp_option('mobile-theme-color') == 3) :
		$background = 'skin3-background';
	elseif (mwp_option('mobile-theme-color') == 4) :
		$background = 'skin4-background';
	elseif (mwp_option('mobile-theme-color') == 5) :
		$background = 'skin5-background';
	elseif (mwp_option('mobile-theme-color') == 6) :
		$background = 'skin6-background';
	elseif (mwp_option('mobile-theme-color') == 7) :
		$background = 'skin7-background';
	elseif (mwp_option('mobile-theme-color') == 8) :
		$background = 'skin8-background';
	endif;
	return $background;
}
/*
 * Function Description	: Add background color to category or single post or archive
 * Author Name			: Mouad achemli
 * Function Source		: http://www.mwordpress.net
 * Note					: this function is important do not remove from here
 *
*/
function mwp_csa_trans() {
	if (mwp_option('mobile-theme-color') == 1) :
		$background = 'skin1-trans';
	elseif (mwp_option('mobile-theme-color') == 2) :
		$background = 'skin2-trans';
	elseif (mwp_option('mobile-theme-color') == 3) :
		$background = 'skin3-trans';
	elseif (mwp_option('mobile-theme-color') == 4) :
		$background = 'skin4-trans';
	elseif (mwp_option('mobile-theme-color') == 5) :
		$background = 'skin5-trans';
	elseif (mwp_option('mobile-theme-color') == 6) :
		$background = 'skin6-trans';
	elseif (mwp_option('mobile-theme-color') == 7) :
		$background = 'skin7-trans';
	elseif (mwp_option('mobile-theme-color') == 8) :
		$background = 'skin8-trans';
	endif;
	return $background;
}
/*
 * Function Description	: Add Custom Background color to logo and ads
 * Author Name			: Mouad achemli
 * Function Source		: http://www.mwordpress.net
 * Note					: this function is important do not remove from here
 *
*/
function mwp_csa_background_head() {
	if (mwp_option('mobile-theme-color') == 1) :
		$background = 'skin1-background-head';
	elseif (mwp_option('mobile-theme-color') == 2) :
		$background = 'skin2-background-head';
	elseif (mwp_option('mobile-theme-color') == 3) :
		$background = 'skin3-background-head';
	elseif (mwp_option('mobile-theme-color') == 4) :
		$background = 'skin4-background-head';
	elseif (mwp_option('mobile-theme-color') == 5) :
		$background = 'skin5-background-head';
	elseif (mwp_option('mobile-theme-color') == 6) :
		$background = 'skin6-background-head';
	elseif (mwp_option('mobile-theme-color') == 7) :
		$background = 'skin7-background-head';
	elseif (mwp_option('mobile-theme-color') == 8) :
		$background = 'skin8-background-head';
	endif;
	return $background;
}
/*
 * Function Description	: Add hover color to links modules and widgets
 * Author Name			: Mouad achemli
 * Function Source		: http://www.mwordpress.net
 * Note					: this function is important do not remove from here
 *
*/
function mwp_csa_hover() {
	if (mwp_option('mobile-theme-color') == 1) :
		$hover = 'skin1-hover';
	elseif (mwp_option('mobile-theme-color') == 2) :
		$hover = 'skin2-hover';
	elseif (mwp_option('mobile-theme-color') == 3) :
		$hover = 'skin3-hover';
	elseif (mwp_option('mobile-theme-color') == 4) :
		$hover = 'skin4-hover';
	elseif (mwp_option('mobile-theme-color') == 5) :
		$hover = 'skin5-hover';
	elseif (mwp_option('mobile-theme-color') == 6) :
		$hover = 'skin6-hover';
	elseif (mwp_option('mobile-theme-color') == 7) :
		$hover = 'skin7-hover';
	elseif (mwp_option('mobile-theme-color') == 8) :
		$hover = 'skin8-hover';
	endif;
	return $hover;
}
/* 
 * Color Helper
 *
 * Convert hexdec color string to rgb(a) string 
 *
*/
function mwp_hex2rgba($color, $opacity = false) {
	$default = 'rgb(0,0,0)';
	// Return default if no color provided
	if(empty($color))
        return $default; 
 
	// Sanitize $color if "#" is provided 
    if ($color[0] == '#' ) {
        $color = substr( $color, 1 );
    }
    // Check if color has 6 or 3 characters and get values
    if (strlen($color) == 6) {
        $hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] );
    } elseif ( strlen( $color ) == 3 ) {
        $hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] );
    } else {
        return $default;
    }
    // Convert hexadec to rgb
    $rgb =  array_map('hexdec', $hex);
 
    // Check if opacity is set(rgba or rgb)
    if($opacity){
        if(abs($opacity) > 1)
        $opacity = 1.0;
        $output = 'rgba('.implode(",",$rgb).','.$opacity.')';
    } else {
        $output = 'rgb('.implode(",",$rgb).')';
    }
    // Return rgb(a) color string
    return $output;
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists