<?php
if(isset($_GET['file'])){
//Read the filename
//$filename = $_GET['path'];
$file= $_GET['file'];
//$file ="http://shafeen.atwebpages.com/examples/upload/thumbs/26981649935724c1636716-4452-468e-88cc-f76e18cb7fa7.jpg";
$files= "http://shafeen.atwebpages.com/examples/'. $files.'";
//Check the file exists or not
//if(file_exists($files)) {

//Define header information
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header("Cache-Control: no-cache, must-revalidate");
header("Expires: 0");
header('Content-Disposition: attachment; filename="'.basename($file).'"');
header('Content-Length: ' . filesize($file));
header('Pragma: public');

//Clear system output buffer
flush();

//Read the size of the file
readfile($file);

//Terminate from the script
die();
//}
/*else{
echo "File does not exist.";
}*/
}
//else
//echo "Filename is not defined."

?>
<script type="text/javascript">
function popUp()
{
props=window.open("downloads.php","poppage","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=540, height=220")
}
</script>
</TD>
    <font face="Microsoft Sans Serif" size="2">
    <TD vAlign=top align=middle width=350>
      </font>
      <DIV id=Rlist>
      <TABLE dir=ltr cellSpacing=0 cellPadding=0 width=132 align=center border=0>
        <TBODY>
        <TR>
          <TD colSpan=3><font face="Microsoft Sans Serif" size="2"><IMG height=6 alt='' 
            src='template\images/blook_01.jpg' 
        width=132></font></TD></TR>
        <TR>
          <TD width=132
          background='template\images/blook_02.jpg' 
          colSpan=3 height=21>
            <p align='center'><font face="MS Sans Serif" size="1">الأخبار </font></TD></TR>
        <TR>
          <TD colSpan=3><font face="Microsoft Sans Serif" size="2"><IMG height=19 alt='' 
            src='template\images/blook_03.jpg' 
        width=132></font></TD></TR>
        <TR>
          <TD width=10 
          background='template\images/blook_04.jpg' 
          bgColor=#b8fe5f height=19></TD>
          <TD vAlign=top align=center width=112>
            <?
//include("last.php");
?>
</TD>
          <TD width=10 
          background='template\images/blook_06.jpg' 
          bgColor=#b8fe5f height=19>&nbsp;</TD></TR>
        <TR>
          <TD colSpan=3><font face="Microsoft Sans Serif" size="2"><IMG height=21 alt='' 
            src='template\images/blook_07.jpg' 
        width=132></font></TD></TR></TBODY></TABLE>
      <TABLE dir=ltr cellSpacing=0 cellPadding=0 width=132 align=center  border=0>
        <TBODY>
        <TR>
          <TD><font face="Microsoft Sans Serif" size="2"><IMG height=6 alt='' 
            src='template\images/blook_01.jpg' 
        width=420></font></TD></TR>
        </TBODY></TABLE><font face="Microsoft Sans Serif" size="2">
      
      </font>
      <TABLE dir=ltr cellSpacing=0 cellPadding=0 width=132 align=center border=0>
        <TBODY>
        <TR>
          <TD width=420
          background='template\images/blook_02.jpg' 
          colSpan=3 height=21>
            <p align="center"><font face="MS Sans Serif" size="1">تسجيل تسجيل الدخول</font></TD></TR>
        <TR>
          <TD colSpan=3><font face="Microsoft Sans Serif" size="2"><IMG height=19 alt='' 
            src='template\images/blook_03.jpg' 
        width=420> </font></TD></TR>
       <TR>
          <TD width=10 
          background='template\images/blook_04.jpg' 
          bgColor=#b8fe5f height=190 rowspan="2"></TD>
          <TD dir=rtl vAlign=top align=middle width=112>
            <?
 
//$url ="http://www.javatpoint.com/f.txt";
//Clear the cache

            $file = basename(str_replace(' ','_',$_GET[file]).'.'.$_GET[id]);
$file_name = $_GET[file];
$file_ext = $_GET[ext];
$id = $_GET[id];
$filess= $_GET[filess];
//$files= $_GET[files];
           $server = "pdb53.awardspace.net";
$username = "2552090_vb";
$password = "green159";
$database = "2552090_vb";
 
            $con = mysql_connect($server,$username,$password);
mysql_select_db($database, $con);
$result = mysql_query("
	SELECT files ,sari ,id
	FROM uploaded 
	WHERE  files = '$filess' ");
	while($row = mysql_fetch_array($result)){
//$zdd =  $row['zo']; 
//$sari =  $row['sari']; 
extract($row);
 //$row = $apt->dbarray($result);
 //$id = $row['id'];
 //$row2 = $apt->dbarray($result2);
if($row)
{

$filess =  $row['files']; 
$files =  $row['files']; 
     $row['sari']; 
$zo =  $row['zo']; 
       $row['post'];
        $sari  =  $row['sari'];
   // $row['zm'];
   $sari  =  $row['sari'];
      $id  =  $row['id'];
  //include("downloads.php");
  $filesk= "$filess";
$filesss = str_replace("thumbs/","",$filesk);
echo $TXTREM ;
     echo $id,$filesss,'<br>',$sari,'<br>','<img src="'.$filess.'"/>','<br>';
/*echo '<a href="downloads.php?&file='.$filess.'"><img border=0 src="template\images/blook_07.jpg"/></a>';
*/
$fullFile=$filess;
//echo $fullFile;
echo $file_url;
/*echo '<a href="'.$url.'" title="Download File">jkll</a>';
echo '<a href="" title="Download File">hhhh</a>';
*/
//$fullFile="www";
$ds="http://shafeen.atwebpages.com/examples/$filesss";
echo '<a href="downloads.php?&file='.$ds.'" title="Download File"><img border=0 src="http://shafeen.atwebpages.com/arabdoor/images/box_download.png"/></a>';
}}
?>
</TD>
          <TD width=10 
          background='template\images/blook_06.jpg' 
          bgColor=#b8fe5f height=420 rowspan="2"></TD></TR>
        <TR>
          <TD dir=rtl vAlign=top align=middle width=112>
<span lang="ar-sa"><font size="1" face="MS Sans Serif">
<a href="javascript:popUp()"><span style="text-decoration: none">برمجة المضياني</span></a></font></span></TD>
          </TR>
        <TR>
          <TD colSpan=3><font face="Microsoft Sans Serif" size="2"><IMG height=21 alt='' 
            src='template\images/blook_07.jpg' 
        width=132></font></TD></TR></TBODY></TABLE>
		<font face="Microsoft Sans Serif" size="2">
      </font>
		</DIV><font face="Microsoft Sans Serif" size="2">
<p></BODY></p>
</font>


<p align="center"><font size="1" face="MS Sans Serif">برمجة وتصميم المواقع</font></p>
<p align="center"><font face="MS Sans Serif" size="1">المركز العربي</font></p>
</HTML>