Đây:
#exportable
function filelist $fi=-ten
var $list = <xt:filelist sort_type="updated" sort_dir="desc" per_page="4" folder="/data" template="<div class='hdr'>› <a href="/xem?id=.file_name.">~dau~.file_name.</a></div>~cuoi~" 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-15);
var $rename = call source $file=/data/$getname
assign $endt =call strrpos $haystack=$rename;$needle=[/ten]; $offset=0
assign $startt=call strrpos $haystack=$rename;$needle=[ten]; $offset=0
var $rename = call substr $val=$rename;$start=($startt+5);$length=($endt-$startt-5);
var $list = call str_replace $subject=$list;$search=~dau~$getname</a></div>~cuoi~;$replace=$rename</a></div>;
if $start > 25
goto @batdau
endif
print $list
endfunction
mod giốg:
http://wapqb.mobi/game-java
#exportable
function filelist $fi=-ten
var $list = <xt:filelist sort_type="updated" sort_dir="desc" per_page="4" folder="/data" template="<div class='hdr'>› <a href="/xem?id=.file_name.">~dau~.file_name.</a></div>~cuoi~" 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-15);
var $rename = call source $file=/data/$getname
assign $endt =call strrpos $haystack=$rename;$needle=[/ten]; $offset=0
assign $startt=call strrpos $haystack=$rename;$needle=[ten]; $offset=0
var $rename = call substr $val=$rename;$start=($startt+5);$length=($endt-$startt-5);
var $list = call str_replace $subject=$list;$search=~dau~$getname</a></div>~cuoi~;$replace=$rename</a></div>;
if $start > 25
goto @batdau
endif
print $list
endfunction
mod giốg:
http://wapqb.mobi/game-java