server()) { metaRefresh("../login.php"); exit; } // Write $_POST variables to $_GET when form was submitted via post if(isset($_POST['type'])) { $_GET = $_POST; if($_POST['pdfname'] == '') { unset($_GET['pdfname']); } } // Abort and go back to main pdf structure page if(isset($_GET['abort'])) { metarefresh('pdfmain.php'); exit; } // set new logo and headline if ((isset($_GET['headline'])) && ($_GET['logoFile'] != $_SESSION['currentPageDefinitions']['filename'])) { $_SESSION['currentPageDefinitions']['filename'] = $_GET['logoFile']; } if ((isset($_GET['headline'])) && ($_GET['headline'] != $_SESSION['currentPageDefinitions']['headline'])) { $_SESSION['currentPageDefinitions']['headline'] = str_replace('<','',str_replace('>','',$_GET['headline'])); } if(isset($_POST['defaults'])) { foreach($_POST['defaults'] as $default) { switch($default) { case 'logoFile': unset($_SESSION['currentPageDefinitions']['filename']); break; case 'headline': unset($_SESSION['currentPageDefinitions']['headline']); break; default: break; } } } // Check if pdfname is valid, then save current structure to file and go to // main pdf structure page if(isset($_GET['submit'])) { echo $_SESSION['header']; echo "