示例#1
0
文件: negcss.php 项目: philum/cms
function plug_negcss($p, $o)
{
    if ($n = $_SESSION['prmb'][5]) {
        $nod = ses(qb) . '_auto';
    } else {
        $nod = ses(qb) . '_design_' . $_SESSION['prmd'];
    }
    $f = 'css/' . $nod . '_neg.css';
    $tima = ftime('css/' . $nod . '.css', 'ymdhi');
    $timb = ftime($f, 'ymdhi');
    if ($tima > $timb) {
        req('styl');
        if ($n = $_SESSION['prmb'][5]) {
            if ($n < 4) {
                $r = msql_read('system', 'default_css_' . $n);
            } elseif (is_numeric($n)) {
                $r = msql_read('design', 'public_design_' . $n);
            }
        } else {
            $r = msql_read('design', $nod);
        }
        $clr = $_SESSION['clrs'][$_SESSION['prmd']];
        foreach ($clr as $k => $v) {
            if ($v) {
                $klr[$k] = invert_color($v, 0);
            }
        }
        $_SESSION['clrs'][$_SESSION['prmd']] = $klr;
        build_css($f, $r);
    }
}
示例#2
0
文件: overpop.php 项目: philum/cms
function overpop($t, $id, $clr, $typo, $opac, $w = 320, $h = 240)
{
    $randid = randid();
    $ov = 'document.getElementById(\'crt1' . $randid . '\').style.backgroundColor=\'' . hexrgb($clr, 0) . '\'; document.getElementById(\'crt2' . $randid . '\').style.backgroundColor=\'' . hexrgb($clr, 0.9) . '\';';
    $ot = 'document.getElementById(\'crt1' . $randid . '\').style.backgroundColor=\'' . hexrgb($clr, $opac) . '\'; document.getElementById(\'crt2' . $randid . '\').style.backgroundColor=\'' . hexrgb($clr, 1) . '\';';
    $go = is_numeric($id) ? 'href="' . urlread($id) . '"' : atb('onclick', $id);
    //title
    $title = div(' id="crt2' . $randid . '" style="font-family:' . $typo . '; font-size:24px; text-align:center; color:#' . invert_color($clr, 1) . '; padding:10px; width:140px; background-color:#' . $clr . '; margin:100px auto; vertical-align:middle; box-shadow:0 0 5px #' . $clr . '; text-shadow: 0 0 3px #' . invert_color($clr, 0) . ';"', $t);
    // transition: all 1s ease;
    //rideau
    $sty = 'position:absolute; width:' . ($w ? $w : 320) . 'px; height:' . ($h ? $h : 240) . 'px; background-color:' . hexrgb($clr, $opac) . '; text-align-center; vertical-align:middle; transition: all 1s ease; box-shadow:2px 2px 5px ' . hexrgb('000000', 0.5) . '; display:inline-block;';
    $ret = div(' style="' . $sty . '" id="crt1' . $randid . '"', $t ? $title : '');
    $ret = '<a ' . $go . atb('onmouseover', $ov) . atb('onmouseout', $ot) . '>' . $ret . '</a>';
    return $ret;
}
示例#3
0
文件: umbin.php 项目: philum/cms
function ub_sty($d)
{
    return 'padding:10px; 
background-color:#' . $d . '; color:' . invert_color($d, 1) . '';
}
示例#4
0
文件: styl.php 项目: philum/cms
function mnu_line_t($clr, $t, $o = '')
{
    if ($clr) {
        $cb = invert_color($clr, 1);
    }
    if ($o) {
        $s = 'border:1px solid gray; ';
    }
    return divs($s . 'padding:2px 4px; color:#' . $cb . '; background-color:#' . $clr, $t);
}
示例#5
0
文件: cubes.php 项目: philum/cms
function cub_sz($l, $c)
{
    return 'float:left; border:0; background-color:#' . $c . '; color:#' . invert_color($c, 1) . '; width:' . $l . 'px; height:' . $l . 'px; overflow:true;';
}
示例#6
0
文件: styl.php 项目: philum/cms
function petit_clr($t, $clr)
{
    if (!$t) {
        $t = 0;
    }
    $a = explode("|", $t);
    foreach ($a as $v) {
        if (!$v) {
            $v = "-";
        }
        $ret .= btn('" style="background:#' . $clr[$v] . '; color:#' . invert_color($clr[$v], 1) . '; padding:0; float:left; width:8px;', $v);
    }
    return $ret;
}
示例#7
0
文件: spitable.php 项目: philum/cms
function spi_fams()
{
    $r = spi_classes();
    foreach ($r as $k => $v) {
        $sty = 'txtsmall" style="padding:2px 4px; background-color:#' . $v . '; border:1px solid #000; display:inline-block; color:' . invert_color($v, 1) . '';
        if ($k) {
            $ret .= btn($sty, $k) . ' ';
        }
    }
    return $ret;
}
示例#8
0
文件: ajxf.php 项目: philum/cms
function desk_css()
{
    $prmd = $_SESSION['prmd'];
    if ($_SESSION['negcss']) {
        $prmd .= '_neg';
    }
    $clr = $_SESSION['clrs'][$prmd];
    req('styl');
    $g = prma('desktop');
    //sesmk('desklr');
    if ($g) {
        req('spe');
        $g = goodroot($g);
    }
    if (is_dir($g)) {
        $ret = 'background:url(' . randimg($g) . ') no-repeat center fixed; background-size:cover;';
    } elseif (is_image($g)) {
        $ret = 'background:url(' . goodroot($g) . ') no-repeat center fixed; background-size:cover;';
    } elseif (strpos($g, ',') === false && $g) {
        $ret = 'background-color:' . affect_rgba($g, $clr) . ';';
        $klr = $g;
    } else {
        $g = affect_rgba($g, $clr);
        $gh = $g ? $g : '#' . $clr[4] . ',#' . $clr[2];
        $klr = medium_clr($gh);
        if (!$g) {
            $g = 'to bottom, ' . hexrgb($clr[4], 0.4) . ', ' . hexrgb($clr[1], 1) . '';
        }
        $ret = 'height:100%; 
	background:linear-gradient(' . $g . ') no-repeat fixed;';
    }
    return css_code('body {' . $ret . '}
	#desktop a, #desktop .philum {color:#' . invert_color($klr, 1) . ';}
	#page {padding:0; margin:0 40px 0 0; border:0; box-shadow:none;}');
}