if (wf_CheckGet(array('download'))) { zb_DownloadFile($documents::TEMPLATES_PATH . $_GET['download'], 'docx'); } //template deletion if (wf_CheckGet(array('deletetemplate'))) { $documents->deleteTemplate($_GET['deletetemplate']); rcms_redirect('?module=pl_documents&username='******'Available document templates'), $documents->renderTemplatesList()); //uploading new templates $uploadControl = wf_modal(__('Upload template'), __('Upload template'), $documents->uploadForm(), 'ubButton', '600', '300'); show_window(__('Settings'), $uploadControl); //template upload subroutine if (wf_CheckPost(array('uploadtemplate'))) { $documents->doUpload(); rcms_redirect('?module=pl_documents&username='******'Previously generated documents for this user'), $documents->renderUserDocuments()); } //existing document downloading if (wf_CheckGet(array('documentdownload'))) { zb_DownloadFile($documents::DOCUMENTS_PATH . $_GET['documentdownload'], 'docx'); } //document deletion from database if (wf_CheckGet(array('deletedocument'))) { $documents->unregisterDocument($_GET['deletedocument']); rcms_redirect('?module=pl_documents&username=' . $documents->getLogin()); }