/** * $tongcongkg : giá từng sp * số lượng * $tongcong : tổng giá tất cả sản phẩm trong giỏ hàng */ function checkexist() { $cart = $_SESSION['cart']; foreach ($cart as $product) { if ($product[0] == killInjection($_REQUEST['idPro'])) { return true; } } return false; }
<span style="font-family:Tahoma; color:#999999; font-size:12px; font-weight:600; text-decoration:none">[Quay lại]</span></a></td></tr> </table> <br /> <table align="center" border="0" width="98%" cellpadding="0" cellspacing="0" class="style27"> <tr> <td valign="top" align="left"><img src="images/line_h1.gif" hspace="5" border="0"/></td> </tr> <tr><td height="10px"></td></tr> </table> <table align="center" border="0" width="98%" cellpadding="0" cellspacing="0"> <?php $per_page = 5; $p = 0; if ($_REQUEST['p'] != '') { $p = killInjection($_REQUEST['p']); } $code = $_lang == 'vn' ? 'vn_news' : 'en_news'; $parentWhere = "and parent = (select id from tbl_content_category where code='" . $code . "')"; $sql = "select * from tbl_content where status=0 AND id<>'" . $row['id'] . "' AND parent=" . $row['parent'] . " {$parentWhere} order by sort,date_added desc limit " . $per_page * $p . "," . $per_page; $result = @mysql_query($sql, $conn); $total = countRecord("tbl_content", "status=0 and parent=" . $row['parent']); while ($n = mysql_fetch_assoc($result)) { ?> <tr> <td width="30"><img src="images/icon_2.gif" border="0" hspace="5" /></td> <td width="900" valign="middle"> <a class="link6" href="./?frame=news_detail&id=<?php echo $n['id']; ?> &p=<?php
$l_PriceFrom = $_lang == 'vn' ? 'Giá từ' : 'Price from'; $l_PriceTo = $_lang == 'vn' ? 'Giá đến' : 'Price to'; $l_DateFrom = $_lang == 'vn' ? 'Từ ngày' : 'From date'; $l_DateTo = $_lang == 'vn' ? 'Đến ngày' : 'To date'; $l_DateFormat = $_lang == 'vn' ? 'Tháng / ngày / năm' : 'month / day / year'; ?> <?php $row = 3; $col = 4; if (isset($_REQUEST['act'])) { ?> <?php $where = "1=1"; $keyword = killInjection($_REQUEST['keyword']); if ($keyword != '') { $where .= " and (detail_short like '%" . $keyword . "%' or detail like '%" . $keyword . "%'"; if (!isset($_REQUEST['search_in_detail'])) { $where .= " or code like '%" . $keyword . "%' or name like '%" . $keyword . "%'"; } $where .= ") "; } if ($_REQUEST['parent'] != '') { $where .= " and parent=" . $_REQUEST['parent']; } if ($_REQUEST['pfrom'] != '') { $where .= " and price>=" . $_REQUEST['pfrom']; } if ($_REQUEST['pto'] != '') { $where .= " and price<=" . $_REQUEST['pto'];
<?php $new_keywords = killInjection($_REQUEST['keyword']); $whereNewAll = "(name like '%" . $new_keywords . "%' or detail_short like '%" . $new_keywords . "%') "; //$totalNew = countRecord($tableNew,$whereNewAll); $name_c = TSEARCH; $name_title_c = $name_c; $showHtmlHomeConnert = "\n <link href=\"" . $serverName . "css/details.css\" rel=\"stylesheet\" type=\"text/css\"/>"; include $folderModule . "/right.php"; include $folderNew . '/new_page.php'; $showHtmlHomeConnert .= "\n <div class=\"container\">\n <div class=\"duongdan\"><a href=\"" . $serverName . "\" title=\"Du học Tân Tiến\">Trang chủ</a> <font size=\"3\">»</font> <a href=\"" . $serverName . $code_frame . "/\" title=\"" . $name_title_c . "\">{$name_title_c}</a></div>\n <p class=\"line1\"></p>\n <div class=\"content floatLeft\">\n <div class=\"menungangtop\"><h1>Tìm kiếm từ khóa <span style=\"text-transform: none;color: #000;\">{$new_keywords}</span></h1></div>\n <div class=\"public content-left product-r floatLeft\">\n <div class=\"contentblok-left-1\">\n <div class=\"left\">\n {$showHtmlNewHomTop}\n </div><!--End div rights-->\n </div><!--End contentblok-left-1-->\n </div><!--End content-left-->\n </div>\n {$asideright}\n <div class=\"clear\"></div>\n </div>\n ";
<?php $new_keywords = killInjection($_REQUEST['keyword']); $whereNewAll = "parent_1=245 and (type_search like '%" . $new_keywords . "%' or type_search_1 like '%" . $new_keywords . "%') "; //$totalNew = countRecord($tableNew,$whereNewAll); $keyName = killInjection($_REQUEST['keyName']); $name_c = TSEARCH; $name_title_c = $name_c; $showHtmlHomeConnert = "\n\n <link href=\"" . $serverName . "css/details.css\" rel=\"stylesheet\" type=\"text/css\"/>"; include $folderModule . "/left.php"; include $folderNew . '/product_page.php'; $showHtmlHomeConnert .= "\n {$showhtmlAdvAllLi2}\n<div class=\"title_page\">\n<h2 class=\"details-title\"><a href=\"" . $serverName . "\" title=\"Trang chủ\">Trang chủ</a>" . $showHtmlTitlePage . " <font size=\"3\">»</font> " . $keyName . " </h2>\n</div>{$showHtmlNewHomTop}\n"; ?>
<?php $row = 3; $col = 3; $cat = 0; if ($_REQUEST['cat'] != '') { $cat = killInjection($_REQUEST['cat']); } $p_new = 0; if ($_REQUEST['p_new'] != '') { $p_new = $_REQUEST['p_new']; } $sql = "select tbl_product.*,tbl_product_new.sort as sort from tbl_product_new,tbl_product where tbl_product_new.lang='" . $_lang . "' and tbl_product_new.product_id = tbl_product.id order by tbl_product_new.sort limit " . $row * $col * $p_new . "," . $row * $col; $result = @mysql_query($sql, $conn); $total = countRecord("tbl_product_new", "status=0 and lang='" . $_lang . "'"); if ($total == 0) { ?> <link href="../css/style.css" rel="stylesheet" type="text/css" /> <table align="center" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr><td height="20"></td></tr> <tr> <td align="center"> <font color="#FFFFFF"><strong><?php echo $_lang == "vn" ? 'Sản phẩm mới đang cập nhật !' : 'Products are being updated !'; ?> </strong></font> </td> </tr> <tr><td height="20"></td></tr> </table> <?php