
Admin
Well-Known Member
Staff member
Administrator
- Vào xtgem tạo file list3.xt
- Lên host vào gui.php thêm code vào chỗ muốn hiển thị
- Vào css thêm
Xong
Code:
#exportable
function filelist $fd=
var $list = <xt:filelist sort_type="name" sort_dir="desc" per_page="5" folder="$fd" template="[dau].file_name.[cuoi]" filter="*_itv" tzone="7"/>
@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-5);
var $rename = call source $file=$getname
assign $enda =call stripos $haystack=$rename;$needle=[/tv]; $offset=0
assign $starta=call stripos $haystack=$rename;$needle=[tv]; $offset=0
var $info = call substr $val=$rename;$start=($starta+4);$length=($enda-$starta-4);
var $list = call str_replace $subject=$list;$search=[dau]$getname[cuoi];$replace=<div class="info">$info</div>
if $end > 0
goto @batdau
endif
print $list
endfunction
Code:
<div class="them"><div class="menu">cùng thể loại</div>
<!--parser:xtscript-->
include /inc/list3.xt
call @filelist $fd='.$dir.'
<!--/parser:xtscript-->
</div>
HTML:
.them { border: 1px solid #cecece; margin-bottom: 5px;padding: 1px;background: #fff;}.them .filelist_paging {display: none;}