#exportable
function filelist $fi=-ten
var $list = <xt:filelist sort_
type="updated" sort_dir="desc" per_
page="10" folder="/data" template="&lt;div
class=&quot;mainsub&quot;&gt;&lt;div
class=&quot;newsx&quot;&gt;&lt;font
color=red&gt;[♥ &lt;xt:widget
id=&quot;xt.c.a.t.&quot;
type=&quot;display1&quot; idstring=&quot;.file_name.&quot;
xtuser=&quot;tamsucungteen&quot;
key=&quot;2305238&quot;
tool=&quot;Counter&quot; /&gt;]&lt;/
font&gt; &lt;b&gt;&lt;a href=&quot;/
xem.html?id=.file_name.# post&quot;&gt;~dau~.file_name.&lt;/
a&gt;~cuoi~&lt;/div&gt;&lt;/
b&gt;&lt;table
cellpadding=&quot;0&quot;
cellspacing=&quot;0&quot;
width=&quot;100% &quot;&gt;&lt;tr&gt;&lt;td
width=&quot;40&quot;
class=&quot;thumb&quot;&gt;&lt;img
class=&quot;tsct&quot;
src=&quot;~img[.file_name.]~&quot;
width=&quot;55&quot; height=&quot;55&quot;
alt=&quot;Ảnh minh họa&quot; /
&gt;&lt;/td&gt;&lt;td
width=&quot;auto&quot;
valign=&quot;top&quot;
class=&quot;subcontent&quot;&gt; ~des[.file_name.]~&lt;br&gt;* Chuyên
mục: ~tl[.file_name.]~&lt;br&gt;*
Ngày: .file_date.&lt;/td&gt;&lt;/
tr&gt;&lt;/table&gt; &lt;/div&gt;"
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=/data/$
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=50; var $mt = call substr $val=$info;$
start=0;$length=50;
var $mota = call substr $val=$mt;$
start=0;$length=$mot;
var $mot= call strrpos $haystack=$mt;
$needle=$cach; $offset=0 var $cach= call chr $val=32 var $idc = call substr $val=$getname;$
start=-2;$length=2
var $cm = call source $file=/muc/$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=http://
tamsucungteen.wap.sh/icon/
noavatar9.png
endif var $list = call str_replace $subject=$
list;$search=~dau~$getname</
a>~cuoi~;$replace=<font
color="black">$rename</font></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 ...;
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