Demo đây !
Chỉ cần sửa ở file list.xt là ok
Chỉ cần sửa ở file list.xt là ok
HTML:
#exportable
function filelist $fi=-ten
var $list = <xt:filelist sort_type="updated" sort_dir="desc" per_page="3" folder="/truyen/post-truyen" template="<div class="list1">◆<a href="/xemt.html?id=.file_name.#up">~dau~.file_name.</a>~cuoi~<br/><table cellpadding="0" cellspacing="0" width="100%"><tr><td width="25" align="center"><img class="list1" alt="Icon" title="Icon" id="kd" src="~img[.file_name.]~" width="50px" height="60px" alt=""/></td><td width="auto" valign="top"><div class="list1"><span class="green">~des[.file_name.]~<br/></td>◎ <font color="blue">Đăng bởi:</font> <font color="red"> Admin</font><br/>≡ <font color="gray">Ngày:</font> .file_date.<br>☺ <font color="gray">Chuyên mục:</font> ~tl[.file_name.]~<br/></span></div></tr></table></div>" filter="$fi"/>
@batdau
assign $end=call strrpos $haystack=$list;$needle=~cuoi~; $offset=0
assign $start=call strrpos $haystack=$list;$needle=~dau~; $offset=0
var $getname = call substr $val=$list;$start=($start 5);$length=($end-$start-9);
var $data = call source $file=/post-truy/$getname
assign $endt =call strpos $haystack=$data;$needle=[/ten]; $offset=0
assign $startt=call strpos $haystack=$data;$needle=[ten]; $offset=0
assign $endi=call strpos $haystack=$data;$needle=[/img]; $offset=0
assign $starti=call strpos $haystack=$data;$needle=[img]; $offset=0
assign $tenfile = $getname
assign $infoa=call strstr $haystack=$data; $needle=[/info]; $before_needle=1;
assign $infob=call strstr $haystack=$infoa; $needle=[info]; $before_needle=0;
assign $info=call str_replace $subject=$infob;$search=[info];$replace=;
assign $sinfoa=call str_replace $subject=$info;$search=<br />;$replace=.;
assign $sinfoa=call str_replace $subject=$info;$search=<br/>;$replace=.;
assign $sinfoa=call str_replace $subject=$info;$search=<br>;$replace=.;
assign $sinfo=call substr $val=$sinfoa;$start=0;$length=80;
var $mt = call substr $val=$info;$start=0;$length=150;
var $cach= call chr $val=32
var $mot= call strrpos $haystack=$mt;$needle=$cach; $offset=0
var $mota = call substr $val=$mt;$start=0;$length=$mot;
var $idc = call substr $val=$getname;$start=-2;$length=2
var $cm = call source $file=muct/$idc
var $rename = call substr $val=$data;$start=($startt 5);$length=($endt-$startt-5);
if $endi > ($starti 13)
var $img = call substr $val=$data; $start=($starti 5); $length=($endi-$starti-5);
else
var $img=/truyen/images/$idc.png
endif
var $list = call str_replace $subject=$list;$search=~dau~$getname</a>~cuoi~;$replace=$rename</a>;
var $list = call str_replace $subject=$list; $search=~img[$getname]~; $replace=$img;
var $list = call str_replace $subject=$list; $search=~des[$getname]~; $replace=$mota ... <a href=/xemt.html?id=$tenfile#up>Đọc tiếp</a>;
var $list = call str_replace $subject=$list; $search=~tl[$getname]~; $replace=$cm
if $start > 25
goto @batdau
endif
get __filelist_page
if $__filelist_page ==
var $__filelist_page = 1
endif
print $list
endfunction