Daniellez
03-16-2009, 03:46 PM
1) Project Details: (be as specific as possible): I'd like to add the following to my existing upload page/script: http://www.dhtmlx.com/docs/products/dhtmlxVault/index.shtml
2) Payment Amount: $20
3) Payment method/ details (Paypal, check? Timeline?): PayPal
4) Additional Info (about project or potential bidders):
Here's the existing code for the upload page:
auth.php
<?php
if (!@include_once("./config.php"))
include_once("../config.php");
@session_save_path($session_save_dir);
session_start();
function authent_user () {
if (isset($_SESSION['session_username']) && isset($_SESSION['session_password'])) {
$fd = fopen($user_file, "r");
while (!feof($fd)) {
$userdata = explode("|", fgets($fd));
if ($_SESSION['session_username'] == $userdata[0] && $_SESSION['session_password'] == $userdata[1]) {
fclose ($fd);
return true;
}
}
fclose ($fd);
exit("<div class='error'>Access Denied!</div>");
}
}
?>
Upload form:
if (!@include_once("./inc/auth.php"))
include_once("../inc/auth.php");
if ($AllowUpload && isset($_GET['upload']))
{
if (!isset($_FILES['userfile']))
// maximum post size reached
print $StrUploadFailPost;
else
{
for($i=0;$i<=3;$i++)
{
if (move_uploaded_file($_FILES['userfile']['tmp_name'][$i], realpath($home_directory.$path)."/".str_replace(' ', '_', $_FILES['userfile']['name'][$i])))
print "$StrUploading";
else if ($_FILES['userfile']['name'][$i])
print "$StrUploadFail";
}
}
print "<form action='$base_url&output=upload&upload=true' method='post' enctype='multipart/form-data'>";
print "<table class='upload'>";
print "<tr><td>$StrFirstFile</td><td><input type='file' name='userfile[]' size=30></td></tr>";
print "<tr><td>$StrSecondFile</td><td><input type='file' name='userfile[]' size=30></td></tr>";
print "<tr><td>$StrThirdFile</td><td><input type='file' name='userfile[]' size=30></td></tr>";
print "<tr><td>$StrFourthFile</td><td><input type='file' name='userfile[]' size=30></td></tr>";
print "</table>";
print "<input class='go' type='image' src='gfx/button_upload.png' alt='$StrUpload' value='$StrUpload' style='margin-top: 16px;'>";
print "<input type='hidden' name=path value=\"".htmlentities($path)."\">";
print "</form>";
2) Payment Amount: $20
3) Payment method/ details (Paypal, check? Timeline?): PayPal
4) Additional Info (about project or potential bidders):
Here's the existing code for the upload page:
auth.php
<?php
if (!@include_once("./config.php"))
include_once("../config.php");
@session_save_path($session_save_dir);
session_start();
function authent_user () {
if (isset($_SESSION['session_username']) && isset($_SESSION['session_password'])) {
$fd = fopen($user_file, "r");
while (!feof($fd)) {
$userdata = explode("|", fgets($fd));
if ($_SESSION['session_username'] == $userdata[0] && $_SESSION['session_password'] == $userdata[1]) {
fclose ($fd);
return true;
}
}
fclose ($fd);
exit("<div class='error'>Access Denied!</div>");
}
}
?>
Upload form:
if (!@include_once("./inc/auth.php"))
include_once("../inc/auth.php");
if ($AllowUpload && isset($_GET['upload']))
{
if (!isset($_FILES['userfile']))
// maximum post size reached
print $StrUploadFailPost;
else
{
for($i=0;$i<=3;$i++)
{
if (move_uploaded_file($_FILES['userfile']['tmp_name'][$i], realpath($home_directory.$path)."/".str_replace(' ', '_', $_FILES['userfile']['name'][$i])))
print "$StrUploading";
else if ($_FILES['userfile']['name'][$i])
print "$StrUploadFail";
}
}
print "<form action='$base_url&output=upload&upload=true' method='post' enctype='multipart/form-data'>";
print "<table class='upload'>";
print "<tr><td>$StrFirstFile</td><td><input type='file' name='userfile[]' size=30></td></tr>";
print "<tr><td>$StrSecondFile</td><td><input type='file' name='userfile[]' size=30></td></tr>";
print "<tr><td>$StrThirdFile</td><td><input type='file' name='userfile[]' size=30></td></tr>";
print "<tr><td>$StrFourthFile</td><td><input type='file' name='userfile[]' size=30></td></tr>";
print "</table>";
print "<input class='go' type='image' src='gfx/button_upload.png' alt='$StrUpload' value='$StrUpload' style='margin-top: 16px;'>";
print "<input type='hidden' name=path value=\"".htmlentities($path)."\">";
print "</form>";