Example #1
0
File: ajax.php Project: philum/cms
     $h = $h ? $h - 80 : 640;
     if ($id) {
         $go = '?' . $id . '=' . $va;
     }
     $ret = iframe('index.php' . $go . '§' . ($w + 24) . '/' . $h, '');
     $t = $_SESSION['qb'];
     break;
 case "ucom":
     $ret = 'module/' . $id;
     if ($va) {
         $t = $va;
     }
     break;
 case "modpop":
     req('pop,spe,art,tri,mod');
     $t = strprm($id, 1);
     $t = $t ? $t : strrchr_b($id, ':');
     $t = $t ? $t : $id;
     $s = $va ? $va : 640;
     $ret = build_mod_r($id);
     break;
 case "ajxlnk":
     req('pop,spe,art,tri,mod');
     $_SESSION[$va] = $id;
     if ($id != 'close') {
         $ret = build_mod_r($id);
     }
     break;
 case "ajxlnk2":
     req('pop,spe,art,tri,mod,boot');
     if ($id == 'art') {
Example #2
0
function select_mods_m()
{
    $r = msq_choose('users', ses('qb'), 'mods');
    sort($r);
    $nw = msq_find_next($r);
    $ret = slct_menus($r, '/?admin=console&slct_mods=', prmb(1), 'active', '', 'v') . ' ';
    $ret .= lkc("popbt", '/?admin=console&newfrom_mods=' . $nw, nms(99) . ':' . $nw) . ' ';
    //new
    $prmb = sql('config', 'qdu', 'v', 'name="' . ses('qb') . '"');
    $prmb1 = strprm($prmb, 1, '#');
    if ($prmb1 != prmb(1)) {
        $ret .= lkc("txtyl", '/?admin=console&adopt_mods==', nms(66)) . ' ';
    }
    //apply
    return btn('nbp', btn('txtsmall', 'mods') . ' ' . $ret) . hlpbt('console_mods') . ' ';
}
Example #3
0
File: pop.php Project: philum/cms
function ajxlink($d, $id, $o, $pop)
{
    static $i;
    $i++;
    $here = 'here' . $id . $i;
    $d = str_replace("\n", '', $d);
    $ik = 0;
    if (strin($o, 'notcloseable')) {
        $clb = 1;
    }
    if (strin($o, 'closed')) {
        $cld = 1;
    }
    $cs = 'nbp';
    if ($pop == 'togup') {
        $cld = 1;
    }
    if (strpos($d, ",") !== false) {
        $r = explode(",", $d);
        if (!$_SESSION[$here] && !$cld) {
            $_SESSION[$here] = str_extract('§', $r[0], 1, 0);
        }
        foreach ($r as $k => $v) {
            $hid = strprm($v, 5);
            if ($v && !$hid) {
                if ($pop == 'popup') {
                    $ret .= poplk($v, $here) . ' ';
                } elseif ($pop == 'togup') {
                    $ret .= toglk($v) . ' ';
                } else {
                    $ret .= ajxlk(trim($v), $here, $clb, $ik) . ' ';
                }
                $ik++;
            }
        }
    } else {
        if ($pop == 'popup') {
            $ret .= poplk($d, $here) . ' ';
        } elseif ($pop == 'togup') {
            $ret .= poplk($d, $here) . ' ';
        } else {
            $ret = ajxlk($d, $here, $clb, $ik);
        }
    }
    $ret = div(atd('mnu' . $here) . atc($cs), $ret);
    //$ret=balb('li',atd('mnu'.$here).atc($cs),$ret);
    if ($pop != 'popup' && $_SESSION[$here]) {
        $ter = build_mod_r($_SESSION[$here]);
    }
    $ter = str_replace("\n", " ", $ter);
    return $ret . btd($here, $ter);
}
Example #4
0
File: bubs.php Project: philum/cms
function bub_msql_dir($cat)
{
    $qb = ses('qb');
    $prfx = strprm($cat, 1);
    $tabl = strprm($cat, 2);
    switch ($prfx) {
        case $qb:
            $dir = 'users';
            $nod = $_SESSION['qb'];
            break;
        case 'public':
            $dir = 'users';
            $nod = 'public';
            break;
        case 'design':
            $dir = 'design';
            $nod = $qb;
            break;
        case 'gallery':
            $dir = 'gallery';
            $nod = $qb;
            break;
        case 'admin':
            $dir = 'lang/fr';
            $nod = 'admin';
            break;
        case 'system':
            $dir = 'system';
            $nod = 'admin';
            break;
        case 'program':
            $dir = 'system';
            $nod = 'program';
            break;
        case 'connectors':
            $dir = 'system';
            $nod = 'connectors';
            break;
        case 'helps':
            $dir = 'lang/fr';
            $nod = 'helps';
            break;
    }
    return bub_msql($cat, $dir, $nod, $tabl);
}
Example #5
0
File: spe.php Project: philum/cms
function desk_icon($k, $j)
{
    $ic = $_SESSION['apico'][$k];
    $ra = array('popart' => 'articles', 'msql' => 'server', 'plug' => 'get', 'desktop' => 'folder');
    if ($j) {
        $ica = strprm($j, 1, '_');
    }
    if ($ica == 'desktop' or !$ic) {
        $ic = $ra[$ica];
    }
    return $ic;
}
Example #6
0
function fi_define($p, $o)
{
    $jc = 'users/';
    if ($o == 'auto') {
        $o = $_SESSION['fio'];
    }
    if (strprm($o) == 'auto') {
        $p = $_SESSION['fip'];
        //restitution
        $o = mkprm(mkprm($_SESSION['fio'], '', 5), strprm($o, 1), strprm($o, 2));
    }
    if (strprm($o) == 'shared') {
        $o = mkprm(explode('/', $o), '', 4);
    }
    if ($o) {
        $_SESSION['fio'] = $o;
    }
    $_SESSION['fip'] = $p;
    $rb = explode('/', $o);
    if ($rb[1] != 'distant' && strpos($p, '.') !== false) {
        $p = '';
    }
    //good_p//not for distant and .
    if ($rb[0] == 'disk' && $rb[3] != 'icon') {
        $rb[1] = '';
        if (!$p && !auth(6)) {
            $p = $_SESSION['qb'] ? $_SESSION['qb'] : 'dev';
        }
    }
    $ra = explode('/', $p);
    $_SESSION['droot'] = $rb[1] == 'distant' ? 'http://' . $ra[0] . '/' . $jc : $jc;
    if ($rb[5] == 'update') {
        shared_files();
        distrib_share();
        $rb[5] = '';
    }
    return array($p, $o, $ra, $rb);
}
Example #7
0
File: mod.php Project: philum/cms
function mod_lin($lin, $t, $d, $o)
{
    //mod_link_r
    if ($lin) {
        foreach ($lin as $k => $v) {
            //.($o=='nospace'?'':' ')
            if (strpos($v[0], ':') !== false) {
                $v[0] = strprm($v[0], 1, ':');
            }
            if (strpos($v[2], '/') !== false) {
                $vrf = strprm($v[2], 0);
            } else {
                $vrf = $v[2];
            }
            if ($v[2]) {
                $css = $v[0] == $vrf ? 'active' : '';
            }
            if ($v[1] == 'j') {
                $re[] = lj($css, $v[2], $v[3]);
            } elseif ($v[1] == 'SaveJc') {
                $re[] = ljb($css, $v[1], $v[2], $v[3]);
            } elseif ($o == 'popapi') {
                $re[] = lj('', 'popup_api___' . $v[1] . ':' . ajx($v[2]), $v[3]);
            } elseif ($o == 'ajxlnk2') {
                $re[] = lj('', 'popup_ajxlnk2___' . ajx($v[1]) . '_' . ajx($v[2]), $v[3]);
            } else {
                if ($v[1] && substr($v[2], 0, 1) != '/') {
                    $v[2] = '/' . $v[2];
                }
                $re[] = lk($v[1] . $v[2], atc($css) . atb('title', $v[2]), $v[3]);
            }
        }
    }
    if ($re) {
        return mod_lin_build($re, $t, $d, $o);
    }
}
Example #8
0
File: ajax.php Project: philum/cms
     if ($id) {
         $go = '?' . $id . '=' . $va;
     }
     $ret = iframe('index.php' . $go . '§' . ($w + 24) . '/' . $h, '');
     $t = $_SESSION['qb'];
     break;
 case "ucom":
     $ret = 'module/' . $id;
     if ($va) {
         $t = $va;
     }
     break;
 case "modpop":
     req('pop,api,art,spe,tri,mod');
     $t = strrchr_b($id, ':');
     $t = $t ? $t : strprm($id, 1);
     $t = $t ? $t : $id;
     $s = $va ? $va : 640;
     $ret = build_mod_r($id);
     break;
 case "ajxlnk":
     req('api,pop,spe,art,tri,mod');
     if ($va) {
         $_SESSION[$va] = $id;
     }
     if ($id != 'close') {
         $ret = build_mod_r($id);
     }
     break;
 case "ajxlnk2":
     req('api,pop,spe,art,tri,mod,boot');
Example #9
0
File: mod.php Project: philum/cms
function mod_lin($lin, $d, $o)
{
    //mod_link_r
    if ($lin) {
        foreach ($lin as $k => $v) {
            //$va=str_replace(' '," ",$v[3]);
            if (strpos($v[0], ':') !== false) {
                $v[0] = strprm($v[0], 1, ':');
            }
            if (strpos($v[2], '/') !== false) {
                $vrf = strprm($v[2], 0);
            } else {
                $vrf = $v[2];
            }
            if ($v[2]) {
                $css = $v[0] == $vrf ? 'active' : '';
            }
            if ($v[1] == 'j') {
                $re[] = lj($css, $v[2], $v[3]);
            } elseif ($v[1] == 'SaveJc') {
                $re[] = ljb($css, $v[1], $v[2], $v[3]);
            } else {
                $re[] = lk($v[1] . $v[2], atc($css) . atb('title', $v[2]), $v[3]) . ($o == 'nospace' ? '' : ' ');
            }
        }
    }
    //todo:innocent menu
    if ($d == 'cols') {
        foreach ($re as $k => $v) {
            $re[$k] = li($v);
        }
    }
    return $re;
}
Example #10
0
File: msql.php Project: philum/cms
function msql_menus($ra)
{
    list($bases, $base, $dirs, $dir, $prefixes, $prefix, $files, $table, $ver, $folder) = $ra;
    $rb = $files[$prefix];
    $rc = $rb[$table];
    $url = sesm('url');
    $b = $base . '/';
    if ($dir) {
        $d = $dir . '/';
    }
    $p = $prefix;
    $t = '_' . $table;
    $tb = $table . '_' . $ver;
    if (is_array($bases)) {
        asort($bases);
        $nurl = $url . '#/' . $d . $p . $t;
        //base
        $rt['base'] = msqm_lnk($bases, $nurl, $base, 'txtnoir', "txtx", "k");
    }
    if (is_array($dirs)) {
        asort($dirs);
        $nurl = $url . $b . '#/' . $p . $t;
        //dir
        $rt['directory'] .= msqm_lnk($dirs, $nurl, $dir, "txtnoir", "txtx", "k");
    }
    if ($prefixes) {
        asort($prefixes);
        $nurl = $url . $b . $d . '#' . $t;
        //prefix
        $rt['prefix'] = msqm_lnk($prefixes, $nurl, $prefix, 'txtnoir', 'txtx', 'v');
    }
    if ($rb) {
        asort($rb);
        $nurl = $url . $b . $d . $p . '_#';
        //table
        $rt['table'] = msqm_lnk($rb, $nurl, $table, 'txtnoir', 'txtx', 'k');
    }
    if (count($rc) > 0) {
        //version
        foreach ($rc as $k => $v) {
            $rs[$v] = strprm($v, 1, '_');
        }
        ksort($rs);
        $nurl = $url . $b . $d . $p . '_#';
        $btn = msqm_lnk($rs, $nurl, $tb, 'txtnoir', 'txtx', '');
        if ($btn) {
            $rt['version'] = $btn;
        }
    }
    $s = 'display:table-cell; padding:5px; margin:5px; background:#ddd; border:1px solid #ccc;';
    foreach ($rt as $k => $v) {
        $ret .= divc('cell', $v);
    }
    //$ret=onxcols($rt,4,'',''); //$ret=implode(br(),$rt); $ret=msq_flap($rt);
    //return divc('menu',lka('msql/','root')).$ret);
    return divc('table', $ret) . divc('clear', '');
}