Skip to content

Commit

Permalink
zip
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelCosta committed Jan 23, 2012
1 parent 7c05ab8 commit d2aa6ef
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions submeter/submeter_zip_resp_folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ function inserir_xml_base_dados($link, $keyname, $title, $subtitle, $bdate, $eda
// seleccionar o id do supervisor
$sql = "SELECT supcode FROM Supervisor WHERE email='$value';";
$result = mysqli_query($link, $sql);
$count = mysql_num_rows($result);
if ($count < 1) {
echo "<div class=\"failure>Um dos autores inseridos não está
registado no sistema.</div>\"";
return;
}
$supcod = -1;
while ($rows = mysqli_fetch_row($result)) {
$supcod = $rows[0];
}
if($supcod == -1 || $supcod == null){
echo "<div class=\"failure\">Um dos supervisores mencionados no manifesto
não está registado no sistema</div>";
return;
}

$sql = "INSERT INTO `PED`.`ProjSup` VALUES ('$new_projcode', '$supcod');";
$result = mysqli_query($link, $sql);
Expand All @@ -246,17 +246,17 @@ function inserir_xml_base_dados($link, $keyname, $title, $subtitle, $bdate, $eda
// seleccionar o id do supervisor
$sql = "SELECT authorcode FROM Author WHERE email='$value';";
$result = mysqli_query($link, $sql);
$count = mysql_num_rows($result);
if ($count < 1) {
echo "<div class=\"failure>Um dos autores inseridos não está
registado no sistema.</div>\"";
return;
}
$authorcode = -1;
while ($rows = mysqli_fetch_row($result)) {
//var_dump($rows);
$authorcode = $rows["0"];
}

if($authorcode == -1 || $authorcode == null){
echo "<div class=\"failure\">Um dos autores mencionados no manifesto
não está registado no sistema</div>";
return;
}
$sql = "INSERT INTO `PED`.`ProjAut` VALUES ('$new_projcode', '$authorcode');";
$result = mysqli_query($link, $sql);
}
Expand Down

0 comments on commit d2aa6ef

Please sign in to comment.