Beispiel #1
0
<?php

$UserTheme = isset($_GET['usr']) ? $_GET['usr'] : null;
$DetailID = isset($_GET['DetailID']) ? $_GET['DetailID'] : null;
if ($UserTheme != null || $DetailID != null) {
    $Users = new \CmsDev\CRUD\ViewEditElementsAsList\Lists\Users\_classes();
    if ($DetailID != null) {
        $TestUser = new \CmsDev\CRUD\ViewEditElementsAsList\Lists\Products\_classes();
        $UserTheme = $TestUser->GetPUserID($DetailID);
    }
    $GetTheme = $Users->GetUseTheme($UserTheme);
    if ($GetTheme) {
        $WideBoxedScript = $BackgroundScript = $PatternScript = '';
        if ($GetTheme->WideBoxed != '') {
            $WideBoxedScript = '$("body").addClass("' . $GetTheme->WideBoxed . '");';
        }
        if ($GetTheme->Pattern != '') {
            $PatternScript = '$("body").css(\'background-image\', \'url("' . $GetTheme->Pattern . '")\');';
        }
        if ($GetTheme->Background != '') {
            $BackgroundScript = '$("body").addClass("bg-cover").css(\'background-image\', \'url("' . $GetTheme->Background . '")\');';
        }
        $SKT_Header->custom('' . '<link rel="stylesheet" id="UserColorStylesheet" href="{fromTemplate}assets/css/schemes/' . $GetTheme->ColorTheme . '.css">' . '<script>' . '$(document).ready(function(){' . $WideBoxedScript . $BackgroundScript . $PatternScript . '});' . '</script>', false);
    }
}
Beispiel #2
0
<?php

$theme = new \CmsDev\CRUD\ViewEditElementsAsList\Lists\Users\_classes();
$user_theme = $theme->GetUseTheme($User->id);
?>
<h2 class="mb20  mt30 text-color"><i class="skt-icon-image"></i> Cambiar el estilo y color de sus p&aacute;ginas <input type="button" onclick="UpdateTheme<?php 
echo $User->id;
?>
();" class="btn btn-primary float-right" value="Guardar Cambios" /></h2>
<form id="UrlUpdateTheme<?php 
echo $User->id;
?>
">
    <input name="ColorTheme" id="switcher_ColorTheme" type="hidden" value="<?php 
echo $user_theme->ColorTheme;
?>
" />
    <input name="WideBoxed" id="switcher_WideBoxed" type="hidden" value="<?php 
echo $user_theme->WideBoxed;
?>
" />
    <input name="Pattern" id="switcher_Pattern" type="hidden" value="<?php 
echo $user_theme->Pattern;
?>
" />
    <input name="Background" id="switcher_Background" type="hidden" value="<?php 
echo $user_theme->Background;
?>
" />
    <input name="BackgroundCustom" id="switcher_BackgroundCustom" type="hidden" value="<?php 
echo $user_theme->BackgroundCustom;