Please masters Modify Dload script. [Help!]

Started on the old forum in May 2010 · view the original in the archive · old links redirect here

28 replies · 1,661 views · started 16 years ago · 1 min read

4 participants
Rocky01 Junior · 44 posts #1

Here is the 'Dload' script File added Demo: Download Zone Modify to include main index page

  1. Delete WML version
  2. Uninclude 'head.php' & 'foot.php'
  3. I want to include on my main index page Example what I need SamWep.com :: Free Mobile Ringtones, Wallpapers, Games, Themes, Softwares, Video, MP3, Wav, Polyphonic, Old Songs, Romantic Hindi Music, Instrumentals, to download.. Free SMS, Mobile Tricks, Mobile Cracks.
  • Add folder 'down' and 'errors'
  • 'down'--> download dir, u can add folder, file here

@n@l

Attachments: Wap49.zip
makvanpor2000 Senior · 299 posts #2

rocky01 wrote: here is the 'dload' script http://wap49.co.cc/wap49.zip demo: download zone modify to include main index page

  1. Delete wml version
  2. Uninclude 'head.php' & 'foot.php'
  3. I want to include on my main index page example what i need samwep.com :: Free mobile ringtones, wallpapers, games, themes, softwares, video, mp3, wav, polyphonic, old songs, romantic hindi music, instrumentals, to download.. Free sms, mobile tricks, mobile cracks.
  • add folder 'down' and 'errors'
  • 'down'--> download dir, u can add folder, file here

be coder and code this,there all the features here in the coding forum and stop waiting for someone to help you.................

something else Fellow · 2,296 posts #3

using a head and foot on separate pages saves you from having to duplicate the same code over and over again

Rocky01 Junior · 44 posts #4

I tried many time but i'm failed. So that i post here. I'm also on mobile. So, i need masters help. When i tried to moadify it failed. What can i do. I will wait 4 help

@n@l

something else Fellow · 2,296 posts #5

Rocky01 wrote: I tried many time but i'm failed. So that i post here. I'm also on mobile. So, i need masters help. When i tried to moadify it failed. What can i do. I will wait 4 help

Status code 404 on your download link 😛

something else Fellow · 2,296 posts #7

I can see why u want the wml removed there is loads of errors in wml version lol easyist way is just to remove the wml link in index:

if ($ver=='xhtml')
{
echo "<a href=\"index.php?ver=wml\">Wml</a> | Xhtml<br />\r\n";
}
else
{
echo "Wml | <a href=\"index.php?ver=xhtml\">Xhtml</a><br />\r\n";
}

use this as head.php :

<?
header('Cache-Control: no-cache');
header('Content-type: application/xhtml+xml');
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10-flat.dtd\">\r\n";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\r\n";
echo "<head>\r\n";
echo "<title>$title</title>\r\n";
echo "<link rel=\"stylesheet\" href=\"css.css\" type=\"text/css\" />";
echo "</head>\r\n";
echo "<body>\r\n";
echo "<div class=\"header\"><b>MastiLoad.tk/$kat/$razd/</b><br/></div>";
?>

And this as foot.php :

<?
echo "Online: <a href='who.php'>";
include "online.php";
echo "</a>\r\n";
echo "<div class=\"header\"><b><a href=\"http://mastiload.tk\">Mastiload.tk</a><br />\r\n</b></div>";
echo "</body>\r\n";
echo "</html>";
?>
Rocky01 Junior · 44 posts #8

I don't need the head.php and foot.php. I say not include in script. U missunderstand. Delete head and foot frm script. I want to include this page on main index page

@n@l

something else Fellow · 2,296 posts #9

just copy the above codes directly on to the top and bottom of pages and then remove include('head.php'); and include('foot.php'); eg: for index.php

<?
Error_Reporting(E_ALL & ~E_NOTICE);
Error_Reporting (ERROR | WARNING);
include "ini.php";

