Exemple #1
0
function ummoay_msg($msg)
{
    $msg = correct_br($msg);
    $msg = miniconn($msg);
    $msg = correct_txt($msg, '', 'sconn');
    $msg = embed_p($msg);
    $msg = nl2br($msg);
    return $msg;
}
Exemple #2
0
function readerurl($a, $b, $f)
{
    $f = ajxg($f);
    req('tri,pop');
    if ($f) {
        list($suj, $ret, $rec, $defid, $defs) = vacuum($f, '');
    }
    $ret = format_txt_r($ret, '3', '');
    $ret = nl2br(embed_p($ret));
    return bal('h2', $suj) . $ret;
}
Exemple #3
0
function format_txt($ret, $media, $id)
{
    if (strpos($ret, '<')) {
        $ret = retape_html($ret);
    }
    if (rstr(70)) {
        $ret = retape($ret, $id);
    }
    if (!rstr(13)) {
        $ret = correct_br($ret);
    }
    $ret = format_txt_r($ret, $media, $id);
    if (rstr(13)) {
        $ret = embed_p($ret);
    }
    $ret = nl2br($ret);
    return $ret;
}
Exemple #4
0
function tracks_read($id, $page = '', $n = '')
{
    $USE = $_SESSION['USE'];
    $qb = $_SESSION['qb'];
    $read = $_SESSION['read'];
    $ip = hostname();
    $panout['css'] = 'track';
    $panout['sty'] = 'margin:8px 0;';
    if ($id) {
        $panout['id'] = $id;
        list($ib, $name, $mail, $day, $nod, $frm, $suj, $msg, $re, $lu, $img, $thm, $host) = sql('ib,name,mail,day,nod,frm,suj,msg,re,lu,img,thm,host', 'qdi', 'r', 'id=' . $id);
    }
    $panout['date'] = mkday($day, 'y/m/d H:i');
    //time_ago($day);
    $panout['edit'] .= lj('', 'popup_track___' . $read . '_[' . $id . ':track]', picto('get')) . ' ';
    if ($re == "0" && $host == $ip) {
        $panout['sty'] .= 'opacity:0.5;';
        $panout['edit'] .= btn('txtsmall', helps('trackbacks')) . ' ';
    }
    if ($_GET['admin']) {
        $purl = '/?admin=' . $_GET['admin'];
    }
    if ($_GET['read']) {
        $purl = '/?read=' . $_GET['read'];
    }
    if ($host == $ip && $_SESSION['dayx'] - $day < 600 or auth(6)) {
        //redit
        $panout['edit'] .= lj('', 'popup_trkedit___' . $id, picto('edit')) . ' ';
    }
    $sender = rse("id", $_SESSION['qdu'] . ' WHERE name="' . $name . '"');
    if ($sender) {
        $panout['author'] = lj('', 'popup_track___' . $name, $name);
    } elseif ($mail != 'mail') {
        $panout['author'] = lj('', 'popup_plupin___mail_' . $mail, $name);
    } else {
        $panout['author'] = $name;
    }
    if (substr($suj, 0, 4) != "hide" or $_GET['idy_show'] == $id) {
        $state = "hide";
        $f = 'imgb/avatar_' . $name . '.gif';
        //avat
        if (is_file($f)) {
            $panout['avatar'] .= image($f, 48, 48, ats('vertical-align:bottom;'));
        }
        if ($re != "0" or auth(3) or $host == $ip) {
            //$msg=format_txt($msg,'','');
            $msg = correct_br($msg);
            $msg = miniconn($msg);
            $msg = correct_txt($msg, '', 'sconn');
            $msg = embed_p($msg);
            $msg = nl2br($msg);
        } else {
            $msg = divc('txtalert', helps('trackbacks'));
        }
    } else {
        $state = 'show';
        $msg = '';
    }
    if (auth(4) && $frm != $qb) {
        $j = 'trk' . $id . '_plug___tracks_trk*publish_' . $id;
        if ($re != 1) {
            $panout['edit'] .= lj('txtyl', $j . '_on', nms(29)) . ' ';
        } else {
            $panout['edit'] .= lj('', $j . '_off', offon(0)) . ' ';
        }
    }
    if ((auth(4) or $USE == $name) && ($re == 0 or auth(6))) {
        $panout['edit'] .= lj('" title="' . nms(43), 'trk' . $id . '_call___sav_edit*tracks__' . $id . '', picto('trash')) . ' ';
    }
    $panout['msg'] = stripslashes($msg);
    if (substr($n, 0, 2) == "nl") {
        $http = host() . '/';
    }
    $panout['url'] = $http . htacc('read');
    return template($panout, 'tracks');
}