Esempio n. 1
0

<!DOCTYPE HTML>
<html>
	<head>
		<title> ElifTech test task </title>
	</head>
	
	<body>	
		<?php 
include "PageElements/MenuBar.php";
echo '<hr>';
if (!isset($_FILES['userfile'])) {
    include "PageElements/UploadForm.php";
} else {
    showFileInfo('userfile');
    echo '<hr>';
    uploadFiletoDB('userfile');
}
?>
	
	</body>	

</html>


<?php 
function uploadFiletoDB($UserFileName)
{
    $TransactionArray = array();
    $TblName = TableName;
Esempio n. 2
0
<?php

/**
 * $Id$
 *
 * Returns details about a certain file, in HTML format for inclusion in a div element
 */
require_once 'find_config.php';
if (!$h->session->id && !$h->files->anon_uploads || empty($_GET['i']) || !is_numeric($_GET['i'])) {
    die('bad');
}
showFileInfo($_GET['i']);
Esempio n. 3
0
    function showDirectory($directory)
    {
        global $files, $directories, $fileInfo, $PHP_SELF;
        readDirectory($directory);
        showInfoDirectory($directory);
        ?>
      <p><table cellpadding=3 cellspacing=1 width="100%" border="0" bgcolor=<?php 
        echo TABLE_BORDER_COLOR;
        ?>
>
         <tr bgcolor="#000000">
            <?php 
        if ($show_icons) {
            ?>
            <td width="16" align="center" bgcolor=<?php 
            echo TABLE_BACKGROUND_COLOR;
            ?>
>&nbsp;</td>
            <?php 
        }
        ?>
            <td align="center"><b><small>NAME</small></b></td>
            <td align="center"><b><small>SIZE</small></b></td>
            <td align="center"><b><small>LAST MODIFY</small></b></td>
            <td align="center"><b><small>PERMISIONS</small></b></td>
            <td align="center"><b><small>ACTIONS</small></b></td>
         </tr>
<?php 
        for ($i = 0; $i < sizeof($directories); $i++) {
            $fileInfo->getInfo($directories[$i]);
            showFileInfo($fileInfo);
        }
        for ($i = 0; $i < sizeof($files); $i++) {
            $fileInfo->getInfo($files[$i]);
            showFileInfo($fileInfo);
        }
        ?>
      </table>
<?php 
    }