<?php
session_start();
$_SESSION['file_name']= '../upload/'.basename( $_FILES['uploadedfile']['name']);
//$_SESSION['base'] = basename( $_FILES['uploadedfile']['name']);
//$_SESSION['upload'] = $_FILES['uploadedfile']['tmp_name'];
//echo '<br>'.$_SESSION['base'];
//echo '<br>'.$_SESSION['upload'];
//echo $_SESSION['file_name'];
//$_SESSION['date']=substr($_SESSION['file_name'], 16, 10);
//echo"<br>". $date;
$_SESSION['page_stage']=2;
//$okExtensions = array('csv');
//$fileParts = explode('.', $_SESSION['file_name']);
//
//if( in_array( strtolower( end($fileParts) ), $okExtensions) )
//{
// 
//
//
//$exists = file_exists($_SESSION['file_name']);
//
//if(!$exists) {
//
//$target_path = "../upload/";
//$target_path = $target_path . basename( $_FILES['uploadedfile']['name']); 
//
//
//if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
//    $_SESSION['message'] = "The file '".  basename( $_FILES['uploadedfile']['name'])."' has been uploaded.<br><br> This file is for job no --.";
//	$_SESSION['error'] = 0;
//	$_SESSION['file_name']= 'upload/'.basename( $_FILES['uploadedfile']['name']);
//} else{
//    $_SESSION['message'] = "There was an error uploading the file, please try again!";
//	$_SESSION['error'] = 1;
//}
//}
//else {
//	$_SESSION['message'] = "This file was allready uploaded.";
//	$_SESSION['error'] = 2;
//}
//}
//else {
//	$_SESSION['message'] = "This is not a valid file. Only use files with a 'csv' extension";
//	$_SESSION['error'] = 3;
//}
//
//?>

<script language="javascript" type="text/javascript">
        <!--
		  window.location="../production/trussesJobWizbase.php?p=2&s=";
        -->
       </script>