-
Notifications
You must be signed in to change notification settings - Fork 0
/
exec.modelagem.php
98 lines (78 loc) · 3.02 KB
/
exec.modelagem.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php session_start();
//error_reporting(E_ALL);
//ini_set('display_errors','1');
require_once('classes/experimento.class.php');
require_once('classes/conexao.class.php');
print_r($_REQUEST);
exit;
$conexao = new Conexao;
$conn = $conexao->Conectar();
$Experimento = new Experimento();
$Experimento->conn = $conn;
$operacao = $_REQUEST['op'];
$id = $_REQUEST['id'];
$tab = $_REQUEST['tab'];
$extensao1 = $_REQUEST['edtextensao1_oeste'].';'.$_REQUEST['edtextensao1_leste'].';'.$_REQUEST['edtextensao1_norte'].';'.$_REQUEST['edtextensao1_sul'];
//$extensao2 = $_REQUEST['edtextensao2_oeste'].';'.$_REQUEST['edtextensao2_leste'].';'.$_REQUEST['edtextensao2_norte'].';'.$_REQUEST['edtextensao2_sul'];
$noRedirect = $_REQUEST['noRedirect'];
$nome = $_REQUEST['edtexperimento'];
$descricao = $_REQUEST['edtdescricao'];
$idfonte = $_REQUEST['cmboxfonte'];
$idtipoparticionamento = $_REQUEST['cmboxtipoparticionamento'];
$numpontos = $_REQUEST['edtnumpontos'];
$buffer = $_REQUEST['edtbuffer'];
$tss = $_REQUEST['edttss'];
$numparticoes = $_REQUEST['edtnumparticoes'];
$resolution = $_REQUEST['edtresolution'];
$repetitions = $_REQUEST['edtnumrepetitions'];
$trainpercent = $_REQUEST['edttrainpercent'];
$Experimento->name = $nome;//integer,
$Experimento->description = $descricao;//integer,
$Experimento->idpartitiontype = $idtipoparticionamento;//integer,
$Experimento->num_partition = $numparticoes;//integer,
$Experimento->num_points = $numpontos ;//integer,
$Experimento->buffer = "'" . $buffer[0] . "'" ;//string
$Experimento->tss = $tss;
$Experimento->extent_model = $extensao1;
$Experimento->resolution = "'" . $resolution[0] . "'";
$Experimento->repetitions = $repetitions;
$Experimento->trainpercent = $trainpercent;
//$Experimento->extent_projection = $extensao2;
if(!empty($_REQUEST['raster'])){
$result = $Experimento->limparRaster($id);
}
if(!empty($_REQUEST['algoritmo'])){
$result = $Experimento->limparAlgoritmo($id);
}
$box=$_REQUEST['raster'];
while (list ($key,$val) = @each($box)) {
$result = $Experimento->incluirRaster($id,$val);
}
$box=$_REQUEST['algoritmo'];
while (list ($key,$val) = @each($box)) {
$result = $Experimento->incluirAlgoritmo($id,$val);
}
$Experimento->incluirExtensao($id, $extensao1);
//incluir raster Bio-Oracle
$rasterBio = array("Temperature","Salinity","Currents_velocity","Ice_thickness","Sea_ice_concentration","Nitrate","Phosphate","Silicate","Dissolved_molecular_oxygen","Iron","Chlorophyll","Phytoplankton","Primary_productivity","Calcite","pH","Photosynt_Avail_Radiation","Diffuse_attenuation","Cloud_cover");
foreach ($rasterBio as &$value) {
$box=$_REQUEST[$value];
$rasterid = $box[0];
array_shift($box);
$box = implode(",",$box);
if($box != ''){
$result = $Experimento->incluirBioOracleRaster($id,$rasterid,$box);
}
}
if($noRedirect == false || empty($noRedirect))
{
if ($result = $Experimento->alterar($id))
{
header("Location: cadexperimento.php?op=A&MSGCODIGO=84&id=$id&op=$operacao&tab=$tab");
}
else
{
header("Location: cadexperimento.php?op=A&MSGCODIGO=85&id=$id&op=$operacao&tab=$tab");
}
}
?>