<?php
include('../../includes/checkSession.php');
include('../../includes/con2pma3.php');

if ( !empty($_POST) ) {
    $companyID = $id;
    $WID = $_POST['WID'];
    $fileName = $_POST['fileName'];


// Updating status to imported by replacing company id
   if( mysql_query("UPDATE globalwbs SET globalwbs.companyID = '$companyID' WHERE globalwbs.companyID = '-1' AND gwbslist_id = '$WID'") )
       // Updating file Name
       if( mysql_query("UPDATE wbslist SET WBSList_type=4, WBSList_file_name = '$fileName' WHERE WBSList_id='$WID'") )
           echo '0';

}