Example #1
0
File: rssin.php Project: philum/cms
function pane_base($url, $suj, $frm, $day, $img, $msg, $alx)
{
    static $id;
    $id++;
    //$msg=ereg_replace('width='."^[_a-zA-Z0-9.]+$","",$msg);//([[:digit:]]*)
    $ara = array("<![CDATA[", "]]>");
    $suj = str_replace($ara, " ", $suj);
    $url = str_replace($ara, " ", $url);
    $msg = str_replace($ara, " ", $msg);
    if ($img != "") {
        $gmi = '<img src="' . $img . '" class="imgl" border="0" height="72">';
    }
    $id_art = recognize_article($url, clean_title($suj), $alx);
    //already_exists
    if ($id_art) {
        $opt .= popart($id_art);
    } elseif ($_SESSION["USE"] == $_SESSION["qb"] or $_SESSION["auth"] > 3) {
        $purl = ajx($url, '');
        $opt .= ljb('txtx', 'SaveJ', 'popup_addArt___' . $purl . '_1', "save") . ' ';
        //$opt.=ljb('txtbox','SaveIf',$purl,'save').' ';
        $opt .= btd('btc' . $id, lj('txtx', 'btc' . $id . '_batch__xd_' . $purl . '_p', '+')) . ' ';
        $opt .= ljb('txtx', 'Close', 'art' . $id, 'x');
    }
    $panout = array('sty' => 'tab', 'id' => $id, 'suj' => $suj, 'date' => $day, 'tag' => " ", 'opt' => $opt, 'thumb' => $gmi, 'msg' => $msg, 'url' => $url);
    $ret = template_build(template_rss(), $panout);
    return divd('article', $ret);
}
Example #2
0
function plug_microform($p, $id)
{
    $rid = 'mfr' . randid();
    //echo $p.'-'.$id;
    $nod = ses('mform', ses('qb') . '_microform_' . $id);
    req('pop');
    ses('mformj', $rid . '_plug___microform_plug*microform_' . ajx($p) . '_' . $id);
    reqp('msql');
    $msq = new msql('', $nod);
    //table
    list($p, $tp) = explode('§', $p);
    $rb = mform_mr($p);
    //p($rb);
    $msq->create($rb);
    $ret .= make_form($p, 'mfr' . $id, '_plug___microform_mform*j_' . ajx($p, '') . '_' . $id . '_') . br();
    if (auth(4)) {
        $ret .= msqlink('users', ses('mform')) . ' ' . btn('txtsmall2', $nod) . ' ';
    }
    if ($tp == 1) {
        $ret .= mform_read($id);
    } elseif ($tp) {
        $ret .= plugin('msqtemplate', $nod, $tp);
    }
    return divd($rid, $ret . $bt);
}
Example #3
0
function udc_build($p)
{
    if ($p == '1' && auth(6)) {
        $r = udc_source();
    }
    $r = msql_read('users', 'ummo_umvoc_1', '', 1);
    if ($r) {
        foreach ($r as $k => $v) {
            $ra[$v[0]] = $v;
        }
    }
    ksort($ra);
    if ($ra) {
        foreach ($ra as $k => $v) {
            //if(strpos($v[3],'Eyaoloowa')!==false){}
            //$rb[$k][]=divc('title',$k);
            $rb[$k][] = lj('', 'popup_plup___umvoc_ud*glossary_' . ajx($k), $k) . ' ';
            $f = 'users/ummo/glyphes/' . strtoupper($k) . '.png';
            $rb[$k][] = is_file($f) ? udc_imz($f, 6) : '';
            //$rb[$k][]=is_file($f)?image('/'.$f,'',''):'';
            $rb[$k][] = stripslashes($v[1]);
            $rb[$k][] = lj('', 'popup_search___' . ajx($k), picto('search', 16));
            $rb[$k][] = $v[3];
        }
    }
    return make_table($rb);
}
Example #4
0
function msqedit($p, $o)
{
    $bt = lj('', 'popup_plup___msqedit_msqdt*add_' . ajx($p) . '_' . $o, pictxt('add')) . ' ';
    $bt .= lj('', 'editmsql_plug__15_msqedit_msqdt*build_' . ajx($p) . '_' . $o, pictxt('refresh')) . ' ';
    //$bt.=lj('txtx','editmsql_plug___msqedit_msqdt*herit*overmenus_'.ajx($p),'herit overmenus');
    $bt .= msqlink('', ses('qb') . '_' . $p);
    $_SESSION['popm'] = $bt;
    return $bt . divd('editmsql', msqdt_build($p, $o));
}
Example #5
0
File: book.php Project: philum/cms
function book_cover($t)
{
    $t = str_replace(' ', "\n", $t);
    $w = $_SESSION['prma']['content'];
    $t = call_plug('', 'popup', 'book', ajx($_SESSION['book']) . '_' . $w, $t);
    //
    return div(' class="book" style="background-color:black; padding:10px; width:220px;"', divs('background-color:#222; border:1px solid #fff; padding:5px; margin:auto; color:white; font-size:16px; text-align:center; text-decoration:none;', $t));
    return $ret;
}
Example #6
0
File: twit.php Project: philum/cms
function twit_reply($q)
{
    if ($id = $q['in_reply_to_status_id']) {
        $name = utf8_decode($q['in_reply_to_screen_name']);
        $link = lkt('txtx', 'https://twitter.com/' . $name . '/status/' . $id, pictxt('url', $name)) . ' ';
        $thread = lj('txtx', 'popup_plup__3_twit_twit*thread_' . ajx($q['id']), pictxt('up', 'thread')) . ' ';
        $previous = lj('txtx', 'popup_plup__3_twit_twit*build_' . ajx($q['in_reply_to_status_id']), pictxt('back', 'last')) . ' ';
        return btn('txtsmall2', nms(91) . ' ' . nms(36)) . ' ' . $link . $thread . $previous;
    }
}
Example #7
0
function plug_msqadd($p, $o)
{
    $p = $p ? $p : '1';
    $bt .= balise('input', atd('type', 'text') . atd('nod') . atv($p) . ats('padding:4px;'), '', 1) . ' ';
    $bt .= lj('txtbox', 'cbk_plug___msqadd_msqadd*j_' . ajx($p) . '__nod|txt', 'save') . ' ';
    $bt .= btd('cbk', '') . br();
    //callback
    $bt .= txarea('txt', '', 60, 10, ats('font-size:medium; padding:4px; width:340px; height:300px;')) . br();
    $ret = msqadd_read('msqadd_' . $p);
    return $bt . divd('plugmsqadd', $ret);
}
Example #8
0
File: dsnav.php Project: philum/cms
function embed_li_dsnav($d, $v, $isr)
{
    $_SESSION["nbsd"]++;
    $ds = $_SESSION["ds"];
    $qb = $_SESSION['qb'];
    $xt = substr($v, -4);
    if ($v) {
        $f = $d . '/' . $v;
    } else {
        $f = $d;
    }
    if ($xt == ".jpg" or $xt == ".png" or $xt == ".gif") {
        $img = make_thumb_c($f);
        if (is_file($f)) {
            list($w, $h) = getimagesize($f);
        }
        $ww = '_' . $w . '_' . $h;
    }
    $f = str_replace(array('users/', 'imgb/icons/'), '', $f);
    $fb = ajx($f, 0);
    if (is_numeric($ds)) {
        //bkg
        if ($isr) {
            $ret = lj("popbt", 'bkg' . $ds . '_dsnav___' . $fb . '_bkg', $v);
        } else {
            list($w, $h) = getimagesize($f);
            $tx = $v . ' (' . $w . ' * ' . $h . ')';
            //if(is_file($f))
            $ret = lj('', 'css' . $ds . '_stylsav___' . $fb . '_' . $ds . '_2', $img . $tx) . hr();
        }
    }
    if ($ds == "gl") {
        if ($isr) {
            $ret = lj("popbt", 'popup_gallery__3x_' . $fb, $v);
        }
    }
    //photo
    if ($ds == "dl") {
        $dlm = $_SESSION['qb'] . '/' . $_SESSION['dlmod'];
        //dwnl
        if ($isr) {
            $ret = lj("popbt", 'dsnavds_dsnav___' . $fb . '_users/' . $dlm, $v);
        } elseif ($img) {
            $ret = ljb("popw", 'SaveBf', 'photo_users/' . $fb . $ww, $img . $v);
        } else {
            $ret = lkt("popw", $d . '/' . $v, $img . $v);
        }
    }
    if ($ds == "ic" && !$isr) {
        return $ret;
    } elseif ($ret) {
        return '&#9500;' . $ret . br();
    }
}
Example #9
0
File: mysqm.php Project: philum/cms
function mq_tables($p, $o, $res = '')
{
    list($p, $o) = ajxp($res, $p, $o);
    $r = lstrc(rcptb($p));
    if ($r) {
        foreach ($r as $v) {
            $ret .= lj('', 'mqm_plug___mysqm_mq*cols_' . ajx($v) . '_' . ajx($p), $v);
        }
    }
    //$ret=walkeach($r,'mqt_w',$p);implode('',)
    return btn('list', $ret);
}
Example #10
0
 static function menu($p, $o, $rid)
 {
     $ret = inp('inp', $p ? $p : 1) . ' ';
     $ret .= lj('', $rid . '_app___slides_j__' . $rid . '_inp', picto('reload')) . ' ';
     if (auth(6)) {
         $ret .= lj('', 'popup_plupin___msqedit_slides*' . $p . '_val', picto('edit')) . ' ';
         $j = 'popup_msqledit___users_' . ajx(ses('nodslid')) . '_';
         $ret .= lj('', $j . $p . '_1', picto('editxt')) . ' ';
         $ret .= lj('', 'popup_plup___msqedit_msqdt*add_slides*' . $p . '_val', picto('add')) . ' ';
     }
     return divc('', $ret);
 }
