예제 #1
0
파일: toposlides.php 프로젝트: philum/cms
 static function slide($r, $p, $rid)
 {
     $j = $rid . '_class___toposlides_j_';
     $v = $r[$p];
     if ($v[0]) {
         $bt1 = lj('', $j . $v[0] . '_' . $rid . '_inp', pictxt('left', $v[0])) . ' ';
     }
     //parent
     if ($v[2]) {
         $bt3 = lj('', $j . $v[2] . '_' . $rid . '_inp', pictxt('down', $v[2])) . ' ';
     }
     //end
     foreach ($r as $ka => $va) {
         if ($va[2] == $p) {
             $bt2 = lj('', $j . $ka . '_' . $rid . '_inp', pictxt('up', $ka)) . ' ';
         }
         //begin
         if ($va[0] == $p) {
             $bt4 .= lj('', $j . $ka . '_' . $rid . '_inp', pictxt('right', $ka)) . ' ';
         }
     }
     $bt = divc('', $bt1 . $bt2 . $bt3 . $bt4 . $bt0);
     //$cell=div(atc('imgl').ats('width:36px'),$bt1.$bt2.$bt3.$bt4);
     $ret = nl2br(stripslashes_b($v[1]));
     $cell = div(ats('margin:auto;'), $ret);
     $ret = $bt . div(atc('book') . ats('display:flex; min-height:300px; width:94%;'), $cell);
     return $ret;
 }
예제 #2
0
파일: msqedit.php 프로젝트: philum/cms
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));
}
예제 #3
0
파일: ftp.php 프로젝트: philum/cms
function ftp_ops($p, $f)
{
    $rid = 'inp' . randid();
    $j = 'ops' . $rid . '_plug__2_ftp_ftp*act_' . ajx($p) . '_' . ajx($f) . '_' . $rid;
    if ($p == 'rename' or $p == 'copy') {
        $ret = input(1, $rid, $f, '', '', 16) . ' ';
    } else {
        $ret = hidden('', $rid, $f) . btn('txtx', $f) . ' ';
    }
    $ret .= lj('popbt', $j, pictxt('reload', $p));
    return $ret . divd('ops' . $rid, '');
}
예제 #4
0
파일: slides.php 프로젝트: philum/cms
 static function slide($r, $p, $rid)
 {
     $j = $rid . '_class___slides_j_';
     $v = $r[$p];
     if ($r[$p - 1]) {
         $bt1 = lj('', $j . ($p - 1) . '_' . $rid . '_inp', pictxt('left', $p - 1)) . ' ';
     }
     if ($r[$p + 1]) {
         $bt2 = lj('', $j . ($p + 1) . '_' . $rid . '_inp', pictxt('right', $p + 1)) . ' ';
     }
     $bt = divc('', $bt1 . $bt2);
     $ret = nl2br(stripslashes_b($v[0]));
     $cell = div(ats('margin:auto;'), $ret);
     $ret = $bt . div(atc('book') . ats('display:flex; min-height:300px; width:94%;'), $cell);
     return $ret;
 }
