Esempio n. 1
0
<?php

$css = "";
if (basename($_SERVER['PHP_SELF']) == "Configuration.php") {
    $skinQuery = getColorTemplate();
    $skin = mysql_fetch_array($skinQuery);
    $css = $skin['name'];
}
if (empty($css)) {
    $css = "defaultGuest";
}
// path without end /
$shared = "images/shared";
$serverShared = "images/servers";
$sessionShared = "images/sessions";
$button = "images/buttons";
$sharedSkin = "images/shared";
$toolbarSkin = "images/toolbar";
Esempio n. 2
0
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
include "HandleDB.php";
checkPermission();
$messageType = "";
$check1 = "";
$check2 = "";
if (isset($_POST['default_x'])) {
    $updateGuest = resetSkinGuest();
}
if (isset($_POST['modify_x'])) {
    $up = updateTemplate($_POST['c5'], $_POST['c7'], $_POST['c8'], $_POST['c9'], $_POST['c10'], $_POST['c11']);
    $rewrite = rewriteCss();
}
if (!isset($_POST['default_x'])) {
    $querySettings = getColorTemplate();
} else {
    $querySettings = getColorDefaultTemplate();
}
$settings = mysql_fetch_array($querySettings);
$c1 = $settings['bgtoolbar'];
$c2 = $settings['txtHeader1'];
$c3 = $settings['bgHeader2'];
$c4 = $settings['txtHeader2'];
$c5 = $settings['bgMiniBar'];
$c6a = $settings['tabOver'];
$c6b = $settings['tabBorder'];
$c7 = $settings['txtHeaderBox'];
$c8 = $settings['bgBox'];
$c9 = $settings['labelStyle'];
$c10 = $settings['txtLabel'];
Esempio n. 3
0
function rewriteCss()
{
    include "builder.cfg";
    $querySettings = getColorTemplate();
    $settings = @mysql_fetch_array($querySettings);
    $bold = $settings['labelStyle'];
    $c1 = $settings['bgtoolbar'];
    $c2 = $settings['txtHeader1'];
    $c3 = $settings['bgHeader2'];
    $c4 = $settings['txtHeader2'];
    $c5 = $settings['bgMiniBar'];
    $c6a = $settings['tabOver'];
    $c6b = $settings['tabBorder'];
    $c7 = $settings['txtHeaderBox'];
    $c8 = $settings['bgBox'];
    $c10 = $settings['txtLabel'];
    $c11 = $settings['border'];
    $content = "\n.bgHeaderTableGuest\n{\n background-color:" . $settings['bgHeaderBox'] . ";\n border: 1px solid {$c11};\n border-bottom: 0px;\n}\n\n\n.row1Guest\n{\n background: {$c8};\n border:1px solid {$c11}; \n border-top:0px;\n}\n.row2Guest\n{\n background: #FFFFFF; \n border:1px solid {$c11}; \n border-top:0px solid black;\n}\n\n\n\n.border_topGuest\n{\n border-top: 1px solid {$c11};\n}\n.border_rightGuest\n{\n border-right:1px solid {$c11};\n}\n\n.border_bottomGuest\n{\n border-bottom: 1px solid {$c11};\n}\n\n.border_leftGuest\n{\n border-left: 1px solid {$c11};\n}\n\n.borderAllGuest\n{\n border: 1px solid {$c11};\n}\n.bgDivServerGuest{\nbackground:" . $settings['bgHeaderBox'] . ";\nborder-bottom:1px solid {$c11};\n}\n\n\n\n.bgGuest\n{\n background-color: " . $settings['bgHeaderBox'] . ";\n}\n\n.txtHeaderTableGuest\n{\n text-decoration : none;\n color: " . $settings['txtHeaderBox'] . ";\n font-family: verdana,arial,helvetica,sans-serif;\n font-size: 11px;\n font-weight: bold;\n}\n\n.bgMiniBarGuest\n{\n border: 1px solid {$c11}; \n background-color: " . $settings['bgHeaderBox'] . ";\n margin-top:20px;\n min-width:900px;\n}\n.bgHedearServerGuest\n{\n border: 1px solid {$c11}; \n background-color: " . $settings['bgHeaderBox'] . ";\n margin-top:20px;\n min-width:900px;\n}\n\n.messageGuest\n{\n border:1px solid {$c11}; \n width:85%;\n padding:1px; \n margin:0 auto; \n background-color:#fff;\n}\n\n\n.bgBoxGuest\n{\n background-color: {$c8};\n}\n\n\n\n.bgBoxInternalGuest\n{\n background-color: {$c8};\n border: 1px solid {$c11}; \n}\n\n\n.txtLabelGuest\n{\n text-decoration : none;\n color: " . $settings['txtLabel'] . ";\n font-family: verdana,arial,helvetica,sans-serif;\n font-size: 11px;\n font-weight: {$bold}; \n}\n\n.txtValueGuest\n{\n text-decoration : none;\n color: " . $settings['txtLabel'] . ";\n font-family: verdana,arial,helvetica,sans-serif;\n font-size: 11px;\n font-weight: normal; \n}\n\n\n\n#border_boxGuest\n{\n border-top:1px solid {$c11}; \n width:99%;\n padding-bottom:15px;\n background: {$c8};\n}\n#border_box_previewGuest\n{\n border:1px solid {$c11}; \n width:838px;\n padding-bottom:15px;\n background: /*{$c8}*/#ffffff;\n}\n";
    $css = $settings['name'];
    if (!($handle = fopen("style/{$css}.css", "w+"))) {
        //echo "error: cannot create the file: style/$css.css";
    }
    if (!fwrite($handle, $content)) {
        //echo "error: cannot write in the file: style/$css.css";
    }
    fclose($handle);
}