• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Share mod xóa file đính kèm cho john cms

Hotro

Member
Mở forum/includes. Tạo 1 file với tên xoafile.php với nội dung:
PHP:
<?php
// code xoa file
defined('_IN_JOHNCMS') or die('Error: restricted access');
$error = false;
if ($rights >= 6) {
if ($id) {
//---Get info file---//
$req = mysql_query("SELECT * FROM `cms_forum_files` WHERE `id` = '$id'");
if (mysql_num_rows($req)) {
$res = mysql_fetch_array($req);
mysql_query("DELETE FROM `cms_forum_files` WHERE `id` = '$id'");
if (file_exists('../files/forum/attach/' . $res['filename'])) {
unlink('../files/forum/attach/' . $res['filename']);
}
require('../incfiles/head.php');
echo'<div class="rmenu">Đã xóa thành công</div>';
require('../incfiles/end.php');
} else {
$error = true;
}
if ($error) {
require('../incfiles/head.php');
echo '<div class="rmenu">Không thể xóa</div>';
require('../incfiles/end.php');
exit;
}
} else {
require('../incfiles/head.php');
echo functions::display_error($lng['error_wrong_data']);
require('../incfiles/end.php');
exit;
}
} else {
echo functions::display_error($lng['access_forbidden']);
}
?>
+Tiếp theo mở file index.php trong forum ra và tìm
PHP:
'vip',
'vote',
Chèn bên dưới:
PHP:
'xoafile',
Tìm tiếp:
PHP:
$file_id = $fres['id'];
Thêm bên dưới:
PHP:
if ($rights >= 6)
echo' <a href="index.php?act=xoafile&id=' . $fres['id'] . '">Xóa</a>';
if ($fls == 0) {
echo'
File đã bị xóa';
}
 

Facebook Comments

Similar threads
Thread starter Title Forum Replies Date
Admin Share mod tự động xóa nick không kích hoạt 24h phpbb3x Phpbb3x 0
T Share Tổng Hợp Code Tool Mod Java Online [full] All Shared Scripts 0
H Share Share code Wilib mod giống trasua.mobi All Shared Scripts 0
T Share mod Captcha khi đăng bài viết chống spam cho johncms Johncms 0
T Share mod bình luận bằng facebook cho johncms (fix lỗi trùng trang) Johncms 0
T Share Share Code Mod Thay đổi Màu Nick Tùy Ý Cho Johncms Johncms 1
H [Share]Mod TOPICVIP cho bang hội by F4V Johncms 0
H Share mod sitemap rewrite cho john cms Johncms 0
H Share mod dislike cho john cms Johncms 0
H Share mod chatbox autoload cho john cms Johncms 1
H Help Xin share mod sideshow ảnh ngoài forumhome như của diễn đàn này Vbb tutorial 2
N Share share code Xenforo Vntech24.Net Full Mod 2013 Xenforo 5
bunvocam9x Share Share code johncms 5.0.0 full mod by ClanIT.TK Johncms 5
bunvocam9x Share Share mod thu gọn quảng lí của BQT Johncms 2
bunvocam9x Share Share code johncms 5.0 mod bang hội khá ngon ae test nào! Johncms 0
bunvocam9x Share Share code + data johncms vduc95.tk mod full Johncms 0
bunvocam9x Share Share code johncms HayCuc.Us full mod bang hội Johncms 0
bunvocam9x Share Share mod up file _jar tự đổi thành .jar cho johncms mời bạn vào xem Johncms 0
bunvocam9x Share Share mod hàng xóm cho johncms Johncms 0
K Share Mã nguồn test code xtgem full không lỗi mod by dicky All Shared Scripts 0
P Share Share mod nhật ký ra home cho JohnCMS Johncms 0
Myshare Share Share mod tiền trong forum cho JohnCMS Share on lin Johncms 0
Myshare Share Share code + data johnCMS 4.5.1 mod đủ dùng Johncms 0
blog4me Share Share Mod Chọn Nhóm Khi Đăng Ký (Register Usergroup Choice) Vbulletin 0
S Share [Share] code MXH Mod Gần Full Johncms 3
S Share [Share] Share Mod Super Auto Leech Nhiều Tin Tức Cho JohnCMS Johncms 0
S Share [Share] Share mod bài ngẫu nhiên,xemnhiều cho JohnCMS Johncms 0
S Share [Share] Share mod ai đang xem chủ đềcho JohnCMS fix (Final) Johncms 0
S Share Share mod bang hội cho JohnCMS Johncms 0
V Share Johncms Share code + data johnCMS 4.5.1 mod đủ dùng by Nguyễn Johncms 3
A Share Share Code Mod Shop cho johncms Johncms 0
KullsTyLe Share Code Full Mod Cho Forum Teen [NhaoZdo.Com] Vbulletin 6
S Share shell mod nhiều tiện ích Local attack 6
B Share Share mod bang hoi john Johncms 1
V Share mod bang hoi john Johncms 0
B Share Share mod admin panel balans, power, chữ ký JohnCMS Johncms 0
K Share Share mod BOT thông báo hoạt động thành viên v2 Johncms 0
K Share ma nguon JohnCMS 4.4 full mod netviet.mobi Johncms 0
K Share mod BOT thông báo hoạt động thành viên v2 Johncms 0
D Share mod tags johncms new Joomla 0
yoona Share Share mod tu khoa john cms Johncms 1
DragonHunter Share code Phpbb 3.0.8 wWw.Vaonet.Tk Hack Full Mod [Mới Nhất] Phpbb3x 0
H Share [Share] Code + data jonhcms mod full ver4.4 by Gocketban.net Johncms 2
Della007 [OFFLINE][SHARE] Code BLOG JOHN mod pro by DinhQuocHan Johncms 0
Della007 Share Share code phpBB 3.0.11 hack mod cần thiết by NTĐ Phpbb wap 0
T Xin Ai đó share cho em xin code phpbb3x full mod với. Phpbb3x 10
Admin Share vihuni mod spam room Crack, hack, mod, ghép game, ứng dụng 0
B Share share code full mod by hanhphuc.mobi Johncms 3
K Share bản vbb 4.1.3 full mod phù hợp cho trang cộng đồng và Teen! Vbb released 4
K Admin Ơi Share MOD Huy Chương Và IShop Đi. Thùng rác dọn dẹp thường xuyên 0

Similar threads

New posts New threads New resources

Back
Top