[msg_start({text-align: center})] [ $b = $_args[0]; $th = $_args[1]; $amode = $_args[2]; $id = $_args[3]; if($th == 0) $th = 150; $list = dirlist($b); $thumbsize = $th; // <img src="/pictures/thumb.star?src=/pictures/[$b]/[$_data]&w=[$thumbsize]&h=[$thumbsize]" style="margin: 4px; box-shadow: 3px 2px 5px rgba(0,0,0,0.4); display: block;"> $list2 = foreach($list, chr(10)) {[ if(lcase($_data) == "thumbs.db") $_data = "" else $_data = { <div style="display: inline-block; vertical-align: top; text-align: center; width: [$thumbsize + 8]px; padding: 10px; margin: 5px;"> <a target="_new" href="/pictures/[$b]/[$_data]"> <img src="/pictures/[$b]/[$_data]" style="margin: 4px; box-shadow: 3px 2px 5px rgba(0,0,0,0.4); display: block; max-width: [$th]px; max-height: [$th]px"> [$dn = iif(strpos($_data, "."), substr($_data, 0, strrpos($_data, ".")), $_data); replace($dn, "_", " ");] </a> [if($amode == 1) {<br><br><span style="font-size: 80%;"><a href="/?id=[$id]&mode=picture_delete&picture=[$_data]">delete</a> · <a href="/?id=[$id]&mode=picture_rename&picture=[$_data]">rename</a> </span>}; ] </div> }; ]}; $list2; ] [msg_end()]