$time=time();
$s_files='0';
$k_files='0';
$k_n_files='0';
$dir_1_open = opendir ("$downloads");
while ($dir_1_files = readdir ($dir_1_open))
{
if (( $dir_1_files != ".") && ($dir_1_files != "..") && ($dir_1_files != ".htaccess") && ($dir_1_files != "index.php"))
{
$dir_2_open=opendir ("$downloads/$dir_1_files");
while ($dir_2_files = readdir ($dir_2_open))
{
if (( $dir_2_files != ".") && ($dir_2_files != "..") && ($dir_2_files != ".htaccess") && ($dir_2_files != "dir_name.txt") && ($dir_2_files != "index.php") && !ereg("dir_img",$dir_2_files))
{
$dir_3_open=opendir ("$downloads/$dir_1_files/$dir_2_files");
while ($dir_3_files = readdir ($dir_3_open))
{
if (( $dir_3_files != ".") && ($dir_3_files != "..") && ($dir_3_files != ".htaccess") && !ereg(".opis$",$dir_3_files) && !ereg(".kmt$",$dir_3_files) && !ereg(".ocnk$",$dir_3_files) && !ereg(".skch$",$dir_3_files) && !ereg(".GIF$",$dir_3_files) && !ereg(".JPG$",$dir_3_files) && !ereg(".PNG$",$dir_3_files) && !ereg(".jad$",$dir_3_files) && !ereg(".txt$",$dir_3_files) && !ereg(".name$",$dir_3_files) && !ereg(".php",$dir_3_files) && !ereg("dir_img",$dir_3_files)) // эти файлы игнорируем
{
$s_files=$s_files + filesize("$downloads/$dir_1_files/$dir_2_files/$dir_3_files");
$k_files++;
$filtime=filemtime ("$downloads/$dir_1_files/$dir_2_files/$dir_3_files");
$filtime=$filtime+(3600*24*5);
if($filtime>=$time)
{
$k_n_files++;
}}}}}}}
if (isset ($_GET['ver']))
{$ver=$_GET['ver'];}
else
{$ver='';}
if (isset ($_GET['kat']) && $_GET['kat']!='') /// если уже выбрана категория
{
$kat=$_GET['kat'];
if (ereg ("../", $kat))
{
header('Cache-Control: no-cache'); 
header('Content-type: application/xhtml+xml'); 
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"; 
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10-flat.dtd\">\r\n"; 
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\r\n"; 
echo "<head>\r\n"; 
echo "<title>$title</title>\r\n"; 
echo "<link rel=\"stylesheet\" href=\"css.css\" type=\"text/css\" />"; 
echo "</head>\r\n"; 
echo "<body>\r\n"; 
echo "<div class=\"header\"><b>MastiLoad.tk/$kat/$razd/</b><br/></div>";
echo "****!!!!!!!!!";
echo "Online: <a href='who.php'>"; 
include "online.php"; 
echo "</a>\r\n"; 
echo "<div class=\"header\"><b><a href=\"http://mastiload.tk\">Mastiload.tk</a><br />\r\n</b></div>"; 
echo "</body>\r\n"; 
echo "</html>";
exit;
}
header('Cache-Control: no-cache'); 
header('Content-type: application/xhtml+xml'); 
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"; 
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10-flat.dtd\">\r\n"; 
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\r\n"; 
echo "<head>\r\n"; 
echo "<title>$title</title>\r\n"; 
echo "<link rel=\"stylesheet\" href=\"css.css\" type=\"text/css\" />"; 
echo "</head>\r\n"; 
echo "<body>\r\n"; 
echo "<div class=\"header\"><b>MastiLoad.tk/$kat/$razd/</b><br/></div>";

if (isset ($_GET['razd']) && $_GET['razd']!='')
{
$razd=$_GET['razd'];
if (ereg ("../", $razd))
{
include "head.php";
echo "****!!!!!!!!!";
include "foot.php";
exit;
}
if ($ver=='xhtml')
{
echo "<div class=\"a\">\r\n";
}
if (isset ($_GET['page']) && $_GET['page']!='')
{
$page=intval($_GET['page']);
}
else
{
$page='1';
}

if ($dir_k = @opendir ("$downloads/$kat/$razd"))
{
$k_files='0';
while ($k_file = @readdir ($dir_k))
{
if (( $k_file != ".") && ($k_file != "..") && ($k_file != ".htaccess") && !ereg(".opis$",$k_file) && !ereg(".kmt$",$k_file) && !ereg(".ocnk$",$k_file) && !ereg(".skch$",$k_file) && !ereg(".GIF$",$k_file) && !ereg(".JPG$",$k_file) && !ereg(".PNG$",$k_file) && !ereg(".jad$",$k_file) && !ereg(".txt$",$k_file) && !ereg(".name$",$k_file) && !ereg(".php",$k_file) && !ereg("dir_img",$k_file)) // эти файлы игнорируем

{$k_files++;}

}

}
$t_f='0';
if ($dir = @opendir ("$downloads/$kat/$razd"))
{
while ($file = @readdir ($dir)) 
{

if (( $file != ".") && ($file != "..") && ($file != ".htaccess") && !ereg("dir_img",$file) && !ereg(".opis$",$file) && !ereg(".kmt$",$file) && !ereg(".ocnk$",$file) && !ereg(".skch$",$file) && !ereg(".GIF$",$file) && !ereg(".JPG$",$file) && !ereg(".PNG$",$file) && !ereg(".jad$",$file) && !ereg(".txt$",$file) && !ereg(".name$",$file) && !ereg(".php",$file)) // эти файлы игнорируем
{
$t_f++;
if ($t_f<=$page*$files_na_str && $t_f>$page*$files_na_str-$files_na_str)
{
if ($filename=@file("$downloads/$kat/$razd/$file.name"))
{$name=$filename[0];}
else
{
$name=$file;
$name=ereg_replace(".zip$","",$name);
$name=ereg_replace(".rar$","",$name);
$name=ereg_replace(".amr$","",$name);
$name=ereg_replace(".sis$","",$name);
$name=ereg_replace(".3gp$","",$name);
$name=ereg_replace(".avi$","",$name);
$name=ereg_replace(".mp3$","",$name);
$name=ereg_replace(".wav$","",$name);
$name=ereg_replace(".mmf$","",$name);
$name=ereg_replace(".mid$","",$name);
$name=ereg_replace(".jar$","",$name);
$name=ereg_replace(".gif$","",$name);
}
if ($ver=='xhtml')
{
echo "<div class=\"file\">\r\n";
}

$rashir=explode(".", "$file");
$count_rashsir=count($rashir);
$rashir=$rashir[$count_rashsir-1];
if (file_exists("img/$rashir.$f_kart"))
{
echo "<img src=\"img/$rashir.$f_kart\" alt=\"\" />";
}
else
{
echo "<img src=\"img/default.$f_kart\" alt=\"\" />";
}

echo " <a href=\"file.php?ver=$ver&kat=$kat&razd=$razd&file=$file&page=$page\"><b>$name</b></a>";
$filetime=@filemtime ("$downloads/$kat/$razd/$file"); // узнаем время создания файла
$filetime=$filetime+(3600*24*$period);
if($filetime>$time)
{
echo " <font color=\"#FF0000\">(new)</font>";
}
$filesize=@filesize("$downloads/$kat/$razd/$file"); // узнаем размер файла
$filesize_ed='b';
if ($filesize>=1024)
{
$filesize= round($filesize/1024 , 1);
$filesize_ed='Kb';
}
if ($filesize>=1024)
{
$filesize= round($filesize/1024 , 1);
$filesize_ed='Mb';
}
echo " ($filesize $filesize_ed)";

if ($ver=='xhtml')
{
echo "\r\n</div>\r\n";
}
else
{
echo "<br />\r\n";
}
echo "<small>\r\n";
if (@file("$downloads/$kat/$razd/$file.skch")) 
{
$skch=file("$downloads/$kat/$razd/$file.skch"); // количество скачиваний и дата последнего скачивания
$skch=explode("|::|",$skch[0]);
$k_load=$skch[0];
$d_load=$skch[1]; // время последнего скачивания
echo "Downloads: <b>$k_load</b><br />\r\n";
}
else
{
echo "Downloads: 0<br />\r\n";
}
if (file_exists("$downloads/$kat/$razd/$file.ocnk")) 
{
$ocnk=file("$downloads/$kat/$razd/$file.ocnk");
$k_oc=count($ocnk);
$sr_oc='0';
for ($i=0;$i<$k_oc;$i++)
{
$sr_oc=$sr_oc+$ocnk[$i];
}
$sr_oc=round($sr_oc/$k_oc , 0);
echo "Rating: <b>$sr_oc</b> /$k_oc<br />\r\n";
}
else
{
echo "Rating: 0/0<br />\r\n";
}
if (file_exists("$downloads/$kat/$razd/$file.kmt"))
{
$komm=file("$downloads/$kat/$razd/$file.kmt");
$k_komm=count($komm);
echo "<a href=\"komm.php?ver=$ver&kat=$kat&razd=$razd&file=$file&page=$page\">Comments:</a> <b>$k_komm</b><br />\r\n";
}
else
{
echo "<a href=\"komm.php?ver=$ver&kat=$kat&razd=$razd&file=$file&page=$page\">Comments:</a> <b>0</b><br />\r\n";
}

echo "</small>\r\n";

}
}
}
$k_str=round($k_files/$files_na_str,0);
$page_p=$page-1;
$page_n=$page+1;
echo "<hr />\r\n";
if ($page>1 && $page<=$k_str)
{
echo "<a href=\"index.php?ver=$ver&kat=$kat&razd=$razd&page=$page_p\"><b>« Prev</b></a> |";
}
if ($page>=1 && $page<$k_str)
{
echo "| <a href=\"index.php?ver=$ver&kat=$kat&razd=$razd&page=$page_n\"><b>Next »</b></a>";
}
echo "<br />\r\nFiles: $k_files files<br />\r\n";
echo "Pages: <b>$page</b> /$k_str\r\n";
echo "<hr />\r\n";
echo "<a href=\"index.php?ver=$ver&kat=$kat\">Categories</a><br />\r\n";
echo "<a href=\"index.php?ver=$ver\">Downloads</a><br />\r\n";
echo "<hr />\r\n";
if ($ver=='xhtml')
{
echo "<br />\r\n<a href=\"index.php?ver=wml&kat=$kat&razd=$razd\">Wml</a> | Xhtml<br />\r\n";
}
else
{
echo "<br />\r\nWml | <a href=\"index.php?ver=xhtml&kat=$kat&razd=$razd\">Xhtml</a><br />\r\n";
}
closedir ($dir);
}
else
{
echo "Ошибка, такого раздела не существует";
}
if ($ver=='xhtml')
{
echo "</div>\r\n";
}
include "foot.php";
exit;
}

if ($ver=='xhtml')
{
echo "<div class=\"a\">\r\n";
}
if ($dir = @opendir ("$downloads/$kat"))
{
while ($dir2 = @readdir ($dir)) 
{
if (( $dir2 != ".") && ($dir2 != "..") && ($dir2 != ".htaccess") && ($dir2 != "dir_name.txt") && ($dir2 != "index.php") && !ereg("dir_img",$dir2)) // эти файлы игнорируем
{
$dir2name=$dir2;
$dir3 = @opendir ("$downloads/$kat/$dir2");
while ($dir4 = @readdir ($dir3)) 
{
if ($dir4=="dir_name.txt")
{
$dir2name=@file("$downloads/$kat/$dir2/dir_name.txt");
$dir2name=$dir2name[0];
}
}
if ($ver=='xhtml')
{
echo "<div class=\"dir\">\r\n";
}
if (file_exists("$downloads/$kat/$dir2/dir_img.gif"))
{
echo "<img src=\"$downloads/$kat/$dir2/dir_img.gif\" alt=\"\" />";
}
elseif (file_exists("$downloads/$kat/$dir2/dir_img.png"))
{
echo "<img src=\"$downloads/$kat/$dir2/dir_img.png\" alt=\"\" />";
}
elseif (file_exists("$downloads/$kat/$dir2/dir_img.jpg"))
{
echo "<img src=\"$downloads/$kat/$dir2/dir_img.jpg\" alt=\"\" />";
}
else
{
echo "<img src=\"img/dir.$f_kart\" alt=\"\" />";
}

$s_files3='0';
$k_files3='0';
$k_n_files3='0';
$dir_3_open=opendir ("$downloads/$kat/$dir2");
while ($dir_3_files = readdir ($dir_3_open))
{
if (( $dir_3_files != ".") && ($dir_3_files != "..") && ($dir_3_files != ".htaccess") && !ereg(".opis$",$dir_3_files) && !ereg(".kmt$",$dir_3_files) && !ereg(".ocnk$",$dir_3_files) && !ereg(".skch$",$dir_3_files) && !ereg(".GIF$",$dir_3_files) && !ereg(".JPG$",$dir_3_files) && !ereg(".PNG$",$dir_3_files) && !ereg(".jad$",$dir_3_files) && !ereg(".txt$",$dir_3_files) && !ereg(".name$",$dir_3_files) && !ereg(".php",$dir_3_files) && !ereg("dir_img",$dir_3_files)) // эти файлы игнорируем
{
$s_files3=$s_files3 + filesize("$downloads/$kat/$dir2/$dir_3_files");
$k_files3++;
$filtime=filemtime ("$downloads/$kat/$dir2/$dir_3_files");
$filtime=$filtime+(3600*24*5);
if($filtime>=$time)
{
$k_n_files3++;
}}}

echo " <a href=\"index.php?ver=$ver&kat=$kat&razd=$dir2\"><b>$dir2name</b></a>";
echo ' (';
echo "$k_files3";
if ($k_n_files3>'0'){echo " <font color=\"#FF0000\">+$k_n_files3</font>";}
echo ')';
if ($ver=='xhtml')
{
echo "\r\n</div>\r\n";
}
else
{
echo "<br />\r\n";
}
}
}
closedir ($dir);
echo "<hr />\r\n";
echo "<a href=\"index.php?ver=$ver\">Downloads</a><br />\r\n";
echo "<hr />\r\n";
if ($ver=='xhtml')
{
echo "<a href=\"index.php?ver=wml&kat=$kat\">Wml</a> | Xhtml<br />\r\n";
}
else
{
echo "Wml | <a href=\"index.php?ver=xhtml&kat=$kat\">Xhtml</a><br />\r\n";
}
}
else
{echo "Ошибка, такой категории не существует";}
if ($ver=='xhtml')
{
echo "</div>\r\n";
}
include "foot.php";
exit;
}

