????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.148.243.252 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/icad.astacus.se/productionzon/ |
Upload File : |
<?php session_start(); $link = mysql_connect ("localhost", "root", "root123"); mysql_select_db ("vpa"); $ProjectId = $_GET['projectId']; $sql = "SELECT * FROM Project, ProjectStatus WHERE Project.ProjectStatusId = ProjectStatus.ProjectStatusId and ProjectId = $ProjectId"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $CompanyId = $row['CompanyId']; $ProjectName = $row['Name']; $Description = $row['Description']; $RequestedDeliveryDate = $row['RequestedDeliveryDate']; $ProjectStatusId = $row['ProjectStatusId']; } ?> <link href="../main.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style6 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } --> </style> <script type="text/javascript" src="http://www.google.com/jsapi"> </script> <script type="text/javascript"> function selectAll(){ var tags = document.getElementsByName('selectedfiles[]'); for(var i = 0; i < tags.length; ++i) { if( tags[i].checked == 1){ tags[i].checked = 0; }else{ tags[i].checked = 1; } } } google.load("language", "1"); var s; function initialize() { var text = document.getElementById("text").value; google.language.detect(text, function(result) { if (!result.error && result.language) { google.language.translate(text, result.language, "en", function(result) { var translated = document.getElementById("translation"); if (result.translation) { translated.value = result.translation; } }); } }); s=setTimeout("initialize()",1000); } google.setOnLoadCallback(initialize); </script> <table width="850" height="64" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td valign="top" background="../images/tabb3.jpg"><table width="850" height="23" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="8" height="23"> </td> <td width="108" valign="bottom" class="blacklink"><div align="center"><a href="?page=project&projectId=<?php echo($ProjectId);?>" class="blacklink">Project status</a></div></td> <td width="22" valign="bottom" class="blacklink"><div align="center"></div></td> <td width="100" valign="bottom" class="blacklink"><div align="center"><a href="?page=upload&projectId=<?php echo($ProjectId);?>" class="blacklink">Upload files</a></div></td> <td width="24" valign="bottom" class="blacklink"><div align="center"></div></td> <td width="105" valign="bottom" class="blacklink"><div align="center"><a href="?page=download&projectId=<?php echo($ProjectId);?>" class="blacklink">Download files</a></div></td> <td width="21" class="blacklink"> </td> <td width="104" valign="bottom" class="blacklink"><div align="center"><a href="?page=logg&projectId=<?php echo($ProjectId);?>" class="blacklink">Project log</a></div></td> <td width="358" class="blacklink"> </td> </tr> </table></td> </tr> </table> <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="90"> </td> <td width="820"><table width="820" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="5" valign="top"><table width="821" border="0" cellpadding="0" cellspacing="0"> <tr > <td colspan="4" valign="top" class="text"><span class="heading1">Download files </span> <table width="397" border="0" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="398"><span class="heading2">Project: <?php echo($CompanyId);?>_<?php echo($ProjectName);?> (<?php echo($ProjectId);?>)</span> <br> </td> <td width="57"><div align="right"><span class="textthin"><br> </span> </div></td> </tr> </table></td> <td width="357" valign="top" class="textthin"><div align="right"><span class="heading1"><a href="index.php"><img src="../images/Back-Arrow.jpg" alt="pic" width="37" height="36" border="0" align="absmiddle" /></a> <a href="index.php" class="blacklinkhuge">Back to search</a></span></div></td> </tr> </table> <br> <hr width="820" size="1"> <span class="heading2"><br> </span> <table width="820" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="805" height="677" valign="top"> <span class="heading2"> </span> <span class="heading2"> Download files: <?php echo($a95);?><br /> </span> <form id="form2" name="form2" method="post" action="download_checked_files.php?project=<?php echo($CompanyId);?>_<?php echo($ProjectName);?> (<?php echo($ProjectId);?>)&projectId=<?php echo($ProjectId);?>&companyId=<?php echo($CompanyId);?>&systemUserMail=<?php echo($_SESSION['ASTACUS_SSO_INFO'][2]);?>&systemUserName=<?php echo($_SESSION['ASTACUS_SSO_INFO'][1]);?>&path=<?php echo($_GET['path']);?>"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="text"> <td width="323">Name</td> <td width="70">Files</td> <td width="110">Size</td> <td width="149">Last changed</td> <td width="113"><a href="javascript:selectAll();">Select all</a></td> </tr> </table> <?php function AddPath($PathToCreate){ $iBreak = 0; $iBreak = strrpos($PathToCreate, "/"); if($iBreak !== FALSE){ $Parent = substr($PathToCreate, 0, $iBreak); if(!@chdir($Parent)){ AddPath($Parent); } } if(!@chdir($PathToCreate)){ mkdir($PathToCreate); } } function count_files_recursive($path) { // use a normalize_path function here // to make sure $path contains an // ending slash // (-> http://codedump.jonasjohn.de/snippets/normalize_path.htm) $files = 0; if(substr($path,strlen($path)-1,1) != "/"){ $path = $path."/"; } // open dir: $dir = opendir($path); if (!$dir){return 0;} while (($file = readdir($dir)) !== false) { if ($file[0] == '.'){ continue; } if (is_dir($path.$file)){ // recursive: $files += count_files_recursive($path.$file.DIRECTORY_SEPARATOR); } else { // increase file count $files++; } } // close dir: closedir($dir); return $files; } function GetFolderSize($d ="." ) { // © kasskooye and patricia benedetto $h = @opendir($d); if($h==0)return 0; while ($f=readdir($h)){ if ( $f!= "..") { $sf+=filesize($nd=$d."/".$f); if($f!="."&&is_dir($nd)){ $sf+=GetFolderSize ($nd); } } } closedir($h); return $sf ; } $path = "/var/www/icad_files/$CompanyId/$ProjectId/customerzon"; AddPath($path); $path = "/var/www/icad_files/$CompanyId/$ProjectId/customerzon/".urldecode($_GET['path'])."/"; AddPath($path); /* $dir = "../mydir/"; chdir($dir); array_multisort(array_map('filemtime', ($files = glob("*.*"))), SORT_DESC, $files); foreach($files as $filename) { echo "<li>".substr($filename, 0, -4)."</li>"; } */ $files = array(); $dir_handle = @opendir($path); $e=1; while (false !== ($file = readdir($dir_handle))) { // if ($file != "." && $file != "..") { $files[$e] = $file; $e++; //} } closedir($handle); arsort($files); $x = 0; // while (false !== ($file = readdir($dir_handle))){ foreach($files as $file){ if(substr($file,0,1) != "."){ $x++; if(!is_file($path."/".$file)){ $size = round(GetFolderSize($path."/".$file)/(1024),2)." Kb"; $nbr = count_files_recursive($path."/".$file); $p = $_GET['path']; if($p == "/"){ $p = ""; } $filestr = "?page=project&projectId=$ProjectId&companyId=$".$_GET['companyId']."&path=".$p."/".$file; $ico = "folder.gif"; }else { $size = round(filesize($file)/(1024),2) . " Kb"; $nbr = ""; $filestr = "download_singel_file.php?file=".$_GET['path']."/".$file."&projectId=$ProjectId&customerId=$CompanyId"; $ico = "file.gif"; } ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="textthin"> <td width="323"><img src="../images/icons/<?php echo($ico);?>" alt="" width="16" height="16" align="absmiddle" /> <a href="<?php echo($filestr);?>"><?php echo($file);?></a></td> <td width="70"><?php echo($nbr);?></td> <td width="110"><?php echo($size);?></td> <td width="149"><?php echo(date("Y-m-d H:i:s",filemtime($file)));?></td> <td width="61"><div align="left"><a href="javascript:deleteFile('deletefiles.php?projectId=<?php echo($ProjectId);?>&path=<?php echo($_GET['path']);?>&file=<?php echo($file);?>');"></a> <input type="checkbox" name="selectedfiles[]" value="<?php echo($path."/".$file);?>"/> </div></td> <td width="51" align="right"><a href="javascript:deleteFile('deletefiles.php?projectId=<?php echo($ProjectId);?>&path=<?php echo($_GET['path']);?>&file=<?php echo($file);?>&page=project');"><img src="../images/del.jpg" alt="" width="20" height="20" border="0" /></a></td> </tr> </table> <?php } } if($x == 0){ echo("<br> <span class='style6'> -- No Files are uploaded yet!</span>"); } ?> <br /> <br /> <input type="submit" name="submit" value="Download selected files and folders" /> </form> <span class="heading2"><br /> </span><span class="heading2"><br> </span><span class="heading2"><br> </span><span class="heading2"> </span> <p><span class="heading2"> <br> </span><span class="heading2"> </span> </p></td><td width="10"> </td> <td width="10" valign="top"> </td> </tr> </table> <span class="style6"><br> </span> <hr width="820" size="1"> <span class="style6"> </span></td> </tr> </table> </td> <td width="90"> </td> </tr> <tr> <td colspan="3"> </td> </tr> </table>