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); } }
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; }
function ub_sty($d) { return 'padding:10px; background-color:#' . $d . '; color:' . invert_color($d, 1) . ''; }
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); }
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;'; }
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; }
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; }
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;}'); }