예제 #5
0
파일: microform.php 프로젝트: philum/cms
function mform_j($p, $id, $res)
{
    $r = ajxr($res);
    //form
    if (!$r[0]) {
        return lj('txtbox', ses('mformj'), pictxt('reload', 'error'));
    }
    reqp('msql');
    $msq = new msql('', ses('mform'));
    //$rb=mform_mr($p);
    $msq->load();
    //$msq->format($r);
    $msq->modif('add', '', $r);
    $msq->save();
    //p($msq->ret);
    return lj('txtbox', ses('mformj'), pictxt('smile', nms(139)));
    return lj('txtbox', 'mfr' . $id . '_plug___microform_mform*read_' . $id, pictxt('smile', nms(139)));
}
예제 #6
0
파일: chatxml.php 프로젝트: philum/cms
function chatxform($p)
{
    $nm = ses('muse');
    $d .= lj('txtcadr', 'popup_plup__x_chatxml__' . $p, pictxt('reload', $p)) . ' ';
    $d .= lj('', 'chtx' . $p . '_plug__13_chatxml_chatxcall_' . $p, picto('loading')) . ' ';
    $d .= loadjs('chatx', $p, 'live') . ' ' . hlpbt('chatxml') . ' ';
    $d .= lj('', 'popup_plup__x_chatxml_chatxcanal_' . $p, picto('rss')) . ' ';
    $d .= lj('', 'popup_plug___chatxml_chatxinvite_' . $p, picto('mail')) . ' ';
    //$d.=lj('','chtx'.$p.'_plug___chatxml_chatxsav_'.$p.'_2',picto('del')).' ';
    if (auth(6)) {
        $d .= msqlink('clients', 'chat_' . $p) . ' ';
    }
    $d .= hlpbt('miniconn') . br();
    if ($nm) {
        $j = 'SaveBbc(\'' . $p . '\',\'' . $nm . '\')';
    } else {
        $j = sj('popup_plup__x_chatxml_chatxnm_' . $p . '__msgx' . $p);
    }
    $sty = 'min-height:16px; border:1px solid #777; max-width:328px; max-height:200px; overflow-y:auto;';
    $d .= divedit('msgx' . $p, 'track', $sty, '', '');
    $d .= ljb('', $j, '', divc('popsav" style="width:332px;', nms(28)));
    return $d;
}
예제 #7
0
파일: poll.php 프로젝트: philum/cms
function poll_menu($id, $poll = '')
{
    $r = poll_read($id);
    $nc = $r[1] + $r[2];
    if ($nc && $r[1]) {
        $va = round($r[1] / $nc, 2) * 100;
    } else {
        $va = 0;
    }
    if ($nc && $r[2]) {
        $vb = round($r[2] / $nc, 2) * 100;
    } else {
        $vb = 0;
    }
    if (!$poll) {
        $poll = sql('poll', 'qdpl', 'v', 'ib="' . $id . '" and iq="' . ses('iq') . '"');
    }
    $j = 'poll' . $id . '_plug___poll_poll*j_' . $id;
    $ret .= lj($poll == 1 ? 'active' : '', $j . '_1', pictxt('smile', $va . '%')) . ' ';
    $ret .= lj($poll == 2 ? 'active' : '', $j . '_2', pictxt('sad', $vb . '%')) . ' ';
    $ret .= lj('small', 'pll' . $id . '_plug___poll_poll*score_' . $id, nbof($nc, 143));
    return divc('nbp', $ret);
}
예제 #8
0
파일: sav.php 프로젝트: philum/cms
function save_art_batch()
{
    $r = $_SESSION['vacuum'];
    //array_reverse
    if ($r) {
        foreach ($r as $k => $v) {
            $rb[] = saveart_url($k);
            unset($_SESSION['vacuum'][$k]);
            $_SESSION['vacsuj'][$k] = '';
            $_SESSION['vaccat'][$k] = '';
            $_SESSION['dayx'] == time();
        }
    }
    if ($rb) {
        req('pop,spe,art,tri,mod');
        $n = count($rb);
        $ret .= lkc('poph', '/module/recents/all/Batch/articles/' . $n, nbof($n, 1)) . ' ';
        $t = pictxt('view', nms(45) . ' ' . nms(100));
        $ret .= lj('poph', 'popup_modpop___all/Batch/articles/' . $n . ':recents', $t);
    } else {
        $ret = nms(11) . ' ' . nms(16);
    }
    //$ret.=build_mod_r('all/Batch/multi/'.$n.':recents');
    return divs('width:140px;', $ret);
}
예제 #9
0
파일: finder.php 프로젝트: philum/cms
function fi_deldir($d, $id)
{
    $j = 'users/' . $d;
    if ($id != 'go') {
        return blj('popdel', $id . 'fidld', 'fifunc___fi*deldir_' . ajx($d) . '_go', pictxt('alert', 'really delete directory?'));
    }
    walk_dir($j, "removef");
    rmdir($j);
    return fi_parent($d, $id . 'fidld', 'deleted', 1);
}
예제 #10
0
파일: lib.php 프로젝트: philum/cms
function offon($d, $t = '')
{
    $v = $d ? 'true' : 'false';
    $s = 'color:#' . ($d ? '428a4a' : '853d3d') . ';';
    return pictxt($v, $t, $s);
}
예제 #11
0
파일: troc.php 프로젝트: philum/cms
function troc_read_table($r, $rid, $ob, $picto)
{
    $rh = array('id', 'Utilisateur', 'Désignation', 'Type de transaction', 'Description', 'Etat');
    if ($r) {
        foreach ($r as $k => $v) {
            $usr = divc('', lj('popbt', $rid . '_plug___troc_troc*profil_' . $v[1] . '_' . $rid . '-offers', pictxt('user', $v[1])));
            $bt = lj('popbt', $rid . '_plug___troc_troc*read*obj_' . $v[0] . '_' . $rid . '-offers', pictxt('view', $v[2]));
            $rt[] = array($v[0], $usr, $bt, $v[3], $v[4], offon($v[5]));
        }
    }
    return make_tables($rh, $rt, 'txtx', 'txtblc');
}
예제 #12
0
파일: pop.php 프로젝트: philum/cms
function popflv($d, $l)
{
    list($d, $t) = explode('§', $d);
    return lj('', 'popup_popflv___' . ajx($d) . '_' . $l, pictxt('play', $t ? $t : $d));
}
예제 #13
0
파일: styl.php 프로젝트: philum/cms
function preview_ff_p($k, $v)
{
    $go = 'fnt' . $k . '_ffedit___' . $k;
    $f = 'fonts/' . $v[0] . '.woff';
    if (is_file($f)) {
        $sz = round(filesize($f) / 1000);
    }
    $ret .= $v[0] . ' ' . lkc('txtbox', '/?admin=css&addff=' . $v[0], pictxt('add', 'Add')) . ' ' . $sz . 'Ko ';
    $acc = $v[2] ? 'yes' : 'no';
    $fav = $v[3] ? 'ok' : 'no';
    $ret .= lj($v[2] ? 'txtred' : 'txtx', $go . '_acc_' . $acc, 'accents: ' . $acc) . ' ';
    $ret .= lj($v[3] ? 'txtred' : 'txtx', $go . '_fav_' . $fav, 'fav') . ' ';
    $ret .= valid_formats($v[0]);
    $ret .= font_source($v[4]);
    $ret .= lj('txtx', 'pop_stylsff___1_' . $v[1], $v[1]) . ' ';
    if ($_SESSION['auth'] > 5) {
        $ret .= font_set_cat($k, $v[1], $go);
    }
    return $ret;
}
예제 #14
0
파일: twit.php 프로젝트: philum/cms
function twit_retweeted($q)
{
    return $q['retweet_count'] ? pictxt('get', $q['retweet_count']) : '';
}
예제 #15
0
파일: meta.php 프로젝트: philum/cms
function admin_tags($cat = 'tag')
{
    req('spe');
    $rid = randid('admtag');
    if (!$cat) {
        $cat = 'tag';
    }
    $utags = explode(' ', 'tag ' . prmb(18));
    foreach ($utags as $v) {
        $c = $v == $cat ? 'txtblc' : 'txtx';
        $ret .= lj($c, $rid . '_call___meta_admin*tags_' . ajx($v), $v) . ' ';
    }
    $ret = divc('', $ret);
    $ra = sql_inner('idtag,idart', 'qda', 'qdta', 'idart', 'k', 'where nod="' . ses('qb') . '"');
    if ($ra) {
        arsort($ra);
    }
    $rb = sql('id,tag', 'qdt', 'kv', 'cat="' . $cat . '"');
    if ($ra) {
        foreach ($ra as $k => $v) {
            if ($rb[$k]) {
                $rc[$k] = array($rb[$k], $v);
            }
        }
    }
    $ret .= divc('nbp', count($rc) . ' ' . $cat) . br();
    if ($rc) {
        foreach ($rc as $idtag => $v) {
            $ret .= lj('popbt', 'popup_callp___meta-spe_admin*tags*edit_' . $idtag . '_' . $cat, pictxt('popup', $v[0] . ' (' . $v[1] . ')')) . ' ';
        }
    }
    //
    return divd($rid, $ret);
}
예제 #16
0
파일: msql.php 프로젝트: philum/cms
function msql_adm($msql = '')
{
    //echo br();
    $root = sesm('root', 'msql/');
    $auth = $_SESSION['auth'];
    $ath = 6;
    //auth_level_mini
    $wsz = define_s('wsz', 700);
    $msql = $msql ? $msql : $_GET['msql'];
    $_SESSION['page'] = $_GET['page'] ? $_GET['page'] : 1;
    #boot
    if ($msql && $msql != '=') {
        $url = sesm('url', '/msql/');
        $ra = msql_boot($msql);
        $_SESSION['msql_boot'] = $ra;
        list($bases, $base, $dirs, $dir, $prefixes, $prefix, $files, $table, $version, $folder, $node) = $ra;
        //build url
        $murl = sesm('murl', murl($base, $dir, $prefix, $table, $version));
        //b/d/p_t_v
        $basename = $root . $folder . $node;
        $is_file = is_file($basename . '.php');
        $lk = sesm('lk', $url . $folder . $node . gpage());
        $folder = $root . $folder;
        //conformity
        msql_adm_head($lk, $base, $prefix, $table, $version);
    }
    $def = ajx($_POST['def'] ? $_POST['def'] : $_GET['def'], 1);
    if ($_GET['see']) {
        $ret[] = verbose($ra, 'dirs');
    }
    //auth
    if ($base == 'users' && $prefix == $_SESSION['USE']) {
        $_SESSION['ex_atz'] = 1;
    }
    if ($auth >= $ath && $_SESSION['ex_atz'] or $auth >= 6) {
        $authorized = true;
    }
    $lkb = $lk . '&';
    #load
    //reqp('msql'); $msq=new msql($base,$node); if($is_file)$defs=$msq->load();
    if (get('repair')) {
        msql_repair($folder, $node);
    }
    //old
    if ($is_file) {
        $defs = read_vars($folder, $node, $defsb);
    }
    //if(!$defs)$ret[]=verbose($ra,'');
    if ($defs['_menus_']) {
        $defsb['_menus_'] = $defs['_menus_'];
    }
    //save
    if ($def && !$defs[$def]) {
        $_POST['add'] = $def;
    }
    if (($_POST['def'] or $_POST['add']) && $authorized) {
        list($defs, $def) = save_defs($folder, $node, $defs, $def, $base);
    }
    //savb
    if ($_GET['sav']) {
        save_vars($folder, $node . '_sav', $defs, 1);
    }
    //create
    if ($_GET['create'] && $authorized) {
        $prefix = normaliz_c($_POST['prfx']);
        $table = normaliz_c($_POST['hbname']);
        if ($_POST['hbnb'] && $_POST['hbnb'] != 'version') {
            $version = $_POST['hbnb'];
        }
        if (!$_POST['hbnb']) {
            $version = '';
        }
        if (is_numeric($_POST['nbc'])) {
            $defsb['_menus_'] = '';
            $nbc = $_POST['nbc'];
            $nbc = $nbc > 1 ? $nbc : 1;
            for ($i = 1; $i <= $nbc; $i++) {
                $defsb['_menus_'][] = 'col_' . $i;
            }
        } elseif ($defs['_menus_']) {
            $defsb['_menus_'] = $defs['_menus_'];
        } else {
            $defsb['_menus_'] = array('');
        }
        $node = mnod($prefix, $table, $version);
        if ($folder && $prefix) {
            read_vars($folder, $node, $defsb);
        }
        relod(sesm('url') . murl_build('', '', $prefix, $table, $version));
    }
    #modifs
    //save_modif
    $do = find_command();
    if ($do && $auth >= $ath) {
        $defs = msql_modifs($defs, $defsb, $folder, $prefix . '_' . $table, $node, $basename, $do);
    }
    #render
    $lh = sesmk('msqlang');
    #-menus
    if (!$_GET['def']) {
        $ret['menus'] = msql_menus($ra);
    }
    //auth(3) &&
    if (!$_GET['def']) {
        //called
        #-files
        //add
        if (auth(4)) {
            $ret['fls'] = lkc('txtblc', $lkb . 'new==', pictxt('add', $lh[9][0])) . ' ';
        }
        if ($table && $authorized && $prefix && $is_file) {
            //$defs &&
            $ret['fls'] .= lkc('txtx', $lkb . 'sav==', $lh[2][0]) . ' ';
            if (is_file($basename . '_sav.php')) {
                $ret['fls'] .= lkc('txtx', $lkb . 'restore==', $lh[3][0]) . ' ';
            }
            $ret['fls'] .= lj_goto('import_defs', 5);
            //$ret['fls'].=lj_goto('import_old','');
            $ret['fls'] .= lj_goto('import_keys', 17);
            $ret['fls'] .= lj_goto('merge_defs', 6);
            $ret['fls'] .= lj_goto('append_update', 7);
            $ret['fls'] .= lj_goto('append_values', 8);
        } else {
            $ret['fls'] .= $bckp;
        }
        if ($files[$prefix] && ($auth > $ath or $prefix == $_SESSION['USE'])) {
            if ($auth >= $ath && $table && $prefix && $is_file) {
                $ret['fls'] .= lkc('txtx', $lkb . 'del_table==', $lh[10][0]) . ' ';
                $ret['fls'] .= ljb('txtblc', 'delfile', $lkb . 'del_file==', $lh[11][0]) . ' ';
                //$ret['fls'].=lkc('txtyl',$lkb.'del_file==',$lh[11][0]).' ';
                if (!$defs or isset($defs[0])) {
                    $ret['fls'] .= lkc('txtyl', $lkb . 'repair==', $lh[12][0]) . ' ';
                }
            }
        }
        if ($ret['fls']) {
            $ret['fls'] .= br();
        }
        //$ret['fls']=divc('menu',$ret['fls']);
        //new
        if ($_GET['new']) {
            $ret['fls'] .= newbase($base, $prefix, $table, $version);
        }
        #-util
        if ($table && $authorized && $prefix && $is_file) {
            $ret['utl'] .= lkc('txtblc', $lkb . 'def=_menus_', $lh[1][0]) . ' ';
            $ret['utl'] .= lkc('txtx', $lkb . 'reset_menus==', $lh[22][0]) . ' ';
            $ret['utl'] .= lkc('txtx', $lkb . 'del_menus==', $lh[23][0]) . ' ';
            $ret['utl'] .= lkc('txtx', $lkb . 'add_keys==', $lh[24][0]) . ' ';
            $ret['utl'] .= lkc('txtx', $lkb . 'del_keys==', $lh[25][0]) . ' ';
            $ret['utl'] .= lkc('txtx', $lkb . 'def=_menus_&add_col==', $lh[14][0]) . ' ';
            $ret['utl'] .= lj_goto('del_col', 15);
            if ($is_file) {
                $ret['utl'] .= lkc('txtx" title="' . $lh[13][1], $lkb . 'repair_cols==', $lh[13][0]) . br();
            }
            if ($base != 'system' && is_file(sesm('root') . 'system/' . $node . '.php')) {
                $ret['utl'] .= lkc('txtblc', $lkb . 'update==', $lh[26][0]) . ' ';
            }
            $ret['utl'] .= lj_goto('sort_table', 19);
            if ($table != 'restrictions' && $table != 'params') {
                $ret['utl'] .= lkc('txtx', $lkb . 'reorder==', $lh[20][0]) . ' ';
            }
            $ret['utl'] .= lj_goto('permut', 21);
            $ret['utl'] .= lkc('txtx', $lkb . 'edit_conn==', $lh[16][0]) . ' ';
            $ret['utl'] .= lkc('txtx" title="' . $lh[6][1], $lkb . 'inject_defs==', $lh[18][0]) . ' ';
            $ret['utl'] .= lkc('txtx', $lkb . 'edit_csv==', 'csv') . ' ';
            $ret['utl'] .= lkc('txtx', $lkb . 'json==', 'json') . ' ';
            if (auth(6)) {
                $ret['utl'] .= lkc('txtx', $lkb . 'export_mysql==', 'sql') . ' ';
            }
            if (auth(6)) {
                $ret['utl'] .= lkc('txtx', $lkb . 'create_mysql==', 'create mysql') . ' ';
            }
            $ret['utl'] .= lj('txtx', 'popup_msql___lang_helps_msql', '?');
        }
        #-fieldset
        if ($ret['fls'] . $ret['utl']) {
            $ret['utils'] = divc('menu', $ret['fls'] . $ret['utl']);
        }
        $ret['fls'] = $ret['utl'] = '';
        //if($ret['nfo'])$ret['nfo'].=br();
    }
    //called
    #-infos
    if ($table && $is_file) {
        $ret['nfo'] = lkc('popsav', $lk, $murl) . ' ';
        $wurl = $_SERVER['HTTP_HOST'] . '/msql/' . $murl;
        $ret['nfo'] .= lj('popbt', 'popup_text___' . ajx($wurl) . '_weburl_console', pictit('link', 'web url'));
        $wcon = '[' . $murl . $kdef . ($def ? ':' . $def : '') . ':microsql]';
        $ret['nfo'] .= lj('popbt', 'popup_text___' . ajx($wcon) . '_connector_console', pictit('conn', 'connector'));
        $ret['nfo'] .= lkt('popbt', '/plug/microxml.php?table=' . $murl, pictit('rss', 'xml')) . ' - ';
        $ret['nfo'] .= btn('txtsmall2', count($defs) . ' ' . plurial(count($defs), 116)) . ' - ';
        if ($is_file) {
            $ret['nfo'] .= btn('txtsmall2', fsize($basename . '.php')) . ' - ';
        }
        $ret['nfo'] .= btn('txtsmall2', ftime($basename . '.php')) . ' ';
        $ret['nfo'] .= msq_search($murl);
    }
    if ($ret['nfo']) {
        $ret['nfo'] = divc('menu', $ret['nfo']);
    }
    //entries
    //if($defs)$ret['edt'].=slctmenuder($defs,$def?$def:'_menus_');
    //add
    if ($is_file && $authorized && !$_GET['called'] && $defs && !$_GET['def']) {
        $ret['edt'] .= divc('menu', f_inp_add($defs, $defsb, $def)) . br();
    }
    //edit
    //echo verbose($ra,'');
    if ($def && $defs[$def]) {
        $ret['edt'] .= f_inp_m($defs, $defsb['_menus_'], $def);
    }
    //edit_conn
    if ($_GET['edit_conn'] == '=') {
        if ($defs) {
            foreach ($defs as $k => $v) {
                $v = str_replace(array('|', '¬'), array(':BAR:', ':LINE:'), $v);
                $edittable .= implode('|', $v) . '¬' . "\n";
            }
        }
        //(!is_numeric($k)?$k.'|':'')
        $ret[] = divc('', 'paste a table as created by transductor from html table :: use "|" for cells and "¬" for lines of cells') . form($lkb . 'def=' . $def, txarea('import_conn', $edittable, 60, 14) . br() . checkbox('aid', 'ok', 'auto_increment', '1') . input2('submit', 'save', 'import', 'txtbox')) . hr() . br();
    }
    //array
    if ($_GET['inject_defs'] == '=') {
        $datas = str_replace(array('<' . '?php', '?' . '>'), '', read_file($basename . '.php'));
        $ret[] = divc('', 'paste $r[1]=array(1,2,3)') . form($lkb, txarea('inject_defs', $datas, 60, 14) . br() . input2('submit', 'replace', 'replace', 'txtbox') . input2('submit', 'inject', 'inject', 'txtbox') . checkbox('mono', '1', 'key=>value', '') . checkbox('sql', '1', 'mysql', '')) . hr() . br();
    }
    //export_mysql
    if ($_GET['create_mysql'] == '=' && auth(6)) {
        $ok = plugin_func('mysql', 'import_msql', $defs, $node);
        $ret[] = divc('txtalert', 'create table ' . $node . ': ' . $ok);
    }
    if ($_GET['export_mysql'] == '=' && auth(6)) {
        $ret[] = txarea('', mysqlrb($defs), 60, 40);
    }
    //csv
    if ($_GET['edit_csv'] == '=') {
        foreach ($defs as $k => $v) {
            if ($v) {
                $edittable .= $k . ':' . (is_array($v) ? implode(',', $v) : htmlentities($v)) . "\n";
            }
        }
        $ret[] = divc('', 'paste csv using "," for cells and lines for rows') . form($lkb . 'def=' . $def, txarea('edit_csv', $edittable, 60, 14) . br() . checkbox('aid', 'ok', 'auto_increment', '1') . input2('submit', 'save', 'import', 'txtbox')) . hr() . br();
    }
    //csv
    if ($_GET['json'] == '=') {
        foreach ($defs as $k => $v) {
            if ($v) {
                $edittable .= '"' . $k . '":' . (is_array($v) ? '["' . implode('","', $v) . '"]' : '"' . htmlentities($v[0])) . '",';
            }
        }
        $ret[] = txarea('edit_csv', '{' . $edittable, 60, 14) . '}' . br();
    }
    //see_table
    if ($defs && !$_GET['def']) {
        // && (!$def or $_POST['save'])//called
        $out = divd('editmsql', draw_table($defs, $murl, ''));
        $ret[] = $out . br();
    } else {
        $ret[] = divd('editmsql', '');
    }
    if ($auth > 6) {
        $ret[] = lkc('txtx', $lkb . 'backup_msql==', 'backup') . ' ';
    }
    if ($_GET['backup_msql']) {
        $ret[] = backup_msql();
    }
    return divd('content', implode('', $ret));
}
예제 #17
0
파일: admin.php 프로젝트: philum/cms
function admin()
{
    $qb = ses('qb');
    $qda = ses('qda');
    $qdu = ses('qdu');
    $USE = ses('USE');
    $auth = ses('auth');
    $admin = $_GET['admin'] ? $_SESSION['admin'] = $_GET['admin'] : $_SESSION['admin'];
    if ($_GET['set']) {
        $_SESSION['set'] = $_GET['set'];
    }
    if ($USE != "") {
        $hubname = rse("hub", $qdu . ' WHERE name="' . $qb . '"');
        if (!$hubname) {
            $hubname = $qb;
        }
        list($autologok, $userhub) = sql('name,hub', 'qdu', 'r', 'ip="' . hostname() . '"');
    }
    $rep = "params";
    //verif_user
    if ($USE != $qb && $USE != "" && $userhub) {
        $hub = lka('/' . $USE, $USE);
    } elseif ($USE != $qb && $USE != "" && $autologok != $USE && $autologok) {
        $alert .= lkc('txtx', '/?log=on', 'autolog') . ' ';
    } elseif ($USE == $qb && !$userhub && prmb(11) >= 4) {
        $alert .= lkc("txtred", "/?log=create_hub", "create_hub!");
    } elseif ($USE == "") {
        $reta = lkc('txtx', htac('module') . 'Home', $qb) . br() . br() . loged($USE, $_SESSION['iq'], "", 7) . br();
    }
    //admin_menu
    $aff = adminauthes();
    if ($admin == "=") {
        $_SESSION['set'] = $_GET['set'] = $USE ? "Global" : "User";
    }
    //defaults
    if ($aff[$_GET['set']]) {
        $admin = key($aff[$_GET['set']]);
    }
    $_SESSION['admin'] = $admin;
    $goto = '/?admin=' . $admin;
    //if(!$userhub){unset($aff['User']['mail']); unset($aff['User']['password']);}
    //auto_select_category
    foreach ($aff as $k => $v) {
        if ($v[$admin]) {
            $_SESSION['set'] = $k;
            $curauth = $v[$admin];
        }
        $raf = array_merge_b($raf, array_keys($v));
    }
    if ($curauth === false) {
        $curauth = 7;
    }
    //login
    if ($USE) {
        $w .= lkc('popw', htac('module') . 'Home', pictxt('home', $hubname)) . ' ';
        $w .= btn("popbt", pictxt('user', $USE . ' ' . asciinb($auth)) . ' (' . nameofauthes($auth) . ')');
    }
    //fastmenu
    $fmn = array('console', 'params', 'restrictions', 'apps', 'css', 'finder', 'templates', 'connectors', 'plugin', 'msql', 'tools', 'pictos', 'stats', 'update');
    foreach ($raf as $v) {
        if (in_array($v, $fmn)) {
            $tit .= lkc(active($admin, $v), htac('admin') . $v, pictit(mimes_types($v), $v)) . ' ';
        }
    }
    $reta .= divc('right', $w . $alert);
    $tit .= lkc('txtit', htac('admin') . $admin, $admin) . ' ';
    if ($admin != "=") {
        $reta .= div('', $tit);
    }
    if ($auth >= 7 && $admin == 'update') {
        $ret = adm_update();
    }
    if ($auth >= $curauth && $curauth) {
        switch ($admin) {
            //global
            case 'console':
                $ret = adm_console($auth);
                break;
            case 'apps':
                require_once 'adminx.php';
                $ret = adm_apps($_GET['set'], '', $_GET['dig']);
                break;
            case 'messages':
                if ($qb == $USE or $auth >= $curauth) {
                    $ret = adm_messages();
                } else {
                    $ret = contact(nms(84), 'txtcadr');
                }
                break;
            case 'hubs':
                $ret = adm_hubs($auth);
                break;
            case 'nodes':
                $ret = adm_nodes($auth, $goto);
                break;
            case 'stats':
                list($p, $o) = explode('/', $_GET['set']);
                $ret = plugin('stats', $p, $o);
                break;
            case 'newsletter':
                $ret = adm_newsletter($_GET['send']);
                break;
            case 'disk':
                $ret = plugin('disk', '', '');
                break;
            case 'share':
                $ret = plugin('share', '', '');
                break;
            case 'tickets':
                $ret = plugin('tickets', '', '');
                break;
            case 'faq':
                $r = msql_read('system', 'program_faq', '');
                $ret = nl2br(stripslashes(make_divtable($r, 1)));
                break;
        }
        //articles
        if ($_SESSION['set'] == 'Articles') {
            switch ($admin) {
                case 'create':
                    $ret = f_inp('', '');
                    break;
                case 'categories':
                    $ret = catarts();
                    break;
                case 'trackbacks':
                    req('mod,art');
                    $ret = trkarts('');
                    break;
                default:
                    $ret = adminarts();
                    break;
            }
        }
        switch ($admin) {
            case 'chat':
                require_once 'art.php';
                $ret = output_trk(read_idy('microchat', 'DESC'));
                break;
            case 'shop':
                $ret = helps('shop_class');
                break;
            case 'book':
                $ret = lkc('txtblc', '/plug/book.php', 'book');
                break;
        }
        //configs
        switch ($admin) {
            case 'restrictions':
                $ret = adm_restrictions();
                break;
            case 'params':
                $ret = adm_params($curauth, rep);
                break;
            case 'avatar':
                if ($USE) {
                    $ret = adm_avatar(0);
                }
                break;
            case 'mail':
                if ($_POST['amail']) {
                    if ($USE == $qb) {
                        $_SESSION['qbin']['adminmail'] = $_POST['amail'];
                    }
                    update('qdu', 'mail', $_POST['amail'], 'name', $USE);
                }
                $ml = rse('mail', $qdu . ' WHERE name = "' . $USE . '"');
                if ($ml) {
                    $valu = input2('text', 'amail', $ml . '" size="35" maxlength="50') . ' ' . input2('submit', 'Submit', 'modif_mail', '');
                }
                $ret = form($goto, $valu);
                break;
            case 'password':
                $ret = set_password($USE);
                break;
            case 'banner':
                $ret = set_ban();
                break;
            case 'descript':
                $ret = editbrain($admin);
                break;
            case 'google':
                $ret = editbrain($admin);
                break;
            case 'members':
                $ret = adm_members_a($auth, $goto);
                break;
            case 'authes':
                $titles = array('fonction', 'auth');
                if (auth(6)) {
                    $ret = msqlink('system', 'admin_authes') . br();
                }
                foreach ($aff as $k => $v) {
                    $datas = '';
                    arsort($v);
                    foreach ($v as $ka => $va) {
                        $datas[$ka] = array($va);
                    }
                    $outre[$k] = make_tables($titles, $datas, 'txtblc', '');
                }
                $ret .= make_tabs($outre, 'at');
                break;
        }
        //constructors
        switch ($admin) {
            case 'css':
                $ret = adm_editcss();
                break;
            case 'fonts':
                $ret = edit_fonts();
                break;
            case 'connectors':
                $ret = data_brain('connectors') . br() . br();
                $ret .= lkc('txtblc', $goto . '&help==', 'connectors_infos') . br();
                if ($_GET['help']) {
                    $ret .= conn_help() . br();
                }
                break;
            case 'modules':
                $ret = data_brain('modules') . br() . br() . adm_mod_hlp($goto);
                break;
            case 'templates':
                $ret = data_brain('template');
                break;
            case 'plugin':
                $ret = adm_plugin();
                break;
            case 'msql':
                $ret = adm_msql();
                break;
            case 'dev':
                $ret = plugin('dev', '', '');
                break;
            case 'editags':
                req('meta');
                $ret = admin_tags(get('set'));
                break;
            case 'finder':
                $ret = call_finder($qb, 'disk');
                break;
            case 'backup':
                $ret = adm_backup($qb, $auth, $goto, $rep);
                break;
            case 'update_notes':
                $ret .= adm_update_notes('', 1);
                break;
            case 'plug':
                $ret .= adm_edit_plug();
                break;
        }
        if ($admin && !$ret && $auth >= $curauth) {
            //editbrain
            $ret = plugin($admin, $_GET['p'], $_GET['o']);
        }
    } else {
        switch ($admin) {
            case 'members':
                $ret = adm_members_b();
                break;
        }
    }
    #render
    if ($_SESSION['admin'] && !$_GET['callj']) {
        $head = $reta . br();
    } else {
        $head = bal('h2', lka('/admin/' . $_SESSION['admin'], $_SESSION['admin'])) . br();
    }
    return $head . $ret;
}
예제 #18
0
파일: superpoll.php 프로젝트: philum/cms
function plug_superpoll($d)
{
    $rid = randid('spp');
    $_SESSION['sppnod'] = 'public_superpoll_' . ($d ? $d : 1);
    $ret = divd('popup" style="position:fixed; width:0; height:0;', "");
    $ret .= lj('', 'add_plug___superpoll_spp*add_' . $rid, pictxt('add', 'add proposition'));
    $ret .= divd('add', '');
    $ret .= spp_table($rid);
    //$ret.=ljb('txtx','SaveJ','res_plug___source_plug*source_superpoll','source');
    if (auth(4)) {
        $ret .= msqlink('', 'public_superpoll_1');
    }
    //$ret.=lkc('txtx','microxml.php?table=users/public_superpoll_1','xml');
    return divd($rid, $ret);
}
예제 #19
0
파일: art.php 프로젝트: philum/cms
function prepare_tracks($id, $otp)
{
    if ($id == $_SESSION['read'] && !$_GET['page']) {
        if (rstr(1)) {
            $opt = "true";
        }
        $optb = @$_SESSION['opts']['tracks'];
        $opt = $optb ? $optb : $opt;
        if ($opt == "true" or $_GET['track'] && $_SESSION['auth'] > 5) {
            $ret = '<a name="trackback"></a>';
            $ret .= lj('txtcadr', 'popup_track___' . $id, pictxt('forum', nms(21))) . br();
        }
        if (count($otp) > 0) {
            $trk = output_trk($otp);
        }
        $_SESSION['cur_div'] = 'content';
        return $ret . divd('track' . $id, $trk);
    }
}
예제 #20
0
파일: pop.php 프로젝트: philum/cms
function popvideo($d)
{
    list($d, $t) = explode('§', $d);
    $p = video_providers($d);
    list($w, $h) = explode('/', $t);
    if (is_numeric($w)) {
        return video_players($d, $p, $w, $h, '');
    }
    $j = 'pagup_video___' . ajx($d) . '___autosize';
    $url = video_url($d, $p, $t) . ' ';
    $im = video_img($d, $p);
    if ($im && !$t) {
        $bt = lj('', $j, image($im, '120', '90', ''));
    }
    $open = lj('', $j, pictxt('play', '')) . ' ';
    if ($bt) {
        return divc('', $bt . ' ' . btn('small', $url));
    } else {
        return btn('popbt', $open . $url);
    }
}
예제 #21
0
파일: spe.php 프로젝트: philum/cms
function find_navigation($id)
{
    $ib = ib_of_id($id);
    if (is_numeric($ib) && $ib != $id && $ib) {
        //$nav=pane_art($ib,'');
        $nav = bal('h4', lka(urlread($ib), pictxt('topo', suj_of_id($ib))) . ' ' . popart($ib));
        if ($ib != ses('read')) {
            return find_navigation($ib) . $nav;
        }
    }
}
예제 #22
0
파일: ajax.php 프로젝트: philum/cms
     //conn
 //conn
 case "text":
     $msg = substr($id, 0, 4) == 'bpop' ? sesr('temp', $va) : $id;
     $t = 'text';
     $s = 440;
     $ret = divb($opt . '||' . $optb, $msg);
     break;
 case "image":
     $ret = image($id, $va, $opt, $optb);
     break;
 case "overim":
     $ret = overim($id, $va);
     $t = $id;
     list($w, $h) = getimagesize($id);
     $p = lj('', 'popup_photo__x_' . ajx($id) . '_' . $w . '_' . $h . '_' . $va, pictxt('popup', $v));
     break;
 case "video":
     req('pop,spe');
     list($w, $h) = explode('-', $sz);
     $s = $w;
     $tt = $id;
     $ret = video_players($id, video_providers($id), $w, $h - 20, $_GET['pagup']);
     break;
 case "popmp3":
     req('pop');
     $t = $id;
     $ret = audio($id);
     break;
 case "popim":
     list($w, $h) = getimagesize($id);
