1function checkSubmit() { 2 var phone = $('#phone').val().trim(); 3 var name = $('#name').val().trim(); 4 var tinh = $('#sl_tinh').val(); 5 var pw = $('#pw'); 6 var token = $('#csrf').val(); 7 var dob = $('#dob').val(); 8 var check_pw = ''; 9 if(phone ==='' || token==='') 10 { 11 $('#notifyAlert').html('Vui lòng nháºp SÄT cá»§a Phụ huynh hoặc Mã há»c sinh.'); 12 $('#phone').focus().addClass('warning'); 13 return false; 14 } 15 if(tinh == '0') 16 { 17 $('#notifyAlert').html('Vui lòng chá»n tá»nh thà nh cần tra cứu!'); 18 $('#sl_tinh').focus().addClass('warning'); 19 return false; 20 } 21 if(name ==='') 22 { 23 $('#notifyAlert').html('Vui lòng nháºp Há» tên há»c sinh cần tra cứu.'); 24 $('#name').focus().addClass('warning'); 25 return false; 26 } 27 28 if (pw.length > 0) 29 { 30 check_pw = pw.val().trim(); 31 if (check_pw === '') 32 { 33 $('#notifyAlert').html('Vui lòng nháºp máºt khẩu tà i khoản vnedu.'); 34 $('#pw').focus().addClass('warning'); 35 return false; 36 } 37 } 38 39 disableButton(); 40 $('#process').show(); 41 $('#bangdiem').html(''); 42 $('#reSearch').html(''); 43 $.ajax({
44 type: "post", 45 contentType: 'application/json', 46 url: 'tracuu.php?phone='+phone+'&pw='+check_pw+'&name='+name+'&tinh_id='+tinh+'&dob='+dob+'&token='+token, 47 dataType: "json", 48 success: function(res){ 49 $('#process').hide(); 50 $('#csrf').val(res.token); 51 var res_html = res.html.datahk1 + res.html.data; 52 if(res.stt ==1 ){ 53 54 $('#reSearch').append('<a href="https://www.facebook.com/sharer/sharer.php?u=https://tracuudiem.me/share.php?key='+res.share+'" target="_blank"><span style="background: #0452a0;color: white; display: inline-block;padding: 10px 20px;border-radius: 10px;">Chia sẻ lên Facebook</span></a>'); 55 //$('#reSearch').append('<p class="wl100 mgt20" style="text-transform: none; color: #F44336;">CẢNH BÃO!!! <br/>Duy nhất tại <b>tracuudiem.me</b> và <b>vnedu.vn</b> có thá» tra cứu Äiá»m. Tất cả website khác Äá»u mạo danh và có thá» Äánh cắp dữ liá»u ngưá»i dùng.<br/></p>'); 56 //console.log(res_html); 57 58 var info = '<table class="tbl-info" style="border-collapse: collapse; width: 100%;">'+ 59 '<tbody>'+ 60 '<tr>'+ 61 '<td colspan="5">Thông tin cá nhân</td>'+ 62 '</tr>'+ 63 '<tr>'+ 64 ' <td style="width: 20%;">Há» tên</td>'+ 65 ' <td style="width: 20%;">Lá»p</td>'+ 66 ' <td style="width: 20%;">Trưá»ng</td>'+ 67 ' <td style="width: 20%;">Huyá»n</td>'+ 68 ' <td style="width: 20%;">Tá»nh</td>'+ 69 ' </tr>'+ 70 ' <tr>'+ 71 ' <td style="width: 20%;">'+res.info['fullname']+'</td>'+ 72 ' <td style="width: 20%;">'+res.info['lop']+'</td>'+ 73 ' <td style="width: 20%;">'+res.info['truong']+'</td>'+ 74 ' <td style="width: 20%;">'+res.info['huyen']+'</td>'+ 75 ' <td style="width: 20%;">'+res.info['tinh']+'</td>'+ 76 ' </tr>'+ 77 '</tbody>'+ 78 '</table>'; 79 //'<p class="mgt20">*Nếu có bất kì thắc mắc nà o vá» kết quả tra cứu. Vui lòng tra cứu lại tại vnedu.vn</p>'; 80 $('#notifyAlert').html(info); 81 82 //var cap1 = checkFirstNumberInRange(res.info['lop']); 83 //var tableHTML = tcdiem(res_html,cap1);
84 $('#bangdiem').html(res_html); 85 changeImg(); 86 87 if(res_html.success === false) 88 { 89 $('#notifyAlert').append('<p class="wl100 mgt20">'+res_html.msg+'</p>'); 90 //$('#notifyAlert').append('<p class="wl100 mgt20"><b>'+res.info['fullname']+' : </b> Bảng Äiá»m Äang ÄÆ°á»£c cáºp nháºt. Vui lòng quay lại Tra Cứu sau.</p>'); 91 //$('#notifyAlert').delay(3000).append('<p class="wl100 mgt20">Bảng Äiá»m Äang ÄÆ°á»£c cáºp nháºt. Vui lòng quay lại Tra Cứu sau.</p>'); 92 } 93 } 94 else{ 95 $('#notifyAlert').delay(1000).html(res.mess); 96 //$('#notifyAlert').append('<p class="wl100 mgt20"><b>'+res.info['fullname']+' : </b> Bảng Äiá»m Äang ÄÆ°á»£c cáºp nháºt. Vui lòng quay lại Tra Cứu sau.</p>') 97 //$('#notifyAlert').delay(3000).append('<p class="wl100 mgt20"><b>Bảng Äiá»m Äang ÄÆ°á»£c cáºp nháºt. Vui lòng quay lại Tra Cứu sau.</p>'); 98 } 99 100 }, 101 error: function(xhr, status, error) { 102 $('#notifyAlert').delay(3000).append('<p class="wl100 mgt20"><b>Bảng Äiá»m Äang ÄÆ°á»£c cáºp nháºt. Vui lòng quay lại Tra Cứu sau.</p>'); 103 } 104 105 }); 106 var recheck = '<a href="#phone"><span style="background: #59871b;color: white;display: inline-block;padding: 10px 20px;border-radius: 10px;margin-right: 20px;">Tra cứu lại</span></a>'; 107 108 $('#reSearch').append(recheck); 109 110 $('#reSearch').fadeIn(2000); 111 $('#checkloi').fadeIn(2000); 112 $('#process').fadeOut(5000); 113 114 $('#notifyAlert').fadeIn(2000).html('Dữ liá»u Äang ÄÆ°á»£c cáºp nháºt...'); 115 116 return true; 117 118} 119 120function checkFirstNumberInRange(str) { 121 const numberMatch = str.match(/^\d+/); // Tìm chuá»i sá» á» Äầu chuá»i 122 if (numberMatch) { 123 const firstNumber = parseInt(numberMatch[0], 10); // Chuyá»n Äá»i chuá»i sá» Äầu tiên thà nh sá» nguyên 124 return firstNumber >= 1 && firstNumber <= 5; // Kiá»m tra xem sá» có nằm trong khoảng 1-5 không 125 alert(numberMatch); 126 } 127 return false; 128} 129 130 131 132const monHocData = { 133 "1": "Toán Há»c", 134 "2": "Ngữ VÄn", 135 "3": "Váºt lÃ", 136 "4": "Hóa há»c", 137 "5": "Lá»ch sá»", 138 "6": "Äá»a lÃ", 139 "7": "Sinh há»c", 140 "8": "Ngoại ngữ", 141 "9": "GDCD", 142 "10": "Công nghá»", 143 "11": "Tin há»c", 144 "12": "Thá» dục", 145 "13": "Ãm nhạc", 146 "14": "MÄ© thuáºt", 147 "15": "GDQP", 148 "16": "KÄ© thuáºt", 149 "17": "Nghá» PT", 150 "18": "Ngoại ngữ 2", 151 "33": "Tá»± chá»n 1", 152 "34": "Tiếng dân tá»c", 153 "35": "Tá»± chá»n 2", 154 "36": "Tá»± chá»n 3", 155 "50": "Tiếng Viá»t", 156 "51": "Toán", 157 "52": "Khoa há»c", 158 "53": "Lá»ch sá» và Äá»a lÃ", 159 "54": "Tiếng Anh", 160 "55": "Tin há»c", 161 "56": "Äạo Äức", 162 "57": "TN-XH", 163 "58": "Ãm nhạc", 164 "59": "MÄ© thuáºt", 165 "60": "KÄ© thuáºt", 166 "61": "Thá»§ công", 167 "62": "Thá» dục", 168 "63": "Sức khá»e", 169 "64": "Nghá» thuáºt", 170 "65": "Tá»± chá»n 4", 171 "66": "Tá»± chá»n 5", 172 "67": "Tá»± chá»n 6", 173 "68": "Tá»± chá»n 7", 174 "69": "Tá»± chá»n 8", 175 "70": "Tá»± chá»n 9", 176 "71": "Ãn toán", 177 "72": "Ãn Tiếng Viá»t", 178 "73": "Luyá»n VCÄ", 179 "74": "Kỹ nÄng sá»ng", 180 "75": "Äá»c sách", 181 "76": "HÄ táºp thá»", 182 "77": "Erobic", 183 "78": "Cá» vua", 184 "79": "Tá»± chá»n 10", 185 "80": "Tá»± chá»n 11", 186 "81": "Khoa há»c tá»± nhiên", 187 "82": "Khoa há»c xã há»i", 188 "83": "Hoạt Äá»ng giáo dục", 189 "84": "Tá»± chá»n 12", 190 "85": "Tá»± chá»n 13", 191 "86": "Tá»± chá»n 14", 192 "87": "Tá»± chá»n 15", 193 "88": "Tá»± chá»n 16", 194 "89": "TC nháºn xét 1", 195 "90": "TC nháºn xét 2", 196 "91": "TC nháºn xét 3", 197 "92": "TC nháºn xét 4", 198 "93": "TC nháºn xét 5", 199 "94": "TC nháºn xét 6", 200 "95": "TC nháºn xét 7", 201 "96": "TC nháºn xét 8", 202 "97": "Giáo dục thá» chất", 203 "98": "Hoạt Äá»ng trải nghiá»m", 204 "99": "Tin há»c và Công nghá»", 205 "100": "Ngoại ngữ 1", 206 "102": "Hoạt Äá»ng trải nghiá»m, hưá»ng nghiá»p", 207 "103": "Giáo dục quá»c phòng và an ninh", 208 "104": "Ná»i dung giáo dục cá»§a Äá»a phương", 209 "105": "Giáo dục kinh tế và pháp luáºt", 210 "106": "Công nghá» trá»ng trá»t", 211 "107": "Tin há»c và Công nghá» (Công nghá»)", 212 "110": "Ngoại ngữ 1", 213 "113": "Tin há»c và Công nghá» (Tin há»c)" 214}; 215 216function createStudentResultHTML(studentData, subjectData) { 217 let html = ''; 218 219 // Há»c kỳ 1 220 html += '<table style="border-collapse: collapse; width: 100%;">'; 221 html += '<tr><th colspan="2" style="background-color: #007BBF; color: white;">Kết quả há»c táºp trong há»c kỳ 1</th></tr>'; 222 html += '<tr><td>Äiá»m trung bình</td><td>' + (studentData.hoc_ky_1.tong_ket.diem_trung_binh[1] ?? '...') + '</td></tr>'; 223 html += '<tr><td>Há»c lá»±c</td><td>' + (studentData.hoc_ky_1.tong_ket.hoc_luc[1] ?? '...') + '</td></tr>'; 224 html += '<tr><td>Hạnh kiá»m</td><td>' + (studentData.hoc_ky_1.tong_ket.hanh_kiem[1] ?? '...') + '</td></tr>'; 225 html += '<tr><td>Xếp hạng</td><td>' + (studentData.hoc_ky_1.tong_ket.xep_hang[1] ?? '...') + '</td></tr>'; 226 html += '</table>'; 227 228 html += '<h3>Bảng Äiá»m các môn há»c kỳ 1</h3>'; 229 html += '<table>'; 230 html += '<tr style="background-color: #007BBF; color: white;"><th>Môn há»c</th><th>Äiá»m ÄG thưá»ng xuyên</th><th>Äiá»m giữa kỳ</th><th>Äiá»m cuá»i kỳ</th><th>Äiá»m TBM</th></tr>'; 231 for (const subjectId in studentData.hoc_ky_1.diem_tk_mon[1]) { 232 const subjectName = subjectData[subjectId]; 233 const scores = studentData.hoc_ky_1.diem_tp[1][subjectId]; 234 const regularScore = scores && scores[2] ? scores[2].split(';').map(score => '<span style="display: inline-grid;
234width: 20px; text-align: center;">' + score + '</span>').join('') : 'Trá»ng'; 235 const midtermScore = scores && scores[3] ? scores[3] : '...'; 236 const finalScore = scores && scores[4] ? scores[4] : '...'; 237 const tbm = studentData.hoc_ky_1.diem_tk_mon[1][subjectId] ?? '...'; 238 html += '<tr><td>' + subjectName + '</td><td>' + regularScore + '</td><td>' + midtermScore + '</td><td>' + finalScore + '</td><td>' + tbm + '</td></tr>'; 239 } 240 html += '</table>'; 241 242 // Há»c kỳ 2 243 html += '<table style="border-collapse: collapse; width: 100%;">'; 244 html += '<tr><th colspan="2" style="background-color: #007BBF; color: white;">Kết quả há»c táºp trong há»c kỳ 2</th></tr>'; 245 html += '<tr><td>Äiá»m trung bình</td><td>' + (studentData.hoc_ky_2.tong_ket.diem_trung_binh[1] ?? '...') + '</td></tr>'; 246 html += '<tr><td>Há»c lá»±c</td><td>' + (studentData.hoc_ky_2.tong_ket.hoc_luc[1] ?? '...') + '</td></tr>'; 247 html += '<tr><td>Hạnh kiá»m</td><td>' + (studentData.hoc_ky_2.tong_ket.hanh_kiem[1] ?? '...') + '</td></tr>'; 248 html += '<tr><td>Xếp hạng</td><td>' + (studentData.hoc_ky_2.tong_ket.xep_hang[1] ?? '...') + '</td></tr>'; 249 html += '</table>'; 250 html += '<h3>Bảng Äiá»m các môn há»c kỳ 2</h3>'; 251 html += '<table>'; 252 html += '<tr style="background-color: #007BBF; color: white;"><th>Môn há»c</th><th>Äiá»m ÄG thưá»ng xuyên</th><th>Äiá»m giữa kỳ</th><th>Äiá»m cuá»i kỳ</th><th>Äiá»m TBM</th></tr>'; 253 for (const subjectId in studentData.hoc_ky_2.diem_tk_mon[2]) { 254 const subjectName = subjectData[subjectId]; 255 const scores = studentData.hoc_ky_2.diem_tp[2][subjectId]; 256 const regularScore = scores && scores[2] ? scores[2].split(';').map(score => '<span style="display: inline-grid;width: 20px; text-align: center;">' + score + '</span>').join('') : 'Trá»ng'; 257 const midtermScore = scores && scores[3] ? scores[3] : '...'; 258 const finalScore = scores && scores[4] ? scores[4] : '...'; 259 const tbm = studentData.hoc_ky_2.diem_tk_mon[2][subjectId] ?? '...'; 260 html += '<tr><td>' + subjectName + '</td><td>' + regularScore + '</td><td>' + midtermScore + '</td><td>' + finalScore + '</td><td>' + tbm + '</td></tr>'; 261 } 262 html += '</table>'; 263 264 html += '<table style="border-collapse: collapse; width: 100%;">'; 265 html += '<tr><th colspan="2" style="background-color: #007BBF; color: white;">Kết quả há»c táºp cả nÄm</th></tr>'; 266 html += '<tr><td>Äiá»m trung bình</td><td>' + (studentData.ca_nam.tong_ket.diem_trung_binh[1] ?? '...') + '</td></tr>'; 267 html += '<tr><td>Há»c lá»±c</td><td>' + (studentData.ca_nam.tong_ket.hoc_luc[1] ?? '...') + '</td></tr>'; 268 html += '<tr><td>Hạnh kiá»m</td><td>' + (studentData.ca_nam.tong_ket.hanh_kiem[1] ?? '...') + '</td></tr>'; 269 html += '<tr><td>Xếp hạng</td><td>' + (studentData.ca_nam.tong_ket.xep_hang[1] ?? '...') + '</td></tr>'; 270 html += '</table>'; 271 html += '<h3>Bảng Äiá»m các môn há»c cả nÄm</h3>'; 272 html += '<table>'; 273 html += '<tr style="background-color: #007BBF; color: white;"><th>Môn há»c</th><th>Äiá»m TBM</th></tr>'; 274 if (studentData.ca_nam.diem_tk_mon) { 275 for (const subjectId in studentData.ca_nam.diem_tk_mon[0]) { 276 const subjectName = subjectData[subjectId]; 277 if (studentData.ca_nam.diem_tk_mon[0] && studentData.ca_nam.diem_tk_mon[0][subjectId]) { 278 const tbm = studentData.ca_nam.diem_tk_mon[0][subjectId] ?? '...'; 279 html += '<tr><td>' + subjectName + '</td><td>' + tbm + '</td></tr>'; 280 } else { 281 html += '<tr><td>' + subjectName + '</td><td>...</td></tr>'; 282 } 283 } 284 } else { 285 html += '<tr><td colspan="5">Không có dữ liá»u</td></tr>'; 286 } 287 html += '</table>'; 288 289 return html; 290} 291 292function disableButton() { 293 294 const submitButton = document.getElementById("btnCheck"); 295 296 297 const originalText = submitButton.value; 298 const originalColor = submitButton.style.backgroundColor; 299 300 301 submitButton.disabled = true; 302 submitButton.style.backgroundColor = "gray"; 303 304
305 let countdown = 9; 306 submitButton.value = `Chá» ${countdown}s`; 307 308 309 const interval = setInterval(() => { 310 countdown--; 311 submitButton.value = `Chá» ${countdown}s`; 312 313 314 if (countdown === 0) { 315 clearInterval(interval); 316 submitButton.value = originalText; 317 submitButton.style.backgroundColor = originalColor; 318 submitButton.disabled = false; 319 } 320 }, 1000); 321} 322 323function changeImg() 324{ 325 // 1. Khai báo chuá»i cần tìm và chuá»i má»i Äá» thay thế 326 const chuoiMoi = "https://tracuudiem.me/wp-content/themes/tracuu/assets/css/"; // <-- Äiá»n ÄÆ°á»ng dẫn má»i 327 328 // 2. Chá»n phần tá» cha chứa các ảnh 329 const container = document.getElementById("bangdiem"); 330 331 // Kiá»m tra xem phần tá» cha có tá»n tại không Äá» tránh lá»i 332 if (!container) { 333 console.log("Lá»i: Không tìm thấy phần tá» vá»i ID 'bangdiem'."); 334 return; 335 } 336 337 // 3. Lấy tất cả các thẻ <img> bên trong phần tá» cha Äó 338 const images = container.querySelectorAll("img"); 339 340 // 4. Duyá»t qua từng thẻ <img> và thá»±c hiá»n thay thế 341 images.forEach((img) => { 342 const srcHienTai = img.getAttribute("src"); 343 // Chá» thay thế phần 'chuoiCu' bằng 'chuoiMoi' trong src hiá»n tại 344 img.src = chuoiMoi+srcHienTai; 345 }); 346} 347 348 349 350 351function closeBanner() { 352 var now = Date.now(); 353 var banner = document.getElementById('mobile-bottom-banner'); 354 if (banner) banner.style.display = 'none'; 355 localStorage.setItem('bannerClosedTime', now); 356} 357 358document.addEventListener('DOMContentLoaded', function() { 359 const SHOPEE_URL = "https://s.shopee.vn/9paazyjedt"; 360 const LIST_FILE_PATH = 'wp-content/uploads/2026/list.json'; 361 const DEFAULT_TIKTOK = "https://vt.tiktok.com/ZSHTbhkkdMLRb-cu3bd"; 362 const TWO_HOURS = 2 * 60 * 60 * 1000; 363 const TIKTOK_KEY = 'lastTikTokTime'; 364 const BANNER_KEY = 'bannerClosedTime'; 365 const boxSearchDiv = document.getElementById('boxSearchDiv'); 366 367 function isMobileDevice() { 368 return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); 369 } 370 371 if (!isMobileDevice() || !boxSearchDiv) return; 372 373 let currentTikTokUrl = DEFAULT_TIKTOK; 374 fetch(LIST_FILE_PATH) 375 .then(response => response.ok ? response.text() : null) 376 .then(text => { 377 if (!text) return; 378 const links = text.split(/\r?\n/).map(line => line.trim()).filter(line => line.length > 0); 379 if (links.length > 0) { 380 currentTikTokUrl = links[Math.floor(Math.random() * links.length)]; 381 } 382}).catch(() => {}); 383 384const handleClicks = function() { 385 const now = Date.now(); 386 const lastTikTok = parseInt(localStorage.getItem(TIKTOK_KEY) || '0'); 387 const lastShopee = parseInt(localStorage.getItem(BANNER_KEY) || '0'); 388 389 if (now - lastTikTok > TWO_HOURS) { 390 window.open(currentTikTokUrl, '_blank', 'noopener,noreferrer'); 391 localStorage.setItem(TIKTOK_KEY, now); 392 return; 393 } 394 395 if (now - lastTikTok <= TWO_HOURS && now - lastShopee > TWO_HOURS) { 396 if (now - lastTikTok < 5000) return; 397 398 window.open(SHOPEE_URL, '_blank', 'noopener,noreferrer'); 399 closeBanner(); 400 boxSearchDiv.removeEventListener('click', handleClicks, true); 401 } 402}; 403 404const now = Date.now(); 405const lastTikTok = parseInt(localStorage.getItem(TIKTOK_KEY) || '0'); 406const lastShopee = parseInt(localStorage.getItem(BANNER_KEY) || '0'); 407 408if (now - lastTikTok > TWO_HOURS || now - lastShopee > TWO_HOURS) { 409 boxSearchDiv.addEventListener('click', handleClicks, true); 410} 411}); 412 413$(function () { 414 $('#reSearch').hide(); 415}); 416 417
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.