public function download_ctex() { if (!isset($_SESSION['logged'])) { $this->login(); } else { $rc = Component::requirementsCom(); $cr = Component::comRequirements(); $tex = "\\section{Tracciamento Componenti-Requisiti}<br>\n \\begin{longtable}[H]{|p{5.5cm}|p{5.5cm}|}<br>\n \\hline<br>\n \\textbf{Componente} & \\textbf{Requisiti}\\\\<br>\n \\hline<br>"; foreach ($cr as $key => $val) { $tex .= $key . " & \\multiLineCell[t]{"; foreach ($val as $v) { $tex .= $v . "\\\\"; } $tex .= "}\\\\<br>\n \\hline<br>"; } $tex .= "\\end{longtable}<br>\n \\section{Tracciamento Requisiti-Componenti}<br>\n \\begin{longtable}[H]{|p{5.5cm}|p{5.5cm}|}<br>\n \\hline<br>\n \\textbf{Requisito} & \\textbf{Componenti}\\\\<br>\n \\hline<br>"; foreach ($rc as $key => $val) { $tex .= $key . " & \\multiLineCell[t]{"; foreach ($val as $v) { $tex .= $v . "\\\\"; } $tex .= "}\\\\<br>\n \\hline<br>"; } $tex .= "\\end{longtable}<br>"; require_once 'views/pages/output.php'; } }