• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP format_txt函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: format_txt

     $_POST['comment'] = format_txt($_POST['comment']);
 }
 if (isset($_POST['score_visitor'])) {
     $_POST['score_visitor'] = format_txt($_POST['score_visitor']);
 }
 if (isset($_POST['score_home'])) {
     $_POST['score_home'] = format_txt($_POST['score_home']);
 }
 if (isset($_POST['date'])) {
     $_POST['date'] = format_txt($_POST['date']);
 }
 if (isset($_POST['hour'])) {
     $_POST['hour'] = format_txt($_POST['hour']);
 }
 if (isset($_POST['spectators'])) {
     $_POST['spectators'] = format_txt($_POST['spectators']);
 }
 # we check datas
 if (!isset($_POST['club_home']) or $_POST['club_home'] == "") {
     $page['erreur'][$nb_erreur]['message'] = $lang['match']['E_empty_club_home_match'];
     $nb_erreur++;
 }
 if (!isset($_POST['club_visitor']) or $_POST['club_visitor'] == "") {
     $page['erreur'][$nb_erreur]['message'] = $lang['match']['E_empty_club_visitor_match'];
     $nb_erreur++;
 }
 # mode club
 /*
 if(CLUB!=0 AND ((isset($_POST['club_home']) AND $_POST['club_home']!=CLUB) AND (isset($_POST['club_visitor']) AND $_POST['club_visitor']!=CLUB)))
 {
  $page['erreur'][$nb_erreur]['message']=$lang['match']['E_invalid_club_defaut']; $nb_erreur++;
开发者ID:jkreska,项目名称:test1,代码行数:31,代码来源:form_match.php


示例17: foreach

                 foreach ($tab_player as $key => $value) {
                     $values[] = "('" . $page['value_id'] . "','" . $_POST['position'][$value] . "','" . $_POST['player'][$value] . "','" . $_POST['season_player'][$value] . "','" . $_POST['number_player'][$value] . "','" . $_POST['captain_player'][$value] . "')";
                 }
                 $var['values'] = implode(", ", $values);
                 $sql_add = sql_replace($sql['team']['insert_team_player'], $var);
                 $sgbd = sql_connect();
                 sql_query($sql_add);
                 sql_close($sgbd);
             }
             # team_photo
             if ($execution and isset($_POST['photo']) and !empty($_POST['photo'])) {
                 $values = array();
                 $tab_photo = array_keys($_POST['photo']);
                 foreach ($tab_photo as $key => $value) {
                     if (!empty($_POST['photo'][$value]) or !empty($_POST['photo_description'][$value])) {
                         $values[] = "('" . $page['value_id'] . "', '" . $_POST['season'][$value] . "', '" . $_POST['photo'][$value] . "', '" . format_txt($_POST['photo_description'][$value]) . "')";
                     }
                 }
                 $var['values'] = implode(", ", $values);
                 $sql_add = sql_replace($sql['team']['insert_team_photo'], $var);
                 $sgbd = sql_connect();
                 sql_query($sql_add);
                 sql_close($sgbd);
             }
         }
     }
 } else {
     # there is some errors: we show the datas again
     if (isset($_POST['id'])) {
         $page['value_id'] = $_POST['id'];
     }
开发者ID:jkreska,项目名称:test1,代码行数:31,代码来源:form_team.php


示例18: sql_free_result

    $page['forum_name'] = $ligne['forum_name'];
    $page['forum_description'] = $ligne['forum_description'];
    sql_free_result($res_forum);
    sql_close($sgbd);
}
# formulaire d'add de message
$page['value_title'] = "";
$page['value_text'] = "";
$page['value_id'] = "";
$page['value_topic'] = "";
$page['erreur'] = array();
$page['form_action'] = convert_url("index.php?r=" . $lang['general']['idurl_forum'] . "&v1=" . $forum['forum_idurl']);
/* modification ou add */
if (isset($_POST) and !empty($_POST)) {
    /* we format datas */
    $_POST['title'] = format_txt($_POST['title']);
    $_POST['text'] = trim($_POST['text']);
    /* verification des infos */
    if (!isset($_POST['title']) or $_POST['title'] == "") {
        $page['erreur'][$nb_erreur]['message'] = $lang['forum']['E_empty_title'];
        $nb_erreur++;
    }
    if (!isset($_POST['text']) or trim(html2txt($_POST['text'])) == "") {
        $page['erreur'][$nb_erreur]['message'] = $lang['forum']['E_empty_message'];
        $nb_erreur++;
    }
    /* we format datas */
    if (isset($_SESSION['session_member_id']) and !empty($_SESSION['session_member_id'])) {
        $_POST['member'] = $_SESSION['session_member_id'];
    } else {
        $_POST['member'] = 0;
开发者ID:jkreska,项目名称:test1,代码行数:31,代码来源:topic_list.php


示例19: format_txt

     $_POST['telephone'] = format_txt($_POST['telephone']);
 }
 if (isset($_POST['fax'])) {
     $_POST['fax'] = format_txt($_POST['fax']);
 }
 if (isset($_POST['email'])) {
     $_POST['email'] = format_txt($_POST['email']);
 }
 if (isset($_POST['url'])) {
     $_POST['url'] = format_txt($_POST['url']);
 }
 if (isset($_POST['creation_year'])) {
     $_POST['creation_year'] = format_txt($_POST['creation_year']);
 }
 if (isset($_POST['comment'])) {
     $_POST['comment'] = format_txt($_POST['comment']);
 }
 # we check datas
 if (!isset($_POST['name']) or $_POST['name'] == "") {
     $page['erreur'][$nb_erreur]['message'] = $lang['club']['E_empty_club_name'];
     $nb_erreur++;
 } else {
     # we check if it does not already exist
     $sgbd = sql_connect();
     $sql_verif = sql_replace($sql['club']['verif_presence_club'], $_POST);
     $res_verif = sql_query($sql_verif);
     $nb_res = sql_num_rows($res_verif);
     sql_free_result($res_verif);
     sql_close($sgbd);
     if ($nb_res != "0") {
         $page['erreur'][$nb_erreur]['message'] = $lang['club']['E_exist_club'];
开发者ID:jkreska,项目名称:test1,代码行数:31,代码来源:form_club.php


示例20: elseif

    $page['value_id'] = $_GET['v2'];
} elseif (isset($_POST['id']) and $_POST['id'] != "") {
    $page['value_id'] = $_POST['id'];
}
if ($right_user['add_forum'] or $right_user['edit_forum']) {
    $page['show_form'] = 1;
} else {
    $page['show_form'] = '';
    $page['L_message'] = $lang['general']['acces_reserve_admin'];
}
# case of add or edit
if (isset($_POST) and !empty($_POST)) {
    # we format datas
    $_POST['idurl'] = format_txt($_POST['idurl']);
    $_POST['name'] = format_txt($_POST['name']);
    $_POST['description'] = format_txt($_POST['description']);
    # we check datas
    if (!isset($_POST['name']) or $_POST['name'] == "") {
        $page['erreur'][$nb_erreur]['message'] = $lang['forum']['E_empty_name'];
        $nb_erreur++;
    }
    if (!isset($_POST['idurl']) or $_POST['idurl'] == "") {
        $page['erreur'][$nb_erreur]['message'] = $lang['forum']['E_empty_idurl'];
        $nb_erreur++;
    } else {
        $sgbd = sql_connect();
        $sql_verif_forum = sql_replace($sql['forum']['verif_forum'], $_POST);
        $res = sql_query($sql_verif_forum);
        $nb_res = sql_num_rows($res);
        sql_free_result($res);
        sql_close($sgbd);
开发者ID:jkreska,项目名称:test1,代码行数:31,代码来源:form_forum.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP format_uid函数代码示例发布时间:2022-05-15
下一篇:
PHP format_to_post函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap