Пример #1
0
 function piecele($arr, $ele)
 {
     $newar = array();
     if (isset($arr[$ele])) {
         $arr[$ele] = esccss($arr[$ele]);
     }
     if (strlen($ele) > 0 && isset($arr[$ele])) {
         $ok = explode(";", $arr[$ele]);
         foreach ($ok as $ko) {
             $owk = explode(":", $ko, 2);
             if (isset($owk[0]) && isset($owk[1])) {
                 $newar[trim($owk[0])] = trim($owk[1]);
             }
         }
     }
     return str_replace(array("_dotcm_", "_brace_", "_bbrace_", "_nwln_"), array(";", "{", "}", '<br />'), $newar);
 }
Пример #2
0
 function prepare_write($klikit, $_l_cssfilter)
 {
     if (!isset($string)) {
         $string = '';
     }
     foreach ($klikit as $aa => $bb) {
         #cats
         $string .= "/*cat=" . trim($aa) . "_*/";
         if (isset($bb) && is_array($bb)) {
             foreach ($bb as $aap => $bbp) {
                 #eles
                 $bbp = esccss(trim($bbp));
                 $string .= trim($aap) . "{" . $bbp . "}";
             }
         }
     }
     return str_replace(array(";;", "*/;", "{}"), array(";", ";*/", ''), $string);
 }