本文整理汇总了PHP中removeVietnamese函数的典型用法代码示例。如果您正苦于以下问题:PHP removeVietnamese函数的具体用法?PHP removeVietnamese怎么用?PHP removeVietnamese使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了removeVietnamese函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$title = isset($_POST['txtTitle' . $ln]) ? trim($_POST['txtTitle' . $ln]) : '';
$subject = isset($_POST['txtSubject' . $ln]) ? trim($_POST['txtSubject' . $ln]) : '';
$detail_short = isset($_POST['txtDetailShort' . $ln]) ? trim($_POST['txtDetailShort' . $ln]) : '';
$detail_short = str_replace("<p>", "", $detail_short);
$detail_short = str_replace("</p>", "", $detail_short);
$detail = isset($_POST['txtDetail' . $ln]) ? trim($_POST['txtDetail' . $ln]) : '';
$sort = isset($_POST['txtSort' . $ln]) ? trim($_POST['txtSort' . $ln]) : 0;
$status = $_POST['chkStatus' . $ln] != '' ? 1 : 0;
$fields_arr = array("id_code" => "'{$oldid}'", "title" => "'{$title}'", "name" => "'{$name}'", "url" => "'{$urlCode}'", "subject" => "'{$subject}'", "detail_short" => "'{$detail_short}'", "detail" => "'{$detail}'", "sort" => "{$sort}", "status" => "{$status}", "date_added" => "now()", "last_modified" => "now()", "lang" => "'{$ln}'");
$result = insert($tableTab, $fields_arr);
}
/*-----------------------END THEM MOI*/
}
/*-----------------------THEM HINH*/
if ($result) {
$nameImage = removeVietnamese($defaulName, ' ', '_');
if (empty($_POST['id'])) {
$r = getRecord($tableTabId, "id=" . $oldid);
}
$sqlUpdateField = "";
//THEM HINH thumbnall
if ($_POST['chkClearThum'] == '') {
$extsmall = substr($_FILES['txtThumbnail']['name'], -4, 4);
if (makeUpload($_FILES['txtThumbnail'], "{$path}/" . $nameImage . "_" . $oldid . "_st" . $extsmall)) {
@chmod("{$path}/" . $nameImage . "_" . $oldid . "_st" . $extsmall, 0777);
$sqlUpdateField = " thumbnail='{$pathdb}/" . $nameImage . "_" . $oldid . "_st" . $extsmall . "' ";
}
} else {
if (file_exists('../' . $r['thumbnail'])) {
@unlink('../' . $r['thumbnail']);
}
示例2: getRecord
}
if ($detail == '' || $detail == UGOALSYOUWANTTOACHIEVE) {
$errMsg = 'Bạn chưa nhập nội dung thảo luận';
} else {
$errMsg = '';
}
//$name = substrNumber($detail,'100','');
$defaulName = $name;
$id_parent = $idProduct;
$codeParent = $parent;
$CodeModule = getRecord($tableCategoryNewId, " id=" . $codeParent);
//$code_frame = $CodeModule['code'];
$code_module = $CodeModule['code_module'];
//$email = $rowMemberIdInfo['email'];
//$nameMember = $rowMemberIdInfo['name'];
$urlCode = removeVietnamese($defaulName, " ", "-");
//lay url tu dong
//$city = $rowMemberIdInfo['city'];
//$country = $rowMemberIdInfo['country'];
$ip_computer = getRealIpAddr();
$ldate = @strtotime(date("d-m-Y-g:i a"));
$no = 10;
$yes = 30;
$totalYes = $no;
$totalNo = $yes;
include 'comment/countCommentStars.php';
$fields_arr1 = array("id_parent" => "{$id_parent}", "code_frame" => "'{$code_frame}'", "code_module" => "'{$code_module}'", "ip_computer" => "'{$ip_computer}'", "name" => "'{$name}'", "email" => "'{$email}'", "city" => "'{$city}'", "country" => "'{$country}'", "id_member" => "'{$idMember}'", "name_member" => "'{$nameMember}'", "com_no" => "'{$no}'", "com_yes" => "'{$yes}'", "star" => "'{$sostarComment}'", "star_nua" => "'{$sostarComment1}'", "edit" => "'1'", "ldate" => "'{$ldate}'", "last_modified" => "now()", "date_added" => "now()", "lang" => "'{$_lang}'");
$result = insert($tableCommentId, $fields_arr1);
$oldid = @mysql_insert_id();
//lay id vua them vo
$fields_arr = array("id_code" => "'{$oldid}'", "id_parent" => "{$id_parent}", "code_frame" => "'{$code_frame}'", "code_module" => "'{$code_module}'", "ip_computer" => "'{$ip_computer}'", "email" => "'{$email}'", "city" => "'{$city}'", "country" => "'{$country}'", "id_member" => "'{$idMember}'", "name_member" => "'{$nameMember}'", "com_no" => "'{$no}'", "com_yes" => "'{$yes}'", "star" => "'{$sostarComment}'", "star_nua" => "'{$sostarComment1}'", "title" => "'{$title}'", "name" => "'{$name}'", "edit" => "'1'", "url" => "'{$urlCode}'", "subject" => "'{$subject}'", "detail_short" => "'{$detail}'", "ldate" => "'{$ldate}'", "date_added" => "now()", "last_modified" => "now()", "lang" => "'{$_lang}'");
示例3: explode
}
///lay hang san xuat
if ($quantity > 0) {
$buy = "\n \t<input type=\"hidden\" name=\"idPro\" size=\"5\" value=\"" . $idProduct . "\">\n <input type=\"image\" src=\"" . $serverName . "images/icon-buy.png\" name=\"bottomBuy\" value=\"mua hàng\" border=\"0\" />\n ";
} else {
$buy = "<img src=\"" . $serverName . "images/icon-end.png\" width=\"138\" height=\"43\" alt=\"hết hàng\"/>";
}
$discounts = $rowProductName['discounts'];
$newproduct = $rowProductName['new'];
$image209NewAllDetail = $rowProductName['image'];
$discountsHtml = '';
//$discounts>0?"<div class=\"discountFlag\">".$discounts." off</div>":"";
$newHtml = $newproduct > 0 ? "<div class=\"newFlag\"> </div>" : "";
$YesSales = "<p class=\"gia1\">Giá: " . $priceHome . $priceCu . "</span></p>\n <form id=\"form1\" name=\"frmOrder\" method=\"get\" action=\"" . $serverName . $code_frame_cart . "/\">\n <div class=\"sl\">\n Số lượng mua :\n <input name=\"quantity\" type=\"text\" value=\"1\">\n </div>\n <div class=\"datmua\">\n {$buy}\n </div>\n </form>";
$ProductDetail .= "<div class=\"detailwrite\">\n <h2>{$nameDetail}</h2>\n <strong>• Mã: {$idCodeDetail}</strong><br>\n <strong>• Hãng sản xuất: " . $rowHangName['name'] . "</strong>\n {$YesSales}\n " . $showHtmlShareProductIndex . "\n </div>";
} else {
$ProductDetail .= "<div class=\"detailwrite detail-right-col\">\n <h2>{$nameDetail}</h2>\n <strong>• Mã: {$idCodeDetail}</strong><br>\n <strong>• Hãng sản xuất: " . $rowHangName['name'] . "</strong>\n " . $showHtmlShareProductIndex . "\n </div>";
}
$tags_array = explode(",", $rowProductName['tag']);
$tags_total = count($tags_array);
for ($t = 0; $t < $tags_total; $t++) {
$tags_name = $tags_array[$t];
$tags_url = removeVietnamese(trim($tags_name), " ", "-");
//lay url tu dong
$tags_html .= "<a href=\"" . $serverName . $code_tag . "/" . $tags_url . "/\" title=\"\">" . $tags_name . "</a>";
}
$_tagsHtml = '';
if ($rowProductName['tag'] != '') {
$_tagsHtml = " <div class=\"bar_tag\"> <span>TAGs</span> " . $tags_html . "\n </div>";
}
$showHtmlNewDetail = "\n<link href=\"" . $serverName . "css/zoom.css\" rel=\"stylesheet\" type=\"text/css\">\n<link href=\"" . $serverName . "css/thickbox.css\" rel=\"stylesheet\" type=\"text/css\">\n<script type=\"text/javascript\">\nvar featuredimagezoomer = { // the two options for Featured Image Zoomer:\n\tloadinggif: '" . $serverName . "images/spinningred.gif', // full path or URL to \"loading\" gif\n\tmagnifycursor: 'crosshair' // value for CSS's 'cursor' property when over the zoomable image\n};\nvar tb_pathToImage = \"" . $serverName . "images/loadingAnimation.gif\";\nvar __host\t= \"" . $serverName . "\";\n</script> \n<script type=\"text/javascript\" src=\"" . $serverName . "js/zoom.js\"></script>\n<style type=\"text/css\">.featuredimagezoomerhidden {visibility: hidden!important;}</style> \n<script type=\"text/javascript\" src=\"" . $serverName . "js/thickbox.js\"></script> \n<script type=\"text/javascript\" src=\"" . $serverName . "js/validate.js\"></script>\n\n<script type=\"text/javascript\">\n\$(document).ready(function() {\n\t//Tooltips\n\t\$(\".tip_trigger\").hover(function(){\n\t\ttip = \$(this).find('.tip');\n\t\ttip.show(); //Show tooltip\n\t}, function() {\n\t\ttip.hide(); //Hide tooltip\t\t \n\t}).mousemove(function(e) {\n\t\tvar mousex = e.pageX + 20; //Get X coodrinates\n\t\tvar mousey = e.pageY + 20; //Get Y coordinates\n\t\tvar tipWidth = tip.width(); //Find width of tooltip\n\t\tvar tipHeight = tip.height(); //Find height of tooltip\n\t\t\n\t\t//Distance of element from the right edge of viewport\n\t\tvar tipVisX = \$(window).width() - (mousex + tipWidth);\n\t\t//Distance of element from the bottom of viewport\n\t\tvar tipVisY = \$(window).height() - (mousey + tipHeight);\n\t\t \n\t\tif ( tipVisX < 20 ) { //If tooltip exceeds the X coordinate of viewport\n\t\t\tmousex = e.pageX - tipWidth - 20;\n\t\t} if ( tipVisY < 20 ) { //If tooltip exceeds the Y coordinate of viewport\n\t\t\tmousey = e.pageY - tipHeight - 20;\n\t\t} \n\t\ttip.css({ top: mousey, left: mousex });\n\t});\n\t\n\t\n\t\$('#multizoom1').addimagezoom({ // options same as for previous Featured Image Zoomer's addimagezoom unless noted as '- new'\n\t\tdescArea: '#description', // description selector (optional - but required if descriptions are used) - new\n\t\tspeed: 1500, // duration of fade in for new zoomable images (in milliseconds, optional) - new\n\t\tdescpos: true, // if set to true - description position follows image position at a set distance, defaults to false (optional) - new\n\t\timagevertcenter: true, // zoomable image centers vertically in its container (optional) - new\n\t\tmagvertcenter: true, // magnified area centers vertically in relation to the zoomable image (optional) - new\n\t\tzoomrange: [2, 10],\n\t\tmagnifiersize: [400,350],\n\t\tmagnifierpos: 'right',\n\t\tcursorshadecolor: '#fdffd5',\n\t\tcursorshade: true //<-- No comma after last option!\n\t});\n\n\t\$('.validate-form').validate();\n\t/*\$('#show-image-large2 a').click(function(){\n\t var path = \$(this).children().attr('src');\n \$('#show-image-large1 img#multizoom1').attr('src',path);\n return false;\n\t});*/\n});\n\n</script>\n\n <div class=\"block\">\n <div class=\"img pro_det_show1\" id=\"show-image-large1\">\n <img id=\"multizoom1\" src=\"" . $serverName . $image209NewAllDetail . "\"width=\"230\" width=\"230\" alt=\"{$nameDetail}\"></a>\n </div>\n <div class=\"pro_det_show2 multizoom1 thumbs\" id=\"show-image-large2\">\n {$image_large_c1a}\n </div>\n<!-- <div class=\"detail\">\n \t<h2 class=\"name\">{$nameDetail}</h2>\n </div>\n--> </div><!--Emd block-->\n </div><!--End div rights-->\n \n {$ProductDetail}\n \n \t<div class=\"chitietsp-1\">\n \t<h3>THÔNG TIN GIẦY</h3><hr/>\n " . $detail_short_c . "\n {$_tagsHtml}\n </div>\n {$temp}\n <aside class=\"clear\"></aside>\n\n{$Comment}\n \n \n\t\t\t\t\t <!--san pham khac-->\n <div class=\"product-other-detail\" >Sản phẩm khác</div>\n {$showHtmlOtherNewli}\n\t\t\t\t \n </div> \n\n";
示例4: substr
$idClasses = $Classes['id_code'];
$nameClasses = $Classes['name'];
//neu da them vao
if ($_POST['txtClasses' . $idClasses] != '') {
$Classesch = 1;
$ClasseschName .= $nameClasses . ", ";
} else {
$Classesch = 0;
}
$HtmlClasses1 .= $Classesch . '/';
$HtmlClassesId .= $idClasses . '/';
}
$classes = substr($HtmlClassesId, 0, -1) . "_" . substr($HtmlClasses1, 0, -1);
$classes_name = substr($ClasseschName, 0, -2);
$name = strip_tags($name1);
$urlCode = removeVietnamese($name, " ", "-");
//lay url tu dong
$phone = strip_tags($phone1);
$address = strip_tags($address1);
$email = chackInputSql($email1);
$birthday = chackInputSql($birthday1);
$telephone = chackInputSql($telephone1);
$schools = chackInputSql($schools1);
$majors = chackInputSql($majors1);
$subject = chackInputSql($subject1);
$yexperience1 = isset($_POST['txtYexperience']) ? trim($_POST['txtYexperience']) : '';
//students_number
$higher_scores1 = isset($_POST['txtHigher_scores']) ? trim($_POST['txtHigher_scores']) : '';
//tong diem 3 mon
$yexperience = chackInputSql($yexperience1);
$higher_scores = chackInputSql($higher_scores1);
示例5: isset
$name = isset($_POST['txtName' . $ln]) ? trim($_POST['txtName' . $ln]) : '';
$subject = isset($_POST['txtSubject' . $ln]) ? trim($_POST['txtSubject' . $ln]) : '';
$detail_short = isset($_POST['txtDetailShort' . $ln]) ? trim($_POST['txtDetailShort' . $ln]) : '';
$warranty_offer = isset($_POST['txtWarrantyOffer' . $ln]) ? trim($_POST['txtWarrantyOffer' . $ln]) : '';
$keywords_search = isset($_POST['txtKeywordsSearch' . $ln]) ? trim($_POST['txtKeywordsSearch' . $ln]) : '';
$detail = isset($_POST['txtDetail' . $ln]) ? trim($_POST['txtDetail' . $ln]) : '';
$sort = isset($_POST['txtSort' . $ln]) ? trim($_POST['txtSort' . $ln]) : 0;
$status = $_POST['chkStatus' . $ln] != '' ? 1 : 0;
$fields_arr = array("parent" => "1", "parent_1" => "1", "id_code" => "'{$oldid}'", "code" => "'{$code}'", "type_link" => "'{$type_link}'", "url" => "'{$urlCode}'", "name" => "'{$name}'", "subject" => "'{$subject}'", "detail_short" => "'{$detail_short}'", "detail" => "'{$detail}'", "warranty_offer" => "'{$warranty_offer}'", "keywords_search" => "'{$keywords_search}'", "sort" => "{$sort}", "status" => "{$status}", "date_added" => "now()", "last_modified" => "now()", "lang" => "'{$ln}'");
$result = insert($tableCategoryConfig, $fields_arr);
}
/*-----------------------END THEM MOI*/
}
/*-----------------------THEM HINH*/
if ($result) {
$actConfig = removeVietnamese($defaulName, ' ', '_');
if (empty($_POST['id'])) {
$r = getRecord($tableCategoryConfigId, "id=" . $oldid);
}
$sqlUpdateField = "";
//THEM HINH image
if ($_POST['chkClearImg'] == '') {
$extsmall = substr($_FILES['txtImage']['name'], -4, 4);
if (makeUpload($_FILES['txtImage'], "{$path}/" . $actConfig . "_s" . $oldid . $extsmall)) {
@chmod("{$path}/" . $actConfig . "_s" . $oldid . $extsmall, 0777);
$sqlUpdateField = " image='{$pathdb}/" . $actConfig . "_s" . $oldid . $extsmall . "' ";
}
} else {
if (file_exists('../' . $r['image'])) {
@unlink('../' . $r['image']);
}
示例6: mkdir
//cap nhat hinh anh dai dien
$path = $folderLibrary . "/" . $idMember;
//$path = $folderLibrary;
if (!is_dir($path)) {
mkdir($path);
chmod($path, 0777);
//$noidunghtaccess = 'php_admin_flag engine off';
//$ft_u = $path."/.htaccess";
//$ft_u = fopen($ft_u,"w");
//fwrite($ft_u,$noidunghtaccess);
} else {
chmod($path, 0777);
}
///tao thu muc cua nguoi nay===ket thuc
$ArrImage = array('jpg', 'gif', 'bmp', 'jpeg', 'png');
$nameImage = removeVietnamese($nameMember, " ", "-");
//trim(str_replace("-", "",$nameMember));
//hinh Avatar
$filenameAvatar = $_FILES['txtImage']['name'];
$extlargeAvatar = end(explode(".", $filenameAvatar));
if (array_keys($ArrImage, $extlargeAvatar)) {
$file_nameInputAvatar = "{$path}/" . $nameImage . time() . "_avatar." . $extlargeAvatar;
if (makeUpload($_FILES['txtImage'], $file_nameInputAvatar)) {
@chmod($file_nameInputAvatar, 0404);
$sqlUpdateField .= " image='" . $file_nameInputAvatar . "' ";
//xoa file cu
if ($rowMemberIdInfo['image'] != '') {
@unlink($rowMemberIdInfo['image']);
}
}
}
示例7: removeVietnamese
$ip_city1 = $rowAdv['TenTinhThanh'];
$ip_city = removeVietnamese($ip_city1, " ", "-");
//lay url tu dong
$oldid = $rowAdv['ID'];
$arrayLi .= '"' . strtolower($ip_city) . '" => array(
';
$arrayLi .= '"' . strtolower($ip_city) . '" => "' . $ip_city1 . '",
';
$arrayLi1 = '';
$sqlDistrict = "select * from quanhuyen where MaTinhThanh={$oldid}";
$resultDistrict = @mysql_query($sqlDistrict, $conn);
while ($rowDistrict = @mysql_fetch_array($resultDistrict)) {
//Lay thong tin Adv===========
$nameDistrict = $rowDistrict['TenQuanHuyen'];
$oldidDistrict = $rowDistrict['ID'];
$urlDistrict11 = removeVietnamese($nameDistrict, " ", "-");
//lay url tu dong
$urlDistrict = strtolower($urlDistrict11);
//up bang city
$fields_arr1 = array("code" => "'{$urlDistrict}'");
//$result = update($tableCityId,$fields_arr1,"id=".$oldid);
//up bang dis
//$result = update('quanhuyen',$fields_arr1,"ID=".$oldidDistrict);
$arrayLi .= '"' . $rowDistrict['code'] . '" => "' . $rowDistrict['TenQuanHuyen'] . '",
';
}
$arrayLi .= '),
';
}
$xml_output = '<?php ';
$xml_output .= "\$" . "GEOIP_REGION_NAME_CITY= array(" . substr($arrayLi, 0, -1) . ");";
示例8: substr
<?php
require "../config.php";
require "../common_start.php";
include "../lib/func.lib.php";
//include('table_act.php');
?>
<?php
// Developed by Roshan Bhattarai
// Visit http://roshanbh.com.np for this script and more.
// This notice MUST stay intact for legal use
//this varible contains the array of existing users
//value got from the get metho
$tableUpdateAll = 'tbl_' . substr(trim($_GET['act']), 0, -2);
$url = removeVietnamese($_GET['urlCode'], " ", "-");
$ln = $_GET['lang'];
//checking weather user exists or not in $existing_users array
if (countRecord($tableUpdateAll, "url='" . $url . "' and lang='" . $ln . "'") > 0) {
//user name is not availble
echo "0";
} else {
//user name is available
echo "1";
}
示例9: while
<?php
$_lang_A = 'vn';
$folderIncAjax = "../";
require "../qweasd/hoanghung.php";
require "../qweasd/common_start.php";
include "../lib/func.lib.php";
//require("../language/language.php");
//require("../language/language_config.php");
include 'table_act.php';
include '../module/table_frame.php';
$i = 0;
$sql = "select *from tinhthanh";
$result = @mysql_query($sql, $conn);
while ($row = @mysql_fetch_array($result)) {
//BAT DAU VONG WHILE------------------------------
$name = removeVietnamese($row['TenTinhThanh'], "-", " ");
$cityRow = getRecord('tbl_city_id', "name='" . $name . "'");
if ($cityRow) {
$idcode = $cityRow['id'];
$fields_arrUpdateUrl = array("MaTinhThanh" => "'{$idcode}'");
$resultUrlUpdate = update('quanhuyen', $fields_arrUpdateUrl, "MaTinhThanh=" . $row['ID']);
echo $name = $cityRow['name'] . "<br>" . $i;
//echo $name = $cityRow['name']."<br>";
} else {
echo $name = $name . "---------------------" . $row['ID'] . "<br>";
}
$i++;
}
?>
</body>
示例10: isset
} else {
$rowSignIn = @mysql_fetch_array($resultSignIn);
$idMember = $rowSignIn['id'];
//echo "ok";
$resultLoginDate = @mysql_query("select * from " . $tableMemberLogin . " where date_login='" . $date_login . "' and id_code=" . $idMember . " and domain='" . $domain . "' limit 1", $conn);
$rowsLoginDate = @mysql_num_rows($resultLoginDate);
if ($rowsLoginDate < 1) {
echo "<script>window.location='" . $serverName . MEMBERMEMBERL . "/" . $_lang . "'</script>";
} else {
//echo "ok";
$_SESSION['member'] = isset($_SESSION['member']) ? $_SESSION['member'] : $email;
$_SESSION['memberlogin'] = $strtotimeDmyGia;
$url_bookstore = $rowSignIn['url_bookstore'];
//exp thong tin thanh vien
if ($url_bookstore == '') {
$name = $rowSignIn['name'];
$member_id_c = $idMember;
$url_bookstore_array = explode("@", $email);
$url_bookstore_b = trim($url_bookstore_array[0]);
$url_bookstore1 = removeVietnamese($url_bookstore_b, "-", "");
//lay url tu dong
$url_bookstore = trim(str_replace("_", "", $url_bookstore1)) . $member_id_c;
$typeViewMember = 0;
$styleMember = $folderCss;
include $folderIncAjax . $folderMember . '/exp_info_member.php';
}
//exp thong tin thanh vien
echo "<script>window.location='" . $openidReturn_type . "?openidReturn_to=" . $urlFullMahoa . "'</script>";
}
}
}