/////////////////////////////////////////////////////////////
//////////////////////// показ разделов /////////////////////
/////////////////////////////////////////////////////////////
include "head.php";
if ($ver=='xhtml')
{
echo "<div class=\"a\">\r\n";
}
if ($ver=='xhtml')
{
echo "<div class=\"b\">\r\n";
echo "Downloads";
echo "</div>\r\n";
}
$dir = opendir ("$downloads");
while ($dir2 = readdir ($dir)) 
{
if (( $dir2 != ".") && ($dir2 != "..") && ($dir2 != ".htaccess") && ($dir2 != "index.php")) // эти файлы игнорируем
{

$dir3 = opendir ("$downloads/$dir2");

if (file_exists("$downloads/$dir2/dir_name.txt"))
{
$dir2name=@file("$downloads/$dir2/dir_name.txt");
$dir2name=$dir2name[0];
}
else
{
$dir2name=$dir2;
}

if ($ver=='xhtml')
{
echo "<div class=\"dir\">\r\n";
}
if (file_exists("$downloads/$dir2/dir_img.gif"))
{
echo "<img src=\"$downloads/$dir2/dir_img.gif\" alt=\"\" />";
}
elseif (file_exists("$downloads/$dir2/dir_img.png"))
{
echo "<img src=\"$downloads/$dir2/dir_img.png\" alt=\"\" />";
}
elseif (file_exists("$downloads/$dir2/dir_img.jpg"))
{
echo "<img src=\"$downloads/$dir2/dir_img.jpg\" alt=\"\" />";
}
else
{
echo "<img src=\"img/dir.$f_kart\" alt=\"\" />";
}

$s_files2='0';
$k_files2='0';
$k_n_files2='0';

$dir_2_open=opendir ("$downloads/$dir2");
while ($dir_2_files = readdir ($dir_2_open))
{
if (( $dir_2_files != ".") && ($dir_2_files != "..") && ($dir_2_files != ".htaccess") && ($dir_2_files != "dir_name.txt") && ($dir_2_files != "index.php") && !ereg("dir_img",$dir_2_files))
{
$dir_3_open=opendir ("$downloads/$dir2/$dir_2_files");
while ($dir_3_files = readdir ($dir_3_open))
{
if (( $dir_3_files != ".") && ($dir_3_files != "..") && ($dir_3_files != ".htaccess") && !ereg(".opis$",$dir_3_files) && !ereg(".kmt$",$dir_3_files) && !ereg(".ocnk$",$dir_3_files) && !ereg(".skch$",$dir_3_files) && !ereg(".GIF$",$dir_3_files) && !ereg(".JPG$",$dir_3_files) && !ereg(".PNG$",$dir_3_files) && !ereg(".jad$",$dir_3_files) && !ereg(".txt$",$dir_3_files) && !ereg(".name$",$dir_3_files) && !ereg(".php",$dir_3_files) && !ereg("dir_img",$dir_3_files)) // эти файлы игнорируем
{
$s_files2=$s_files2 + filesize("$downloads/$dir2/$dir_2_files/$dir_3_files");
$k_files2++;
$filtime=filemtime ("$downloads/$dir2/$dir_2_files/$dir_3_files");
$filtime=$filtime+(3600*24*5);
if($filtime>=$time)
{
$k_n_files2++;
}}}}}

echo " <a href=\"index.php?ver=$ver&kat=$dir2\"><b>$dir2name</b></a>\r\n";
echo '(';
echo "$k_files2";
if ($k_n_files2>'0'){echo " <font color=\"#FF0000\">+$k_n_files2</font>";}
echo ')';

if ($ver=='xhtml')
{
echo "</div>\r\n";
}
else
{
echo "<br />\r\n";
}
}
}
echo "<hr />\r\n";
echo "Number of Files: $k_files<br />\r\n";
if ($k_n_files>'0'){echo "New: $k_n_files<br />\r\n";}
if ($s_files>=1024)
{
$s_files= round($s_files/1024 , 2);
$s_files_ed='Kb';
}
if ($s_files>=1024)
{
$s_files= round($s_files/1024 , 2);
$s_files_ed='Mb';
}
if ($s_files>=1024)
{
$s_files= round($s_files/1024 , 2);
$s_files_ed='Gb';
}
echo "Total size: $s_files $s_files_ed<br />\r\n";
echo "<hr />\r\n";
if ($ver=='xhtml')
{
echo "<a href=\"index.php?ver=wml\">Wml</a> | Xhtml<br />\r\n";
}
else
{
echo "Wml | <a href=\"index.php?ver=xhtml\">Xhtml</a><br />\r\n";
}
closedir ($dir);

