Example #1
0
File: tri.php Project: philum/cms
function correct_widths($v)
{
    $width = prma('content');
    $goodw = $width ? $width : 580;
    $goodh = round($goodw / (16 / 9));
    $v = mb_ereg_replace('width="([0-9]+)"', 'width="' . $goodw . '"', $v);
    return mb_ereg_replace('height="([0-9]+)"', 'height="' . $goodh . '"', $v);
}
Example #2
0
File: ajax.php Project: philum/cms
     $ret = suggest_import($id);
     break;
 case "convhtml":
     req('spe,tri');
     $_GET['urlsrc'] = host() . '/';
     $ret = convhtml_b($id);
     break;
 case "convconn":
     req('pop,tri');
     //wwig
     $ret = format_txt_r(ajx($id, 1), 3, 'test');
     break;
 case "iframe":
     $s = strdeb($res, '-');
     $s = is_numeric($s) ? $s : 720;
     $s = $s > prma('content') ? prma('content') : $s;
     $ret = iframe($id, $s - 20);
     $t = $va;
     break;
     //case("inframe"):$ret=inframe($id,$va,$opt,$optb); break;
     //nav
 //case("inframe"):$ret=inframe($id,$va,$opt,$optb); break;
 //nav
 case "search":
     req('pop,spe,art,tri,mod');
     require 'plug/search.php';
     $ret = plug_search($id, $va, $opt, $res);
     $t = nms(24);
     $s = 640;
     break;
 case "words":
