function fill($parSess, $parScene = "", $parProd = "", $parBand = "", $parShift = 0, $parCor = "", $parOri = "", $parRes = "", $parDatum = "", $parProj = "", $parLong = 0, $parLat = 0, $parStd1 = 0, $parStd2 = 0, $parFormat = "", $parInter = "", $parMedia = "", $parRestoration = "")
 {
     // Parameters Values
     $this->sessKey = $parSess;
     $this->sceneId = $parScene;
     $this->productId = $parProd;
     if (trim($parBand) != "") {
         $this->bands = $parBand;
     }
     if ($parShift != 0) {
         $this->sceneShift = $parShift;
     } else {
         $this->sceneShift = 0;
     }
     if (trim($parCor) != "") {
         $this->corretion = $parCor;
     }
     if (trim($parOri) != "") {
         $this->orientation = $parOri;
     }
     if (trim($parRes) != "") {
         $this->resampling = $parRes;
     }
     if (trim($parDatum) != "") {
         $this->datum = $parDatum;
     }
     if (trim($parProj) != "") {
         $this->projection = $parProj;
     }
     if ($parLong != 0) {
         $this->longOrigin = $parLong;
     } else {
         $this->longOrigin = 0;
     }
     if ($parLat != 0) {
         $this->latOrigin = $parLat;
     } else {
         $this->latOrigin = 0;
     }
     if ($parStd1 != 0) {
         $this->stdLat1 = $parStd1;
     } else {
         $this->stdLat1 = 0;
     }
     if ($parStd2 != 0) {
         $this->stdLat2 = $parStd2;
     } else {
         $this->stdLat2 = 0;
     }
     if (trim($parFormat) != "") {
         $this->format = $parFormat;
     }
     if (trim($parInter) != "") {
         $this->inter = $parInter;
     }
     if (trim($parMedia) != "") {
         $this->media = $parMedia;
     }
     if (trim($parRestoration) != "") {
         $this->restoration = $parRestoration;
     }
     // Get Scene price - colocar scene class
     $sql = "SELECT * FROM Scene WHERE SceneId='" . $parScene . "'";
     $this->bd->query($sql) or $this->bd->error($sql);
     $itens = $this->bd->numRows();
     if ($itens == 0) {
         die("Erro nas Cenas");
     }
     $row = $this->bd->fetchRow();
     $this->bd->freeResult($results);
     $objPrice = new Price($this->bd);
     //      $this->price = $objPrice->searchPrice_orig($row["Satellite"], $row["Sensor"], $row["Date"],$this->productId, $_SESSION['userLang']);
     $this->price = $objPrice->searchPrice($row["Satellite"], $row["Sensor"], $row["Date"], $this->productId, $_SESSION['userLang'], $this->corretion, $_SESSION['userType']);
     //      echo "price = $this->price, Sat = $row[Satellite], Sens = $row[Sensor], Date = $row[Date], prod = $this->productId, Lang = $_SESSION[userLang], Corr = $this->corretion, UserType = $_SESSION[userType]";
 }
    } 
*/
}; 
</script> 
</head> 
<body onload="window.resizeTo(550,450)">  
<div><center class = azul>
<form name="productForm" method="POST" action="prodForm.php">  
<?php 
$corrflag = $_GET['corrflag'];
// if ($corrflag) ---> Correction Level has been changed - changePrice has been called !
$puserType = $_SESSION['userType'];
if ($corrflag) {
    $objPrice = new Price($dbcat);
    //  echo " sat = ".$sat." sens =".$sens." dat =".$dat." corr =".$pcorLevel;
    $price = $objPrice->searchPrice($sat, $sens, $dat, $productId, $_SESSION['userLang'], $pcorLevel, $puserType);
    $action = "corrprice";
}
?>
<table width="70%" border="0" cellspacing="1">    
<th colspan="3"><?php 
echo $titFormProd;
?>
</th>
<?php 
// If product, diplay product Id
if (trim($objCart->productId) != "") {
    ?>
 
   <tr><td align="right"><?php 
    echo $strProduct;
}
$hrc_path = $HRC_PATH;
$action = $ACTION;
if (isset($date)) {
    $drd_date_aux = "{$result['0']}_{$result['1']}_{$result['2']}";
}
#
# Let's find if mosaico's scenes are priced
#
if (isset($_SESSION['userId'])) {
    $usertype = $_SESSION['userType'];
} else {
    $usertype = 2;
}
$objPrice = new Price($dbcat);
$price = $objPrice->searchPrice($satellite, $sensor, $date, "0", $_SESSION['userLang'], "2", $usertype);
#
#
# Let's see if user is able to purchasing and if we can show the shopping cart icon
#
$OK_to_purchase = 0;
if ($_SESSION["userType"] == 1 or $_SESSION["userType"] == 3 or $_SESSION["userType"] == 4) {
    $OK_to_purchase = 1;
}
$dontshow = 0;
if ($price > 0) {
    if (!$OK_to_purchase == 1) {
        $dontshow = 1;
    } else {
    }
} else {
$sat = substr($row_array["Satellite"], 0, 2);
$scene = $row_array["SceneId"];
#
# Code Segment to evaluate purchase conditions for displaying of cart icons
#
$OK_to_purchase = 0;
if (isset($_SESSION['userId'])) {
    $usertype = $_SESSION['userType'];
} else {
    $usertype = 2;
}
if ($_SESSION["userType"] == 1 or $_SESSION["userType"] == 3 or $_SESSION["userType"] == 4) {
    $OK_to_purchase = 1;
}
$objPrice = new Price($dbcat);
$priced = $objPrice->searchPrice($row_array[Satellite], $row_array[Sensor], $row_array[Date], "0", $_SESSION['userLang'], "2", $usertype);
$dontshow = 0;
if ($priced > 0) {
    if (!$OK_to_purchase == 1) {
        $dontshow = 1;
    } else {
    }
} else {
    if (!$_SESSION['openArea']) {
        $dontshow = 1;
    }
}
// echo "<br>sat = $row_array[Satellite] usertype = $usertype priced = $priced OK = $OK_to_purchase dontshow = $dontshow<br>";
#
# End Segment
#