• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

gamehackz

New Member
Cho mình xin code filelist ảnh PHP
Ai giúp mình với
 
<?php
Error_Reporting(E_ALL& ~E_NOTICE);
header("Chace-Control: no-chace");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, dMYH:i:s") . " GMT");
header("Content-Type: text/html; charset=utf-8");
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
$displaylist = "bmp jpg gif jpeg png bmp";
$fpp = "5"; // files per page
$linkbackURL = "index.php";
$linkbackNAME = "Quay lại";
include("../../header.php");
echo '<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">a.pagenav {
border: 1px solid #c0c0d5;
padding: 0px 3px 0px 3px;
text-decoration: none;
}

a.pagenav:hover {
background-color: #f7f7f7;
border: 1px solid #dedede;
</style>
</head>
<div class=quang><center><b><small>Danh sách hình ảnh</b></center></div>';
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(".jpg","","$thisfile");
print "<div class=cool><img border=\"2\"src=\"./$thisfile\"height=\"62\"weight=\"110\"></img></div><div class=cool>Kích cỡ : $size</div><div class=cool><a href=\"./$thisfile\"><small>Tải về Hình ảnh</small></a></div>";
}
}
}
#-------------------------------------------------------------------------------------
# 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 > 1) print "<a class=\"ads\" href=\"./index.php?page=$previouspage&rpp=$rpp&so=alphabetical&act=$act&stringy=$stringy&ses=$ses\"><b>«</a></b>";
for($lui=$previouspage-5;$lui<=$previouspage;$lui++)if($lui>0)echo "<a class=\"pagenav\" href='index.php?page=$lui'> $lui </a>";
for($tien=$nextpage;$tien<$nextpage+5;$tien++)if($tien<=$totalpages) echo "<a class=\"ads\" href='index.php?page=$tien'> $tien </a>";

if ($currentpage != $totalpages ) print "<a class=\"ads\" href=\"./index.php?page=$nextpage&rpp=$rpp&so=alphabetical&act=$act&stringy=$stringy&ses=$ses\"><b>»</b></a></div>";
}

$z = 1;
while ($z <= $totalpages){
if ($z == $currentpage){
$size = $display_selected_size;
}ELSE{
$size = $display_pagination_size;
}
$z++;
}
#----------------------------
if ($totalbytes < pow(2,10)){
$totalsize = "$totalbytes<small>B</small>";
}
if ($totalbytes >= pow(2,10) && $totalbytes < pow(2,20)) {
$totalsize = round($totalbytes / pow(2,10), 0)."<small>KB</small>";
}
if ($totalbytes >= pow(2,20) && $totalbytes < pow(2,30)) {
$totalsize = round($totalbytes / pow(2,20), 0)."<small>MB</small>";
}

echo"<div class=viet>Đi tới:<form action=\"index.php?\" method=\"get\"><input type=\"text\" name=\"page\" size=\"3\" value=\"$nextpage\"><input type=\"submit\" class=\"quang\" value=\"GO\"></form></div>";
echo "</div></div>";
Include("../../footer.php")?>
 
Tạo thư mục lá gì

----------> Bổ sung bài viết lúc 12:56 PM <----------> Bài viết trước lúc 12:53 PM <----------

Thư mục chứa ảnh là gì admin!! Tạo file index.php copy code vào rùi sao nữa!!!
 

Facebook Comments

