예제 #1
0
파일: umtag.php 프로젝트: philum/cms
function ummoay_build($p, $o)
{
    req('art,tri,pop,spe');
    reqp('msqarts');
    $tmp = ummoay_template();
    $r = req_arts_y($p);
    $rtg = list_tags();
    if ($r) {
        foreach ($r as $k => $v) {
            list($id, $day, $msg, $cat, $tag, $lk) = $v;
            $day = clean_day_tw($day);
            $msg = format_txt($msg, '', '');
            $lnk = lka(urlread($id));
            $pop = lj('', 'popup_trckpop___' . $id, picto('forum', 16));
            $rb[$day] = array('suj' => $cat, 'day' => mkday($day, 'Y/m/d'), 'msg' => $msg, 'url' => $lk, 'open' => popart($id, 'articles') . ' ' . $pop, 'tag' => $rc = $rtg[$id]);
        }
    }
    krsort($rb);
    foreach ($rb as $k => $v) {
        $rd[nms(100)] .= template_build($tmp, $v);
        $rc = $v['tag'];
        if ($rc) {
            foreach ($rc as $kb => $vb) {
                $rd[$kb] .= template_build($tmp, $v);
            }
        }
    }
    return make_tabs($rd);
}
예제 #2
0
파일: cssedit.php 프로젝트: philum/cms
function plug_cssedit($p, $o)
{
    $r = f_inp_edit_css_conn();
    foreach ($r as $k => $v) {
        foreach ($v as $ka => $va) {
            $ret[$k] .= ljb('', "insert_b", $va . '\',\'cssarea' . $p, $va) . br();
        }
    }
    return make_tabs($ret, '', 'nbp');
}
예제 #3
0
파일: plug.php 프로젝트: philum/cms
function plug_slct()
{
    $r = msql_read('system', 'program_plugs', '', 1);
    //p($r);
    //ksort($r);
    foreach ($r as $k => $v) {
        if ($v[2] == '1' && !$v[3] && !$v[5] && $v[1]) {
            $rb = tri_tag(str_replace(' ', ',', $v[1]));
        }
        if ($rb) {
            foreach ($rb as $kb => $vb) {
                $ret[$vb][] = lkc('', '/plug/' . $k, $k);
            }
        }
    }
    return divc('', make_tabs($ret));
}
예제 #4
0
                /* Deduce an interface if possible and use the description */
                $optionc = "{$optionc['0']}";
                $friendly = convert_friendly_interface_to_friendly_descr(strtolower($optionc));
                if (empty($friendly)) {
                    $friendly = $optionc;
                }
                $search = array("-", ".rrd", $optionc);
                $replace = array(" :: ", "", $friendly);
                $prettyprint = ucwords(str_replace($search, $replace, $friendly));
                $optionslist[$optionc] = htmlspecialchars($prettyprint);
        }
    }
    return $optionslist;
}
include "head.inc";
display_top_tabs(make_tabs());
if ($input_errors && count($input_errors)) {
    print_input_errors($input_errors);
}
$form = new Form(false);
$section = new Form_Section('Graph settings');
$group = new Form_Group('Options');
$group->add(new Form_Select('option', 'Graphs', $curoption, build_options()))->setHelp('Graph');
$group->add(new Form_Select('style', 'Style', $curstyle, $styles))->setHelp('Style');
$group->add(new Form_Select('period', 'Period', $curperiod, $periods))->setHelp('Period');
if ($curcat == 'custom') {
    $group->setHelp('Any changes to these option may not take affect until the next auto-refresh.');
}
$section->add($group);
if ($curcat == 'custom') {
    $section->addInput(new Form_Input('cat', null, 'hidden', 'custom'));
예제 #5
0
파일: pop.php 프로젝트: philum/cms
function rssj($p, $o)
{
    $r = msql_read('', ses('qb') . '_' . $p, '', 1);
    //$r=msq_sort($r,1,'');
    if ($r) {
        foreach ($r as $k => $v) {
            if ($v[2] == $o or !$o) {
                if (substr($v[0], 0, 4) == 'http') {
                    $v[0] = substr($v[0], 7);
                }
                if ($v[0]) {
                    $ret[$v[2]] .= toggle('', 'rsj' . $k . '_rssj_' . $k . '_' . ajx($v[0], ''), $v[1] ? $v[1] : preplink($v[0])) . ' ' . btd('rsj' . $k, '') . br();
                }
            }
        }
    }
    //$v[2]
    //foreach($ret as $k=>$v){ksort($v); $ret[$k]=implode('',$v);}
    if (auth(6)) {
        $b = msqlink('', ses('qb') . '_' . $p) . ' ';
    }
    return make_tabs($ret, 'rss', 'nbp') . $b;
}
예제 #6
0
파일: adminx.php 프로젝트: philum/cms
function show_params($slct, $restrict)
{
    $r = msql_read_prep('system', 'admin_restrictions');
    $h = msql_read('lang', 'admin_restrictions');
    if ($slct && auth(6)) {
        modif_params($slct, $restrict);
    }
    foreach ($r as $k => $v) {
        $rb[$k] = show_params_cat($v, $h);
    }
    if (auth(6)) {
        $bt = msqlink('system', 'admin_restrictions', '', 'imgr');
    }
    return $bt . make_tabs($rb, 'rst');
}
예제 #7
0
파일: styl.php 프로젝트: philum/cms
function f_inp_facilities($defs, $k)
{
    if (!$defs[$k]) {
        return;
    }
    $val = stripslashes($defs[$k][6]);
    //freecss
    $nc = name_classe($defs[$k]);
    $url = '/?admin=css&edit_css=' . $k;
    $end = divc('clear', '');
    $ret .= btn("txtcadr", trim($nc)) . ' ' . btn('txtsmall2', '#' . $k . '') . ' ';
    $rt['classe'] = facil_css($k, $url, $val) . $end;
    //css_free
    $rt['colors'] = facil_colors($defs, $k, $url) . $end;
    //colors
    $rt['default'] = facil_reset($k, $nc) . $end;
    //reset
    $rt['global'] = facil_globalc($k, $nc) . $end;
    //global
    if ($nc == "@font-face ") {
        $ret .= facil_fonts($defs, $k, $url) . $end;
    }
    //fonts
    $rt['images'] = facil_images($k, $url, $val) . $end;
    //images
    $rt['name'] = facil_names($defs, $k);
    //classname
    $rt['tools'] = facil_pos($defs, $k) . $end;
    //pos
    //$ret.=divc('imgr',facil_pos($defs,$k));
    $ret .= make_tabs($rt, 'csf' . $k);
    return div(atc('clear') . ats('padding:10px; width:550px;'), $ret);
}
예제 #8
0
파일: favs.php 프로젝트: philum/cms
function fav_tags()
{
    req('spe');
    $r = catagarts(ses('iq'));
    //tag,idarts
    if ($r) {
        foreach ($r as $tag => $v) {
            foreach ($v as $id) {
                $rtg[$id][$tag] = 1;
            }
        }
    }
    if ($r) {
        foreach ($r as $tag => $v) {
            foreach ($v as $id) {
                $ret[$tag] .= fav_art($id, $rtg[$id]);
            }
        }
    }
    if ($ret) {
        foreach ($ret as $k => $v) {
            $ret[$k] = divc('cols', $v);
        }
    }
    return make_tabs($ret);
}
예제 #9
0
파일: index.php 프로젝트: philum/cms
function plug_index()
{
    $ico = picto('editxt');
    $dir = 'plug/';
    $plug = msql_read('system', 'program_plugs', '');
    $help = msql_read('lang', 'program_plugs', '');
    $mt = msql_read_prep('system', 'program_plugs_types');
    $re = explore($dir, 'files', 1);
    sort($re);
    $rt = array('url', 'plugin', 'open', 'edit', 'do', 'usage', 'tag', 'private', 'interface', 'dev', 'old', 'modified');
    foreach ($re as $k => $v) {
        $va = substr($v, 0, -4);
        $plg = $plug[$va];
        if (auth(4)) {
            $fi = lj('', 'popup_editmsql___system/program*plugs_' . ajx($va) . '__1', $ico) . ' ';
        }
        if (auth(4)) {
            $hlp = lj('', 'popup_editmsql___lang/fr/program*plugs_' . ajx($va) . '__1', $ico) . ' ';
        }
        $do = $help[$va][0];
        if ($do) {
            $dobt = lj('', 'popup_popmsq___lang_program*plugs_' . ajx($va) . '_usage', picto('view'));
        } else {
            $dobt = '';
        }
        $edt = lj('', 'popup_plupin__3_codev_plug_' . $va, picto('conn'));
        $mkc = '-';
        $pb = $plg[3] ? $plg[3] : '-';
        if ($plg[2] == 1) {
            $op = lj('', 'popup_plupin__3_' . $va, picto('get'));
        } else {
            $op = '';
        }
        $lk = lkt('txtx', '/plugin/' . $va, picto('link'));
        $tim = filemtime($dir . $v);
        $dat = date($d ? $d : 'ymd', $tim);
        if (substr($v, 0, 1) != '_' && substr($v, -4) == '.php' && $va) {
            $ra['all'][] = $rv;
            $ssh = $plg[4];
            $dev = $plg[5];
            $rv = array($lk, $fi . $va, $op, $edt, $hlp . $dobt, $plg[0], $plg[1], $pb, $ssh, $dev, $plg[6], $dat);
            if (strpos($plg[1], ' ')) {
                $kr = explode(' ', $plg[1]);
                for ($i = 0; $i < count($kr); $i++) {
                    $ra[$kr[$i]][] = $rv;
                }
            } elseif ($plg[1]) {
                $ra[$plg[1]][] = $rv;
            } else {
                $ra['new'][] = $rv;
            }
        }
    }
    foreach ($ra as $k => $v) {
        $rd = array_merge(array($rt), $v);
        if ($k == 'all') {
            $rb[$k] .= msqlink('system', 'program_plugs');
        } elseif ($mt[$k]) {
            $rb[$k] .= divc('', current($mt[$k])) . br();
        }
        $rb[$k] .= make_table($rd, 'txtcadr', '');
    }
    return make_tabs($rb);
}
예제 #10
0
파일: mod.php 프로젝트: philum/cms
function tab_mods($p)
{
    $r = val_to_mod_b($p);
    $ico = sesmk('icotag');
    foreach ($r as $k => $v) {
        $md = build_mods($v);
        $k = $ico[$k] ? $ico[$k] : $k;
        if ($md) {
            $rc[$k] = $md;
        }
    }
    return make_tabs($rc, randid('tmod'));
}
예제 #11
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;
}
예제 #12
0
파일: adminx.php 프로젝트: philum/cms
function show_params($slct, $restrict)
{
    $r = msql_read_prep('system', 'admin_restrictions');
    $h = msql_read('lang', 'admin_restrictions');
    if ($slct && auth(6)) {
        modif_params($slct, $restrict);
    }
    foreach ($r as $k => $v) {
        $rb[$k] = show_params_cat($v, $h);
    }
    if (auth(6)) {
        $bt = msqlink('system', 'admin_restrictions', '', 'imgr');
    }
    ksort($rb);
    //foreach($rb as $k=>$v)$ret.=bal('h4',$k).divc('nbp',$v).br(); return $bt.$ret;
    return $bt . make_tabs($rb, 'rst');
}
예제 #13
-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);
}