if ($ver=='xhtml')
{
echo "</div>\r\n";
}
echo "Online: <a href='who.php'>"; 
include "online.php"; 
echo "</a>\r\n"; 
echo "<div class=\"header\"><b><a href=\"http://mastiload.tk\">Mastiload.tk</a><br />\r\n</b></div>"; 
echo "</body>\r\n"; 
echo "</html>";
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
?>
Rocky01 Junior · 44 posts #10

u jst replace the head.php and foot.php wid the head code and foot code. I dnt need head and foot as i include this script page to my main index.php. I say, delete the wml version. Remove xhtml and wml version link. REMOVE head and foot.

@n@l

something else Fellow · 2,296 posts #11
<?
Error_Reporting(E_ALL & ~E_NOTICE);
Error_Reporting (ERROR | WARNING);
include "ini.php";

$time=time();
$s_files='0';
$k_files='0';
$k_n_files='0';
$dir_1_open = opendir ("$downloads");
while ($dir_1_files = readdir ($dir_1_open))
{
if (( $dir_1_files != ".") && ($dir_1_files != "..") && ($dir_1_files != ".htaccess") && ($dir_1_files != "index.php"))
{
$dir_2_open=opendir ("$downloads/$dir_1_files");
while ($dir_2_files = readdir ($dir_2_open))
{
if (( $dir_2_files != ".") && ($dir_2_files != "..") && ($dir_2_files != ".htaccess") && ($dir_2_files != "dir_name.txt") && ($dir_2_files != "index.php") && !ereg("dir_img",$dir_2_files))
{
$dir_3_open=opendir ("$downloads/$dir_1_files/$dir_2_files");
while ($dir_3_files = readdir ($dir_3_open))
{
if (( $dir_3_files != ".") && ($dir_3_files != "..") && ($dir_3_files != ".htaccess") && !ereg(".opis$",$dir_3_files) && !ereg(".kmt$",$dir_3_files) && !ereg(".ocnk$",$dir_3_files) && !ereg(".skch$",$dir_3_files) && !ereg(".GIF$",$dir_3_files) && !ereg(".JPG$",$dir_3_files) && !ereg(".PNG$",$dir_3_files) && !ereg(".jad$",$dir_3_files) && !ereg(".txt$",$dir_3_files) && !ereg(".name$",$dir_3_files) && !ereg(".php",$dir_3_files) && !ereg("dir_img",$dir_3_files)) // эти файлы игнорируем
{
$s_files=$s_files + filesize("$downloads/$dir_1_files/$dir_2_files/$dir_3_files");
$k_files++;
$filtime=filemtime ("$downloads/$dir_1_files/$dir_2_files/$dir_3_files");
$filtime=$filtime+(3600*24*5);
if($filtime>=$time)
{
$k_n_files++;
}}}}}}}

if (isset ($_GET['kat']) && $_GET['kat']!='') /// если уже выбрана категория
{
$kat=$_GET['kat'];
if (ereg ("../", $kat))
{
echo "<div class=\"header\"><b>MastiLoad.tk/$kat/$razd/</b><br/></div>";
echo "****!!!!!!!!!";
echo "Online: <a href='who.php'>";
include "online.php";
echo "</a>\r\n";
echo "<div class=\"header\"><b><a href=\"http://mastiload.tk\">Mastiload.tk</a><br />\r\n</b></div>";
exit;
}
echo "<div class=\"header\"><b>MastiLoad.tk/$kat/$razd/</b><br/></div>";

if (isset ($_GET['razd']) && $_GET['razd']!='')
{
$razd=$_GET['razd'];
if (ereg ("../", $razd))
{
echo "<div class=\"header\"><b>MastiLoad.tk/$kat/$razd/</b><br/></div>";
echo "****!!!!!!!!!";
echo "Online: <a href='who.php'>";
include "online.php";
echo "</a>\r\n";
echo "<div class=\"header\"><b><a href=\"http://mastiload.tk\">Mastiload.tk</a><br />\r\n</b></div>";
exit;
}

echo "<div class=\"a\">\r\n";

if (isset ($_GET['page']) && $_GET['page']!='')
{
$page=intval($_GET['page']);
}
else
{
$page='1';
}

if ($dir_k = @opendir ("$downloads/$kat/$razd"))
{
$k_files='0';
while ($k_file = @readdir ($dir_k))
{
if (( $k_file != ".") && ($k_file != "..") && ($k_file != ".htaccess") && !ereg(".opis$",$k_file) && !ereg(".kmt$",$k_file) && !ereg(".ocnk$",$k_file) && !ereg(".skch$",$k_file) && !ereg(".GIF$",$k_file) && !ereg(".JPG$",$k_file) && !ereg(".PNG$",$k_file) && !ereg(".jad$",$k_file) && !ereg(".txt$",$k_file) && !ereg(".name$",$k_file) && !ereg(".php",$k_file) && !ereg("dir_img",$k_file)) // эти файлы игнорируем

{$k_files++;}

}

}
$t_f='0';
if ($dir = @opendir ("$downloads/$kat/$razd"))
{
while ($file = @readdir ($dir)) 
{

if (( $file != ".") && ($file != "..") && ($file != ".htaccess") && !ereg("dir_img",$file) && !ereg(".opis$",$file) && !ereg(".kmt$",$file) && !ereg(".ocnk$",$file) && !ereg(".skch$",$file) && !ereg(".GIF$",$file) && !ereg(".JPG$",$file) && !ereg(".PNG$",$file) && !ereg(".jad$",$file) && !ereg(".txt$",$file) && !ereg(".name$",$file) && !ereg(".php",$file)) // эти файлы игнорируем
{
$t_f++;
if ($t_f<=$page*$files_na_str && $t_f>$page*$files_na_str-$files_na_str)
{
if ($filename=@file("$downloads/$kat/$razd/$file.name"))
{$name=$filename[0];}
else
{
$name=$file;
$name=ereg_replace(".zip$","",$name);
$name=ereg_replace(".rar$","",$name);
$name=ereg_replace(".amr$","",$name);
$name=ereg_replace(".sis$","",$name);
$name=ereg_replace(".3gp$","",$name);
$name=ereg_replace(".avi$","",$name);
$name=ereg_replace(".mp3$","",$name);
$name=ereg_replace(".wav$","",$name);
$name=ereg_replace(".mmf$","",$name);
$name=ereg_replace(".mid$","",$name);
$name=ereg_replace(".jar$","",$name);
$name=ereg_replace(".gif$","",$name);
}

echo "<div class=\"file\">\r\n";

$rashir=explode(".", "$file");
$count_rashsir=count($rashir);
$rashir=$rashir[$count_rashsir-1];
if (file_exists("img/$rashir.$f_kart"))
{
echo "<img src=\"img/$rashir.$f_kart\" alt=\"\" />";
}
else
{
echo "<img src=\"img/default.$f_kart\" alt=\"\" />";
}

echo " <a href=\"file.php?ver=$ver&kat=$kat&razd=$razd&file=$file&page=$page\"><b>$name</b></a>";
$filetime=@filemtime ("$downloads/$kat/$razd/$file"); // узнаем время создания файла
$filetime=$filetime+(3600*24*$period);
if($filetime>$time)
{
echo " <font color=\"#FF0000\">(new)</font>";
}
$filesize=@filesize("$downloads/$kat/$razd/$file"); // узнаем размер файла
$filesize_ed='b';
if ($filesize>=1024)
{
$filesize= round($filesize/1024 , 1);
$filesize_ed='Kb';
}
if ($filesize>=1024)
{
$filesize= round($filesize/1024 , 1);
$filesize_ed='Mb';
}
echo " ($filesize $filesize_ed)";

echo "\r\n</div>\r\n";

echo "<small>\r\n";
if (@file("$downloads/$kat/$razd/$file.skch")) 
{
$skch=file("$downloads/$kat/$razd/$file.skch"); // количество скачиваний и дата последнего скачивания
$skch=explode("|::|",$skch[0]);
$k_load=$skch[0];
$d_load=$skch[1]; // время последнего скачивания
echo "Downloads: <b>$k_load</b><br />\r\n";
}
else
{
echo "Downloads: 0<br />\r\n";
}
if (file_exists("$downloads/$kat/$razd/$file.ocnk")) 
{
$ocnk=file("$downloads/$kat/$razd/$file.ocnk");
$k_oc=count($ocnk);
$sr_oc='0';
for ($i=0;$i<$k_oc;$i++)
{
$sr_oc=$sr_oc+$ocnk[$i];
}
$sr_oc=round($sr_oc/$k_oc , 0);
echo "Rating: <b>$sr_oc</b> /$k_oc<br />\r\n";
}
else
{
echo "Rating: 0/0<br />\r\n";
}
if (file_exists("$downloads/$kat/$razd/$file.kmt"))
{
$komm=file("$downloads/$kat/$razd/$file.kmt");
$k_komm=count($komm);
echo "<a href=\"komm.php?ver=$ver&kat=$kat&razd=$razd&file=$file&page=$page\">Comments:</a> <b>$k_komm</b><br />\r\n";
}
else
{
echo "<a href=\"komm.php?ver=$ver&kat=$kat&razd=$razd&file=$file&page=$page\">Comments:</a> <b>0</b><br />\r\n";
}

echo "</small>\r\n";

}
}
}
$k_str=round($k_files/$files_na_str,0);
$page_p=$page-1;
$page_n=$page+1;
echo "<hr />\r\n";
if ($page>1 && $page<=$k_str)
{
echo "<a href=\"index.php?ver=$ver&kat=$kat&razd=$razd&page=$page_p\"><b>« Prev</b></a> |";
}
if ($page>=1 && $page<$k_str)
{
echo "| <a href=\"index.php?ver=$ver&kat=$kat&razd=$razd&page=$page_n\"><b>Next »</b></a>";
}
echo "<br />\r\nFiles: $k_files files<br />\r\n";
echo "Pages: <b>$page</b> /$k_str\r\n";
echo "<hr />\r\n";
echo "<a href=\"index.php?ver=$ver&kat=$kat\">Categories</a><br />\r\n";
echo "<a href=\"index.php?ver=$ver\">Downloads</a><br />\r\n";
echo "<hr />\r\n";

echo "<br />\r\n<a href=\"index.php?ver=wml&kat=$kat&razd=$razd\">Wml</a> | Xhtml<br />\r\n";

closedir ($dir);
}
else
{
echo "Ошибка, такого раздела не существует";
}

echo "</div>\r\n";

echo "Online: <a href='who.php'>";
include "online.php";
echo "</a>\r\n";
echo "<div class=\"header\"><b><a href=\"http://mastiload.tk\">Mastiload.tk</a><br />\r\n</b></div>";
exit;
}

echo "<div class=\"a\">\r\n";

if ($dir = @opendir ("$downloads/$kat"))
{
while ($dir2 = @readdir ($dir)) 
{
if (( $dir2 != ".") && ($dir2 != "..") && ($dir2 != ".htaccess") && ($dir2 != "dir_name.txt") && ($dir2 != "index.php") && !ereg("dir_img",$dir2)) // эти файлы игнорируем
{
$dir2name=$dir2;
$dir3 = @opendir ("$downloads/$kat/$dir2");
while ($dir4 = @readdir ($dir3)) 
{
if ($dir4=="dir_name.txt")
{
$dir2name=@file("$downloads/$kat/$dir2/dir_name.txt");
$dir2name=$dir2name[0];
}
}

echo "<div class=\"dir\">\r\n";
if (file_exists("$downloads/$kat/$dir2/dir_img.gif"))
{
echo "<img src=\"$downloads/$kat/$dir2/dir_img.gif\" alt=\"\" />";
}
elseif (file_exists("$downloads/$kat/$dir2/dir_img.png"))
{
echo "<img src=\"$downloads/$kat/$dir2/dir_img.png\" alt=\"\" />";
}
elseif (file_exists("$downloads/$kat/$dir2/dir_img.jpg"))
{
echo "<img src=\"$downloads/$kat/$dir2/dir_img.jpg\" alt=\"\" />";
}
else
{
echo "<img src=\"img/dir.$f_kart\" alt=\"\" />";
}

$s_files3='0';
$k_files3='0';
$k_n_files3='0';
$dir_3_open=opendir ("$downloads/$kat/$dir2");
while ($dir_3_files = readdir ($dir_3_open))
{
if (( $dir_3_files != ".") && ($dir_3_files != "..") && ($dir_3_files != ".htaccess") && !ereg(".opis$",$dir_3_files) && !ereg(".kmt$",$dir_3_files) && !ereg(".ocnk$",$dir_3_files) && !ereg(".skch$",$dir_3_files) && !ereg(".GIF$",$dir_3_files) && !ereg(".JPG$",$dir_3_files) && !ereg(".PNG$",$dir_3_files) && !ereg(".jad$",$dir_3_files) && !ereg(".txt$",$dir_3_files) && !ereg(".name$",$dir_3_files) && !ereg(".php",$dir_3_files) && !ereg("dir_img",$dir_3_files)) // эти файлы игнорируем
{
$s_files3=$s_files3 + filesize("$downloads/$kat/$dir2/$dir_3_files");
$k_files3++;
$filtime=filemtime ("$downloads/$kat/$dir2/$dir_3_files");
$filtime=$filtime+(3600*24*5);
if($filtime>=$time)
{
$k_n_files3++;
}}}

echo " <a href=\"index.php?ver=$ver&kat=$kat&razd=$dir2\"><b>$dir2name</b></a>";
echo ' (';
echo "$k_files3";
if ($k_n_files3>'0'){echo " <font color=\"#FF0000\">+$k_n_files3</font>";}
echo ')';

echo "\r\n</div>\r\n";
}
}
closedir ($dir);
echo "<hr />\r\n";
echo "<a href=\"index.php?ver=$ver\">Downloads</a><br />\r\n";
echo "<hr />\r\n";
echo "<a href=\"index.php?ver=wml&kat=$kat\">Wml</a> | Xhtml<br />\r\n";
}
else
{echo "Ошибка, такой категории не существует";}

echo "</div>\r\n";

echo "Online: <a href='who.php'>";
include "online.php";
echo "</a>\r\n";
echo "<div class=\"header\"><b><a href=\"http://mastiload.tk\">Mastiload.tk</a><br />\r\n</b></div>";
exit;
}

