当前位置: 首页>>代码示例>>PHP>>正文


PHP format_txt函数代码示例

本文整理汇总了PHP中format_txt函数的典型用法代码示例。如果您正苦于以下问题:PHP format_txt函数的具体用法?PHP format_txt怎么用?PHP format_txt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了format_txt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: prep_msg

function prep_msg($id)
{
    $msg = sql('msg', 'qdm', 'v', 'id=' . $id);
    $msg = html_entity_decode($msg);
    if (strpos($msg, ':import') or strpos($msg, ':read')) {
        $msg = strip_tags(format_txt($msg, $id, 3));
    } else {
        $msg = clean_internaltag($msg);
    }
    $msg = strtolower(eradic_acc($msg));
    $msg = deln($msg, ' ');
    $msg = str_replace(" ", " ", $msg);
    return $msg;
}
开发者ID:philum,项目名称:cms,代码行数:14,代码来源:meta.php

示例2: ummoay_build

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);
}
开发者ID:philum,项目名称:cms,代码行数:29,代码来源:umtag.php

示例3: plug_deploy

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;
}
开发者ID:philum,项目名称:cms,代码行数:54,代码来源:deploy.php

示例4: sugg_import

function sugg_import($f, $o = '', $res = '')
{
    list($f, $o) = ajxp($res, $f, $o);
    if (substr($f, 0, 4) != 'http') {
        return;
    }
    req('tri,pop');
    $_GET['urlsrc'] = $f;
    list($suj, $msg) = vacuum($f, '');
    $msg = format_txt($msg, '', '');
    $ret = balc('h2', '', clean_title($suj)) . br() . $msg;
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:13,代码来源:suggest.php

示例5: plug_cards

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');
    }
}
开发者ID:philum,项目名称:cms,代码行数:20,代码来源:cards.php

示例6: json_encode_r

function json_encode_r($r)
{
    $r1 = array('ib', 'day', 'mail', 'frm', 'suj', 'img', 'nod', 'thm', 'name', 'lu', 're', 'host', 'msg');
    $r2 = array('parent', 'time', 'url', 'category', 'title', 'image', 'hub', 'unused', 'admin', 'views', 'priority', 'length', 'content');
    if ($r) {
        foreach ($r as $k => $v) {
            $re = '';
            foreach ($v as $ka => $va) {
                if ($ka == 'msg') {
                    $va = htmlentities(format_txt($va, 'nl', ''));
                }
                $ka = str_replace($r1, $r2, $ka);
                $re[] = '"' . $ka . '":"' . addslashes($va) . '"';
            }
            $ret[] = '"' . $k . '":{' . implode(',', $re) . '}';
        }
    }
    if ($ret) {
        return utf8_encode('{' . implode(',', $ret) . '}');
    }
}
开发者ID:philum,项目名称:cms,代码行数:21,代码来源:api.php

示例7: flux_xml

function flux_xml($main, $preview)
{
    $http = host();
    foreach ($main as $k => $v) {
        if ($v[1] != "user" && $v[7] != "") {
            $url = $http . htacc('read') . $k;
            if ($preview) {
                $msg = sql('msg', 'qdm', 'v', 'id="' . $k . '"');
                $msg = correct_txt($msg, 'b i h c l /2 /3', 'corrfast');
                if ($preview != "full") {
                    $msg = substr($msg, 0, kmax_nb(400, $msg));
                }
                $msg = format_txt($msg, "nlc", $k);
                $msg = parse_msg_xml($msg);
            }
            $gmi = $http . '/imgc/' . $v[3];
            if ($gmi && $preview) {
                $gmo = '<img src="' . $gmi . '" style="margin:0 10px 4px 0;" />' . "\n";
                $gmo = parse_msg_xml($gmo);
            } else {
                $gmi = "";
                $gmo = "";
            }
            $lang = data_val('msg', $k, 'lang');
            $xml .= "<item>\n";
            $v[2] = str_replace("&nbsp;", ' ', $v[2]);
            $xml .= bal('title', parse_msg_xml($v[2])) . "\n";
            $xml .= bal('link', $url) . "\n";
            $xml .= bal('category', parse_msg_xml($v[1])) . "\n";
            $xml .= balb('guid', ' isPermaLink="true"', $url) . "\n";
            $xml .= bal('pubDate', date("r", $v[0])) . "\n";
            $xml .= bal('description', $gmo . $msg) . "\n";
            $xml .= bal('author', $author) . "\n";
            $xml .= bal('language', $lang ? $lang : $_SESSION['prmb'][25]) . "\n";
            $xml .= "</item>" . "\n\n";
        }
    }
    return $xml;
}
开发者ID:philum,项目名称:cms,代码行数:39,代码来源:rss.php

示例8: format_txt

     $_POST['name'] = format_txt($_POST['name']);
 }
 if (isset($_POST['firstname'])) {
     $_POST['firstname'] = format_txt($_POST['firstname']);
 }
 if (isset($_POST['email'])) {
     $_POST['email'] = trim($_POST['email']);
 }
 if (isset($_POST['date_birth'])) {
     $_POST['date_birth'] = format_txt($_POST['date_birth']);
 }
 if (isset($_POST['description'])) {
     $_POST['description'] = format_txt($_POST['description']);
 }
 if (isset($_POST['login_member'])) {
     $_POST['login'] = format_txt($_POST['login_member']);
 }
 # we check datas
 if (!isset($_POST['name']) or $_POST['name'] == "") {
     $page['erreur'][$nb_erreur]['message'] = $lang['member']['E_empty_name'];
     $nb_erreur++;
 }
 if (!isset($_POST['firstname']) or $_POST['firstname'] == "") {
     $page['erreur'][$nb_erreur]['message'] = $lang['member']['E_empty_firstname'];
     $nb_erreur++;
 }
 # email
 if (!isset($_POST['email']) or empty($_POST['email'])) {
     $page['erreur'][$nb_erreur]['message'] = $lang['member']['E_empty_email'];
     $nb_erreur++;
 } elseif (!check_email($_POST['email'])) {
开发者ID:jkreska,项目名称:test1,代码行数:31,代码来源:registration.php

示例9: send_track_to_user

function send_track_to_user($id)
{
    $sender = $_SESSION['qbin']['adminmail'];
    //i.
    list($name, $day, $idt, $msg) = sql('name,day,frm,msg', 'qdi', 'r', 'id=' . $id);
    $by = helps('trackmail');
    $msg = format_txt($msg, '', $idt) . "\n\n";
    $msg = nl2br($by . "\n\n" . 'By: ' . $name . ', ' . mkday($day) . "\n\n" . $msg);
    $suj = sql('suj', 'qda', 'v', 'id=' . $idt);
    $rmails = sql('mail', 'qdi', 'k', 'frm="' . $idt . '"');
    if ($rmails) {
        $r = array_keys_b($rmails);
    }
    if ($r) {
        send_mail_r($r, 'html', $suj, $msg, $sender, $id);
    }
}
开发者ID:philum,项目名称:cms,代码行数:17,代码来源:spe.php

示例10: format_txt

     $_POST['title'] = format_txt($_POST['title']);
 }
 if (isset($_POST['subtitle'])) {
     $_POST['subtitle'] = format_txt($_POST['subtitle']);
 }
 if (isset($_POST['keyword'])) {
     $_POST['keyword'] = format_txt($_POST['keyword']);
 }
 if (isset($_POST['summary'])) {
     $_POST['summary'] = addslashes($_POST['summary']);
 }
 if (isset($_POST['text'])) {
     $_POST['text'] = addslashes($_POST['text']);
 }
 if (isset($_POST['ps'])) {
     $_POST['ps'] = format_txt($_POST['ps']);
 }
 /* verification des infos */
 if (!isset($_POST['status']) or $_POST['status'] == "") {
     $page['erreur'][$nb_erreur]['message'] = $lang['news']['E_empty_status'];
     $nb_erreur++;
 }
 if (!isset($_POST['title']) or $_POST['title'] == "") {
     $page['erreur'][$nb_erreur]['message'] = $lang['news']['E_empty_title'];
     $nb_erreur++;
 }
 if (!isset($_POST['idurl']) or $_POST['idurl'] == "") {
     $page['erreur'][$nb_erreur]['message'] = $lang['news']['E_empty_idurl'];
     $nb_erreur++;
 } else {
     $sgbd = sql_connect();
开发者ID:jkreska,项目名称:test1,代码行数:31,代码来源:form_news.php

示例11: format_txt

    $page['show_form'] = 1;
} else {
    $page['show_form'] = '';
    $page['L_message'] = $lang['general']['acces_reserve_admin'];
}
/* modification ou add */
if (isset($_POST['submit']) and !empty($_POST['submit'])) {
    /* we format datas */
    if (isset($_POST['idurl'])) {
        $_POST['idurl'] = format_txt($_POST['idurl']);
    }
    if (isset($_POST['title'])) {
        $_POST['title'] = format_txt($_POST['title']);
    }
    if (isset($_POST['keyword'])) {
        $_POST['keyword'] = format_txt($_POST['keyword']);
    }
    if (isset($_POST['summary'])) {
        $_POST['summary'] = addslashes($_POST['summary']);
    }
    if (isset($_POST['text'])) {
        $_POST['text'] = addslashes($_POST['text']);
    }
    /* verification des infos */
    if (!isset($_POST['title']) or $_POST['title'] == "") {
        $page['erreur'][$nb_erreur]['message'] = $lang['information']['E_empty_title'];
        $nb_erreur++;
    }
    if (!isset($_POST['status']) or $_POST['status'] == "") {
        $page['erreur'][$nb_erreur]['message'] = $lang['information']['E_empty_status'];
        $nb_erreur++;
开发者ID:jkreska,项目名称:test1,代码行数:31,代码来源:form_page.php

示例12: format_txt

     $_POST['name'] = format_txt($_POST['name']);
 }
 if (isset($_POST['firstname'])) {
     $_POST['firstname'] = format_txt($_POST['firstname']);
 }
 if (isset($_POST['email'])) {
     $_POST['email'] = trim($_POST['email']);
 }
 if (isset($_POST['comment'])) {
     $_POST['comment'] = format_txt($_POST['comment']);
 }
 if (isset($_POST['description'])) {
     $_POST['description'] = format_txt($_POST['description']);
 }
 if (isset($_POST['place_birth'])) {
     $_POST['place_birth'] = format_txt($_POST['place_birth']);
 }
 if (isset($_POST['login_member'])) {
     $_POST['login'] = $_POST['login_member'];
 }
 if (isset($_POST['size'])) {
     $_POST['size'] = $_POST['size'];
 }
 # we check datas
 if (!isset($_POST['name']) or $_POST['name'] == "") {
     $page['erreur'][$nb_erreur]['message'] = $lang['member']['E_empty_name'];
     $nb_erreur++;
 }
 if (!isset($_POST['firstname']) or $_POST['firstname'] == "") {
     $page['erreur'][$nb_erreur]['message'] = $lang['member']['E_empty_firstname'];
     $nb_erreur++;
开发者ID:jkreska,项目名称:test1,代码行数:31,代码来源:form_member.php

示例13: friend_rub

function friend_rub($o)
{
    $id = id_of_suj($_SESSION['frm']);
    $ok = sql('id', 'qda', 'v', 'id=' . $id . ' and re>"0"');
    $ret = sql('msg', 'qdm', 'v', 'id=' . $id);
    if (auth(4)) {
        $bt = popart($id);
    }
    if ($ok) {
        return $bt . divc($o, format_txt($ret, '', ''));
    }
}
开发者ID:philum,项目名称:cms,代码行数:12,代码来源:mod.php

示例14: format_txt

 $page['data'][$i]['mod'] = $i % 2;
 $page['data'][$i]['checked_import'] = '';
 $page['data'][$i]['checked_merge'] = '';
 $page['data'][$i]['checked_dont_import'] = '';
 if ($_POST['action'][$i] == 'import') {
     $page['data'][$i]['checked_import'] = 'checked="checked"';
 }
 if ($_POST['action'][$i] == 'merge') {
     $page['data'][$i]['checked_merge'] = 'checked="checked"';
 }
 if ($_POST['action'][$i] == 'dont_import') {
     $page['data'][$i]['checked_dont_import'] = 'checked="checked"';
 }
 for ($j = 0; $j < $nb_column; $j++) {
     $id = $column[$j];
     $page['data'][$i]['column'][$j]['value'] = format_txt($_POST['data'][$i][$j]);
     $page['data'][$i]['column'][$j]['i'] = $i;
     $page['data'][$i]['column'][$j]['j'] = $j;
     $page['data'][$i]['column'][$j]['value_list'] = array();
     $page['data'][$i]['column'][$j]['show_value'] = '';
     if ($id == "weather_id") {
         $z = 0;
         $page['data'][$i]['column'][$j]['L_choose'] = $lang['match']['choose_weather'];
         foreach ($weather_list as $id_weather => $value) {
             $page['data'][$i]['column'][$j]['value_list'][$z]['id'] = $id_weather;
             $page['data'][$i]['column'][$j]['value_list'][$z]['value'] = $value;
             if ($id_weather == $_POST['data'][$i][$j]) {
                 $page['data'][$i]['column'][$j]['value_list'][$z]['selected'] = 'selected="selected"';
             } else {
                 $page['data'][$i]['column'][$j]['value_list'][$z]['selected'] = '';
             }
开发者ID:jkreska,项目名称:test1,代码行数:31,代码来源:import_match.php

示例15: book_read

function book_read($id, $rid)
{
    bk_rq();
    curwidth_set($_SESSION['prma']['content'] - 60);
    //[120:setwidth]
    $p['back'] .= book_prevnxt($id, $rid);
    $p['id'] = $id;
    $r = pecho_arts($id);
    $p['date'] = mkday($r[0], 1);
    $p['title'] = $r[2];
    $p['opt'] = $r[1];
    $p['tag'] = $r[5];
    $p['length'] = art_length($r[8]);
    //$p['length'].=' '.lka(urlread($id),picto('articles'));
    $p['length'] .= ' ' . popart($id);
    $msg = sql('msg', 'qdm', 'v', 'id=' . $id);
    $msg = format_txt($msg, 'nlb', $id);
    $p['player'] = book_pages($id, $rid);
    $p['msg'] = scroll_c($msg, $rid);
    $ret .= template($p, 'book');
    $_SESSION['cur_div'] = 'content';
    //setwidth in template
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:24,代码来源:book.php


注:本文中的format_txt函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。