} if ($note) { $write_permissions = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $note['acl_write']); $read_permissions = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $note['acl_read']); } else { $write_permissions = true; $read_permissions = true; } if (!$write_permissions && !$read_permissions) { header('Location: ' . $GO_CONFIG->host . 'error_docs/403.php'); exit; } //create htmlarea if ($tabtable->get_active_tab_id() != 'read_permissions' && $tabtable->get_active_tab_id() != 'write_permissions') { $htmlarea = new htmlarea(); $GO_HEADER['head'] = $htmlarea->get_header('content', -70, -240, 25); $datepicker = new date_picker(); $GO_HEADER['head'] .= $datepicker->get_header(); $GO_HEADER['body_arguments'] = 'onload="initEditor()"'; } $page_title = $lang_modules['notes']; require $GO_THEME->theme_path . "header.inc"; echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '" name="notes_form">'; echo '<input type="hidden" name="close" value="false" />'; echo '<input type="hidden" name="note_id" value="' . $note_id . '" />'; echo '<input type="hidden" name="task" value="" />'; echo '<input type="hidden" name="return_to" value="' . $return_to . '" />'; echo '<input type="hidden" name="link_back" value="' . $link_back . '" />'; echo '<input type="hidden" name="contact_id" value="' . $contact_id . '" />'; echo '<input type="hidden" name="user_id" value="' . $user_id . '" />'; echo '<input type="hidden" name="project_id" value="' . $project_id . '" />';
echo '<table border="0" width="100%"><tr><td align="center">'; require $GO_LANGUAGE->get_language_file('addressbook'); $tabtable = new tabtable('templates_tab', $ab_templates, '600', '400'); $tabtable->print_head(); echo '<table border="0" cellpadding="10" cellspacing="0"><tr><td>'; echo $ab_select_template; echo '<table border="0" cellpadding="2">'; echo '<tr><td><a class="normal" href="javascript:document.forms[0].template_id.value=\'0\';document.forms[0].submit();">' . $ab_no_template . '</a></td></tr>'; while ($tp->next_record()) { echo '<tr><td><a class="normal" href="javascript:document.forms[0].template_id.value=\'' . $tp->f('id') . '\';document.forms[0].submit();">' . $tp->f('name') . '</a></td></tr>'; } echo '</table></td></tr></table>'; echo '<br />'; $button = new button($cmdClose, "javascript:window.close()"); $tabtable->print_foot(); echo '</td></tr></table>'; echo '</form>'; } else { if ($content_type == 'text/HTML') { if ($fs_module = $GO_MODULES->get_module('filesystem')) { if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $fs_module['acl_read']) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $fs_module['acl_write'])) { $htmlarea->add_button('go_image', 'OBM images', $GO_CONFIG->control_url . '/htmlarea/images/obm_images.gif', 'false', "function insertGOimage()\r\n\t {\r\n\t popup('select_image.php','600','400');\r\n\t }"); } } } $GO_HEADER['head'] = $htmlarea->get_header('mail_body', -40, -250, 25, ''); $GO_HEADER['body_arguments'] = 'onload="initEditor()"'; require $GO_THEME->theme_path . "header.inc"; require "compose.inc"; } require $GO_THEME->theme_path . "footer.inc";
$pagestyle = str_replace("\n", '', $pagestyle); $pagestyle = str_replace("\t", '', $pagestyle); $pagestyle = str_replace("'", '"', $pagestyle); $pagestyle = str_replace(' ', '', $pagestyle); //create htmlarea $htmlarea = new htmlarea(); $htmlarea->add_button('insert', $cms_insert_file, $GO_CONFIG->control_url . 'htmlarea/images/go_image.gif', 'false', "function insertObject()\r\n {\r\n popup('select.php?site_id=" . $site_id . "', '600', '400');\r\n }"); $qn_plugin = $GO_MODULES->get_plugin('questionnaires'); if ($qn_plugin) { $htmlarea->add_button('insert_qn', 'Vragenlijst invoegen', $GO_CONFIG->control_url . 'htmlarea/images/questionnaire.gif', 'false', "function insertQN()\r\n {\r\n popup('questionnaires/select.php?site_id=" . $site_id . "', '300', '400');\r\n }"); } $com_plugin = $GO_MODULES->get_plugin('components'); if ($com_plugin) { $htmlarea->add_button('insert_reg', 'Insert component', $GO_CONFIG->control_url . 'htmlarea/images/component.gif', 'false', "function insert_component()\r\n {\r\n popup('" . $com_plugin['url'] . "select.php?site_id=" . $site_id . "', '300', '400');\r\n }"); } $GO_HEADER['head'] = $htmlarea->get_header('content', -70, -125, 25, $pagestyle, "config.baseURL='';", true, $template['restrict_editor']); $GO_HEADER['body_arguments'] = 'onload="initEditor()"'; //require the header file. This will draw the logo's and the menu require $GO_THEME->theme_path . "header.inc"; //echo '<table border="0" cellpadding="10" cellspacing="0"><tr><td>'; if (isset($feedback)) { echo $feedback; } echo '<form method="post" name="editor" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="site_id" value="' . $site_id . '" />'; echo '<input type="hidden" name="file_id" value="' . $file_id . '" />'; echo '<input type="hidden" name="folder_id" value="' . $folder_id . '" />'; echo '<input type="hidden" name="old_name" value="' . htmlspecialchars($name) . '" />'; echo '<input type="hidden" name="title" value="' . htmlspecialchars($title) . '" />'; echo '<input type="hidden" name="description" value="' . htmlspecialchars($description) . '" />'; echo '<input type="hidden" name="keywords" value="' . htmlspecialchars($keywords) . '" />';