Example #3
0
function console_nav()
{
    $r = explode(" ", 'system ' . prma('blocks'));
    foreach ($r as $k => $v) {
        if ($v && $v != 'clear') {
            if ($v == 'system') {
                $hlp = hlpbt('blocsystem');
            } elseif ($v == 'menu') {
                $hlp = hlpbt('blocmenu');
            } else {
                $hlp = '';
            }
            $ret .= ljb('txtx', 'SaveBb', 'modules_' . $v . '__', $v) . $hlp;
            $ret .= divc('menu', divd('modules' . $v, console_block($v)));
        }
    }
    //
    $ret .= ljb('txtx', 'SaveBb', 'modules_dev__', 'test') . hlpbt('bloctest') . divc('menu', divd('modulesdev', console_block('dev')));
    return $ret;
}
Example #4
0
File: pop.php Project: philum/cms
function paocols($msg, $n, $s = 0)
{
    $n = $n ? $n : 2;
    if (strpos($msg, "</p>")) {
        $sep = "</p>";
    } elseif (strpos($msg, "\n")) {
        $sep = "\n";
    } else {
        $sep = " ";
    }
    $r = explode($sep, $msg);
    if ($s) {
        for ($i = 0; $i < $s; $i++) {
            $ret .= $r[$i] . $sep;
            unset($r[$i]);
        }
    }
    $nb = count($r);
    $nbc = strlen(implode('', $r));
    for ($i = 0; $i <= $nb; $i++) {
        $c = strlen($r[$i]);
        $cc += $c;
        $ccb += $c;
        if ($cc > $nbc / $n) {
            $cc = 0;
            $o++;
        }
        if (trim($r[$i])) {
            $rb[$o] .= trim($r[$i]) . $sep;
        }
    }
    $ret .= colonize($rb, $n, '', '', 0, 1);
    $w = prma('content') + 1;
    return divs('width:' . $w . 'px;', $ret);
}
Example #5
0
File: bubs.php Project: philum/cms
function bub_adm_console($ret, $dir)
{
    $r = explode(' ', 'system ' . prma('blocks'));
    $ret[] = bub_adm('console', 'console_', $dir, 'window');
    if ($r) {
        foreach ($r as $k => $v) {
            if ($v) {
                $ret[] = bub_adm($v, 'console_' . $v, $dir . '/' . $v, 'window');
            }
            $rb = define_modc_b($v);
            if (is_array($rb)) {
                foreach ($rb as $kb => $vb) {
                    list($m, $p, $t, $c, $e, $g, $ch, $h) = $vb;
                    //module
                    if ($m == 'apps') {
                        $ret[] = array('Apps', 'ajax', 'popup', 'call___adminx_submod*pop', '', '', $dir . '/' . $v, 'apps');
                    } else {
                        $ret[] = array($m, 'ajax', 'popup', 'module__3_' . $kb, $opt, $cond, $dir . '/' . $v, 'divide');
                    }
                }
            }
        }
    }
    return $ret;
}
Example #6
0
File: boot.php Project: philum/cms
function define_fonts($t)
{
    //echo prma('csscode');
    $r = explode(' ', prma('cssfonts'));
    $n = count($r);
    //$srvr=prms('upservr');
    for ($i = 0; $i < $n; $i++) {
        switch ($r[$i]) {
            case 'fontphilum':
                $ret .= "@font-face {font-family: 'philum';\nsrc: url('/fonts/philum.eot?iefix') format('eot'), url('/fonts/philum.woff?" . $t . "') format('woff'), url('/fonts/philum.svg#philum') format('svg'), url('/fonts/philum.ttf') format('truetype');}\n";
                break;
            case 'fontmicrosys':
                $ret .= "@font-face {font-family: 'microsys';\nsrc: url('/fonts/microsys4.eot?iefix') format('eot'), url('/fonts/microsys4.woff?" . $t . "') format('woff'), url('/fonts/microsys4.svg#microsys4') format('svg'), url('/fonts/microsys4.ttf') format('truetype');}\n";
                break;
            case 'desktop_img':
                $ret .= "";
                break;
        }
    }
    if ($ret) {
        return css_code($ret);
    }
}
Example #7
0
File: pop.php Project: philum/cms
function msqgraph($d, $m)
{
    static $n;
    $n++;
    $large = prma('content');
    if (substr($m, 0, 2) == 'nl') {
        return;
    }
    list($da, $rep) = split_one("ยง", $d, 1);
    list($nd, $bs, $va, $op) = explode("_", $da);
    if ($bs) {
        $nd = $nd ? $nd : ses('qb');
    } else {
        $nd = ses('qb');
        $bs = $d;
    }
    $r = msq_goodtable($da);
    $menu = $r['_menus_'];
    unset($r['_menus_']);
    if ($r && $rep) {
        foreach ($r as $k => $v) {
            $i++;
            $bit[$k] = $v[$rep];
        }
    } elseif ($r && $op) {
        foreach ($r as $k => $v) {
            $i++;
            $bit[$k] = $v;
        }
    }
    $output = '/imgc/' . ses('qd') . '_' . $_SESSION["read"] . '_graph_' . $n . '.png';
    graphics($output, $large, 140, $bit, $_SESSION['clrs'][$_SESSION['prmd']][7], 'yes');
    ///
    if ($_GET["read"]) {
        return image($output, '', '" style="border:0;') . "\n";
    }
}
Example #8
0
File: ajxf.php Project: philum/cms
function batch_preview($f, $sug = '')
{
    req('pop,spe,tri');
    $f = http($f);
    $_GET['urlsrc'] = $f;
    $w = prma('content');
    list($suj, $msg) = vacuum($f);
    $msg = embed_links($msg);
    $msg = clean_br_lite($msg);
    $msg = clean_punct($msg);
    $msg = format_txt($msg, '', 'test');
    $sty = atc('justy') . ats('width:' . $w . 'px;');
    if (strlen($msg) > 400) {
        $sty .= atd('scroll');
    }
    $titl = bal('h2', $suj);
    $_SESSION['sugm'] = $sug;
    $rid = randid('btch');
    $rel = lj('', 'popup_call__x_ajxf_batch*preview_' . ajx($f) . '_', pictit('reload', nms(101))) . ' ';
    $rel .= lj('', 'popup_addArt__x_' . ajx($f) . '_1', picto('edit')) . ' ';
    if (auth(6)) {
        $titl .= $rel . urledt($f) . ' ';
    }
    $titl .= lkt('', $f, picto('url'));
    if (auth(6)) {
        $titl .= newartcat($f);
    }
    $ret .= bal('section', bal('header', $titl) . balb('article', $sty, $msg));
    //$_SESSION['vacuum'][$f]='';
    return popup(preplink($f), $ret, $w);
}
Example #9
0
File: lib.php Project: philum/cms
function scroll_b($r, $d, $n, $w = '', $h = '', $id = '')
{
    $h = $h ? $h . 'px' : 'calc(100vh - 100px)';
    $max = is_numeric($r) ? $r : count($r);
    $w = $w ? $w : prma('content');
    $ca = 'width:calc(100% + 1px); height:' . $h . 'px; overflow:hidden; padding-right:1px;';
    $cb = ' id="scrll' . $id . '" style="width:calc(100% + 16px); overflow:auto; height:' . $h . ';"';
    if ($max > $n) {
        return divs($ca, div($cb, $d));
    } else {
        return $d;
    }
}