예제 #23
0
파일: adminx.php 프로젝트: philum/cms
function console_system()
{
    $r = array('blocks', 'design', 'content');
    foreach ($r as $k => $v) {
        if (!$_SESSION['prma'][$v]) {
            $ret[] = $v;
        }
    }
    if ($ret) {
        return btn('txtalert', pictxt('alert', 'missing: ' . implode(', ', $ret)));
    }
}
예제 #24
0
파일: umvoc.php 프로젝트: philum/cms
function ud_search($p, $o, $res)
{
    list($p, $o) = ajxp($res, $p, $o);
    $p = strtolower(trim($p));
    $ps = soundex($p);
    $r = umv_r();
    if (!$p) {
        return;
    }
    if ($r) {
        foreach ($r as $k => $v) {
            $voc = strtolower($v[0]);
            $vcb = soundex($voc);
            if ($o) {
                if ($vcb == $ps) {
                    $ret[] = uds_btn($v);
                }
            } elseif ($voc == $p) {
                $ret[] = uds_btn($v);
            }
        }
    }
    $n = count($ret);
    $t1 = 'Recherche littérale';
    $t2 = 'Glossaire';
    $search = lj('', 'popup_search___' . ajx(strtoupper($p)), pictxt('search', $t1)) . ' ';
    $search .= lj('', 'popup_plup___umvoc_ud*glossary_' . $p . '_' . $o, pictxt('view', $t2)) . ' ';
    //$search.=togbub('plug','umvoc_ud*glossary_'.$p,picto('view')).' ';
    $glyphe = ud_glyphe($p) . br();
    if ($ret) {
        $ret = implode('', $ret) . br();
    }
    if (auth(6)) {
        $sav = umvcadd($p) . br();
    }
    if (!$ret) {
        return btn('txtcadr', nms(11) . ' ' . nms(16)) . ' ' . $search . $glyphe . br() . $sav;
    }
    return btn('txtcadr', $n . ' ' . plurial($n, 16)) . ' ' . $search . $glyphe . $ret . $sav;
}
예제 #25
0
파일: tri.php 프로젝트: philum/cms
function miniconn_w($doc, $h)
{
    list($pd, $c) = split_one(':', $doc, 1);
    if ($c && $pd != 'http') {
        $d = sconn_defs_r($pd, $c);
        if ($d != $doc) {
            return $d;
        }
    }
    if ($c) {
        $d = sconn_defs_app($pd, $c, $h);
        if ($d) {
            return $d;
        }
    }
    list($p, $o) = split_one('§', $doc, 1);
    if ($o) {
        if (is_numeric($p) && $o) {
            return pop_art('http://' . $h . '/' . $p . '§' . $o);
        } elseif ($p && $o) {
            return lkt('', $p, pictxt('get', $o));
        }
    }
    $xt = strtolower(strrchr($doc, '.'));
    if ($xt == '.mp3') {
        $j = ajx(goodroot($doc, $h));
        return lj('', 'popup_popmp3___' . $j, pictxt('music', strrchr_b($doc, '/')));
    }
    if ($xt == '.pdf') {
        return pdfreader($doc);
    }
    if (is_image($doc)) {
        $im = goodroot($doc);
        if (@is_file($im)) {
            return popim($im, picto('img'));
        } elseif (strlen($doc) > 4) {
            return popim_w($im, $h);
        }
    }
    if (strpos($doc, "@") !== false && strpos($doc, '.') !== false) {
        return lka('mailto:' . $doc, strdeb($doc, '@'));
    }
    if (substr($doc, 0, 1) == '@') {
        return poptwit(substr($doc, 1));
    }
    //if(substr($doc,0,1)=='@')return plugin_func('tracks','track_answer',substr($doc,1),'');
    //if(substr($doc,0,1)=='#')return call_plug('','popup','chatxml',substr($doc,1),pictxt('chat',substr($doc,1)));
    if ($pd == 'http') {
        return lkt('', $doc, pictxt('get', http_domain($doc)));
    }
    return $doc;
}
예제 #26
0
파일: favs.php 프로젝트: philum/cms
function fav_log()
{
    $iqb = ses('iq');
    //base64_encode
    $ret .= lj('txtx', 'popup_plupin__x_favs____favid', picto('logout'));
    $ret .= input1('favid', $iqb, '4') . hlpbt('flog');
    $j = 'plgfavs_plug___favs_fav*build_';
    $ret .= lj('txtx', 'popup_plup__x_favs___640', picto('refresh')) . ' ';
    if (rstr(52)) {
        $ret .= lj('txtx', $j . 'fav', pictxt('like', 'Favs')) . ' ';
    }
    if (rstr(90)) {
        $ret .= lj('txtx', $j . 'like', pictxt('love', 'Likes')) . ' ';
    }
    if (ses('mem')) {
        $ret .= lj('txtx', $j . 'visited', pictxt('articles', 'Visited')) . ' ';
    }
    if (rstr(42)) {
        $ret .= lj('txtx', $j . 'tags', pictxt('tag', 'Taged')) . ' ';
    }
    if (rstr(52)) {
        $ret .= lj('txtx', $j . 'com', pictxt('list', 'Coms')) . ' ';
    }
    if (rstr(91)) {
        $ret .= lj('txtx', $j . 'poll', pictxt('smile', 'Polls')) . ' ';
    }
    //if(rstr(90))$ret.=lj('txtx',$j.'like_no',pictxt('trash','Olds')).' ';
    $ret .= lj('txtx', 'pagup_plup___book__' . ses('iq') . '_640', pictxt('export', 'Book')) . ' ';
    return $ret;
}
예제 #27
0
파일: book.php 프로젝트: philum/cms
function plug_book($iq, $id)
{
    bk_rq();
    Head::add('csscode', book_css());
    Head::add('jscode', book_js());
    $_SESSION['book'] = $iq;
    if (!is_numeric($iq)) {
        list($r, $rb) = book_builder($iq);
    } else {
        $r = sql('ib', 'qdd', 'k', 'msg="' . $iq . '" and val="fav"');
    }
    if (!$r) {
        return;
    } else {
        $_SESSION['bookr'] = $r;
    }
    $d = implode(' ', $r);
    $here = 'book';
    $id = $id ? $id : $_SESSION['read'];
    $rid = randid();
    //if(!$id)
    $rb['opt'] = lj('', 'popup_plup___book_book*ifr_' . $iq, pictxt('get', 'iframe'));
    foreach ($r as $k => $v) {
        $i++;
        if ($oi) {
            $io = $i . '. ';
        }
        $lk = 'book' . $rid . '_plug__2_book_book*read_' . $k . '_' . $rid;
        $lgh = art_length(sql('host', 'qda', 'v', 'id="' . $k . '"'));
        $msg .= lj('', $lk, picto('kright') . ' ' . $io . suj_of_id($k) . btn('small', ' (' . $lgh . ')')) . br();
    }
    $rb['msg'] = scroll_c($msg, $rid);
    $ret = divd('book' . $rid, template($rb, 'book'));
    $_SESSION['cur_div'] = 'content';
    return $ret;
}
예제 #28
0
파일: spe.php 프로젝트: philum/cms
function page_titles($o = '', $rid = '')
{
    $load = ses('load');
    //$o=parent
    $days = getorpost('dig', ses('nbj'));
    $daybb = calc_date($days);
    $rech = good_rech();
    $nms = ses('nms');
    $frm = ses('frm');
    $read = ses('read');
    list($utg, $utv) = detect_uget();
    if ($rech) {
        $ico = btn("txtcadr", pictxt('search', $rech));
        if (get('targ')) {
            return;
        }
        if (is_array($load)) {
            $p['nbarts'] = nbof(count($load), 1) . ' (' . nbof(array_sum($load), 16) . ') / ' . nbof($days, 3);
        }
        $p['opt'] = lj('', 'popup_search___' . $rech, picto('popup'));
        if ($pg = $_SESSION['page'] > 1) {
            $p['opt'] = btn('txtsmall', 'page ' . $pg);
        }
        $p['suj'] = $rech;
        $p['url'] = 'search/' . $rech . '/' . $days;
    } elseif (get('rub_tag')) {
        $rub_t = get('rub_tag');
    } elseif (get('rssurl')) {
        $p['suj'] = $nms[15];
    } elseif ($par = get('parent')) {
        $read = 1;
        $p['suj'] = suj_of_id($par);
        $p['url'] = urlread($par);
    } elseif ($utg) {
        $p['suj'] = $utv;
        $_SESSION['frm'] = '';
        $p['date'] = dig_it($days, $utg, $rid) . ' ';
        $p['url'] = htac($utg) . $utv;
    } elseif ($tag = get('source')) {
        $p['suj'] = $tag;
        $_SESSION['frm'] = '';
        $p['date'] = dig_it($days, 'source', $rid) . ' ';
        $p['url'] = 'source/' . $tag . '/' . $days;
    } elseif ($tag = get('tag')) {
        $p['suj'] = $tag;
        $p['url'] = 'tag/' . $tag . '/' . $days;
        $p['date'] = dig_it($days, 'tag', $rid) . ' ' . lkc('txtx', htac('tag') . $tag, picto('url')) . ' ';
        $p['date'] .= lj('txtx', 'popup_search__3_' . ajx($tag) . '_' . $days, picto('search'));
    } elseif (get('module') == 'All') {
        $p['suj'] = get('module');
        $p['url'] = htac('module') . get('module');
    } elseif ($frm) {
        $p['suj'] = $frm;
        $p['url'] = htac('section') . $frm;
    }
    if (!$read) {
        //nav//nbarts
        if ($utv or $tag or $rub_t or get('source')) {
            if ($load) {
                $nbarts = count($load);
                if (!$rub_t) {
                    $_SESSION['frm'] = '';
                }
            }
        } elseif ($frm != "Home" && get('module') != "All" && $frm) {
            if (get('dig') or $_SESSION['lang']) {
                list($slct, $in, $wh, $ord, $gr) = play_req(' and re>0');
                $nbarts = sql('count(id)', 'qda', 'v', $wh);
            } else {
                $nbarts = $_SESSION['line'][$frm];
            }
        } elseif (ses('line')) {
            foreach ($_SESSION['line'] as $k => $v) {
                $nbarts += $v;
            }
        }
    }
    if ($frm && $frm != 'Home' && $frm != 'All' && !$read && !$p['date']) {
        $p['date'] = dig_it($days, 'section', $rid) . ' ';
    }
    // && !$rech
    if (!$read && !$p['nbarts']) {
        $p['nbarts'] = nbof($nbarts, 1) . (rstr(3) ? ' / ' . nbof($days, 3) : '');
    }
    if ($page = ses('page') && $page > 1) {
        $p['nbarts'] .= ' (page ' . $page . ') ';
    }
    if (!$load && $o) {
        $p['parent'] = find_navigation(ses('read'));
    }
    //rstr(78)
    if ($_GET['rub_tag']) {
        $p['tag'] = rub_tags('');
        $p['opt'] = lkc('txtx', htac('tag') . $rub_t, '&#9658;' . $rub_t);
    }
    if ($p['suj'] == 'All') {
        $p['suj'] = ses('nbj') . ' ' . nms(4);
    }
    if ($p['suj'] == 'Home') {
        $p['suj'] = nms(69);
    }
    //if($_GET['module'])$p['suj']=nms(100)
    return divd('titles', template($p, 'titles'));
}