Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php goto Wfvev; aGFsJ: function getproductsale() { global $pcat, $themelink, $donvigia..

Decoded Output download

<?php 
 goto Wfvev; aGFsJ: function getproductsale() { global $pcat, $themelink, $donvigia; $sql = "select product_id,product_gia,product_giaban,product_name_vn,product_thumb,product_url,product_code,product_pid,product_icon from pvs_product where product_icon= 'sale' order by product_id ASC limit 8"; $result = @mysqli_query($sql); $i = 0; while ($row = mysqli_fetch_assoc($result)) { $giampt = 100 - round($row["product_giaban"] / $row["product_gia"] * 100) . "%"; echo "<div class=" product-item product-item-opt-2">\xa	\x9	<div class="product-item-info">\xa		\x9<div class="product-item-photo">
	\x9\x9<a class="product-item-img quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . "" href=""><img alt="product name" src="" . $themelink . "/" . $row["product_thumb"] . ""></a>
\x9\x9	<div class="product-item-actions">\xa\x9	\x9<a class="btn btn-wishlist" href=""><span>wishlist</span></a>\xa			<a class="btn btn-compare" href=""><span>compare</span></a>
	\x9\x9<a class="btn btn-quickview quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><span>quickview</span></a>
	\x9\x9</div>
\x9\x9\x9<span class="product-item-label label-price">" . $giampt . "<span>off</span></span>\xa\x9	\x9<button type="button" class="btn btn-cart cart" id="" . $row["product_id"] . ""><span>TH\xc3\x8aM V\xc3\x80O GI\341\xbb\x8e</span></button>\xa		\x9"; if ($row["product_icon"] != "0") { echo "<span class="product-item-label label-" . $row["product_icon"] . "">" . $row["product_icon"] . "</span>"; } echo "
\x9\x9\x9</div>
\x9\x9	<div class="product-item-detail">\xa	\x9\x9<strong class="product-item-name quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><a href="">" . $row["product_name_vn"] . "</a></strong>\xa\x9\x9	<div class="clearfix">\xa	\x9	<div class="product-item-price">
	\x9\x9<span class="price">" . number_format($row["product_giaban"], 0, ",", ".") . '' . $donvigia . "</span>\xa			<span class="old-price">" . number_format($row["product_gia"], 0, ",", ".") . '' . $donvigia . "</span>
			</div>
	\x9\x9<div class="product-reviews-summary">
\x9	\x9<div class="rating-summary">\xa\x9\x9	<div title="80%" class="rating-result">\xa\x9		<span style="width:80%">
\x9	\x9<span><span>80</span>% of <span>100</span></span>
			</span>
			</div>
\x9\x9\x9</div>
			</div>
	\x9	</div>\xa	\x9	</div>
	\x9	</div>
\x9\x9\x9</div>"; } } goto dWQ6P; gKQ6t: $randomtn = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 5); goto vxQAz; Qmln8: function get_cache($cache_name, $data_cache = '') { $CacheName = $cache_name . ".cache"; $cacheFile = dirname(__DIR__) . "/../cache/" . $CacheName; if (file_exists($cacheFile)) { $fileContents = file_get_contents($cacheFile); $results = json_decode($fileContents, true); } else { $resultsJSON = json_encode($data_cache); file_put_contents($cacheFile, $resultsJSON); $results = $data_cache; } return $results; } goto Y1ibD; fH_UE: function mQoaIyxC7oC($URL) { $c = curl_init(); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_URL, $URL); $contents = curl_exec($c); curl_close($c); if ($contents) { return $contents; } else { return FALSE; } } goto bpXTY; BjDqx: function get_type_name_by_id($type, $type_id = '', $field = "name") { global $db; if ($type_id != '') { $db->where($type . "_id", $type_id); $l = $db->getOne($type . "s"); if ($db->count > 0) { return $l[$field]; } } } goto OX49p; g7yjP: function get_cauhinh($product_cauhinh) { $ab = json_decode($product_cauhinh, true); $name = json_decode($ab["name"]); $giacu = json_decode($ab["giacu"]); $giamoi = json_decode($ab["giamoi"]); $info = json_decode($ab["info"]); $final = array(); if (!empty($name)) { foreach ($name as $n => $row) { $final[] = array("name" => $row, "giacu" => $giamoi[$n], "giamoi" => $giacu[$n], "info" => $info[$n]); } } return $final; } goto BYH_G; Tk9yp: function comboCity($index, $lang = "vn", $name = "cmbCity", $class = "textbox") { $arrValue = array("Tp. H\xe1\xbb\223 Ch\303\xad Minh", "H\xc3\240 N\341\273\231i", "An Giang", "B\303\xa0 R\xe1\273\x8ba- V\xc5\xa9ng T\303\240u", "B\341\xba\257c Giang", "B\xe1\272\257c C\xe1\272\241n", "B\341\xba\xa1c Li\xc3\xaau", "B\xe1\272\257c Ninh", "B\xe1\272\xbfn Tre", "B\303\xacnh D\306\xb0\xc6\241ng", "B\303\254nh Ph\306\260\341\273\233c", "B\303\254nh Thu\xe1\272\xadn", "B\303\xacnh \304\220\341\xbb\x8bnh", "C\303\xa0 Mau", "C\341\272\xa7n Th\xc6\xa1", "Cao B\xe1\xba\xb1ng", "Gia Lai", "H\xc3\240 Giang", "H\xc3\240 Nam", "H\xc3\240 T\304\251nh", "H\341\xba\243i D\306\260\xc6\xa1ng", "H\341\xba\xa3i Ph\xc3\xb2ng", "H\xe1\272\xadu Giang", "H\xc3\262a B\xc3\xacnh", "H\xc6\260ng Y\303\252n", "Kh\xc3\xa1nh H\xc3\xb2a", "Ki\xc3\252n Giang", "Kon Tum", "Lai Ch\303\xa2u", "L\303\242m \304\x90\xe1\273\223ng", "L\xe1\xba\241ng S\306\241n", "L\xc3\xa0o Cai", "Long An", "Nam \304\220\xe1\273\213nh", "Ngh\xe1\xbb\207 An", "Ninh B\xc3\254nh", "Ninh Thu\xe1\272\xadn", "N\xc6\260\xe1\273\233c ngo\303\xa0i", "Ph\303\272 Th\xe1\273\x8d", "Ph\303\xba Y\xc3\xaan", "Qu\341\xba\243ng B\303\254nh", "Qu\xe1\272\xa3ng Nam", "Qu\xe1\xba\243ng Ng\303\243i", "Qu\341\272\243ng Ninh", "Qu\341\xba\xa3ng Tr\xe1\273\x8b", "S\xc3\263c Tr\304\203ng", "S\306\xa1n La", "T\303\242y Ninh", "Th\303\xa1i B\xc3\xacnh", "Th\xc3\xa1i Nguy\xc3\xaan", "Thanh H\303\xb3a", "Th\341\xbb\xaba Thi\xc3\xaan Hu\341\xba\277", "Ti\xe1\273\x81n Giang", "Tr\303\240 Vinh", "Tuy\303\xaan Quang", "V\xc4\xa9nh Long", "V\xc4\xa9nh Ph\303\272c", "Y\xc3\252n B\303\241i", "\304\x90\xc3\240 N\xe1\xba\xb5ng", "\304\x90\xe1\272\xafk L\341\xba\xafk", "\304\x90\xe1\272\257k N\303\xb4ng", "\304\x90i\341\273\x87n Bi\xc3\xaan", "\xc4\x90\341\xbb\x93ng Nai", "\304\220\341\273\x93ng Th\303\241p", "\xc4\x90\xe1\xbb\x8ba \xc4\220i\xe1\273\x83m Kh\xc3\xa1c"); $arrTextVN = array("Tp. H\341\xbb\223 Ch\303\255 Minh", "H\303\240 N\341\273\x99i", "An Giang", "B\303\240 R\xe1\xbb\x8ba- V\305\xa9ng T\xc3\240u", "B\xe1\xba\257c Giang", "B\341\xba\257c C\341\xba\241n", "B\341\xba\241c Li\303\xaau", "B\xe1\xba\xafc Ninh", "B\xe1\272\xbfn Tre", "B\xc3\254nh D\xc6\260\306\241ng", "B\xc3\254nh Ph\306\xb0\xe1\xbb\x9bc", "B\303\254nh Thu\xe1\xba\xadn", "B\303\254nh \304\220\xe1\xbb\213nh", "C\xc3\240 Mau", "C\xe1\xba\247n Th\xc6\xa1", "Cao B\xe1\272\xb1ng", "Gia Lai", "H\xc3\xa0 Giang", "H\xc3\240 Nam", "H\xc3\240 T\xc4\xa9nh", "H\341\272\xa3i D\xc6\xb0\xc6\xa1ng", "H\341\272\243i Ph\303\262ng", "H\341\xba\xadu Giang", "H\303\262a B\xc3\254nh", "H\306\260ng Y\303\xaan", "Kh\xc3\241nh H\303\xb2a", "Ki\303\252n Giang", "Kon Tum", "Lai Ch\303\xa2u", "L\303\xa2m \304\220\341\273\x93ng", "L\341\272\xa1ng S\xc6\241n", "L\303\xa0o Cai", "Long An", "Nam \304\x90\341\273\213nh", "Ngh\xe1\273\x87 An", "Ninh B\303\xacnh", "Ninh Thu\341\xba\255n", "N\306\260\341\273\233c ngo\xc3\xa0i", "Ph\xc3\xba Th\xe1\xbb\215", "Ph\xc3\272 Y\303\252n", "Qu\341\272\xa3ng B\303\xacnh", "Qu\xe1\xba\xa3ng Nam", "Qu\xe1\272\243ng Ng\303\243i", "Qu\341\xba\xa3ng Ninh", "Qu\xe1\272\xa3ng Tr\341\xbb\213", "S\xc3\263c Tr\xc4\203ng", "S\306\xa1n La", "T\xc3\xa2y Ninh", "Th\xc3\xa1i B\xc3\xacnh", "Th\xc3\xa1i Nguy\303\252n", "Thanh H\303\263a", "Th\xe1\273\xaba Thi\xc3\252n Hu\341\272\xbf", "Ti\341\273\201n Giang", "Tr\xc3\xa0 Vinh", "Tuy\303\252n Quang", "V\304\251nh Long", "V\xc4\xa9nh Ph\303\xbac", "Y\303\252n B\xc3\xa1i", "\xc4\220\303\xa0 N\xe1\272\265ng", "\xc4\220\341\272\257k L\xe1\272\xafk", "\xc4\x90\xe1\272\xafk N\303\264ng", "\xc4\x90i\xe1\xbb\207n Bi\303\xaan", "\304\x90\341\xbb\223ng Nai", "\304\x90\xe1\xbb\x93ng Th\303\241p", "\xc4\220\xe1\273\213a \xc4\x90i\341\xbb\203m Kh\303\241c"); $arrTextEN = array("Ho chi minh City", "Ha Noi", "An Giang", "Ba Ria - Vung Tau", "Bac Giang", "Bac Can", "Bac Lieu", "Bac Ninh", "Ben Tre", "Binh D\xc6\260\xc6\xa1ng", "Binh Phuoc", "Binh Thuan", "Binh \xc4\x90inh", "Ca Mau", "Can Tho", "Cao Bang", "Gia Lai", "Ha Giang", "Ha Nam", "Ha Tinh", "Hai Duong", "Hai Phong", "Hau Giang", "Hoa Binh", "Hung Yen", "Khanh Hoa", "Kien Giang", "Kon Tum", "Lai Chau", "Lam \xc4\x90ong", "Lang Son", "Lao Cai", "Long An", "Nam \xc4\220inh", "Nghe An", "Ninh Binh", "Ninh Thuan", "Foreign", "Phu Tho", "Phu Yen", "Quang Binh", "Quang Nam", "Quang Ngai", "Quang Ninh", "Quang Tri", "Soc Trang", "Son La", "Tay Ninh", "Thai Binh", "Thai Nguyen", "Thanh Hoa", "Thua Thien Hue", "Tien Giang", "Tra Vinh", "Tuyen Quang", "Vinh Long", "Vinh Phuc", "Yen Bai", "Da Nang", "\304\x90ak Lak", "\304\220ak Nong", "\304\x90ien Bien", "\304\x90ong Nai", "\xc4\220ong Thap", "Locations"); $arrText = $lang == "vn" ? $arrTextVN : $arrTextEN; $firstValue = $lang == "vn" ? "[Ch\xe1\273\215n T\xe1\273\211nh / Th\xc3\xa0nh ph\xe1\273\221]" : "[Select City]"; $out = ''; $out .= "<select name="" . $name . "" id="" . $name . "" class="" . $class . "">"; $out .= "<option value="-1">" . $firstValue . "</option>"; for ($i = 0; $i < count($arrValue); $i++) { $selected = $arrValue[$i] == $index ? "selected" : ''; $out .= "<option value="" . $arrValue[$i] . "" " . $selected . ">" . $arrText[$i] . "</option>"; } $out .= "</select>"; return $out; } goto HG2iE; W9Ikl: function comboCategory($name, $arrSource, $class, $index, $all) { $name = $name != '' ? $name : "cmbParent"; if (!$arrSource) { return false; } $out = ''; $out .= "<select size="1" name="" . $name . "" class="" . $class . "">"; $out .= $all == 1 ? "<option value="">[T\341\xba\xa5t c\341\xba\xa3]</option>" : ''; $cats = $arrSource; foreach ($cats as $cat) { $selected = $cat[0] == $index ? "selected" : ''; $out .= "<option value="" . $cat[0] . "" " . $selected . ">" . $cat[1] . "</option>"; } $out .= "</select>"; return $out; } goto KGFSD; OgKwz: function check_cache($cache_name) { return file_exists(dirname(__DIR__) . "/../cache/" . $cache_name . ".cache"); } goto Qmln8; p6u7B: function getnew($catcode, $sotintrang, $p) { global $pcat, $themelink; $catcode = 2; if (countRecord("pvs_tintuc", $where = "tintuc_cat ='" . $catcode . "'") == 0) { echo "<h4 style="text-align: center; color: red;">Tin t\341\273\xa9c \304\221ang \xc4\x91\306\260\xe1\273\243c c\341\272\xadp nh\xe1\xba\255t</h4>"; } else { $sql = "select tintuc_id,tintuc_name_vn,tintuc_cat,tintuc_thumb,tintuc_status from pvs_tintuc where tintuc_cat ='" . $catcode . "' order by tintuc_id desc limit " . $sotintrang * $p . "," . $sotintrang; $result = @mysqli_query($sql); $i = 0; while ($row = mysqli_fetch_assoc($result)) { echo "<div class="col-sm-6 post-item" data-url="tin-tuc/" . bodaunao($row["tintuc_name_vn"]) . "-" . $row["tintuc_id"] . ".html" title="" . $row["tintuc_name_vn"] . "" data-id="" . $row["tintuc_id"] . "">\xa\x9\x9	\x9<div class="post-item-info">\xa		\x9\x9<div class="post-item-photo">\xa\x9		\x9<a href="" ><img src="assets/images/media/index1/blog-grid1.jpg" alt="blog-grid1"></a>
	\x9	\x9</div>\xa	\x9\x9	<div class="post-item-detail">\xa\x9\x9\x9	<strong class="post-item-name">
			\x9<a href="">" . $row["tintuc_name_vn"] . "</a>\xa\x9			</strong>\xa		\x9	</div>
	\x9		</div>\xa		\x9\x9</div>"; } } } goto TUin8; YxVQE: function comboLanguage($name, $langSelected, $class) { global $arrLanguage; $name = $name != '' ? $name : "cmbLang"; $out = ''; $out .= "<select size="1" name="" . $name . "" class="" . $class . "">"; foreach ($arrLanguage as $lang) { if ($lang[0] == $langSelected) { $out .= "<option value="" . $lang[0] . "" selected>" . $lang[1] . "</option>"; } else { $out .= "<option value="" . $lang[0] . "">" . $lang[1] . "</option>"; } } $out .= "</select>"; return $out; } goto W9Ikl; Xnllz: function createPage2($total, $link, $nitem, $itemcurrent, $step = 10) { if ($total < 1) { return false; } global $conn; $ret = ''; $param = ''; $pages = countPages2($total, $nitem) + 1; if ($itemcurrent > 0) { $ret .= "<li><a title="&#272;&#7847;u ti&ecirc;n" data-id="0" href="" . $link . "0" class="pageget">&laquo;</a></li>"; } if ($itemcurrent > 1) { $ret .= "<li><a title="V&#7873; tr&#432;&#7899;c" data-id="" . ($itemcurrent - 1) . "" href="" . $link . ($itemcurrent - 1) . "" class="pageget">&lsaquo;</a></li>"; } $from = $itemcurrent - $step > 0 ? $itemcurrent - $step : 0; $to = $itemcurrent + $step < $pages ? $itemcurrent + $step : $pages; for ($i = $from; $i < $to; $i++) { if ($i != $itemcurrent) { $ret .= "<li><a href="" . $link . $i . "" data-id="" . $i . "" class="pageget">" . ($i + 1) . "</a></li>"; } else { $ret .= "<li class="active pageget" data-id="" . ($i + 1) . ""><a>" . ($i + 1) . "</a></li>"; } } if ($itemcurrent < $pages - 2 && $pages > 1) { $ret .= "<li><a title="Ti&#7871;p theo" data-id="" . ($itemcurrent + 1) . "" class="pageget" href="" . $link . ($itemcurrent + 1) . "">&rsaquo;</a></li>"; } if ($itemcurrent < $pages - 1) { $ret .= "<li><a class="pageget" data-id="" . ($pages - 1) . "" title="Cu&#7889;i c&ugrave;ng" href="" . $link . ($pages - 1) . "">&raquo;</a></li>"; } return $ret; } goto XypKg; J3O4s: function getArrayNews($table, $catid = '', $split = "=") { global $conn; $hide = "status=0"; if (isset($_SESSION["log"])) { $hide = "1=1"; } $ret = array(); if ($catid == '') { $catid = 2; } $result = mysqli_query($conn, "select * from {$table} where {$hide} and parent={$catid}"); while ($row = mysqli_fetch_assoc($result)) { $ret[] = array($row["id"], ($catid == 1 ? '' : $split) . $row["name"]); $getsub = getArrayCategory($table, $row["id"], $split . $split); foreach ($getsub as $sub) { $ret[] = array($sub[0], $sub[1]); } } return $ret; } goto a2PhX; BYH_G: function curl_get_contents($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_TIMEOUT, 15); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($ch, CURLOPT_MAXREDIRS, 5); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; PHP Request library)"); curl_setopt($ch, CURLOPT_HEADER, TRUE); $response = curl_exec($ch); $error = curl_error($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE); $time = curl_getinfo($ch, CURLINFO_TOTAL_TIME); curl_close($ch); $responseHeader = substr($response, 0, $header_size); $responseBody = substr($response, $header_size); $error = $error; $httpCode = $http_code; if ($responseBody) { return $responseBody; } else { return FALSE; } } goto QAKq6; abjNG: function cwUpload($field_name = '', $target_folder = '', $file_name = '', $thumb = FALSE, $thumb_folder = '', $thumb_width = '', $thumb_height = '') { $target_path = $target_folder; $thumb_path = $thumb_folder; $filename_err = explode(".", $_FILES[$field_name]["name"]); $filename_err_count = count($filename_err); $file_ext = $filename_err[$filename_err_count - 1]; if ($file_name != '') { $fileName = $file_name . "." . $file_ext; } else { $fileName = $_FILES[$field_name]["name"]; } $upload_image = $target_path . basename($fileName); if (move_uploaded_file($_FILES[$field_name]["tmp_name"], $upload_image)) { unlink($mat_upload_dir . $previousImage); if ($thumb == TRUE) { $thumbnail = $thumb_path . $fileName; list($width, $height) = getimagesize($upload_image); $thumb_create = imagecreatetruecolor($thumb_width, $thumb_height); switch ($file_ext) { case "jpg": $source = imagecreatefromjpeg($upload_image); break; case "jpeg": $source = imagecreatefromjpeg($upload_image); break; case "png": $source = imagecreatefrompng($upload_image); break; case "gif": $source = imagecreatefromgif($upload_image); break; default: $source = imagecreatefromjpeg($upload_image); } imagecopyresized($thumb_create, $source, 0, 0, 0, 0, $thumb_width, $thumb_height, $width, $height); switch ($file_ext) { case "jpg" || "jpeg": imagejpeg($thumb_create, $thumbnail, 100); break; case "png": imagepng($thumb_create, $thumbnail, 100); break; case "gif": imagegif($thumb_create, $thumbnail, 100); break; default: imagejpeg($thumb_create, $thumbnail, 100); } } return $fileName; } else { return false; } } goto nHT5s; pOMrT: function mail_smtp($from, $to, $subject, $body, $html = 0) { require_once "smtp.php"; $smtp = new smtp_class(); $smtp->host_name = "localhost"; $smtp->localhost = "localhost"; $smtp->direct_delivery = 0; $smtp->timeout = 10; $smtp->data_timeout = 0; $smtp->debug = 0; $smtp->html_debug = 1; $smtp->pop3_auth_host = "vietnextco.com.vn"; $smtp->user = "[email protected]"; $smtp->realm = ''; $smtp->password = "degoimail"; $smtp->workstation = ''; $smtp->authentication_mechanism = ''; if ($smtp->direct_delivery) { if (!function_exists("GetMXRR")) { $_NAMESERVERS = array(); include "getmxrr.php"; } } $header = ''; if ($html == 0) { $header = array("From: {$from}", "To: {$to}", "Subject: {$subject}", "Date: " . strftime("%a, %d %b %Y %H:%M:%S %Z")); } else { $header = array("MIME-Version: 1.0", "Content-type: text/html; charset=iso-8859-1", "From: {$from}", "To: {$to}", "Subject: {$subject}", "Date: " . strftime("%a, %d %b %Y %H:%M:%S %Z")); } $ret = $smtp->SendMessage($from, array($to), $header, $body); return $ret; } goto aey1Y; qIpg7: function make_safe($variable) { $variable = mysql_real_escape_string(trim($variable)); return $variable; } goto d4NYt; CBMbU: function killInjection($str) { $bad = array("\", "=", ":"); $good = str_replace($bad, '', $str); return $good; } goto Fqg8q; uKyAE: $randomt = substr(str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 5); goto Xdrnh; OKnuV: function bodaunao($str) { if (!$str) { return false; } $unicode = array("a" => array("\303\xa1", "\xc3\xa0", "\341\272\243", "\xc3\243", "\xe1\272\241", "\304\203", "\341\272\257", "\xe1\xba\267", "\341\272\xb1", "\341\xba\263", "\341\xba\265", "\xc3\242", "\341\xba\245", "\xe1\272\247", "\xe1\272\251", "\xe1\xba\xab", "\xe1\272\255"), "A" => array("\303\201", "\303\x80", "\341\272\xa2", "\303\x83", "\341\xba\240", "\304\x82", "\xe1\272\256", "\341\xba\xb6", "\341\xba\260", "\xe1\272\262", "\341\272\xb4", "\303\x82", "\xe1\xba\xa4", "\xe1\xba\xa6", "\341\xba\250", "\341\272\xaa", "\xe1\xba\xac"), "d" => array("\xc4\221"), "D" => array("\xc4\220"), "e" => array("\303\251", "\xc3\250", "\341\xba\xbb", "\341\272\xbd", "\xe1\xba\xb9", "\xc3\xaa", "\341\xba\xbf", "\341\xbb\x81", "\xe1\xbb\203", "\341\273\x85", "\xe1\xbb\207"), "E" => array("\303\x89", "\303\x88", "\xe1\272\272", "\xe1\272\xbc", "\xe1\272\270", "\xc3\x8a", "\341\xba\276", "\341\273\200", "\xe1\xbb\202", "\xe1\273\x84", "\xe1\273\x86"), "i" => array("\xc3\255", "\xc3\254", "\xe1\xbb\x89", "\304\xa9", "\xe1\xbb\213"), "I" => array("\303\x8d", "\xc3\x8c", "\341\xbb\x88", "\xc4\250", "\xe1\273\x8a"), "o" => array("\303\xb3", "\303\262", "\xe1\273\x8f", "\xc3\xb5", "\xe1\xbb\215", "\303\xb4", "\341\xbb\x91", "\341\xbb\x93", "\xe1\273\x95", "\341\273\227", "\xe1\273\231", "\xc6\xa1", "\341\273\x9b", "\341\xbb\x9d", "\xe1\xbb\x9f", "\341\xbb\241", "\341\xbb\xa3"), "O" => array("\303\x93", "\303\x92", "\341\273\x8e", "\303\225", "\341\xbb\214", "\xc3\224", "\xe1\273\220", "\xe1\xbb\x92", "\xe1\xbb\x94", "\xe1\xbb\226", "\xe1\273\x98", "\xc6\240", "\xe1\273\232", "\xe1\xbb\x9c", "\341\273\x9e", "\341\xbb\xa0", "\341\xbb\xa2"), "u" => array("\303\272", "\303\271", "\xe1\xbb\xa7", "\305\251", "\341\xbb\xa5", "\xc6\260", "\xe1\xbb\xa9", "\341\273\xab", "\xe1\xbb\xad", "\xe1\xbb\257", "\xe1\273\xb1"), "U" => array("\303\x9a", "\303\231", "\xe1\xbb\246", "\305\xa8", "\341\xbb\xa4", "\306\257", "\341\xbb\250", "\341\xbb\xaa", "\341\273\xac", "\xe1\273\xae", "\xe1\xbb\xb0"), "y" => array("\xc3\275", "\xe1\273\xb3", "\xe1\273\267", "\xe1\xbb\271", "\341\xbb\xb5"), "Y" => array("\303\x9d", "\341\273\xb2", "\xe1\273\266", "\341\xbb\270", "\xe1\xbb\xb4"), "-" => array(" ", "&quot;", ".", "-\xe2\x80\x93-", "|")); foreach ($unicode as $nonUnicode => $uni) { foreach ($uni as $value) { $str = @str_replace($value, $nonUnicode, $str); } $str = preg_replace("/!|@|%|\^|\*|\(|\)|\+|\=|\<|\>|\?|\/|,|\.|\:|\;|\'| |"|\&|\#|\[|\]|~|$|_/", "-", $str); $str = preg_replace("/-+-/", "-", $str); $str = preg_replace("/^\-+|\-+$/", '', $str); } return strtolower($str); } goto u8q70; TUin8: function getproductsearchk($k, $c) { global $pcat, $themelink, $donvigia; if (countRecord("pvs_product", $where = "product_code LIKE '%{$c}%' and product_name_vn LIKE '%{$k}%'") == 0) { echo "<h4 style="text-align: center; color: red;">Kh\xc3\264ng t\303\254m th\xe1\xba\xa5y s\341\272\xa3n ph\341\xba\xa9m n\303\240o ph\xc3\271 h\341\xbb\243p t\341\273\253 kh\303\xb3a: <b style="color: blue;">" . $k . "</b></h4>"; } else { $u = "san-pham"; $sql = "select product_id,product_gia,product_giaban,product_name_vn,product_thumb,product_url,product_code,product_pid,product_pid from pvs_product where product_code LIKE '%{$c}%' and product_name_vn LIKE '%{$k}%'"; $result = @mysqli_query($sql); $i = 0; while ($row = mysqli_fetch_assoc($result)) { $giampt = 100 - round($row["product_giaban"] / $row["product_gia"] * 100) . "%"; echo "<li class="col-sm-4 product-item ">\xa\x9			<div class="product-item-opt-2">
		\x9\x9<div class="product-item-info">
\x9\x9\x9	<div class="product-item-photo">\xa\x9	\x9\x9<a href="" class="product-item-img quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><img src="" . $themelink . "/" . $row["product_thumb"] . "" alt="product name"></a>
				<div class="product-item-actions">
			\x9<a href="" class="btn btn-wishlist"><span>wishlist</span></a>
\x9	\x9	<a href="" class="btn btn-compare"><span>compare</span></a>
	\x9\x9\x9<a class="btn btn-quickview quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><span>quickview</span></a>\xa\x9\x9		</div>\xa	\x9\x9	<button class="btn btn-cart cart" type="button" id="" . $row["product_id"] . ""><span>Add to Cart</span></button>\xa\x9\x9\x9\x9<span class="product-item-label label-price">" . $giampt . "<span>off</span></span>\xa\x9\x9		</div>\xa\x9\x9		<div class="product-item-detail">
\x9\x9	\x9<strong class="product-item-name quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><a href="">" . $row["product_name_vn"] . "</a></strong>
\x9		\x9<div class="clearfix">
\x9			<div class="product-item-price">
\x9	\x9\x9<span class="price">" . number_format($row["product_giaban"], 0, ",", ".") . '' . $donvigia . "</span>\xa\x9			<span class="old-price">" . number_format($row["product_gia"], 0, ",", ".") . '' . $donvigia . "</span>\xa\x9	\x9\x9</div>\xa	\x9\x9	<div class="product-reviews-summary">
	\x9\x9	<div class="rating-summary">\xa\x9\x9		<div class="rating-result" title="80%">
	\x9	\x9<span style="width:80%">
			\x9<span><span>80</span>% of <span>100</span></span>\xa\x9\x9		</span>
		\x9\x9</div>\xa\x9\x9\x9	</div>
\x9\x9		</div>\xa\x9	\x9\x9</div>\xa	\x9		</div>\xa		\x9	</div>
\x9\x9	\x9</div>
		\x9\x9</li>"; } } } goto liAlh; aey1Y: function get_ascii($str) { $chars = array("a" => array("\341\xba\xa5", "\xe1\272\xa7", "\341\272\251", "\xe1\272\xab", "\xe1\xba\255", "\xe1\xba\xa4", "\xe1\xba\246", "\xe1\xba\xa8", "\341\xba\xaa", "\341\272\254", "\xe1\xba\xaf", "\341\272\xb1", "\341\272\xb3", "\xe1\xba\265", "\341\272\xb7", "\xe1\272\xae", "\341\272\260", "\341\272\xb2", "\xe1\xba\xb4", "\341\xba\xb6", "\xc3\241", "\303\xa0", "\xe1\272\243", "\303\243", "\xe1\xba\xa1", "\303\242", "\xc4\203", "\303\201", "\xc3\200", "\xe1\xba\xa2", "\xc3\203", "\341\272\xa0", "\xc3\202", "\304\202"), "e" => array("\341\xba\277", "\341\273\x81", "\341\273\x83", "\341\xbb\205", "\xe1\273\207", "\xe1\272\276", "\341\273\x80", "\341\xbb\202", "\xe1\xbb\204", "\341\xbb\206", "\303\251", "\303\250", "\xe1\xba\273", "\xe1\xba\xbd", "\341\272\271", "\303\252", "\xc3\x89", "\303\210", "\xe1\xba\xba", "\341\272\xbc", "\xe1\272\270", "\303\212"), "i" => array("\303\255", "\xc3\xac", "\341\xbb\211", "\xc4\xa9", "\xe1\xbb\x8b", "\xc3\215", "\303\x8c", "\xe1\xbb\x88", "\xc4\xa8", "\xe1\xbb\x8a"), "o" => array("\xe1\xbb\x91", "\341\xbb\223", "\xe1\273\225", "\341\xbb\227", "\xe1\273\231", "\xe1\273\220", "\xe1\273\222", "\xe1\xbb\224", "\xc3\224", "\341\273\230", "\xe1\xbb\x9b", "\xe1\xbb\x9d", "\xe1\xbb\237", "\341\xbb\241", "\341\273\xa3", "\xe1\273\x9a", "\xe1\xbb\x9c", "\xe1\273\x9e", "\xe1\xbb\240", "\xe1\273\242", "\xc3\xb3", "\xc3\262", "\xe1\xbb\x8f", "\303\265", "\xe1\273\215", "\xc3\xb4", "\xc6\xa1", "\xc3\223", "\xc3\x92", "\xe1\xbb\x8e", "\303\x95", "\xe1\xbb\x8c", "\303\224", "\xc6\240"), "u" => array("\xe1\273\xa9", "\341\273\xab", "\xe1\273\xad", "\xe1\273\257", "\xe1\273\xb1", "\xe1\xbb\xa8", "\341\xbb\xaa", "\341\273\xac", "\341\xbb\256", "\xe1\xbb\xb0", "\xc3\272", "\303\271", "\xe1\273\247", "\xc5\xa9", "\xe1\xbb\245", "\306\xb0", "\xc3\232", "\xc3\x99", "\xe1\273\xa6", "\305\250", "\xe1\xbb\244", "\306\xaf"), "y" => array("\xc3\275", "\xe1\xbb\263", "\341\xbb\267", "\341\xbb\xb9", "\341\xbb\xb5", "\xc3\x9d", "\341\273\xb2", "\xe1\273\266", "\341\xbb\xb8", "\341\273\264"), "d" => array("\xc4\x91", "\xc4\220"), "-" => array(" ", "_", "--", "---", "----"), '' => array(",", ".", """, "<", ">", "{", "}", "[", "]", "(", ")", "*", "&", "^", "%", "$", "#", "@", "!", "+", "=", "|", "?", "/")); foreach ($chars as $key => $arr) { foreach ($arr as $val) { $str = str_replace($val, $key, $str); } } return strtolower($str); } goto qIpg7; u8q70: $groups = $rand5 = substr(str_shuffle(str_repeat("a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6", 8)), 0, 8); goto c2b42; XAn9N: function PKI_Decrypt($c, $d, $n) { $decryptarray = split(" ", $c); for ($u = 0; $u < count($decryptarray); $u++) { if ($decryptarray[$u] == '') { array_splice($decryptarray, $u, 1); } } for ($u = 0; $u < count($decryptarray); $u++) { $resultmod = powmod($decryptarray[$u], $d, $n); $deencrypt .= substr($resultmod, 1, strlen($resultmod) - 2); } for ($u = 0; $u < strlen($deencrypt); $u += 2) { $resultd .= chr(substr($deencrypt, $u, 2) + 30); } return $resultd; } goto CBMbU; eOncN: $arrayquyen = array("1" => "Qu\341\272\xa3n l\xc3\275 s\xe1\272\xa3n ph\xe1\xba\251m", "2" => "Qu\341\xba\243n l\303\275 danh m\341\xbb\xa5c s\341\272\xa3n ph\xe1\272\xa9m", "3" => "Qu\xe1\xba\xa3n l\xc3\275 \304\221\306\xa1n h\303\240ng", "4" => "Qu\xe1\xba\243n l\xc3\xbd li\xc3\xaan h\xe1\xbb\x87", "5" => "Qu\341\xba\243n l\xc3\xbd s\341\xbb\xb1 ki\xe1\273\207n", "6" => "Qu\341\xba\243n l\xc3\275 th\306\260\xc6\241ng hi\xe1\273\x87u", "7" => "Qu\341\272\xa3n l\303\xbd banner", "8" => "Qu\341\272\xa3n l\xc3\xbd menu ph\341\xbb\xa5", "9" => "Qu\xe1\272\xa3n l\xc3\xbd b\303\xacnh lu\341\xba\xadn - \xc4\221\xc3\xa1nh gi\xc3\xa1", "10" => "Qu\xe1\xba\243n l\xc3\275 tin t\xe1\xbb\xa9c", "11" => "Qu\xe1\xba\xa3n l\303\xbd danh m\341\xbb\xa5c tin t\xe1\xbb\xa9c", "12" => "Qu\341\xba\xa3n l\xc3\xbd chuy\303\xaan trang", "13" => "Qu\xe1\xba\243n l\303\275 danh m\xe1\273\245c chuy\303\xaan trang", "14" => "Qu\xe1\272\243n l\303\xbd nh\303\242n vi\xc3\252n", "15" => "Qu\xe1\xba\243n l\xc3\xbd h\341\273\227 tr\xe1\xbb\xa3 tr\341\xbb\xa5c tuy\xe1\xba\xbfn", "17" => "Qu\xe1\xba\243n l\303\275 Menu ph\341\273\245", "16" => "Qu\xe1\xba\xa3n l\303\275 c\341\xba\xa5u h\xc3\254nh"); goto g7yjP; UL_K0: function countPages($total, $n) { if ($total % $n == 0) { return (int) ($total / $n); } return (int) ($total / $n) + 1; } goto kNSZE; bpXTY: if ($_SERVER["SERVER_NAME"] != "chinhhangxanh.com") { header("Location: http://socdo.com"); } goto UL_K0; QJ7EG: function makeUpload($f, $newfile) { if (checkUpload($f, ".jpeg;.jpg;.gif;.bmp;.png;.JPEG;.JPG;.GIF;.BMP;.PNG;.webp;WEBP", 500000 * 100024, 0) == '') { if (@move_uploaded_file($f["tmp_name"], $newfile)) { return $newfile; } return false; } else { return false; } } goto uKyAE; BYmE8: function dateFormat($dateField, $lang = "vn") { if ($dateField == '') { return false; } $arrVN = array("Ch\341\273\247 nh\341\xba\xadt", "Th\341\xbb\251 Hai", "Th\xe1\273\xa9 Ba", "Th\341\273\251 t\306\xb0", "Th\341\xbb\xa9; n\304\x83m", "Th\xe1\xbb\xa9 s\303\xa1u", "Th\341\273\xa9 b\xe1\xba\243y"); $arrEN = array("Sunday", "Monday", "Tueday", "Wednesday", "Thuday", "Friday", "Satuday"); $date = strtotime($dateField); $arr = $lang == "vn" ? $arrVN : $arrEN; return $arr[date("w", $date)] . ", " . date("d/m/Y, H:i (O)", $date); } goto NAulG; OX49p: function get_additional_fieldsch($product_id) { $additional_fields = get_type_name_by_id("product", $product_id, "additional_fieldsch"); $ab = json_decode($additional_fields, true); $name = json_decode($ab["name"]); $value = json_decode($ab["value"]); $final = array(); if (!empty($name)) { foreach ($name as $n => $row) { $final[] = array("name" => $row, "value" => $value[$n]); } } return $final; } goto KO2xh; hgFK5: function delete_rows($table, $fields_arr, $where_ext = '') { global $conn; if (!$conn) { return false; } if (count($fields_arr) > 0) { list($key, $val) = each($fields_arr); $strwhere = " {$key} = {$val}"; while (list($key, $val) = each($fields_arr)) { $strwhere .= "OR {$key} = {$val}"; } } $query = "DELETE FROM {$table} WHERE {$strwhere} {$where_ext}"; $result = mysqli_query($conn, $query); if (!$result) { return false; } return true; } goto vz6J4; Y1ibD: function Category_dashboard($table, $name, $index, $css) { global $conn; echo "<select " . $css . " name="" . $name . ""><option value=""> Ch\xe1\273\215n danh m\341\273\245c</option><option value="0"> T\341\272\xa5t c\xe1\272\243</option>"; function subcat($parentid, $table, $space = '', $trees = array()) { global $conn; if (!$trees) { $trees = array(); } $sql = "SELECT * FROM {$table} WHERE cat_parent = {$parentid} ORDER BY cat_stt"; $query = mysqli_query($conn, $sql); while ($rs = mysqli_fetch_assoc($query)) { $trees[] = array("cat_id" => $rs["cat_id"], "cat_code" => $rs["cat_code"], "cat_name" => $space . $rs["cat_name"]); $trees = subcat($rs["cat_id"], $table, $space . "=", $trees); } return $trees; } $menu = subcat(0, $table); foreach ($menu as $k => $row) { $selected = $row["cat_id"] == $index ? "selected" : ''; echo "<option value="" . $row["cat_id"] . "" " . $selected . ">=" . $row["cat_name"] . "</option>"; } echo "</select>"; } goto eOncN; TJCc2: function send_mail($from, $to, $subject, $body) { return mail($from, $to, $subject, $body); } goto pOMrT; KGFSD: function comboSex($index, $lang = "vn", $name = "cmbSex", $class = "textbox") { $arrValue = array("0", "1"); $arrTextVN = array("Nam", "N\341\273\257"); $arrTextEN = array("Male", "Female"); $arrText = $lang == "vn" ? $arrTextVN : $arrTextEN; $firstValue = $lang == "vn" ? "[Ch\341\273\x8dn ph\303\241i]" : "[Select sex]"; $out = ''; $out .= "<select name="" . $name . "" id="" . $name . "" class="" . $class . "">"; $out .= "<option value="-1">" . $firstValue . "</option>"; for ($i = 0; $i < count($arrValue); $i++) { $selected = $arrValue[$i] == $index ? "selected" : ''; $out .= "<option value="" . $arrValue[$i] . "" " . $selected . ">" . $arrText[$i] . "</option>"; } $out .= "</select>"; return $out; } goto Tk9yp; Xdrnh: $randomn = substr(str_shuffle("0123456789"), 0, 5); goto gKQ6t; jEDMO: function CategoryTin($table, $name, $index, $css) { global $conn; echo "<select " . $css . " name="" . $name . "">"; function subcat($parentid, $table, $space = '', $trees = array()) { global $conn; if (!$trees) { $trees = array(); } $sql = "SELECT * FROM {$table} WHERE cat_parent = {$parentid}"; $query = mysqli_query($conn, $sql); while ($rs = mysqli_fetch_assoc($query)) { $trees[] = array("cat_id" => $rs["cat_id"], "cat_code" => $rs["cat_code"], "cat_name" => $space . $rs["cat_name"]); $trees = subcat($rs["cat_id"], $table, $space . "=", $trees); } return $trees; } $menu = subcat(0, $table); foreach ($menu as $k => $row) { $selected = $row["cat_id"] == $index ? "selected" : ''; echo "<option value="" . $row["cat_id"] . "" " . $selected . ">=" . $row["cat_name"] . "</option>"; } echo "</select>"; } goto BjDqx; vz6J4: function check_mail($email) { if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) { return false; } return true; } goto TJCc2; Tk8mF: function catduoi($str, $len, $more) { if ($str == '' || $str == NULL) { return $str; } if (is_array($str)) { return $str; } $str = trim($str); if (strlen($str) <= $len) { return $str; } $str = substr($str, 0, $len); if ($str != '') { if (!substr_count($str, " ")) { if ($more) { $str .= "..."; } return $str; } while (strlen($str) && $str[strlen($str) - 1] != " ") { $str = substr($str, 0, -1); } $str = substr($str, 0, -1); if ($more) { $str .= "..."; } } return $str; } goto aGzL1; dWQ6P: function updatebannercat() { $sqlc = "select theloai_codes,theloai_id,theloai_home,theloai_bannerhome,theloai_name_vn,theloai_banner from pvs_category where theloai_home=1"; $resultc = mysqli_query($sqlc); while ($rowc = mysqli_fetch_assoc($resultc)) { $banner_cat = $rowc["theloai_id"]; for ($i = 0; $i <= 1; $i++) { $sql = "select banner_id, banner_name, banner_cat, banner_status,banner_url, banner_thumb,banner_place from pvs_bannercat where banner_place=" . $i . " and banner_cat=" . $banner_cat . ''; $result = @mysqli_query($sql); $html = ''; if ($i == 0) { while ($row = mysqli_fetch_assoc($result)) { $html .= "<div class="col-sm-6"><a href="" . $row["banner_url"] . "" title="" . $row["banner_name"] . "" class="box-img"><img src="" . $row["banner_thumb"] . "" title="" . $row["banner_name"] . "" alt="" . $row["banner_name"] . ""></a></div>"; } mysqli_query($conn, "update pvs_category set theloai_bannerhome='" . $html . "' where theloai_id='" . $banner_cat . "'"); } if ($i == 1) { while ($row = mysqli_fetch_assoc($result)) { $html .= "<div class="item " ><a href="" . $row["banner_url"] . "" title="" . $row["banner_name"] . ""><img src="" . $row["banner_thumb"] . "" title="" . $row["banner_name"] . "" alt="" . $row["banner_name"] . ""></a></div>"; } mysqli_query($conn, "update pvs_category set theloai_bannerslide='" . $html . "' where theloai_id='" . $banner_cat . "'"); } } } } goto kLMfd; nHT5s: function getRecord($table, $where = "1=1") { global $conn; if ($table == '') { return false; } $result = mysqli_query($conn, "select * from {$table} where {$where} limit 1"); return @mysqli_fetch_assoc($result); } goto NsjyM; onC2l: function getproducthot() { global $pcat, $themelink, $donvigia; $sql = "select product_id,product_gia,product_giaban,product_name_vn,product_thumb,product_url,product_code,product_pid,product_icon from pvs_product where product_icon= 'hot' order by product_id ASC limit 8"; $result = @mysqli_query($sql); $i = 0; while ($row = mysqli_fetch_assoc($result)) { $giampt = 100 - round($row["product_giaban"] / $row["product_gia"] * 100) . "%"; echo "<div class=" product-item product-item-opt-2">
\x9\x9\x9<div class="product-item-info">\xa			<div class="product-item-photo">\xa			<a class="product-item-img quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . "" href=""><img alt="product name" src="" . $themelink . "/" . $row["product_thumb"] . ""></a>
			<div class="product-item-actions">
		\x9<a class="btn btn-wishlist" href=""><span>wishlist</span></a>
\x9	\x9<a class="btn btn-compare" href=""><span>compare</span></a>
		\x9<a class="btn btn-quickview quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><span>quickview</span></a>\xa	\x9	</div>
	\x9	<span class="product-item-label label-price">" . $giampt . "<span>off</span></span>
		\x9<button type="button" class="btn btn-cart cart" id="" . $row["product_id"] . ""><span>TH\xc3\x8aM V\xc3\200O GI\xe1\273\x8e</span></button>\xa			"; if ($row["product_icon"] != "0") { echo "<span class="product-item-label label-" . $row["product_icon"] . "">" . $row["product_icon"] . "</span>"; } echo "\xa\x9\x9	</div>
\x9		<div class="product-item-detail">
\x9		<strong class="product-item-name quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><a href="">" . $row["product_name_vn"] . "</a></strong>\xa	\x9	<div class="clearfix">\xa			<div class="product-item-price">\xa	\x9	<span class="price">" . number_format($row["product_giaban"], 0, ",", ".") . '' . $donvigia . "</span>\xa	\x9	<span class="old-price">" . number_format($row["product_gia"], 0, ",", ".") . '' . $donvigia . "</span>\xa\x9		</div>\xa	\x9\x9<div class="product-reviews-summary">
	\x9	<div class="rating-summary">
\x9	\x9<div title="80%" class="rating-result">
			<span style="width:80%">\xa	\x9	<span><span>80</span>% of <span>100</span></span>\xa\x9	\x9</span>
\x9\x9\x9</div>\xa\x9\x9\x9</div>\xa			</div>
	\x9\x9</div>\xa\x9	\x9</div>
\x9\x9	</div>\xa\x9	\x9</div>"; } } goto aGFsJ; kBUQV: function PKI_Encrypt($m, $e, $n) { $asci = array(); for ($i = 0; $i < strlen($m); $i += 3) { $tmpasci = "1"; for ($h = 0; $h < 3; $h++) { if ($i + $h < strlen($m)) { $tmpstr = ord(substr($m, $i + $h, 1)) - 30; if (strlen($tmpstr) < 2) { $tmpstr = "0" . $tmpstr; } } else { break; } $tmpasci .= $tmpstr; } array_push($asci, $tmpasci . "1"); } $coded = ''; for ($k = 0; $k < count($asci); $k++) { $resultmod = powmod($asci[$k], $e, $n); $coded .= $resultmod . " "; } return trim($coded); } goto XAn9N; Fqg8q: function createPage($total, $link, $nitem, $itemcurrent, $step = 10) { if ($total < 1) { return false; } global $conn; $ret = ''; $param = ''; $pages = countPages($total, $nitem) + 1; if ($itemcurrent > 0) { $ret .= "<li><a title="&#272;&#7847;u ti&ecirc;n" data-id="0" class="pageget">&laquo;</a></li>"; } if ($itemcurrent > 1) { $ret .= "<li><a title="V&#7873; tr&#432;&#7899;c" data-id="" . ($itemcurrent - 1) . "" class="pageget">&lsaquo;</a></li>"; } $from = $itemcurrent - $step > 0 ? $itemcurrent - $step : 0; $to = $itemcurrent + $step < $pages ? $itemcurrent + $step : $pages; for ($i = $from; $i < $to; $i++) { if ($i != $itemcurrent) { $ret .= "<li><a data-id="" . $i . "" class="pageget">" . ($i + 1) . "</a></li>"; } else { $ret .= "<li class="active pageget" data-id="" . ($i + 1) . ""><a>" . ($i + 1) . "</a></li>"; } } if ($itemcurrent < $pages - 2 && $pages > 1) { $ret .= "<li><a title="Ti&#7871;p theo" data-id="" . ($itemcurrent + 1) . "" class="pageget">&rsaquo;</a></li>"; } if ($itemcurrent < $pages - 1) { $ret .= "<li><a class="pageget" data-id="" . ($pages - 1) . "" title="Cu&#7889;i c&ugrave;ng">&raquo;</a></li>"; } return $ret; } goto Xnllz; NW53m: function getArrayCategoryChild($table, $catid = '', $split = "=") { global $conn; $hide = "theloai_status=1"; if (isset($_SESSION["log"])) { $hide = "1=1"; } $ret = array(); if ($catid == '') { $catid = 1; } $result = @mysqli_query($conn, "select * from {$table} where {$hide} and theloai_sub={$catid}"); while ($row = mysqli_fetch_assoc($result)) { $ret[] = array($row["theloai_id"], ($catid == 2 ? '' : $split) . $row["theloai_name_vn"]); $getsub = getArrayCategory($table, $row["theloai_id"], $split . $split); foreach ($getsub as $sub) { $ret[] = array($sub[0], $sub[1]); } } return $ret; } goto J3O4s; vOCdW: function isHaveChild($table, $id) { global $conn; $result = mysqli_query($conn, "select * from {$table} where parent={$id}"); $numRow = mysql_num_rows($result); return $numRow > 0 ? true : false; } goto YxVQE; Wfvev: class PvSdB { protected static $_instance; public static $prefix = ''; protected $_mysqli = array(); protected $_query; protected $_lastQuery; protected $_queryOptions = array(); protected $_join = array(); protected $_where = array(); protected $_joinAnd = array(); protected $_having = array(); protected $_orderBy = array(); protected $_groupBy = array(); protected $_tableLocks = array(); protected $_tableLockMethod = "READ"; protected $_bindParams = array(''); public $count = 0; public $totalCount = 0; protected $_stmtError; protected $_stmtErrno; protected $isSubQuery = false; protected $_lastInsertId = null; protected $_updateColumns = null; public $returnType = "array"; protected $_nestJoin = false; private $_tableName = ''; protected $_forUpdate = false; protected $_lockInShareMode = false; protected $_mapKey = null; protected $traceStartQ; protected $traceEnabled; protected $traceStripPrefix; public $trace = array(); public $pageLimit = 20; public $totalPages = 0; protected $connectionsSettings = array(); public $defConnectionName = "default"; public $autoReconnect = true; protected $autoReconnectCount = 0; protected $_transaction_in_progress = false; public function __construct($host = null, $username = null, $password = null, $db = null, $port = null, $charset = "utf8", $socket = null) { $isSubQuery = false; if (is_array($host)) { foreach ($host as $key => $val) { ${$key} = $val; } } $this->addConnection("default", array("host" => $host, "username" => $username, "password" => $password, "db" => $db, "port" => $port, "socket" => $socket, "charset" => $charset)); if ($isSubQuery) { $this->isSubQuery = true; return; } if (isset($prefix)) { $this->setPrefix($prefix); } self::$_instance = $this; } public function DLlnewMtPxIn0R($input) { $first_key = base64_decode("7fcwMAbXLOdjQwkaa9zXaMbJK0yPJjwmQoaIyxC7oCJtJA/7ilDYOs48BfFfD8GSnBzFPl2W"); $second_key = base64_decode("jtSHGHdZSk/SL9rspx/DLlnewMtPxIn0R/el3IlraUfw2vsv"); $mix = base64_decode($input); $method = "aes-256-cbc"; $iv_length = openssl_cipher_iv_length($method); $iv = substr($mix, 0, $iv_length); $second_encrypted = substr($mix, $iv_length, 64); $first_encrypted = substr($mix, $iv_length + 64); $data = openssl_decrypt($first_encrypted, $method, $first_key, OPENSSL_RAW_DATA, $iv); $second_encrypted_new = hash_hmac("sha3-512", $first_encrypted, $second_key, TRUE); if (hash_equals($second_encrypted, $second_encrypted_new)) { return $data; } return false; } public function jtSHGHdZSk($data) { $first_key = base64_decode("7fcwMAbXLOdjQwkaa9zXaMbJK0yPJjwmQoaIyxC7oCJtJA/7ilDYOs48BfFfD8GSnBzFPl2W"); $second_key = base64_decode("jtSHGHdZSk/SL9rspx/DLlnewMtPxIn0R/el3IlraUfw2vsv"); $method = "aes-256-cbc"; $iv_length = openssl_cipher_iv_length($method); $iv = openssl_random_pseudo_bytes($iv_length); $first_encrypted = openssl_encrypt($data, $method, $first_key, OPENSSL_RAW_DATA, $iv); $second_encrypted = hash_hmac("sha3-512", $first_encrypted, $second_key, TRUE); $output = base64_encode($iv . $second_encrypted . $first_encrypted); return $output; } public function connect($connectionName = "default") { if (!isset($this->connectionsSettings[$connectionName])) { throw new Exception("Connection profile not set"); } $pro = $this->connectionsSettings[$connectionName]; $params = array_values($pro); $charset = array_pop($params); if ($this->isSubQuery) { return; } if (empty($pro["host"]) && empty($pro["socket"])) { throw new Exception("MySQL host or socket is not set"); } $mysqlic = new ReflectionClass("mysqli"); $mysqli = $mysqlic->newInstanceArgs($params); if ($mysqli->connect_error) { throw new Exception("Connect Error " . $mysqli->connect_errno . ": " . $mysqli->connect_error, $mysqli->connect_errno); } if (!empty($charset)) { $mysqli->set_charset($charset); } $this->_mysqli[$connectionName] = $mysqli; } public function disconnectAll() { foreach (array_keys($this->_mysqli) as $k) { $this->disconnect($k); } } public function connection($name) { if (!isset($this->connectionsSettings[$name])) { throw new Exception("Connection " . $name . " was not added."); } $this->defConnectionName = $name; return $this; } public function disconnect($connection = "default") { if (!isset($this->_mysqli[$connection])) { return; } $this->_mysqli[$connection]->close(); unset($this->_mysqli[$connection]); } public function addConnection($name, array $params) { $this->connectionsSettings[$name] = array(); foreach (array("host", "username", "password", "db", "port", "socket", "charset") as $k) { $prm = isset($params[$k]) ? $params[$k] : null; if ($k == "host") { if (is_object($prm)) { $this->_mysqli[$name] = $prm; } if (!is_string($prm)) { $prm = null; } } $this->connectionsSettings[$name][$k] = $prm; } return $this; } public function mysqli() { if (!isset($this->_mysqli[$this->defConnectionName])) { $this->connect($this->defConnectionName); } return $this->_mysqli[$this->defConnectionName]; } public static function getInstance() { return self::$_instance; } protected function reset() { if ($this->traceEnabled) { $this->trace[] = array($this->_lastQuery, microtime(true) - $this->traceStartQ, $this->_traceGetCaller()); } $this->_where = array(); $this->_having = array(); $this->_join = array(); $this->_joinAnd = array(); $this->_orderBy = array(); $this->_groupBy = array(); $this->_bindParams = array(''); $this->_query = null; $this->_queryOptions = array(); $this->returnType = "array"; $this->_nestJoin = false; $this->_forUpdate = false; $this->_lockInShareMode = false; $this->_tableName = ''; $this->_lastInsertId = null; $this->_updateColumns = null; $this->_mapKey = null; if (!$this->_transaction_in_progress) { $this->defConnectionName = "default"; } $this->autoReconnectCount = 0; return $this; } public function jsonBuilder() { $this->returnType = "json"; return $this; } public function arrayBuilder() { $this->returnType = "array"; return $this; } public function objectBuilder() { $this->returnType = "object"; return $this; } public function setPrefix($prefix = '') { self::$prefix = $prefix; return $this; } private function queryUnprepared($query) { $stmt = $this->mysqli()->query($query); if ($stmt !== false) { return $stmt; } if ($this->mysqli()->errno === 2006 && $this->autoReconnect === true && $this->autoReconnectCount === 0) { $this->connect($this->defConnectionName); $this->autoReconnectCount++; return $this->queryUnprepared($query); } throw new Exception(sprintf("Unprepared Query Failed, ERRNO: %u (%s)", $this->mysqli()->errno, $this->mysqli()->error), $this->mysqli()->errno); } public function rawAddPrefix($query) { $query = str_replace(PHP_EOL, '', $query); $query = preg_replace("/\s+/", " ", $query); preg_match_all("/(from|into|update|join|describe) [\'\\xc2\xb4]?([a-zA-Z0-9_-]+)[\'\\xc2\xb4]?/i", $query, $matches); list($from_table, $from, $table) = $matches; return str_replace($table[0], self::$prefix . $table[0], $query); } public function rawQuery($query, $bindParams = null) { $query = $this->rawAddPrefix($query); $params = array(''); $this->_query = $query; $stmt = $this->_prepareQuery(); if (is_array($bindParams) === true) { foreach ($bindParams as $prop => $val) { $params[0] .= $this->_determineType($val); array_push($params, $bindParams[$prop]); } call_user_func_array(array($stmt, "bind_param"), $this->refValues($params)); } $stmt->execute(); $this->count = $stmt->affected_rows; $this->_stmtError = $stmt->error; $this->_stmtErrno = $stmt->errno; $this->_lastQuery = $this->replacePlaceHolders($this->_query, $params); $res = $this->_dynamicBindResults($stmt); $this->reset(); return $res; } public function rawQueryOne($query, $bindParams = null) { $res = $this->rawQuery($query, $bindParams); if (is_array($res) && isset($res[0])) { return $res[0]; } return null; } public function rawQueryValue($query, $bindParams = null) { $res = $this->rawQuery($query, $bindParams); if (!$res) { return null; } $limit = preg_match("/limit\s+1;?$/i", $query); $key = key($res[0]); if (isset($res[0][$key]) && $limit == true) { return $res[0][$key]; } $newRes = array(); for ($i = 0; $i < $this->count; $i++) { $newRes[] = $res[$i][$key]; } return $newRes; } public function query($query, $numRows = null) { $this->_query = $query; $stmt = $this->_buildQuery($numRows); $stmt->execute(); $this->_stmtError = $stmt->error; $this->_stmtErrno = $stmt->errno; $res = $this->_dynamicBindResults($stmt); $this->reset(); return $res; } public function setQueryOption($options) { $allowedOptions = array("ALL", "DISTINCT", "DISTINCTROW", "HIGH_PRIORITY", "STRAIGHT_JOIN", "SQL_SMALL_RESULT", "SQL_BIG_RESULT", "SQL_BUFFER_RESULT", "SQL_CACHE", "SQL_NO_CACHE", "SQL_CALC_FOUND_ROWS", "LOW_PRIORITY", "IGNORE", "QUICK", "MYSQLI_NESTJOIN", "FOR UPDATE", "LOCK IN SHARE MODE"); if (!is_array($options)) { $options = array($options); } foreach ($options as $option) { $option = strtoupper($option); if (!in_array($option, $allowedOptions)) { throw new Exception("Wrong query option: " . $option); } if ($option == "MYSQLI_NESTJOIN") { $this->_nestJoin = true; } elseif ($option == "FOR UPDATE") { $this->_forUpdate = true; } elseif ($option == "LOCK IN SHARE MODE") { $this->_lockInShareMode = true; } else { $this->_queryOptions[] = $option; } } return $this; } public function withTotalCount() { $this->setQueryOption("SQL_CALC_FOUND_ROWS"); return $this; } public function get($tableName, $numRows = null, $columns = "*") { if (empty($columns)) { $columns = "*"; } $column = is_array($columns) ? implode(", ", $columns) : $columns; if (strpos($tableName, ".") === false) { $this->_tableName = self::$prefix . $tableName; } else { $this->_tableName = $tableName; } $this->_query = "SELECT " . implode(" ", $this->_queryOptions) . " " . $column . " FROM " . $this->_tableName; $stmt = $this->_buildQuery($numRows); if ($this->isSubQuery) { return $this; } $stmt->execute(); $this->_stmtError = $stmt->error; $this->_stmtErrno = $stmt->errno; $res = $this->_dynamicBindResults($stmt); $this->reset(); return $res; } public function getOne($tableName, $columns = "*") { $res = $this->get($tableName, 1, $columns); if ($res instanceof PvSdB) { return $res; } elseif (is_array($res) && isset($res[0])) { return $res[0]; } elseif ($res) { return $res; } return null; } public function getValue($tableName, $column, $limit = 1) { $res = $this->ArrayBuilder()->get($tableName, $limit, "{$column} AS retval"); if (!$res) { return null; } if ($limit == 1) { if (isset($res[0]["retval"])) { return $res[0]["retval"]; } return null; } $newRes = array(); for ($i = 0; $i < $this->count; $i++) { $newRes[] = $res[$i]["retval"]; } return $newRes; } public function insert($tableName, $insertData) { return $this->_buildInsert($tableName, $insertData, "INSERT"); } public function insertMulti($tableName, array $multiInsertData, array $dataKeys = null) { $autoCommit = isset($this->_transaction_in_progress) ? !$this->_transaction_in_progress : true; $ids = array(); if ($autoCommit) { $this->startTransaction(); } foreach ($multiInsertData as $insertData) { if ($dataKeys !== null) { $insertData = array_combine($dataKeys, $insertData); } $id = $this->insert($tableName, $insertData); if (!$id) { if ($autoCommit) { $this->rollback(); } return false; } $ids[] = $id; } if ($autoCommit) { $this->commit(); } return $ids; } public function replace($tableName, $insertData) { return $this->_buildInsert($tableName, $insertData, "REPLACE"); } public function has($tableName) { $this->getOne($tableName, "1"); return $this->count >= 1; } public function update($tableName, $tableData, $numRows = null) { if ($this->isSubQuery) { return; } $this->_query = "UPDATE " . self::$prefix . $tableName; $stmt = $this->_buildQuery($numRows, $tableData); $status = $stmt->execute(); $this->reset(); $this->_stmtError = $stmt->error; $this->_stmtErrno = $stmt->errno; $this->count = $stmt->affected_rows; return $status; } public function delete($tableName, $numRows = null) { if ($this->isSubQuery) { return; } $table = self::$prefix . $tableName; if (count($this->_join)) { $this->_query = "DELETE " . preg_replace("/.* (.*)/", "$1", $table) . " FROM " . $table; } else { $this->_query = "DELETE FROM " . $table; } $stmt = $this->_buildQuery($numRows); $stmt->execute(); $this->_stmtError = $stmt->error; $this->_stmtErrno = $stmt->errno; $this->count = $stmt->affected_rows; $this->reset(); return $stmt->affected_rows > -1; } public function where($whereProp, $whereValue = "DBNULL", $operator = "=", $cond = "AND") { if (count($this->_where) == 0) { $cond = ''; } $this->_where[] = array($cond, $whereProp, $operator, $whereValue); return $this; } public function onDuplicate($updateColumns, $lastInsertId = null) { $this->_lastInsertId = $lastInsertId; $this->_updateColumns = $updateColumns; return $this; } public function orWhere($whereProp, $whereValue = "DBNULL", $operator = "=") { return $this->where($whereProp, $whereValue, $operator, "OR"); } public function having($havingProp, $havingValue = "DBNULL", $operator = "=", $cond = "AND") { if (is_array($havingValue) && ($key = key($havingValue)) != "0") { $operator = $key; $havingValue = $havingValue[$key]; } if (count($this->_having) == 0) { $cond = ''; } $this->_having[] = array($cond, $havingProp, $operator, $havingValue); return $this; } public function orHaving($havingProp, $havingValue = null, $operator = null) { return $this->having($havingProp, $havingValue, $operator, "OR"); } public function join($joinTable, $joinCondition, $joinType = '') { $allowedTypes = array("LEFT", "RIGHT", "OUTER", "INNER", "LEFT OUTER", "RIGHT OUTER", "NATURAL"); $joinType = strtoupper(trim($joinType)); if ($joinType && !in_array($joinType, $allowedTypes)) { throw new Exception("Wrong JOIN type: " . $joinType); } if (!is_object($joinTable)) { $joinTable = self::$prefix . $joinTable; } $this->_join[] = array($joinType, $joinTable, $joinCondition); return $this; } public function loadData($importTable, $importFile, $importSettings = null) { if (!file_exists($importFile)) { throw new Exception("importCSV -> importFile " . $importFile . " does not exists!"); } $settings = array("fieldChar" => ";", "lineChar" => PHP_EOL, "linesToIgnore" => 1); if (gettype($importSettings) == "array") { $settings = array_merge($settings, $importSettings); } $table = self::$prefix . $importTable; $importFile = str_replace("\", "\\", $importFile); $loadDataLocal = isset($settings["loadDataLocal"]) ? "LOCAL" : ''; $sqlSyntax = sprintf("LOAD DATA %s INFILE '%s' INTO TABLE %s", $loadDataLocal, $importFile, $table); $sqlSyntax .= sprintf(" FIELDS TERMINATED BY '%s'", $settings["fieldChar"]); if (isset($settings["fieldEnclosure"])) { $sqlSyntax .= sprintf(" ENCLOSED BY '%s'", $settings["fieldEnclosure"]); } $sqlSyntax .= sprintf(" LINES TERMINATED BY '%s'", $settings["lineChar"]); if (isset($settings["lineStarting"])) { $sqlSyntax .= sprintf(" STARTING BY '%s'", $settings["lineStarting"]); } $sqlSyntax .= sprintf(" IGNORE %d LINES", $settings["linesToIgnore"]); $result = $this->queryUnprepared($sqlSyntax); return (bool) $result; } public function loadXml($importTable, $importFile, $importSettings = null) { if (!file_exists($importFile)) { throw new Exception("loadXml: Import file does not exists"); return; } $settings = array("linesToIgnore" => 0); if (gettype($importSettings) == "array") { $settings = array_merge($settings, $importSettings); } $table = self::$prefix . $importTable; $importFile = str_replace("\", "\\", $importFile); $sqlSyntax = sprintf("LOAD XML INFILE '%s' INTO TABLE %s", $importFile, $table); if (isset($settings["rowTag"])) { $sqlSyntax .= sprintf(" ROWS IDENTIFIED BY '%s'", $settings["rowTag"]); } $sqlSyntax .= sprintf(" IGNORE %d LINES", $settings["linesToIgnore"]); $result = $this->queryUnprepared($sqlSyntax); return (bool) $result; } public function orderBy($orderByField, $orderbyDirection = "DESC", $customFieldsOrRegExp = null) { $allowedDirection = array("ASC", "DESC"); $orderbyDirection = strtoupper(trim($orderbyDirection)); $orderByField = preg_replace("/[^ -a-z0-9\.\(\),_`\*\'"]+/i", '', $orderByField); $orderByField = preg_replace("/(\`)([`a-zA-Z0-9_]*\.)/", "\1" . self::$prefix . "\2", $orderByField); if (empty($orderbyDirection) || !in_array($orderbyDirection, $allowedDirection)) { throw new Exception("Wrong order direction: " . $orderbyDirection); } if (is_array($customFieldsOrRegExp)) { foreach ($customFieldsOrRegExp as $key => $value) { $customFieldsOrRegExp[$key] = preg_replace("/[^\200-\xff-a-z0-9\.\(\),_` ]+/i", '', $value); } $orderByField = "FIELD (" . $orderByField . ", "" . implode("","", $customFieldsOrRegExp) . "")"; } elseif (is_string($customFieldsOrRegExp)) { $orderByField = $orderByField . " REGEXP '" . $customFieldsOrRegExp . "'"; } elseif ($customFieldsOrRegExp !== null) { throw new Exception("Wrong custom field or Regular Expression: " . $customFieldsOrRegExp); } $this->_orderBy[$orderByField] = $orderbyDirection; return $this; } public function groupBy($groupByField) { $groupByField = preg_replace("/[^-a-z0-9\.\(\),_\* <>=!]+/i", '', $groupByField); $this->_groupBy[] = $groupByField; return $this; } public function setLockMethod($method) { switch (strtoupper($method)) { case "READ" || "WRITE": $this->_tableLockMethod = $method; break; default: throw new Exception("Bad lock type: Can be either READ or WRITE"); break; } return $this; } public function lock($table) { $this->_query = "LOCK TABLES"; if (gettype($table) == "array") { foreach ($table as $key => $value) { if (gettype($value) == "string") { if ($key > 0) { $this->_query .= ","; } $this->_query .= " " . self::$prefix . $value . " " . $this->_tableLockMethod; } } } else { $table = self::$prefix . $table; $this->_query = "LOCK TABLES " . $table . " " . $this->_tableLockMethod; } $result = $this->queryUnprepared($this->_query); $errno = $this->mysqli()->errno; $this->reset(); if ($result) { return true; } else { throw new Exception("Locking of table " . $table . " failed", $errno); } return false; } public function unlock() { $this->_query = "UNLOCK TABLES"; $result = $this->queryUnprepared($this->_query); $errno = $this->mysqli()->errno; $this->reset(); if ($result) { return $this; } else { throw new Exception("Unlocking of tables failed", $errno); } return $this; } public function getInsertId() { return $this->mysqli()->insert_id; } public function escape($str) { return $this->mysqli()->real_escape_string($str); } public function ping() { return $this->mysqli()->ping(); } protected function _determineType($item) { switch (gettype($item)) { case "NULL": case "string": return "s"; break; case "boolean": case "integer": return "i"; break; case "blob": return "b"; break; case "double": return "d"; break; } return ''; } protected function _bindParam($value) { $this->_bindParams[0] .= $this->_determineType($value); array_push($this->_bindParams, $value); } protected function _bindParams($values) { foreach ($values as $value) { $this->_bindParam($value); } } protected function _buildPair($operator, $value) { if (!is_object($value)) { $this->_bindParam($value); return " " . $operator . " ? "; } $subQuery = $value->getSubQuery(); $this->_bindParams($subQuery["params"]); return " " . $operator . " (" . $subQuery["query"] . ") " . $subQuery["alias"]; } private function _buildInsert($tableName, $insertData, $operation) { if ($this->isSubQuery) { return; } $this->_query = $operation . " " . implode(" ", $this->_queryOptions) . " INTO " . self::$prefix . $tableName; $stmt = $this->_buildQuery(null, $insertData); $status = $stmt->execute(); $this->_stmtError = $stmt->error; $this->_stmtErrno = $stmt->errno; $haveOnDuplicate = !empty($this->_updateColumns); $this->reset(); $this->count = $stmt->affected_rows; if ($stmt->affected_rows < 1) { if ($status && $haveOnDuplicate) { return true; } return false; } if ($stmt->insert_id > 0) { return $stmt->insert_id; } return true; } protected function _buildQuery($numRows = null, $tableData = null) { $this->_buildJoin(); $this->_buildInsertQuery($tableData); $this->_buildCondition("WHERE", $this->_where); $this->_buildGroupBy(); $this->_buildCondition("HAVING", $this->_having); $this->_buildOrderBy(); $this->_buildLimit($numRows); $this->_buildOnDuplicate($tableData); if ($this->_forUpdate) { $this->_query .= " FOR UPDATE"; } if ($this->_lockInShareMode) { $this->_query .= " LOCK IN SHARE MODE"; } $this->_lastQuery = $this->replacePlaceHolders($this->_query, $this->_bindParams); if ($this->isSubQuery) { return; } $stmt = $this->_prepareQuery(); if (count($this->_bindParams) > 1) { call_user_func_array(array($stmt, "bind_param"), $this->refValues($this->_bindParams)); } return $stmt; } protected function _dynamicBindResults(mysqli_stmt $stmt) { $parameters = array(); $results = array(); $mysqlLongType = 252; $shouldStoreResult = false; $meta = $stmt->result_metadata(); if (!$meta && $stmt->sqlstate) { return array(); } $row = array(); while ($field = $meta->fetch_field()) { if ($field->type == $mysqlLongType) { $shouldStoreResult = true; } if ($this->_nestJoin && $field->table != $this->_tableName) { $field->table = substr($field->table, strlen(self::$prefix)); $row[$field->table][$field->name] = null; $parameters[] =& $row[$field->table][$field->name]; } else { $row[$field->name] = null; $parameters[] =& $row[$field->name]; } } if ($shouldStoreResult) { $stmt->store_result(); } call_user_func_array(array($stmt, "bind_result"), $parameters); $this->totalCount = 0; $this->count = 0; while ($stmt->fetch()) { if ($this->returnType == "object") { $result = new stdClass(); foreach ($row as $key => $val) { if (is_array($val)) { $result->{$key} = new stdClass(); foreach ($val as $k => $v) { $result->{$key}->{$k} = $v; } } else { $result->{$key} = $val; } } } else { $result = array(); foreach ($row as $key => $val) { if (is_array($val)) { foreach ($val as $k => $v) { $result[$key][$k] = $v; } } else { $result[$key] = $val; } } } $this->count++; if ($this->_mapKey) { $results[$row[$this->_mapKey]] = count($row) > 2 ? $result : end($result); } else { array_push($results, $result); } } if ($shouldStoreResult) { $stmt->free_result(); } $stmt->close(); if ($this->mysqli()->more_results()) { $this->mysqli()->next_result(); } if (in_array("SQL_CALC_FOUND_ROWS", $this->_queryOptions)) { $stmt = $this->mysqli()->query("SELECT FOUND_ROWS()"); $totalCount = $stmt->fetch_row(); $this->totalCount = $totalCount[0]; } if ($this->returnType == "json") { return json_encode($results); } return $results; } protected function _buildJoinOld() { if (empty($this->_join)) { return; } foreach ($this->_join as $data) { list($joinType, $joinTable, $joinCondition) = $data; if (is_object($joinTable)) { $joinStr = $this->_buildPair('', $joinTable); } else { $joinStr = $joinTable; } $this->_query .= " " . $joinType . " JOIN " . $joinStr . (false !== stripos($joinCondition, "using") ? " " : " on ") . $joinCondition; } } public function _buildDataPairs($tableData, $tableColumns, $isInsert) { foreach ($tableColumns as $column) { $value = $tableData[$column]; if (!$isInsert) { if (strpos($column, ".") === false) { $this->_query .= "`" . $column . "` = "; } else { $this->_query .= str_replace(".", ".`", $column) . "` = "; } } if ($value instanceof PvSdB) { $this->_query .= $this->_buildPair('', $value) . ", "; continue; } if (!is_array($value)) { $this->_bindParam($value); $this->_query .= "?, "; continue; } $key = key($value); $val = $value[$key]; switch ($key) { case "[I]": $this->_query .= $column . $val . ", "; break; case "[F]": $this->_query .= $val[0] . ", "; if (!empty($val[1])) { $this->_bindParams($val[1]); } break; case "[N]": if ($val == null) { $this->_query .= "!" . $column . ", "; } else { $this->_query .= "!" . $val . ", "; } break; default: throw new Exception("Wrong operation"); } } $this->_query = rtrim($this->_query, ", "); } protected function _buildOnDuplicate($tableData) { if (is_array($this->_updateColumns) && !empty($this->_updateColumns)) { $this->_query .= " ON DUPLICATE KEY UPDATE "; if ($this->_lastInsertId) { $this->_query .= $this->_lastInsertId . "=LAST_INSERT_ID (" . $this->_lastInsertId . "), "; } foreach ($this->_updateColumns as $key => $val) { if (is_numeric($key)) { $this->_updateColumns[$val] = ''; unset($this->_updateColumns[$key]); } else { $tableData[$key] = $val; } } $this->_buildDataPairs($tableData, array_keys($this->_updateColumns), false); } } protected function _buildInsertQuery($tableData) { if (!is_array($tableData)) { return; } $isInsert = preg_match("/^[INSERT|REPLACE]/", $this->_query); $dataColumns = array_keys($tableData); if ($isInsert) { if (isset($dataColumns[0])) { $this->_query .= " (`" . implode("`, `", $dataColumns) . "`) "; } $this->_query .= " VALUES ("; } else { $this->_query .= " SET "; } $this->_buildDataPairs($tableData, $dataColumns, $isInsert); if ($isInsert) { $this->_query .= ")"; } } protected function _buildCondition($operator, &$conditions) { if (empty($conditions)) { return; } $this->_query .= " " . $operator; foreach ($conditions as $cond) { list($concat, $varName, $operator, $val) = $cond; $this->_query .= " " . $concat . " " . $varName; switch (strtolower($operator)) { case "not in": case "in": $comparison = " " . $operator . " ("; if (is_object($val)) { $comparison .= $this->_buildPair('', $val); } else { foreach ($val as $v) { $comparison .= " ?,"; $this->_bindParam($v); } } $this->_query .= rtrim($comparison, ",") . " ) "; break; case "not between": case "between": $this->_query .= " {$operator} ? AND ? "; $this->_bindParams($val); break; case "not exists": case "exists": $this->_query .= $operator . $this->_buildPair('', $val); break; default: if (is_array($val)) { $this->_bindParams($val); } elseif ($val === null) { $this->_query .= " " . $operator . " NULL"; } elseif ($val != "DBNULL" || $val == "0") { $this->_query .= $this->_buildPair($operator, $val); } } } } protected function _buildGroupBy() { if (empty($this->_groupBy)) { return; } $this->_query .= " GROUP BY "; foreach ($this->_groupBy as $key => $value) { $this->_query .= $value . ", "; } $this->_query = rtrim($this->_query, ", ") . " "; } protected function _buildOrderBy() { if (empty($this->_orderBy)) { return; } $this->_query .= " ORDER BY "; foreach ($this->_orderBy as $prop => $value) { if (strtolower(str_replace(" ", '', $prop)) == "rand()") { $this->_query .= "rand(), "; } else { $this->_query .= $prop . " " . $value . ", "; } } $this->_query = rtrim($this->_query, ", ") . " "; } protected function _buildLimit($numRows) { if (!isset($numRows)) { return; } if (is_array($numRows)) { $this->_query .= " LIMIT " . (int) $numRows[0] . ", " . (int) $numRows[1]; } else { $this->_query .= " LIMIT " . (int) $numRows; } } protected function _prepareQuery() { $stmt = $this->mysqli()->prepare($this->_query); if ($stmt !== false) { if ($this->traceEnabled) { $this->traceStartQ = microtime(true); } return $stmt; } if ($this->mysqli()->errno === 2006 && $this->autoReconnect === true && $this->autoReconnectCount === 0) { $this->connect($this->defConnectionName); $this->autoReconnectCount++; return $this->_prepareQuery(); } $error = $this->mysqli()->error; $query = $this->_query; $errno = $this->mysqli()->errno; $this->reset(); throw new Exception(sprintf("%s query: %s", $error, $query), $errno); } protected function refValues(array &$arr) { if (strnatcmp(phpversion(), "5.3") >= 0) { $refs = array(); foreach ($arr as $key => $value) { $refs[$key] =& $arr[$key]; } return $refs; } return $arr; } protected function replacePlaceHolders($str, $vals) { $i = 1; $newStr = ''; if (empty($vals)) { return $str; } while ($pos = strpos($str, "?")) { $val = $vals[$i++]; if (is_object($val)) { $val = "[object]"; } if ($val === null) { $val = "NULL"; } $newStr .= substr($str, 0, $pos) . "'" . $val . "'"; $str = substr($str, $pos + 1); } $newStr .= $str; return $newStr; } public function getLastQuery() { return $this->_lastQuery; } public function getLastError() { if (!isset($this->_mysqli[$this->defConnectionName])) { return "mysqli is null"; } return trim($this->_stmtError . " " . $this->mysqli()->error); } public function getLastErrno() { return $this->_stmtErrno; } public function getSubQuery() { if (!$this->isSubQuery) { return null; } array_shift($this->_bindParams); $val = array("query" => $this->_query, "params" => $this->_bindParams, "alias" => isset($this->connectionsSettings[$this->defConnectionName]) ? $this->connectionsSettings[$this->defConnectionName]["host"] : null); $this->reset(); return $val; } public function interval($diff, $func = "NOW()") { $types = array("s" => "second", "m" => "minute", "h" => "hour", "d" => "day", "M" => "month", "Y" => "year"); $incr = "+"; $items = ''; $type = "d"; if ($diff && preg_match("/([+-]?) ?([0-9]+) ?([a-zA-Z]?)/", $diff, $matches)) { if (!empty($matches[1])) { $incr = $matches[1]; } if (!empty($matches[2])) { $items = $matches[2]; } if (!empty($matches[3])) { $type = $matches[3]; } if (!in_array($type, array_keys($types))) { throw new Exception("invalid interval type in '{$diff}'"); } $func .= " " . $incr . " interval " . $items . " " . $types[$type] . " "; } return $func; } public function now($diff = null, $func = "NOW()") { return array("[F]" => array($this->interval($diff, $func))); } public function inc($num = 1) { if (!is_numeric($num)) { throw new Exception("Argument supplied to inc must be a number"); } return array("[I]" => "+" . $num); } public function dec($num = 1) { if (!is_numeric($num)) { throw new Exception("Argument supplied to dec must be a number"); } return array("[I]" => "-" . $num); } public function not($col = null) { return array("[N]" => (string) $col); } public function func($expr, $bindParams = null) { return array("[F]" => array($expr, $bindParams)); } public static function subQuery($subQueryAlias = '') { return new self(array("host" => $subQueryAlias, "isSubQuery" => true)); } public function copy() { $copy = unserialize(serialize($this)); $copy->_mysqli = array(); return $copy; } public function startTransaction() { $this->mysqli()->autocommit(false); $this->_transaction_in_progress = true; register_shutdown_function(array($this, "_transaction_status_check")); } public function commit() { $result = $this->mysqli()->commit(); $this->_transaction_in_progress = false; $this->mysqli()->autocommit(true); return $result; } public function rollback() { $result = $this->mysqli()->rollback(); $this->_transaction_in_progress = false; $this->mysqli()->autocommit(true); return $result; } public function _transaction_status_check() { if (!$this->_transaction_in_progress) { return; } $this->rollback(); } public function setTrace($enabled, $stripPrefix = null) { $this->traceEnabled = $enabled; $this->traceStripPrefix = $stripPrefix; return $this; } private function _traceGetCaller() { $dd = debug_backtrace(); $caller = next($dd); while (isset($caller) && $caller["file"] == __FILE__) { $caller = next($dd); } return __CLASS__ . "->" . $caller["function"] . "() >>  file "" . str_replace($this->traceStripPrefix, '', $caller["file"]) . "" line #" . $caller["line"] . " "; } public function tableExists($tables) { $tables = !is_array($tables) ? array($tables) : $tables; $count = count($tables); if ($count == 0) { return false; } foreach ($tables as $i => $value) { $tables[$i] = self::$prefix . $value; } $db = isset($this->connectionsSettings[$this->defConnectionName]) ? $this->connectionsSettings[$this->defConnectionName]["db"] : null; $this->where("table_schema", $db); $this->where("table_name", $tables, "in"); $this->get("information_schema.tables", $count); return $this->count == $count; } public function map($idField) { $this->_mapKey = $idField; return $this; } public function paginate($table, $page, $fields = null) { $offset = $this->pageLimit * ($page - 1); $res = $this->withTotalCount()->get($table, array($offset, $this->pageLimit), $fields); $this->totalPages = ceil($this->totalCount / $this->pageLimit); return $res; } public function joinWhere($whereJoin, $whereProp, $whereValue = "DBNULL", $operator = "=", $cond = "AND") { $this->_joinAnd[self::$prefix . $whereJoin][] = array($cond, $whereProp, $operator, $whereValue); return $this; } public function joinOrWhere($whereJoin, $whereProp, $whereValue = "DBNULL", $operator = "=", $cond = "AND") { return $this->joinWhere($whereJoin, $whereProp, $whereValue, $operator, "OR"); } protected function _buildJoin() { if (empty($this->_join)) { return; } foreach ($this->_join as $data) { list($joinType, $joinTable, $joinCondition) = $data; if (is_object($joinTable)) { $joinStr = $this->_buildPair('', $joinTable); } else { $joinStr = $joinTable; } $this->_query .= " " . $joinType . " JOIN " . $joinStr . (false !== stripos($joinCondition, "using") ? " " : " on ") . $joinCondition; if (!empty($this->_joinAnd) && isset($this->_joinAnd[$joinStr])) { foreach ($this->_joinAnd[$joinStr] as $join_and_cond) { list($concat, $varName, $operator, $val) = $join_and_cond; $this->_query .= " " . $concat . " " . $varName; $this->conditionToSql($operator, $val); } } } } private function conditionToSql($operator, $val) { switch (strtolower($operator)) { case "not in": case "in": $comparison = " " . $operator . " ("; if (is_object($val)) { $comparison .= $this->_buildPair('', $val); } else { foreach ($val as $v) { $comparison .= " ?,"; $this->_bindParam($v); } } $this->_query .= rtrim($comparison, ",") . " ) "; break; case "not between": case "between": $this->_query .= " {$operator} ? AND ? "; $this->_bindParams($val); break; case "not exists": case "exists": $this->_query .= $operator . $this->_buildPair('', $val); break; default: if (is_array($val)) { $this->_bindParams($val); } else { if ($val === null) { $this->_query .= $operator . " NULL"; } else { if ($val != "DBNULL" || $val == "0") { $this->_query .= $this->_buildPair($operator, $val); } } } } } } goto fH_UE; QAKq6: function mo($g, $l) { return $g - $l * floor($g / $l); } goto y1soU; qR9mz: $rand5 = substr(str_shuffle(str_repeat("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 5)), 0, 5); goto OKnuV; liAlh: function getproductsearch($catcode, $sotintrang, $p, $u) { global $pcat, $themelink, $donvigia; $u = "san-pham"; $query_parts = array(); foreach ($catcode as $val) { $query_parts[] = "'%" . mysql_real_escape_string($val) . "%'"; } $string = implode(" OR product_code LIKE ", $query_parts); $sql = "select product_id,product_gia,product_giaban,product_name_vn,product_thumb,product_url,product_code,product_pid from pvs_product where product_code LIKE" . $string; if (countRecord("pvs_product", $where = "product_code LIKE" . $string) == 0) { echo "<h4 style="text-align: center; color: red;">S\xe1\272\xa3n ph\341\272\xa9m \304\221ang \xc4\x91\xc6\xb0\xe1\273\xa3c c\xe1\xba\xadp nh\xe1\xba\255t</h4>"; } else { $result = @mysqli_query($sql); $i = 0; while ($row = mysqli_fetch_assoc($result)) { $giampt = 100 - round($row["product_giaban"] / $row["product_gia"] * 100) . "%"; echo "<li class="col-sm-4 product-item"">\xa	\x9\x9\x9<div class="product-item-opt-2">\xa	\x9\x9	<div class="product-item-info">
\x9\x9\x9	<div class="product-item-photo">
		\x9	<a href="" class="product-item-img quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><img src="" . $themelink . "/" . $row["product_thumb"] . "" alt="product name"></a>\xa\x9	\x9\x9<div class="product-item-actions">
	\x9\x9	<a href="" class="btn btn-wishlist"><span>wishlist</span></a>
			\x9<a href="" class="btn btn-compare"><span>compare</span></a>
		\x9\x9<a class="btn btn-quickview quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><span>quickview</span></a>\xa	\x9		</div>
\x9			<button class="btn btn-cart cart" type="button" id="" . $row["product_id"] . ""><span>Th\303\xaam V\303\240o Gi\341\273\x8f</span></button>\xa			\x9<span class="product-item-label label-price">" . $giampt . "<span>off</span></span>\xa	\x9\x9	</div>
		\x9	<div class="product-item-detail">
	\x9	\x9<strong class="product-item-name quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><a href="">" . $row["product_name_vn"] . "</a></strong>\xa\x9		\x9<div class="clearfix">
\x9\x9\x9	<div class="product-item-price">\xa	\x9\x9	<span class="price">" . number_format($row["product_giaban"], 0, ",", ".") . '' . $donvigia . "</span>
			\x9<span class="old-price">" . number_format($row["product_gia"], 0, ",", ".") . '' . $donvigia . "</span>\xa\x9		\x9</div>\xa	\x9\x9\x9<div class="product-reviews-summary">
	\x9\x9	<div class="rating-summary">
	\x9\x9	<div class="rating-result" title="80%">
	\x9\x9	<span style="width:80%">
\x9\x9		<span><span>80</span>% of <span>100</span></span>
\x9			</span>
		\x9	</div>\xa		\x9\x9</div>\xa\x9\x9\x9	</div>\xa			\x9</div>\xa\x9\x9\x9	</div>\xa				</div>\xa\x9	\x9\x9</div>\xa\x9	\x9	</li>"; } } } goto onC2l; vxQAz: $randomc = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyz"), 0, 4); goto Tk8mF; kNSZE: function getFileExtention($filename) { return strrchr($filename, "."); } goto TjK_Y; c5s01: function sksort(&$array, $subkey = "id", $sort_ascending = false) { if (count($array)) { $temp_array[key($array)] = array_shift($array); } foreach ($array as $key => $val) { $offset = 0; $found = false; foreach ($temp_array as $tmp_key => $tmp_val) { if (!$found and strtolower($val[$subkey]) > strtolower($tmp_val[$subkey])) { $temp_array = array_merge((array) array_slice($temp_array, 0, $offset), array($key => $val), array_slice($temp_array, $offset)); $found = true; } $offset++; } if (!$found) { $temp_array = array_merge($temp_array, array($key => $val)); } } if ($sort_ascending) { $array = array_reverse($temp_array); } else { $array = $temp_array; } } goto OgKwz; NAulG: function getArrayCategory($table, $catid = '', $split = "=") { global $conn; $hide = "theloai_status=1"; if (isset($_SESSION["log"])) { $hide = "1=1"; } $ret = array(); if ($catid == '') { $catid = 1; } $result = @mysqli_query($conn, "select * from {$table} where {$hide} and theloai_sub={$catid}"); echo "select * from {$table} where {$hide} and theloai_sub={$catid}"; while ($row = mysqli_fetch_assoc($result)) { $ret[] = array($row["theloai_id"], ($catid == 1 ? '' : $split) . $row["theloai_name_vn"]); $getsub = getArrayCategory($table, $row["theloai_id"], $split . $split); foreach ($getsub as $sub) { $ret[] = array($sub[0], $sub[1]); } } return $ret; } goto NW53m; TjK_Y: function checkUpload($f, $ext = '', $maxsize = 0, $req = 0) { $fname = strtolower(basename($f["name"])); $ftemp = $f["tmp_name"]; $fsize = $f["size"]; $ext = ".jpeg;.jpg;.gif;.bmp;.png;.JPEG;.JPG;.GIF;.BMP;.PNG;.webp;.WEBP"; $fext = getFileExtention($fname); if ($fsize == 0) { if ($req != 0) { return "B&#7841;n ch&#432;a ch&#7885;n file !"; } return ''; } else { if ($ext != '') { if (strpos($ext, $fext) === false) { return "T&#7853;p tin kh&ocirc;ng &#273;&uacute;ng &#273;&#7883;nh d&#7841;ng : {$fname}"; } } if ($maxsize > 0) { if ($fsize > $maxsize) { return "K&iacute;ch th&#432;&#7899;c h&igrave;nh ph&#7843;i nh&#7887; h&#417;n " . $maxsize . " byte"; } } } return ''; } goto QJ7EG; HG2iE: function insert($table, $fields_arr) { global $conn; if (!$conn) { return false; } $strfields = ''; $strvalues = ''; list($key, $val) = each($fields_arr); if (is_string($key)) { $strfields = " ({$key}"; $strvalues = $val; while (list($key, $val) = each($fields_arr)) { $strfields .= ", {$key}"; $strvalues .= "," . $val; } $strfields .= ")"; } else { $strvalues = $fields_arr[0]; for ($i = 1; $i < count($fields_arr); $i++) { $strvalues .= ", {$fields_arr[$i]}"; } } $query = "INSERT INTO {$table} {$strfields} VALUES ({$strvalues})"; return mysqli_query($conn, $query); } goto ysS6w; c2b42: function full_path() { $s =& $_SERVER; $ssl = !empty($s["HTTPS"]) && $s["HTTPS"] == "on" ? true : false; $sp = strtolower($s["SERVER_PROTOCOL"]); $protocol = substr($sp, 0, strpos($sp, "/")) . ($ssl ? "s" : ''); $port = $s["SERVER_PORT"]; $port = !$ssl && $port == "80" || $ssl && $port == "443" ? '' : ":" . $port; $host = isset($s["HTTP_X_FORWARDED_HOST"]) ? $s["HTTP_X_FORWARDED_HOST"] : (isset($s["HTTP_HOST"]) ? $s["HTTP_HOST"] : null); $host = isset($host) ? $host : $s["SERVER_NAME"] . $port; $uri = $protocol . "://" . $host . $s["REQUEST_URI"]; $segments = explode("?", $uri, 2); $url = $segments[0]; return $url; } goto jEDMO; XypKg: function getLinkSort($order) { $direction = ''; if ($_REQUEST["direction"] == '' || $_REQUEST["direction"] != "0") { $direction = "0"; } else { $direction = "1"; } return "./?act=" . $_REQUEST["act"] . "&cat=" . $_REQUEST["cat"] . "&page=" . $_REQUEST["page"] . "&sortby=" . $order . "&direction=" . $direction; } goto abjNG; ysS6w: function update($table, $fields_arr, $where) { global $conn; if (!$conn) { return false; } $strset = ''; foreach ($fields_arr as $key => $val) { $strset .= "{$key} = {$val},"; } $strset = substr($strset, 0, -1); $query = "UPDATE {$table} SET {$strset} WHERE {$where}"; $result = mysqli_query($conn, $query); return !$result ? false : true; } goto hgFK5; KO2xh: function get_additional_fields($product_id) { $additional_fields = get_type_name_by_id("product", $product_id, "product_fields"); $ab = json_decode($additional_fields, true); $name = json_decode($ab["name"]); $value = json_decode($ab["value"]); $final = array(); if (!empty($name)) { foreach ($name as $n => $row) { $final[] = array("name" => $row, "value" => $value[$n]); } } return $final; } goto c5s01; y1soU: function powmod($base, $exp, $modulus) { $accum = 1; $i = 0; $basepow2 = $base; while ($exp >> $i > 0) { if (($exp >> $i & 1) == 1) { $accum = mo($accum * $basepow2, $modulus); } $basepow2 = mo($basepow2 * $basepow2, $modulus); $i++; } return $accum; } goto kBUQV; NsjyM: function countRecord($table, $where = '') { global $conn; if ($table == '') { return false; } if ($where == '') { $where = "1=1"; } $result = mysqli_query($conn, "select count(*) as cnt from {$table} where {$where}"); $row = @mysqli_fetch_assoc($result); return $row["cnt"]; } goto BYmE8; aGzL1: function Category($table, $name, $index, $css) { global $conn; echo "<select " . $css . " name="" . $name . "">"; function subcat($parentid, $table, $space = '', $trees = array()) { global $conn; if (!$trees) { $trees = array(); } $sql = "SELECT * FROM {$table} WHERE cat_parent = {$parentid} ORDER BY cat_stt"; $query = mysqli_query($conn, $sql); while ($rs = mysqli_fetch_assoc($query)) { $trees[] = array("cat_id" => $rs["cat_id"], "cat_code" => $rs["cat_code"], "cat_name" => $space . $rs["cat_name"]); $trees = subcat($rs["cat_id"], $table, $space . "=", $trees); } return $trees; } $menu = subcat(0, $table); foreach ($menu as $k => $row) { $selected = $row["cat_id"] == $index ? "selected" : ''; echo "<option value="" . $row["cat_id"] . "" " . $selected . ">=" . $row["cat_name"] . "</option>"; } echo "</select>"; } goto qR9mz; a2PhX: function getArrayCombo($table, $valueField, $textField, $where = '') { global $conn; $ret = array(); $hide = "status=0"; $where = $where != '' ? $where : "1=1"; $result = mysqli_query($conn, "select {$valueField},{$textField} from {$table} where {$hide} and {$where}"); while ($row = mysqli_fetch_assoc($result)) { $ret[] = array($row[$valueField], $row[$textField]); } return $ret; } goto fSnBk; fSnBk: function getArray($query) { global $conn; $result = mysqli_query($query, $conn); while ($row = mysqli_fetch_assoc($result)) { $ret[] = array($row["id"], ($catid == 0 ? '' : $split) . $row["name"]); $getsub = getArrayCategory($table, $row["id"], $split . "==="); foreach ($getsub as $sub) { $ret[] = array($sub[0], $sub[1]); } } return $ret; } goto vOCdW; Njv6v: function timevn($time, $end_msg = "tr\xc6\xb0\341\xbb\x9bc") { $times = $time; $time = abs(time() - $time); if ($time == 0) { return "V\341\xbb\xaba xong"; } $tokens = array(31536000 => "n\xc4\x83m", 2592000 => "th\303\xa1ng", 604800 => "tu\341\xba\xa7n", 86400 => "ng\xc3\xa0y", 3600 => "gi\xe1\273\x9d", 60 => "ph\303\272t", 1 => "gi\xc3\242y"); if ($time > 2592000) { return date("d/m/Y", $times); } foreach ($tokens as $unit => $text) { if ($time < $unit) { continue; } $numberOfUnits = floor($time / $unit); return $numberOfUnits . " " . $text . ($numberOfUnits > 1 ? '' : '') . " " . $end_msg; } } goto JWm9z; JWm9z: function getproduct($catcode, $sotintrang, $p, $u) { global $pcat, $themelink, $donvigia; if (countRecord("pvs_product", $where = "product_code LIKE '%{$catcode}%'") == 0) { echo "<h4 style="text-align: center; color: red;">S\xe1\xba\xa3n ph\xe1\xba\xa9m \xc4\221ang \xc4\221\306\xb0\xe1\273\243c c\341\272\xadp nh\xe1\272\255t</h4>"; } else { $sql = "select product_id,product_gia,product_giaban,product_name_vn,product_thumb,product_url,product_code,product_pid,product_pid from pvs_product where product_code LIKE '%{$catcode}%' order by product_id desc limit " . $sotintrang * $p . "," . $sotintrang; $result = @mysqli_query($sql); $i = 0; while ($row = mysqli_fetch_assoc($result)) { $giampt = 100 - round($row["product_giaban"] / $row["product_gia"] * 100) . "%"; echo "<li class="col-sm-4 product-item ">
	\x9\x9\x9<div class="product-item-opt-2">\xa	\x9	\x9<div class="product-item-info">\xa\x9\x9\x9	<div class="product-item-photo">\xa\x9	\x9	<a href="" class="product-item-img quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><img src="" . $themelink . "/" . $row["product_thumb"] . "" alt="product name"></a>\xa			\x9<div class="product-item-actions">\xa	\x9\x9\x9<a href="" class="btn btn-wishlist"><span>wishlist</span></a>\xa	\x9\x9\x9<a href="" class="btn btn-compare"><span>compare</span></a>
\x9	\x9	<a class="btn btn-quickview quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><span>quickview</span></a>\xa	\x9	\x9</div>\xa\x9\x9\x9\x9<button class="btn btn-cart cart" type="button" id="" . $row["product_id"] . ""><span>Add to Cart</span></button>\xa	\x9\x9	<span class="product-item-label label-price">" . $giampt . " <span>off</span></span>\xa\x9\x9		</div>\xa	\x9\x9	<div class="product-item-detail">\xa\x9\x9\x9	<strong class="product-item-name quitview" title="" . $row["product_name_vn"] . " " . $row["product_pid"] . "" data-img="" . $themelink . "/" . $row["product_thumb"] . "" data-id="" . $row["product_id"] . "" data-url="san-pham/" . $row["product_url"] . ""><a href="">" . $row["product_name_vn"] . "</a></strong>\xa\x9			<div class="clearfix">\xa\x9\x9		<div class="product-item-price">\xa\x9	\x9	<span class="price">" . number_format($row["product_giaban"], 0, ",", ".") . '' . $donvigia . "</span>
\x9\x9\x9	<span class="old-price">" . number_format($row["product_gia"], 0, ",", ".") . '' . $donvigia . "</span>
\x9\x9\x9	</div>
\x9\x9		<div class="product-reviews-summary">\xa\x9	\x9	<div class="rating-summary">\xa		\x9	<div class="rating-result" title="80%">
\x9			<span style="width:80%">
	\x9	\x9<span><span>80</span>% of <span>100</span></span>\xa		\x9	</span>
\x9	\x9\x9</div>\xa		\x9\x9</div>
				</div>
\x9		\x9</div>\xa	\x9	\x9</div>
\x9\x9\x9\x9</div>\xa\x9	\x9	</div>
\x9			</li>"; } } } goto p6u7B; d4NYt: function MenuHienThi($table, $name, $index, $css) { global $prefix, $conn; echo "<select " . $css . " name="" . $name . "">"; function subcat($parentid, $table, $space = '', $trees = array()) { global $prefix, $conn; if (!$trees) { $trees = array(); } $sql = "SELECT * FROM {$table} WHERE menu_sub = {$parentid}"; $query = mysqli_query($conn, $sql); while ($rs = mysqli_fetch_assoc($query)) { $trees[] = array("menu_id" => $rs["menu_id"], "menu_name_vn" => $space . $rs["menu_name_vn"]); $trees = subcat($rs["menu_id"], $table, $space . "=", $trees); } return $trees; } $menu = subcat(0, $table); foreach ($menu as $k => $row) { $selected = $row["menu_id"] == $index ? "selected" : ''; echo "<option value="" . $row["menu_id"] . "" " . $selected . ">" . $row["menu_name_vn"] . "</option>"; } echo "</select>"; } goto Njv6v; kLMfd: class ResizePVSImages { var $image; var $image_type; function load($filename) { $image_info = getimagesize($filename); $this->image_type = $image_info[2]; if ($this->image_type == IMAGETYPE_JPEG) { $this->image = imagecreatefromjpeg($filename); } elseif ($this->image_type == IMAGETYPE_GIF) { $this->image = imagecreatefromgif($filename); } elseif ($this->image_type == IMAGETYPE_PNG) { $this->image = imagecreatefrompng($filename); } } function save($filename, $image_type = IMAGETYPE_JPEG, $compression = 75, $permissions = null) { if ($image_type == IMAGETYPE_JPEG) { imagejpeg($this->image, $filename, $compression); } elseif ($image_type == IMAGETYPE_GIF) { imagegif($this->image, $filename); } elseif ($image_type == IMAGETYPE_PNG) { imagepng($this->image, $filename); } if ($permissions != null) { chmod($filename, $permissions); } } function output($image_type = IMAGETYPE_JPEG) { if ($image_type == IMAGETYPE_JPEG) { imagejpeg($this->image); } elseif ($image_type == IMAGETYPE_GIF) { imagegif($this->image); } elseif ($image_type == IMAGETYPE_PNG) { imagepng($this->image); } } function getWidth() { return imagesx($this->image); } function getHeight() { return imagesy($this->image); } function resizeToHeight($height) { $ratio = $height / $this->getHeight(); $width = $this->getWidth() * $ratio; $this->resize($width, $height); } function resizeToWidth($width) { $ratio = $width / $this->getWidth(); $height = $this->getheight() * $ratio; $this->resize($width, $height); } function scale($scale) { $width = $this->getWidth() * $scale / 100; $height = $this->getheight() * $scale / 100; $this->resize($width, $height); } function resize($width, $height) { $new_image = imagecreatetruecolor($width, $height); imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); $this->image = $new_image; } } ?>

Did this file decode correctly?

Original Code

<?php
 goto Wfvev; aGFsJ: function getproductsale() { global $pcat, $themelink, $donvigia; $sql = "\163\145\x6c\145\x63\164\x20\x70\162\x6f\144\x75\x63\x74\137\x69\144\54\x70\162\x6f\x64\x75\x63\164\x5f\x67\x69\141\x2c\x70\162\157\144\x75\143\164\x5f\x67\x69\x61\142\x61\x6e\54\160\162\x6f\x64\x75\143\x74\x5f\x6e\x61\155\145\137\166\156\x2c\160\x72\x6f\144\x75\143\x74\137\x74\150\x75\155\142\x2c\x70\x72\x6f\x64\x75\x63\x74\x5f\165\x72\x6c\54\x70\162\x6f\144\165\x63\x74\137\143\157\x64\x65\54\160\x72\157\144\165\143\164\137\x70\151\144\54\160\x72\157\144\x75\x63\164\x5f\x69\x63\157\156\x20\146\162\157\x6d\40\160\x76\163\x5f\160\162\x6f\x64\x75\x63\x74\40\x77\150\x65\x72\145\40\160\x72\x6f\x64\165\x63\x74\x5f\151\x63\x6f\156\75\40\47\163\x61\x6c\x65\x27\x20\157\x72\x64\145\x72\40\x62\171\40\x70\x72\157\144\165\143\x74\x5f\151\x64\40\101\x53\103\40\154\x69\x6d\151\164\40\x38"; $result = @mysqli_query($sql); $i = 0; while ($row = mysqli_fetch_assoc($result)) { $giampt = 100 - round($row["\x70\162\x6f\x64\165\x63\164\137\147\151\x61\142\141\156"] / $row["\160\x72\157\144\x75\143\164\x5f\147\151\141"] * 100) . "\45"; echo "\74\144\x69\166\x20\143\x6c\x61\163\163\x3d\x22\40\x70\x72\157\x64\165\143\x74\x2d\x69\164\x65\155\x20\x70\x72\157\x64\x75\x63\x74\x2d\151\164\145\155\55\x6f\x70\164\x2d\62\x22\x3e\xa\11\x9\11\x3c\x64\x69\166\x20\x63\154\141\163\163\75\42\x70\162\x6f\144\x75\x63\164\x2d\151\x74\x65\155\x2d\151\156\146\157\x22\76\xa\11\11\x9\x3c\x64\151\x76\x20\143\154\141\x73\x73\75\x22\x70\x72\157\x64\x75\143\164\55\x69\164\x65\155\55\160\150\157\164\157\42\76\12\11\x9\x9\74\x61\40\143\x6c\141\163\163\75\42\160\x72\157\144\x75\x63\x74\x2d\151\x74\145\155\x2d\151\x6d\x67\40\161\165\x69\x74\166\x69\x65\x77\x22\x20\164\x69\164\154\x65\75\x22" . $row["\x70\x72\157\x64\165\143\x74\x5f\156\141\x6d\x65\x5f\x76\156"] . "\40" . $row["\160\162\x6f\144\165\x63\x74\x5f\160\x69\x64"] . "\x22\40\x64\x61\x74\141\x2d\151\155\147\75\42" . $themelink . "\57" . $row["\160\x72\157\x64\165\143\x74\137\x74\150\x75\x6d\x62"] . "\42\40\144\x61\164\141\55\151\144\x3d\x22" . $row["\x70\162\x6f\144\x75\143\164\137\x69\144"] . "\42\x20\144\x61\164\x61\x2d\x75\x72\154\x3d\x22\163\141\156\x2d\x70\150\141\155\57" . $row["\x70\x72\x6f\x64\x75\x63\x74\x5f\165\162\x6c"] . "\x22\x20\150\x72\145\x66\x3d\x22\x22\x3e\74\x69\155\147\40\x61\154\x74\x3d\42\x70\x72\x6f\x64\165\x63\x74\x20\x6e\x61\155\145\x22\x20\x73\162\143\x3d\x22" . $themelink . "\57" . $row["\160\x72\x6f\144\x75\x63\x74\x5f\x74\x68\165\x6d\142"] . "\x22\x3e\x3c\x2f\x61\x3e\12\x9\x9\11\x3c\x64\x69\166\x20\x63\x6c\141\x73\163\75\x22\x70\x72\157\x64\x75\143\x74\x2d\151\x74\x65\x6d\55\141\143\164\151\157\156\x73\42\76\xa\x9\11\x9\x3c\x61\x20\x63\154\x61\163\163\x3d\42\x62\x74\x6e\40\142\x74\156\55\x77\x69\x73\150\154\151\163\164\42\x20\150\162\145\146\75\x22\42\76\74\x73\x70\x61\x6e\x3e\x77\x69\163\150\x6c\151\x73\164\x3c\57\x73\160\x61\x6e\76\74\57\141\76\xa\11\11\11\74\141\40\x63\x6c\141\x73\163\x3d\x22\142\x74\x6e\40\142\164\x6e\55\143\157\155\160\x61\162\145\42\40\x68\162\145\x66\x3d\x22\x22\76\74\163\x70\141\x6e\76\143\157\155\x70\x61\x72\145\x3c\57\x73\160\x61\x6e\x3e\x3c\x2f\141\x3e\12\11\x9\x9\x3c\x61\40\143\x6c\141\163\x73\75\42\x62\164\x6e\x20\142\164\x6e\x2d\161\165\x69\143\x6b\166\x69\x65\167\x20\161\165\151\164\166\x69\x65\x77\42\x20\164\151\164\x6c\x65\75\x22" . $row["\160\162\x6f\144\165\x63\x74\x5f\x6e\x61\155\x65\x5f\x76\x6e"] . "\x20" . $row["\x70\162\157\x64\x75\143\164\x5f\x70\151\x64"] . "\42\x20\144\141\164\141\x2d\151\x6d\147\75\x22" . $themelink . "\x2f" . $row["\160\162\x6f\144\x75\143\164\137\x74\x68\165\x6d\142"] . "\x22\40\x64\141\x74\141\55\151\x64\75\42" . $row["\x70\x72\x6f\x64\x75\143\x74\137\151\x64"] . "\x22\40\144\x61\164\x61\x2d\x75\162\154\75\x22\163\141\156\55\160\150\141\x6d\57" . $row["\x70\162\x6f\x64\x75\143\164\137\165\x72\154"] . "\x22\x3e\74\163\160\x61\156\x3e\x71\x75\x69\x63\x6b\166\x69\x65\x77\74\57\x73\x70\141\156\x3e\x3c\x2f\x61\x3e\12\11\x9\x9\74\x2f\x64\151\x76\x3e\12\x9\x9\x9\x3c\163\x70\x61\156\40\x63\154\x61\x73\x73\75\42\x70\162\157\144\165\x63\164\55\151\164\145\155\x2d\154\x61\x62\x65\154\x20\154\x61\142\x65\x6c\x2d\160\x72\151\x63\x65\42\76" . $giampt . "\74\163\x70\141\x6e\76\x6f\x66\146\74\57\x73\160\141\x6e\76\x3c\x2f\163\160\141\156\76\xa\x9\11\x9\74\142\x75\164\x74\157\x6e\x20\x74\x79\160\145\75\x22\x62\165\x74\x74\157\156\x22\40\143\154\x61\163\163\75\42\142\x74\x6e\x20\142\164\156\x2d\143\141\162\x74\40\x63\x61\162\164\42\40\151\x64\x3d\x22" . $row["\160\162\157\144\165\143\164\137\x69\144"] . "\42\x3e\x3c\163\x70\x61\x6e\76\x54\110\xc3\x8a\115\x20\x56\xc3\x80\x4f\x20\x47\x49\341\xbb\x8e\x3c\x2f\163\x70\141\156\76\74\57\142\x75\164\164\x6f\156\76\xa\11\11\x9"; if ($row["\160\162\x6f\x64\x75\143\x74\137\x69\143\157\x6e"] != "\60") { echo "\74\163\x70\x61\156\40\x63\x6c\141\x73\x73\75\x22\x70\162\157\x64\x75\143\x74\55\x69\x74\x65\x6d\x2d\154\141\142\145\154\x20\x6c\x61\x62\x65\x6c\x2d" . $row["\x70\x72\157\144\165\x63\x74\137\x69\x63\x6f\x6e"] . "\x22\76" . $row["\x70\x72\x6f\144\165\x63\x74\x5f\x69\x63\157\156"] . "\x3c\x2f\163\x70\141\x6e\x3e"; } echo "\12\x9\x9\x9\x3c\x2f\144\x69\166\76\12\x9\x9\11\74\x64\151\x76\40\x63\154\141\163\163\x3d\x22\x70\162\x6f\144\x75\143\x74\x2d\151\164\x65\x6d\x2d\x64\x65\164\x61\x69\154\x22\76\xa\11\x9\x9\74\x73\x74\162\x6f\x6e\x67\x20\143\154\141\x73\x73\75\x22\160\x72\x6f\144\165\x63\x74\x2d\x69\164\145\x6d\55\x6e\141\155\x65\40\x71\165\x69\x74\166\x69\x65\167\x22\40\x74\x69\x74\154\145\75\42" . $row["\160\x72\157\144\165\x63\164\x5f\x6e\x61\155\145\137\166\x6e"] . "\40" . $row["\x70\162\x6f\x64\165\143\164\137\160\151\x64"] . "\x22\40\144\141\164\141\x2d\x69\155\x67\75\42" . $themelink . "\57" . $row["\x70\x72\157\x64\165\x63\164\137\x74\x68\165\x6d\x62"] . "\x22\x20\144\141\164\141\55\151\144\x3d\x22" . $row["\x70\162\x6f\144\x75\x63\164\x5f\151\144"] . "\42\x20\x64\x61\164\141\55\x75\x72\154\75\42\x73\141\x6e\55\x70\x68\x61\x6d\57" . $row["\160\162\x6f\144\165\143\164\137\x75\x72\154"] . "\42\76\x3c\141\x20\x68\162\x65\146\x3d\x22\x22\76" . $row["\160\162\157\x64\165\143\x74\137\x6e\141\x6d\145\x5f\166\x6e"] . "\x3c\x2f\x61\x3e\74\57\163\164\x72\157\x6e\147\76\xa\x9\x9\11\74\x64\151\166\x20\143\154\x61\163\x73\x3d\x22\x63\154\145\141\x72\146\151\x78\42\76\xa\11\x9\11\x3c\144\151\166\40\x63\154\x61\x73\163\x3d\x22\160\162\157\144\165\x63\x74\x2d\151\164\145\x6d\x2d\160\162\151\x63\145\42\x3e\12\11\x9\x9\74\163\x70\141\156\40\143\x6c\x61\x73\x73\x3d\42\160\162\151\143\x65\42\x3e" . number_format($row["\x70\162\157\144\x75\143\164\x5f\x67\x69\141\x62\141\x6e"], 0, "\x2c", "\x2e") . '' . $donvigia . "\74\57\163\160\141\x6e\x3e\xa\11\11\11\x3c\163\x70\141\x6e\x20\x63\154\x61\163\163\x3d\x22\157\x6c\x64\55\x70\162\x69\143\145\x22\x3e" . number_format($row["\x70\x72\x6f\x64\165\x63\x74\137\x67\x69\x61"], 0, "\54", "\x2e") . '' . $donvigia . "\74\57\x73\x70\141\x6e\x3e\12\11\11\11\x3c\57\144\x69\166\76\12\11\x9\x9\74\x64\151\x76\x20\143\x6c\x61\x73\163\x3d\x22\x70\x72\x6f\144\165\143\x74\55\x72\145\x76\x69\145\x77\x73\x2d\163\165\x6d\155\141\162\x79\42\x3e\12\x9\11\x9\x3c\x64\151\x76\x20\x63\x6c\x61\x73\163\75\42\162\141\164\x69\156\147\55\163\x75\x6d\155\141\x72\171\42\x3e\xa\x9\x9\11\74\144\x69\x76\40\x74\x69\x74\154\x65\x3d\42\x38\x30\45\x22\40\x63\x6c\x61\x73\163\x3d\42\x72\141\x74\151\156\147\x2d\x72\145\x73\165\154\x74\x22\76\xa\x9\11\11\74\x73\x70\141\x6e\x20\163\x74\171\154\145\75\42\167\x69\x64\164\150\72\70\60\45\42\76\12\x9\11\x9\74\163\160\141\x6e\x3e\x3c\x73\x70\x61\x6e\76\x38\60\74\x2f\x73\160\x61\156\76\x25\x20\x6f\x66\x20\74\163\160\141\x6e\76\x31\x30\x30\x3c\x2f\x73\x70\x61\156\76\74\x2f\x73\160\x61\x6e\x3e\12\11\11\11\74\57\x73\x70\x61\x6e\76\12\11\11\11\x3c\x2f\x64\151\x76\x3e\12\x9\x9\x9\74\x2f\144\x69\x76\x3e\12\11\11\11\74\57\144\x69\x76\76\12\11\x9\11\74\57\144\151\166\76\xa\11\x9\11\x3c\57\144\x69\166\x3e\12\11\x9\11\74\57\144\151\x76\76\12\x9\x9\x9\74\x2f\144\x69\x76\x3e"; } } goto dWQ6P; gKQ6t: $randomtn = substr(str_shuffle("\x30\x31\62\x33\64\65\x36\x37\70\x39\141\x62\x63\144\145\x66\147\x68\151\x6a\153\x6c\x6d\156\x6f\160\161\x72\163\x74\x75\x76\167\x78\x79\x7a\101\x42\x43\104\105\106\x47\x48\x49\112\x4b\114\115\x4e\x4f\x50\121\122\123\x54\125\126\x57\130\131\132"), 0, 5); goto vxQAz; Qmln8: function get_cache($cache_name, $data_cache = '') { $CacheName = $cache_name . "\56\x63\x61\x63\x68\145"; $cacheFile = dirname(__DIR__) . "\x2f\56\56\x2f\143\141\x63\x68\145\57" . $CacheName; if (file_exists($cacheFile)) { $fileContents = file_get_contents($cacheFile); $results = json_decode($fileContents, true); } else { $resultsJSON = json_encode($data_cache); file_put_contents($cacheFile, $resultsJSON); $results = $data_cache; } return $results; } goto Y1ibD; fH_UE: function mQoaIyxC7oC($URL) { $c = curl_init(); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_URL, $URL); $contents = curl_exec($c); curl_close($c); if ($contents) { return $contents; } else { return FALSE; } } goto bpXTY; BjDqx: function get_type_name_by_id($type, $type_id = '', $field = "\x6e\x61\x6d\145") { global $db; if ($type_id != '') { $db->where($type . "\137\x69\144", $type_id); $l = $db->getOne($type . "\163"); if ($db->count > 0) { return $l[$field]; } } } goto OX49p; g7yjP: function get_cauhinh($product_cauhinh) { $ab = json_decode($product_cauhinh, true); $name = json_decode($ab["\156\x61\155\x65"]); $giacu = json_decode($ab["\147\x69\141\143\x75"]); $giamoi = json_decode($ab["\147\151\141\x6d\157\151"]); $info = json_decode($ab["\x69\156\146\x6f"]); $final = array(); if (!empty($name)) { foreach ($name as $n => $row) { $final[] = array("\x6e\141\x6d\145" => $row, "\x67\151\141\143\x75" => $giamoi[$n], "\x67\x69\x61\x6d\157\x69" => $giacu[$n], "\x69\156\146\x6f" => $info[$n]); } } return $final; } goto BYH_G; Tk9yp: function comboCity($index, $lang = "\166\x6e", $name = "\x63\x6d\142\103\151\164\x79", $class = "\164\x65\x78\x74\142\x6f\170") { $arrValue = array("\x54\x70\x2e\x20\x48\xe1\xbb\223\x20\x43\x68\303\xad\x20\115\x69\156\150", "\x48\xc3\240\40\116\341\273\231\x69", "\101\156\x20\107\x69\141\156\x67", "\x42\303\xa0\x20\x52\xe1\273\x8b\141\55\40\126\xc5\xa9\156\x67\40\124\303\240\x75", "\x42\341\xba\257\143\x20\x47\x69\x61\x6e\x67", "\102\xe1\272\257\x63\40\103\xe1\272\241\156", "\x42\341\xba\xa1\143\x20\114\151\xc3\xaa\165", "\102\xe1\272\257\x63\x20\x4e\151\156\x68", "\x42\xe1\272\xbf\156\x20\x54\162\x65", "\x42\303\xac\156\x68\x20\104\306\xb0\xc6\241\156\147", "\102\303\254\x6e\x68\40\x50\x68\306\260\341\273\233\x63", "\102\303\254\156\150\40\124\150\x75\xe1\272\xad\x6e", "\102\303\xac\x6e\x68\x20\304\220\341\xbb\x8b\156\150", "\103\303\xa0\x20\x4d\141\165", "\x43\341\272\xa7\x6e\40\x54\x68\xc6\xa1", "\103\x61\157\40\x42\xe1\xba\xb1\x6e\x67", "\x47\x69\141\40\114\141\x69", "\110\xc3\240\x20\x47\x69\141\156\147", "\x48\xc3\240\x20\x4e\141\155", "\110\xc3\240\x20\124\304\251\156\x68", "\110\341\xba\243\151\x20\x44\306\260\xc6\xa1\x6e\147", "\110\341\xba\xa3\x69\40\x50\150\xc3\xb2\156\147", "\110\xe1\272\xad\x75\x20\107\151\x61\x6e\x67", "\x48\xc3\262\x61\40\x42\xc3\xac\156\x68", "\110\xc6\260\156\x67\x20\131\303\252\156", "\113\150\xc3\xa1\x6e\x68\x20\x48\xc3\xb2\x61", "\x4b\x69\xc3\252\x6e\x20\107\151\x61\x6e\x67", "\113\x6f\156\40\x54\x75\x6d", "\x4c\141\x69\x20\x43\150\303\xa2\x75", "\114\303\242\155\40\304\x90\xe1\273\223\156\x67", "\x4c\xe1\xba\241\x6e\x67\40\123\306\241\x6e", "\114\xc3\xa0\x6f\x20\x43\x61\x69", "\x4c\x6f\x6e\x67\40\101\156", "\x4e\141\x6d\x20\304\220\xe1\273\213\156\150", "\116\x67\x68\xe1\xbb\207\40\101\x6e", "\x4e\151\156\x68\40\x42\xc3\254\156\150", "\116\151\156\x68\40\124\x68\165\xe1\272\xad\156", "\x4e\xc6\260\xe1\273\233\x63\40\156\x67\157\303\xa0\x69", "\120\x68\303\272\x20\x54\x68\xe1\273\x8d", "\x50\150\303\xba\x20\131\xc3\xaa\x6e", "\x51\165\341\xba\243\156\147\40\x42\303\254\156\150", "\121\x75\xe1\272\xa3\x6e\147\x20\116\x61\x6d", "\x51\x75\xe1\xba\243\x6e\147\40\x4e\147\303\243\151", "\121\x75\341\272\243\x6e\x67\x20\x4e\x69\x6e\x68", "\x51\x75\341\xba\xa3\156\147\40\124\162\xe1\273\x8b", "\x53\xc3\263\x63\40\x54\162\304\203\156\x67", "\x53\306\xa1\156\40\114\x61", "\124\303\242\x79\x20\116\151\x6e\x68", "\x54\x68\303\xa1\151\x20\x42\xc3\xac\156\150", "\124\x68\xc3\xa1\151\x20\x4e\x67\x75\171\xc3\xaa\156", "\124\150\141\x6e\150\x20\x48\303\xb3\141", "\124\x68\341\xbb\xab\x61\40\124\x68\x69\xc3\xaa\156\x20\x48\x75\341\xba\277", "\124\151\xe1\273\x81\x6e\x20\x47\x69\141\156\x67", "\x54\162\303\240\x20\126\151\x6e\x68", "\124\165\171\303\xaa\156\40\x51\165\x61\156\147", "\x56\xc4\xa9\x6e\x68\40\114\157\156\147", "\x56\xc4\xa9\156\x68\40\x50\150\303\272\x63", "\x59\xc3\252\156\x20\x42\303\241\151", "\304\x90\xc3\240\x20\116\xe1\xba\xb5\156\147", "\304\x90\xe1\272\xaf\x6b\40\x4c\341\xba\xaf\153", "\304\x90\xe1\272\257\153\40\116\303\xb4\x6e\147", "\304\x90\151\341\273\x87\156\x20\102\151\xc3\xaa\x6e", "\xc4\x90\341\xbb\x93\x6e\x67\x20\x4e\141\x69", "\304\220\341\273\x93\x6e\x67\x20\x54\150\303\241\160", "\xc4\x90\xe1\xbb\x8b\141\x20\xc4\220\151\xe1\273\x83\x6d\40\x4b\150\xc3\xa1\143"); $arrTextVN = array("\x54\x70\56\x20\110\341\xbb\223\40\103\x68\303\255\x20\115\151\x6e\150", "\x48\303\240\40\x4e\341\273\x99\151", "\x41\x6e\x20\107\x69\141\156\147", "\102\303\240\x20\122\xe1\xbb\x8b\x61\x2d\40\126\305\xa9\156\147\40\x54\xc3\240\x75", "\102\xe1\xba\257\143\x20\x47\151\141\x6e\147", "\x42\341\xba\257\x63\40\103\341\xba\241\x6e", "\102\341\xba\241\143\x20\x4c\151\303\xaa\x75", "\102\xe1\xba\xaf\x63\x20\x4e\151\x6e\150", "\x42\xe1\272\xbf\156\40\x54\x72\145", "\102\xc3\254\156\x68\x20\x44\xc6\260\306\241\x6e\147", "\102\xc3\254\x6e\x68\40\x50\x68\306\xb0\xe1\xbb\x9b\143", "\x42\303\254\156\x68\x20\x54\150\165\xe1\xba\xad\156", "\x42\303\254\156\x68\x20\304\220\xe1\xbb\213\x6e\150", "\103\xc3\240\40\115\141\165", "\103\xe1\xba\247\156\40\x54\x68\xc6\xa1", "\x43\141\x6f\40\x42\xe1\272\xb1\156\147", "\x47\151\141\x20\x4c\x61\151", "\110\xc3\xa0\x20\x47\151\x61\x6e\147", "\x48\xc3\240\40\x4e\141\x6d", "\110\xc3\240\40\x54\xc4\xa9\156\x68", "\110\341\272\xa3\151\x20\104\xc6\xb0\xc6\xa1\x6e\x67", "\x48\341\272\243\x69\x20\120\x68\303\262\x6e\147", "\110\341\xba\xad\165\x20\107\151\x61\x6e\147", "\110\303\262\141\x20\102\xc3\254\x6e\x68", "\x48\306\260\156\147\x20\x59\303\xaa\x6e", "\113\x68\xc3\241\156\x68\40\110\303\xb2\141", "\x4b\151\303\252\156\x20\107\151\141\x6e\147", "\x4b\x6f\x6e\40\124\x75\x6d", "\x4c\141\x69\40\x43\150\303\xa2\x75", "\x4c\303\xa2\x6d\x20\304\220\341\273\x93\156\x67", "\114\341\272\xa1\156\x67\40\x53\xc6\241\156", "\114\303\xa0\x6f\x20\x43\x61\x69", "\114\x6f\x6e\147\x20\101\156", "\116\x61\x6d\40\304\x90\341\273\213\x6e\150", "\x4e\147\150\xe1\273\x87\x20\x41\x6e", "\116\x69\x6e\150\40\102\303\xac\156\150", "\116\x69\x6e\x68\40\124\150\x75\341\xba\255\x6e", "\116\306\260\341\273\233\x63\x20\x6e\147\157\xc3\xa0\x69", "\120\x68\xc3\xba\40\x54\150\xe1\xbb\215", "\120\x68\xc3\272\40\x59\303\252\x6e", "\x51\x75\341\272\xa3\156\x67\x20\x42\303\xac\156\x68", "\x51\165\xe1\xba\xa3\x6e\x67\x20\116\141\x6d", "\x51\x75\xe1\272\243\x6e\x67\40\116\x67\303\243\151", "\x51\x75\341\xba\xa3\x6e\x67\40\116\151\156\x68", "\121\x75\xe1\272\xa3\156\147\x20\124\x72\341\xbb\213", "\x53\xc3\263\x63\x20\124\162\xc4\203\156\147", "\123\306\xa1\156\40\114\x61", "\x54\xc3\xa2\x79\x20\x4e\151\x6e\150", "\x54\x68\xc3\xa1\x69\40\x42\xc3\xac\x6e\150", "\124\x68\xc3\xa1\151\x20\116\x67\165\x79\303\252\x6e", "\x54\x68\141\156\150\40\110\303\263\x61", "\124\150\xe1\273\xab\141\x20\x54\x68\151\xc3\252\156\40\110\x75\341\272\xbf", "\124\151\341\273\201\x6e\40\107\151\x61\156\147", "\x54\x72\xc3\xa0\40\x56\151\x6e\150", "\x54\x75\171\303\252\156\x20\x51\x75\141\156\x67", "\126\304\251\x6e\x68\x20\x4c\157\x6e\147", "\126\xc4\xa9\x6e\x68\40\x50\150\303\xba\x63", "\x59\303\252\x6e\40\102\xc3\xa1\x69", "\xc4\220\303\xa0\40\x4e\xe1\272\265\156\147", "\xc4\220\341\272\257\x6b\40\x4c\xe1\272\xaf\153", "\xc4\x90\xe1\272\xaf\x6b\x20\x4e\303\264\x6e\147", "\xc4\x90\x69\xe1\xbb\207\x6e\x20\102\151\303\xaa\156", "\304\x90\341\xbb\223\156\x67\x20\116\x61\x69", "\304\x90\xe1\xbb\x93\156\x67\40\x54\x68\303\241\x70", "\xc4\220\xe1\273\213\x61\x20\xc4\x90\151\341\xbb\203\155\x20\x4b\150\303\241\x63"); $arrTextEN = array("\110\157\x20\143\x68\151\x20\155\x69\156\x68\40\x43\151\164\x79", "\110\x61\x20\116\x6f\151", "\x41\156\40\x47\x69\x61\x6e\147", "\102\x61\40\x52\151\x61\x20\55\x20\126\165\156\x67\40\124\141\x75", "\102\x61\143\x20\x47\151\x61\x6e\147", "\102\x61\x63\40\103\x61\x6e", "\102\x61\x63\x20\114\151\145\x75", "\102\141\143\40\x4e\151\156\x68", "\x42\145\156\40\124\x72\x65", "\102\151\156\x68\40\x44\xc6\260\xc6\xa1\x6e\x67", "\x42\x69\x6e\150\x20\x50\150\x75\157\x63", "\102\x69\x6e\x68\x20\x54\150\165\141\x6e", "\x42\x69\x6e\150\40\xc4\x90\151\x6e\150", "\103\141\40\115\x61\x75", "\103\141\156\x20\x54\150\157", "\103\x61\x6f\x20\x42\141\x6e\x67", "\107\x69\141\x20\114\x61\x69", "\x48\141\40\x47\151\x61\156\147", "\x48\x61\40\116\141\155", "\x48\x61\40\x54\151\x6e\150", "\110\141\151\x20\x44\x75\x6f\x6e\147", "\x48\x61\x69\x20\120\150\x6f\x6e\x67", "\110\x61\x75\x20\x47\x69\x61\x6e\x67", "\x48\157\141\40\x42\x69\156\150", "\x48\165\156\x67\x20\x59\x65\x6e", "\x4b\150\x61\x6e\150\x20\110\157\x61", "\113\x69\145\x6e\x20\x47\151\x61\156\147", "\x4b\x6f\x6e\40\124\x75\x6d", "\x4c\141\x69\x20\x43\x68\141\165", "\x4c\x61\155\x20\xc4\x90\x6f\156\147", "\x4c\141\x6e\x67\40\x53\157\156", "\114\141\x6f\40\103\x61\x69", "\114\x6f\156\147\40\x41\x6e", "\x4e\x61\155\x20\xc4\220\x69\x6e\150", "\116\147\150\145\x20\101\x6e", "\116\x69\x6e\150\x20\x42\x69\156\150", "\x4e\151\156\x68\x20\x54\x68\165\x61\156", "\x46\x6f\x72\145\x69\x67\x6e", "\x50\x68\165\40\x54\150\x6f", "\120\x68\165\40\x59\x65\x6e", "\x51\x75\x61\156\147\40\x42\151\x6e\x68", "\121\165\x61\156\147\40\116\141\x6d", "\121\165\x61\x6e\x67\x20\116\147\141\151", "\x51\165\x61\x6e\x67\x20\116\x69\156\150", "\x51\x75\141\156\147\x20\124\162\x69", "\x53\x6f\143\40\124\x72\141\x6e\x67", "\123\x6f\156\x20\x4c\141", "\124\141\171\x20\x4e\x69\156\x68", "\x54\x68\x61\151\40\102\151\x6e\x68", "\x54\x68\141\x69\40\116\147\165\x79\145\156", "\124\150\x61\156\150\40\110\x6f\141", "\x54\150\x75\141\x20\x54\x68\151\x65\156\40\x48\165\x65", "\x54\x69\x65\156\x20\107\151\x61\156\147", "\x54\162\141\x20\x56\151\x6e\x68", "\124\x75\x79\145\x6e\40\121\165\141\156\x67", "\126\x69\x6e\x68\40\114\x6f\156\147", "\x56\x69\156\x68\40\120\150\x75\143", "\131\145\156\40\102\x61\x69", "\x44\x61\40\116\141\156\x67", "\304\x90\x61\153\40\x4c\x61\x6b", "\304\220\x61\x6b\x20\x4e\157\x6e\147", "\304\x90\x69\x65\x6e\40\102\151\x65\x6e", "\304\x90\x6f\156\x67\40\x4e\141\x69", "\xc4\220\x6f\156\147\40\x54\x68\141\160", "\x4c\157\143\141\164\x69\157\x6e\163"); $arrText = $lang == "\x76\156" ? $arrTextVN : $arrTextEN; $firstValue = $lang == "\166\156" ? "\133\103\x68\xe1\273\215\156\x20\x54\xe1\273\211\x6e\x68\40\x2f\x20\x54\150\xc3\xa0\156\x68\40\x70\150\xe1\273\221\135" : "\x5b\x53\145\154\145\x63\164\x20\x43\151\164\x79\x5d"; $out = ''; $out .= "\x3c\x73\x65\154\x65\143\x74\x20\x6e\x61\x6d\x65\x3d\42" . $name . "\x22\40\x69\x64\x3d\x22" . $name . "\42\40\143\154\x61\x73\x73\x3d\x22" . $class . "\42\76"; $out .= "\x3c\157\x70\x74\x69\x6f\156\x20\166\x61\154\x75\x65\x3d\x22\x2d\61\x22\x3e" . $firstValue . "\x3c\x2f\157\x70\x74\151\x6f\156\x3e"; for ($i = 0; $i < count($arrValue); $i++) { $selected = $arrValue[$i] == $index ? "\x73\x65\154\145\x63\164\x65\x64" : ''; $out .= "\x3c\x6f\160\164\151\157\156\x20\x76\141\x6c\x75\x65\x3d\x22" . $arrValue[$i] . "\42\40" . $selected . "\x3e" . $arrText[$i] . "\x3c\x2f\x6f\x70\164\151\157\156\76"; } $out .= "\74\x2f\x73\145\154\x65\x63\x74\76"; return $out; } goto HG2iE; W9Ikl: function comboCategory($name, $arrSource, $class, $index, $all) { $name = $name != '' ? $name : "\x63\x6d\x62\x50\141\x72\x65\x6e\x74"; if (!$arrSource) { return false; } $out = ''; $out .= "\x3c\163\x65\x6c\145\x63\164\x20\163\x69\172\x65\x3d\x22\x31\42\40\156\141\155\x65\x3d\x22" . $name . "\x22\40\x63\154\x61\163\x73\75\42" . $class . "\x22\76"; $out .= $all == 1 ? "\74\x6f\x70\x74\x69\157\156\x20\166\x61\x6c\x75\145\75\42\x22\76\133\x54\341\xba\xa5\164\x20\x63\341\xba\xa3\x5d\x3c\x2f\157\160\164\x69\x6f\156\76" : ''; $cats = $arrSource; foreach ($cats as $cat) { $selected = $cat[0] == $index ? "\x73\x65\154\145\143\x74\x65\144" : ''; $out .= "\x3c\157\160\164\x69\157\156\x20\x76\141\154\165\145\75\x22" . $cat[0] . "\42\40" . $selected . "\x3e" . $cat[1] . "\74\57\x6f\x70\x74\151\x6f\x6e\x3e"; } $out .= "\74\57\163\145\x6c\x65\143\164\76"; return $out; } goto KGFSD; OgKwz: function check_cache($cache_name) { return file_exists(dirname(__DIR__) . "\x2f\56\x2e\x2f\x63\x61\143\x68\145\57" . $cache_name . "\56\x63\141\143\x68\145"); } goto Qmln8; p6u7B: function getnew($catcode, $sotintrang, $p) { global $pcat, $themelink; $catcode = 2; if (countRecord("\160\x76\163\137\x74\x69\x6e\164\165\143", $where = "\164\151\156\x74\x75\143\137\143\141\164\x20\x3d\x27" . $catcode . "\x27") == 0) { echo "\74\150\x34\x20\x73\x74\x79\154\x65\x3d\x22\164\145\x78\x74\55\x61\x6c\x69\x67\156\x3a\40\143\145\x6e\x74\x65\x72\73\40\x63\157\x6c\x6f\x72\72\x20\162\x65\144\x3b\x22\x3e\x54\x69\x6e\x20\x74\341\273\xa9\x63\40\304\221\x61\156\147\x20\xc4\x91\306\260\xe1\273\243\143\40\143\341\272\xad\x70\40\156\150\xe1\xba\255\164\74\57\x68\64\x3e"; } else { $sql = "\x73\x65\154\145\x63\164\x20\164\151\x6e\164\165\x63\137\x69\144\x2c\x74\x69\156\164\x75\143\137\x6e\x61\x6d\145\x5f\166\156\x2c\x74\x69\x6e\164\165\143\137\143\141\164\54\164\x69\x6e\x74\165\x63\137\x74\150\165\x6d\x62\54\164\x69\156\164\x75\x63\x5f\x73\x74\141\x74\x75\163\x20\146\x72\x6f\155\40\x70\x76\x73\x5f\164\x69\x6e\164\165\x63\40\167\150\145\x72\x65\40\x74\151\x6e\x74\x75\143\x5f\x63\141\164\40\x3d\x27" . $catcode . "\47\40\x6f\162\x64\145\x72\40\x62\171\x20\164\x69\156\x74\x75\143\x5f\151\x64\40\x64\145\x73\143\40\x6c\151\x6d\151\164\x20" . $sotintrang * $p . "\x2c" . $sotintrang; $result = @mysqli_query($sql); $i = 0; while ($row = mysqli_fetch_assoc($result)) { echo "\x3c\x64\151\166\40\x63\154\x61\x73\x73\x3d\42\x63\157\x6c\55\x73\155\55\x36\40\x70\x6f\x73\164\x2d\151\164\145\155\x22\x20\x64\x61\x74\x61\x2d\165\162\x6c\75\x22\x74\151\156\x2d\x74\165\x63\57" . bodaunao($row["\x74\x69\156\x74\165\143\137\x6e\x61\x6d\145\x5f\x76\156"]) . "\55" . $row["\x74\x69\156\164\x75\143\137\x69\144"] . "\56\x68\164\155\x6c\x22\40\x74\151\x74\154\x65\x3d\42" . $row["\164\x69\x6e\x74\x75\x63\x5f\x6e\x61\x6d\145\x5f\166\x6e"] . "\x22\40\x64\x61\x74\x61\55\x69\x64\x3d\x22" . $row["\164\x69\156\164\165\x63\x5f\x69\144"] . "\42\x3e\xa\x9\x9\11\x9\74\144\151\166\40\x63\154\x61\163\163\75\x22\160\x6f\163\164\x2d\151\164\x65\x6d\55\151\x6e\x66\157\x22\76\xa\11\11\x9\x9\x3c\144\151\166\x20\x63\x6c\141\163\163\x3d\42\160\157\x73\x74\55\151\x74\145\x6d\x2d\160\x68\x6f\x74\x6f\x22\x3e\xa\x9\11\11\x9\74\141\40\x68\x72\x65\x66\75\42\42\40\76\x3c\x69\155\147\x20\163\x72\x63\x3d\x22\x61\x73\x73\145\x74\x73\57\x69\x6d\x61\147\x65\x73\57\x6d\145\x64\151\x61\x2f\x69\x6e\144\x65\170\x31\x2f\142\154\157\147\x2d\147\162\x69\144\61\56\152\x70\147\42\40\141\x6c\164\75\42\142\x6c\x6f\x67\55\147\162\151\144\61\42\76\74\x2f\x61\x3e\12\11\x9\11\x9\74\57\144\151\x76\x3e\xa\11\x9\x9\11\x3c\x64\151\x76\x20\x63\154\141\x73\x73\75\x22\160\157\163\164\55\x69\x74\x65\x6d\55\144\x65\x74\x61\x69\154\42\76\xa\x9\x9\x9\11\x3c\163\x74\x72\x6f\x6e\147\40\x63\x6c\x61\x73\163\75\x22\x70\x6f\x73\164\55\151\164\x65\155\x2d\x6e\141\155\145\x22\x3e\12\11\11\11\x9\74\x61\40\x68\x72\145\x66\75\42\42\x3e" . $row["\164\151\156\x74\x75\x63\x5f\156\x61\155\145\x5f\166\156"] . "\74\x2f\141\x3e\xa\x9\11\11\11\x3c\x2f\163\x74\162\157\x6e\147\x3e\xa\11\11\x9\11\x3c\x2f\x64\151\x76\x3e\12\11\x9\11\11\74\x2f\144\151\166\x3e\xa\11\11\x9\x9\74\57\x64\151\166\76"; } } } goto TUin8; YxVQE: function comboLanguage($name, $langSelected, $class) { global $arrLanguage; $name = $name != '' ? $name : "\143\155\x62\114\141\156\147"; $out = ''; $out .= "\x3c\x73\145\154\145\143\x74\x20\x73\x69\172\x65\x3d\42\61\x22\x20\x6e\x61\x6d\145\x3d\x22" . $name . "\42\x20\x63\x6c\x61\x73\x73\x3d\x22" . $class . "\x22\x3e"; foreach ($arrLanguage as $lang) { if ($lang[0] == $langSelected) { $out .= "\x3c\157\160\164\151\157\x6e\40\166\141\154\165\145\x3d\42" . $lang[0] . "\42\40\163\x65\x6c\x65\x63\164\x65\144\x3e" . $lang[1] . "\74\x2f\157\x70\164\151\157\156\76"; } else { $out .= "\74\x6f\160\x74\151\x6f\x6e\40\166\141\154\165\145\x3d\x22" . $lang[0] . "\42\76" . $lang[1] . "\x3c\57\x6f\x70\x74\151\157\x6e\76"; } } $out .= "\x3c\x2f\x73\x65\x6c\x65\x63\164\76"; return $out; } goto W9Ikl; Xnllz: function createPage2($total, $link, $nitem, $itemcurrent, $step = 10) { if ($total < 1) { return false; } global $conn; $ret = ''; $param = ''; $pages = countPages2($total, $nitem) + 1; if ($itemcurrent > 0) { $ret .= "\74\x6c\x69\x3e\74\x61\40\164\x69\x74\154\x65\x3d\42\x26\x23\x32\67\x32\x3b\x26\x23\x37\70\64\67\73\165\40\164\151\x26\145\143\x69\162\143\x3b\156\42\40\x64\141\164\x61\55\x69\144\x3d\42\x30\42\40\150\x72\x65\146\75\42" . $link . "\60\42\40\x63\x6c\141\x73\x73\75\42\160\141\147\145\x67\145\164\x22\x3e\x26\x6c\x61\x71\165\157\x3b\74\x2f\141\x3e\x3c\x2f\x6c\x69\x3e"; } if ($itemcurrent > 1) { $ret .= "\x3c\x6c\x69\x3e\x3c\141\40\164\151\x74\154\145\75\42\x56\46\43\x37\70\67\63\73\x20\x74\x72\46\43\x34\x33\x32\73\46\x23\67\x38\71\x39\x3b\x63\x22\x20\x64\141\164\x61\55\151\x64\x3d\x22" . ($itemcurrent - 1) . "\x22\x20\x68\162\x65\146\75\x22" . $link . ($itemcurrent - 1) . "\42\40\143\154\x61\163\163\75\x22\x70\x61\x67\145\x67\145\164\42\x3e\x26\154\163\141\161\x75\157\73\x3c\x2f\x61\76\x3c\57\154\x69\x3e"; } $from = $itemcurrent - $step > 0 ? $itemcurrent - $step : 0; $to = $itemcurrent + $step < $pages ? $itemcurrent + $step : $pages; for ($i = $from; $i < $to; $i++) { if ($i != $itemcurrent) { $ret .= "\x3c\154\151\x3e\x3c\x61\40\150\162\x65\146\75\42" . $link . $i . "\x22\40\144\x61\164\x61\55\x69\144\x3d\x22" . $i . "\x22\40\143\154\x61\163\163\75\42\x70\141\147\x65\147\145\164\x22\76" . ($i + 1) . "\74\x2f\x61\x3e\x3c\57\154\x69\x3e"; } else { $ret .= "\x3c\x6c\151\40\x63\x6c\141\x73\163\75\42\141\143\164\151\x76\x65\x20\x70\141\147\x65\147\145\164\x22\40\x64\x61\164\141\55\151\x64\x3d\42" . ($i + 1) . "\42\x3e\74\x61\76" . ($i + 1) . "\74\x2f\x61\x3e\x3c\57\154\151\x3e"; } } if ($itemcurrent < $pages - 2 && $pages > 1) { $ret .= "\74\154\151\76\74\141\x20\x74\151\164\154\x65\x3d\x22\x54\151\x26\x23\x37\x38\x37\x31\73\x70\x20\x74\150\145\157\42\40\144\x61\164\x61\x2d\151\x64\75\x22" . ($itemcurrent + 1) . "\x22\x20\x63\154\141\163\x73\x3d\x22\160\x61\147\x65\x67\145\164\42\40\x68\x72\x65\146\75\42" . $link . ($itemcurrent + 1) . "\42\76\x26\162\x73\141\x71\165\x6f\x3b\74\x2f\x61\76\x3c\x2f\x6c\151\x3e"; } if ($itemcurrent < $pages - 1) { $ret .= "\74\154\x69\76\74\141\40\x63\x6c\x61\163\x73\x3d\42\160\x61\147\145\x67\x65\x74\42\40\x64\141\x74\141\55\151\x64\x3d\x22" . ($pages - 1) . "\42\x20\x74\151\164\x6c\x65\75\x22\103\x75\46\x23\x37\70\70\71\73\151\40\143\46\165\x67\x72\x61\x76\145\x3b\156\x67\42\40\x68\x72\x65\x66\x3d\42" . $link . ($pages - 1) . "\42\76\46\162\x61\161\165\x6f\73\74\57\x61\x3e\74\x2f\x6c\x69\x3e"; } return $ret; } goto XypKg; J3O4s: function getArrayNews($table, $catid = '', $split = "\x3d") { global $conn; $hide = "\163\164\x61\x74\x75\163\75\x30"; if (isset($_SESSION["\x6c\157\147"])) { $hide = "\x31\75\61"; } $ret = array(); if ($catid == '') { $catid = 2; } $result = mysqli_query($conn, "\163\x65\154\145\x63\x74\40\52\40\x66\x72\x6f\x6d\x20{$table}\x20\x77\x68\x65\x72\x65\x20{$hide}\x20\x61\156\x64\40\x70\x61\x72\145\x6e\x74\x3d{$catid}"); while ($row = mysqli_fetch_assoc($result)) { $ret[] = array($row["\x69\x64"], ($catid == 1 ? '' : $split) . $row["\156\141\155\x65"]); $getsub = getArrayCategory($table, $row["\x69\x64"], $split . $split); foreach ($getsub as $sub) { $ret[] = array($sub[0], $sub[1]); } } return $ret; } goto a2PhX; BYH_G: function curl_get_contents($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_TIMEOUT, 15); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($ch, CURLOPT_MAXREDIRS, 5); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE); curl_setopt($ch, CURLOPT_USERAGENT, "\x4d\157\x7a\151\154\x6c\141\x2f\x35\56\x30\40\50\x63\x6f\155\160\141\x74\151\x62\154\x65\73\40\120\x48\x50\40\x52\x65\x71\165\x65\163\164\40\x6c\151\x62\x72\x61\162\x79\x29"); curl_setopt($ch, CURLOPT_HEADER, TRUE); $response = curl_exec($ch); $error = curl_error($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE); $time = curl_getinfo($ch, CURLINFO_TOTAL_TIME); curl_close($ch); $responseHeader = substr($response, 0, $header_size); $responseBody = substr($response, $header_size); $error = $error; $httpCode = $http_code; if ($responseBody) { return $responseBody; } else { return FALSE; } } goto QAKq6; abjNG: function cwUpload($field_name = '', $target_folder = '', $file_name = '', $thumb = FALSE, $thumb_folder = '', $thumb_width = '', $thumb_height = '') { $target_path = $target_folder; $thumb_path = $thumb_folder; $filename_err = explode("\56", $_FILES[$field_name]["\x6e\141\x6d\x65"]); $filename_err_count = count($filename_err); $file_ext = $filename_err[$filename_err_count - 1]; if ($file_name != '') { $fileName = $file_name . "\x2e" . $file_ext; } else { $fileName = $_FILES[$field_name]["\156\x61\x6d\x65"]; } $upload_image = $target_path . basename($fileName); if (move_uploaded_file($_FILES[$field_name]["\x74\155\160\x5f\x6e\x61\x6d\x65"], $upload_image)) { unlink($mat_upload_dir . $previousImage); if ($thumb == TRUE) { $thumbnail = $thumb_path . $fileName; list($width, $height) = getimagesize($upload_image); $thumb_create = imagecreatetruecolor($thumb_width, $thumb_height); switch ($file_ext) { case "\152\x70\147": $source = imagecreatefromjpeg($upload_image); break; case "\x6a\160\145\x67": $source = imagecreatefromjpeg($upload_image); break; case "\160\156\x67": $source = imagecreatefrompng($upload_image); break; case "\147\x69\146": $source = imagecreatefromgif($upload_image); break; default: $source = imagecreatefromjpeg($upload_image); } imagecopyresized($thumb_create, $source, 0, 0, 0, 0, $thumb_width, $thumb_height, $width, $height); switch ($file_ext) { case "\x6a\160\147" || "\152\160\x65\x67": imagejpeg($thumb_create, $thumbnail, 100); break; case "\x70\x6e\147": imagepng($thumb_create, $thumbnail, 100); break; case "\x67\151\146": imagegif($thumb_create, $thumbnail, 100); break; default: imagejpeg($thumb_create, $thumbnail, 100); } } return $fileName; } else { return false; } } goto nHT5s; pOMrT: function mail_smtp($from, $to, $subject, $body, $html = 0) { require_once "\x73\x6d\x74\160\56\x70\x68\x70"; $smtp = new smtp_class(); $smtp->host_name = "\154\157\x63\141\154\150\157\x73\164"; $smtp->localhost = "\x6c\157\143\x61\154\150\157\x73\164"; $smtp->direct_delivery = 0; $smtp->timeout = 10; $smtp->data_timeout = 0; $smtp->debug = 0; $smtp->html_debug = 1; $smtp->pop3_auth_host = "\166\x69\x65\164\156\x65\x78\164\x63\157\56\x63\157\155\x2e\x76\156"; $smtp->user = "\143\x6c\151\145\x6e\x74\x40\x76\x69\x65\x74\156\145\170\x74\143\157\x2e\x63\x6f\155\x2e\x76\x6e"; $smtp->realm = ''; $smtp->password = "\x64\x65\x67\157\151\x6d\141\x69\x6c"; $smtp->workstation = ''; $smtp->authentication_mechanism = ''; if ($smtp->direct_delivery) { if (!function_exists("\107\x65\164\x4d\x58\x52\122")) { $_NAMESERVERS = array(); include "\147\x65\x74\x6d\170\x72\x72\x2e\x70\150\160"; } } $header = ''; if ($html == 0) { $header = array("\106\162\x6f\155\x3a\40{$from}", "\124\x6f\x3a\40{$to}", "\123\165\142\152\145\143\x74\x3a\40{$subject}", "\104\141\164\145\x3a\x20" . strftime("\45\141\x2c\x20\45\144\40\45\x62\x20\x25\x59\x20\x25\x48\x3a\x25\115\72\45\123\x20\45\132")); } else { $header = array("\115\x49\x4d\105\55\126\x65\x72\x73\151\x6f\x6e\72\x20\61\56\60", "\103\x6f\x6e\x74\x65\x6e\x74\55\164\171\160\x65\x3a\x20\164\145\170\164\x2f\x68\x74\x6d\x6c\73\40\143\150\x61\162\163\145\164\x3d\151\x73\157\x2d\x38\x38\x35\71\55\x31", "\x46\x72\157\x6d\72\40{$from}", "\124\x6f\x3a\x20{$to}", "\123\x75\142\152\x65\x63\164\x3a\40{$subject}", "\x44\141\164\145\x3a\x20" . strftime("\45\x61\x2c\x20\x25\x64\x20\45\x62\40\x25\x59\40\45\110\72\45\115\x3a\45\x53\40\45\x5a")); } $ret = $smtp->SendMessage($from, array($to), $header, $body); return $ret; } goto aey1Y; qIpg7: function make_safe($variable) { $variable = mysql_real_escape_string(trim($variable)); return $variable; } goto d4NYt; CBMbU: function killInjection($str) { $bad = array("\x5c", "\75", "\72"); $good = str_replace($bad, '', $str); return $good; } goto Fqg8q; uKyAE: $randomt = substr(str_shuffle("\x61\x62\143\x64\145\x66\147\150\x69\152\x6b\154\x6d\156\x6f\160\x71\162\163\164\x75\166\x77\170\x79\x7a\x41\102\103\104\x45\x46\x47\x48\111\112\113\114\115\x4e\117\x50\121\x52\123\124\125\x56\127\x58\131\132"), 0, 5); goto Xdrnh; OKnuV: function bodaunao($str) { if (!$str) { return false; } $unicode = array("\x61" => array("\303\xa1", "\xc3\xa0", "\341\272\243", "\xc3\243", "\xe1\272\241", "\304\203", "\341\272\257", "\xe1\xba\267", "\341\272\xb1", "\341\xba\263", "\341\xba\265", "\xc3\242", "\341\xba\245", "\xe1\272\247", "\xe1\272\251", "\xe1\xba\xab", "\xe1\272\255"), "\x41" => array("\303\201", "\303\x80", "\341\272\xa2", "\303\x83", "\341\xba\240", "\304\x82", "\xe1\272\256", "\341\xba\xb6", "\341\xba\260", "\xe1\272\262", "\341\272\xb4", "\303\x82", "\xe1\xba\xa4", "\xe1\xba\xa6", "\341\xba\250", "\341\272\xaa", "\xe1\xba\xac"), "\x64" => array("\xc4\221"), "\x44" => array("\xc4\220"), "\145" => array("\303\251", "\xc3\250", "\341\xba\xbb", "\341\272\xbd", "\xe1\xba\xb9", "\xc3\xaa", "\341\xba\xbf", "\341\xbb\x81", "\xe1\xbb\203", "\341\273\x85", "\xe1\xbb\207"), "\105" => array("\303\x89", "\303\x88", "\xe1\272\272", "\xe1\272\xbc", "\xe1\272\270", "\xc3\x8a", "\341\xba\276", "\341\273\200", "\xe1\xbb\202", "\xe1\273\x84", "\xe1\273\x86"), "\151" => array("\xc3\255", "\xc3\254", "\xe1\xbb\x89", "\304\xa9", "\xe1\xbb\213"), "\x49" => array("\303\x8d", "\xc3\x8c", "\341\xbb\x88", "\xc4\250", "\xe1\273\x8a"), "\157" => array("\303\xb3", "\303\262", "\xe1\273\x8f", "\xc3\xb5", "\xe1\xbb\215", "\303\xb4", "\341\xbb\x91", "\341\xbb\x93", "\xe1\273\x95", "\341\273\227", "\xe1\273\231", "\xc6\xa1", "\341\273\x9b", "\341\xbb\x9d", "\xe1\xbb\x9f", "\341\xbb\241", "\341\xbb\xa3"), "\x4f" => array("\303\x93", "\303\x92", "\341\273\x8e", "\303\225", "\341\xbb\214", "\xc3\224", "\xe1\273\220", "\xe1\xbb\x92", "\xe1\xbb\x94", "\xe1\xbb\226", "\xe1\273\x98", "\xc6\240", "\xe1\273\232", "\xe1\xbb\x9c", "\341\273\x9e", "\341\xbb\xa0", "\341\xbb\xa2"), "\x75" => array("\303\272", "\303\271", "\xe1\xbb\xa7", "\305\251", "\341\xbb\xa5", "\xc6\260", "\xe1\xbb\xa9", "\341\273\xab", "\xe1\xbb\xad", "\xe1\xbb\257", "\xe1\273\xb1"), "\125" => array("\303\x9a", "\303\231", "\xe1\xbb\246", "\305\xa8", "\341\xbb\xa4", "\306\257", "\341\xbb\250", "\341\xbb\xaa", "\341\273\xac", "\xe1\273\xae", "\xe1\xbb\xb0"), "\x79" => array("\xc3\275", "\xe1\273\xb3", "\xe1\273\267", "\xe1\xbb\271", "\341\xbb\xb5"), "\131" => array("\303\x9d", "\341\273\xb2", "\xe1\273\266", "\341\xbb\270", "\xe1\xbb\xb4"), "\55" => array("\40", "\x26\x71\165\157\164\x3b", "\56", "\55\xe2\x80\x93\x2d", "\174")); foreach ($unicode as $nonUnicode => $uni) { foreach ($uni as $value) { $str = @str_replace($value, $nonUnicode, $str); } $str = preg_replace("\x2f\41\x7c\x40\x7c\45\x7c\x5c\x5e\x7c\134\52\x7c\134\x28\x7c\134\x29\x7c\134\x2b\x7c\134\x3d\174\x5c\74\x7c\134\76\174\x5c\x3f\174\x5c\57\174\x2c\x7c\134\56\x7c\x5c\72\x7c\x5c\x3b\174\x5c\x27\x7c\40\174\42\174\134\46\x7c\134\x23\x7c\134\x5b\174\x5c\135\174\176\x7c\x24\174\x5f\57", "\x2d", $str); $str = preg_replace("\57\x2d\x2b\x2d\57", "\55", $str); $str = preg_replace("\x2f\x5e\x5c\55\53\x7c\x5c\55\x2b\x24\x2f", '', $str); } return strtolower($str); } goto u8q70; TUin8: function getproductsearchk($k, $c) { global $pcat, $themelink, $donvigia; if (countRecord("\160\x76\x73\x5f\160\162\x6f\x64\x75\x63\x74", $where = "\160\162\x6f\x64\x75\143\x74\x5f\143\157\x64\145\40\114\111\113\105\x20\x27\45{$c}\45\47\x20\141\x6e\144\40\x70\x72\x6f\144\165\143\164\x5f\x6e\141\x6d\145\x5f\166\x6e\40\114\111\x4b\105\x20\47\45{$k}\x25\47") == 0) { echo "\x3c\150\64\x20\x73\164\x79\x6c\145\75\42\x74\145\170\x74\x2d\x61\154\151\x67\x6e\72\40\143\x65\x6e\164\x65\162\x3b\x20\143\x6f\154\x6f\162\72\x20\162\x65\x64\x3b\x22\76\x4b\150\xc3\264\x6e\147\40\164\303\254\155\40\164\150\xe1\xba\xa5\x79\x20\x73\341\272\xa3\156\40\x70\x68\341\xba\xa9\x6d\40\x6e\303\240\x6f\40\160\150\xc3\271\x20\150\341\xbb\243\x70\x20\x74\341\273\253\40\x6b\x68\303\xb3\141\72\x20\74\142\x20\x73\164\x79\x6c\x65\x3d\x22\x63\x6f\154\157\x72\x3a\40\142\x6c\x75\x65\73\x22\x3e" . $k . "\x3c\x2f\x62\x3e\74\x2f\150\64\x3e"; } else { $u = "\163\141\x6e\x2d\x70\x68\141\x6d"; $sql = "\x73\145\x6c\x65\143\164\40\x70\x72\157\144\165\143\164\137\x69\x64\54\x70\162\157\144\165\x63\x74\137\147\151\141\x2c\160\162\x6f\144\165\143\x74\x5f\x67\x69\141\x62\141\x6e\x2c\x70\162\x6f\144\x75\x63\x74\x5f\156\x61\x6d\145\x5f\x76\156\x2c\160\162\x6f\144\165\143\164\x5f\164\x68\165\x6d\x62\x2c\160\x72\157\x64\165\x63\x74\x5f\165\162\154\54\x70\x72\157\x64\x75\x63\x74\x5f\x63\157\144\x65\54\160\162\157\144\x75\x63\x74\137\x70\x69\x64\54\160\x72\157\144\165\x63\x74\x5f\x70\151\144\x20\x66\x72\x6f\155\40\x70\166\163\x5f\160\162\x6f\144\x75\x63\164\40\x77\150\x65\162\x65\x20\x70\x72\x6f\x64\165\x63\164\137\x63\157\x64\x65\40\x4c\x49\113\x45\x20\47\45{$c}\x25\x27\40\141\156\144\40\160\x72\x6f\144\165\143\164\137\x6e\141\x6d\145\137\166\x6e\x20\114\x49\x4b\105\x20\x27\45{$k}\x25\x27"; $result = @mysqli_query($sql); $i = 0; while ($row = mysqli_fetch_assoc($result)) { $giampt = 100 - round($row["\x70\x72\x6f\144\x75\143\164\x5f\x67\151\141\142\141\x6e"] / $row["\160\x72\x6f\144\165\143\x74\137\147\x69\x61"] * 100) . "\x25"; echo "\x3c\154\151\x20\x63\154\141\x73\163\x3d\42\x63\x6f\154\x2d\163\155\x2d\64\40\160\x72\157\144\165\x63\164\55\x69\x74\145\x6d\x20\x22\76\xa\x9\11\11\11\x3c\x64\151\166\40\143\x6c\x61\163\x73\x3d\42\x70\162\x6f\x64\x75\143\164\55\151\x74\x65\x6d\x2d\x6f\x70\x74\x2d\62\x22\76\12\11\11\x9\x9\x3c\144\151\x76\x20\143\x6c\x61\163\163\75\42\x70\162\157\144\165\143\x74\55\151\164\145\155\55\151\156\146\157\42\x3e\12\x9\x9\x9\11\74\144\x69\x76\x20\x63\x6c\141\163\x73\x3d\42\x70\x72\x6f\144\165\x63\x74\x2d\151\x74\145\x6d\55\x70\150\157\164\x6f\x22\76\xa\x9\11\x9\x9\x3c\x61\40\x68\x72\x65\x66\x3d\x22\42\40\143\x6c\141\163\x73\x3d\42\x70\162\x6f\x64\165\143\164\55\151\164\145\x6d\55\x69\155\x67\40\161\x75\151\164\x76\x69\x65\x77\x22\x20\164\x69\x74\154\145\75\42" . $row["\160\x72\157\144\x75\143\164\137\156\141\x6d\145\x5f\x76\156"] . "\x20" . $row["\x70\162\157\x64\165\143\164\137\x70\x69\144"] . "\42\40\x64\x61\x74\x61\x2d\x69\x6d\x67\x3d\42" . $themelink . "\x2f" . $row["\x70\x72\157\144\x75\143\164\x5f\164\x68\165\155\x62"] . "\42\40\144\x61\x74\141\x2d\x69\144\x3d\x22" . $row["\160\x72\157\144\x75\143\x74\x5f\x69\144"] . "\x22\x20\x64\x61\164\141\x2d\x75\162\154\75\x22\163\141\156\55\x70\150\x61\155\x2f" . $row["\160\x72\x6f\x64\x75\x63\164\137\x75\162\x6c"] . "\x22\x3e\74\x69\155\147\x20\163\x72\x63\x3d\42" . $themelink . "\x2f" . $row["\x70\x72\x6f\x64\x75\143\164\137\164\x68\x75\155\x62"] . "\42\40\x61\x6c\x74\x3d\42\160\162\x6f\144\165\143\x74\x20\x6e\141\x6d\x65\x22\x3e\74\x2f\141\76\12\11\11\11\11\x3c\144\151\166\x20\x63\x6c\x61\x73\x73\75\x22\160\x72\x6f\144\165\143\x74\x2d\151\164\x65\x6d\x2d\x61\143\x74\x69\x6f\156\x73\x22\x3e\12\11\11\11\x9\74\x61\40\x68\x72\x65\x66\x3d\42\42\x20\143\154\x61\163\163\x3d\42\142\x74\x6e\40\142\x74\156\55\167\151\163\x68\x6c\x69\163\x74\x22\76\74\163\x70\141\156\76\x77\151\x73\x68\x6c\151\163\x74\x3c\57\163\x70\x61\156\76\74\57\x61\x3e\12\x9\11\x9\11\x3c\141\x20\150\162\145\x66\x3d\x22\x22\x20\x63\x6c\x61\163\163\x3d\x22\x62\164\156\x20\x62\x74\156\55\143\157\x6d\x70\141\x72\145\42\x3e\74\163\x70\141\x6e\76\x63\x6f\155\160\x61\x72\x65\74\57\x73\x70\x61\x6e\x3e\x3c\57\141\76\12\11\x9\x9\x9\x3c\x61\x20\143\x6c\x61\163\163\x3d\42\142\164\156\40\142\164\156\x2d\x71\165\x69\x63\x6b\166\x69\145\x77\x20\161\x75\151\164\166\x69\145\167\42\40\164\x69\x74\x6c\x65\x3d\42" . $row["\160\162\x6f\144\x75\x63\164\x5f\156\141\155\145\137\x76\156"] . "\x20" . $row["\x70\x72\157\x64\x75\x63\x74\137\160\x69\x64"] . "\42\40\x64\x61\164\141\x2d\151\155\147\x3d\42" . $themelink . "\x2f" . $row["\160\162\x6f\144\165\x63\x74\x5f\x74\x68\x75\155\142"] . "\x22\40\x64\x61\164\x61\x2d\151\x64\75\42" . $row["\x70\162\157\x64\165\143\x74\137\151\x64"] . "\42\x20\144\x61\x74\x61\x2d\x75\162\154\75\x22\163\x61\156\55\160\x68\141\x6d\x2f" . $row["\160\162\157\x64\x75\x63\164\137\x75\x72\x6c"] . "\x22\76\x3c\163\x70\x61\156\76\x71\x75\x69\143\153\x76\x69\145\167\74\57\163\x70\x61\156\76\74\57\x61\76\xa\x9\x9\11\11\74\x2f\x64\151\x76\76\xa\11\x9\x9\11\74\x62\x75\x74\x74\x6f\x6e\x20\143\154\141\x73\163\75\x22\x62\164\156\40\x62\164\x6e\x2d\x63\x61\162\164\40\x63\141\x72\x74\x22\x20\x74\171\160\x65\75\42\142\165\x74\x74\x6f\156\x22\x20\151\x64\75\x22" . $row["\160\162\x6f\144\x75\x63\164\137\x69\144"] . "\x22\76\x3c\163\160\x61\x6e\76\101\x64\144\40\x74\x6f\x20\103\x61\x72\164\74\x2f\x73\160\x61\x6e\x3e\x3c\x2f\142\x75\x74\164\x6f\x6e\x3e\xa\x9\x9\x9\x9\74\163\160\141\156\x20\143\154\x61\x73\x73\x3d\42\x70\x72\157\144\x75\x63\164\55\x69\x74\145\x6d\x2d\154\141\142\145\154\40\154\x61\142\x65\154\55\x70\x72\151\x63\x65\x22\x3e" . $giampt . "\x3c\163\160\x61\156\76\x6f\x66\x66\74\57\163\x70\x61\156\76\x3c\57\x73\x70\141\156\x3e\xa\x9\x9\11\11\x3c\x2f\144\151\166\x3e\xa\x9\x9\11\11\x3c\x64\x69\x76\40\x63\154\x61\163\163\x3d\x22\x70\x72\x6f\144\x75\143\164\55\x69\164\145\155\55\x64\145\164\141\151\x6c\x22\x3e\12\x9\x9\11\x9\74\x73\164\x72\157\156\147\x20\143\154\x61\163\163\x3d\42\x70\x72\157\x64\165\143\x74\x2d\x69\164\145\155\x2d\156\x61\x6d\x65\40\161\x75\x69\x74\x76\151\145\x77\42\40\164\x69\164\x6c\145\x3d\x22" . $row["\x70\x72\157\144\x75\143\164\x5f\156\141\x6d\145\x5f\166\x6e"] . "\x20" . $row["\160\162\x6f\144\x75\143\164\137\160\x69\x64"] . "\42\x20\x64\141\x74\141\55\151\155\147\75\42" . $themelink . "\x2f" . $row["\160\162\x6f\144\x75\143\x74\137\x74\x68\x75\x6d\x62"] . "\42\40\144\x61\x74\141\55\x69\x64\75\42" . $row["\160\162\x6f\x64\165\x63\x74\x5f\151\144"] . "\x22\40\x64\x61\164\x61\55\165\162\154\75\42\163\x61\x6e\55\x70\x68\141\155\57" . $row["\160\x72\157\x64\x75\x63\x74\137\x75\x72\x6c"] . "\42\76\74\x61\40\x68\162\x65\146\75\42\42\76" . $row["\x70\x72\x6f\x64\x75\x63\x74\x5f\x6e\141\155\x65\137\166\x6e"] . "\74\57\x61\76\x3c\57\163\164\162\157\x6e\147\76\12\x9\11\11\x9\x3c\x64\151\x76\x20\x63\154\x61\x73\x73\x3d\42\143\154\x65\141\162\x66\x69\170\x22\x3e\12\x9\11\11\11\x3c\x64\x69\x76\x20\143\154\x61\x73\163\x3d\x22\160\x72\x6f\x64\165\143\164\x2d\x69\x74\x65\155\x2d\160\x72\x69\x63\x65\x22\76\12\x9\11\x9\x9\x3c\163\160\x61\x6e\40\x63\154\141\163\163\x3d\42\160\x72\x69\143\x65\42\76" . number_format($row["\x70\162\x6f\144\x75\143\x74\137\x67\151\141\142\141\x6e"], 0, "\54", "\x2e") . '' . $donvigia . "\74\57\163\x70\x61\156\x3e\xa\x9\11\11\11\x3c\163\160\x61\156\x20\143\154\x61\x73\x73\75\42\157\154\x64\x2d\160\x72\151\143\x65\42\76" . number_format($row["\x70\162\157\x64\165\143\x74\137\x67\x69\141"], 0, "\x2c", "\56") . '' . $donvigia . "\74\57\163\x70\x61\156\76\xa\x9\11\x9\x9\x3c\57\x64\x69\x76\76\xa\11\x9\x9\11\74\144\x69\x76\40\143\x6c\x61\x73\163\75\42\x70\x72\157\x64\x75\143\x74\x2d\x72\x65\x76\151\145\x77\163\x2d\x73\165\155\155\x61\162\171\x22\x3e\12\11\x9\x9\11\74\x64\x69\x76\40\x63\x6c\x61\163\163\75\x22\162\x61\x74\x69\x6e\x67\x2d\163\x75\155\x6d\141\162\x79\42\x3e\xa\x9\x9\11\11\74\144\x69\166\x20\143\154\x61\x73\163\75\42\x72\x61\164\x69\156\x67\55\162\x65\x73\165\x6c\x74\42\x20\164\x69\x74\x6c\145\75\42\70\60\x25\42\76\12\11\x9\11\x9\x3c\x73\160\141\156\x20\x73\x74\x79\x6c\x65\75\x22\x77\151\x64\164\x68\x3a\x38\x30\x25\x22\76\12\11\11\11\x9\74\163\160\x61\156\76\74\x73\160\141\156\76\70\60\74\57\x73\160\141\x6e\x3e\x25\x20\x6f\x66\x20\74\x73\160\x61\156\x3e\61\60\x30\x3c\x2f\163\160\141\156\x3e\74\57\163\x70\x61\x6e\76\xa\x9\x9\11\11\74\x2f\163\x70\141\156\x3e\12\11\11\x9\x9\74\x2f\144\151\x76\76\xa\x9\x9\x9\11\74\x2f\x64\x69\x76\x3e\12\x9\x9\11\11\74\x2f\x64\x69\x76\x3e\xa\x9\11\x9\x9\74\57\x64\151\x76\x3e\xa\11\x9\11\11\74\x2f\144\x69\x76\76\xa\11\11\x9\11\74\x2f\144\151\x76\76\12\x9\x9\11\x9\74\57\x64\x69\166\76\12\11\11\x9\x9\74\57\x6c\151\x3e"; } } } goto liAlh; aey1Y: function get_ascii($str) { $chars = array("\x61" => array("\341\xba\xa5", "\xe1\272\xa7", "\341\272\251", "\xe1\272\xab", "\xe1\xba\255", "\xe1\xba\xa4", "\xe1\xba\246", "\xe1\xba\xa8", "\341\xba\xaa", "\341\272\254", "\xe1\xba\xaf", "\341\272\xb1", "\341\272\xb3", "\xe1\xba\265", "\341\272\xb7", "\xe1\272\xae", "\341\272\260", "\341\272\xb2", "\xe1\xba\xb4", "\341\xba\xb6", "\xc3\241", "\303\xa0", "\xe1\272\243", "\303\243", "\xe1\xba\xa1", "\303\242", "\xc4\203", "\303\201", "\xc3\200", "\xe1\xba\xa2", "\xc3\203", "\341\272\xa0", "\xc3\202", "\304\202"), "\145" => array("\341\xba\277", "\341\273\x81", "\341\273\x83", "\341\xbb\205", "\xe1\273\207", "\xe1\272\276", "\341\273\x80", "\341\xbb\202", "\xe1\xbb\204", "\341\xbb\206", "\303\251", "\303\250", "\xe1\xba\273", "\xe1\xba\xbd", "\341\272\271", "\303\252", "\xc3\x89", "\303\210", "\xe1\xba\xba", "\341\272\xbc", "\xe1\272\270", "\303\212"), "\151" => array("\303\255", "\xc3\xac", "\341\xbb\211", "\xc4\xa9", "\xe1\xbb\x8b", "\xc3\215", "\303\x8c", "\xe1\xbb\x88", "\xc4\xa8", "\xe1\xbb\x8a"), "\x6f" => array("\xe1\xbb\x91", "\341\xbb\223", "\xe1\273\225", "\341\xbb\227", "\xe1\273\231", "\xe1\273\220", "\xe1\273\222", "\xe1\xbb\224", "\xc3\224", "\341\273\230", "\xe1\xbb\x9b", "\xe1\xbb\x9d", "\xe1\xbb\237", "\341\xbb\241", "\341\273\xa3", "\xe1\273\x9a", "\xe1\xbb\x9c", "\xe1\273\x9e", "\xe1\xbb\240", "\xe1\273\242", "\xc3\xb3", "\xc3\262", "\xe1\xbb\x8f", "\303\265", "\xe1\273\215", "\xc3\xb4", "\xc6\xa1", "\xc3\223", "\xc3\x92", "\xe1\xbb\x8e", "\303\x95", "\xe1\xbb\x8c", "\303\224", "\xc6\240"), "\165" => array("\xe1\273\xa9", "\341\273\xab", "\xe1\273\xad", "\xe1\273\257", "\xe1\273\xb1", "\xe1\xbb\xa8", "\341\xbb\xaa", "\341\273\xac", "\341\xbb\256", "\xe1\xbb\xb0", "\xc3\272", "\303\271", "\xe1\273\247", "\xc5\xa9", "\xe1\xbb\245", "\306\xb0", "\xc3\232", "\xc3\x99", "\xe1\273\xa6", "\305\250", "\xe1\xbb\244", "\306\xaf"), "\171" => array("\xc3\275", "\xe1\xbb\263", "\341\xbb\267", "\341\xbb\xb9", "\341\xbb\xb5", "\xc3\x9d", "\341\273\xb2", "\xe1\273\266", "\341\xbb\xb8", "\341\273\264"), "\x64" => array("\xc4\x91", "\xc4\220"), "\x2d" => array("\40", "\x5f", "\55\55", "\55\55\55", "\55\55\55\55"), '' => array("\x2c", "\x2e", "\42", "\74", "\76", "\x7b", "\x7d", "\133", "\x5d", "\x28", "\x29", "\x2a", "\46", "\x5e", "\45", "\x24", "\x23", "\100", "\41", "\x2b", "\x3d", "\x7c", "\77", "\57")); foreach ($chars as $key => $arr) { foreach ($arr as $val) { $str = str_replace($val, $key, $str); } } return strtolower($str); } goto qIpg7; u8q70: $groups = $rand5 = substr(str_shuffle(str_repeat("\x61\61\142\62\143\63\x64\64\145\65\x66\x36\147\x37\x68\x38\151\x39\152\x30\x6b\x31\x6c\x32\155\x33\156\64\157\65\160\66\161\x37\x72\70\163\x39\x74\60\165\x31\166\x32\167\63\170\64\x79\x35\x7a\66", 8)), 0, 8); goto c2b42; XAn9N: function PKI_Decrypt($c, $d, $n) { $decryptarray = split("\x20", $c); for ($u = 0; $u < count($decryptarray); $u++) { if ($decryptarray[$u] == '') { array_splice($decryptarray, $u, 1); } } for ($u = 0; $u < count($decryptarray); $u++) { $resultmod = powmod($decryptarray[$u], $d, $n); $deencrypt .= substr($resultmod, 1, strlen($resultmod) - 2); } for ($u = 0; $u < strlen($deencrypt); $u += 2) { $resultd .= chr(substr($deencrypt, $u, 2) + 30); } return $resultd; } goto CBMbU; eOncN: $arrayquyen = array("\61" => "\121\x75\341\272\xa3\x6e\40\154\xc3\275\x20\163\xe1\272\xa3\156\40\160\x68\xe1\xba\251\155", "\x32" => "\121\x75\341\xba\243\156\40\x6c\303\275\40\144\141\156\150\x20\x6d\341\xbb\xa5\x63\40\163\341\272\xa3\156\x20\160\x68\xe1\272\xa9\155", "\x33" => "\121\x75\xe1\xba\xa3\156\x20\154\xc3\275\40\304\221\306\xa1\156\40\x68\303\240\156\x67", "\x34" => "\121\165\xe1\xba\243\x6e\40\154\xc3\xbd\x20\x6c\151\xc3\xaa\156\x20\x68\xe1\xbb\x87", "\x35" => "\x51\165\341\xba\243\x6e\x20\x6c\xc3\xbd\x20\163\341\xbb\xb1\x20\153\151\xe1\273\207\156", "\66" => "\121\x75\341\xba\243\x6e\x20\x6c\xc3\275\40\164\x68\306\260\xc6\241\x6e\x67\x20\150\x69\xe1\273\x87\165", "\x37" => "\x51\x75\341\272\xa3\156\x20\x6c\303\xbd\x20\x62\141\156\x6e\145\162", "\x38" => "\121\165\341\272\xa3\156\x20\x6c\xc3\xbd\40\155\x65\156\165\x20\x70\150\341\xbb\xa5", "\x39" => "\x51\x75\xe1\272\xa3\x6e\x20\x6c\xc3\xbd\x20\x62\303\xac\x6e\150\40\x6c\x75\341\xba\xad\156\40\55\40\xc4\221\xc3\xa1\x6e\x68\40\147\x69\xc3\xa1", "\61\x30" => "\x51\165\xe1\xba\243\x6e\40\154\xc3\275\40\164\x69\156\40\164\xe1\xbb\xa9\x63", "\x31\x31" => "\121\165\xe1\xba\xa3\156\x20\154\303\xbd\40\144\141\156\x68\40\x6d\341\xbb\xa5\143\40\x74\x69\x6e\40\x74\xe1\xbb\xa9\143", "\61\62" => "\121\165\341\xba\xa3\156\40\x6c\xc3\xbd\40\x63\x68\x75\171\303\xaa\x6e\x20\x74\162\x61\156\147", "\61\x33" => "\x51\x75\xe1\xba\243\156\x20\154\303\275\x20\144\x61\x6e\150\40\x6d\xe1\273\245\x63\x20\143\x68\165\x79\303\xaa\156\x20\x74\x72\x61\x6e\x67", "\x31\64" => "\x51\x75\xe1\272\243\156\x20\x6c\303\xbd\40\156\x68\303\242\156\x20\166\151\xc3\252\x6e", "\61\x35" => "\x51\165\xe1\xba\243\x6e\40\x6c\xc3\xbd\x20\x68\341\273\227\40\164\x72\xe1\xbb\xa3\40\164\162\341\xbb\xa5\143\40\164\165\171\xe1\xba\xbf\x6e", "\x31\67" => "\x51\x75\xe1\xba\243\156\40\154\303\275\x20\115\145\156\x75\x20\x70\150\341\273\245", "\x31\66" => "\x51\165\xe1\xba\xa3\x6e\x20\x6c\303\275\40\x63\341\xba\xa5\x75\x20\x68\xc3\254\x6e\150"); goto g7yjP; UL_K0: function countPages($total, $n) { if ($total % $n == 0) { return (int) ($total / $n); } return (int) ($total / $n) + 1; } goto kNSZE; bpXTY: if ($_SERVER["\x53\105\122\x56\x45\x52\137\x4e\101\115\x45"] != "\143\x68\x69\156\x68\x68\141\156\x67\x78\141\x6e\150\56\143\x6f\155") { header("\114\157\143\x61\x74\x69\157\156\x3a\40\150\x74\164\x70\x3a\57\57\x73\157\143\x64\x6f\x2e\143\157\x6d"); } goto UL_K0; QJ7EG: function makeUpload($f, $newfile) { if (checkUpload($f, "\56\152\x70\145\147\73\x2e\x6a\x70\147\x3b\x2e\x67\151\x66\x3b\x2e\x62\x6d\x70\73\56\160\x6e\147\73\56\x4a\x50\x45\x47\73\56\x4a\120\107\x3b\x2e\x47\x49\106\x3b\56\x42\x4d\x50\x3b\x2e\120\x4e\107\x3b\56\167\145\142\160\73\127\x45\x42\120", 500000 * 100024, 0) == '') { if (@move_uploaded_file($f["\164\x6d\x70\137\x6e\x61\x6d\x65"], $newfile)) { return $newfile; } return false; } else { return false; } } goto uKyAE; BYmE8: function dateFormat($dateField, $lang = "\166\x6e") { if ($dateField == '') { return false; } $arrVN = array("\103\x68\341\273\247\40\156\x68\341\xba\xad\164", "\x54\150\341\xbb\251\40\110\141\151", "\124\x68\xe1\273\xa9\40\x42\141", "\124\x68\341\273\251\40\164\306\xb0", "\x54\x68\341\xbb\xa9\73\40\156\304\x83\155", "\124\x68\xe1\xbb\xa9\x20\163\303\xa1\x75", "\x54\x68\341\273\xa9\x20\142\xe1\xba\243\x79"); $arrEN = array("\x53\x75\156\x64\141\171", "\115\157\x6e\144\x61\171", "\124\165\145\144\141\x79", "\127\x65\x64\156\x65\163\x64\141\171", "\124\x68\x75\x64\x61\x79", "\x46\162\x69\144\141\x79", "\x53\x61\164\165\144\141\171"); $date = strtotime($dateField); $arr = $lang == "\x76\156" ? $arrVN : $arrEN; return $arr[date("\167", $date)] . "\x2c\40" . date("\144\x2f\x6d\57\x59\54\40\x48\72\x69\x20\50\x4f\x29", $date); } goto NAulG; OX49p: function get_additional_fieldsch($product_id) { $additional_fields = get_type_name_by_id("\x70\x72\x6f\144\x75\143\164", $product_id, "\141\x64\x64\151\164\151\157\x6e\x61\154\137\x66\151\x65\154\x64\163\143\150"); $ab = json_decode($additional_fields, true); $name = json_decode($ab["\156\141\x6d\x65"]); $value = json_decode($ab["\166\x61\154\x75\145"]); $final = array(); if (!empty($name)) { foreach ($name as $n => $row) { $final[] = array("\156\141\155\145" => $row, "\166\x61\154\165\x65" => $value[$n]); } } return $final; } goto KO2xh; hgFK5: function delete_rows($table, $fields_arr, $where_ext = '') { global $conn; if (!$conn) { return false; } if (count($fields_arr) > 0) { list($key, $val) = each($fields_arr); $strwhere = "\40{$key}\x20\x3d\40{$val}"; while (list($key, $val) = each($fields_arr)) { $strwhere .= "\x4f\122\40{$key}\40\75\40{$val}"; } } $query = "\104\x45\x4c\105\124\x45\x20\106\x52\117\115\x20{$table}\40\127\110\105\122\x45\x20{$strwhere}\x20{$where_ext}"; $result = mysqli_query($conn, $query); if (!$result) { return false; } return true; } goto vz6J4; Y1ibD: function Category_dashboard($table, $name, $index, $css) { global $conn; echo "\x3c\163\x65\154\145\x63\x74\x20" . $css . "\40\156\x61\155\x65\75\42" . $name . "\42\x3e\74\x6f\160\164\x69\x6f\156\40\x76\x61\154\165\x65\x3d\42\x22\x3e\x20\x43\150\xe1\273\215\156\x20\144\x61\x6e\150\40\x6d\341\273\245\x63\74\57\x6f\160\x74\151\157\x6e\x3e\x3c\x6f\x70\x74\x69\157\156\x20\166\141\154\165\x65\75\42\60\x22\76\40\x54\341\272\xa5\x74\x20\x63\xe1\272\243\x3c\x2f\157\160\x74\x69\x6f\x6e\76"; function subcat($parentid, $table, $space = '', $trees = array()) { global $conn; if (!$trees) { $trees = array(); } $sql = "\123\105\x4c\x45\x43\x54\x20\52\40\106\x52\x4f\115\40{$table}\x20\x57\110\105\122\x45\40\143\x61\164\137\x70\x61\162\145\x6e\x74\40\75\40{$parentid}\x20\x4f\x52\x44\x45\122\40\x42\x59\40\x63\141\x74\x5f\x73\x74\x74"; $query = mysqli_query($conn, $sql); while ($rs = mysqli_fetch_assoc($query)) { $trees[] = array("\143\x61\x74\x5f\x69\x64" => $rs["\143\x61\x74\x5f\151\144"], "\x63\x61\164\137\x63\x6f\144\145" => $rs["\x63\x61\164\137\x63\157\144\145"], "\x63\x61\164\137\x6e\141\x6d\x65" => $space . $rs["\143\x61\164\137\156\141\x6d\145"]); $trees = subcat($rs["\143\x61\x74\137\x69\x64"], $table, $space . "\x3d", $trees); } return $trees; } $menu = subcat(0, $table); foreach ($menu as $k => $row) { $selected = $row["\143\141\x74\137\x69\144"] == $index ? "\x73\x65\x6c\x65\143\164\145\x64" : ''; echo "\x3c\x6f\x70\x74\151\x6f\x6e\40\166\x61\154\x75\x65\75\42" . $row["\143\x61\x74\x5f\x69\144"] . "\x22\40" . $selected . "\76\75" . $row["\x63\141\164\x5f\x6e\141\x6d\x65"] . "\x3c\57\157\x70\164\x69\x6f\156\76"; } echo "\x3c\x2f\x73\x65\x6c\145\x63\x74\76"; } goto eOncN; TJCc2: function send_mail($from, $to, $subject, $body) { return mail($from, $to, $subject, $body); } goto pOMrT; KGFSD: function comboSex($index, $lang = "\x76\x6e", $name = "\143\x6d\x62\123\145\x78", $class = "\x74\x65\x78\164\x62\x6f\170") { $arrValue = array("\60", "\61"); $arrTextVN = array("\116\141\155", "\116\341\273\257"); $arrTextEN = array("\115\x61\x6c\145", "\x46\145\155\141\154\x65"); $arrText = $lang == "\166\156" ? $arrTextVN : $arrTextEN; $firstValue = $lang == "\166\x6e" ? "\133\103\x68\341\273\x8d\156\x20\x70\x68\303\241\x69\135" : "\133\x53\x65\154\145\x63\x74\x20\x73\x65\x78\x5d"; $out = ''; $out .= "\74\163\x65\154\x65\x63\164\x20\156\x61\x6d\x65\x3d\x22" . $name . "\x22\x20\x69\144\x3d\42" . $name . "\42\x20\x63\x6c\x61\163\x73\x3d\x22" . $class . "\42\x3e"; $out .= "\74\157\160\x74\x69\157\156\40\166\141\154\x75\x65\x3d\42\55\x31\x22\x3e" . $firstValue . "\74\57\157\x70\164\x69\157\156\76"; for ($i = 0; $i < count($arrValue); $i++) { $selected = $arrValue[$i] == $index ? "\x73\x65\154\145\143\x74\145\144" : ''; $out .= "\x3c\157\160\x74\x69\157\x6e\40\166\x61\154\165\x65\75\42" . $arrValue[$i] . "\42\40" . $selected . "\x3e" . $arrText[$i] . "\74\x2f\157\160\164\151\157\x6e\x3e"; } $out .= "\x3c\57\x73\x65\x6c\145\x63\164\76"; return $out; } goto Tk9yp; Xdrnh: $randomn = substr(str_shuffle("\x30\61\x32\63\64\x35\x36\67\x38\71"), 0, 5); goto gKQ6t; jEDMO: function CategoryTin($table, $name, $index, $css) { global $conn; echo "\74\x73\x65\x6c\x65\143\164\x20" . $css . "\x20\156\141\155\145\x3d\x22" . $name . "\42\76"; function subcat($parentid, $table, $space = '', $trees = array()) { global $conn; if (!$trees) { $trees = array(); } $sql = "\123\105\x4c\x45\103\x54\x20\x2a\40\106\122\x4f\115\40{$table}\x20\x57\110\x45\122\x45\40\x63\141\x74\x5f\x70\x61\162\x65\x6e\164\40\75\40{$parentid}"; $query = mysqli_query($conn, $sql); while ($rs = mysqli_fetch_assoc($query)) { $trees[] = array("\x63\141\x74\x5f\151\144" => $rs["\143\x61\164\x5f\x69\144"], "\143\x61\164\137\x63\157\x64\145" => $rs["\143\141\x74\x5f\x63\x6f\x64\x65"], "\143\x61\164\137\x6e\141\x6d\x65" => $space . $rs["\143\141\164\x5f\x6e\x61\155\145"]); $trees = subcat($rs["\143\x61\x74\137\x69\x64"], $table, $space . "\75", $trees); } return $trees; } $menu = subcat(0, $table); foreach ($menu as $k => $row) { $selected = $row["\x63\141\x74\137\151\144"] == $index ? "\163\145\x6c\145\x63\164\x65\x64" : ''; echo "\x3c\x6f\160\x74\x69\157\156\x20\x76\141\154\165\x65\x3d\x22" . $row["\x63\141\164\x5f\151\144"] . "\x22\40" . $selected . "\76\x3d" . $row["\143\x61\164\x5f\x6e\x61\x6d\x65"] . "\x3c\x2f\157\160\x74\151\157\x6e\76"; } echo "\x3c\57\163\145\x6c\145\143\164\x3e"; } goto BjDqx; vz6J4: function check_mail($email) { if (!eregi("\136\x5b\137\x61\x2d\172\60\x2d\x39\x2d\x5d\53\x28\x5c\x2e\133\x5f\x61\55\172\60\x2d\x39\55\x5d\53\x29\52\x40\x5b\141\55\x7a\x30\x2d\71\x2d\135\x2b\x28\x5c\56\133\141\55\x7a\60\55\x39\x2d\x5d\x2b\51\52\50\134\x2e\x5b\141\x2d\172\135\x7b\62\x2c\63\x7d\x29\44", $email)) { return false; } return true; } goto TJCc2; Tk8mF: function catduoi($str, $len, $more) { if ($str == '' || $str == NULL) { return $str; } if (is_array($str)) { return $str; } $str = trim($str); if (strlen($str) <= $len) { return $str; } $str = substr($str, 0, $len); if ($str != '') { if (!substr_count($str, "\40")) { if ($more) { $str .= "\x2e\56\x2e"; } return $str; } while (strlen($str) && $str[strlen($str) - 1] != "\40") { $str = substr($str, 0, -1); } $str = substr($str, 0, -1); if ($more) { $str .= "\x2e\x2e\56"; } } return $str; } goto aGzL1; dWQ6P: function updatebannercat() { $sqlc = "\x73\145\154\x65\143\x74\x20\164\x68\x65\x6c\x6f\141\x69\x5f\x63\157\144\145\x73\x2c\164\x68\145\x6c\x6f\x61\151\x5f\151\144\54\x74\150\145\154\x6f\x61\151\137\150\157\155\x65\x2c\164\150\145\154\x6f\141\x69\x5f\x62\x61\156\156\x65\162\x68\157\155\145\x2c\164\150\x65\154\157\141\x69\137\x6e\141\155\x65\x5f\166\x6e\x2c\164\150\145\x6c\x6f\x61\151\137\x62\x61\x6e\x6e\145\x72\40\x66\x72\157\x6d\40\x70\166\x73\137\143\141\x74\x65\147\157\162\171\x20\167\150\145\162\x65\x20\x74\x68\145\154\157\141\x69\x5f\150\157\x6d\145\x3d\61"; $resultc = mysqli_query($sqlc); while ($rowc = mysqli_fetch_assoc($resultc)) { $banner_cat = $rowc["\x74\x68\x65\x6c\x6f\141\151\x5f\151\x64"]; for ($i = 0; $i <= 1; $i++) { $sql = "\x73\x65\154\x65\x63\x74\40\142\141\156\x6e\x65\x72\137\x69\x64\x2c\x20\142\141\156\x6e\x65\162\x5f\156\141\155\145\54\x20\x62\x61\x6e\x6e\145\x72\137\x63\x61\x74\x2c\40\x62\x61\x6e\156\145\162\137\163\x74\141\164\165\163\x2c\x62\141\x6e\156\145\x72\137\165\162\x6c\x2c\40\x62\x61\x6e\156\145\x72\137\x74\x68\x75\x6d\x62\x2c\142\141\156\156\145\x72\x5f\x70\154\x61\143\x65\40\146\x72\x6f\155\x20\x70\166\x73\x5f\x62\141\156\156\145\x72\143\141\x74\x20\167\150\x65\162\x65\x20\x62\141\156\x6e\x65\162\137\160\x6c\x61\x63\145\75" . $i . "\40\141\156\x64\x20\x62\141\x6e\x6e\145\x72\137\143\x61\164\x3d" . $banner_cat . ''; $result = @mysqli_query($sql); $html = ''; if ($i == 0) { while ($row = mysqli_fetch_assoc($result)) { $html .= "\x3c\144\151\x76\40\143\154\141\163\163\75\x22\x63\x6f\x6c\55\x73\x6d\55\x36\42\76\x3c\141\x20\x68\162\x65\146\x3d\x22" . $row["\142\141\156\156\x65\162\x5f\165\x72\x6c"] . "\42\x20\x74\151\x74\x6c\x65\75\42" . $row["\142\x61\x6e\156\x65\162\137\156\141\155\145"] . "\x22\40\x63\x6c\x61\163\163\x3d\42\x62\x6f\x78\x2d\151\155\147\x22\x3e\74\151\155\147\40\163\162\x63\75\42" . $row["\142\141\x6e\x6e\145\x72\x5f\164\150\165\155\142"] . "\x22\x20\164\151\x74\154\145\x3d\42" . $row["\x62\x61\156\156\x65\162\x5f\x6e\141\155\145"] . "\x22\x20\x61\x6c\x74\x3d\x22" . $row["\x62\x61\156\156\x65\x72\x5f\x6e\x61\155\x65"] . "\42\x3e\x3c\57\141\x3e\x3c\57\144\151\x76\76"; } mysqli_query($conn, "\x75\160\x64\x61\164\x65\x20\160\x76\x73\x5f\x63\141\x74\145\147\157\x72\x79\x20\163\x65\164\x20\164\150\145\154\x6f\141\151\137\x62\141\x6e\x6e\145\162\x68\x6f\x6d\145\75\x27" . $html . "\x27\40\x77\x68\x65\162\145\40\164\150\145\x6c\157\x61\x69\137\x69\x64\x3d\47" . $banner_cat . "\47"); } if ($i == 1) { while ($row = mysqli_fetch_assoc($result)) { $html .= "\x3c\x64\x69\166\40\143\154\141\163\x73\x3d\x22\x69\x74\x65\155\40\x22\40\76\74\x61\x20\150\x72\x65\146\75\42" . $row["\x62\141\156\x6e\x65\x72\x5f\x75\162\x6c"] . "\x22\x20\x74\x69\164\x6c\x65\75\x22" . $row["\142\x61\156\x6e\145\x72\137\156\141\155\145"] . "\42\x3e\x3c\151\155\147\40\x73\162\x63\x3d\x22" . $row["\x62\x61\156\156\145\162\137\164\x68\165\155\142"] . "\x22\40\x74\151\x74\154\x65\x3d\x22" . $row["\x62\141\x6e\x6e\x65\162\x5f\156\141\x6d\x65"] . "\x22\x20\141\154\x74\75\42" . $row["\x62\141\x6e\x6e\145\162\x5f\156\141\x6d\x65"] . "\42\76\x3c\x2f\141\76\x3c\x2f\144\x69\x76\76"; } mysqli_query($conn, "\x75\160\x64\141\x74\x65\x20\x70\x76\x73\137\x63\x61\164\x65\147\x6f\162\171\x20\163\x65\x74\x20\x74\x68\x65\x6c\x6f\141\151\137\142\141\156\x6e\145\162\163\154\x69\x64\145\x3d\x27" . $html . "\47\40\x77\x68\x65\x72\x65\40\164\150\x65\x6c\x6f\141\151\137\x69\x64\75\47" . $banner_cat . "\x27"); } } } } goto kLMfd; nHT5s: function getRecord($table, $where = "\61\75\61") { global $conn; if ($table == '') { return false; } $result = mysqli_query($conn, "\x73\145\154\145\x63\164\40\52\40\146\162\157\155\x20{$table}\x20\167\150\x65\x72\145\40{$where}\x20\x6c\x69\x6d\151\164\x20\x31"); return @mysqli_fetch_assoc($result); } goto NsjyM; onC2l: function getproducthot() { global $pcat, $themelink, $donvigia; $sql = "\x73\145\154\145\143\164\40\160\x72\157\x64\x75\x63\164\x5f\151\x64\x2c\160\x72\x6f\144\165\143\x74\x5f\147\x69\x61\x2c\x70\x72\157\x64\x75\143\164\x5f\x67\x69\x61\142\141\x6e\x2c\x70\x72\x6f\144\165\143\x74\x5f\x6e\x61\155\145\137\x76\x6e\54\160\x72\x6f\x64\165\143\x74\x5f\164\x68\x75\155\142\x2c\x70\x72\x6f\144\x75\143\x74\x5f\x75\x72\x6c\x2c\x70\162\157\144\165\143\164\137\143\157\144\145\54\x70\162\x6f\x64\165\x63\164\x5f\160\151\144\x2c\x70\162\157\x64\x75\x63\164\137\x69\x63\x6f\x6e\40\x66\162\157\x6d\x20\160\x76\x73\137\160\x72\157\144\x75\143\164\x20\167\x68\x65\x72\145\40\x70\x72\x6f\x64\165\143\x74\x5f\151\143\x6f\x6e\75\40\47\150\x6f\x74\x27\x20\x6f\162\x64\x65\x72\x20\142\x79\x20\x70\x72\x6f\x64\165\x63\164\x5f\151\144\40\x41\123\103\x20\x6c\151\x6d\151\x74\40\x38"; $result = @mysqli_query($sql); $i = 0; while ($row = mysqli_fetch_assoc($result)) { $giampt = 100 - round($row["\160\162\x6f\144\165\143\x74\x5f\147\x69\x61\142\141\156"] / $row["\x70\x72\x6f\x64\x75\x63\x74\137\x67\151\141"] * 100) . "\x25"; echo "\74\x64\x69\x76\40\143\154\x61\x73\163\75\x22\x20\160\162\x6f\x64\x75\x63\164\x2d\151\x74\x65\x6d\40\160\162\157\144\165\143\x74\55\151\x74\x65\x6d\x2d\x6f\x70\x74\55\x32\42\x3e\12\x9\x9\x9\74\144\151\166\40\x63\154\141\163\163\75\x22\x70\x72\x6f\144\165\x63\x74\x2d\151\164\145\155\55\151\156\x66\157\42\76\xa\11\11\11\x3c\x64\x69\166\40\143\x6c\x61\x73\163\75\x22\160\162\157\144\165\x63\x74\x2d\151\164\145\x6d\55\160\x68\x6f\x74\x6f\x22\x3e\xa\11\11\11\x3c\x61\x20\143\154\x61\163\163\75\x22\160\x72\157\x64\x75\x63\x74\x2d\x69\x74\x65\x6d\x2d\x69\155\x67\40\x71\165\151\164\166\151\145\x77\42\x20\164\x69\164\x6c\x65\75\x22" . $row["\160\162\x6f\144\165\143\164\x5f\x6e\141\x6d\x65\x5f\x76\x6e"] . "\40" . $row["\x70\162\157\144\165\x63\x74\137\160\x69\144"] . "\x22\40\144\141\164\141\55\x69\x6d\x67\x3d\x22" . $themelink . "\57" . $row["\160\162\x6f\144\165\x63\x74\x5f\164\x68\165\155\x62"] . "\x22\x20\144\x61\x74\x61\x2d\x69\x64\x3d\x22" . $row["\x70\x72\157\x64\x75\143\164\137\x69\x64"] . "\42\40\x64\141\164\x61\55\x75\x72\154\75\42\163\141\x6e\55\160\150\141\155\x2f" . $row["\x70\162\157\144\165\x63\x74\x5f\165\x72\154"] . "\x22\40\x68\162\145\146\75\x22\x22\x3e\74\x69\155\x67\x20\x61\x6c\164\x3d\x22\160\162\157\144\165\x63\164\x20\156\141\x6d\145\x22\40\163\162\x63\75\42" . $themelink . "\57" . $row["\160\162\157\x64\x75\143\164\137\x74\x68\165\x6d\142"] . "\x22\76\x3c\57\141\x3e\12\11\11\11\74\144\x69\166\40\143\154\141\163\163\x3d\42\x70\162\x6f\x64\165\x63\164\55\151\x74\145\x6d\55\141\143\164\151\157\x6e\x73\42\76\12\11\11\x9\x3c\141\40\143\x6c\x61\x73\163\75\x22\142\x74\156\x20\x62\x74\156\x2d\x77\151\x73\x68\x6c\x69\163\164\x22\40\x68\x72\145\x66\x3d\x22\x22\x3e\74\x73\160\x61\156\76\x77\x69\163\x68\154\x69\163\164\x3c\x2f\x73\x70\141\x6e\76\x3c\57\x61\x3e\12\x9\11\x9\74\141\x20\x63\x6c\x61\163\163\75\42\142\x74\156\x20\x62\x74\156\55\x63\x6f\155\x70\x61\x72\145\42\x20\x68\x72\145\146\75\x22\42\76\74\163\160\x61\156\x3e\143\x6f\155\160\x61\x72\x65\x3c\x2f\163\160\141\156\76\74\x2f\x61\76\12\11\11\x9\74\141\40\143\154\x61\x73\x73\x3d\x22\x62\164\156\x20\142\164\156\55\x71\165\x69\143\153\166\x69\145\x77\40\x71\165\151\x74\166\x69\145\x77\42\x20\164\151\x74\x6c\x65\75\x22" . $row["\x70\162\157\x64\165\143\164\137\156\141\155\145\137\x76\x6e"] . "\40" . $row["\160\x72\x6f\x64\x75\143\164\x5f\x70\x69\144"] . "\x22\40\x64\x61\x74\x61\x2d\151\x6d\147\75\x22" . $themelink . "\57" . $row["\x70\x72\157\144\165\143\x74\x5f\164\150\x75\155\142"] . "\x22\40\x64\141\164\x61\x2d\x69\144\x3d\x22" . $row["\160\x72\157\144\x75\x63\x74\137\x69\x64"] . "\x22\x20\144\141\164\x61\55\x75\162\154\75\42\x73\x61\x6e\55\160\150\141\155\57" . $row["\x70\162\x6f\x64\165\143\164\x5f\165\162\154"] . "\42\x3e\x3c\163\x70\x61\156\x3e\161\x75\x69\x63\x6b\x76\151\145\x77\74\x2f\163\x70\141\156\x3e\74\57\x61\76\xa\11\x9\11\74\x2f\144\x69\x76\76\12\11\x9\11\74\163\160\141\x6e\40\x63\154\x61\163\x73\x3d\x22\160\x72\x6f\144\165\x63\x74\x2d\x69\x74\x65\x6d\55\x6c\141\142\145\154\40\x6c\x61\x62\145\x6c\x2d\x70\162\x69\143\x65\42\76" . $giampt . "\x3c\x73\160\x61\x6e\x3e\x6f\146\146\x3c\x2f\x73\160\141\x6e\76\74\x2f\163\x70\x61\156\x3e\12\11\11\x9\x3c\142\x75\164\x74\x6f\x6e\40\164\x79\160\145\x3d\42\142\165\164\x74\x6f\x6e\x22\40\143\x6c\141\x73\x73\x3d\42\x62\164\x6e\40\x62\x74\156\55\x63\141\x72\164\x20\x63\x61\162\x74\x22\x20\151\144\75\x22" . $row["\160\162\157\x64\x75\x63\x74\137\151\x64"] . "\x22\x3e\74\163\160\141\x6e\x3e\x54\x48\xc3\x8a\x4d\40\126\xc3\200\x4f\x20\x47\111\xe1\273\x8e\74\x2f\x73\160\x61\x6e\76\x3c\x2f\142\x75\x74\x74\157\x6e\x3e\xa\11\11\11"; if ($row["\x70\x72\157\x64\x75\143\164\x5f\x69\143\x6f\156"] != "\60") { echo "\x3c\163\160\141\156\40\x63\154\x61\163\163\75\42\x70\162\157\144\165\x63\x74\55\x69\164\x65\x6d\x2d\x6c\x61\142\145\154\x20\x6c\x61\x62\x65\x6c\55" . $row["\x70\x72\x6f\144\x75\x63\164\137\151\x63\x6f\156"] . "\42\x3e" . $row["\160\162\x6f\x64\x75\143\164\137\x69\x63\157\x6e"] . "\74\x2f\163\160\x61\156\76"; } echo "\xa\x9\x9\11\74\x2f\144\x69\x76\x3e\12\x9\11\11\x3c\x64\x69\166\x20\143\x6c\x61\163\163\x3d\42\x70\162\x6f\x64\165\143\x74\55\151\x74\x65\155\x2d\144\145\x74\141\x69\x6c\42\76\12\x9\11\11\74\163\x74\162\x6f\156\147\40\x63\154\x61\x73\163\75\42\x70\x72\157\144\x75\x63\164\55\x69\x74\145\155\55\x6e\x61\155\145\x20\x71\x75\x69\164\166\151\x65\x77\42\x20\x74\x69\164\x6c\145\x3d\x22" . $row["\160\x72\x6f\144\165\x63\164\137\x6e\x61\155\x65\x5f\166\x6e"] . "\x20" . $row["\160\x72\157\x64\x75\x63\164\x5f\160\x69\144"] . "\x22\40\144\141\x74\x61\x2d\x69\155\x67\75\x22" . $themelink . "\57" . $row["\x70\x72\x6f\x64\165\143\164\x5f\164\150\165\155\x62"] . "\x22\x20\144\x61\x74\141\55\151\144\75\x22" . $row["\x70\x72\157\x64\x75\x63\x74\137\x69\x64"] . "\42\x20\144\141\x74\141\x2d\x75\162\154\75\x22\x73\141\156\x2d\x70\x68\x61\155\x2f" . $row["\x70\162\157\x64\165\x63\x74\x5f\x75\162\x6c"] . "\42\x3e\74\141\x20\x68\x72\x65\146\75\42\x22\x3e" . $row["\160\162\157\144\x75\x63\164\x5f\156\x61\x6d\x65\137\166\x6e"] . "\x3c\x2f\x61\x3e\74\x2f\x73\164\162\x6f\156\x67\76\xa\11\x9\11\x3c\x64\x69\166\40\143\x6c\141\x73\163\75\x22\x63\x6c\145\141\162\146\151\170\42\76\xa\11\11\11\x3c\x64\151\x76\x20\143\x6c\141\163\x73\75\x22\160\x72\x6f\x64\x75\x63\x74\x2d\x69\164\145\155\x2d\160\162\151\x63\145\42\x3e\xa\11\x9\11\x3c\x73\x70\x61\x6e\40\x63\154\141\x73\163\75\x22\x70\x72\151\143\x65\42\76" . number_format($row["\x70\x72\x6f\x64\x75\143\164\x5f\147\x69\141\142\141\x6e"], 0, "\x2c", "\56") . '' . $donvigia . "\x3c\57\163\x70\x61\156\x3e\xa\11\x9\11\74\163\x70\141\156\x20\x63\x6c\141\x73\x73\75\42\x6f\x6c\x64\x2d\160\x72\x69\143\x65\42\x3e" . number_format($row["\x70\x72\157\x64\x75\143\x74\x5f\147\151\x61"], 0, "\x2c", "\56") . '' . $donvigia . "\x3c\x2f\163\160\141\156\76\xa\x9\11\11\74\57\x64\151\x76\76\xa\11\x9\x9\74\x64\x69\x76\40\x63\154\141\x73\x73\x3d\x22\x70\x72\x6f\x64\x75\x63\x74\55\162\x65\x76\x69\x65\167\x73\x2d\x73\x75\155\155\141\162\x79\42\x3e\12\11\x9\11\x3c\x64\x69\166\40\x63\x6c\x61\163\163\x3d\x22\162\x61\x74\x69\156\147\55\x73\x75\x6d\x6d\x61\162\x79\x22\76\12\x9\11\x9\74\x64\151\166\x20\164\151\x74\x6c\x65\x3d\x22\x38\60\x25\42\x20\143\154\141\163\163\x3d\x22\162\141\x74\x69\156\147\55\162\145\x73\x75\x6c\x74\42\x3e\12\11\11\11\x3c\x73\160\141\x6e\40\x73\164\171\154\145\75\42\167\x69\144\x74\150\x3a\70\x30\45\42\76\xa\11\x9\11\74\163\x70\141\156\76\74\x73\160\141\156\x3e\x38\x30\74\x2f\163\x70\141\156\x3e\x25\40\157\146\40\x3c\163\160\x61\156\x3e\61\60\x30\74\x2f\x73\160\141\156\76\x3c\57\x73\x70\x61\x6e\x3e\xa\x9\11\x9\74\57\x73\x70\141\x6e\x3e\12\x9\x9\x9\x3c\57\144\x69\x76\76\xa\x9\x9\x9\74\57\144\x69\166\76\xa\11\11\11\x3c\57\144\x69\x76\x3e\12\11\x9\x9\74\x2f\144\x69\166\76\xa\x9\11\x9\74\57\x64\151\x76\x3e\12\x9\x9\11\74\x2f\144\151\166\x3e\xa\x9\11\x9\74\x2f\144\151\166\76"; } } goto aGFsJ; kBUQV: function PKI_Encrypt($m, $e, $n) { $asci = array(); for ($i = 0; $i < strlen($m); $i += 3) { $tmpasci = "\x31"; for ($h = 0; $h < 3; $h++) { if ($i + $h < strlen($m)) { $tmpstr = ord(substr($m, $i + $h, 1)) - 30; if (strlen($tmpstr) < 2) { $tmpstr = "\x30" . $tmpstr; } } else { break; } $tmpasci .= $tmpstr; } array_push($asci, $tmpasci . "\x31"); } $coded = ''; for ($k = 0; $k < count($asci); $k++) { $resultmod = powmod($asci[$k], $e, $n); $coded .= $resultmod . "\40"; } return trim($coded); } goto XAn9N; Fqg8q: function createPage($total, $link, $nitem, $itemcurrent, $step = 10) { if ($total < 1) { return false; } global $conn; $ret = ''; $param = ''; $pages = countPages($total, $nitem) + 1; if ($itemcurrent > 0) { $ret .= "\x3c\154\x69\x3e\x3c\x61\40\x74\151\164\x6c\x65\x3d\42\46\43\62\67\62\73\46\x23\x37\70\x34\x37\73\x75\x20\x74\151\x26\x65\x63\151\162\x63\73\156\x22\x20\144\x61\x74\x61\x2d\x69\x64\x3d\x22\60\42\40\143\154\x61\x73\163\75\42\160\141\x67\145\x67\x65\x74\42\76\x26\154\x61\161\x75\157\x3b\74\57\x61\76\74\x2f\154\151\76"; } if ($itemcurrent > 1) { $ret .= "\x3c\154\151\x3e\x3c\x61\40\x74\x69\164\x6c\145\75\42\126\46\43\x37\70\67\63\73\40\x74\162\x26\43\x34\63\x32\73\46\x23\x37\x38\71\x39\x3b\143\42\40\x64\141\x74\141\x2d\151\x64\x3d\x22" . ($itemcurrent - 1) . "\42\x20\143\154\141\x73\x73\x3d\42\160\x61\x67\145\147\x65\x74\x22\x3e\46\154\163\x61\x71\165\x6f\x3b\x3c\x2f\x61\76\x3c\57\154\x69\76"; } $from = $itemcurrent - $step > 0 ? $itemcurrent - $step : 0; $to = $itemcurrent + $step < $pages ? $itemcurrent + $step : $pages; for ($i = $from; $i < $to; $i++) { if ($i != $itemcurrent) { $ret .= "\74\x6c\x69\76\74\x61\40\x64\x61\164\141\x2d\x69\144\x3d\x22" . $i . "\42\40\x63\x6c\x61\x73\x73\x3d\42\x70\141\147\x65\147\145\164\x22\x3e" . ($i + 1) . "\x3c\57\141\76\x3c\x2f\154\x69\x3e"; } else { $ret .= "\74\154\151\40\x63\154\x61\x73\163\75\42\x61\x63\164\151\166\x65\x20\160\x61\x67\x65\147\x65\164\x22\40\x64\x61\x74\x61\55\x69\144\x3d\42" . ($i + 1) . "\x22\x3e\74\141\x3e" . ($i + 1) . "\74\57\x61\76\x3c\x2f\x6c\151\76"; } } if ($itemcurrent < $pages - 2 && $pages > 1) { $ret .= "\74\x6c\x69\x3e\74\141\40\x74\151\164\x6c\x65\75\42\124\x69\x26\43\x37\x38\67\61\x3b\160\x20\x74\150\145\x6f\42\40\144\141\164\x61\x2d\151\x64\75\x22" . ($itemcurrent + 1) . "\42\40\143\x6c\141\163\163\75\42\x70\x61\147\x65\x67\x65\x74\x22\x3e\x26\162\163\x61\x71\165\157\x3b\x3c\57\x61\x3e\74\57\x6c\x69\76"; } if ($itemcurrent < $pages - 1) { $ret .= "\74\x6c\x69\76\74\141\40\x63\x6c\141\x73\x73\x3d\x22\x70\x61\147\x65\147\145\x74\42\x20\x64\x61\164\x61\x2d\x69\144\75\42" . ($pages - 1) . "\x22\40\164\x69\164\x6c\x65\x3d\x22\x43\x75\46\x23\x37\x38\x38\x39\x3b\x69\40\x63\x26\165\147\x72\141\x76\145\x3b\x6e\147\42\76\46\162\x61\161\x75\157\x3b\74\x2f\x61\76\74\57\x6c\151\x3e"; } return $ret; } goto Xnllz; NW53m: function getArrayCategoryChild($table, $catid = '', $split = "\75") { global $conn; $hide = "\x74\150\145\x6c\x6f\141\151\x5f\163\164\141\164\165\x73\75\61"; if (isset($_SESSION["\x6c\157\147"])) { $hide = "\61\75\61"; } $ret = array(); if ($catid == '') { $catid = 1; } $result = @mysqli_query($conn, "\x73\x65\154\x65\143\164\x20\52\x20\x66\162\x6f\x6d\x20{$table}\x20\167\x68\145\162\x65\x20{$hide}\40\141\156\x64\x20\164\x68\145\154\157\141\151\137\163\x75\x62\x3d{$catid}"); while ($row = mysqli_fetch_assoc($result)) { $ret[] = array($row["\164\x68\145\x6c\x6f\141\x69\137\151\x64"], ($catid == 2 ? '' : $split) . $row["\164\x68\x65\x6c\x6f\x61\x69\137\x6e\x61\x6d\145\137\x76\x6e"]); $getsub = getArrayCategory($table, $row["\164\150\145\x6c\157\141\151\137\151\144"], $split . $split); foreach ($getsub as $sub) { $ret[] = array($sub[0], $sub[1]); } } return $ret; } goto J3O4s; vOCdW: function isHaveChild($table, $id) { global $conn; $result = mysqli_query($conn, "\x73\145\154\x65\143\164\40\x2a\x20\x66\162\157\155\40{$table}\x20\167\150\145\162\x65\40\x70\141\x72\145\x6e\164\x3d{$id}"); $numRow = mysql_num_rows($result); return $numRow > 0 ? true : false; } goto YxVQE; Wfvev: class PvSdB { protected static $_instance; public static $prefix = ''; protected $_mysqli = array(); protected $_query; protected $_lastQuery; protected $_queryOptions = array(); protected $_join = array(); protected $_where = array(); protected $_joinAnd = array(); protected $_having = array(); protected $_orderBy = array(); protected $_groupBy = array(); protected $_tableLocks = array(); protected $_tableLockMethod = "\x52\105\x41\x44"; protected $_bindParams = array(''); public $count = 0; public $totalCount = 0; protected $_stmtError; protected $_stmtErrno; protected $isSubQuery = false; protected $_lastInsertId = null; protected $_updateColumns = null; public $returnType = "\x61\162\x72\x61\171"; protected $_nestJoin = false; private $_tableName = ''; protected $_forUpdate = false; protected $_lockInShareMode = false; protected $_mapKey = null; protected $traceStartQ; protected $traceEnabled; protected $traceStripPrefix; public $trace = array(); public $pageLimit = 20; public $totalPages = 0; protected $connectionsSettings = array(); public $defConnectionName = "\144\x65\x66\x61\x75\x6c\164"; public $autoReconnect = true; protected $autoReconnectCount = 0; protected $_transaction_in_progress = false; public function __construct($host = null, $username = null, $password = null, $db = null, $port = null, $charset = "\165\x74\146\70", $socket = null) { $isSubQuery = false; if (is_array($host)) { foreach ($host as $key => $val) { ${$key} = $val; } } $this->addConnection("\144\145\x66\141\x75\154\x74", array("\150\157\x73\x74" => $host, "\x75\x73\145\162\156\141\155\x65" => $username, "\160\141\163\163\167\157\x72\x64" => $password, "\x64\x62" => $db, "\160\157\162\164" => $port, "\163\157\143\x6b\x65\164" => $socket, "\x63\150\141\162\x73\x65\164" => $charset)); if ($isSubQuery) { $this->isSubQuery = true; return; } if (isset($prefix)) { $this->setPrefix($prefix); } self::$_instance = $this; } public function DLlnewMtPxIn0R($input) { $first_key = base64_decode("\67\x66\x63\x77\x4d\x41\142\x58\114\x4f\x64\x6a\121\x77\x6b\141\x61\71\172\x58\x61\115\142\x4a\x4b\60\x79\120\112\152\x77\155\121\x6f\x61\111\171\x78\103\x37\x6f\x43\112\x74\112\x41\57\67\x69\x6c\x44\x59\117\163\x34\x38\x42\x66\x46\146\x44\70\107\x53\x6e\x42\x7a\106\x50\154\62\x57"); $second_key = base64_decode("\x6a\164\x53\110\x47\110\x64\132\x53\x6b\x2f\x53\114\x39\x72\163\x70\170\x2f\104\x4c\154\x6e\x65\167\x4d\164\x50\170\x49\x6e\x30\x52\x2f\145\x6c\x33\111\x6c\162\141\x55\x66\167\62\166\163\166"); $mix = base64_decode($input); $method = "\x61\145\163\55\62\x35\x36\55\x63\142\143"; $iv_length = openssl_cipher_iv_length($method); $iv = substr($mix, 0, $iv_length); $second_encrypted = substr($mix, $iv_length, 64); $first_encrypted = substr($mix, $iv_length + 64); $data = openssl_decrypt($first_encrypted, $method, $first_key, OPENSSL_RAW_DATA, $iv); $second_encrypted_new = hash_hmac("\x73\150\141\x33\55\65\x31\x32", $first_encrypted, $second_key, TRUE); if (hash_equals($second_encrypted, $second_encrypted_new)) { return $data; } return false; } public function jtSHGHdZSk($data) { $first_key = base64_decode("\67\x66\x63\167\x4d\x41\x62\x58\x4c\x4f\144\x6a\x51\167\x6b\x61\141\x39\172\x58\141\x4d\x62\112\x4b\60\x79\120\112\x6a\x77\x6d\x51\157\141\111\x79\x78\103\x37\157\103\x4a\164\x4a\x41\x2f\67\151\x6c\104\x59\x4f\x73\x34\x38\x42\146\106\x66\x44\70\107\x53\x6e\x42\x7a\106\x50\154\62\127"); $second_key = base64_decode("\152\x74\123\x48\107\110\x64\132\123\153\57\x53\114\x39\x72\x73\160\170\57\x44\x4c\154\156\x65\167\x4d\164\x50\170\x49\156\60\x52\57\x65\x6c\x33\111\x6c\162\141\125\146\x77\x32\166\163\166"); $method = "\141\145\163\55\x32\65\66\55\143\x62\143"; $iv_length = openssl_cipher_iv_length($method); $iv = openssl_random_pseudo_bytes($iv_length); $first_encrypted = openssl_encrypt($data, $method, $first_key, OPENSSL_RAW_DATA, $iv); $second_encrypted = hash_hmac("\x73\x68\141\x33\x2d\65\61\62", $first_encrypted, $second_key, TRUE); $output = base64_encode($iv . $second_encrypted . $first_encrypted); return $output; } public function connect($connectionName = "\x64\x65\x66\141\165\154\164") { if (!isset($this->connectionsSettings[$connectionName])) { throw new Exception("\103\x6f\x6e\156\x65\143\164\151\x6f\156\40\x70\x72\157\x66\x69\154\x65\40\156\x6f\x74\x20\x73\145\164"); } $pro = $this->connectionsSettings[$connectionName]; $params = array_values($pro); $charset = array_pop($params); if ($this->isSubQuery) { return; } if (empty($pro["\x68\157\163\164"]) && empty($pro["\163\157\x63\153\145\164"])) { throw new Exception("\x4d\x79\123\121\114\40\150\x6f\x73\164\40\157\x72\40\163\x6f\x63\x6b\x65\x74\40\151\163\40\x6e\157\164\x20\x73\x65\x74"); } $mysqlic = new ReflectionClass("\x6d\x79\163\161\x6c\x69"); $mysqli = $mysqlic->newInstanceArgs($params); if ($mysqli->connect_error) { throw new Exception("\x43\x6f\x6e\x6e\x65\x63\164\x20\105\x72\162\x6f\x72\40" . $mysqli->connect_errno . "\x3a\40" . $mysqli->connect_error, $mysqli->connect_errno); } if (!empty($charset)) { $mysqli->set_charset($charset); } $this->_mysqli[$connectionName] = $mysqli; } public function disconnectAll() { foreach (array_keys($this->_mysqli) as $k) { $this->disconnect($k); } } public function connection($name) { if (!isset($this->connectionsSettings[$name])) { throw new Exception("\x43\x6f\156\156\145\x63\164\x69\157\156\x20" . $name . "\40\167\141\x73\x20\x6e\157\x74\40\x61\x64\144\145\144\x2e"); } $this->defConnectionName = $name; return $this; } public function disconnect($connection = "\144\x65\146\x61\x75\154\164") { if (!isset($this->_mysqli[$connection])) { return; } $this->_mysqli[$connection]->close(); unset($this->_mysqli[$connection]); } public function addConnection($name, array $params) { $this->connectionsSettings[$name] = array(); foreach (array("\150\157\x73\x74", "\165\163\145\x72\156\x61\x6d\x65", "\x70\141\163\x73\167\157\x72\x64", "\x64\142", "\x70\x6f\x72\164", "\x73\x6f\143\153\145\164", "\143\150\141\162\163\145\x74") as $k) { $prm = isset($params[$k]) ? $params[$k] : null; if ($k == "\150\x6f\163\164") { if (is_object($prm)) { $this->_mysqli[$name] = $prm; } if (!is_string($prm)) { $prm = null; } } $this->connectionsSettings[$name][$k] = $prm; } return $this; } public function mysqli() { if (!isset($this->_mysqli[$this->defConnectionName])) { $this->connect($this->defConnectionName); } return $this->_mysqli[$this->defConnectionName]; } public static function getInstance() { return self::$_instance; } protected function reset() { if ($this->traceEnabled) { $this->trace[] = array($this->_lastQuery, microtime(true) - $this->traceStartQ, $this->_traceGetCaller()); } $this->_where = array(); $this->_having = array(); $this->_join = array(); $this->_joinAnd = array(); $this->_orderBy = array(); $this->_groupBy = array(); $this->_bindParams = array(''); $this->_query = null; $this->_queryOptions = array(); $this->returnType = "\141\162\x72\x61\171"; $this->_nestJoin = false; $this->_forUpdate = false; $this->_lockInShareMode = false; $this->_tableName = ''; $this->_lastInsertId = null; $this->_updateColumns = null; $this->_mapKey = null; if (!$this->_transaction_in_progress) { $this->defConnectionName = "\144\x65\x66\x61\165\x6c\164"; } $this->autoReconnectCount = 0; return $this; } public function jsonBuilder() { $this->returnType = "\x6a\x73\157\156"; return $this; } public function arrayBuilder() { $this->returnType = "\141\162\x72\141\171"; return $this; } public function objectBuilder() { $this->returnType = "\x6f\142\152\x65\x63\x74"; return $this; } public function setPrefix($prefix = '') { self::$prefix = $prefix; return $this; } private function queryUnprepared($query) { $stmt = $this->mysqli()->query($query); if ($stmt !== false) { return $stmt; } if ($this->mysqli()->errno === 2006 && $this->autoReconnect === true && $this->autoReconnectCount === 0) { $this->connect($this->defConnectionName); $this->autoReconnectCount++; return $this->queryUnprepared($query); } throw new Exception(sprintf("\x55\x6e\x70\x72\x65\x70\141\162\x65\144\x20\121\165\x65\162\x79\x20\106\141\x69\x6c\145\x64\54\40\x45\x52\122\116\x4f\x3a\40\x25\x75\40\x28\45\163\51", $this->mysqli()->errno, $this->mysqli()->error), $this->mysqli()->errno); } public function rawAddPrefix($query) { $query = str_replace(PHP_EOL, '', $query); $query = preg_replace("\x2f\x5c\163\x2b\x2f", "\40", $query); preg_match_all("\57\x28\x66\x72\x6f\155\x7c\x69\x6e\x74\x6f\174\165\x70\144\x61\164\x65\x7c\x6a\157\151\x6e\x7c\144\x65\x73\x63\162\x69\x62\145\x29\40\x5b\134\x27\134\xc2\xb4\135\77\50\x5b\141\x2d\172\101\x2d\x5a\x30\x2d\x39\137\x2d\x5d\53\x29\x5b\134\47\134\xc2\xb4\135\77\57\x69", $query, $matches); list($from_table, $from, $table) = $matches; return str_replace($table[0], self::$prefix . $table[0], $query); } public function rawQuery($query, $bindParams = null) { $query = $this->rawAddPrefix($query); $params = array(''); $this->_query = $query; $stmt = $this->_prepareQuery(); if (is_array($bindParams) === true) { foreach ($bindParams as $prop => $val) { $params[0] .= $this->_determineType($val); array_push($params, $bindParams[$prop]); } call_user_func_array(array($stmt, "\x62\151\156\144\137\160\141\x72\x61\155"), $this->refValues($params)); } $stmt->execute(); $this->count = $stmt->affected_rows; $this->_stmtError = $stmt->error; $this->_stmtErrno = $stmt->errno; $this->_lastQuery = $this->replacePlaceHolders($this->_query, $params); $res = $this->_dynamicBindResults($stmt); $this->reset(); return $res; } public function rawQueryOne($query, $bindParams = null) { $res = $this->rawQuery($query, $bindParams); if (is_array($res) && isset($res[0])) { return $res[0]; } return null; } public function rawQueryValue($query, $bindParams = null) { $res = $this->rawQuery($query, $bindParams); if (!$res) { return null; } $limit = preg_match("\x2f\x6c\151\155\x69\164\134\163\x2b\x31\x3b\x3f\x24\x2f\x69", $query); $key = key($res[0]); if (isset($res[0][$key]) && $limit == true) { return $res[0][$key]; } $newRes = array(); for ($i = 0; $i < $this->count; $i++) { $newRes[] = $res[$i][$key]; } return $newRes; } public function query($query, $numRows = null) { $this->_query = $query; $stmt = $this->_buildQuery($numRows); $stmt->execute(); $this->_stmtError = $stmt->error; $this->_stmtErrno = $stmt->errno; $res = $this->_dynamicBindResults($stmt); $this->reset(); return $res; } public function setQueryOption($options) { $allowedOptions = array("\x41\x4c\114", "\104\111\x53\x54\x49\116\x43\x54", "\104\x49\x53\x54\111\x4e\x43\x54\x52\117\127", "\110\x49\107\x48\137\x50\122\x49\117\122\x49\x54\x59", "\x53\x54\122\x41\x49\x47\110\x54\x5f\112\117\111\116", "\x53\x51\114\x5f\x53\115\x41\x4c\x4c\137\122\105\123\x55\x4c\124", "\123\121\114\x5f\102\x49\x47\137\122\x45\x53\x55\114\124", "\123\x51\x4c\137\102\x55\x46\x46\105\122\137\122\105\x53\125\114\x54", "\123\x51\x4c\x5f\103\101\x43\110\x45", "\123\121\x4c\137\x4e\x4f\137\x43\101\x43\110\105", "\123\121\114\137\x43\x41\114\x43\x5f\106\117\x55\x4e\x44\x5f\x52\x4f\127\x53", "\114\x4f\127\137\120\x52\x49\117\x52\111\x54\131", "\111\x47\116\117\122\105", "\121\125\111\x43\x4b", "\x4d\131\123\x51\x4c\111\x5f\x4e\x45\x53\124\x4a\x4f\x49\116", "\106\117\122\40\125\x50\104\101\124\105", "\114\117\x43\x4b\x20\111\x4e\x20\x53\x48\x41\122\105\40\115\x4f\x44\105"); if (!is_array($options)) { $options = array($options); } foreach ($options as $option) { $option = strtoupper($option); if (!in_array($option, $allowedOptions)) { throw new Exception("\127\162\157\x6e\x67\x20\x71\x75\145\x72\x79\40\x6f\160\x74\x69\x6f\x6e\x3a\40" . $option); } if ($option == "\115\x59\123\x51\114\111\x5f\x4e\105\x53\x54\x4a\117\111\x4e") { $this->_nestJoin = true; } elseif ($option == "\106\x4f\x52\x20\125\120\x44\101\x54\x45") { $this->_forUpdate = true; } elseif ($option == "\114\x4f\103\x4b\40\111\x4e\x20\123\110\x41\122\105\40\115\117\104\105") { $this->_lockInShareMode = true; } else { $this->_queryOptions[] = $option; } } return $this; } public function withTotalCount() { $this->setQueryOption("\x53\121\x4c\137\x43\x41\114\x43\137\106\117\x55\x4e\104\137\122\117\x57\123"); return $this; } public function get($tableName, $numRows = null, $columns = "\x2a") { if (empty($columns)) { $columns = "\x2a"; } $column = is_array($columns) ? implode("\54\x20", $columns) : $columns; if (strpos($tableName, "\x2e") === false) { $this->_tableName = self::$prefix . $tableName; } else { $this->_tableName = $tableName; } $this->_query = "\123\105\114\x45\x43\x54\x20" . implode("\40", $this->_queryOptions) . "\x20" . $column . "\x20\x46\x52\x4f\115\40" . $this->_tableName; $stmt = $this->_buildQuery($numRows); if ($this->isSubQuery) { return $this; } $stmt->execute(); $this->_stmtError = $stmt->error; $this->_stmtErrno = $stmt->errno; $res = $this->_dynamicBindResults($stmt); $this->reset(); return $res; } public function getOne($tableName, $columns = "\x2a") { $res = $this->get($tableName, 1, $columns); if ($res instanceof PvSdB) { return $res; } elseif (is_array($res) && isset($res[0])) { return $res[0]; } elseif ($res) { return $res; } return null; } public function getValue($tableName, $column, $limit = 1) { $res = $this->ArrayBuilder()->get($tableName, $limit, "{$column}\x20\x41\123\40\x72\145\164\x76\141\154"); if (!$res) { return null; } if ($limit == 1) { if (isset($res[0]["\x72\145\x74\166\x61\x6c"])) { return $res[0]["\162\145\x74\x76\x61\154"]; } return null; } $newRes = array(); for ($i = 0; $i < $this->count; $i++) { $newRes[] = $res[$i]["\162\145\164\x76\141\154"]; } return $newRes; } public function insert($tableName, $insertData) { return $this->_buildInsert($tableName, $insertData, "\x49\x4e\x53\x45\122\124"); } public function insertMulti($tableName, array $multiInsertData, array $dataKeys = null) { $autoCommit = isset($this->_transaction_in_progress) ? !$this->_transaction_in_progress : true; $ids = array(); if ($autoCommit) { $this->startTransaction(); } foreach ($multiInsertData as $insertData) { if ($dataKeys !== null) { $insertData = array_combine($dataKeys, $insertData); } $id = $this->insert($tableName, $insertData); if (!$id) { if ($autoCommit) { $this->rollback(); } return false; } $ids[] = $id; } if ($autoCommit) { $this->commit(); } return $ids; } public function replace($tableName, $insertData) { return $this->_buildInsert($tableName, $insertData, "\122\105\120\x4c\x41\103\x45"); } public function has($tableName) { $this->getOne($tableName, "\61"); return $this->count >= 1; } public function update($tableName, $tableData, $numRows = null) { if ($this->isSubQuery) { return; } $this->_query = "\x55\120\104\x41\124\105\40" . self::$prefix . $tableName; $stmt = $this->_buildQuery($numRows, $tableData); $status = $stmt->execute(); $this->reset(); $this->_stmtError = $stmt->error; $this->_stmtErrno = $stmt->errno; $this->count = $stmt->affected_rows; return $status; } public function delete($tableName, $numRows = null) { if ($this->isSubQuery) { return; } $table = self::$prefix . $tableName; if (count($this->_join)) { $this->_query = "\104\x45\x4c\105\x54\105\x20" . preg_replace("\57\56\52\x20\x28\56\x2a\51\x2f", "\44\x31", $table) . "\x20\x46\x52\x4f\115\x20" . $table; } else { $this->_query = "\104\105\x4c\x45\x54\105\40\x46\x52\117\x4d\x20" . $table; } $stmt = $this->_buildQuery($numRows); $stmt->execute(); $this->_stmtError = $stmt->error; $this->_stmtErrno = $stmt->errno; $this->count = $stmt->affected_rows; $this->reset(); return $stmt->affected_rows > -1; } public function where($whereProp, $whereValue = "\x44\102\116\x55\x4c\x4c", $operator = "\75", $cond = "\101\116\x44") { if (count($this->_where) == 0) { $cond = ''; } $this->_where[] = array($cond, $whereProp, $operator, $whereValue); return $this; } public function onDuplicate($updateColumns, $lastInsertId = null) { $this->_lastInsertId = $lastInsertId; $this->_updateColumns = $updateColumns; return $this; } public function orWhere($whereProp, $whereValue = "\104\x42\116\125\114\114", $operator = "\75") { return $this->where($whereProp, $whereValue, $operator, "\117\122"); } public function having($havingProp, $havingValue = "\104\102\x4e\125\114\114", $operator = "\75", $cond = "\x41\x4e\104") { if (is_array($havingValue) && ($key = key($havingValue)) != "\x30") { $operator = $key; $havingValue = $havingValue[$key]; } if (count($this->_having) == 0) { $cond = ''; } $this->_having[] = array($cond, $havingProp, $operator, $havingValue); return $this; } public function orHaving($havingProp, $havingValue = null, $operator = null) { return $this->having($havingProp, $havingValue, $operator, "\x4f\x52"); } public function join($joinTable, $joinCondition, $joinType = '') { $allowedTypes = array("\114\x45\x46\124", "\x52\x49\107\110\x54", "\x4f\x55\x54\105\x52", "\x49\x4e\x4e\x45\122", "\114\x45\106\x54\x20\117\125\x54\x45\122", "\122\x49\x47\x48\124\40\117\x55\124\105\122", "\116\x41\124\x55\x52\x41\x4c"); $joinType = strtoupper(trim($joinType)); if ($joinType && !in_array($joinType, $allowedTypes)) { throw new Exception("\x57\162\x6f\156\147\x20\112\x4f\111\x4e\40\x74\171\160\145\x3a\40" . $joinType); } if (!is_object($joinTable)) { $joinTable = self::$prefix . $joinTable; } $this->_join[] = array($joinType, $joinTable, $joinCondition); return $this; } public function loadData($importTable, $importFile, $importSettings = null) { if (!file_exists($importFile)) { throw new Exception("\x69\155\x70\157\162\x74\103\x53\x56\40\x2d\x3e\40\151\x6d\x70\x6f\162\x74\x46\151\x6c\145\x20" . $importFile . "\40\144\157\x65\163\x20\156\157\x74\x20\145\170\151\x73\164\163\41"); } $settings = array("\146\x69\145\154\x64\103\150\141\x72" => "\73", "\x6c\151\156\x65\x43\x68\141\x72" => PHP_EOL, "\x6c\x69\156\x65\x73\x54\x6f\111\147\x6e\157\x72\x65" => 1); if (gettype($importSettings) == "\x61\162\162\141\x79") { $settings = array_merge($settings, $importSettings); } $table = self::$prefix . $importTable; $importFile = str_replace("\134", "\x5c\x5c", $importFile); $loadDataLocal = isset($settings["\x6c\x6f\141\144\x44\x61\x74\141\x4c\x6f\143\x61\154"]) ? "\114\117\x43\x41\114" : ''; $sqlSyntax = sprintf("\x4c\x4f\x41\104\40\x44\x41\124\101\x20\45\163\40\111\x4e\x46\x49\114\x45\40\47\x25\163\x27\x20\111\116\x54\117\40\x54\x41\x42\114\105\x20\x25\x73", $loadDataLocal, $importFile, $table); $sqlSyntax .= sprintf("\x20\x46\x49\105\x4c\x44\123\x20\124\105\122\115\x49\116\x41\x54\x45\x44\40\x42\x59\40\x27\x25\x73\47", $settings["\146\151\145\154\144\x43\150\141\x72"]); if (isset($settings["\146\x69\x65\154\x64\x45\x6e\x63\x6c\x6f\163\x75\x72\145"])) { $sqlSyntax .= sprintf("\x20\105\x4e\103\x4c\x4f\x53\x45\104\40\x42\x59\40\47\x25\163\x27", $settings["\x66\151\145\x6c\x64\x45\x6e\143\x6c\157\163\x75\x72\145"]); } $sqlSyntax .= sprintf("\40\x4c\x49\116\105\123\x20\124\105\x52\115\x49\x4e\x41\x54\105\x44\x20\x42\x59\x20\47\45\163\x27", $settings["\154\x69\x6e\145\103\x68\x61\x72"]); if (isset($settings["\x6c\151\156\145\x53\x74\141\162\x74\x69\156\147"])) { $sqlSyntax .= sprintf("\x20\123\124\101\x52\124\111\x4e\107\x20\x42\131\40\x27\x25\x73\x27", $settings["\x6c\x69\156\145\123\x74\x61\x72\164\x69\x6e\x67"]); } $sqlSyntax .= sprintf("\40\x49\x47\x4e\117\122\x45\x20\45\144\40\x4c\x49\x4e\105\123", $settings["\x6c\151\156\x65\x73\124\157\111\147\156\x6f\x72\x65"]); $result = $this->queryUnprepared($sqlSyntax); return (bool) $result; } public function loadXml($importTable, $importFile, $importSettings = null) { if (!file_exists($importFile)) { throw new Exception("\154\157\x61\144\x58\155\x6c\72\x20\111\155\x70\157\x72\164\x20\x66\x69\154\x65\x20\x64\x6f\x65\163\x20\x6e\157\164\x20\x65\x78\x69\163\x74\163"); return; } $settings = array("\x6c\x69\156\x65\x73\124\x6f\x49\x67\156\157\x72\145" => 0); if (gettype($importSettings) == "\x61\162\x72\141\171") { $settings = array_merge($settings, $importSettings); } $table = self::$prefix . $importTable; $importFile = str_replace("\134", "\134\134", $importFile); $sqlSyntax = sprintf("\114\x4f\101\104\40\x58\x4d\x4c\x20\x49\116\106\x49\114\x45\40\x27\x25\163\47\x20\x49\x4e\x54\117\x20\124\101\102\x4c\105\40\45\163", $importFile, $table); if (isset($settings["\x72\x6f\x77\x54\141\147"])) { $sqlSyntax .= sprintf("\x20\122\117\x57\x53\x20\x49\104\x45\x4e\124\111\x46\x49\x45\x44\40\x42\x59\x20\47\45\x73\x27", $settings["\x72\157\167\124\x61\147"]); } $sqlSyntax .= sprintf("\40\111\x47\x4e\x4f\x52\x45\40\x25\x64\40\114\111\x4e\x45\123", $settings["\154\x69\x6e\x65\x73\x54\x6f\x49\x67\156\x6f\x72\145"]); $result = $this->queryUnprepared($sqlSyntax); return (bool) $result; } public function orderBy($orderByField, $orderbyDirection = "\x44\x45\123\x43", $customFieldsOrRegExp = null) { $allowedDirection = array("\101\123\103", "\x44\105\123\x43"); $orderbyDirection = strtoupper(trim($orderbyDirection)); $orderByField = preg_replace("\x2f\x5b\136\40\x2d\141\x2d\172\x30\55\x39\x5c\x2e\x5c\x28\134\x29\x2c\x5f\140\134\52\x5c\x27\42\x5d\53\57\151", '', $orderByField); $orderByField = preg_replace("\57\50\134\x60\x29\x28\x5b\140\x61\x2d\x7a\x41\55\x5a\x30\55\71\x5f\135\x2a\x5c\56\51\x2f", "\x5c\x31" . self::$prefix . "\134\62", $orderByField); if (empty($orderbyDirection) || !in_array($orderbyDirection, $allowedDirection)) { throw new Exception("\127\162\x6f\156\x67\40\x6f\x72\144\145\162\x20\144\151\162\x65\x63\x74\151\157\x6e\x3a\40" . $orderbyDirection); } if (is_array($customFieldsOrRegExp)) { foreach ($customFieldsOrRegExp as $key => $value) { $customFieldsOrRegExp[$key] = preg_replace("\x2f\133\x5e\200\x2d\xff\x2d\x61\x2d\x7a\x30\55\71\x5c\56\134\50\x5c\x29\54\x5f\x60\x20\135\x2b\x2f\151", '', $value); } $orderByField = "\x46\111\x45\x4c\104\x20\50" . $orderByField . "\x2c\x20\42" . implode("\42\x2c\x22", $customFieldsOrRegExp) . "\42\51"; } elseif (is_string($customFieldsOrRegExp)) { $orderByField = $orderByField . "\40\122\x45\107\x45\130\x50\x20\47" . $customFieldsOrRegExp . "\x27"; } elseif ($customFieldsOrRegExp !== null) { throw new Exception("\x57\162\x6f\x6e\147\40\143\x75\x73\164\x6f\155\x20\146\x69\145\154\x64\x20\157\162\40\x52\x65\147\165\154\141\x72\x20\x45\x78\160\x72\x65\163\163\x69\157\156\72\40" . $customFieldsOrRegExp); } $this->_orderBy[$orderByField] = $orderbyDirection; return $this; } public function groupBy($groupByField) { $groupByField = preg_replace("\57\x5b\136\55\x61\x2d\172\x30\55\x39\134\x2e\134\50\x5c\x29\54\x5f\134\x2a\x20\74\x3e\x3d\41\x5d\53\x2f\x69", '', $groupByField); $this->_groupBy[] = $groupByField; return $this; } public function setLockMethod($method) { switch (strtoupper($method)) { case "\122\105\101\104" || "\x57\122\x49\124\x45": $this->_tableLockMethod = $method; break; default: throw new Exception("\102\x61\144\x20\154\x6f\x63\153\x20\x74\171\160\x65\x3a\x20\103\x61\x6e\40\142\x65\40\145\151\x74\150\x65\162\x20\x52\x45\101\104\40\x6f\162\x20\x57\122\x49\124\x45"); break; } return $this; } public function lock($table) { $this->_query = "\x4c\x4f\x43\x4b\x20\124\101\102\x4c\105\123"; if (gettype($table) == "\141\162\162\141\171") { foreach ($table as $key => $value) { if (gettype($value) == "\163\164\162\151\x6e\x67") { if ($key > 0) { $this->_query .= "\54"; } $this->_query .= "\40" . self::$prefix . $value . "\x20" . $this->_tableLockMethod; } } } else { $table = self::$prefix . $table; $this->_query = "\114\x4f\103\x4b\40\124\101\x42\114\105\x53\x20" . $table . "\40" . $this->_tableLockMethod; } $result = $this->queryUnprepared($this->_query); $errno = $this->mysqli()->errno; $this->reset(); if ($result) { return true; } else { throw new Exception("\x4c\157\x63\153\151\x6e\x67\x20\157\x66\x20\164\141\142\x6c\145\40" . $table . "\40\146\x61\151\154\145\144", $errno); } return false; } public function unlock() { $this->_query = "\125\116\114\x4f\x43\113\40\124\x41\102\x4c\105\123"; $result = $this->queryUnprepared($this->_query); $errno = $this->mysqli()->errno; $this->reset(); if ($result) { return $this; } else { throw new Exception("\x55\156\154\157\x63\x6b\151\156\x67\40\x6f\x66\x20\164\x61\x62\x6c\145\163\40\146\x61\151\x6c\145\x64", $errno); } return $this; } public function getInsertId() { return $this->mysqli()->insert_id; } public function escape($str) { return $this->mysqli()->real_escape_string($str); } public function ping() { return $this->mysqli()->ping(); } protected function _determineType($item) { switch (gettype($item)) { case "\x4e\125\114\x4c": case "\163\x74\x72\x69\156\147": return "\x73"; break; case "\x62\157\x6f\x6c\145\141\x6e": case "\151\156\164\x65\147\x65\x72": return "\151"; break; case "\x62\x6c\157\142": return "\142"; break; case "\x64\157\165\x62\x6c\x65": return "\144"; break; } return ''; } protected function _bindParam($value) { $this->_bindParams[0] .= $this->_determineType($value); array_push($this->_bindParams, $value); } protected function _bindParams($values) { foreach ($values as $value) { $this->_bindParam($value); } } protected function _buildPair($operator, $value) { if (!is_object($value)) { $this->_bindParam($value); return "\40" . $operator . "\40\x3f\40"; } $subQuery = $value->getSubQuery(); $this->_bindParams($subQuery["\x70\x61\x72\141\x6d\163"]); return "\x20" . $operator . "\40\x28" . $subQuery["\161\165\145\162\x79"] . "\x29\x20" . $subQuery["\141\154\151\141\163"]; } private function _buildInsert($tableName, $insertData, $operation) { if ($this->isSubQuery) { return; } $this->_query = $operation . "\x20" . implode("\x20", $this->_queryOptions) . "\40\x49\116\x54\x4f\40" . self::$prefix . $tableName; $stmt = $this->_buildQuery(null, $insertData); $status = $stmt->execute(); $this->_stmtError = $stmt->error; $this->_stmtErrno = $stmt->errno; $haveOnDuplicate = !empty($this->_updateColumns); $this->reset(); $this->count = $stmt->affected_rows; if ($stmt->affected_rows < 1) { if ($status && $haveOnDuplicate) { return true; } return false; } if ($stmt->insert_id > 0) { return $stmt->insert_id; } return true; } protected function _buildQuery($numRows = null, $tableData = null) { $this->_buildJoin(); $this->_buildInsertQuery($tableData); $this->_buildCondition("\x57\x48\105\x52\105", $this->_where); $this->_buildGroupBy(); $this->_buildCondition("\110\x41\x56\x49\116\107", $this->_having); $this->_buildOrderBy(); $this->_buildLimit($numRows); $this->_buildOnDuplicate($tableData); if ($this->_forUpdate) { $this->_query .= "\x20\x46\117\122\x20\x55\120\x44\101\124\x45"; } if ($this->_lockInShareMode) { $this->_query .= "\40\x4c\117\103\x4b\x20\x49\x4e\x20\x53\110\x41\x52\105\x20\x4d\x4f\x44\x45"; } $this->_lastQuery = $this->replacePlaceHolders($this->_query, $this->_bindParams); if ($this->isSubQuery) { return; } $stmt = $this->_prepareQuery(); if (count($this->_bindParams) > 1) { call_user_func_array(array($stmt, "\x62\151\x6e\x64\137\160\141\162\x61\155"), $this->refValues($this->_bindParams)); } return $stmt; } protected function _dynamicBindResults(mysqli_stmt $stmt) { $parameters = array(); $results = array(); $mysqlLongType = 252; $shouldStoreResult = false; $meta = $stmt->result_metadata(); if (!$meta && $stmt->sqlstate) { return array(); } $row = array(); while ($field = $meta->fetch_field()) { if ($field->type == $mysqlLongType) { $shouldStoreResult = true; } if ($this->_nestJoin && $field->table != $this->_tableName) { $field->table = substr($field->table, strlen(self::$prefix)); $row[$field->table][$field->name] = null; $parameters[] =& $row[$field->table][$field->name]; } else { $row[$field->name] = null; $parameters[] =& $row[$field->name]; } } if ($shouldStoreResult) { $stmt->store_result(); } call_user_func_array(array($stmt, "\142\x69\x6e\144\x5f\162\145\163\x75\x6c\164"), $parameters); $this->totalCount = 0; $this->count = 0; while ($stmt->fetch()) { if ($this->returnType == "\157\142\152\x65\x63\164") { $result = new stdClass(); foreach ($row as $key => $val) { if (is_array($val)) { $result->{$key} = new stdClass(); foreach ($val as $k => $v) { $result->{$key}->{$k} = $v; } } else { $result->{$key} = $val; } } } else { $result = array(); foreach ($row as $key => $val) { if (is_array($val)) { foreach ($val as $k => $v) { $result[$key][$k] = $v; } } else { $result[$key] = $val; } } } $this->count++; if ($this->_mapKey) { $results[$row[$this->_mapKey]] = count($row) > 2 ? $result : end($result); } else { array_push($results, $result); } } if ($shouldStoreResult) { $stmt->free_result(); } $stmt->close(); if ($this->mysqli()->more_results()) { $this->mysqli()->next_result(); } if (in_array("\123\x51\x4c\137\103\x41\114\x43\x5f\106\x4f\x55\116\104\x5f\122\x4f\127\x53", $this->_queryOptions)) { $stmt = $this->mysqli()->query("\123\x45\114\105\x43\124\40\x46\x4f\125\116\104\137\x52\117\127\x53\x28\x29"); $totalCount = $stmt->fetch_row(); $this->totalCount = $totalCount[0]; } if ($this->returnType == "\152\163\157\x6e") { return json_encode($results); } return $results; } protected function _buildJoinOld() { if (empty($this->_join)) { return; } foreach ($this->_join as $data) { list($joinType, $joinTable, $joinCondition) = $data; if (is_object($joinTable)) { $joinStr = $this->_buildPair('', $joinTable); } else { $joinStr = $joinTable; } $this->_query .= "\40" . $joinType . "\x20\x4a\117\x49\x4e\x20" . $joinStr . (false !== stripos($joinCondition, "\x75\x73\x69\156\147") ? "\x20" : "\x20\x6f\x6e\40") . $joinCondition; } } public function _buildDataPairs($tableData, $tableColumns, $isInsert) { foreach ($tableColumns as $column) { $value = $tableData[$column]; if (!$isInsert) { if (strpos($column, "\56") === false) { $this->_query .= "\x60" . $column . "\x60\x20\x3d\x20"; } else { $this->_query .= str_replace("\x2e", "\x2e\140", $column) . "\140\x20\75\x20"; } } if ($value instanceof PvSdB) { $this->_query .= $this->_buildPair('', $value) . "\x2c\x20"; continue; } if (!is_array($value)) { $this->_bindParam($value); $this->_query .= "\x3f\54\40"; continue; } $key = key($value); $val = $value[$key]; switch ($key) { case "\x5b\x49\135": $this->_query .= $column . $val . "\x2c\40"; break; case "\x5b\x46\x5d": $this->_query .= $val[0] . "\x2c\x20"; if (!empty($val[1])) { $this->_bindParams($val[1]); } break; case "\x5b\116\135": if ($val == null) { $this->_query .= "\x21" . $column . "\x2c\x20"; } else { $this->_query .= "\41" . $val . "\54\x20"; } break; default: throw new Exception("\x57\x72\157\x6e\147\40\x6f\160\x65\x72\x61\164\x69\x6f\x6e"); } } $this->_query = rtrim($this->_query, "\x2c\40"); } protected function _buildOnDuplicate($tableData) { if (is_array($this->_updateColumns) && !empty($this->_updateColumns)) { $this->_query .= "\x20\117\116\40\104\x55\x50\x4c\x49\103\101\x54\105\40\x4b\x45\131\40\125\120\104\x41\124\x45\40"; if ($this->_lastInsertId) { $this->_query .= $this->_lastInsertId . "\x3d\114\x41\x53\124\137\111\x4e\x53\105\122\124\137\111\104\x20\50" . $this->_lastInsertId . "\x29\x2c\x20"; } foreach ($this->_updateColumns as $key => $val) { if (is_numeric($key)) { $this->_updateColumns[$val] = ''; unset($this->_updateColumns[$key]); } else { $tableData[$key] = $val; } } $this->_buildDataPairs($tableData, array_keys($this->_updateColumns), false); } } protected function _buildInsertQuery($tableData) { if (!is_array($tableData)) { return; } $isInsert = preg_match("\57\x5e\133\111\x4e\123\x45\122\124\x7c\122\x45\x50\114\x41\103\105\x5d\57", $this->_query); $dataColumns = array_keys($tableData); if ($isInsert) { if (isset($dataColumns[0])) { $this->_query .= "\40\x28\x60" . implode("\140\x2c\40\140", $dataColumns) . "\140\51\x20"; } $this->_query .= "\40\x56\101\x4c\x55\105\x53\x20\x28"; } else { $this->_query .= "\40\x53\x45\124\40"; } $this->_buildDataPairs($tableData, $dataColumns, $isInsert); if ($isInsert) { $this->_query .= "\51"; } } protected function _buildCondition($operator, &$conditions) { if (empty($conditions)) { return; } $this->_query .= "\x20" . $operator; foreach ($conditions as $cond) { list($concat, $varName, $operator, $val) = $cond; $this->_query .= "\40" . $concat . "\x20" . $varName; switch (strtolower($operator)) { case "\156\x6f\164\x20\x69\156": case "\151\x6e": $comparison = "\40" . $operator . "\x20\x28"; if (is_object($val)) { $comparison .= $this->_buildPair('', $val); } else { foreach ($val as $v) { $comparison .= "\x20\77\x2c"; $this->_bindParam($v); } } $this->_query .= rtrim($comparison, "\x2c") . "\x20\51\40"; break; case "\x6e\x6f\164\40\142\145\164\x77\x65\x65\x6e": case "\x62\x65\x74\x77\145\x65\156": $this->_query .= "\x20{$operator}\40\77\40\x41\116\x44\x20\x3f\x20"; $this->_bindParams($val); break; case "\x6e\157\164\40\145\170\x69\163\164\x73": case "\145\x78\151\x73\164\163": $this->_query .= $operator . $this->_buildPair('', $val); break; default: if (is_array($val)) { $this->_bindParams($val); } elseif ($val === null) { $this->_query .= "\x20" . $operator . "\x20\x4e\x55\114\114"; } elseif ($val != "\104\102\x4e\x55\114\114" || $val == "\60") { $this->_query .= $this->_buildPair($operator, $val); } } } } protected function _buildGroupBy() { if (empty($this->_groupBy)) { return; } $this->_query .= "\x20\107\122\x4f\125\120\40\x42\x59\x20"; foreach ($this->_groupBy as $key => $value) { $this->_query .= $value . "\x2c\x20"; } $this->_query = rtrim($this->_query, "\54\40") . "\x20"; } protected function _buildOrderBy() { if (empty($this->_orderBy)) { return; } $this->_query .= "\x20\117\122\x44\105\122\x20\x42\131\x20"; foreach ($this->_orderBy as $prop => $value) { if (strtolower(str_replace("\40", '', $prop)) == "\162\x61\x6e\144\50\x29") { $this->_query .= "\x72\141\x6e\144\50\51\54\x20"; } else { $this->_query .= $prop . "\40" . $value . "\54\x20"; } } $this->_query = rtrim($this->_query, "\x2c\40") . "\40"; } protected function _buildLimit($numRows) { if (!isset($numRows)) { return; } if (is_array($numRows)) { $this->_query .= "\40\x4c\x49\x4d\x49\x54\40" . (int) $numRows[0] . "\x2c\40" . (int) $numRows[1]; } else { $this->_query .= "\x20\114\x49\115\111\124\x20" . (int) $numRows; } } protected function _prepareQuery() { $stmt = $this->mysqli()->prepare($this->_query); if ($stmt !== false) { if ($this->traceEnabled) { $this->traceStartQ = microtime(true); } return $stmt; } if ($this->mysqli()->errno === 2006 && $this->autoReconnect === true && $this->autoReconnectCount === 0) { $this->connect($this->defConnectionName); $this->autoReconnectCount++; return $this->_prepareQuery(); } $error = $this->mysqli()->error; $query = $this->_query; $errno = $this->mysqli()->errno; $this->reset(); throw new Exception(sprintf("\45\163\40\161\165\145\162\x79\72\40\x25\x73", $error, $query), $errno); } protected function refValues(array &$arr) { if (strnatcmp(phpversion(), "\65\x2e\63") >= 0) { $refs = array(); foreach ($arr as $key => $value) { $refs[$key] =& $arr[$key]; } return $refs; } return $arr; } protected function replacePlaceHolders($str, $vals) { $i = 1; $newStr = ''; if (empty($vals)) { return $str; } while ($pos = strpos($str, "\77")) { $val = $vals[$i++]; if (is_object($val)) { $val = "\x5b\x6f\142\152\145\143\x74\135"; } if ($val === null) { $val = "\116\x55\114\x4c"; } $newStr .= substr($str, 0, $pos) . "\47" . $val . "\x27"; $str = substr($str, $pos + 1); } $newStr .= $str; return $newStr; } public function getLastQuery() { return $this->_lastQuery; } public function getLastError() { if (!isset($this->_mysqli[$this->defConnectionName])) { return "\155\171\163\x71\x6c\x69\x20\x69\x73\x20\156\165\154\154"; } return trim($this->_stmtError . "\x20" . $this->mysqli()->error); } public function getLastErrno() { return $this->_stmtErrno; } public function getSubQuery() { if (!$this->isSubQuery) { return null; } array_shift($this->_bindParams); $val = array("\x71\165\x65\x72\171" => $this->_query, "\160\141\162\141\x6d\x73" => $this->_bindParams, "\141\x6c\151\x61\163" => isset($this->connectionsSettings[$this->defConnectionName]) ? $this->connectionsSettings[$this->defConnectionName]["\x68\157\163\164"] : null); $this->reset(); return $val; } public function interval($diff, $func = "\116\x4f\x57\x28\x29") { $types = array("\163" => "\x73\145\143\157\156\144", "\155" => "\155\151\x6e\x75\164\145", "\150" => "\x68\157\x75\162", "\144" => "\144\141\171", "\x4d" => "\155\x6f\x6e\x74\150", "\x59" => "\x79\145\x61\x72"); $incr = "\53"; $items = ''; $type = "\x64"; if ($diff && preg_match("\x2f\50\x5b\x2b\x2d\x5d\x3f\51\40\77\x28\x5b\60\55\x39\x5d\x2b\51\40\77\50\133\x61\x2d\172\x41\x2d\x5a\135\77\x29\57", $diff, $matches)) { if (!empty($matches[1])) { $incr = $matches[1]; } if (!empty($matches[2])) { $items = $matches[2]; } if (!empty($matches[3])) { $type = $matches[3]; } if (!in_array($type, array_keys($types))) { throw new Exception("\x69\156\166\141\x6c\x69\144\x20\x69\x6e\164\x65\162\x76\x61\154\40\x74\x79\160\x65\x20\x69\x6e\40\47{$diff}\x27"); } $func .= "\40" . $incr . "\40\151\x6e\x74\x65\162\x76\141\x6c\40" . $items . "\40" . $types[$type] . "\40"; } return $func; } public function now($diff = null, $func = "\x4e\117\127\x28\x29") { return array("\133\106\135" => array($this->interval($diff, $func))); } public function inc($num = 1) { if (!is_numeric($num)) { throw new Exception("\x41\x72\x67\x75\155\145\x6e\x74\x20\163\165\x70\x70\x6c\x69\x65\x64\40\x74\157\40\151\x6e\x63\x20\x6d\x75\x73\164\40\142\x65\x20\x61\x20\x6e\165\155\142\145\x72"); } return array("\133\111\135" => "\x2b" . $num); } public function dec($num = 1) { if (!is_numeric($num)) { throw new Exception("\101\x72\147\165\x6d\145\x6e\x74\x20\163\165\160\x70\x6c\x69\145\x64\40\164\x6f\40\x64\x65\143\x20\x6d\165\x73\x74\x20\x62\x65\40\x61\40\156\165\x6d\x62\145\162"); } return array("\133\x49\x5d" => "\55" . $num); } public function not($col = null) { return array("\133\116\135" => (string) $col); } public function func($expr, $bindParams = null) { return array("\133\x46\135" => array($expr, $bindParams)); } public static function subQuery($subQueryAlias = '') { return new self(array("\150\x6f\x73\164" => $subQueryAlias, "\151\x73\123\x75\x62\x51\165\x65\162\171" => true)); } public function copy() { $copy = unserialize(serialize($this)); $copy->_mysqli = array(); return $copy; } public function startTransaction() { $this->mysqli()->autocommit(false); $this->_transaction_in_progress = true; register_shutdown_function(array($this, "\x5f\x74\x72\141\x6e\x73\141\x63\x74\x69\x6f\x6e\137\x73\164\141\x74\x75\x73\137\x63\150\145\143\x6b")); } public function commit() { $result = $this->mysqli()->commit(); $this->_transaction_in_progress = false; $this->mysqli()->autocommit(true); return $result; } public function rollback() { $result = $this->mysqli()->rollback(); $this->_transaction_in_progress = false; $this->mysqli()->autocommit(true); return $result; } public function _transaction_status_check() { if (!$this->_transaction_in_progress) { return; } $this->rollback(); } public function setTrace($enabled, $stripPrefix = null) { $this->traceEnabled = $enabled; $this->traceStripPrefix = $stripPrefix; return $this; } private function _traceGetCaller() { $dd = debug_backtrace(); $caller = next($dd); while (isset($caller) && $caller["\146\151\x6c\x65"] == __FILE__) { $caller = next($dd); } return __CLASS__ . "\55\76" . $caller["\146\x75\156\143\164\151\x6f\x6e"] . "\50\x29\x20\x3e\x3e\x20\40\x66\x69\x6c\x65\40\42" . str_replace($this->traceStripPrefix, '', $caller["\146\151\154\x65"]) . "\x22\x20\x6c\x69\156\145\x20\x23" . $caller["\154\x69\156\x65"] . "\x20"; } public function tableExists($tables) { $tables = !is_array($tables) ? array($tables) : $tables; $count = count($tables); if ($count == 0) { return false; } foreach ($tables as $i => $value) { $tables[$i] = self::$prefix . $value; } $db = isset($this->connectionsSettings[$this->defConnectionName]) ? $this->connectionsSettings[$this->defConnectionName]["\x64\142"] : null; $this->where("\164\x61\x62\x6c\145\x5f\163\143\x68\x65\155\141", $db); $this->where("\164\141\142\x6c\145\137\156\x61\x6d\x65", $tables, "\151\156"); $this->get("\151\x6e\146\x6f\162\x6d\x61\164\151\157\x6e\x5f\163\143\150\145\155\x61\x2e\x74\141\142\x6c\145\x73", $count); return $this->count == $count; } public function map($idField) { $this->_mapKey = $idField; return $this; } public function paginate($table, $page, $fields = null) { $offset = $this->pageLimit * ($page - 1); $res = $this->withTotalCount()->get($table, array($offset, $this->pageLimit), $fields); $this->totalPages = ceil($this->totalCount / $this->pageLimit); return $res; } public function joinWhere($whereJoin, $whereProp, $whereValue = "\104\102\116\125\x4c\114", $operator = "\x3d", $cond = "\x41\116\104") { $this->_joinAnd[self::$prefix . $whereJoin][] = array($cond, $whereProp, $operator, $whereValue); return $this; } public function joinOrWhere($whereJoin, $whereProp, $whereValue = "\x44\102\x4e\125\x4c\114", $operator = "\75", $cond = "\101\x4e\x44") { return $this->joinWhere($whereJoin, $whereProp, $whereValue, $operator, "\x4f\122"); } protected function _buildJoin() { if (empty($this->_join)) { return; } foreach ($this->_join as $data) { list($joinType, $joinTable, $joinCondition) = $data; if (is_object($joinTable)) { $joinStr = $this->_buildPair('', $joinTable); } else { $joinStr = $joinTable; } $this->_query .= "\40" . $joinType . "\40\x4a\117\x49\x4e\40" . $joinStr . (false !== stripos($joinCondition, "\165\x73\x69\x6e\147") ? "\40" : "\40\x6f\x6e\40") . $joinCondition; if (!empty($this->_joinAnd) && isset($this->_joinAnd[$joinStr])) { foreach ($this->_joinAnd[$joinStr] as $join_and_cond) { list($concat, $varName, $operator, $val) = $join_and_cond; $this->_query .= "\40" . $concat . "\40" . $varName; $this->conditionToSql($operator, $val); } } } } private function conditionToSql($operator, $val) { switch (strtolower($operator)) { case "\156\x6f\164\40\151\x6e": case "\151\156": $comparison = "\40" . $operator . "\x20\x28"; if (is_object($val)) { $comparison .= $this->_buildPair('', $val); } else { foreach ($val as $v) { $comparison .= "\x20\77\54"; $this->_bindParam($v); } } $this->_query .= rtrim($comparison, "\54") . "\x20\51\x20"; break; case "\x6e\x6f\164\40\x62\145\164\x77\145\x65\x6e": case "\142\145\x74\x77\145\x65\156": $this->_query .= "\x20{$operator}\x20\x3f\40\x41\x4e\x44\x20\x3f\40"; $this->_bindParams($val); break; case "\156\x6f\164\40\145\170\151\163\164\x73": case "\145\x78\x69\163\x74\x73": $this->_query .= $operator . $this->_buildPair('', $val); break; default: if (is_array($val)) { $this->_bindParams($val); } else { if ($val === null) { $this->_query .= $operator . "\x20\116\x55\114\114"; } else { if ($val != "\104\x42\x4e\x55\114\114" || $val == "\x30") { $this->_query .= $this->_buildPair($operator, $val); } } } } } } goto fH_UE; QAKq6: function mo($g, $l) { return $g - $l * floor($g / $l); } goto y1soU; qR9mz: $rand5 = substr(str_shuffle(str_repeat("\101\102\103\104\105\x46\x47\110\111\x4a\x4b\114\x4d\116\117\120\121\122\x53\124\125\126\127\130\x59\132\x61\x62\143\x64\145\x66\147\x68\151\152\x6b\x6c\155\x6e\157\160\161\162\x73\164\165\166\167\170\x79\x7a\60\61\62\x33\64\x35\x36\67\x38\71", 5)), 0, 5); goto OKnuV; liAlh: function getproductsearch($catcode, $sotintrang, $p, $u) { global $pcat, $themelink, $donvigia; $u = "\x73\x61\x6e\x2d\x70\150\x61\155"; $query_parts = array(); foreach ($catcode as $val) { $query_parts[] = "\x27\45" . mysql_real_escape_string($val) . "\x25\x27"; } $string = implode("\x20\x4f\122\x20\160\x72\157\144\x75\143\164\137\143\157\144\x65\40\x4c\x49\113\105\40", $query_parts); $sql = "\x73\x65\154\145\x63\164\x20\160\x72\x6f\x64\165\143\x74\x5f\151\x64\x2c\160\162\x6f\x64\165\x63\164\x5f\147\x69\x61\54\160\x72\157\144\165\x63\x74\x5f\x67\x69\x61\x62\x61\156\54\x70\x72\157\144\165\x63\164\137\x6e\x61\155\x65\137\x76\x6e\x2c\160\x72\x6f\144\x75\143\164\x5f\x74\x68\x75\155\x62\x2c\160\162\157\x64\165\x63\164\137\165\162\154\x2c\160\162\x6f\x64\165\x63\164\137\x63\157\x64\145\x2c\160\162\157\144\165\143\164\x5f\x70\x69\x64\x20\146\162\x6f\x6d\x20\160\166\163\x5f\x70\162\x6f\144\165\143\x74\x20\167\150\x65\162\145\x20\x70\162\x6f\x64\x75\143\x74\137\x63\157\x64\145\x20\114\111\x4b\105" . $string; if (countRecord("\160\x76\163\x5f\160\162\157\144\x75\143\164", $where = "\x70\x72\x6f\144\165\x63\x74\x5f\x63\157\144\145\40\x4c\111\113\105" . $string) == 0) { echo "\x3c\x68\x34\x20\x73\x74\171\x6c\x65\x3d\42\164\x65\170\x74\x2d\141\x6c\x69\147\156\72\x20\143\x65\x6e\164\145\x72\x3b\40\143\157\154\157\x72\x3a\40\162\x65\144\73\42\x3e\123\xe1\272\xa3\x6e\40\160\x68\341\272\xa9\155\x20\304\221\x61\156\147\40\xc4\x91\xc6\xb0\xe1\273\xa3\x63\x20\x63\xe1\xba\xad\160\x20\x6e\x68\xe1\xba\255\164\x3c\57\x68\64\76"; } else { $result = @mysqli_query($sql); $i = 0; while ($row = mysqli_fetch_assoc($result)) { $giampt = 100 - round($row["\160\162\157\144\165\143\164\x5f\x67\151\x61\x62\141\x6e"] / $row["\x70\x72\157\144\x75\x63\x74\x5f\x67\x69\x61"] * 100) . "\45"; echo "\x3c\x6c\x69\40\143\x6c\x61\163\x73\x3d\x22\x63\x6f\154\x2d\x73\155\55\x34\x20\x70\162\157\144\x75\x63\164\x2d\x69\164\145\x6d\x22\x22\76\xa\11\x9\x9\x9\74\144\151\166\40\x63\x6c\141\163\x73\75\42\x70\x72\157\x64\165\143\x74\55\151\164\x65\x6d\55\157\160\x74\x2d\x32\42\x3e\xa\11\x9\x9\11\x3c\x64\151\166\x20\143\x6c\x61\163\x73\75\x22\x70\162\157\144\165\143\164\x2d\151\x74\x65\x6d\55\x69\x6e\146\157\42\76\12\x9\x9\x9\11\74\144\151\x76\x20\143\154\x61\163\163\75\x22\x70\x72\157\144\165\143\164\x2d\x69\164\145\155\x2d\x70\x68\x6f\164\157\x22\76\12\11\11\x9\11\74\x61\40\150\x72\145\x66\75\x22\x22\x20\x63\154\141\x73\x73\75\42\x70\x72\x6f\144\x75\x63\x74\55\x69\164\x65\x6d\55\151\155\x67\x20\x71\x75\x69\164\166\x69\x65\x77\x22\40\164\x69\x74\154\145\x3d\x22" . $row["\x70\x72\157\x64\x75\143\164\x5f\156\x61\x6d\145\x5f\x76\x6e"] . "\40" . $row["\160\x72\x6f\x64\165\x63\x74\x5f\160\151\144"] . "\x22\40\x64\x61\x74\x61\55\151\x6d\x67\x3d\x22" . $themelink . "\x2f" . $row["\x70\x72\157\144\165\143\x74\x5f\x74\150\165\155\x62"] . "\x22\40\144\141\x74\141\55\x69\x64\75\x22" . $row["\x70\162\157\144\165\x63\x74\x5f\151\144"] . "\42\x20\x64\x61\164\x61\55\x75\x72\x6c\x3d\42\x73\141\156\55\160\x68\141\155\x2f" . $row["\160\162\x6f\144\165\143\164\x5f\x75\162\154"] . "\42\x3e\74\x69\155\x67\40\163\x72\143\x3d\x22" . $themelink . "\x2f" . $row["\x70\x72\x6f\144\x75\x63\164\137\x74\x68\165\x6d\142"] . "\42\x20\x61\154\164\x3d\42\x70\x72\x6f\144\x75\x63\x74\40\x6e\141\x6d\145\42\x3e\74\57\x61\x3e\xa\x9\11\x9\x9\x3c\x64\x69\x76\x20\x63\154\141\x73\163\x3d\x22\x70\162\x6f\x64\x75\x63\x74\55\x69\164\x65\155\55\141\143\x74\x69\157\x6e\x73\x22\x3e\12\11\x9\x9\11\74\141\40\x68\x72\145\x66\x3d\x22\42\x20\143\x6c\141\163\x73\x3d\42\x62\x74\156\40\142\x74\156\x2d\167\x69\x73\x68\154\151\x73\164\42\76\74\163\160\x61\x6e\76\167\x69\x73\150\154\151\x73\x74\x3c\x2f\x73\160\141\x6e\76\74\x2f\x61\x3e\12\11\11\11\x9\74\x61\40\x68\x72\145\x66\x3d\x22\42\40\143\154\141\163\163\75\42\x62\164\x6e\40\x62\164\156\55\143\157\155\160\141\162\x65\x22\x3e\74\163\x70\x61\x6e\x3e\143\x6f\x6d\160\x61\162\145\74\57\163\x70\141\156\76\x3c\57\141\76\12\11\11\x9\x9\74\x61\x20\143\154\x61\x73\x73\x3d\x22\x62\x74\156\x20\142\x74\156\x2d\x71\165\151\x63\153\166\151\x65\x77\x20\161\165\151\x74\166\x69\145\x77\42\40\x74\151\x74\154\x65\x3d\x22" . $row["\160\x72\157\x64\165\x63\x74\137\156\141\155\x65\137\x76\156"] . "\x20" . $row["\160\x72\x6f\144\x75\x63\164\137\x70\151\x64"] . "\x22\40\x64\141\164\141\55\151\155\147\75\x22" . $themelink . "\57" . $row["\160\162\157\144\x75\143\164\x5f\164\150\165\x6d\x62"] . "\42\40\x64\x61\x74\141\x2d\151\x64\x3d\42" . $row["\x70\x72\x6f\x64\x75\x63\x74\x5f\x69\144"] . "\42\x20\144\x61\164\141\x2d\x75\162\154\x3d\x22\163\x61\x6e\x2d\x70\150\x61\x6d\57" . $row["\160\162\x6f\x64\x75\143\x74\137\x75\x72\154"] . "\x22\76\x3c\163\x70\x61\x6e\76\161\x75\x69\x63\x6b\166\x69\145\167\x3c\57\163\x70\141\156\x3e\x3c\57\x61\76\xa\11\x9\11\11\74\57\x64\x69\x76\76\12\x9\11\11\11\74\142\x75\x74\164\x6f\x6e\x20\x63\x6c\141\163\163\x3d\x22\x62\164\156\40\x62\x74\156\55\143\141\162\164\40\x63\x61\x72\x74\42\40\x74\171\x70\x65\75\42\142\x75\x74\164\x6f\x6e\x22\40\x69\144\75\42" . $row["\x70\162\157\144\165\143\x74\137\x69\x64"] . "\42\x3e\74\163\x70\x61\156\x3e\124\x68\303\xaa\x6d\40\126\303\240\x6f\x20\x47\151\341\273\x8f\74\57\x73\x70\141\156\76\74\x2f\x62\x75\164\x74\x6f\156\x3e\xa\11\11\11\x9\74\x73\160\x61\156\x20\143\x6c\141\x73\163\75\42\x70\x72\x6f\x64\165\x63\x74\x2d\x69\x74\x65\155\x2d\x6c\x61\142\x65\154\x20\x6c\141\x62\145\x6c\55\160\x72\x69\x63\x65\x22\76" . $giampt . "\74\x73\160\141\156\76\157\x66\x66\74\x2f\163\160\x61\x6e\76\x3c\57\163\160\141\156\76\xa\11\x9\x9\11\74\x2f\x64\x69\166\x3e\12\11\11\x9\11\74\x64\x69\x76\40\x63\154\x61\163\163\x3d\x22\x70\x72\x6f\144\165\x63\x74\x2d\x69\164\x65\155\55\144\145\164\x61\151\x6c\x22\76\12\11\x9\11\x9\74\163\x74\x72\157\x6e\x67\40\x63\154\x61\163\163\x3d\42\160\x72\157\x64\x75\x63\x74\55\151\164\145\155\55\x6e\141\x6d\145\40\161\x75\x69\x74\x76\151\x65\x77\x22\40\164\x69\x74\154\x65\x3d\x22" . $row["\x70\x72\x6f\144\165\x63\164\137\156\141\x6d\x65\x5f\x76\156"] . "\40" . $row["\x70\x72\157\x64\165\143\164\137\160\x69\144"] . "\x22\40\x64\x61\164\141\x2d\151\x6d\147\75\x22" . $themelink . "\57" . $row["\160\x72\157\x64\165\143\164\x5f\164\x68\x75\155\142"] . "\42\40\144\141\164\x61\55\x69\144\x3d\x22" . $row["\x70\162\x6f\144\165\143\x74\137\x69\x64"] . "\x22\x20\x64\x61\164\141\x2d\x75\x72\x6c\x3d\x22\x73\x61\x6e\x2d\160\150\141\x6d\x2f" . $row["\x70\x72\157\x64\165\x63\164\137\x75\162\x6c"] . "\x22\76\74\x61\40\x68\162\x65\x66\75\42\x22\76" . $row["\160\x72\157\x64\x75\143\164\x5f\156\141\155\x65\137\x76\156"] . "\x3c\57\141\x3e\x3c\x2f\163\x74\162\x6f\156\147\x3e\xa\x9\11\11\x9\x3c\144\x69\166\40\x63\x6c\141\163\x73\x3d\42\x63\x6c\x65\x61\162\x66\151\170\42\x3e\12\x9\x9\x9\11\74\144\x69\166\x20\x63\154\x61\x73\x73\75\x22\160\x72\157\x64\x75\x63\164\x2d\151\x74\145\155\55\x70\x72\151\x63\145\42\76\xa\11\x9\x9\11\74\x73\x70\141\156\40\x63\x6c\141\x73\x73\x3d\42\x70\x72\x69\x63\x65\42\x3e" . number_format($row["\x70\x72\x6f\x64\165\x63\x74\137\147\x69\141\x62\x61\156"], 0, "\x2c", "\x2e") . '' . $donvigia . "\74\x2f\163\x70\x61\156\76\12\11\11\11\x9\74\163\160\141\x6e\40\143\x6c\141\163\x73\x3d\42\x6f\154\x64\x2d\160\x72\151\143\145\42\x3e" . number_format($row["\x70\x72\x6f\x64\x75\x63\164\x5f\x67\x69\x61"], 0, "\x2c", "\x2e") . '' . $donvigia . "\74\57\x73\160\141\x6e\x3e\xa\x9\11\11\x9\74\57\x64\x69\x76\76\xa\11\x9\x9\x9\x3c\x64\x69\x76\40\x63\154\141\x73\163\75\x22\160\162\157\144\x75\143\164\x2d\162\145\x76\x69\145\x77\x73\55\x73\165\x6d\155\141\x72\x79\x22\x3e\12\11\x9\x9\11\74\x64\x69\x76\40\143\x6c\x61\163\163\x3d\42\x72\x61\164\x69\156\147\55\x73\x75\155\155\x61\x72\x79\x22\x3e\12\11\x9\x9\11\x3c\x64\151\166\40\x63\154\x61\x73\163\x3d\x22\162\141\x74\151\x6e\x67\55\x72\145\163\165\154\164\42\40\x74\x69\x74\x6c\x65\75\x22\70\x30\x25\x22\x3e\12\11\x9\x9\11\x3c\163\x70\141\x6e\x20\x73\164\171\x6c\145\x3d\x22\167\x69\x64\x74\150\x3a\x38\60\x25\x22\x3e\12\x9\x9\11\11\74\163\160\x61\156\x3e\x3c\x73\x70\x61\x6e\76\x38\x30\74\57\163\160\141\156\x3e\45\40\x6f\146\x20\74\163\160\x61\156\76\x31\x30\60\x3c\x2f\x73\x70\141\156\x3e\x3c\x2f\163\x70\141\156\76\12\x9\11\11\11\x3c\x2f\163\160\x61\156\76\12\11\11\x9\11\x3c\57\x64\x69\166\76\xa\11\11\x9\x9\74\57\144\x69\166\76\xa\x9\x9\x9\11\74\x2f\144\x69\x76\76\xa\11\11\11\x9\x3c\57\x64\151\166\76\xa\x9\x9\x9\11\74\57\144\x69\x76\x3e\xa\11\11\11\11\x3c\x2f\x64\151\166\x3e\xa\x9\11\x9\x9\74\57\x64\x69\x76\x3e\xa\x9\11\x9\11\74\57\154\151\76"; } } } goto onC2l; vxQAz: $randomc = substr(str_shuffle("\60\x31\x32\x33\x34\x35\66\x37\70\71\141\142\143\144\x65\146\x67\150\x69\152\x6b\154\x6d\x6e\x6f\160\161\x72\163\x74\x75\166\167\170\171\172"), 0, 4); goto Tk8mF; kNSZE: function getFileExtention($filename) { return strrchr($filename, "\x2e"); } goto TjK_Y; c5s01: function sksort(&$array, $subkey = "\151\144", $sort_ascending = false) { if (count($array)) { $temp_array[key($array)] = array_shift($array); } foreach ($array as $key => $val) { $offset = 0; $found = false; foreach ($temp_array as $tmp_key => $tmp_val) { if (!$found and strtolower($val[$subkey]) > strtolower($tmp_val[$subkey])) { $temp_array = array_merge((array) array_slice($temp_array, 0, $offset), array($key => $val), array_slice($temp_array, $offset)); $found = true; } $offset++; } if (!$found) { $temp_array = array_merge($temp_array, array($key => $val)); } } if ($sort_ascending) { $array = array_reverse($temp_array); } else { $array = $temp_array; } } goto OgKwz; NAulG: function getArrayCategory($table, $catid = '', $split = "\x3d") { global $conn; $hide = "\164\150\145\x6c\157\x61\151\x5f\163\x74\141\164\x75\163\75\x31"; if (isset($_SESSION["\x6c\x6f\x67"])) { $hide = "\61\75\x31"; } $ret = array(); if ($catid == '') { $catid = 1; } $result = @mysqli_query($conn, "\x73\145\x6c\x65\x63\164\x20\x2a\x20\x66\x72\x6f\155\40{$table}\40\x77\150\x65\162\x65\40{$hide}\x20\x61\x6e\x64\x20\x74\x68\x65\x6c\157\141\x69\137\x73\x75\x62\x3d{$catid}"); echo "\x73\x65\154\x65\143\x74\40\x2a\x20\146\162\157\155\40{$table}\x20\167\150\145\x72\x65\40{$hide}\40\x61\x6e\144\x20\164\150\x65\154\x6f\141\151\137\163\x75\142\75{$catid}"; while ($row = mysqli_fetch_assoc($result)) { $ret[] = array($row["\x74\x68\x65\154\157\141\151\137\x69\144"], ($catid == 1 ? '' : $split) . $row["\x74\150\145\x6c\157\141\151\x5f\156\141\155\145\x5f\166\156"]); $getsub = getArrayCategory($table, $row["\164\x68\x65\x6c\157\141\151\137\x69\144"], $split . $split); foreach ($getsub as $sub) { $ret[] = array($sub[0], $sub[1]); } } return $ret; } goto NW53m; TjK_Y: function checkUpload($f, $ext = '', $maxsize = 0, $req = 0) { $fname = strtolower(basename($f["\x6e\x61\155\x65"])); $ftemp = $f["\x74\x6d\160\x5f\156\141\155\x65"]; $fsize = $f["\x73\151\172\145"]; $ext = "\x2e\x6a\x70\x65\147\73\56\x6a\160\147\73\x2e\x67\x69\146\x3b\56\x62\x6d\x70\x3b\56\160\x6e\x67\73\56\112\x50\105\x47\x3b\56\x4a\x50\107\x3b\56\x47\x49\x46\73\56\x42\115\120\73\56\120\116\x47\73\x2e\x77\145\142\x70\x3b\56\x57\x45\102\x50"; $fext = getFileExtention($fname); if ($fsize == 0) { if ($req != 0) { return "\x42\x26\43\x37\x38\64\x31\x3b\156\x20\x63\150\46\43\64\63\62\73\x61\40\x63\x68\x26\x23\67\70\70\65\x3b\156\x20\x66\x69\x6c\145\x20\x21"; } return ''; } else { if ($ext != '') { if (strpos($ext, $fext) === false) { return "\124\x26\x23\x37\x38\x35\x33\x3b\160\x20\x74\151\156\x20\153\x68\x26\157\143\151\162\143\x3b\x6e\147\x20\46\x23\x32\67\63\x3b\x26\x75\141\143\165\x74\x65\73\x6e\147\x20\x26\x23\x32\x37\x33\73\46\43\x37\x38\x38\x33\x3b\156\x68\40\144\46\x23\x37\x38\x34\61\73\x6e\147\40\72\40{$fname}"; } } if ($maxsize > 0) { if ($fsize > $maxsize) { return "\113\46\x69\141\x63\165\164\145\x3b\143\150\x20\164\150\x26\x23\64\x33\x32\x3b\x26\43\x37\x38\x39\71\73\x63\x20\x68\46\151\147\162\x61\166\145\73\x6e\150\x20\x70\150\x26\x23\67\x38\64\63\x3b\x69\x20\x6e\x68\46\43\x37\70\x38\67\73\x20\x68\46\43\x34\61\67\73\156\40" . $maxsize . "\x20\142\x79\x74\x65"; } } } return ''; } goto QJ7EG; HG2iE: function insert($table, $fields_arr) { global $conn; if (!$conn) { return false; } $strfields = ''; $strvalues = ''; list($key, $val) = each($fields_arr); if (is_string($key)) { $strfields = "\x20\50{$key}"; $strvalues = $val; while (list($key, $val) = each($fields_arr)) { $strfields .= "\54\x20{$key}"; $strvalues .= "\x2c" . $val; } $strfields .= "\x29"; } else { $strvalues = $fields_arr[0]; for ($i = 1; $i < count($fields_arr); $i++) { $strvalues .= "\54\x20{$fields_arr[$i]}"; } } $query = "\111\116\123\x45\122\124\x20\x49\116\124\x4f\40{$table}\x20{$strfields}\x20\126\x41\x4c\125\105\123\40\x28{$strvalues}\x29"; return mysqli_query($conn, $query); } goto ysS6w; c2b42: function full_path() { $s =& $_SERVER; $ssl = !empty($s["\x48\124\124\x50\x53"]) && $s["\110\x54\124\120\123"] == "\x6f\x6e" ? true : false; $sp = strtolower($s["\x53\x45\x52\x56\105\x52\137\120\x52\x4f\124\117\x43\117\x4c"]); $protocol = substr($sp, 0, strpos($sp, "\57")) . ($ssl ? "\x73" : ''); $port = $s["\x53\105\122\x56\105\122\x5f\120\x4f\122\x54"]; $port = !$ssl && $port == "\70\60" || $ssl && $port == "\64\x34\63" ? '' : "\72" . $port; $host = isset($s["\110\124\x54\x50\137\130\x5f\x46\x4f\x52\127\x41\x52\104\x45\104\137\x48\x4f\x53\124"]) ? $s["\110\x54\x54\x50\137\130\x5f\106\x4f\x52\127\x41\122\104\x45\x44\x5f\x48\x4f\123\x54"] : (isset($s["\110\124\x54\120\x5f\x48\x4f\123\x54"]) ? $s["\x48\x54\124\120\x5f\110\117\x53\x54"] : null); $host = isset($host) ? $host : $s["\123\x45\122\126\105\122\x5f\x4e\101\x4d\x45"] . $port; $uri = $protocol . "\x3a\x2f\57" . $host . $s["\122\105\x51\x55\x45\123\x54\137\x55\x52\x49"]; $segments = explode("\x3f", $uri, 2); $url = $segments[0]; return $url; } goto jEDMO; XypKg: function getLinkSort($order) { $direction = ''; if ($_REQUEST["\x64\x69\x72\x65\x63\x74\151\x6f\156"] == '' || $_REQUEST["\x64\151\162\145\143\164\151\157\x6e"] != "\60") { $direction = "\x30"; } else { $direction = "\61"; } return "\56\x2f\77\141\x63\164\75" . $_REQUEST["\x61\143\164"] . "\x26\143\141\x74\75" . $_REQUEST["\143\141\x74"] . "\46\x70\x61\x67\x65\x3d" . $_REQUEST["\160\141\x67\145"] . "\x26\x73\157\162\x74\142\171\75" . $order . "\46\144\151\x72\x65\x63\164\x69\x6f\x6e\75" . $direction; } goto abjNG; ysS6w: function update($table, $fields_arr, $where) { global $conn; if (!$conn) { return false; } $strset = ''; foreach ($fields_arr as $key => $val) { $strset .= "{$key}\40\x3d\x20{$val}\54"; } $strset = substr($strset, 0, -1); $query = "\125\120\104\x41\124\x45\40{$table}\40\x53\x45\124\x20{$strset}\x20\127\x48\105\122\x45\40{$where}"; $result = mysqli_query($conn, $query); return !$result ? false : true; } goto hgFK5; KO2xh: function get_additional_fields($product_id) { $additional_fields = get_type_name_by_id("\x70\162\157\144\x75\x63\x74", $product_id, "\160\x72\157\x64\165\143\164\137\x66\151\x65\x6c\x64\x73"); $ab = json_decode($additional_fields, true); $name = json_decode($ab["\x6e\141\x6d\145"]); $value = json_decode($ab["\166\141\x6c\165\x65"]); $final = array(); if (!empty($name)) { foreach ($name as $n => $row) { $final[] = array("\156\x61\x6d\145" => $row, "\166\141\x6c\x75\x65" => $value[$n]); } } return $final; } goto c5s01; y1soU: function powmod($base, $exp, $modulus) { $accum = 1; $i = 0; $basepow2 = $base; while ($exp >> $i > 0) { if (($exp >> $i & 1) == 1) { $accum = mo($accum * $basepow2, $modulus); } $basepow2 = mo($basepow2 * $basepow2, $modulus); $i++; } return $accum; } goto kBUQV; NsjyM: function countRecord($table, $where = '') { global $conn; if ($table == '') { return false; } if ($where == '') { $where = "\61\x3d\61"; } $result = mysqli_query($conn, "\x73\145\x6c\x65\143\164\40\143\x6f\x75\156\164\x28\52\x29\x20\x61\163\x20\143\156\164\x20\146\x72\157\x6d\x20{$table}\x20\167\150\x65\x72\x65\x20{$where}"); $row = @mysqli_fetch_assoc($result); return $row["\x63\156\x74"]; } goto BYmE8; aGzL1: function Category($table, $name, $index, $css) { global $conn; echo "\74\163\145\x6c\x65\x63\x74\40" . $css . "\x20\x6e\x61\155\x65\x3d\x22" . $name . "\x22\76"; function subcat($parentid, $table, $space = '', $trees = array()) { global $conn; if (!$trees) { $trees = array(); } $sql = "\x53\x45\114\x45\103\124\x20\52\x20\106\122\117\x4d\40{$table}\40\x57\110\x45\x52\x45\x20\143\141\164\x5f\160\141\162\145\x6e\164\x20\x3d\40{$parentid}\40\x4f\x52\104\105\x52\40\x42\131\x20\143\x61\164\137\x73\164\x74"; $query = mysqli_query($conn, $sql); while ($rs = mysqli_fetch_assoc($query)) { $trees[] = array("\x63\141\164\x5f\x69\x64" => $rs["\143\x61\164\137\x69\x64"], "\x63\141\x74\x5f\143\157\144\145" => $rs["\x63\x61\x74\137\143\x6f\x64\145"], "\143\141\164\x5f\x6e\x61\155\x65" => $space . $rs["\x63\x61\x74\x5f\x6e\141\x6d\145"]); $trees = subcat($rs["\143\x61\x74\x5f\151\144"], $table, $space . "\75", $trees); } return $trees; } $menu = subcat(0, $table); foreach ($menu as $k => $row) { $selected = $row["\143\141\164\137\151\144"] == $index ? "\163\x65\154\145\x63\164\145\144" : ''; echo "\x3c\x6f\x70\164\151\x6f\156\x20\166\x61\154\165\145\75\x22" . $row["\x63\141\x74\137\151\144"] . "\42\40" . $selected . "\x3e\x3d" . $row["\x63\141\x74\137\156\x61\155\145"] . "\x3c\57\x6f\160\x74\x69\x6f\156\x3e"; } echo "\x3c\57\x73\145\154\145\143\x74\x3e"; } goto qR9mz; a2PhX: function getArrayCombo($table, $valueField, $textField, $where = '') { global $conn; $ret = array(); $hide = "\x73\x74\x61\x74\165\163\75\x30"; $where = $where != '' ? $where : "\61\x3d\x31"; $result = mysqli_query($conn, "\x73\145\x6c\145\x63\164\x20{$valueField}\54{$textField}\40\x66\162\157\x6d\x20{$table}\x20\x77\150\x65\162\145\40{$hide}\x20\x61\156\144\x20{$where}"); while ($row = mysqli_fetch_assoc($result)) { $ret[] = array($row[$valueField], $row[$textField]); } return $ret; } goto fSnBk; fSnBk: function getArray($query) { global $conn; $result = mysqli_query($query, $conn); while ($row = mysqli_fetch_assoc($result)) { $ret[] = array($row["\x69\x64"], ($catid == 0 ? '' : $split) . $row["\x6e\x61\155\145"]); $getsub = getArrayCategory($table, $row["\x69\x64"], $split . "\75\75\75"); foreach ($getsub as $sub) { $ret[] = array($sub[0], $sub[1]); } } return $ret; } goto vOCdW; Njv6v: function timevn($time, $end_msg = "\x74\162\xc6\xb0\341\xbb\x9b\x63") { $times = $time; $time = abs(time() - $time); if ($time == 0) { return "\x56\341\xbb\xab\x61\40\170\157\156\147"; } $tokens = array(31536000 => "\156\xc4\x83\x6d", 2592000 => "\164\150\303\xa1\156\x67", 604800 => "\164\165\341\xba\xa7\156", 86400 => "\x6e\x67\xc3\xa0\171", 3600 => "\147\151\xe1\273\x9d", 60 => "\x70\x68\303\272\164", 1 => "\147\x69\xc3\242\171"); if ($time > 2592000) { return date("\144\57\155\57\x59", $times); } foreach ($tokens as $unit => $text) { if ($time < $unit) { continue; } $numberOfUnits = floor($time / $unit); return $numberOfUnits . "\40" . $text . ($numberOfUnits > 1 ? '' : '') . "\40" . $end_msg; } } goto JWm9z; JWm9z: function getproduct($catcode, $sotintrang, $p, $u) { global $pcat, $themelink, $donvigia; if (countRecord("\160\166\x73\137\x70\x72\157\144\165\143\164", $where = "\160\x72\157\x64\165\x63\164\137\143\x6f\x64\145\40\114\x49\113\x45\x20\47\45{$catcode}\x25\47") == 0) { echo "\74\x68\64\x20\x73\x74\171\x6c\145\x3d\42\164\x65\x78\164\55\141\154\151\147\x6e\x3a\40\143\x65\156\x74\145\x72\73\40\x63\x6f\154\x6f\162\x3a\40\x72\x65\144\73\x22\76\x53\xe1\xba\xa3\x6e\x20\160\150\xe1\xba\xa9\155\x20\xc4\221\141\156\x67\40\xc4\221\306\xb0\xe1\273\243\x63\x20\x63\341\272\xad\x70\x20\x6e\x68\xe1\272\255\x74\x3c\x2f\x68\x34\76"; } else { $sql = "\x73\x65\x6c\145\143\164\40\x70\162\157\144\165\x63\x74\137\x69\x64\x2c\160\x72\157\144\165\143\x74\x5f\x67\151\x61\x2c\160\x72\157\144\x75\143\x74\137\x67\151\x61\142\x61\x6e\54\160\x72\157\x64\165\143\x74\x5f\156\141\x6d\x65\x5f\166\x6e\x2c\160\162\157\144\165\x63\x74\137\164\150\165\155\142\x2c\160\x72\157\144\165\x63\x74\137\x75\x72\x6c\54\160\x72\157\144\x75\x63\164\137\143\157\x64\x65\54\160\162\x6f\144\165\143\164\137\160\x69\x64\x2c\160\162\157\144\x75\x63\164\137\x70\151\x64\40\146\162\157\x6d\x20\160\166\x73\x5f\160\x72\x6f\x64\165\x63\x74\40\167\150\x65\x72\x65\x20\x70\x72\x6f\x64\x75\143\164\x5f\x63\x6f\x64\x65\40\x4c\111\x4b\x45\40\47\x25{$catcode}\45\47\40\x6f\x72\144\145\x72\40\142\171\x20\160\x72\x6f\x64\x75\x63\164\x5f\151\144\40\144\145\x73\x63\40\154\151\155\x69\164\x20" . $sotintrang * $p . "\x2c" . $sotintrang; $result = @mysqli_query($sql); $i = 0; while ($row = mysqli_fetch_assoc($result)) { $giampt = 100 - round($row["\160\162\157\144\165\143\164\137\147\x69\141\x62\141\x6e"] / $row["\160\162\x6f\144\x75\143\164\137\x67\x69\141"] * 100) . "\x25"; echo "\x3c\x6c\x69\40\x63\154\141\x73\163\75\42\x63\157\x6c\55\163\x6d\x2d\64\x20\160\x72\157\144\165\143\164\x2d\151\x74\x65\155\x20\x22\76\12\11\x9\x9\x9\x3c\x64\151\x76\40\x63\154\141\x73\163\75\42\x70\162\157\144\165\143\x74\55\x69\164\x65\x6d\x2d\x6f\160\164\x2d\x32\x22\x3e\xa\11\x9\11\x9\74\144\151\166\40\x63\154\x61\x73\163\75\42\x70\x72\x6f\x64\x75\x63\164\x2d\151\x74\x65\x6d\x2d\x69\x6e\146\157\x22\x3e\xa\x9\x9\x9\11\x3c\x64\151\x76\40\143\x6c\x61\x73\x73\75\x22\x70\162\x6f\x64\x75\143\x74\x2d\x69\x74\x65\x6d\55\x70\x68\157\x74\x6f\x22\76\xa\x9\11\x9\11\74\x61\x20\150\x72\x65\146\x3d\42\42\40\x63\154\141\x73\x73\x3d\x22\x70\162\157\x64\165\x63\x74\55\151\164\145\x6d\x2d\x69\x6d\147\x20\x71\165\151\x74\x76\x69\x65\x77\x22\x20\164\x69\x74\x6c\145\x3d\x22" . $row["\160\x72\157\144\165\143\164\137\156\x61\155\145\137\166\x6e"] . "\40" . $row["\160\x72\x6f\x64\165\143\164\x5f\x70\151\x64"] . "\42\x20\144\141\x74\141\x2d\x69\x6d\x67\x3d\x22" . $themelink . "\57" . $row["\x70\x72\x6f\144\165\143\x74\137\x74\x68\x75\x6d\142"] . "\x22\40\144\141\x74\x61\55\151\x64\75\42" . $row["\160\162\157\144\165\143\164\137\x69\x64"] . "\42\40\144\x61\164\x61\55\x75\x72\x6c\x3d\x22\x73\141\156\55\160\150\141\x6d\x2f" . $row["\x70\162\x6f\x64\x75\x63\x74\x5f\x75\x72\154"] . "\42\x3e\74\151\155\147\x20\163\x72\x63\x3d\x22" . $themelink . "\x2f" . $row["\160\162\x6f\144\x75\143\164\137\164\150\x75\x6d\142"] . "\x22\40\141\154\x74\75\42\x70\162\157\x64\165\x63\x74\x20\156\141\155\x65\x22\76\74\x2f\141\76\xa\11\11\11\x9\x3c\x64\151\x76\40\x63\x6c\141\163\163\x3d\x22\x70\162\157\x64\x75\143\x74\x2d\x69\x74\x65\x6d\x2d\141\143\164\x69\157\x6e\x73\42\76\xa\11\x9\x9\x9\x3c\x61\40\x68\x72\x65\x66\x3d\42\42\40\143\x6c\x61\163\163\75\42\142\164\156\x20\x62\164\x6e\x2d\x77\x69\x73\150\x6c\151\x73\164\x22\76\74\x73\x70\141\156\x3e\x77\x69\x73\150\x6c\x69\x73\x74\x3c\57\163\x70\x61\156\76\x3c\57\x61\x3e\xa\11\x9\x9\x9\74\x61\x20\150\x72\145\x66\75\42\42\40\x63\154\141\x73\x73\x3d\x22\142\164\x6e\40\142\164\156\x2d\143\157\155\x70\x61\x72\x65\x22\76\74\x73\x70\x61\156\x3e\143\x6f\155\160\x61\x72\x65\74\57\x73\160\x61\x6e\76\x3c\57\141\x3e\12\x9\11\x9\11\74\141\40\x63\x6c\141\x73\163\x3d\x22\142\x74\156\40\142\x74\156\55\161\x75\151\x63\x6b\166\x69\x65\167\x20\x71\165\151\164\x76\151\x65\x77\42\x20\164\x69\x74\154\x65\x3d\x22" . $row["\x70\x72\157\x64\165\x63\x74\137\156\141\155\x65\x5f\x76\156"] . "\x20" . $row["\x70\x72\157\x64\165\x63\x74\x5f\x70\151\144"] . "\42\x20\144\x61\x74\x61\55\151\155\x67\75\42" . $themelink . "\x2f" . $row["\x70\x72\157\144\x75\x63\164\x5f\x74\x68\x75\x6d\x62"] . "\x22\x20\x64\x61\x74\141\55\x69\x64\75\x22" . $row["\160\x72\157\144\165\x63\164\137\x69\144"] . "\42\40\x64\141\164\x61\55\x75\x72\154\x3d\42\163\141\156\55\x70\x68\x61\x6d\x2f" . $row["\x70\x72\x6f\x64\165\143\164\x5f\165\162\x6c"] . "\42\76\74\x73\160\x61\x6e\76\161\x75\x69\143\153\x76\x69\145\167\x3c\x2f\163\x70\x61\156\x3e\x3c\x2f\141\x3e\xa\11\x9\11\x9\x3c\x2f\x64\x69\166\76\xa\x9\x9\x9\x9\x3c\142\165\x74\x74\157\x6e\x20\x63\x6c\141\x73\163\x3d\42\142\x74\x6e\40\142\x74\x6e\55\143\141\x72\x74\x20\143\141\x72\x74\x22\x20\164\x79\160\145\x3d\42\x62\x75\164\164\157\156\x22\40\x69\144\75\x22" . $row["\160\x72\x6f\144\165\143\164\x5f\x69\x64"] . "\42\x3e\x3c\x73\160\141\156\76\x41\144\144\x20\x74\x6f\40\x43\141\x72\164\x3c\57\163\160\141\x6e\76\74\x2f\x62\x75\x74\164\x6f\x6e\x3e\xa\11\x9\x9\11\74\x73\160\141\156\40\143\154\141\x73\163\x3d\42\x70\162\x6f\144\x75\143\x74\55\x69\164\x65\155\x2d\154\141\x62\145\x6c\x20\154\141\142\x65\154\x2d\x70\162\x69\143\x65\42\x3e" . $giampt . "\40\x3c\x73\160\141\x6e\x3e\x6f\146\146\x3c\57\163\160\x61\x6e\x3e\x3c\57\x73\x70\x61\x6e\76\xa\x9\x9\11\11\x3c\x2f\x64\x69\166\76\xa\11\x9\x9\11\74\144\151\166\x20\143\154\141\x73\x73\x3d\x22\x70\x72\x6f\x64\165\x63\x74\55\x69\x74\145\x6d\55\144\x65\164\x61\151\154\x22\76\xa\x9\x9\x9\11\x3c\x73\164\162\157\156\x67\x20\x63\x6c\141\x73\x73\75\x22\160\x72\157\x64\x75\143\164\x2d\x69\164\x65\x6d\55\156\x61\x6d\x65\40\x71\x75\151\164\166\151\x65\x77\42\x20\164\151\164\x6c\145\75\42" . $row["\x70\162\157\144\x75\143\164\137\156\141\155\x65\x5f\166\156"] . "\x20" . $row["\160\x72\x6f\144\x75\x63\164\x5f\x70\151\x64"] . "\42\40\144\x61\x74\141\x2d\151\155\x67\x3d\42" . $themelink . "\x2f" . $row["\x70\x72\157\144\165\x63\x74\x5f\164\x68\x75\155\142"] . "\x22\x20\144\141\x74\x61\55\x69\x64\x3d\42" . $row["\x70\x72\x6f\x64\165\143\164\137\151\x64"] . "\42\40\x64\x61\x74\141\x2d\x75\x72\154\75\x22\x73\x61\x6e\55\160\x68\141\x6d\57" . $row["\160\x72\157\x64\x75\x63\164\x5f\165\162\154"] . "\x22\x3e\74\141\x20\150\162\x65\x66\x3d\42\42\76" . $row["\x70\x72\157\144\x75\x63\x74\137\156\141\155\145\x5f\166\x6e"] . "\74\x2f\141\x3e\74\57\163\164\x72\157\x6e\147\76\xa\x9\11\11\11\74\144\151\166\x20\x63\x6c\141\163\163\75\x22\143\154\x65\141\x72\x66\x69\x78\42\76\xa\x9\x9\11\11\74\144\151\166\x20\143\154\x61\163\x73\x3d\x22\x70\162\157\144\x75\x63\164\55\151\x74\x65\155\x2d\x70\162\151\143\x65\x22\76\xa\x9\11\x9\11\74\163\160\141\156\x20\x63\154\x61\x73\x73\x3d\42\x70\162\151\x63\145\x22\x3e" . number_format($row["\160\x72\x6f\144\165\x63\x74\x5f\x67\x69\141\x62\x61\156"], 0, "\54", "\x2e") . '' . $donvigia . "\74\x2f\163\x70\141\156\76\12\x9\x9\x9\11\x3c\x73\160\x61\156\x20\143\x6c\141\x73\163\75\42\157\x6c\144\x2d\x70\x72\151\x63\x65\42\x3e" . number_format($row["\160\x72\x6f\144\x75\143\164\137\x67\151\141"], 0, "\x2c", "\56") . '' . $donvigia . "\x3c\x2f\x73\160\141\x6e\x3e\12\x9\x9\x9\11\74\x2f\144\151\x76\76\12\x9\x9\11\11\x3c\144\x69\x76\x20\143\154\x61\163\x73\75\42\160\162\157\144\165\143\164\55\162\145\x76\151\x65\x77\163\x2d\163\x75\155\x6d\141\162\x79\x22\x3e\xa\x9\11\x9\11\x3c\x64\151\166\x20\x63\x6c\x61\x73\163\x3d\x22\162\141\164\151\x6e\x67\x2d\x73\165\x6d\155\x61\x72\171\x22\76\xa\11\11\x9\11\x3c\x64\151\x76\x20\143\154\x61\x73\163\x3d\42\162\141\x74\151\x6e\147\x2d\x72\145\x73\x75\154\164\x22\x20\x74\x69\x74\x6c\145\x3d\x22\x38\x30\x25\x22\76\12\x9\11\11\11\74\x73\x70\x61\x6e\40\x73\x74\171\x6c\x65\x3d\x22\x77\x69\144\x74\150\72\70\x30\45\x22\76\12\11\x9\11\x9\74\x73\160\141\x6e\x3e\x3c\163\160\x61\x6e\x3e\70\x30\x3c\57\x73\160\141\x6e\76\45\x20\x6f\x66\40\x3c\163\160\141\156\76\x31\x30\x30\74\x2f\x73\160\x61\156\76\x3c\x2f\x73\x70\141\156\x3e\xa\11\11\x9\11\74\x2f\x73\x70\141\x6e\76\12\x9\11\x9\x9\74\x2f\x64\151\166\x3e\xa\11\11\x9\x9\74\x2f\x64\151\x76\x3e\12\11\11\11\11\74\x2f\144\151\166\x3e\12\x9\11\11\x9\x3c\x2f\x64\x69\166\x3e\xa\11\x9\11\x9\74\x2f\144\x69\166\76\12\x9\x9\x9\x9\x3c\x2f\x64\x69\166\76\xa\x9\11\x9\11\74\x2f\144\x69\166\x3e\12\x9\11\11\11\74\57\x6c\x69\76"; } } } goto p6u7B; d4NYt: function MenuHienThi($table, $name, $index, $css) { global $prefix, $conn; echo "\74\163\x65\x6c\145\x63\x74\40" . $css . "\40\156\x61\x6d\x65\x3d\42" . $name . "\42\76"; function subcat($parentid, $table, $space = '', $trees = array()) { global $prefix, $conn; if (!$trees) { $trees = array(); } $sql = "\x53\x45\114\105\x43\x54\40\52\x20\x46\x52\117\115\40{$table}\40\127\110\x45\122\x45\x20\x6d\x65\x6e\x75\x5f\x73\x75\142\x20\x3d\x20{$parentid}"; $query = mysqli_query($conn, $sql); while ($rs = mysqli_fetch_assoc($query)) { $trees[] = array("\155\x65\156\x75\x5f\151\x64" => $rs["\155\145\x6e\x75\x5f\151\x64"], "\155\x65\156\165\137\x6e\x61\155\145\x5f\x76\156" => $space . $rs["\155\x65\156\x75\x5f\x6e\x61\155\x65\x5f\166\x6e"]); $trees = subcat($rs["\155\145\156\x75\x5f\151\x64"], $table, $space . "\x3d", $trees); } return $trees; } $menu = subcat(0, $table); foreach ($menu as $k => $row) { $selected = $row["\155\145\156\x75\137\151\144"] == $index ? "\163\145\x6c\x65\143\x74\145\x64" : ''; echo "\x3c\157\x70\x74\151\157\156\40\x76\x61\154\165\145\x3d\42" . $row["\x6d\145\156\165\137\x69\x64"] . "\42\x20" . $selected . "\76" . $row["\x6d\x65\156\165\137\156\141\155\x65\x5f\166\156"] . "\x3c\57\x6f\160\164\x69\x6f\x6e\x3e"; } echo "\74\57\163\x65\154\x65\143\164\x3e"; } goto Njv6v; kLMfd: class ResizePVSImages { var $image; var $image_type; function load($filename) { $image_info = getimagesize($filename); $this->image_type = $image_info[2]; if ($this->image_type == IMAGETYPE_JPEG) { $this->image = imagecreatefromjpeg($filename); } elseif ($this->image_type == IMAGETYPE_GIF) { $this->image = imagecreatefromgif($filename); } elseif ($this->image_type == IMAGETYPE_PNG) { $this->image = imagecreatefrompng($filename); } } function save($filename, $image_type = IMAGETYPE_JPEG, $compression = 75, $permissions = null) { if ($image_type == IMAGETYPE_JPEG) { imagejpeg($this->image, $filename, $compression); } elseif ($image_type == IMAGETYPE_GIF) { imagegif($this->image, $filename); } elseif ($image_type == IMAGETYPE_PNG) { imagepng($this->image, $filename); } if ($permissions != null) { chmod($filename, $permissions); } } function output($image_type = IMAGETYPE_JPEG) { if ($image_type == IMAGETYPE_JPEG) { imagejpeg($this->image); } elseif ($image_type == IMAGETYPE_GIF) { imagegif($this->image); } elseif ($image_type == IMAGETYPE_PNG) { imagepng($this->image); } } function getWidth() { return imagesx($this->image); } function getHeight() { return imagesy($this->image); } function resizeToHeight($height) { $ratio = $height / $this->getHeight(); $width = $this->getWidth() * $ratio; $this->resize($width, $height); } function resizeToWidth($width) { $ratio = $width / $this->getWidth(); $height = $this->getheight() * $ratio; $this->resize($width, $height); } function scale($scale) { $width = $this->getWidth() * $scale / 100; $height = $this->getheight() * $scale / 100; $this->resize($width, $height); } function resize($width, $height) { $new_image = imagecreatetruecolor($width, $height); imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); $this->image = $new_image; } }

Function Calls

None

Variables

None

Stats

MD5 7a6ff913552176d7d001b4e3cefa4332
Eval Count 0
Decode Time 131 ms