server()) { metaRefresh("../login.php"); exit; } // check if new template should be created if(isset($_POST['createNewTemplate'])) { metaRefresh('pdfpage.php?type=' . $_POST['scope']); exit(); } $scopes = $_SESSION['config']->get_ActiveTypes(); // get list of account types $availableScopes = ''; $templateClasses = array(); for ($i = 0; $i < sizeof($scopes); $i++) { $templateClasses[] = array( 'scope' => $scopes[$i], 'title' => getTypeAlias($scopes[$i]), 'templates' => ""); $availableScopes .= '\n"; } // get list of templates for each account type for ($i = 0; $i < sizeof($templateClasses); $i++) { $templateList = getPDFStructureDefinitions($templateClasses[$i]['scope']); $templates = ""; for ($l = 0; $l < sizeof($templateList); $l++) { $templates = $templates . "\n"; } $templateClasses[$i]['templates'] = $templates; } // check if a template should be edited for ($i = 0; $i < sizeof($templateClasses); $i++) { if (isset($_POST['editTemplate_' . $templateClasses[$i]['scope']]) || isset($_POST['editTemplate_' . $templateClasses[$i]['scope'] . '_x'])) { metaRefresh('pdfpage.php?type=' . $templateClasses[$i]['scope'] . '&edit=' . $_POST['template_' . $templateClasses[$i]['scope']]); exit; } } // check if a profile should be deleted for ($i = 0; $i < sizeof($templateClasses); $i++) { if (isset($_POST['deleteTemplate_' . $templateClasses[$i]['scope']]) || isset($_POST['deleteTemplate_' . $templateClasses[$i]['scope'] . '_x'])) { metaRefresh('pdfdelete.php?type=' . $templateClasses[$i]['scope'] . '&delete=' . $_POST['template_' . $templateClasses[$i]['scope']]); exit; } } echo $_SESSION['header']; ?>