Example #11
0
function plug_umglyphes($p, $o)
{
    if ($o == '1') {
        return ug_build($p);
    }
    $ret .= lj('', 'umglph___4', picto('del')) . ' ';
    $ret .= inp('umglph', $p, atz('44')) . ' ';
    $ret .= lj('popsav', 'umgl_plug___umglyphes_ug*build_' . ajx($p) . '__umglph', 'ok') . ' ';
    $ret .= divd('umgl', ug_build($p)) . br();
    $ret .= msqlink('', 'ummo_umvoc_1', '') . ' ';
    $ret .= lkt('', '/plug/umvoc', picto('link'));
    return $ret;
}
Example #12
0
function plug_msqtemplate($nod, $tmp)
{
    //require_once('plug/msqads.php');
    $ret = lj('txtbox', 'msqt_plug___msqtemplate_plug*msqtemplate_' . ajx($nod) . '_' . ajx($tmp), picto('reload')) . br();
    if ($tmp) {
        $tpl = msql_read('users', $_SESSION['qb'] . '_template', $tmp);
        if (!$tpl) {
            $tpl = msql_read('users', 'public_template', $tmp);
        }
        $ret .= msqt_build_from_template($nod, $tpl);
    } elseif ($nod) {
        $ret .= msqt_read($nod, 0);
    }
    return divd('msqt', stripslashes($ret));
}
Example #13
0
File: ftp.php Project: philum/cms
function ftp_render($r)
{
    $j = 'popup_plup___ftp_ftp*ops_';
    if ($r) {
        foreach ($r as $k => $v) {
            $f = $v[2];
            $t = $v[3];
            $rb[$k][] = lkc('txtbox', $f, $t);
            $rb[$k][] = lj('txtx', $j . 'rename_' . ajx($f), 'rename');
            $rb[$k][] = lj('txtx', $j . 'delete_' . ajx($f), 'del');
            $rb[$k][] = lj('txtx', $j . 'copy_' . ajx($f), 'copy to');
            $rb[$k][] = lj('txtx', $j . 'infos_' . ajx($f), 'infos');
        }
    }
    return make_divtable($rb);
}
Example #14
0
function addfonts_j($var1, $var2, $res)
{
    $r = msql_read('', 'public_addfonts', '');
    if ($r) {
        $rk = array_keys_r($r, 0, 'k');
    }
    $res = ajx(substr($res, 0, -1), 1);
    $res = embed_detect($res, '{', '}', '');
    $res = str_replace(array('"', "'", ' ', "\n", "\r", "\t", "?#iefix", "?", "!"), '', $res);
    $ra = explode(';', $res);
    $nb = count($ra);
    for ($i = 0; $i < $nb; $i++) {
        list($attrb, $value) = split_right(':', $ra[$i], 0);
        if ($attrb == 'font-family') {
            $rb['name'] = $value;
        }
        $rab = explode(',', $ra[$i]);
        if ($rab) {
            foreach ($rab as $k => $va) {
                $rt = embed_detect($va, 'url(', ')', '');
                //echo $rt.br().br();
                if ($rt && !$rk[$rb['name']]) {
                    $rs = str_extract('#', $rt, 0, 0);
                    $xt = strrchr_b($rt, '.');
                    if ($xt && substr($rs, 0, 4) == 'http' && $xt != 'eot?') {
                        $rb[$xt] = $rs;
                    } else {
                        $noturl = 1;
                    }
                }
            }
        }
    }
    if ($rb[0]) {
        $rb = msq_reorder($rb);
    }
    //p($rb);
    $dfb['_menus_'] = array('name', 'eot', 'woff', 'svg', 'ttf');
    if (count($rb) > 1) {
        $r = msql_modif('users', 'public_addfonts', $rb, $dfb, 'push', '');
        //p($rb);
        return addf_read($r);
    } else {
        return btn('txtred', $noturl ? 'not absolte url' : 'already_exists');
    }
}
Example #15
0
File: favs.php Project: philum/cms
function fav_com($p, $r = '')
{
    $ret = fac_com_add($p);
    if (!$r) {
        $r = msq_where('', ses('qb') . '_coms', 0, ses('iq'));
    }
    if ($r) {
        foreach ($r as $k => $v) {
            if ($v) {
                $del = lj('', 'plgfavs_plug___favs_fav*com*del_' . $k, picto('no')) . ' ';
                $edt = lj('', 'plgfavs_plug___favs_fav*com*edt_' . $k, picto('editxt')) . ' ';
                $exp = lj('', 'popup_plupin___api_' . ajx($v[2] . ',preview:full,file:' . $v[1]), pictxt('export')) . ' ';
                $re = lj('', 'popup_plupin___api_' . ajx($v[2] . ',t:' . $v[1]), pictxt('get', $v[1]));
                $ret .= divc('txtcadr', $del . $edt . $exp . $re);
            }
        }
    }
    return $ret;
}
Example #16
0
File: radio.php Project: philum/cms
function radio_build($dr, $nod)
{
    $dr = 'users/' . ajx($dr, 1);
    $sqdir = 'msql/radio/';
    if (!is_dir($sqdir)) {
        mkdir($sqdir);
    }
    $nod = $_SESSION['qb'] . '_radio' . $_SESSION['read'];
    $file = $sqdir . $nod . '.php';
    $ret['_menus_'] = array('prog', 'file', 'length', 'title', 'txt', 'img');
    $r = explore($dr);
    if ($r) {
        foreach ($r as $k => $v) {
            $ret[$k + 1] = array('0', $dr . '/' . $v, '0', $v, '', '');
        }
    }
    save_vars($sqdir, $nod, $ret);
    return ljb("popbt", "insert", '[' . $nod . ':radio]', "insert") . ' ';
}
Example #17
0
File: plug.php Project: philum/cms
function plug_menu($d, $p, $o, $dr)
{
    if ($dr) {
        $dr = '/' . $dr;
    }
    //$ret.=li(lien('txtsmall','/plug/index',picto('phi')));
    $ret .= popbub('plug', 'plugin', picto('phi2'), 'd', 1);
    //$ret.=llj('','popup_plup___plug_plug*slct',picto('list'));
    $ret .= li(lkc('txtsmall', host() . '/plug/' . $d . ($p ? '/' . $p : '' . ($o ? '/' . $o : '')), picto('reload')));
    $ret .= li(call_plug('txtsmall', 'popup', 'codeview', 'plug' . $dr . '_' . ajx($d), picto('conn')));
    //source
    if (auth(3)) {
        $ret .= msqlink('system', 'program_plugs') . ' ';
    }
    $ret .= plug_hlp($d);
    if (auth(4)) {
        $ret .= lj('', 'popup_editmsql___system/program*plugs_' . ajx($d) . '__1', picto('edit')) . ' ';
        $ret .= lj('', 'popup_editmsql___lang/fr/program*plugs_' . ajx($d) . '__1', picto('flag')) . ' ';
    }
    return mkbub($ret, 'inline', '', 'this.style.zIndex=popz+1;') . divc('admnu', '');
}
Example #18
0
function spp_sav($rid, $var2, $res)
{
    $nod = $_SESSION['sppnod'];
    $r = msql_read('users', $nod, '');
    $rb = explode('_', $res);
    $nb = count($rb);
    for ($i = 0; $i < $nb; $i++) {
        $rb[$i] = ajx($rb[$i], 1);
    }
    if (spp_verif($r, $rb[0]) != true) {
        if (count($r) == 1) {
            $r[1] = $rb;
        } else {
            $r[] = $rb;
        }
        if ($rb[0]) {
            msql_save('', $nod, $r);
        }
        return spp_table($rid);
    } else {
        return btn('txtred', 'already_exists');
    }
}
Example #19
0
File: codev.php Project: philum/cms
function plug_codev($p, $o, $fc = '')
{
    //echo $fc;
    $dr = ($p == 'plug' ? $p : 'progb') . '/';
    $oa = $o . '.php';
    if (!is_file($dr . $oa)) {
        $oa = $o . '.js';
    }
    $sav = 'save: ' . $oa;
    if ($p) {
        $d = read_file($dr . $oa);
    }
    $d = str_replace(array('<' . '?php' . "\n", "\n" . '?' . '>', '<' . '?php', '?' . '>'), '', $d);
    if ($fc) {
        $d = find_end($d, 'function ' . $fc . '(', '{', '}');
    }
    //$ret.=txarea('txt',htmlentities($d),52,26,atc('console')).br();
    $ret .= lj('', 'codev_plugin___codev_' . $p . '_' . $o . '_' . $fc, picto('reload')) . ' ';
    $ret .= btd('bts', lj('popsav', 'cbk_plug__xd_codev_codsav_' . $p . '|' . ajx($oa) . '|' . ajx($fc) . '__txt', $sav)) . btd('cbk', '') . br();
    $ret .= '<textarea id="txt" class="console" style="min-width:550px; min-height:320px;">' . $d . '</textarea>';
    //htmlentities
    return divd('codev', $ret);
}
Example #20
0
function up_iframe($d, $p)
{
    return '<iframe src="/plug/upload.php?open==&go=' . ajx($d) . '&chk=' . $p . '" frameborder="0" margin="0" hspace="0" scrolling="no" style="width:300px; height:26px;"></iframe>';
}
Example #21
0
File: art.php Project: philum/cms
function urledt_id($id)
{
    $b = rstr(18) ? 'public' : $_SESSION['qb'];
    $u = is_numeric($id) ? rqt($id, 9) : $id;
    list($k) = verif_defcon($u);
    //
    return lj('', 'popup_editmsql___users/' . $b . '*defcons_' . ajx($k), picto('txt'));
}
Example #22
0
File: tri.php Project: philum/cms
function add_defcon($d)
{
    $d = http_domain($d);
    return msqlink('', (rstr(18) ? 'public' : $_SESSION['qb']) . '_defcons', ajx($d));
}
Example #23
0
File: boot.php Project: philum/cms
function build_deskpage($read)
{
    $gmd = $_GET['module'];
    Head::add('jscode', desktop_js('boot'));
    if ($read) {
        $ret = 'popup_ajxlnk2___' . $read;
    } elseif ($cat = $_GET['cat']) {
        $ret = 'popup_ajxlnk2___cat_' . ajx($cat);
    } elseif ($gmd && $gmd != 'Home') {
        $ret = 'popup_modpop__3_' . $_GET['p'] . ':' . $gmd;
    } elseif ($plg = $_GET['plug']) {
        $ret = 'popup_plupin___' . $plg . '_' . $_GET['p'];
    } elseif ($ra = api_load_rq()) {
        $ret = 'popup_apij___' . implode_k($ra, ',', ':');
    } elseif ($cnt = $_GET['context']) {
        $ret = 'popup_ajxlnk2__3_context_' . $cnt;
    }
    if ($ret) {
        Head::add('jscode', sj($ret));
    }
}
Example #24
0
File: pop.php Project: philum/cms
function jwplayer($doc, $l)
{
    $doc = goodroot($doc);
    $rid = randid();
    if (substr($doc, 0, 4) != 'http') {
        $bs = host() . '/';
    }
    $nm = $rid . 'emd' . substr(strrchr($doc, '/'), 0, 4);
    $add = divd($nm, lj('txtx', $nm . '_embed___' . ajx($bs . $doc, ''), 'source'));
    $flvr = '&controlbar=over&file=' . $bs . $doc . '&image=&mute=true&skin=video/lulu.xml&stretching=fill';
    //&plugins=viral-2d
    return embed_flsh("video/player.swf", $l, $l * 0.7, $flvr) . $add;
}
Example #25
0
function bar_add_mod($vl)
{
    $r = msql_read('system', "admin_modules", '', 1);
    if ($r) {
        foreach ($r as $k => $v) {
            $defs[$v[0]][$k] = $v[1];
        }
    }
    $re = prep_cond_mods($vl);
    list($defb, $defc, $defd) = whose_mods($re, $vl, $defs);
    $def = array_merge($defc, $defd);
    $ret .= btn("txtsmall", 'module:');
    ksort($def);
    //$ret.=menuder_form_kv($def,'bar" id="modbar',"","kk").' ';//defc
    $ret .= select(atn('bar') . atd('modbar'), $def, 'kk');
    $ret .= btn("txtsmall", 'condition:');
    $here = $_SESSION['cond'][0];
    //$ret.=menuder_form_kv(array('-','home','cat','art'),'pos" id="modcond',$here,"vv").' ';
    $ret .= select(atn('pos'), array('-', 'home', 'cat', 'art'), 'vv', $here);
    $ret .= btn("txtsmall", 'position:');
    if (!is_array($re)) {
        $re = array("-" => "-");
    }
    end($re);
    $here = current($re);
    //select last
    //$ret.=menuder_form_kv($re,'pos" id="modpos',$here,"vk").' ';
    $ret .= select(atn('pos') . atd('modpos'), array_flip($re), 'kv', $here) . ' ';
    //
    $ret .= ljb('popsav', 'SaveR', 'modules_' . $vl . '__add\',\'modpos|modbar|modcond', nms(92)) . br();
    $ret .= '</form>' . br();
    $ret .= divc('imgr', hlpbt('modules'));
    $hlp = msql_read("lang", "admin_modules", "");
    //help
    foreach ($def as $k => $v) {
        $cat = $r[$k][0];
        if (!$cat) {
            $cat = 'user';
        }
        if (!$_SESSION['line'][$k]) {
            $df[$cat][] = ljb('popbt', 'SaveR', 'modules_' . $vl . '_' . ajx($k) . '_add\',\'modpos', $k) . ' ' . btn('txtsmall2', $hlp[$k][0]);
        }
    }
    $ret .= make_tabs($df);
    return $ret;
}
Example #26
0
File: styl.php Project: philum/cms
function css_fontface($p, $b, $c, $o, $s, $u)
{
    //page,cat,size,opt
    $csa = 'txtx';
    $csb = 'txtred';
    $jx = 'pop_';
    if (!$b) {
        $b = 'all';
    }
    $r = msql_read('server', 'edition_typos', '', 1);
    $n = count($r);
    asort($r);
    $rb['all'] = 1;
    $b = $b == '' ? 'unclassed' : $b;
    $gf = 'stylsff___';
    $s = substr($s, 0, -1);
    if ($s) {
        $o = 'rch' . $s;
    }
    if (!is_file('msql/server/edition_typos.php')) {
        $ret .= lkc('txtyl', '?admin=fonts', 'update server_table') . br() . br();
    }
    //rb//rd
    $ard = array('', 'fontsquirrel', 'fontspring', 'myfonts');
    if ($r) {
        foreach ($r as $k => $v) {
            if ($v[1]) {
                $rb[$v[1]] = 1;
            }
            if (is_numeric($v[4])) {
                $rd[$v[4]] = $ard[$v[4]];
            }
        }
    }
    // else $rd[$v[4]]=$v[4];
    $rb['unclassed'] = 1;
    ksort($rb);
    $_SESSION['fntcat'] = $rb;
    //cat
    if ($b && $b != 'unclassed' && $b != 'all') {
        $hlp = divc('panel', helps($b, 'typos')) . br();
    }
    foreach ($rb as $k => $v) {
        $mnu .= lj($k == $b ? $csb : $csa, $jx . $gf . '1_' . ajx($k) . '_' . $c . '_' . $o, $k) . ' ';
    }
    $mnu .= br();
    $b = $b == 'unclassed' ? '' : $b;
    $pk = substr($o, 0, 3);
    $pv = substr($o, 3);
    if ($pv) {
        $pp[$pk] = $pv;
    }
    //rech
    $srch .= input2('text', 'srch" size="8" id="srchfnt', $pp['rch'] ? $pp['rch'] : 'search', '');
    $srch .= ' ' . lj('popbt', $jx . $gf . '1_' . $b . '_' . $c . '_' . $o . '_srchfnt', 'ok') . ' ';
    $srch .= lj('popbt', $jx . $gf . '1_all', 'x');
    //tri
    foreach ($r as $k => $v) {
        if (!$pv or ($pp['acc'] && $pp['acc'] == $v[2] or $pp['fav'] && $pp['fav'] == $v[3] or $pp['fam'] && $pp['fam'] == $v[4] or $pp['rch'] && stristr($v[0], $pp['rch']) !== false)) {
            if ($v[1] == $b or $b == 'all') {
                $rc[$k] = $v;
            }
        }
    }
    $n = count($rc);
    //pages
    $no = 20;
    $np = 10;
    $min = $p - $np;
    $max = $p + $np;
    $nb = ceil($n / $no);
    $bb = ajx($b);
    for ($i = 1; $i <= $nb; $i++) {
        if ($i == 1 or $i == $nb or $i > $min && $i < $max) {
            //$rtp.=lj(($i==$p?'active':''),$jx.$gf.$i.'_'.$bb.'_'.$c.'_'.$o,$i);
            $rtp .= lj($i == $p ? 'active' : '', $jx . $gf . $i . '_' . $bb . '_' . $c . '_' . $o, $i) . ' ';
        }
        if ($i == 2 && $min > 2 or $i == $nb - 1 && $max < $nb - 1) {
            $rtp .= '... ';
        }
    }
    $nbp = divc('nb_pages', $rtp);
    $c = is_numeric($c) ? $cb = $c : 48;
    $arz = array(12, 24, 36, 48, 72);
    foreach ($arz as $k => $v) {
        //size
        $siz .= lj($v == $c ? $csb : $csa, $jx . $gf . $p . '_' . $b . '_' . $v . '_' . $o, $v) . ' ';
    }
    //label
    $go = $gf . $p . '_' . $bb . '__';
    if ($rd) {
        foreach ($rd as $k => $v) {
            $prp .= lj($pp['fam'] == $k ? $csb : $csa, $jx . $go . 'fam' . ($pp['fam'] == $k ? '' : $k), $v) . ' ';
        }
    }
    $prp .= lj($pp['acc'] ? $csb : $csa, $jx . $go . 'acc' . ($pp['acc'] ? '' : 1), 'accents') . ' ';
    $prp .= lj($pp['fav'] ? $csb : $csa, $jx . $go . 'fav' . ($pp['fav'] ? '' : 1), 'favs') . ' ';
    //render
    $max = $p * $no;
    $min = $max - $no;
    if ($rc) {
        foreach ($rc as $k => $v) {
            $ia++;
            if ($ia >= $min && $ia < $max && $v[0]) {
                $rta .= '@font-face {' . css_ff($v[0]) . '}' . "\n";
                $rtb .= preview_ff($k, $v, $c);
            }
        }
    }
    $ret .= css_code($rta) . $mnu . $hlp . $siz . $prp . $srch . br() . br();
    $ret .= input(1, 'ffwr', $_SESSION['ffstr'] ? $_SESSION['ffstr'] : 'AaBbCcDdEe0123יא', '" size="44');
    $ret .= lj('txtx', 'ffwr_sesmake_ffwr__ffstr', 'set');
    $ret .= divd('scroll', divd('pop', $nbp . br() . $rtb . $nbp)) . br();
    if ($u) {
        return popup('create font-face', divs('width:640px;', $ret));
    } else {
        return css_code($rta) . $nbp . br() . $rtb . $nbp;
    }
}
Example #27
0
File: bubs.php Project: philum/cms
function bub_apps($r, $d, $dir, $cond)
{
    //$r,,dir,cond
    if ($dir == 'zero') {
        $dir = '';
        $dd = 'd';
    }
    $dr = explode('/', $dir);
    $nd = $dir ? count($dr) : 0;
    if ($r) {
        foreach ($r as $k => $v) {
            $rc = array_flip(explode(' ', ' ' . $v[5]));
            if ($rc[$cond ? $cond : 'menu'] or !$v[5]) {
                $t = $v[0];
                $rv = explode('/', $v[6]);
                $nv = $v[6] ? count($rv) : 0;
                $ico = $v[7] ? picto($v[7], 'min-width:20px;') . '&nbsp;' : '';
                $rvb = $rv[$nv - 1];
                if ($dir == $v[6]) {
                    $is = true;
                } else {
                    $is = match_vdir($dr, $nd, $rv);
                }
                if ($is && $nv >= $nd + 1 && !$v[8] && auth($v[9])) {
                    $root = $v[6];
                    //dirs
                    if ($nv >= $nd + 1) {
                        $rvb = $rv[$nd];
                        $rot = '';
                        for ($i = 0; $i <= $nd; $i++) {
                            $rot[] = $rv[$nd - $i];
                        }
                        $rot = array_reverse($rot);
                        if ($rot) {
                            $root = implode('/', $rot);
                        }
                    }
                    $pc = picto('kright', '20px') . '&nbsp;' . $rvb;
                    if ($dd) {
                        $pc = $rvb;
                    }
                    $rb[$rvb] = popbub($v[4] ? $v[4] : $d, ajx($root), $pc, $dd, 1);
                }
                if ($is && $nv > $nd) {
                    $is = false;
                }
                if ($is && !$v[8] && (!$v[9] or auth($v[9]))) {
                    //noj
                    if ($v[1] == 'link') {
                        $rb[$t] = ljbub($ico . $t, $v[3], '', '', '', '');
                    } elseif ($v[1] == 'linkt') {
                        $rb[$t] = ljbub($ico . $t, $v[3], '', '', '', '1');
                    } elseif ($v[1] == 'js') {
                        $rb[$t] = ljbub($ico . $t, '', atj($v[2], $v[3]));
                    } elseif ($v[1] == 'bub') {
                        $rb[$t] = popbub($v[2], $v[3], $ico . $t, 'c', 1);
                    } elseif ($v[1] == 'module') {
                        req('mod');
                        $rb[$t] = build_mod_r($v[2]);
                    } else {
                        $j = read_apps($v);
                        $rb[$t] = ljbub($ico . $t, '', sj($j));
                    }
                }
            }
        }
    }
    if ($rb) {
        $ret = implode('', $rb);
    }
    //if($d=='arts')//$ret=desktop_build_ico($rb,'icones');
    //$ret=scroll($rb,$ret,19);
    return $ret;
}
Example #28
0
File: spe.php Project: philum/cms
function good_rech($rch = '')
{
    $ret = $rch ? $rch : ajx(urldecode($_GET['search']), 1);
    if (!$ret) {
        return;
    }
    $ret = str_replace('’', "'", $ret);
    $ret = utflatindecode($ret);
    $ret = clean_acc($ret);
    $ret = strip_tags($ret);
    stripslashes($ret);
    $ret = trim($ret);
    return $ret;
}
Example #29
0
File: ajax.php Project: philum/cms
     $s = 440;
     break;
 case "msqlp":
     $r = msql_read($id, $va, $opt);
     $t = 'help';
     $s = 550;
     if (is_array($r)) {
         $ret = make_divtable($r, 1);
     } else {
         $ret = $r;
     }
     break;
 case "syshelps":
     req('pop,tri');
     if (auth(6)) {
         $b = lj('small', 'popup_msql__3_lang_helps_txts_' . ajx($id), $id) . ' ';
     }
     $ret = divc('small', format_txt_r($b . helps($id), '', ''));
     break;
     //os
 //os
 case "desktop":
     req('spe');
     $ret = desktop_root($id, $va, $opt, $optb);
     $t = $va ? $va : 'Desktop';
     $s = 400;
     break;
 case "desk":
     req('spe');
     $ret = desktop_ico($id);
     break;
Example #30
0
function plug_canvas($d, $s)
{
    $id = randid();
    if ($s) {
        $_SESSION['graphsz'] = $s;
    }
    if (!$d) {
        $d = 'rect=0,0,100,44,ff0000
rect=100,0,100,44,00ff00
disk=11,22,10,ffffff
line=20,22,80,22,00ff00
circle=100,22,20
disk=100,22,20,ffffff
line=120,22,180,22,00ff00
circle=190,22,10,000000
disk=190,22,9,ffffff
text=oeil,0,58,12,arial,ff0000
text=observé,77,58,12,arial
text=existant,158,58,12,arial';
    }
    $d = str_replace("\n", ' ', $d);
    $ret .= lj('popbt', 'popup_plup___canvas_cnvs*edit_' . ajx($d) . '_' . $id, 'edit');
    $ret .= divd('graph' . $id, canvas($d, $id, $s));
    return $ret;
}