<?php
 
//------------------------------------------------------------------------------ 
 
//Design by    : M.G.Ranga Pathmasiri
 
//Author Email : [email protected]       
 
//Class Name   : upload_file in Graphically  mode
 
//Tested       : win 2000 , XP, IIS,  IE,  Mozilla
 
//version      : 1.0;
 
 
 
  
 
   
 
 
 
 
//------------------------------------------------------------------------------
 
//Define storage capcity
 
define ("CAPACITY", "2MB", true); // defines the filesize of the file you allow the user to upload
 
 
//define upload directery
 
define("DIR_NAME",  "../upload", true); // defines the directory the files will be uploaded to
 
 
//define username folder
 
define("DEFAULT_USER_NAME", "/asela"); // the user name should be defined here 
 
 
//Define submit  page
 
$page =  $_SERVER['PHP_SELF'];
 
 
//Define page variable
 
$html             = "" ;
 
$total            = 0 ;
 
$total_value      = 0;
 
$pvalue           = 0;
 
$inough           = false;
 
$name             = "";
 
$file_count       = 0; 
 
$error            =  false;
 
 
 
//  this is place for set display error 
 
 
$error_array      =array('fileerror'  => "Please select file to upload",
 
                         'uploadferr' => "File Upload error",
 
                         'notfile'    => "First select files to upload",
 
                         'alsohave'   => "This file has already been uploaded.",
 
                         'default'    => "Server Error"
 
                         ); 
 
?> 
 
 
 |