
Chatbox|Admin nhận làm wap/web, giá cả thương lượng... Thông tin admin tại mỗi bài viết.
Hi, Khách!
![]() | ![]() ![]() ![]() ![]() |
Đây là bản fix 1 chút từ mod import ảnh
cài đặt tương tự
code đây
$msg = "[filehttp://teenclub.info/santruyen/santruyen-teenclub.info.zip[/file";
$contents = $msg;
$title = $th;
/*--------------------------------------------------------------------*/
$url = '/forum/';// đường dẫn tuyệt đối đến thư mục file
$dir = 'file';//thu mục mặc định chứa file , không nên sửa
function convert ($str){
$str = html_entity_decode (trim($str),ENT_QUOTES,'UTF-8');
$unicode = array(
'a'=>'á|à|ả|ã|ạ|ă|ắ|ặ|ằ|ẳ|ẵ|â|ấ|ầ|ẩ|ẫ|ậ',
'd'=>'đ',
'e'=>'é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ',
'i'=>'í|ì|ỉ|ĩ|ị',
'o'=>'ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ',
'u'=>'ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ữ|ự',
'y'=>'ý|ỳ|ỷ|ỹ|ỵ',
'A'=>'Á|À|Ả|Ã|Ạ|Ă|Ắ|Ặ|Ằ|Ẳ|Ẵ|Â|Ấ|Ầ|Ẩ|Ẫ|Ậ',
'D'=>'Đ',
'E'=>'É|È|Ẻ|Ẽ|Ẹ|Ê|Ế|Ề|Ể|Ễ|Ệ',
'I'=>'Í|Ì|Ỉ|Ĩ|Ị',
'O'=>'Ó|Ò|Ỏ|Õ|Ọ|Ô|Ố|Ồ|Ổ|Ỗ|Ộ|Ơ|Ớ|Ờ|Ở|Ỡ|Ợ',
'U'=>'Ú|Ù|Ủ|Ũ|Ụ|Ư|Ứ|Ừ|Ử|Ữ|Ự',
'Y'=>'Ý|Ỳ|Ỷ|Ỹ|Ỵ',
' '=>'-',
'-'=>'\s+',
'' => '[^A-z0-9\-'
);
foreach($unicode as $nonUnicode=>$uni){
$str = preg_replace("/($uni)/i", $nonUnicode, $str);
}
return strtolower ($str);
}
function get_link ($input) {
preg_match_all ('#\[file\(.+?)\[/file\#i',$input,$regex);
return $regex[1;
}
function get_file ($link,$name) {
copy ($link,$name);
return $name;
}
function replace_link ($a_r,$b_r,$str) {
return str_replace ($a_r,$b_r,$str);
}
$list = get_link ($contents); // l?y danh sách link ?nh
$new = array ();
$d = date ('d',time());
$m = date ('m',time());
$y = date ('y',time());
@mkdir ("$dir/$y/$m/$d",0777,true);
foreach ($list as $key=>$link) {
$new[ = get_file ($link,"$dir/$y/$m/$d/" . basename ($link));
}
foreach ($new as $key=>$val) {
$new[$key = $url . $val;
}
$contents = preg_replace ('#\[file\(.+?)\[/file\#is','[file$1[/file',replace_link ($list,$new,$contents));
/*-------------------------------------------------------------------*/
$msg = $contents;
Copy code
$contents = $msg;
$title = $th;
/*--------------------------------------------------------------------*/
$url = '/forum/';// đường dẫn tuyệt đối đến thư mục file
$dir = 'file';//thu mục mặc định chứa file , không nên sửa
function convert ($str){
$str = html_entity_decode (trim($str),ENT_QUOTES,'UTF-8');
$unicode = array(
'a'=>'á|à|ả|ã|ạ|ă|ắ|ặ|ằ|ẳ|ẵ|â|ấ|ầ|ẩ|ẫ|ậ',
'd'=>'đ',
'e'=>'é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ',
'i'=>'í|ì|ỉ|ĩ|ị',
'o'=>'ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ',
'u'=>'ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ữ|ự',
'y'=>'ý|ỳ|ỷ|ỹ|ỵ',
'A'=>'Á|À|Ả|Ã|Ạ|Ă|Ắ|Ặ|Ằ|Ẳ|Ẵ|Â|Ấ|Ầ|Ẩ|Ẫ|Ậ',
'D'=>'Đ',
'E'=>'É|È|Ẻ|Ẽ|Ẹ|Ê|Ế|Ề|Ể|Ễ|Ệ',
'I'=>'Í|Ì|Ỉ|Ĩ|Ị',
'O'=>'Ó|Ò|Ỏ|Õ|Ọ|Ô|Ố|Ồ|Ổ|Ỗ|Ộ|Ơ|Ớ|Ờ|Ở|Ỡ|Ợ',
'U'=>'Ú|Ù|Ủ|Ũ|Ụ|Ư|Ứ|Ừ|Ử|Ữ|Ự',
'Y'=>'Ý|Ỳ|Ỷ|Ỹ|Ỵ',
' '=>'-',
'-'=>'\s+',
'' => '[^A-z0-9\-'
);
foreach($unicode as $nonUnicode=>$uni){
$str = preg_replace("/($uni)/i", $nonUnicode, $str);
}
return strtolower ($str);
}
function get_link ($input) {
preg_match_all ('#\[file\(.+?)\[/file\#i',$input,$regex);
return $regex[1;
}
function get_file ($link,$name) {
copy ($link,$name);
return $name;
}
function replace_link ($a_r,$b_r,$str) {
return str_replace ($a_r,$b_r,$str);
}
$list = get_link ($contents); // l?y danh sách link ?nh
$new = array ();
$d = date ('d',time());
$m = date ('m',time());
$y = date ('y',time());
@mkdir ("$dir/$y/$m/$d",0777,true);
foreach ($list as $key=>$link) {
$new[ = get_file ($link,"$dir/$y/$m/$d/" . basename ($link));
}
foreach ($new as $key=>$val) {
$new[$key = $url . $val;
}
$contents = preg_replace ('#\[file\(.+?)\[/file\#is','[file$1[/file',replace_link ($list,$new,$contents));
/*-------------------------------------------------------------------*/
$msg = $contents;
Copy code

Trực Tuyến:
Khách: 1