";
$sitetitle = "Foto Uploadtanmu"; // your site's name
$dltitle = "File Upload
";
$displaylist = "3gp mp3 mp4 jpg gif jpeg png mid jar sis zip 3gp";
$fpp = "4"; // files per page
$linkbackURL = "http://laxzamana/foto/index.php";
$linkbackNAME = "download foto";
echo "$sitetitle
Foto album
";
if ((!$sortorder1) && (!$sortorder2)){
$sortorder = "Alphabetical";
$so = "&so=Alphabetical";
}
# Get current page to be displayed.
#----------------------------------
if ($pagego == "")
{
$currentpage = $_GET["page"];
if ($currentpage < 1 | $currentpage == "")
{
$currentpage = 1;
}
}
else
{
$currentpage = "$pagego";
}
# If no records per page is selected, set the default.
#-----------------------------------------------------
if ($rpp == "") $rpp = "$fpp";
if ((!$rpp1) && (!$rpp2)){
$records_per_page = $rpp;
$rpp3 = "&rpp=$records_per_page";
}
$pmax = "$rpp";
# Read current directory.
#------------------------
$d = dir(".");
while (false !== ($file = $d->read())) {
# Get all the file attributes.
#-----------------------------
$size = filesize($file);
$type = filetype($file);
$ext = strrchr($file,'.');
$modified = stat("$file");
$displayname = str_replace (strrchr ($file, "."), "", $file);
$display_list = "$displaylist";
if (($type == file) && (preg_match ("/$ext/i", $display_list))) {
# Format the Dispayed filename.. replace underscore with a space
# and Change each word to start with an upper case letter.
#---------------------------------------------------------------
$displayname = str_replace("_"," ",$displayname);
$displayname = strtolower($displayname);
$displayname = ucwords($displayname);
$filedate = date("m-d-y",$modified[9]);
# Format the output depending on sort order and search criteria.
#---------------------------------------------------------------
if ((!$search) && ($sortorder == "Alphabetical")){
$filename[$totalfiles] = "$displayname|$displayname|$file|$ext|$size|$filedate|$content|$upload_date";
}
$totalbytes = $totalbytes + $size;
$totalfiles++;
}
}
# Sort by filename.
#------------------
if (($filename) && ($sortorder == "Alphabetical")){
sort ($filename,SORT_REGULAR);
reset ($filename);
$select1 = "selected";
$select2 = "";
$select3 = "";
$select4 = "";
$match = 1;
}
# Pagination Start.
#------------------
if ($records_per_page < 1){
$records_per_page = $totalfiles + 1;
}
If ($totalfiles > $records_per_page){
$totalpages = ceil($totalfiles/$records_per_page);
$flag = 0;
if ($currentpage > $totalpages){
$currentpage = 1;
}
}ELSE{
$flag = 1;
}
# Print out the top of the form and search criteria boxes.
#---------------------------------------------------------
?>
# Start main loop.
#-----------------
if ($match > 0){
while (list ($key, $val) = each ($filename)) {
if ($key >= ($records_per_page-$records_per_page)+(($currentpage-1)*$records_per_page) && $key <= ($records_per_page-1)+(($currentpage-1)*$records_per_page)){
$fileattr = explode("|", $val);
# Fix and format Byte Length
#---------------------------
if ($fileattr[4] < pow(2,10)){
$size = "$fileattr[4]B";
}
if ($fileattr[4] >= pow(2,10) && $fileattr[4] < pow(2,20)) {
$size = round($fileattr[4] / pow(2,10), 2)."KB";
}
if ($fileattr[4] >= pow(2,20) && $fileattr[4] < pow(2,30)) {
$size = round($fileattr[4] / pow(2,20), 2)."MB";
}
if ($fileattr[3] > pow(2,30)) {
$size = round($fileattr[4] / pow(2,30), 2)."GB";
}
$thisfile = "$fileattr[2]";
$thatfile = str_replace(".nth","","$thisfile");
print "![]()
download
Url: http://laxzamana.co.cc/foto/album/$thatfile
Size : $size
";
}
}
}
#-------------------------------------------------------------------------------------
# End main loop.
# Generate page number links.
#----------------------------
if ($flag == 0){
$previouspage = $currentpage-1;
if ($previouspage < 1){
$previouspage = 1;
}
$nextpage = $currentpage+1;
if ($nextpage > $totalpages){
$nextpage = $totalpages;
}
if ($currentpage != $totalpages ) print "»";
}
if ($currentpage > 1) print "«";
$z = 1;
while ($z <= $totalpages){
if ($z == $currentpage){
$size = $display_selected_size;
}ELSE{
$size = $display_pagination_size;
}
$z++;
}
#----------------------------
if ($totalbytes < pow(2,10)){
$totalsize = "$totalbytesB";
}
if ($totalbytes >= pow(2,10) && $totalbytes < pow(2,20)) {
$totalsize = round($totalbytes / pow(2,10), 0)."KB";
}
if ($totalbytes >= pow(2,20) && $totalbytes < pow(2,30)) {
$totalsize = round($totalbytes / pow(2,20), 0)."MB";
}
echo"
nuju hal:";
echo "