Tâm trạng hàng ngày | Hạnh phúc 2-7-2025 09:43 PM |
|---|
Đã viết: 13 ngày [LV.3]Spam 3
|
Mời bạn đăng ký để giao lưu kết bạn nhé <3
Bạn phải đăng nhập để xem được nội dung, nếu bạn chưa có tài khoản? hãy Đăng ký
x
Backup file trước khi làm
Vào acp admin.php?frames=yes&action=db&operation=runquery
Hoặc phpmyadmin run querry sau:
- ALTER TABLE pre_common_session ADD botid TINYINT(2) UNSIGNED NOT NULL DEFAULT 0 AFTER tid
Sao chép mã Mở ./source/class/class_core.php tìm
Thêm vào dưới
- function update() {
- global $_G;
- if($this->sid !== null) {
- $data = daddslashes($this->var);
- if($this->isnew) {
- $this->delete();
- DB::insert('common_session', $data, false, false, true);
- } else {
- DB::update('common_session', $data, "sid='$data[sid]'");
- }
- $_G['session'] = $data;
- dsetcookie('sid', $this->sid, 86400);
- }
- }
Sao chép mã
Tìm
- function update() {
- global $_G;
- if($this->sid !== null) {
- $data = daddslashes($this->var);
- if($this->isnew) {
- $this->delete();
- DB::insert('common_session', $data, false, false, true);
- } else {
- DB::update('common_session', $data, "sid='$data[sid]'");
- }
- $_G['session'] = $data;
- dsetcookie('sid', $this->sid, 86400);
- }
- }
Sao chép mã Thay bằng
- function update() {
- global $_G;
- if($this->sid !== null) {
- $data = daddslashes($this->var);
- if($this->isnew) {
- $this->delete();
- DB::insert('common_session', $data, false, false, true);
- $bot = user2idbot($_SERVER['HTTP_USER_AGENT']);
- if($bot){
- DB::query('UPDATE pre_common_session SET botid='.$bot.' WHERE sid=\''.$this->sid.'\'');
- }
- } else {
- DB::update('common_session', $data, "sid='$data[sid]'");
- }
- $_G['session'] = $data;
- dsetcookie('sid', $this->sid, 86400);
- }
- }
Sao chép mã Mở ./source/module/forum/forum_index.php tìm
- $query = DB::query("SELECT uid, username, groupid, invisible, lastactivity, fid FROM ".DB::table('common_session')." WHERE uid='0' ORDER BY uid DESC LIMIT ".($_G['setting']['maxonlinelist'] - $membercount));
Sao chép mã
Thay bằng
- $query = DB::query("SELECT uid, username, groupid, invisible, lastactivity, fid, botid FROM ".DB::table('common_session')." WHERE uid='0' ORDER BY uid DESC LIMIT ".($_G['setting']['maxonlinelist'] - $membercount));
Sao chép mã
Tìm
- $online['username'] = $_G['cache']['onlinelist']['guest'];
Sao chép mã Thay bằng
- if($online['botid']){
- $online['username'] = idbot2user($online['botid']);
- }else{
- $online['username'] = $_G['cache']['onlinelist']['guest'];
- }
Sao chép mã
Done. Ai làm chuột bạch thì show lên nhé 
Dịch bởi : www.traitimyenbai.net
|
|