//document print subroutine $parsed_template = zb_DocsParseTemplate($_GET['printtemplate'], $login); print $parsed_template; die; } } } else { //new docx templates processing $documents = new ProfileDocuments(); if (wf_CheckGet(array('username'))) { $documents->setLogin($_GET['username']); } //template printing subroutine if (wf_CheckGet(array('print'))) { //back link show_window('', wf_Link('?module=pl_documents&username='******'Back', true, 'ubButton')); $docId = vf($_GET['print'], 3); $availableTemplates = $documents->getTemplates(); $templatePath = $documents::TEMPLATES_PATH; $documentsSavePath = $documents::DOCUMENTS_PATH; $templateFile = $availableTemplates[$docId]['path']; $templateName = $availableTemplates[$docId]['name']; $fullPath = $templatePath . $templateFile; $saveFileName = $documents->getLogin() . '_' . $docId . '_' . zb_rand_string(8) . '.docx'; $saveFullPath = $documentsSavePath . $saveFileName; $documents->loadAllUserData(); $templateData = $documents->getUserData(); $userAgentData = $documents->getUserAgentData(); $templateData = array_merge($templateData, $userAgentData); if (wf_checkget(array('custom'))) { show_window(__('Custom template fields'), $documents->customDocumentFieldsForm());