home
»
flstctrlpnl
Log in
Xtscript filelist control panel
A user control panel for the
filter sort type sort direction items per page
Of a xtgem filelist
video-test.mp4
(858.87KB)
glfrontier.zip
(1.03MB)
glfrontier-music.zip
(4.32MB)
kenny rogers-the gambler.mp3
(5.02MB)
Argent Hold Your Head Up.mp3
(8.03MB)
«
1
2
3
4
»
total pages = 4
U
N
S
T
Asc
Desc
3
5
10
20
50
all
<!--parser:xtscript--> # GET CURRENT VALUES OR SET DEFAULTS # get_or_default srtby;name get_or_default srtdir;asc get_or_default prpg;5 get_or_default fltr; get_or_default __filelist_page;1 /* MARK CURRENT SORT TYPE */ var $cst = color:#0f0 !important if $srtby==updated var $cst1=$cst elseif $srtby==name var $cst2=$cst elseif $srtby==size var $cst3=$cst elseif $srtby==type var $cst4=$cst endif /* MARK CURRENT SORT DIRECTION */ if $srtdir==asc var $csd1=$cst elseif $srtdir==desc var $csd2=$cst endif /* SET CURRENT PER PAGE */ var $sel = selected="selected" class="selected" if $prpg==3 var $pp1=$sel elseif $prpg==5 var $pp2=$sel elseif $prpg==10 var $pp3=$sel elseif $prpg==20 var $pp4=$sel elseif $prpg==50 var $pp5=$sel elseif $prpg <=1 var $pp6=$sel endif /* THE XT:FILELIST FUNCTION */ /* Set your own folder and template */ print <xt:filelist sort_type="$srtby" sort_dir="$srtdir" folder="/uploads" template="<a href=".file_url." >.file_name_parsed.</a>(.file_size.)<br />" filter="$fltr*" per_page="$prpg" /> # SET OUTER HOLDERS AND FORM HIDDEN FIELDS # print {{ <div style="text-align:center"> <div style="display:inline-block;text-align:center;background-color:#aab;border:1px solid #000;border-radius:3px;padding:2px;margin:0 auto"> <form action=" " method="get"> <input style="display:inline" type="hidden" name="srtby" value="$srtby" /> <input style="display:inline" type="hidden" name="srtdir" value="$srtdir" /> <input style="display:inline" type="hidden" name="__filelist_page" value="$__filelist_page" /> }} # SET THE COMMON STYLES # var $style=border:none;border-radius:2px;background:#555;color:#ffd;padding:0 1px !important;margin: 1px !important;font-size:.75em;text-decoration:none !important # SHOW SEARCH FILTER# print {{ <input style="$style;width:5em" type="search" name="fltr" value="$fltr" /><input style="$style" type="submit" value="Search" /> <br /> }} # SHOW SORT TYPE # print {{ <a style="$style;$cst1" href="?srtby=updated&srtdir=$srtdir&fltr=$fltr&prpg=$prpg&__filelist_page=$__filelist_page" title="Updated">U</a><a style="$style;$cst2" href="?srtby=name&srtdir=$srtdir&fltr=$fltr&prpg=$prpg&__filelist_page=$__filelist_page" title="Name">N</a><a style="$style;$cst3" href="?srtby=size&srtdir=$srtdir&fltr=$fltr&prpg=$prpg&__filelist_page=$__filelist_page" title="Size">S</a><a style="$style;$cst4" href="?srtby=type&srtdir=$srtdir&fltr=$fltr&prpg=$prpg&__filelist_page=$__filelist_page" title="type">T</a> }} # SHOW SORT DIRECTION # print {{ <a style="$style;$csd1" href="?srtby=$srtby&srtdir=asc&fltr=$fltr&prpg=$prpg&__filelist_page=$__filelist_page" title="Ascending">Asc</a><a style="$style;$csd2" href="?srtby=$srtby&srtdir=desc&fltr=$fltr&prpg=$prpg&__filelist_page=$__filelist_page" title="Descending">Desc</a> <br /> }} # SHOW PER PAGE # print {{ <select style="$style;" name="prpg"> <option $pp1>3</option> <option $pp2>5</option> <option $pp3>10</option> <option $pp4>20</option> <option $pp5>50</option> <option $pp6 value=" ">all</option> </select><input style="$style" type="submit" value="per page" /> }} # CLOSE FORM AND HOLDERS # print {{ </form> </div> </div> }} <!--/parser:xtscript-->
Xtgem Tutorial
Contact
©2024 3BIAP
ALE tights reversed