Example #1
0
function prep_host_b($nod)
{
    if ($_SESSION['sbdm']) {
        return subdom($nod) . 'plug/sitemap.php?p=' . $nod;
    } else {
        return 'http://' . $_SERVER['HTTP_HOST'] . '/plug/sitemap.php?p=' . $nod;
    }
}
Example #2
0
File: spe.php Project: philum/cms
function m_nodes($mn, $o)
{
    //arsort($mn);
    if ($o) {
        $nb = sql('name,nbarts', 'qdu', 'kr', 'active="1"');
    }
    if ($mn) {
        foreach ($mn as $k => $v) {
            $css = $k == ses('qb') ? 'active' : '';
            if ($o) {
                $add = ' (' . $nb[$k][0] . ')';
            }
            if (!$v && $k) {
                $v = $k;
            }
            if ($k) {
                $r[] = llk($css, subdom($k), $v . $add);
            }
        }
    }
    //#li
    return $r;
}
Example #3
0
File: bubs.php Project: philum/cms
function bub_adm_admin($dir)
{
    //case:admin
    $r = sesmk('adminauthes', '', 1);
    $rm = msql_read('lang', 'admin_authes', '', 1);
    $ret[] = array('backoffice', 'linkt', '', '/admin/console', '', '', 'Global', 'link');
    if ($r) {
        foreach ($r as $k => $v) {
            if (strdeb($k, '/') == strdeb($dir, '/')) {
                if ($k == 'Microsql') {
                    $ret = bub_msql_fast($ret, $k);
                } else {
                    foreach ($v as $ka => $va) {
                        if ($va <= $_SESSION['auth']) {
                            $t = $rm[$ka] ? $rm[$ka] : $ka;
                            $ico = mimes_types($ka);
                            if ($ka == 'css') {
                                //name,j,root,ico,lk
                                $mlt = 'page_deskbkg;popup_admin__3_css;popup_site___desktop_ok__autosize';
                                $ret[] = array('edition', 'link', 'blank', '/admin/' . $ka, '', '', $k . '/' . $ka, 'link');
                                $ret[] = array('desktop', 'js', 'SaveJc', $mlt, '', '', $k . '/' . $ka, 'popup', '', '');
                                $ret[] = bub_adm('design', 'design', $k . '/' . $ka, $ico);
                                $ret[] = bub_adm('colors', 'colors', $k . '/' . $ka, $ico);
                            } elseif (strtolower($ka) == 'hubs' && auth(5)) {
                                foreach ($_SESSION['mn'] as $kb => $vb) {
                                    $ret[] = bub_l($vb ? $vb : $kb, 'link', subdom($kb), $k . '/' . $ka, $ico);
                                }
                            } elseif ($ka == 'console') {
                                $ret = bub_adm_console($ret, $k . '/' . $ka);
                            } elseif ($ka == 'restrictions') {
                                $ret = bub_adm_rstr($ret, $k, $ka, $t, $ico);
                            } elseif ($ka == 'tickets') {
                                $ret[] = array($t, 'plug', 'chatxml', 'tickets', '', '', $k, 'chat');
                            } elseif ($ka == 'update') {
                                $ret[] = bub_adm($t, ajx($ka), $k, 'download');
                            } else {
                                $ret[] = bub_adm($t, ajx($ka), $k, $ico);
                            }
                        }
                    }
                }
            }
        }
    }
    return $ret;
}
Example #4
0
File: mod.php Project: philum/cms
function home_plan($load, $n)
{
    if ($load) {
        ksort($load);
        foreach ($load as $mrf => $ids) {
            $i++;
            $line = $_SESSION['line'][$mrf];
            $mn = $_SESSION['mn'][$mrf];
            if ($n == 2) {
                $re = outputimg($ids);
            } else {
                $re = m_pubart($ids, "scroll", "10000");
            }
            if ($mrf != "user" && $mrf != "_system" && $re && ($line or $mn)) {
                if ($n == 2) {
                    $nib = 25;
                } else {
                    $nib = 7;
                }
                if ($line) {
                    $got = htac('cat') . $mrf;
                } else {
                    $got = subdom($mrf);
                }
                $nbrt = btn("txtsmall2", nbof(count($ids), 1));
                $ret[$i] = lkc('txtcadr', $got, $mrf) . ' ' . $nbrt . br();
                $ret[$i] .= divc("tab", scroll($ids, $re, $nib)) . br();
            }
        }
        if ($ret) {
            if (count($ret) < 2 or $n == 2) {
                $prm = 1;
            } else {
                $prm = 2;
            }
            return columns($ret, $prm, 'board', 'pubart');
        }
    }
}
Example #5
0
File: mod.php Project: philum/cms
function make_ban($here, $t)
{
    $qb = ses('qb');
    $htacc = subdom($qb);
    $banim = 'img/ban_' . $qb . '.jpg';
    if (file_exists($banim)) {
        return lkc("", $htacc, img($banim));
    } else {
        return bal('h1', lka($htacc, $t ? $t : $_SESSION['mn'][$qb]));
    }
}
Example #6
0
File: admin.php Project: philum/cms
function adm_hubs($auth)
{
    $goto = '/?admin=hubs';
    $qb = ses('qb');
    $qdu = ses('qdu');
    $USE = ses('USE');
    if ($mna && $auth >= 5) {
        $mna = $_SESSION['mn'] + $mna;
    } else {
        $mna = ses('mn');
    }
    //if($mna)$ret.=balc('ul','panel',m_nodes_b($mna,1));
    $ret .= hublist() . br();
    if ($auth >= 6 && prms('create_hub') == 'on' or $auth >= 7) {
        $ret .= loged('', '', 'create new hub', '10') . br();
    }
    if ($_GET['rename_hub'] && $auth >= 5) {
        //renmae_hub
        if ($_POST['hub_name']) {
            $newname = trim($_POST['hub_name']);
            $_SESSION['mn'][$qb] = $newname;
            update('qdu', 'hub', $newname, 'name', $qb);
        }
        $valu = input2('text', 'hub_name', $_SESSION['mn'][$qb], 'txtx');
        $valu .= input2('submit', 'Submit', 'rename_hub', '');
        $ret .= form($goto . '&rename_hub==', btn('panel', $valu)) . br();
    } elseif ($auth >= 5) {
        $ret .= lkc('popsav', $goto . '&rename_hub==', nms(87)) . ' ';
    }
    //kill_hub
    if ($auth >= 6 && $_GET['kill_hub'] == 'ok') {
        $f = 'users/' . ses('qb');
        walk_dir($f, 'remove');
        rmdir($f);
        $f = 'msql/users/' . $qb . '_cache.php';
        if (is_file($f)) {
            unlink($f);
        }
        for ($i = 1; $i < 10; $i++) {
            $f = 'msql/design/' . $qb . '_design_' . $i . '.php';
            if (is_file($f)) {
                unlink($f);
            }
            $f = 'msql/design/' . $qb . '_clrset_' . $i . '.php';
            if (is_file($f)) {
                unlink($f);
            }
            $f = 'msql/users/' . $qb . '_mods_' . $i . '.php';
            if (is_file($f)) {
                unlink($f);
            }
        }
        msquery('DELETE FROM ' . $qdu . ' WHERE name="' . $qb . '" LIMIT 1');
        $_SESSION['USE'] = '';
        relod(subdom(prms('default_hub')));
    }
    //reinit_hub
    if ($auth >= 6 && $_GET['reinit_hub'] == 'ok') {
        makenew(ses('qb'), 1);
    }
    //publish
    if ($auth >= 6) {
        if ($_GET['publish']) {
            if ($_GET['publish'] == 'off') {
                $actv = 0;
            } else {
                $actv = 1;
            }
            update('qdu', 'active', $actv, 'name', $qb);
        }
        $opened = rse('active', $qdu . ' WHERE name="' . $qb . '"');
        if ($opened == '1') {
            $ere = 'off';
            $st = nms(130);
        } else {
            $ere = 'on';
            $st = nms(131);
        }
        $ret .= lkc('popsav', $goto . '&publish=' . $ere . '#' . $id, offon($opened) . ' ' . $st) . ' ';
        $ret .= lkc('popsav', $goto . '&reinit==', nms(95) . ' ' . nms(103)) . ' ';
    }
    if ($_GET['reinit'] == '=') {
        $ret .= btn('txtx', 'restore all defaults ?') . lkc('txtyl', $goto . '&reinit_hub=ok', 'ok') . ' ';
    }
    if ($auth >= 6) {
        $ret .= lkc('txtyl', $goto . '&kill_hub==', nms(76) . ' ' . nms(100)) . ' ';
        if ($_GET['kill_hub'] == '=') {
            $ret .= btn('txtx', 'All datas will be lost') . lkc('txtyl', $goto . '&kill_hub=ok', 'ok');
        }
    }
    return $ret . br();
}
Example #7
0
File: lib.php Project: philum/cms
function prep_host($nod)
{
    if ($_SESSION['sbdm']) {
        return subdom($nod);
    } else {
        return host() . htacc('id') . $nod;
    }
}
Example #8
0
File: admin.php Project: philum/cms
function adm_killhub()
{
    $qb = ses('qb');
    $f = 'users/' . $qb;
    walk_dir($f, 'remove');
    rmdir($f);
    $f = 'msql/users/' . $qb . '_cache.php';
    if (is_file($f)) {
        unlink($f);
    }
    for ($i = 1; $i < 10; $i++) {
        $f = 'msql/design/' . $qb . '_design_' . $i . '.php';
        if (is_file($f)) {
            unlink($f);
        }
        $f = 'msql/design/' . $qb . '_clrset_' . $i . '.php';
        if (is_file($f)) {
            unlink($f);
        }
        $f = 'msql/users/' . $qb . '_mods_' . $i . '.php';
        if (is_file($f)) {
            unlink($f);
        }
    }
    update('qda', 'nod', '_' . $qb, 'nod', $qb);
    //msquery('DELETE FROM '.ses('qdm').' WHERE id=(select id from '.ses('qda').' where name="'.$qb.'")');
    //msquery('DELETE FROM '.ses('qda').' WHERE name="'.$qb.'"');
    //msquery('DELETE FROM '.$qdu.' WHERE name="'.$qb.'" LIMIT 1');
    if ($_SESSION['USE'] == $qb) {
        $_SESSION['USE'] = '';
    }
    relod(subdom(prms('default_hub')));
}