本文整理汇总了PHP中removeUtf8函数的典型用法代码示例。如果您正苦于以下问题:PHP removeUtf8函数的具体用法?PHP removeUtf8怎么用?PHP removeUtf8使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了removeUtf8函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
<?php
$namehh = $rowProductName['name'];
$showHtmlOtherNewli = '';
$sqlOtherNew = "select *,DATE_FORMAT(date_added,'%d/%m/%Y %h:%i') as dateAdd,DATE_FORMAT(last_modified,'%d/%m/%Y %h:%i') as dateModify from {$tableNew} where parent_1=" . $parent_1 . " and id_code<>{$idProduct} and {$whereStatus} and {$whereLang} {$sortby} limit 0,5";
$resultOtherNew = @mysql_query($sqlOtherNew, $conn);
while ($rowOtherNewNam = @mysql_fetch_array($resultOtherNew)) {
//Lay thong tin HomeBookDown===========
$parentOtherNew = $rowOtherNewNam['parent'];
$nameOtherNew = $rowOtherNewNam['name'];
$urlOtherNew = $rowOtherNewNam['url'];
$DateOtherNew = $rowOtherNewNam['dateAdd'];
$nameHomeNewTitle = removeUtf8($nameOtherNew);
include "inc/new/" . $parentOtherNew . $_lang . ".inc";
$hrefOtherNew = $serverName . $url_c . "/" . $urlOtherNew . "/";
$showHtmlOtherNewli .= "\n\t<li> <a href='" . $hrefOtherNew . "' title='" . $nameHomeNewTitle . "'>" . $nameOtherNew . "</a></li>";
}
//End while
$showHtmlOtherNewlitourother = $showHtmlOtherNewli != '' ? "\n\t <nav class=\"news-details-2\">\n\t<p class=\"news-details-1\">" . TTHEOTHERTYPEOFINFORMATION . ":</p>\n <ul>\n " . $showHtmlOtherNewli . "\n </ul>\n </nav>" : "";
//share voi cac mang xa hoi============
//share facebook....
$idShareProduct = $idProduct;
$imageShareProduct = $serverName . $image_cdetail;
$urlShareCategoryDetailName = $code_frame;
$urlShareDetailName = $code_id;
$urlShareAll = $urlFull;
/*include($folderShare."/share_product_index.php");*/
if ($config_share == 1) {
/** Share va comment facebook */
include $folderShare . "/share_product_index.php";
$Comment = "<div style=\" margin-top:20px\"><div id=\"fb-root\"></div>\n<script>(function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/vi_VN/all.js#xfbml=1&appId=476964002349038\";\n fjs.parentNode.insertBefore(js, fjs);\n}(document, 'script', 'facebook-jssdk'));</script>\n\n<div class=\"fb-comments\" data-href=\"" . $urlFull . "\" data-width=\"100%\" data-num-posts=\"2\"></div>\n </div>";
示例2: round
$showHtmlNewPageli = "";
$sqlNew = "select *,DATE_FORMAT(date_added,'%d/%m/%Y %h:%i') as dateAdd,DATE_FORMAT(last_modified,'%d/%m/%Y %h:%i') as dateModify from {$tableNew} where {$whereNewAll} and {$whereStatus} and {$whereLang} {$sortby} limit " . $pPP * $rowPP . "," . $rowPP;
$resultNew = @mysql_query($sqlNew, $conn);
$secs = round(microtime(true) - $secs, 3);
while ($rowNewNam = @mysql_fetch_array($resultNew)) {
//Lay thong tin HomeBookDown===========
$idOder = $rowNewNam['id_code'];
$urlHomeP = $rowNewNam['url'];
$nameHomeP = $rowNewNam['name'];
$parentHomeP = $rowNewNam['parent'];
$quantity = $rowNewNam['quantity'];
$discounts = $rowNewNam['discounts'];
$newproduct = $rowNewNam['new'];
$idCodeALl = $rowNewNam['code'];
$sales = $rowNewNam['sale'];
$nameHomePNewTitle = removeUtf8($nameHomeP);
@(include "inc/new/" . $parentHomeP . $_lang . ".inc");
$hrefHomeP = $serverName . $url_c . "/" . $urlHomeP . "/";
$image209New = $rowNewNam['image'];
$image209NewAll = $image209New != '' ? $image209New : "images/no_images.jpg";
$nameHomePAll = substrNumber(strip_tags($nameHomeP), '50', '...');
//$detailHomeP = substrNumber(strip_tags($rowNewNam['detail_short']),'200','...');
$detailHomeP = substrNumber(strip_tags($rowNewNam['detail_short']), '100', '...');
$idOder = $rowNewNam['id_code'];
$price = $rowNewNam['price'];
if ($price != '' and $price != '0') {
$priceHome1 = "";
$priceHome2 = "";
if ($sales != '' and $sales != '0') {
$priceHome1 = @number_format($sales, 0) . " <sup> đ</sup>";
$priceHome2 = "<del style='color:#999;'>" . @number_format($price, 0) . " <sup> đ</sup></del>";
示例3: chackInputSql
function chackInputSql($cs, $characters = "", $characters1 = "")
{
$marTViet = array("'", '"', "'", '”', '“', '"', '"', "’", "‘", $characters);
$marKoDau = array("", "", "", '', "", "", "", "", "", $characters1);
$rvn = removeUtf8(@str_replace($marTViet, $marKoDau, $cs));
return $rvn;
}
示例4: while
$showHtmlOtherNewli = '';
$sqlOtherNew = "select *,DATE_FORMAT(date_added,'%d/%m/%Y %h:%i') as dateAdd,DATE_FORMAT(last_modified,'%d/%m/%Y %h:%i') as dateModify from {$tableNew} where parent_1=" . $parent_1 . " and id_code<>{$idProduct} and {$whereStatus} and {$whereLang} {$sortby} limit 0,3";
$resultOtherNew = @mysql_query($sqlOtherNew, $conn);
while ($rowOtherNewNam = @mysql_fetch_array($resultOtherNew)) {
//Lay thong tin HomeBookDown===========
$idOderC = $rowOtherNewNam['id_code'];
$urlHomeC = $rowOtherNewNam['url'];
$nameHomeC = $rowOtherNewNam['name'];
$parentHomeC = $rowOtherNewNam['parent'];
$quantityC = $rowOtherNewNam['quantity'];
$discountsC = $rowOtherNewNam['discounts'];
$newproductC = $rowOtherNewNam['new'];
/** column "new": sản phẩm mới */
$idCodeALlC = $rowOtherNewNam['code'];
$salesC = $rowOtherNewNam['sale'];
$nameHomePNewTitleC = removeUtf8($nameHomeC);
@(include "inc/new/" . $parentHomeC . $_lang . ".inc");
$hrefHomeC = $serverName . $url_c . "/" . $urlHomeC . "/";
$image209NewC = $rowOtherNewNam['image'];
$image209NewAllC = $image209NewC != '' ? $image209NewC : "images/no_images.jpg";
$nameHomePAllC = substrNumber(strip_tags($nameHomeC), '50', '...');
$detailHomeC = substrNumber(strip_tags($rowOtherNewNam['detail_short']), '100', '...');
//$detailHomeP = substrNumber(strip_tags($rowOtherNewNam['detail_short']),'200','...');
$idOder = $rowOtherNewNam['id_code'];
$price = $rowOtherNewNam['price'];
if ($price != '' and $price != '0') {
$priceHome1 = "";
$priceHome2 = "";
if ($salesC != '' and $salesC != '0') {
$priceHome1 = @number_format($salesC, 0) . " <sup> đ</sup>";
$priceHome2 = "<del style='color:#999;'>" . @number_format($price, 0) . " <sup> đ</sup></del>";
示例5: isset
$classes_good = isset($_POST['classes_good']) ? trim($_POST['classes_good']) : '';
$price = isset($_POST['txtPrice']) ? trim($_POST['txtPrice']) : '';
for ($e = 1; $e <= count($TYPE_SEARCH['TG_SCT']); $e++) {
$tg_scts1 = $_POST['TG_SCTS' . $e] != '' ? $e : 0;
$tg_sctc1 = $_POST['TG_SCTC' . $e] != '' ? $e : 0;
$tg_sctt1 = $_POST['TG_SCTT' . $e] != '' ? $e : 0;
$tg_scts2 .= $tg_scts1 . '_';
$tg_sctc2 .= $tg_sctc1 . '_';
$tg_sctt2 .= $tg_sctt1 . '_';
}
$tg_scts = substr($tg_scts2, 0, -1);
$tg_sctc = substr($tg_sctc2, 0, -1);
$tg_sctt = substr($tg_sctt2, 0, -1);
$detail_short = isset($_POST['txtDetailShort']) ? trim($_POST['txtDetailShort']) : '';
$keywords = removeUtf8($name);
$description = removeUtf8(substrNumber(strip_tags($detail_short), '160', ''));
if ($name == '') {
$errMsg = 'Bạn hãy nhập tiêu đề tin';
} else {
$errMsg = '';
}
if ($subject == '') {
$errMsg = CNAME;
} else {
$errMsg = '';
}
if ($phone == '') {
$errMsg = CFPLEARSEENTERYOURPHONENUMBER;
} else {
$errMsg = '';
}
示例6: where
$showMenulv2 = "";
$HtmlProduct = "";
}
$sqlHome = "select *from {$tableCategoryNew} where (id_code = 80 or id_code=395 or id_code=396) and {$whereStatus} and {$whereLang} {$sortby3}";
$resultHome = @mysql_query($sqlHome, $conn);
while ($rowHomeNam = @mysql_fetch_array($resultHome)) {
//Lay thong tin Home===========
$sqlHomeOther = "select *from {$tableNew} where parent=" . $rowHomeNam['id_code'] . " and home=1 and {$whereStatus} and {$whereLang} {$sortby3} limit 0,3";
$queryHomeOther = @mysql_query($sqlHomeOther, $conn);
while ($rowHomeOther = @mysql_fetch_assoc($queryHomeOther)) {
$parent_1Home = $rowHomeOther['parent_1'];
$idOder = $rowHomeOther['id_code'];
$urlHome = $rowHomeOther['url'];
$nameHome = $rowHomeOther['name'];
$parentHome = $rowHomeOther['parent'];
$nameHomeNewTitle = removeUtf8($nameHome);
$hrefHomeNew = $serverName . $url_c . "/";
@(include "inc/new/" . $parentHome . $_lang . ".inc");
$hrefHome = $serverName . $url_c . "/" . $urlHome . "/";
$image209New = $rowHomeOther['image'];
$image209NewAll = $image209New != '' ? $image209New : "images/no_images.jpg";
$nameHomeAll = substrNumber(strip_tags($nameHome), '60', '...');
$detailHome = substrNumber(strip_tags($rowHomeOther['detail_short']), '150', '...');
if ($parent_1Home == 80) {
$showHomeOther .= "<div class=\"services-details\">\n <h2><a href=\"" . $hrefHome . "\" title=\"" . $nameHomeNewTitle . "\">" . $nameHome . "</a></h2>\n <div class=\"news-left\">\n <a href=\"" . $hrefHome . "\" title=\"" . $nameHomeNewTitle . "\">\n <img src=\"" . $serverName . $image209NewAll . "\" class=\"images-new\" alt=\"" . $nameHomeNewTitle . "\">\n </a>\n </div>\n <div class=\"news-right\">\n \n <p>" . $detailHome . "</p>\n </div>\n </div>";
} elseif ($parent_1Home == 395) {
$image_lar = $rowHomeOther['image_large'];
if ($image_lar != '') {
$image209NewAll = $image_lar;
}
$showHomeOther .= "<div class=\"lightbox-cnsp\"><a class=\"example-image-link\" href=\"" . $serverName . $image209NewAll . "\" title=\"{$nameHome}\" data-lightbox=\"example-set\" data-title=\"{$nameHome}\"><img class=\"example-image\" src=\"" . $serverName . $image209NewAll . "\" alt=\"{$nameHome}\"/></a></div>";
示例7: where
<?php
$showSeoRightLi = '';
$sqlSeoRight = "select *,DATE_FORMAT(date_added,'%d/%m/%Y') as dateAdd,DATE_FORMAT(last_modified,'%d/%m/%Y') as dateModify from {$tableNew} where (parent_1=364) and {$whereStatus} and {$whereLang} {$sortby} ";
$resultSeoRight = @mysql_query($sqlSeoRight, $conn);
while ($rowSeoRightNam = @mysql_fetch_array($resultSeoRight)) {
//Lay thong tin Home===========
$parent_1SeoRight = $rowSeoRightNam['parent_1'];
$idOderSeoRight = $rowSeoRightNam['id_code'];
$urlSeoRight = $rowSeoRightNam['url'];
$nameSeoRight = $rowSeoRightNam['name'];
$parentSeoRight = $rowSeoRightNam['parent'];
$nameSeoRightNewTitle = removeUtf8($nameSeoRight);
$image209SeoRightNewAll = $image209SeoRightNew != '' ? $image209SeoRightNew : "images/no_images.jpg";
$nameSeoRightAll = substrNumber(strip_tags($nameSeoRight), '40', '...');
$detailSeoRight = substrNumber(strip_tags($rowSeoRightNam['detail_short']), '200', '...');
$hrefSeoRightNew = $serverName . $url_c . "/";
@(include "inc/new/" . $parentSeoRight . $_lang . ".inc");
$hrefSeoRight = $serverName . $url_c . "/" . $urlSeoRight . "/";
$showSeoRightLi .= "<li><a href=\"{$hrefSeoRight}\" alt=\"{$nameSeoRight}\" title=\"{$nameSeoRight}\">{$nameSeoRight}</a></li>";
}
$showhtmlAdvAllLi = '';
@(include $folderInc . "/adv/2_adv" . $_lang . ".inc");
//banner
$asideright = "\n<!--<div class=\"right-col\">\n <div class=\"online-support\">\n <div class=\"online-support-1\">HỖ TRỢ TRỰC TUYẾN</div>\n " . $showHtmlSkypeLi . "\n </div>\n <div class=\"right-col-1 facebook-right\">\n\t\t<h2>OSAKA trên facebook</h2>\n\t\t<div class=\"facebook\">\n\t\t<iframe src=\"//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2F" . $facebookContact . "&width=255&height=250&show_faces=true&colorscheme=light&stream=false&border_color&header=true&appId=476964002349038\" class=\"facebook_right\" ></iframe></div>\n\t\t</div>\n <div class=\"right-col-1\">" . $showhtmlAdvAllLi2 . "</div>\n <div class=\"right-col-3\">\n <div class=\"online-support-4\">THỐNG KÊ TRUY CẬP</div>\n <p class=\"online-support-5\">Đang xem: " . $guest . " <br/>\n Lượt truy cập: " . $total_visits . "</p>\n </div>\n </div>-->\n\n <aside class=\"webthietke-r\">\n <div class=\"hotline\">\n <p class=\"hotline-t\">HOTLINE</p>\n <p class=\"phone-hot\">{$mienNam}</p>\n </div>\n <p class=\"Email\"><strong>Email: </strong>{$emailContact}</p>\n <div class=\"support-online\">\n <div class=\"support-t\"><h3>HỖ TRỢ TRỰC TUYẾN</h3></div>\n <div class=\"support-b\">\n {$showHtmlSkypeLiYahoo}\n </div>\n </div>\n <div class=\"google1\"><img src=\"" . $serverName . "images/googl+.png\"></div>\n <div class=\"knowledgeseo\">\n <div class=\"title-knowledgeseo\"><h3><a href=\"#\">KIẾN THỨC SEO</a></h3></div>\n <div class=\"knowledgeseo-b\">\n <ul>\n {$showSeoRightLi}\n </ul>\n </div>\n </div>\n </aside>\n";
示例8: while
$resultHomeP2 = @mysql_query($sqlHomeP2, $conn);
while ($rowHomePNam2 = @mysql_fetch_array($resultHomeP2)) {
//Lay thong tin HomeP===========
$idOder2 = $rowHomePNam2['id_code'];
$urlHomeP2 = $rowHomePNam2['url'];
$nameHomeP2 = $rowHomePNam2['name'];
$parentHomeP2 = $rowHomePNam2['parent'];
$quantity2 = $rowHomePNam2['quantity'];
$discounts2 = $rowHomePNam2['discounts'];
$newproduct2 = $rowHomePNam2['new'];
$hotproduct2 = $rowHomePNam2['hot'];
$liquiproduct2 = $rowHomePNam2['liqui'];
$uniquesproduct2 = $rowHomePNam2['uniques'];
$idCodeALl2 = $rowHomePNam2['code'];
$sales2 = $rowHomePNam2['sale'];
$nameHomePNewTitle2 = removeUtf8($nameHomeP2);
@(include "inc/new/" . $parentHomeP2 . $_lang . ".inc");
$hrefHomeP2 = $serverName . $url_c . "/" . $urlHomeP2 . "/";
$image209New2 = $rowHomePNam2['image'];
$image209NewAll2 = $image209New2 != '' ? $image209New2 : "images/no_images.jpg";
$nameHomePAll2 = substrNumber(strip_tags($nameHomeP2), '50', '...');
//$detailHomeP = substrNumber(strip_tags($rowHomePNam['detail_short']),'200','...');
$price2 = $rowHomePNam2['price'];
if ($sales2 != '') {
$price2 = $sales2;
$priceHome2 = @number_format($price2, 0) . " <span>VNĐ</span>";
} else {
$priceHome2 = @number_format($price2, 0) . " <span>VNĐ</span>";
//$priceHome = "<span>Liên hệ</span>";
}
if ($price2 != '' and $price2 != '0') {
示例9: removeUtf8
$showTitleTSearchAuthor = $rowMenuSearchAuthor['title_t'];
$showParentSearchAuthor = $rowMenuSearchAuthor['parent'];
$showTitleSearchAuthor = removeUtf8($showNameSearchAuthor);
$showHtmlUrlSearchAuthor = $serverName . $showUrlSearchAuthor . "/";
$showHTMLMenuSearchAuthor .= "<li class=\"boldmenu2\"><a href=\"" . $showHtmlUrlSearchAuthor . "\" alt=\"" . $showNameSearchAuthor . "\" title=\"" . $showNameSearchAuthor . "\">{$showTitleTSearchAuthor}</a></li>";
}
$showHTMLMenuSearchNPH = "";
$whereNPH = 'parent=415';
$sqlMenuSearchNPH = "select * from {$tableCategoryNew} where {$whereStatus} and {$whereAuthor} and {$whereLang} {$sortby} limit 0,7";
$queryMenuSearchNPH = @mysql_query($sqlMenuSearchNPH, $conn);
while ($rowMenuSearchNPH = @mysql_fetch_array($queryMenuSearchNPH)) {
$showNameSearchNPH = $rowMenuSearchNPH['name'];
$showImgSearchNPH = $rowMenuSearchNPH['image'];
$showUrlSearchNPH = $rowMenuSearchNPH['url'];
$showIDcodeSearchNPH = $rowMenuSearchNPH['id_code'];
$showTitleTSearchNPH = $rowMenuSearchNPH['title_t'];
$showParentSearchNPH = $rowMenuSearchNPH['parent'];
$showTitleSearchNPH = removeUtf8($showNameSearchNPH);
$showHtmlUrlSearchNPH = $serverName . $showUrlSearchNPH . "/";
$showHTMLMenuSearchNPH .= "<li class=\"boldmenu2\"><a href=\"" . $showHtmlUrlSearchNPH . "\" alt=\"" . $showNameSearchNPH . "\" title=\"" . $showNameSearchNPH . "\">{$showTitleTSearchNPH}</a></li>";
}
if ($code_frame == '') {
$asideleft = "\n <div class=\"cate-menu floatLeft\">\n <ul>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "kho-sach-giam-gia/\" alt=\"Kho sách giảm giá\" title=\"Kho sách giảm giá\">Kho sách giảm giá</a></li>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "sach-ban-chay/\" alt=\"Sách bán chạy\" title=\"Sách bán chạy\">Sách bán chạy</a></li>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "sach-moi-phat-hanh/\" alt=\"Sách mới phát hành\" title=\"Sách mới phát hành\">Sách mới phát hành</a></li>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "sach-sap-phat-hanh/\" alt=\"Sách sắp phát hành\" title=\"Sách sắp phát hành\">Sách sắp phát hành</a></li>\n {$HtmlProductAllLeft}\n </ul>\n </div>\n";
} elseif ($parent_1_c == '245' or $parent_1_c == '120') {
$asideleft = "\n <div class=\"cate-menu floatLeft\">\n <ul>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "kho-sach-giam-gia/\" alt=\"Kho sách giảm giá\" title=\"Kho sách giảm giá\">Kho sách giảm giá</a></li>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "sach-ban-chay/\" alt=\"Sách bán chạy\" title=\"Sách bán chạy\">Sách bán chạy</a></li>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "sach-moi-phat-hanh/\" alt=\"Sách mới phát hành\" title=\"Sách mới phát hành\">Sách mới phát hành</a></li>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "sach-sap-phat-hanh/\" alt=\"Sách sắp phát hành\" title=\"Sách sắp phát hành\">Sách sắp phát hành</a></li>\n <h3>DANH MỤC</h3>\n {$showliparent}\n {$showHtmlauthorleft}\n {$showHtmlNPHleft}\n </ul>\n </div>";
if ($parent_c == 245) {
$asideleft = "\n <div class=\"cate-menu floatLeft\">\n <ul>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "kho-sach-giam-gia/\" alt=\"Kho sách giảm giá\" title=\"Kho sách giảm giá\">Kho sách giảm giá</a></li>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "sach-ban-chay/\" alt=\"Sách bán chạy\" title=\"Sách bán chạy\">Sách bán chạy</a></li>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "sach-moi-phat-hanh/\" alt=\"Sách mới phát hành\" title=\"Sách mới phát hành\">Sách mới phát hành</a></li>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "sach-sap-phat-hanh/\" alt=\"Sách sắp phát hành\" title=\"Sách sắp phát hành\">Sách sắp phát hành</a></li>\n <h3>DANH MỤC</h3>\n {$showliparent}\n <h3>Tác giả</h3>\n {$showHTMLMenuSearchAuthor}\n <li class=\"li-view-all boldmenu2\"><a href=\"" . $serverName . "tat-ca-nha-phat-hanh/\" class=\"view-all\" alt=\"Tất cả nhà phát hành\" title=\"Tất cả nhà phát hành\">>> Xem tất cả</a></li>\n <h3>Nhà phát hành</h3>\n {$showHTMLMenuSearchNPH}\n <li class=\"li-view-all boldmenu2\"><a href=\"" . $serverName . "tat-ca-nha-phat-hanh/\" class=\"view-all\" alt=\"Tất cả nhà phát hành\" title=\"Tất cả nhà phát hành\">>> Xem tất cả</a></li>\n </ul>\n </div>";
}
} else {
$asideleft = "\n\t<div class=\"cate-menu floatLeft\">\n <ul>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "kho-sach-giam-gia/\" alt=\"Kho sách giảm giá\" title=\"Kho sách giảm giá\">Kho sách giảm giá</a></li>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "sach-ban-chay/\" alt=\"Sách bán chạy\" title=\"Sách bán chạy\">Sách bán chạy</a></li>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "sach-moi-phat-hanh/\" alt=\"Sách mới phát hành\" title=\"Sách mới phát hành\">Sách mới phát hành</a></li>\n <li class=\"boldmenu\"><a href=\"" . $serverName . "sach-sap-phat-hanh/\" alt=\"Sách sắp phát hành\" title=\"Sách sắp phát hành\">Sách sắp phát hành</a></li>\n {$HtmlProductAllLeft}\n </ul>\n </div>";
}
示例10: trim
$defaulUrlLn = trim(addslashes($_POST['txtName' . $ln]));
$urlCode = noneUniAlias($defaulUrlLn, true);
//lay url tu dong
//$detail_short = str_replace("<p>", "", $detail_short);
//$detail_short = str_replace("</p>", "", $detail_short);
$title_t = isset($_POST['txtTitle_t' . $ln]) ? trim(addslashes($_POST['txtTitle_t' . $ln])) : '';
$detail = isset($_POST['txtDetail' . $ln]) ? trim(addslashes($_POST['txtDetail' . $ln])) : '';
$size = isset($_POST['txtSize' . $ln]) ? trim(addslashes($_POST['txtSize' . $ln])) : '';
$subject = isset($_POST['txtSubject' . $ln]) ? trim(addslashes($_POST['txtSubject' . $ln])) : '';
$detail_short = isset($_POST['txtDetailShort' . $ln]) ? trim(addslashes($_POST['txtDetailShort' . $ln])) : '';
$keywords1 = $_POST['Keywords' . $ln] != '' ? trim(addslashes($_POST['Keywords' . $ln])) : $name;
//10
$description1 = $_POST['Description' . $ln] != '' ? trim(addslashes($_POST['Description' . $ln])) : $detail_short;
//160
$keywords = removeUtf8(trim(substrNumber(strip_tags($keywords1), '160', '')));
$description = removeUtf8(trim(substrNumber(strip_tags($description1), '160', '')));
//$sort = isset($_POST['txtSort'.$ln]) ? trim($_POST['txtSort'.$ln]) : 0;
$status = $_POST['chkStatus' . $ln] != '' ? 1 : 0;
$fields_arr = array("id_code" => "'{$oldid}'", "parent" => "'{$codeParent}'", "id_member" => "'{$idMember}'", "name_member" => "'{$nameMember}'", "type_member" => "'{$type_member}'", "type_search" => "'{$type_search}'", "discounts" => "'{$discounts}'", "parent2" => "'{$parent2}'", "quantity" => "'{$quantity}'", "parent_1" => "'{$parent_1}'", "code" => "'{$code}'", "url" => "'{$urlCode}'", "link" => "'{$link}'", "name" => "'{$name}'", "price" => "'{$price}'", "sale" => "'{$sale}'", "new" => "'{$new}'", "subject" => "'{$subject}'", "title_t" => "'{$title_t}'", "tag" => "'{$tag}'", "detail_short" => "'{$detail_short}'", "keywords" => "'{$keywords}'", "description" => "'{$description}'", "detail" => "'{$detail}'", "sort" => "'{$sort}'", "status" => "{$status}", "home" => "'{$home}'", "date_added" => "now()", "last_modified" => "now()", "lang" => "'{$ln}'");
$result = insert($tableConfig, $fields_arr);
//die('Error: '.mysql_error());
$oldidLn = @mysql_insert_id();
//lay id vua them vo
//kiem tra url nay da ton tai hay chua
if (countRecord($tableConfig, "url='" . $urlCode . "' and id<>" . $oldidLn) > 0) {
$urlCodeUp = $urlCode . "-" . $oldidLn;
$fields_arrUpdateUrl = array("url" => "'{$urlCodeUp}'");
$resultUrlUpdate = update($tableConfig, $fields_arrUpdateUrl, "id=" . $oldidLn);
//die('Error: '.mysql_error());
}
//ket thuc kiem tra url nay da ton tai hay chua
示例11: while
$resultHomePHot = @mysql_query($sqlHomePHot, $conn);
while ($rowHomePHotNam = @mysql_fetch_array($resultHomePHot)) {
//Lay thong tin HomeP===========
$idOderHot = $rowHomePHotNam['id_code'];
$urlHomePHot = $rowHomePHotNam['url'];
$nameHomePHot = $rowHomePHotNam['name'];
$parentHomePHot = $rowHomePHotNam['parent'];
$quantityHot = $rowHomePHotNam['quantity'];
$discountsHot = $rowHomePHotNam['discounts'];
/** column "new": sản phẩm mới */
$idCodeALlHot = $rowHomePHotNam['code'];
$salesHot = $rowHomePHotNam['sale'];
$hotP = $rowHomePHotNam['hot'];
$newP = $rowHomePHotNam['new'];
$aboutP = $rowHomePHotNam['about'];
$nameHomePNewTitleHot = removeUtf8($nameHomePHot);
@(include "inc/new/" . $parentHomePHot . $_lang . ".inc");
$hrefHomePHot = $serverName . $url_c . "/" . $urlHomePHot . "/";
$image209NewHot = $rowHomePHotNam['image'];
$image209NewAllHot = $image209NewHot != '' ? $image209NewHot : "images/no_images.jpg";
$nameHomePAllHot = substrNumber(strip_tags($nameHomePHot), '30', '...');
$priceHot = $rowHomePHotNam['price'];
if ($salesHot != '') {
$priceHot = $salesHot;
$priceHomeHot = @number_format($priceHot, 0) . " <span>vnđ</span>";
} else {
$priceHomeHot = @number_format($priceHot, 0) . " <span>vnđ</span>";
//$priceHome = "<span>Liên hệ</span>";
}
if ($priceHot != '' and $priceHot != '0') {
$priceHomeHot = @number_format($priceHot, 0) . " <span>vnđ</span>";