/////////////////////////////////////////////////////////////
//////////////////////// показ разделов /////////////////////
/////////////////////////////////////////////////////////////
echo "<div class=\"header\"><b>MastiLoad.tk/$kat/$razd/</b><br/></div>";

echo "<div class=\"a\">\r\n";

echo "<div class=\"b\">\r\n";
echo "Downloads";
echo "</div>\r\n";

$dir = opendir ("$downloads");
while ($dir2 = readdir ($dir)) 
{
if (( $dir2 != ".") && ($dir2 != "..") && ($dir2 != ".htaccess") && ($dir2 != "index.php")) // эти файлы игнорируем
{

$dir3 = opendir ("$downloads/$dir2");

if (file_exists("$downloads/$dir2/dir_name.txt"))
{
$dir2name=@file("$downloads/$dir2/dir_name.txt");
$dir2name=$dir2name[0];
}
else
{
$dir2name=$dir2;
}

echo "<div class=\"dir\">\r\n";

if (file_exists("$downloads/$dir2/dir_img.gif"))
{
echo "<img src=\"$downloads/$dir2/dir_img.gif\" alt=\"\" />";
}
elseif (file_exists("$downloads/$dir2/dir_img.png"))
{
echo "<img src=\"$downloads/$dir2/dir_img.png\" alt=\"\" />";
}
elseif (file_exists("$downloads/$dir2/dir_img.jpg"))
{
echo "<img src=\"$downloads/$dir2/dir_img.jpg\" alt=\"\" />";
}
else
{
echo "<img src=\"img/dir.$f_kart\" alt=\"\" />";
}

$s_files2='0';
$k_files2='0';
$k_n_files2='0';

$dir_2_open=opendir ("$downloads/$dir2");
while ($dir_2_files = readdir ($dir_2_open))
{
if (( $dir_2_files != ".") && ($dir_2_files != "..") && ($dir_2_files != ".htaccess") && ($dir_2_files != "dir_name.txt") && ($dir_2_files != "index.php") && !ereg("dir_img",$dir_2_files))
{
$dir_3_open=opendir ("$downloads/$dir2/$dir_2_files");
while ($dir_3_files = readdir ($dir_3_open))
{
if (( $dir_3_files != ".") && ($dir_3_files != "..") && ($dir_3_files != ".htaccess") && !ereg(".opis$",$dir_3_files) && !ereg(".kmt$",$dir_3_files) && !ereg(".ocnk$",$dir_3_files) && !ereg(".skch$",$dir_3_files) && !ereg(".GIF$",$dir_3_files) && !ereg(".JPG$",$dir_3_files) && !ereg(".PNG$",$dir_3_files) && !ereg(".jad$",$dir_3_files) && !ereg(".txt$",$dir_3_files) && !ereg(".name$",$dir_3_files) && !ereg(".php",$dir_3_files) && !ereg("dir_img",$dir_3_files)) // эти файлы игнорируем
{
$s_files2=$s_files2 + filesize("$downloads/$dir2/$dir_2_files/$dir_3_files");
$k_files2++;
$filtime=filemtime ("$downloads/$dir2/$dir_2_files/$dir_3_files");
$filtime=$filtime+(3600*24*5);
if($filtime>=$time)
{
$k_n_files2++;
}}}}}

echo " <a href=\"index.php?ver=$ver&kat=$dir2\"><b>$dir2name</b></a>\r\n";
echo '(';
echo "$k_files2";
if ($k_n_files2>'0'){echo " <font color=\"#FF0000\">+$k_n_files2</font>";}
echo ')';

echo "</div>\r\n";
}
}
echo "<hr />\r\n";
echo "Number of Files: $k_files<br />\r\n";
if ($k_n_files>'0'){echo "New: $k_n_files<br />\r\n";}
if ($s_files>=1024)
{
$s_files= round($s_files/1024 , 2);
$s_files_ed='Kb';
}
if ($s_files>=1024)
{
$s_files= round($s_files/1024 , 2);
$s_files_ed='Mb';
}
if ($s_files>=1024)
{
$s_files= round($s_files/1024 , 2);
$s_files_ed='Gb';
}
echo "Total size: $s_files $s_files_ed<br />\r\n";
echo "<hr />\r\n";

