if ($id == 0) { // add the listing $objInformation = new Information(); $objInformation->Title = $_REQUEST['title']; $objInformation->Create(); $objInformation->HandleFileUploads(); $objInformation->HandleDropFileUploads($aDropFields[0], 'PdfFile'); // redirect to listing list header("Location:information_list.php"); exit; } else { $objInformation = new Information($_REQUEST["id"]); $objInformation->Title = $_REQUEST['title']; $objInformation->Update(); $objInformation->HandleFileUploads(); $objInformation->HandleDropFileUploads($aDropFields[0], 'PdfFile'); // redirect to listing list header("Location:information_list.php"); exit; } } else { if ($_REQUEST['mode'] == 'e') { //listing $objInformation = new Information($id); $title = $objInformation->Title; $pdf_file = $objInformation->PdfFile; } } include "includes/pagetemplate.php"; function PageContent() {