Please masters Modify Dload script. [Help!]
Collapse
X
-
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
Leave a comment:
-
No head.php no foot.php no if($ver=='xhtml')PHP Code:<?
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>";
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
?>
Leave a comment:
-
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.Last edited by Rocky01; 25.05.10, 17:10.
Leave a comment:
-
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
PHP Code:<?
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>";
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
?>
Leave a comment:
-
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:
use this as head.php :PHP Code: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";
}
And this as foot.php :PHP Code:<?
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>";
?>
PHP Code:<?
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>";
?>
Leave a comment:
-
Status code 404 on your download link :POriginally posted by Rocky01 View PostI 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
Leave a comment:
-
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
Leave a comment:
-
using a head and foot on separate pages saves you from having to duplicate the same code over and over again
Leave a comment:
-
be coder and code this,there all the features here in the coding forum and stop waiting for someone to help you.................Originally posted by rocky01 View Posthere is the 'dload' script
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
Leave a comment:
-
Please masters Modify Dload script. [Help!]
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 hereAttached FilesLast edited by Rocky01; 25.05.10, 15:58.Tags: None
Leave a comment: