Exemplo n.º 1
0
Arquivo: tri.php Projeto: philum/cms
function clean_prespace($ret)
{
    $ret = str_replace("\t", "", $ret);
    //$ret=str_replace("\r","\n",$ret);
    $ret = str_replace(" ", " ", $ret);
    $ret = str_replace(html_entity_decode(" "), " ", $ret);
    $ret = str_replace(" ", " ", $ret);
    $ret = str_replace("\n ", "\n", $ret);
    $ret = str_replace(" \n", "\n", $ret);
    //$ret=str_replace("« ?","« ",$ret);
    //$ret=str_replace("? »"," »",$ret);
    //$ret=htmlspecialchars($ret);
    if (rstr(9)) {
        $ret = str_replace(".jpg]\n", ".jpg]", $ret);
        $ret = str_replace(".gif]\n", ".gif]", $ret);
        $ret = str_replace(".png]\n", ".png]", $ret);
    }
    $ret = str_replace("[--]\n", "\n[--]", $ret);
    $ret = mb_ereg_replace("[ ]{2,}", " ", $ret);
    $ret = clean_firstspace($ret);
    return $ret;
}
Exemplo n.º 2
0
Arquivo: ajax.php Projeto: philum/cms
 case "conn":
     req('pop,spe,art,tri,mod');
     $ret = format_txt_r($id, $va, $opt);
     break;
 case "conn2":
     req('pop,spe,art,tri,mod');
     $ret = sql('msg', 'qdm', 'v', 'id=' . $id);
     $ret = format_txt($ret, 'nl', $id);
     $ret = str_replace('</p>', "</p>\n", $ret);
     break;
 case "delconn":
     req('tri');
     $rt = sql('msg', 'qdm', 'v', 'id=' . $id);
     $rt = html_entity_decode($rt, true, $_SESSION['enc']);
     $ret = correct_txt($rt, '', 'delconn');
     $ret = clean_firstspace($ret);
     break;
 case "navs":
     $ret = navs($id);
     if (!$va) {
         $tt = $id;
     }
     $s = 500;
     break;
 case "vmail":
     $ret = vmail($id);
     $t = 'mail article:' . $id;
     $s = 320;
     break;
 case "vmailsend":
     req('pop,spe,tri,mod');
Exemplo n.º 3
0
Arquivo: twit.php Projeto: philum/cms
function twit_vacuum($f)
{
    $p = strrchr_b($f, '/');
    require_once 'plug/tiers/Twitter.php';
    $t = new Twitter();
    $q = $t->read($p);
    $r = twit_datas($q);
    setlocale(LC_TIME, prmb(25) . '_' . strtoupper(prmb(25)));
    //$ret['from']='@'.$q['user']['screen_name'];
    $ret['suj'] = strftime('%H:%M - %d %b %Y', strtotime($q['created_at']));
    $ret['day'] = $q['created_at'];
    $ret['msg'] = clean_firstspace($r['text']);
    if ($q['entities']['media']) {
        foreach ($q['entities']['media'] as $v) {
            $ret['msg'] .= "\n\n" . '[' . $v['media_url_https'] . ']';
        }
    }
    if ($r['reply-to_id']) {
        $q = $t->read($r['reply-to_id']);
        $r = twit_datas($q);
        $answtxt = ucfirst(nms(91)) . ' ' . nms(36);
        $ret['msg'] .= "\n\n" . $answtxt . ' [' . $q['id'] . '§' . $r['name'] . ':poptwit]';
    }
    return array($ret['suj'], $ret['msg'], $ret['day']);
}