Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/mm/air/
Upload File :
Current File : /var/www/html/mmishra/mm/air/uploads.php

<?php
//checkadmin($role);
checkLogin($user);

$gallery = $_POST["gallery"];
$rfile = $_REQUEST["rfile"];

if ($_POST["submit"] == 'UPLOAD') upload($webid, $gallery);

$rdPath = relativePath($webid,'documents');
$riPath = relativePath($webid,'images');
$rgPath = relativePath($webid,'gallery');
$rmPath = relativePath($webid,'multimedia');

$adPath = absolutePath($webid,'documents');
$aiPath = absolutePath($webid,'images');
$agPath = absolutePath($webid,'gallery');
$amPath = absolutePath($webid,'multimedia');

if ($rfile) shell_exec("rm -f $rfile");
?>
<p>
Please select file to upload on server. Here image files will be uploaded in "<?php echo $riPath; ?>" folder
multimedia files will be "<?php echo $rmPath; ?>" folder and 
other files will be uploaded in "<?php echo $rdPath; ?>" folder. File at wrong place may cause access problem.
<br><br>

Select file <input type='file' name='userfile' size='50'><br>
Add to Photo Gallery <input type='checkbox' name='gallery' value='1'>
<input type='submit' name='submit' value='UPLOAD' style='width:80px'>
</p>
<p>
Only images can be added to the photo gallery. Please upload pdf/jpg/gif files to achieve better performance.<br>
Uploaded files can be referenced by their names.
</p>
<p>
List of files in <a href='<?php echo $rdPath; ?>/' target='_blank'>documents</a>,  
<a href='<?php echo $riPath; ?>/' target='_blank'>images</a> & 
<a href='<?php echo $rmPath; ?>/' target='_blank'>multimedia</a> folders.
</p>
<p>
<b>Photos in Gallery:</b>
<ol>
<?php
$dots = 50;
$dh  = opendir($agPath);
while (false !== ($filename = readdir($dh))) {
        if (strlen($filename) > 2) {
                $fsize = number_format(filesize("$agPath/$filename")/1024,2);
                echo "<li><a href='$rgPath/$filename'>$filename</a>&nbsp;";
                echo "($fsize KB)";
		for ($i = strlen($filename); $i<$dots; $i++) { echo '.'; }
                echo "[<a href='$PHP_SELF?conf=$conf&rfile=$agPath/$filename'>Delete</a>]</li>";
	}                
}
?>
</ol>
<b>Document Files:</b>
<ol>
<?php
$dh  = opendir($adPath);
while (false !== ($filename = readdir($dh))) {
        if (strlen($filename) > 2) {
                $fsize = number_format(filesize("$adPath/$filename")/1024,2);
                echo "<li><a href='$rdPath/$filename'>$filename</a>&nbsp;";
                echo "($fsize KB)";
		for ($i = strlen($filename); $i<$dots; $i++) { echo '.'; }
                echo "[<a href='$PHP_SELF?conf=$conf&rfile=$adPath/$filename'>Delete</a>]</li>";
        }
}
?>
</ol>
<b>Images Files:</b>
<ol>
<?php
$dh  = opendir($aiPath);
while (false !== ($filename = readdir($dh))) {
        if (strlen($filename) > 2) {
                $fsize = number_format(filesize("$aiPath/$filename")/1024,2);
                echo "<li><a href='$riPath/$filename'>$filename</a>&nbsp;";
                echo "($fsize KB)";
		for ($i = strlen($filename); $i<$dots; $i++) { echo '.'; }
                echo "[<a href='$PHP_SELF?conf=$conf&rfile=$aiPath/$filename'>Delete</a>]</li>";
        }
}
?>
</ol>
<b>Multimedia Files:</b>
<ol>
<?php
$dh  = opendir($amPath);
while (false !== ($filename = readdir($dh))) {
        if (strlen($filename) > 2) {
                $fsize = number_format(filesize("$amPath/$filename")/1024,2);
                echo "<li><a href='$rmPath/$filename'>$filename</a>&nbsp;";
                echo "($fsize KB)";
                for ($i = strlen($filename); $i<$dots; $i++) { echo '.'; }
                echo "[<a href='$PHP_SELF?conf=$conf&rfile=$amPath/$filename'>Delete</a>]</li>";
        }
}
?>
</ol>
</p>