getColumnVal("idanalysiscomponent");
if (empty($idancompo)) {
if ($kindofrole == '3') {
$InsertQuery = new WA_MySQLi_Query($repnew);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "analysis_componenttemplate";
$InsertQuery->bindColumn("idanalysis", "i", "" . ((isset($_POST["idanalysis"])) ? $_POST["idanalysis"] : "") . "", "WA_DEFAULT");
$InsertQuery->bindColumn("idcomponent", "i", "" . ((isset($_POST["component"])) ? $_POST["component"] : "") . "", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo ? rel2abs($InsertGoTo, dirname(__FILE__)) : "";
$InsertQuery->redirect($InsertGoTo);
} else {
$InsertQuery = new WA_MySQLi_Query($repnew);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "analysis_component";
$InsertQuery->bindColumn("idanalysis", "i", "" . ((isset($_POST["idanalysis"])) ? $_POST["idanalysis"] : "") . "", "WA_DEFAULT");
$InsertQuery->bindColumn("idcomponent", "i", "" . ((isset($_POST["component"])) ? $_POST["component"] : "") . "", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo ? rel2abs($InsertGoTo, dirname(__FILE__)) : "";
$InsertQuery->redirect($InsertGoTo);
}
?>
setQuery("SELECT * FROM `analysis` WHERE analysis.idanalysis='$idanalysis'");
$tablequery->execute();
?>
setQuery("SELECT * FROM component WHERE component.company_id='$idcompany' ORDER BY component.name_component");
$componentlist->execute();
?>
setQuery("SELECT * FROM analysis_component LEFT JOIN component ON analysis_component.idcomponent=component.idcomponent WHERE analysis_component.idanalysis=$idanalysis ORDER BY component.name_component");
$companalysis->execute();
?>