updated to new PDF functions

This commit is contained in:
Roland Gruber 2004-08-21 11:37:01 +00:00
parent 10d873cee4
commit 4b94017629
1 changed files with 8 additions and 4 deletions

View File

@ -83,10 +83,12 @@ if ($_POST['new_host'] || $_POST['del_host'] || $_POST['pdf_host'] || $_POST['pd
$list = array(); $list = array();
// load hosts from LDAP // load hosts from LDAP
for ($i = 0; $i < sizeof($hosts); $i++) { for ($i = 0; $i < sizeof($hosts); $i++) {
$list[$i] = loadhost($hosts[$i]); $_SESSION["accountPDF-$i"] = new accountContainer("host", "accountPDF-$i");
$_SESSION["accountPDF-$i"]->load_account($hosts[$i]);
$list[$i] = $_SESSION["accountPDF-$i"];
} }
if (sizeof($list) > 0) { if (sizeof($list) > 0) {
createHostPDF($list,$pdf_structure); createModulePDF($list,$pdf_structure);
exit; exit;
} }
} }
@ -94,10 +96,12 @@ if ($_POST['new_host'] || $_POST['del_host'] || $_POST['pdf_host'] || $_POST['pd
elseif ($_POST['pdf_all']){ elseif ($_POST['pdf_all']){
$list = array(); $list = array();
for ($i = 0; $i < sizeof($_SESSION['hst_info']); $i++) { for ($i = 0; $i < sizeof($_SESSION['hst_info']); $i++) {
$list[$i] = loadhost($_SESSION['hst_info'][$i]['dn']); $_SESSION["accountPDF-$i"] = new accountContainer("host", "accountPDF-$i");
$_SESSION["accountPDF-$i"]->load_account($_SESSION['hst_info'][$i]['dn']);
$list[$i] = $_SESSION["accountPDF-$i"];
} }
if (sizeof($list) > 0) { if (sizeof($list) > 0) {
createHostPDF($list,$_POST['pdf_structure']); createModulePDF($list,$_POST['pdf_structure']);
exit; exit;
} }
} }