Similar threads
Thread starter Title Forum Replies Date
L Xin Ai có Hosting không dùng thì cho mình xin được không Hosting & Domain Share 3
N Hỏi Ai có tiện ích online trên wap không cho mình xin !! Johncms 0
H Xin Ae cho mình xin code này PHP 14
S Xin Ai co style vbb4.0.2 mobile cho mình xin Vbulletin 0
T Xin Admin và ae cho mình xin code lượt xem bài viết cho johncms với Johncms 9
Lee_Jin Xin Ai có code shoutbox Johncms 5.1 không cho mình xin Johncms 0
Yeukodamnoi Cho mình xin game đá bóng dưới 1Gb cho pc Trò chơi 0
T Ae ttvn cho mình xin 1sms vào sđt này với ạ Trò chuyện linh tinh 0
Myshare Xin Special_One online cho mình xin lại cp domain vipbackan.biz. Hosting / Domain 1
G Cho mình xin lại code johncms zicvn.mobi Johncms 0
E Ai cho mình xin code php import files PHP 3
G Ai biết wap nào host free cp11 việt nam ko?? Cho mình xin Hosting & Domain Free 0
N Xin [Admin] Cho mình xin cái mod này Add-ons 1
S Xin Xin domain ko dùng nưã! Ai có cho mình Hosting & Domain Free 1
nhokzodanh Xin ae cho mình xin để học hỏi kinh nghiệm Johncms 6
G Cho mình xin code filelist này được ko? HTML & CSS 1
P Xin Cho mình xin file hoạtđộng với. Johncms 2
S Ae cho mình xin code punc google and facebo0k like, Thông tin các mạng di động 5
G Admin ơi cho mình xin code chia trang php Mã nguồn wap 0
C Xin Ai cho mình xin zip game ola+qplay crack để làm filelis được k Thảo luận wap việt 0
Yeukodamnoi Tucuong ơi, cho mình xin Code tạo ảnh game đột kích như wap bạn đi. Mã nguồn wap 1
Yeukodamnoi [you] có filelist ảnh cho wapmienphi nào đẹp không cho mình xin. Wap builder, wapego, xtgem, wen.ru, wapka, wap4 1
Q Hỏi Anh em TTVN cho mình xin cái hướng dẫn làm Forum VBB Vbulletin 3
N Xin Xin TTVN tài trợ cho mình cái Host Hosting & Domain Share 4
K [you] có code leech truyện cho johncms cho mình xin Johncms 3
T ai có blog johncms cho mình xin! Johncms 5
A Admin có tool auto ***tgem cho mình xin Mã nguồn wap 4
H Anh Thắng và ae TTVN cho mình xin cp11 Hosting & Domain Free 5
Yeukodamnoi Ai có Code wap upload nào hay cho mình xin Mã nguồn web 1
N Xin admin cho mình xin bộ rank cf Vbulletin 5
T Xin anh em share cho mình cái wap Thảo luận wap việt 1
Yeukodamnoi Game pc Ai có link game Gta SA không cho mình xin Trò chơi 0
C Help Thawngsvip vào cho mình xin 1 cái host với đang cần gấp Hosting & Domain Free 13
Yeukodamnoi Help Cho mình xin code nhạc nền mp3 khi truy cập bằng pc HTML & CSS 1
H Ai cho mình xin mod auto leech vbb Add-ons 1
N Admin cho mình xin bộ level cf của wap Vbulletin 3
Q Hỏi Ai có cho mình xin vài link down .zip Mã nguồn wap 1
P Phần mềm PC ai có file ppu của 5130 cho mình xin với ? Phần mềm 2
B Help [you] cho mình xin code wapvn.mobi được không? Wap builder, wapego, xtgem, wen.ru, wapka, wap4 9
B Help [you] cho mình Xin code johcms Johncms 9
H Ace cho mình xin bộ mặt cười của zingme và yahoo với Vbulletin 5
Z Help Admin ơi cho mình xin mấy cái bbcode Phpbb3x 7
N Ae ai có grab này ko? Cho mình xin PHP 12
M Ai Có Code Giống Wap Này Cho Mình Xin Johncms 8
M Help Ae Cho Mình Xin Cái Hình Admin,Smod,Mod Như Wáp Johncms 7
Q S40 Ae vào cho mình xin cái link S40 2
T Anh em ơi, cho mình xin 2000đ đi. Thông tin các mạng di động 7
T Help Ai có code này k cho mình xin Johncms 2
mày.hả.bưởi ACE cho mình xin code backup file trên hosting Mã nguồn wap 5
F Admin cho mình xin template postbit_leacy style mobile tuoitrevn đang dùng Style vbb 2

Similar threads

New posts New threads New resources

Back
Top