Beispiel #1
0
function make_menus_rb($arr, $here, $open, $o)
{
    static $i;
    $i++;
    //if($open)$i=$open;
    static $a;
    $a++;
    //$tr=str_pad('►',$a+7,'-',STR_PAD_LEFT);
    $css = '" style="padding:0 0 0 32px;';
    $csa = '" style="list-style-type:none;';
    //if($open)$i='x'.$i;
    if (is_array($arr)) {
        foreach ($arr as $k => $v) {
            $o++;
            $re = '';
            //$a=$i.$o;
            if (is_array($v)) {
                $nb = btn('txtsmall2', '(' . count($v) . ')');
                $re = balc("li", $csa, '├–' . good_gb($k, $i, '►') . ' ' . $nb);
                $re .= make_menus_rb($v, '', 0, 0);
            } elseif ($open) {
                $re .= balc("li", $csa, '├– ' . lj('', 'popup_popart__3_' . $k . '_3', suj_of_id($k)));
            }
            if ($re) {
                $ret .= divd('tn' . $k, $re);
            }
        }
    }
    $a--;
    return divc($css, $ret);
}
Beispiel #2
0
function environ_build($id, $o)
{
    req('spe,art');
    //,mod,pop,tri
    $ret = environ_art($id);
    $ib = ib_of_id($id);
    if ($ib) {
        $ret .= divc('', divc('txtcadr', 'parent') . environ_art($ib));
    }
    $r = art_tags($id);
    //pr($r);
    if ($r) {
        foreach ($r as $k => $v) {
            foreach ($v as $ka => $va) {
                $ret .= divc('txtcadr', $ka);
                $rb = tag_arts($ka, $k, 7);
                if ($rb) {
                    foreach ($rb as $kb => $vb) {
                        $ret .= environ_art($kb);
                    }
                }
            }
        }
    }
    $r = art_opts($id);
    //pr($r);
    foreach ($r as $k => $v) {
        if (is_numeric($v)) {
            $t = divc('txtcadr', $k);
            $d = environ_art($v);
            $ret .= divc('', $t . $d);
        }
    }
    return $ret;
}
Beispiel #3
0
function radio_edit($nod, $dr, $md, $id = '')
{
    $id = $id ? $id : $_SESSION['read'];
    $nd = 'radio' . $id;
    if (!$nod) {
        $nod = $_SESSION['qb'] . '_' . $nd;
    }
    $nodb = str_replace('_', '*', $nod);
    if ($dr) {
        $ret .= radio_build($dr, $nod);
    }
    $r = msql_read('radio', $nod, '');
    $ret .= msqlink('radio', $_SESSION['qb'] . '_' . $nd);
    if ($r[$md]) {
        foreach ($r[$md] as $k => $v) {
            $ky .= $md . '.' . $k . '|';
            $edit .= input2('text', '"id="' . $md . '.' . $k, $v) . btn('txtsmall', $r['_menus_'][$k]) . br();
        }
        $edit .= ljb('popbt', 'SaveR', 'popup_radiosav_' . $nodb . '__' . $k . '\',\'' . $ky, 'save');
    }
    $ret .= divc('edit', $edit);
    if ($r) {
        foreach ($r as $k => $v) {
            foreach ($v as $ka => $va) {
                $datas[$k][] = $va;
            }
            if ($k != '_menus_' && $k != $md) {
                $datas[$k][] = ljb('popbt', 'SaveJ', 'popup_radioedit___' . $nodb . '__' . $k, 'edit');
            }
        }
    }
    $ret .= make_divtable($datas);
    return popup('build_playlist', $ret);
}
Beispiel #4
0
function bub_ucom_btn()
{
    $j = 'sjtime(\'ucom\',\'socket_ucom_ucom_url\');';
    $js = 'onClick="' . $j . '" onContextMenu="' . $j;
    $ret = autoclic('ucom" id="ucom" ' . $js, 'command', 16, '100', '');
    return divc('search', $ret);
}
Beispiel #5
0
function products($r, $id)
{
    foreach ($r as $k => $v) {
        $ret .= affiche_prod($k, $id);
    }
    return divd('shopplace', $ret) . divc("clear", "");
}
Beispiel #6
0
function patch_tags()
{
    $table["_meta"] = '
CREATE TABLE IF NOT EXISTS `' . ses('qd') . '_meta` (
  `id` int(7) NOT NULL AUTO_INCREMENT,
  `cat` varchar(255) collate latin1_general_ci NOT NULL,
  `tag` varchar(255) collate latin1_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;';
    /*
    $table["_meta-id"]='
    ALTER TABLE `'.ses('qd').'_meta`
    ADD PRIMARY KEY (`id`);';*/
    $table["_meta_art"] = '
CREATE TABLE IF NOT EXISTS `' . ses('qd') . '_meta_art` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idart` int(7) NOT NULL,
  `idtag` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;';
    /*
    $table["_meta_art-id"]='
    ALTER TABLE `'.ses('qd').'_meta_art`
    ADD PRIMARY KEY (`id`);';*/
    foreach ($table as $k => $sql) {
        $req = mysql_query($sql) or die(mysql_error());
        $ret .= divc('', ses('qd') . '' . $k . ': created');
    }
    $ret .= lka('/plug/tagpatch/', 'Apply patch to fill the new databases (click on each links)');
    return $ret;
}
Beispiel #7
0
function plug_tags($p, $o)
{
    req('mod,spe');
    if ($_GET['sources']) {
        $r = sql('mail', 'qda', 'k', '');
        $go = 'source';
        //source
        foreach ($r as $k => $v) {
            if ($k != 'mail' && trim($k)) {
                $reb[preplink($k)] += 1;
            }
        }
    } else {
        $cat = $p ? $p : 'tag';
        //$reb=tags_list($cat);
        $ra = sql('idtag,idart', 'qdta', 'k', '');
        arsort($ra);
        $rb = sql('id,tag', 'qdt', 'kv', 'cat="' . $cat . '"');
        arsort($ra);
        foreach ($ra as $k => $v) {
            if ($rb[$k]) {
                $reb[$rb[$k]] = $v;
            }
        }
    }
    if ($o) {
        $ret = tags_cloud($reb, 12, 27, ' ', $cat);
    } else {
        $ret = tg_list($reb, $go);
    }
    return divc('txtcadr', count($reb) . ' ' . ($p ? $p : 'Tags')) . $ret;
}
Beispiel #8
0
function smsreader($r, $p, $o)
{
    $o = '+' . $o;
    foreach ($r as $k => $v) {
        $numbr = $v[0] ? $v[0] : $v[1];
        $numb = substr($numbr, 1);
        $day = $v[2] . $v[3] . $v[4] . $v[5] . $v[6] . $v[7];
        if ($v[7]) {
            $time = mktime($v[5], $v[6], $v[7], $v[3], $v[4], $v[2]);
        }
        if ($v[0] && $v[0] == $o or $v[1] && $v[1] == $o) {
            //szFromNumber
            //$day=$v['uYear'].$v['uMonth'].$v['uDay'].$v['uHour'].$v['uMinute'].$v['uSecond'];
            if ($time) {
                $realday = mkday($time, 'ymd.hi');
            }
            $ret .= $day . br() . $v[8] . br() . hr();
            $who = ($v[0] ? 'From' : 'To') . ':' . $numbr;
            $rb[$time] = divc('panel', $who . ', ' . $realday . br() . divc('justy', $v[8]));
        } else {
            $rb[$time] .= lkc('', '/plugin/smsreader/' . $p . '/' . $numb, $numb) . ' ';
        }
    }
    ksort($rb);
    //p($rb);
    $ret = implode(hr(), $rb);
    //echo $ret;
    return $ret;
}
Beispiel #9
0
function html_menu($p, $o, $rid)
{
    $j = $rid . '_plug__2_html_html*j___inp';
    $sj = 'SaveJ(\'' . $j . '\')';
    $ret = divc('" onkeyup="' . $sj . '" onclick="' . $sj, txarea('inp', $p, 60, 10, atc('console'))) . ' ';
    //$ret.=lj('',$j,picto('reload'));
    return $ret;
}
Beispiel #10
0
function uds_btn($r)
{
    if ($r[5]) {
        //$lk=lka('/read/'.$r[5],picto(url)).' ';
        $lk = lj('', 'popup_site___read_' . $r[5], picto(url));
    }
    return hr() . bal('b', $r[4]) . ' (' . $r[1] . ') ' . $lk . br() . divc('justy', $r[6]);
}
Beispiel #11
0
function umwords_menu($p, $o, $rid)
{
    $ratio = 50;
    $n = sql('count(id)', 'qda', 'v', 'nod="ummo"');
    $n = ceil($n / $ratio);
    for ($i = 0; $i < $n; $i++) {
        $ret .= lj('', $rid . '_plug__3_umwords_umwords*build*liaisons_' . $i, $i) . ' ';
    }
    return divc('nbp', $ret);
}
Beispiel #12
0
function np_sav($d, $id)
{
    $ret = hidden('', 'cka', 'm' . $d);
    for ($i = 1; $i <= 9; $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', nms(57));
    $ret .= lj('', 'popup_plup___pad_pad*write___' . $id . '', picto('export'));
    return divc('nb_pages', divd('memnu', $ret . hlpbt('memstorage')));
}
Beispiel #13
0
function pet_confirm($r, $nod, $id)
{
    $arr = $r[$_GET['confirm']];
    if ($arr[6] == 1) {
        return pet_hlp('alert_exists');
    } else {
        $arr[6] = 1;
    }
    modif_vars('users', $nod, $arr, $_GET['confirm']);
    return divc('txtalert', pet_hlp('confirm_after')) . br();
}
Beispiel #14
0
function plug_deploy($deploy)
{
    $qb = $_SESSION['qb'];
    $USE = $_SESSION['USE'];
    $raed = suj_of_id($deploy);
    $nl = $_GET['nl'] ? $_GET['nl'] : "nl";
    if ($deploy && $USE) {
        //prep
        list($qauth, $subj) = sql('name,suj', 'qda', 'r', 'id="' . $deploy . '"');
        $msg = sql('msg', 'qdm', 'v', 'id="' . $deploy . '"');
        if ($USE == $qauth or auth(5)) {
            $http = host();
            if (!$_POST['dpl']) {
                reqp('mail');
                $qmail = mail_list_tosend();
                $ret .= form("/?read={$deploy}&deploy={$deploy}&nl=nlb", txarea('dpl" maxlength="1000', $qmail, 40, 10) . br() . checkbox("dpf", "ok", "html", 1) . checkbox("multiple", "ok", "each_one", 1) . input2('submit', "send", nms(50), 'popbt'));
            } else {
                $htacc = urlread($deploy);
                $_SESSION['nl'] = $nl;
                //deploy
                if ($_POST['dpf'] == "ok") {
                    $mail_format = "html";
                    $txt = format_txt($msg, $nl, $deploy);
                    $txt = html_entity_decode($txt);
                    $txt = str_replace('href="/', 'href="' . $http . '/', $txt);
                    $msg = lkc("", $http . $htacc, bal("h2", $subj));
                    $msg .= divc("panel justy", $txt);
                } else {
                    $mail_format = "txt";
                    $msg = clean_internaltag($msg);
                    $msg = html_entity_decode($msg);
                }
                $_SESSION['nl'] = "";
                //send
                $sender = sql('mail', 'qdu', 'v', 'name="' . $USE . '"');
                $lstm = str_replace("\n", ",", $_POST['dpl']);
                $lstm = str_replace("\r", ",", $lstm);
                $listmail = explode(",", trim($lstm));
                if ($_POST['multiple'] == "ok" && is_array($listmail)) {
                    $sentto = send_mail_r($listmail, $mail_format, $qb . ' :: ' . $raed, $msg, $sender, $htacc);
                } else {
                    $sentto = $_POST['dpl'];
                    $vm = str_replace(array(",", ";", "\n", " "), ",", $sentto);
                    send_mail($mail_format, $vm, $qb . ' :: ' . $raed, $msg, $sender, $htacc);
                }
                $ret .= lkc("popbt", '/?read=' . $deploy, 'article ' . $deploy . ' sent to: ' . $sentto);
            }
        } else {
            $ret .= btn("popdel", "forbidden");
        }
    }
    //if($_POST['dpl'])return $ret;
    return $ret;
}
Beispiel #15
0
 static function menu($p, $o, $rid)
 {
     $ret = inp('inp', $p ? $p : 1) . ' ';
     $ret .= lj('', $rid . '_app___slides_j__' . $rid . '_inp', picto('reload')) . ' ';
     if (auth(6)) {
         $ret .= lj('', 'popup_plupin___msqedit_slides*' . $p . '_val', picto('edit')) . ' ';
         $j = 'popup_msqledit___users_' . ajx(ses('nodslid')) . '_';
         $ret .= lj('', $j . $p . '_1', picto('editxt')) . ' ';
         $ret .= lj('', 'popup_plup___msqedit_msqdt*add_slides*' . $p . '_val', picto('add')) . ' ';
     }
     return divc('', $ret);
 }
Beispiel #16
0
function ascoo($a)
{
    $s = array('', '_', '¦', '¯');
    $q = array('a' => '111202212202', 'b' => '111202231212', 'c' => '111200200211', 'd' => '110202202213', 'e' => '111202230211', 'f' => '111200230200', 'g' => '111202332111', 'h' => '111202233202', 'i' => '100200200200', 'j' => '001002003110', 'k' => '', 'l' => '', 'm' => '', 'n' => '', 'o' => '', 'p' => '', 'q' => '', 'r' => '', 's' => '', 't' => '', 'u' => '', 'v' => '', 'w' => '', 'x' => '', 'y' => '', 'z' => '', '0' => '', '1' => '', '2' => '', '3' => '', '4' => '', '5' => '', '6' => '', '7' => '', '8' => '', '9' => '', '-' => '', '!' => '', '?' => '', '.' => '');
    $r = str_split($q[$a]);
    for ($i = 0; $i < 12; $i++) {
        $ret .= $s[$r[$i]];
        if ($i == 2 or $i == 5) {
            $ret .= br();
        }
    }
    return divc('imgl', $ret);
}
Beispiel #17
0
function msqlxread()
{
    $page = $_GET['page'] ? $_GET['page'] : 1;
    $npg = 10;
    require 'plug/microxml.php';
    $min = ($page - 1) * $npg;
    $max = $page * $npg;
    $i = 0;
    $site = 'http://philum.net';
    //$site=philum();//father_server
    $r = clkt($site . '/msql/clients/philum_tickets');
    unset($r['_menus_']);
    if ($r) {
        foreach ($r as $k => $v) {
            //array('host','hub','msg','day','ip')
            if ($v[0] == $_SERVER['HTTP_HOST'] && $v[1] == ses('qb')) {
                $del = lj('txtyl', 'tickets_plug___tickets_tickets*j_' . $k . '_x', 'x');
            } else {
                $del = '';
            }
            $answ = ljb('popbt', 'jumpMenu_text', 'tckansw_' . ($v[5] ? $v[5] : $k), nms(91));
            $rb[$k] .= btn('txtsmall2', $v[3]) . ' ';
            $rb[$k] .= lkc('txtsmall', 'http://' . $v[0] . '/' . $v[1], $v[1]) . ' ';
            if (!$v[5]) {
                $rb[$k] .= $answ . ' ';
            }
            $rb[$k] .= $del . br();
            $msg = $v[2];
            if (!function_exists('correct_txt')) {
                req('tri,pop,spe');
            }
            //$msg=correct_txt($msg,'','sconn');
            if ($i >= $min && $i < $max) {
                $msg = miniconn($msg);
            }
            $i++;
            $rb[$k] .= divc('" style="width:400px;', nl2br(stripslashes($msg))) . br();
            if ($v[5]) {
                $rb[$v[5]] .= div(ats('margin-left:40px;'), $rb[$k]);
                unset($rb[$k]);
            }
        }
    }
    if ($rb) {
        rsort($rb);
    }
    return by_pages($rb, $page);
}
Beispiel #18
0
function stx_files($nd, $tx)
{
    $r = msq_choose('', $nd, 'txt');
    if ($r) {
        asort($r);
    }
    $ret = lj('txtbox', 'pop_plup___stext_stx*files_' . $nd . '_' . $tx, picto('reload')) . br();
    if ($r) {
        foreach ($r as $k => $i) {
            $rb = msql_read('', $nd . '_txt_' . $i, '1');
            if ($rb) {
                $ret .= $i . ': ' . ljb($cs, 'notepad_open', $nd . '_txt_' . $i . '_' . $tx, $rb[0]) . br();
            }
        }
    }
    return divc('nbp', $ret);
}
Beispiel #19
0
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));
}
Beispiel #20
0
function plug_login($p)
{
    req('pop');
    //return loged_j($_SESSION["USE"],$_SESSION["iq"],$t,10);
    $w = '.' . $_SERVER['HTTP_HOST'];
    $in .= divc('popbt', helps('new_user')) . br();
    $in .= balise("input", array(1 => "text", 2 => "user", 3 => "lgg", 8 => "log_finger('lgg');"), "") . ' ';
    if ($_SESSION["prmb"][11] > 5) {
        $in .= balise("label", array("for" => 'login', 6 => 15), $w) . br();
    } else {
        $in .= btn('" id="valid', nms(135)) . br() . br();
    }
    $in .= balise("input", array(1 => "text", 2 => "pass"), "") . ' ';
    $in .= balise("label", array("for" => 'pass', 6 => 15), nms(137)) . br() . br();
    $in .= balise("input", array(1 => "text", 2 => "mail"), "") . ' ';
    $in .= balise("label", array("for" => 'mail', 6 => 15), nms(136)) . br() . br();
    $in .= submitj('txtx', "login", nms(57));
    return '<form id="login" method="post" action="" onKeyPress="checkEnter(event,\'login\')">' . $in . ' </form>';
}
Beispiel #21
0
function plug_cards()
{
    req('pop');
    $data = sql('msg', 'qdm', 'v', 'id="' . $_GET['cards'] . '"');
    $data = str_replace('[cards:plug]', '', $data);
    $obj = format_txt($data, 3, $_SESSION['read']);
    $obj = nl2br($obj);
    $size = msql_read('system', 'edition_cards', '');
    //p($size);
    $styl = '" style="float:left; width:' . $size['card_width'] . 'px; height:' . $size['card_height'] . 'px; margin:' . $size['card_margin'] . 'px; border:' . $size['card_border'] . ';';
    for ($i = 0; $i < 10; $i++) {
        $ret .= divc($styl, $obj);
    }
    if ($_GET['cards']) {
        Head::add('csscode', '/css/' . $_SESSION['qb'] . '_design_' . $_SESSION['prmd'] . '.css');
        return divc('" style="width:' . $size['page_width'] . 'px; padding:' . $size['page_padding'] . 'px;', $ret);
    } else {
        return lkt('txtx', '/plug/cards.php?cards=' . $_SESSION['read'], 'open');
    }
}
Beispiel #22
0
function coremap($p = '', $o = '', $res = '')
{
    list($p, $o) = ajxp($res, $p, $o);
    $r = sql_b('select name from _sys', 'rv');
    //p($r);
    if (!$r or !$p) {
        return;
    }
    $ra = core_map($r, $p);
    //pr($ra);
    $rb = cm_parents_r($p);
    //pr($rb);
    //$rc=cm_orph($r,$p); p($rc);
    $n = count($ra);
    $ret .= divc('txtcadr', $p . ': ' . $n . ' dependencie' . ($n > 1 ? 's' : ''));
    $ret .= make_div_r($ra) . br();
    $n = count($rb);
    $ret .= divc('txtcadr', $p . ': ' . $n . ' parent' . ($n > 1 ? 's' : ''));
    $ret .= make_div_r($rb);
    return $ret;
}
Beispiel #23
0
function plug_menu($d, $p, $o, $dr)
{
    if ($dr) {
        $dr = '/' . $dr;
    }
    //$ret.=li(lien('txtsmall','/plug/index',picto('phi')));
    $ret .= popbub('plug', 'plugin', picto('phi2'), 'd', 1);
    //$ret.=llj('','popup_plup___plug_plug*slct',picto('list'));
    $ret .= li(lkc('txtsmall', host() . '/plug/' . $d . ($p ? '/' . $p : '' . ($o ? '/' . $o : '')), picto('reload')));
    $ret .= li(call_plug('txtsmall', 'popup', 'codeview', 'plug' . $dr . '_' . ajx($d), picto('conn')));
    //source
    if (auth(3)) {
        $ret .= msqlink('system', 'program_plugs') . ' ';
    }
    $ret .= plug_hlp($d);
    if (auth(4)) {
        $ret .= lj('', 'popup_editmsql___system/program*plugs_' . ajx($d) . '__1', picto('edit')) . ' ';
        $ret .= lj('', 'popup_editmsql___lang/fr/program*plugs_' . ajx($d) . '__1', picto('flag')) . ' ';
    }
    return mkbub($ret, 'inline', '', 'this.style.zIndex=popz+1;') . divc('admnu', '');
}
Beispiel #24
0
function arts_menus($dya, $dyb)
{
    $cs = 'txtblc';
    $ret .= divc('txtcadr', 'build_pdf_book') . br();
    $dya = $dya ? $dya : time();
    $dyb = $dyb ? $dyb : 0;
    $sq = 'WHERE nod="' . $_SESSION['qb'] . '" and day<' . $dya . ' and day>' . $dyb . ' AND re="1"';
    $rq = sq('id,frm,thm,day', 'qda', $sq);
    while ($data = mysql_fetch_array($rq)) {
        $dt['cat'][ajx($data['frm'], '')] += 1;
        //$tags=explode(',',ajx($data['thm'],''));
        //foreach($tags as $k=>$v){$dt['tag'][ltrim($v)]+=1;}//tri_tags($r)
        if ($data['day'] < $mind) {
            $mind = $data['day'];
        }
        if ($data['day'] > $maxd) {
            $maxd = $data['day'];
        }
    }
    $ret .= 'from ' . input2('text', '" id="dyb', date('d/m/Y', $mind), $cs) . ' ';
    $ret .= 'to ' . input2('text', '" id="dya', date('d/m/Y', $maxd), $cs) . br() . br();
    if ($dt['cat']) {
        $cts = implode('|', array_keys_b($dt['cat']));
    }
    //if($dt['tag'])$tgs=implode('|',array_keys_b($dt['tag']));
    $ret .= 'cats: ' . input2('text', '" id="cts', '', $cs) . ' ';
    $ret .= jump_btns('cts', $cts, ',') . br();
    $ret .= 'no-cats: ' . input2('text', '" id="nct', '', $cs) . ' ';
    $ret .= jump_btns('nct', $cts, ',') . br();
    $ret .= 'tags: ' . input2('text', '" id="tgs', '', $cs) . ' ';
    $ret .= jump_btns('tgs', $tgs, ',') . br();
    $ret .= 'no-tags: ' . input2('text', '" id="ntg', '', $cs) . ' ';
    $ret .= jump_btns('ntg', $tgs, ',') . br();
    $ret .= 'order: ' . input2('text', '" id="ord', '', $cs) . ' ';
    $ret .= jump_btns('ord', 'ASC|DESC', '') . br();
    $ret .= ljb('txtbox', 'SaveJ', 'call_plug___pdf_build*call___dya|dyb|cts|nct|tgs|ntg|ord', 'call');
    return $ret . br() . br();
}
Beispiel #25
0
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);
}
Beispiel #26
0
function chatread($p)
{
    $nm = ses('muse');
    $c = 'txtsmall';
    $r = chatdata($p);
    if ($r) {
        $r = array_reverse_b($r, 50);
        foreach ($r as $k => $v) {
            $erz = '';
            $msg = $v[2];
            if ($nm == $v[1] or auth(6)) {
                $erz = lj($c, 'cht' . $p . '_chat___chaterz_' . $p . '_' . $k, '(x)');
            }
            $bt = btn('popbt', $v[1]) . ' ' . btn($c . '2', mkday($v[0], 'dhi')) . $erz . br();
            if (!function_exists('miniconn')) {
                req('tri,pop,spe');
            }
            $msg = miniconn($msg);
            $ret .= divc('track', $bt . $msg);
        }
    }
    return scroll($r, $ret, 7);
}
Beispiel #27
0
function comptxt_j($p, $o, $res = '')
{
    $r = ajxr($res);
    $txt1 = html_entity_decode($r[0]);
    $txt2 = html_entity_decode($r[1]);
    if ($p == 'sentences') {
        $s = '.';
    } elseif ($p == 'lines') {
        $s = '\\n';
    } else {
        $s = ' ';
    }
    $r1 = explode($s, $txt1);
    $r2 = explode($s, $txt2);
    $arr = array_diff($r1, $r2);
    $ret = divc('txtalert', 'résultat: ' . count($arr) . ' différences') . br();
    if ($arr) {
        foreach ($arr as $k => $v) {
            $ret .= $v . ':' . $r2[$k] . hr();
        }
    }
    return $ret;
}
Beispiel #28
0
function stat_read($c, $n)
{
    $r = sql('day,' . $c, 'qds', 'kv', 'qb="' . ses('qb') . '" and day>"' . date('ymd', calc_date($n)) . '"');
    //$rv=sql('iq','qdv2','k','qb="'.ses('qb').'" and time>"'.calc_date($n).'"');
    $w = ses('stw') ? ses('stw') : 550;
    $h = ses('sth') ? ses('sth') : 100;
    if ($r) {
        $n = array_sum($r);
        //if($c=='nbu')$n=count($rv); else
        $score = divc('panel', 'Total of ' . ($c == 'nbv' ? 'views pages' : 'visitors') . ': ' . $n);
        return graph_mk($r, $w, $h) . br() . $score;
    }
}
Beispiel #29
0
function pagup($d)
{
    $x = ljb('', 'Close', 'popup', picto('close'));
    return divc('popup', $x . divd('popu', $d));
}
Beispiel #30
0
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');
}