示例#1
0
文件: connectors.php 项目: philum/cms
function plug_connectors($p, $o)
{
    $rid = 'plg' . randid();
    $bt = connectors_menu($p, $o, $rid);
    $ret = connectors_j($p, $o);
    return $bt . div(atd($rid), $ret);
}
示例#2
0
文件: notepad.php 项目: philum/cms
function np_sav($d, $id)
{
    $ret = hidden('', 'cka', 'm' . $d);
    for ($i = 1; $i <= 7; $i++) {
        $c = $i == $d ? 'active' : '';
        $ret .= ljb($c . '" id="ckb' . $i, 'mem_storage', $id . '_m' . $i . '_1_1_ckb' . $i . '_memnu', $i);
    }
    $ret .= ljb('" id="ckc', 'mem_storage', $id . '_cka__1_ckc', 'save');
    return span(atc('nbp') . atd('memnu'), $ret) . hlpbt('memstorage');
}
示例#3
0
文件: poll.php 项目: philum/cms
function plug_poll($p, $o)
{
    if ($p == 'init') {
        poll_init();
    }
    if ($p) {
        $ret = poll_menu($p);
    }
    return span(atd('poll' . $p) . atc('small'), $ret);
}
示例#4
0
文件: msqadd.php 项目: philum/cms
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);
}
示例#5
0
文件: ajax.php 项目: philum/cms
function popup($t, $d, $w = '', $p = '')
{
    if ($w) {
        $s = 'max-width:' . ($w + 16) . 'px;';
    }
    if ($p == 1) {
        $p = lj('', 'page_deskbkg', picto('desktop')) . ' ';
    }
    if ($p == 2) {
        $p = ljb('', 'pagrepos()', '', picto('expand')) . ' ';
    }
    $popa = popa($t, $p, $s);
    $_SESSION['popm'] = '';
    // onresize="poprepos()"
    return div(atc('popup') . ats($s) . atb('onmouseup', 'stop_drag(event)'), $popa . div(atd('popu') . atc('popu'), $d));
}
示例#6
0
文件: gallery.php 项目: philum/cms
function plug_gallery($q)
{
    if ($q == "gl") {
        $q = "";
    }
    $img_d = sql('img', 'qda', 'v', 'id="' . $_SESSION['read'] . '"');
    $img_d = substr($img_d, 0, 1) == '/' ? substr($img_d, 1) : $img_d;
    $img_d = str_replace("/", ",", $img_d);
    if ($q == "auto") {
        $s = "";
    } elseif ($q == "manual") {
        $s = $q;
        $imgs = str_replace(",", ",\n", $img_d);
    } elseif ($q == "dir") {
        $s = $q;
        $dirs = br() . plugin('dsnav', 'gl', 'users/' . $_SESSION['qb']);
    } else {
        $s = $q;
    }
    $ret .= bal("b", "source:") . ' ';
    if (!$q) {
        //gallerygl
        if ($img_d) {
            $ret .= lj('popbt', 'popup_gallery__x_auto', "auto") . ' ';
            $ret .= lj('popbt', 'popup_gallery__x_manual', "manual") . ' ';
        }
        $ret .= lj('popbt', 'popup_gallery__x_dir', "user/directory");
    } else {
        $ret .= lj("popbt", 'popup_gallery', $q == "dir" ? "user_directory" : $q);
    }
    if ($imgs) {
        $ret .= br() . txarea('dpl', $imgs, 40, 10, atd('source') . atc('popw') . ats('border:1px solid black'));
    }
    //pb name=src
    if ($dirs) {
        $ret .= $dirs;
    }
    if ($q != "dir" && $q) {
        $ret .= br() . bal("b", "type:") . ' ';
        $ret .= ljb("popbt", "insert_photo", $s . '\',\'', "Thumbnails") . ' ';
        $ret .= ljb("popbt", "insert_photo", $s . '\',\'2', "Ajax") . ' ';
        $ret .= ljb("popbt", "insert_photo", $s . '\',\'1', "Flash") . ' ';
        $ret .= lj("popbt", 'popup_slider_' . ($s == 'manual' ? 'source' : '') . '_3x_' . $s . '_' . $_SESSION['read'], "Slider") . ' ';
    }
    return $ret;
}
示例#7
0
文件: converts.php 项目: philum/cms
function plug_converts($p)
{
    $rid = 'plg' . randid();
    $bt = conv_menu($p, $o, $rid);
    $ret = conv_j($p, $o);
    return $bt . div(atd($rid) . atc(''), $ret);
}
示例#8
0
文件: art.php 项目: philum/cms
function play_arts($frm, $prw, $tp)
{
    $prw = slct_media($prw);
    $page = $_SESSION['page'];
    $npg = $_SESSION['prmb'][6];
    $min = ($page - 1) * $npg;
    $r = load_arts($frm, $prw);
    //pr($r);
    $nbarts = count($r);
    if (!$r) {
        return;
    }
    //$rb=req_load($r);
    foreach ($r as $k => $v) {
        $i++;
        if ($prw == 'auto') {
            $prw = $rb[$k]['re'] >= 2 ? 2 : 1;
        }
        if ($i >= $min && $i < $npg * $page && $v) {
            $ret .= batch_load($v, $prw, $tp);
        } elseif (rstr(39)) {
            $ret .= div(atd($k) . atc($prw), '');
        }
    }
    if (!rstr(39)) {
        $nbpg = nb_page($nbarts, $npg, $page);
    }
    return $nbpg . $ret . $nbpg;
}
示例#9
0
文件: twit.php 项目: philum/cms
function twit_read($q)
{
    $r = twit_datas($q);
    $ret = $r['from'] . ' ' . $r['date'] . ' ' . $r['reply_url'] . ' ' . $r['favs'];
    $ret .= divc('track', twit_embed_url($r['text']));
    $ret .= $r['img'];
    return balise('section', atd($q['id']), $ret);
}
示例#10
0
文件: exec.php 项目: philum/cms
function plug_exec()
{
    exc_js();
    $rid = 'plg' . randid();
    $j = $rid . '_plug__2_exec_exc*run___txtarea';
    $sj = 'SaveJ(\'' . $j . '\')';
    if ($_SESSION["auth"] < 6) {
        $btn .= btn('txtalert', 'need auth>=7');
    } else {
        $btn .= lj('', $j, picto('reload')) . ' ';
        $btn .= lj('txtx', "popup_plup___exec_exc*lib", "lib") . ' ';
        $btn .= lj('txtx', "popup_plup___exec_exc*fast", "fast") . ' ';
        $btn .= msqlink('system', 'program_core') . ' ';
        $btn .= lj('txtx', "exec", "x") . ' ';
        $btn .= lj('popsav', $j, 'exec') . br();
    }
    $ret .= txarea('txtarea', $p, 61, 18, atc('console'));
    //atb('onkeyup',$sj)..atb('onclick',$sj)
    return $btn . divc('row', $ret) . div(atd($rid) . atc('row'), '');
}
示例#11
0
文件: meta.php 项目: philum/cms
function langslct($r, $vrf, $id)
{
    $rid = randid('rdio');
    //$r=explode(' ',prmb(26));
    if (is_array($r)) {
        foreach ($r as $k => $v) {
            $c = $v == $vrf ? 'active' : '';
            $ret .= ljb($c, 'radioj', $rid . '\',\'' . $id . '\',\'' . ajx($v) . '\',\'' . $k, flag($v));
        }
    }
    return span(atd($rid) . atc('nbp'), $ret) . hidden($id, $id, $vrf);
}
示例#12
0
文件: styl.php 项目: philum/cms
function mnu_line_color($d, $p)
{
    $r = explode('|', $d);
    //txt|link|hover
    $kr = $_SESSION['clrs'][$_SESSION['prmd']];
    $n = count($klr);
    for ($i = 0; $i < 3; $i++) {
        $clrn = $r[$i] == 'undefined' || !$r[$i] ? '0' : $r[$i];
        $nid = $i + 1;
        $ret .= span(atc('cell') . atd('bt' . $p . $nid), mnu_line_bt($kr[$clrn], $clrn, $p . $nid));
    }
    return $ret;
}
示例#13
0
文件: pop.php 项目: philum/cms
function make_form($d, $div, $jx)
{
    $prod = explode(",", $d);
    $n = count($prod);
    for ($i = 0; $i < $n; $i++) {
        list($val, $type) = explode("=", $prod[$i]);
        $vb = normalize($val);
        if ($type == 'check') {
            $chk = 'chk' . $ia++;
            $hn[] = $chk;
        } elseif ($type != 'button') {
            $hn[] = $vb;
        }
        switch ($type) {
            case 'text':
                $ret .= txarea('" id="' . $vb, '', 44, 8);
                break;
            case 'check':
                $ret .= checkbox($chk, 'no', '', '');
                break;
            case 'hidden':
                $ret .= hidden('', $vb, $val);
                break;
            case 'uniqid':
                $ret .= hidden('', $vb, ses('iq'));
                break;
            case 'hidden':
                $ret .= balise("input", array(1 => $type, 3 => $vb, 4 => $val), '');
                break;
            case 'list':
                //$ret.=balise("select",array(3=>$vb),batch_defil(array_flip(explode("/",$val))));
                $ret .= select(atd($vb), explode('/', $val), 'vv');
                break;
            case 'radio':
                $rb = explode("/", $val);
                $ret .= radiobtn($rb, $vb, $val) . br();
                break;
            case 'date':
                $ret .= hidden('', $vb, mkday('', 'ymd.his'));
                break;
            case 'upload':
                $ret .= balise('input', array(1 => 'text', 3 => $vb, 4 => 'url'), '');
                break;
            case 'button':
                $btn = $val;
                break;
            case 'mail':
                $ret .= balise('input', array(1 => 'text', 3 => $vb, 6 => 20, 23 => $val, 21 => 'num_mail(\'' . $vb . '\');'), '');
                break;
            default:
                $ret .= autoclic($val . '" id="' . $vb, '', 20, 255, '');
                break;
        }
        if ($type != 'button' && $type != 'date' && $type != 'hidden' && $type != 'uniqid' && $type != 'radio') {
            $ret .= ' ' . label($vb, 'txtsmall2', '', $val) . br();
        }
    }
    $ret .= lj("popsav", $div . $jx . implode('|', $hn), $btn ? $btn : picto('right'));
    return divd($div, $ret);
}
示例#14
0
文件: ajax.php 项目: philum/cms
function pagup($t, $d, $p = '')
{
    $popa = div(atd('popa') . atc('popa') . ats('margin:auto; display:inline-block;'), ljb('', 'Close', 'popup', picto('close')) . $p . bal('small', $t));
    return div(ats(''), $popa . div(atd('popu') . atc('') . ats('margin:auto;'), $d));
}
示例#15
0
文件: lib.php 项目: philum/cms
function ljbub($v, $lk, $oc = '', $ov = '', $id = '', $tg = '')
{
    $tg = $tg ? atb('target', '_blank') : '';
    $ocb = 'closebub(this);';
    $ovb = 'closepbub(this,\'' . $id . '\'); clbubtim(this);';
    return '<li><a' . atb('href', $lk) . atd($id) . atb('onclick', $oc . ';' . $ocb) . atb('onmouseover', $ovb . $ov) . $tg . '>' . $v . '</a></li>';
}
示例#16
0
文件: api.php 项目: philum/cms
function api_menu($p, $o, $rid)
{
    $ret .= balb('textarea', atd('inp') . atb('cols', 70) . atb('row', 4), $p) . ' ';
    $ret .= lj('', $rid . '_plug__3_api_api*j___inp', picto('reload')) . ' ';
    return $ret;
}
示例#17
0
文件: art.php 项目: philum/cms
function art_read_mecanics($id, $r, $msg, $n, $prw, $tp)
{
    if (!$id) {
        return;
    }
    $n = $_SESSION['nl'] ? $_SESSION['nl'] : $n;
    //no_edit
    $rear = nb_ib_arts($id) + 1;
    $otp = read_idy($id, 'ASC');
    $r['opts'] = $_SESSION['opts'] ? $_SESSION['opts'] : art_opts($id);
    //p($r['opts']);
    $panout['id'] = $id;
    $panout['suj'] = $r['suj'];
    //$prw=slct_media($prw);
    if ($r['re'] == 0) {
        $panout['css'] = "hide";
    } else {
        $panout['css'] = '';
    }
    if ($prw == 1 or $prw == 2) {
        $panout['thumb'] = prepare_thumb($r['img'], $id);
    }
    if ($prw == 'rch') {
        $panout += prepare_msg_rech($id, $msg, $r);
    } elseif ($msg) {
        $panout += prepare_msg($id, $msg, $r, $prw);
        //corps && $prw!=1
        if (!$_SESSION['nl']) {
            $trk = prepare_tracks($id, $otp);
        }
    }
    $panout += prepare_tits($id, $r, $rear, $otp, $panout['count'], $prw);
    //count($otp)
    return balb('section', atd($id) . atn($id), template($panout, $tp)) . $trk . "\n";
}
示例#18
0
文件: sticky.php 项目: philum/cms
function popup_stick($d)
{
    return div(atd('popu') . ats('width:320px; background-color:#ffd500; color:#000; padding:4px;'), $d);
}
示例#19
0
文件: mod.php 项目: philum/cms
function mod_load($load, $ret, $t, $d, $o, $obj, $prw, $tp, $id)
{
    if (!$prw) {
        $prw = 'prw';
    }
    if ($t) {
        $t = build_titl($load, $t, $obj);
    }
    $mx = prmb(6);
    if ($d == 'read') {
        foreach ($load as $id => $prw) {
            $ret .= divc('justy', read_msg($id, 3)) . br();
        }
    } elseif ($d == 'articles') {
        $ret = output_pages($load, $prw, $tp);
    } elseif ($d == 'viewer') {
        $ret = art_viewer($load);
    } elseif ($d == 'multi') {
        foreach ($load as $id => $md) {
            $i++;
            $_POST['flow'] = 1;
            if ($i < $mx) {
                $art = art_read_b($id, $_SESSION['nl'], $md, $tp);
                $rt[] = $art;
                $ret .= $art;
            } else {
                $ret .= div(atd($id) . atc($md), '');
            }
        }
    } elseif ($load) {
        return $t . m_pubart($load, $d, $o);
    }
    if ($o == 'scroll') {
        $ret = scroll_b($load, $ret, 10);
    } elseif ($o == 'scrold') {
        $ret = scroll($load, $ret, 10);
    } elseif ($o == 'cols') {
        $ret = colonize($rt, $o, '', '');
    } elseif ($o == 'icons') {
        $ret = desktop_build_ico($load, 'icones');
    }
    //
    //else $ret=m_pubart($load,$d,$o);//echo $ret;
    if ($ret) {
        return $t . $ret;
    }
}
示例#20
0
文件: chatxml.php 项目: philum/cms
function plug_chatxml($p, $msg = '', $res = '')
{
    if (!$p) {
        return chatxcanal('public');
    }
    $p = normalize($p);
    ses('muse', $res ? ajxg($res) : ses('USE'));
    chtses($p, '0');
    list($r, $r1) = chatxdata($p);
    $form = chatxform($p);
    $head = chathead($p, $r1);
    $sty = atd('chtx' . $p) . ats('width:344px;');
    return $head . $form . scroll_b($r, div($sty, chatxread($p, $r)), 5, 344);
}
示例#21
0
文件: bubs.php 项目: philum/cms
function bub_exec($d)
{
    if ($d == 'login') {
        req('pop');
        return div(atd('nob'), loged('', '1', ''));
    }
    if ($d == 'cache') {
        req('boot,spe,art');
        $_SESSION['rqt'] = '';
        $_GET['refresh'] = 1;
        return li(cache_arts());
    }
}
示例#22
0
文件: adminx.php 项目: philum/cms
function artmod_edit_l($a, $b, $d)
{
    $d = ajx($d, 1);
    $r = array('-' => '', 'id' => 'id1-id2', 'cat' => 'cat1-cat2', 'nocat' => 'cat', 'tag' => 1, '(utag)' => 1, 'minday' => '7', 'hours' => '12', 'from' => '01-01-12', 'until' => '01-12-12', 'limit' => '10', 'preview' => 'true/false/full/auto', 'priority' => '1-2-3-4', 'nbchars' => '<4000', 'order' => 'day desc', 'lang' => 'eng', 'search' => 'word', 'template' => 'read', 'cols' => '3', 'nodig' => '1', 'nopages' => '1');
    $sj = sj('amc_call___adminx_artmod*edit*l_' . $a . '__sdx');
    $ret .= select(atd('sdx') . atb('onchange', $sj), $r, 'kk', $d);
    if ($d) {
        $ret .= hidden('', 'amca', $d) . input(1, 'amcb', $r[$d], '');
        $ret .= ljc('popbt', $a, 'adminx_artmod*edit*t___' . $a . '|amca|amcb', 'add', 4);
        $ret .= ' ' . hlpbt('call_arts');
    }
    return $ret;
}
示例#23
0
文件: spe.php 项目: philum/cms
function columns($re, $o, $id = '', $b = '')
{
    $ret = is_array($re) ? implode('', $re) : $re;
    if ($o > 10) {
        $s = 'auto ' . $o . 'px;';
    } else {
        $s = (is_numeric($o) ? $o : 3) . ' auto;';
    }
    $sty = 'columns:' . $s . ' -moz-columns:' . $s;
    return div(atd($id) . atc('cols' . $b) . ats($sty), $ret);
}
示例#24
0
文件: styl.php 项目: philum/cms
function mnu_line_color($d, $p)
{
    $r[''] = '';
    $klr = $_SESSION['clrs'][$_SESSION['prmd']];
    $k = explode("|", $d);
    $nb = count($klr);
    for ($i = 0; $i <= 3; $i++) {
        if ($k[$i] == 'undefined') {
            $k[$i] = '';
        }
    }
    for ($i = 0; $i <= $nb; $i++) {
        //$r[]=$i;
        $sty = '" style="background-color:#' . $klr[$i] . ';';
        if ($k[0] == $i && $i) {
            $h1 = $i . $sty;
        }
        if ($k[1] == $i && $i) {
            $h2 = $i . $sty;
        }
        if ($k[2] == $i && $i) {
            $h3 = $i . $sty;
        }
        $r[$i . $sty] = $i;
    }
    //$ret=menuder_form_kv($r,$p.'1" id="'.$p.'1',$h1,"vk").' ';
    //$ret.=menuder_form_kv($r,$p.'2" id="'.$p.'2',$h2,"vk").' ';
    //$ret.=menuder_form_kv($r,$p.'3" id="'.$p.'3',$h3,"vk");
    //$r=array_flip($r);
    $ret = select(atd($p . '1'), $r, 'kv', $h1) . ' ';
    $ret .= select(atd($p . '2'), $r, 'kv', $h2) . ' ';
    $ret .= select(atd($p . '3'), $r, 'kv', $h3);
    return $ret;
}
示例#25
0
文件: adminx.php 项目: philum/cms
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;
}
示例#26
0
文件: finder.php 项目: philum/cms
function fi_design($fi, $rb)
{
    $id = randid();
    if ($rb[4] != 'conn') {
        $ret = divc('fimnu imgr', $fi['menu'] . hlpbt('finder'));
    }
    $ret .= $fi['url'] . $fi['flap'] . $fi['reg'] . $fi['act'];
    $ret .= ($ret ? br() . br() : '') . $fi['win'];
    return div(atd('finder') . ats('width:550px;"'), $ret);
}
示例#27
0
文件: mod.php 项目: philum/cms
function search_btn($va, $o, $id = '', $d = '')
{
    if ($id) {
        $di = 'ada';
    } else {
        $id = 'srch';
    }
    $t = $va != 1 ? $va : nms(24);
    if ($o > 1) {
        $s = $o;
    } else {
        $s = 10;
        if ($o) {
            if (strpos($o, ';') === false) {
                $c = atc($o);
            } else {
                $c = ats($o);
            }
        }
    }
    $j = 'SearchT(\'' . $id . '\')';
    $js = 'onClick="' . $j . '" onkeyup="' . $j . '" onContextMenu="' . $j;
    $ret = autoclic($id . '" ' . $js, $t, $s, '100', '');
    if (!$d) {
        $ret = div(atd($di . '"' . $c), $ret);
    }
    return $ret;
}
示例#28
0
文件: ajxf.php 项目: 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);
}
示例#29
0
文件: stats.php 项目: philum/cms
function canvas($d, $w, $h)
{
    return balb('canvas', atd('myCanvas') . atb('width', $w) . atb('height', $h) . atc(''), 'error') . bal('script', 'var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d"); ctx.font="12px Arial"; ' . $d);
}
示例#30
-1
文件: editor.php 项目: philum/cms
function plug_editor($reset = '')
{
    secure_inputs();
    if ($_SESSION["dev"] == "dev" or $_SESSION["dev"] == "lab") {
        $g = "b";
    }
    req('pop,spe,art,tri');
    Head::add('csscode', '.tabc{border:1px dotted grey;padding:10px;min-height:25px;width:550px;}');
    Head::add('jscode', '
function SaveIcpb(){//convert
	var opt=document.getElementById("txtareb").innerHTML;
	document.getElementById("txt").value=opt;
	SaveJ("txtarea_convhtml_txtareb_4");
	toggle_tab(\'tab-1\',2);}
function editab(p){
	var act=document.getElementById("edt").className;
	if(act=="txtx" || p==1){var arr=[true,"on","txtred",""];}
	else{var arr=[false,"off","txtx","none"];}
	document.getElementById("txtareb").contentEditable=arr[0];
	document.getElementById("txtareb").designMode="arr[1]"; void 0;
	document.getElementById("txtareb").focus;
	document.getElementById("edt").className=arr[2];
	document.getElementById("edtc").style.display=arr[3];}
');
    //Head::add('rel',array('shortcut icon',uicon('copy_16','edit2','/')));
    $out["head"] .= div(atd('popup') . ats('position:fixed;'), '');
    $out["head"] .= hidden('', 'socket', '');
    if ($_GET['switch_defcon']) {
        $_SESSION['rstr'][18] = $_SESSION['rstr'][18] == 0 ? 1 : 0;
    }
    $basedefs = $_SESSION['rstr'][18] == 0 ? 'public' : $_SESSION['qb'];
    if ($reset == 'reset_cache') {
        $_SESSION['vacuum'] = '';
    }
    ####
    if ($_GET["urlsrc"]) {
        $urlsrc = $_GET["urlsrc"];
        $_GET["urlsrc"] = $urlsrc = strdeb($urlsrc, '?utm_source');
        $urlsrc = str_replace("\$", "?", $urlsrc);
        foreach ($_GET as $k => $v) {
            if ($k == "rssurl") {
                $urlsrc = $v;
            } elseif ($k != 'urlsrc') {
                $urlsrc .= '&' . $k . '=' . $v;
            }
        }
    }
    if ($_POST["urlsrc"]) {
        $urlsrc = $_POST["urlsrc"];
        // && $_POST["txt"]==""
        $_POST["urlsrc"] = $urlsrc = strdeb($urlsrc, '?utm_source');
    }
    if ($_POST["suj"]) {
        $title = $_POST["suj"];
    }
    if (strpos($urlsrc, "http") === false && $urlsrc) {
        $urlsrc = 'http://' . $urlsrc;
    }
    if ($urlsrc && $_POST["txt"] == "") {
        list($title, $reb, $ret, $defid, $defs) = vacuum($urlsrc, "");
    }
    //echo txarea('',$ret,20,4);
    ####
    //see h-number in html(mnu)
    $tabnam = 'tbmdtab-1';
    if ($_POST["urlsrc"] or $_POST["txt"] or $_POST["txb"]) {
        $_SESSION[$tabnam] = '2';
        $npb = $_SESSION['npnb'];
    } elseif ($_POST["urlsrc"] && !$_POST["txt"]) {
        $_SESSION[$tabnam] = '1';
    }
    //else $_SESSION[$tabnam]='0';//current_tab
    if ($_POST["txt"]) {
        $ret = stripslashes($_POST['txt']);
    }
    //html
    if ($_POST["txb"]) {
        $reb = stripslashes($_POST['txb']);
    }
    //conn
    if ($_POST["title"]) {
        $title = stripslashes($_POST['title']);
    }
    if ($_POST["convent"]) {
        $ret = html_entity_decode($ret);
    }
    if ($_POST["convutf"]) {
        $ret = utf8_decode($ret);
    }
    if ($_POST["convurl"]) {
        $ret = urldecode($ret);
    }
    if ($_POST["urlencode"]) {
        $ret = urlencode($ret);
    }
    if ($_POST["table2array"]) {
        $reb = plugin_func('table2array', 'table2array_build', $reb);
    }
    if ($ret && !$reb) {
        //if(!strpos($ret,'<br />') && strpos($ret,"\r"))$ret=nl2br($ret);
        $reb = converthtml($ret);
        //htmlentities //htmlspecialchars
        $reb = html_entity_decode_b($reb);
        $reb = html_entity_decode($reb);
        $reb = convertmail($reb);
        $reb = embed_links($reb);
    } elseif (!$ret) {
        $ret = format_txt(stripslashes($reb), 0, "");
    }
    //if(!$ret)
    $ree = clean_br($ret);
    #edit
    //transformers
    if ($_POST['repla']) {
        if ($_POST['rec_prg']) {
            $reb = ereg_replace(stripslashes($_POST['repla']), stripslashes($_POST['replb']), $reb);
        } else {
            $reb = str_replace(stripslashes($_POST['repla']), stripslashes($_POST['replb']), $reb);
        }
    }
    if ($_POST['del_tab']) {
        $reb = del_tables($reb);
    }
    //if($_POST['conn_to_del']){$reb=correct_txt($reb,$_POST['conn_to_del'],'correct');
    //	$reb=str_replace(array("¬","|"),"",$reb); $reb=clean_br($reb);}
    if ($_POST['del_n'] == "ok") {
        $reb = del_n($reb);
    }
    if ($_POST['clean_mail']) {
        $reb = convertmail($reb);
    }
    if ($_POST["clean_punct"]) {
        $reb = clean_punct($reb);
    }
    if ($_POST["add_punct"] == "ok") {
        $reb = add_lines($reb);
    }
    if ($_POST['clean_br'] or $urlsrc) {
        $reb = clean_br($reb);
    }
    /*----------------------*/
    //import
    if ($_SESSION["dev"]) {
        $dv = ' ' . btn('txtsmall', $_SESSION["dev"]);
    }
    $out['head'] .= lkc("txtx", "/plug/editor", picto('editxt', 16) . $dv) . ' ';
    //'&#8362;'
    //defcons
    if (!$defid) {
        $defid = str_replace(array('http://', 'www.'), '', $urlsrc);
        $defid = substr($defid, 0, strpos($defid, '/'));
    }
    $defcon .= msqlink('users', $basedefs . '_defcons');
    if ($_SESSION['rstr'][18] == 1 && $_SESSION['auth'] > 4) {
        $defcon .= lkc("txtblc", '?switch_defcon==', "switch") . ' ';
        $defcon .= lkt("txtblc", '/msql/users/' . $basedefs . '_defcons&append=users/public_defcons', "herit_from_public") . ' ';
        $defcon .= lkt("txtblc", '/msql/users/public_defcons&append=users/' . $_SESSION["qb"] . '_defcons', "inform_public") . ' ';
    } else {
        $defcon .= btn('txtsmall', 'public_defcons') . ' ';
    }
    if ($defid) {
        $defcon .= lj("txtred", 'popup_editmsql___users/' . $basedefs . '*defcons_' . $defid, "edit");
    }
    $otab['html'] .= '<form id="form1" name="coded" method="post" action="/plug/editor">';
    $otab['html'] .= ljb('txtbox', 'document.coded.txt.select()', '', '::');
    $otab['html'] .= submitj('txtbox', 'codeb', 'convert') . ' ';
    $otab['html'] .= input2("text", "urlsrc", $urlsrc, '" size="36') . ' ';
    if ($urlsrc) {
        $otab['html'] .= lkt('txtx', $urlsrc, 'go') . ' ';
    }
    $otab['html'] .= br();
    $otab['html'] .= '<textarea name="txt" id="txt" class="console" rows="21" cols="61">' . $ret . '</textarea>' . br();
    //htmlentities
    $otab['html'] .= $defcon . ' ';
    $otab['html'] .= checkbox("objects", "ok", "objects", 0) . ' ';
    //$otab['html'].=checkbox("jump","ok","not_convert",0).br();
    $otab['html'] .= checkbox("nobr", "ok", "br", 0);
    $otab['html'] .= checkbox("convent", "ok", "entities", 0) . ' ';
    $otab['html'] .= checkbox("convutf", "ok", "utf8", 0) . ' ';
    $otab['html'] .= checkbox("convurl", "ok", "url", 0) . ' ';
    $otab['html'] .= checkbox("see", "ok", "show_work", 0) . br();
    $otab['html'] .= lkt("txtblc", "/plug/converts", "conversions") . ' ';
    $otab['html'] .= lkt("txtblc", "/plug/pad", "notepad") . ' ';
    $otab['html'] .= lkt("txtblc", "/plug/ifram", "iframe") . ' ';
    $otab['html'] .= lkc('txtblc', '/plug/editor/reset_cache', 'reset_cache') . ' ';
    $otab['html'] .= '</form>';
    //notepad
    if ($_SESSION['USE']) {
        $otab['connectors'] .= divs('position:absolute; right:0; top:0;', plugin('txt', $npb, 1));
    }
    $otab['connectors'] .= btn('txtit', $title);
    $otab['connectors'] .= '<form name="converted" method="post" action="">';
    $otab['connectors'] .= ljb('txtbox', 'document.converted.txb.select()', '', '::');
    $otab['connectors'] .= submitj('txtbox', 'converted', 'modif') . ' ';
    $otab["connectors"] .= div('', conn_correct($reb));
    //local_reparation
    $otab['connectors'] .= div(ats('width:630px;'), conn_edit(""));
    $otab['connectors'] .= input(0, 'title', $title, '');
    $otab['connectors'] .= '<textarea name="txb" id="txtarea" class="tab" rows="16" cols="68" wrap="VIRTUAL" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" ondblclick="storeCaret(this);" onChange="clip.setText(this.value)">' . $reb . '</textarea><br>';
    $otab['connectors'] .= '<div class="txtsmall2">';
    $otab['connectors'] .= $defcon . ' ';
    $otab['connectors'] .= checkbox("clean_mail", "ok", "clean_mail", 0) . ' ';
    $otab['connectors'] .= checkbox("clean_br", "ok", "clean_br", 0) . ' ';
    $otab['connectors'] .= checkbox("del_n", "ok", "del_nl", 0) . ' ';
    $otab['connectors'] .= checkbox("add_punct", "ok", "add_nl", 0) . ' ';
    $otab['connectors'] .= checkbox("clean_punct", "ok", "typo_rules", 0) . ' ';
    $otab['connectors'] .= checkbox("del_tab", "ok", "del_tables", 0) . ' ';
    $otab['connectors'] .= checkbox("table2array", "ok", "table2array", 0) . ' ';
    //$otab['connectors'].='<label>delete:</label>'.balise("select",array(2=>"conn_to_del",5=>"txtblc"),batch_defil_kv(connectors_reference_lite(),"","vv")).' ';
    $otab['connectors'] .= '</div>';
    $otab['connectors'] .= divc('txtsmall2', 'replace by:') . '' . txarea("repla", $_POST['repla'], 15, 1) . ' ' . txarea("replb", $_POST['replb'], 15, 1) . ' ' . checkbox("rec_prg", "ok", "preg", 0);
    $otab['connectors'] .= '</form>';
    $otab['connectors'] .= lkt("txtblc", "/plug/converts", "converts") . ' ';
    $otab['connectors'] .= lkt("txtblc", "/plug/pad", "notepad") . ' ';
    $otab['connectors'] .= lkt("txtblc", "/plug/buildtable", "buildtable") . ' ';
    //wysiwyg
    //if($title)$otab["render"].=btn("txtit",$title).br();
    $otab['render'] .= btd('bts', ljb('txtbox', 'SaveIcpb()', '', 'convert')) . ' ';
    $otab['render'] .= ljb('txtx" id="edt', 'editab(0)', '', 'editable') . ' ';
    $otab['render'] .= txareacb($ree, 'tabc panel justy');
    $otab['render'] .= btd('bts', ljb('txtbox', 'SaveIcpb()', '', 'convert')) . ' ';
    $otab['render'] .= ljb('txtx" id="edt', 'editab(0)', '', 'editable') . ' ';
    $otab['render'] .= divd('popup', '') . "\n";
    $otab['render'] .= divd('popw', '') . "\n";
    $otab['render'] .= hidden('', 'socket', '');
    $out["end"] .= '</body>' . "\n" . '</html>';
    return implode("", $out) . make_tabs($otab);
}