closedir ($dir);

echo "</div>\r\n";

echo "Online: <a href='who.php'>";
include "online.php";
echo "</a>\r\n";
echo "<div class=\"header\"><b><a href=\"http://mastiload.tk\">Mastiload.tk</a><br />\r\n</b></div>";
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
?>

No head.php no foot.php no if($ver=='xhtml') 🙂

Rocky01 Junior · 44 posts #12

Thanx vry much send me or upload this php script as zip file. I will be thankful to you. Only this php file. Thanx again

@n@l

Rocky01 Junior · 44 posts #13

plz upload it as .zip

@n@l

Rocky01 Junior · 44 posts #15

How can i create folder name has head when open the folder. Eg.- If I open Pictures folder, opened page Show the folder name as heading under my site header (Wap49.Co.cc), same thing must be done when I open the sub-folder Girls, Girls will be the heading under the header Demo: <#>

@n@l

something else Fellow · 2,296 posts #16
$cwd = getcwd(); 
$dir = substr_count($cwd,"/"); 
$folder = explode("/",$cwd);
echo $folder[$dir];
something else Fellow · 2,296 posts #19

you can pretty much put it where ever you like it to be 🙂 ...all it does is shows the name of the folder you are in 🙂

Rocky01 Junior · 44 posts #20

Bro it showing sitename (wap49.co.cc) on all pages. You already know that all the script is in my index page. Perhaps, for that reason index page name in my all pages.

@n@l

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close