Version: 1.0 Release date: 01 November 2003 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /** * *@NAME: index *@PURPOSE: To show the index page *@REMARKS: This serves as the default action for the entire module * */ echo '<div style="padding: 10px">'; $tabtable = new tabtable('gen_type', 'DAO Generator', '600', '400'); $tabtable->add_tab('new', 'New DAO'); $tabtable->add_tab('sql', 'SQL Based'); $tabtable->add_tab('base', 'Base Classes'); //$tabtable->add_tab('xul', 'XUL Interface (experimental)'); $tabtable->print_head(); switch ($tabtable->get_active_tab_id()) { case 'new': newDaoForm(); break; case 'sql': sqlDaoForm(); break; case 'base': include 'base.inc'; break;
*/ require "../../Group-Office.php"; $GO_SECURITY->authenticate(); //if the user is authorising but it's logged in under another user log him out first. if (isset($_REQUEST['requested_user_id']) && $_REQUEST['requested_user_id'] != $GO_SECURITY->user_id) { SetCookie("GO_UN", "", time() - 3600, "/", "", 0); SetCookie("GO_PW", "", time() - 3600, "/", "", 0); unset($_SESSION); unset($_COOKIES); $GO_SECURITY->logout(); $GO_SECURITY->authenticate(); } $return_to = $GO_CONFIG->host . 'configuration/'; require $GO_LANGUAGE->get_base_language_file('account'); $page_title = $acTitle; $tabtable = new tabtable('account', $acManager, '100%', '300'); $tabtable->add_tab('profile.inc', $acProfile); $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : ''; switch ($task) { case 'accept': if (isset($_REQUEST['requested_user_id']) && isset($_REQUEST['authcode'])) { if ($user = $GO_USERS->get_user($_REQUEST['requesting_user_id'])) { $middle_name = $user['middle_name'] == '' ? '' : $user['middle_name'] . ' '; $user_name = $middle_name . $user['last_name']; if ($GO_USERS->authorize($_REQUEST['requesting_user_id'], $_REQUEST['authcode'], $GO_SECURITY->user_id)) { $feedback = $ac_auth_success . '<br /><br />'; $mail_body = $ac_salutation . " " . $sir_madam[$user['sex']] . " " . $user_name . ",\r\n\r\n"; $mail_body .= $_SESSION['GO_SESSION']['name'] . " " . $ac_auth_accept_mail_body; sendmail($user['email'], $GO_CONFIG->webmaster_email, $GO_CONFIG->title, $ac_auth_accept_mail_title, $mail_body, '3 (Normal)', 'text/plain'); } } else {
} echo '</table>'; $button = new button(); echo '<br/>'; echo $button->get_button('Delete', "document.forms[0].task.value='delete';document.forms[0].submit();"); break; case 'properties': if (!$db->query("SELECT * from messages_users WHERE user_id={$GO_SECURITY->user_id}") || !$db->next_record()) { $acl_write = $GO_SECURITY->get_new_acl('message write: ' . $GO_SECURITY->user_id); if ($acl_write > 0) { $db->query("INSERT INTO messages_users (user_id,acl_write) VALUES ('{$GO_SECURITY->user_id}','{$acl_write}')"); } $db->query("SELECT * from messages_users WHERE user_id={$GO_SECURITY->user_id}"); $db->next_record(); } $tabtable = new tabtable('messages_tab', 'Messages', '100%', '400', '120', '', true); $tabtable->add_tab('properties', 'Properties'); $tabtable->add_tab('permissions', 'Permissions'); $tabtable->print_head(); switch ($tabtable->get_active_tab_id()) { case 'properties': break; case 'permissions': print_acl($db->f('acl_write')); echo '<br /><br /> '; $button = new button($cmdClose, "javascript:document.location='" . $return_to . "';"); break; } $tabtable->print_foot(); break; }
Version: 1.0 Release date: 01 November 2003 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /** * *@NAME: fieldOptions *@PURPOSE: To show the main page of the module *@REMARKS: This serves as the default action for the entire module * */ $post = $_POST; $tabtable = new tabtable('gen_type', 'DAO Generator', '600', '400'); $tabtable->add_tab('new', 'New DAO'); $tabtable->add_tab('sql', 'SQL Based'); $tabtable->add_tab('base', 'Base Classes'); $tabtable->print_head(); ?> <div align="center"> <table border="0" width="80%" cellspacing=0 cellpadding=4> <form action="generateCode.php" method="POST"> <tr><td colspan="4" align="left"><br><br><font face="Verdana" size="2"><b> Database Column Names and Types:</b></font></td></tr> <tr><td colspan="4"><font face="Verdana" size="2"><br> You must give the names for all columns in your database table. Wrong or missing names will make the generated code malfunction.
$auto_check = isset($_REQUEST['auto_check']) ? true : false; $use_ssl = isset($_REQUEST['use_ssl']) ? true : false; $novalidate_cert = isset($_REQUEST['novalidate_cert']) ? true : false; } require $GO_THEME->theme_path . "header.inc"; echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '" name="email_client">'; echo '<input type="hidden" name="task" value="" />'; echo '<input type="hidden" name="close" value="false" />'; echo '<input type="hidden" name="return_to" value="' . $return_to . '" />'; echo '<input type="hidden" name="link_back" value="' . $link_back . '" />'; if (isset($_REQUEST['account_id'])) { $title = $ml_edit_account; } else { $title = $ml_new_account; } $tabtable = new tabtable('account_tab', $title, '600', '300', '100', '', true); $tabtable->print_head(); if (isset($_REQUEST['account_id'])) { echo '<input type="hidden" value="' . $_REQUEST['account_id'] . '" name="account_id" />'; } if ($type == 'pop3') { $disabled = 'disabled'; } else { $disabled = ''; } echo '<input type="hidden" name="spam" value="' . $spam . '" />'; echo '<input type="hidden" name="sent" value="' . $sent . '" />'; echo '<input type="hidden" name="draft" value="' . $draft . '" />'; echo '<input type="hidden" name="trash" value="' . $trash . '" />'; ?>
$GO_MODULES->authenticate('notes'); require $GO_LANGUAGE->get_language_file('notes'); $post_action = isset($_REQUEST['post_action']) ? $_REQUEST['post_action'] : ''; $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : ''; $link_back = isset($_REQUEST['link_back']) && $_REQUEST['link_back'] != '' ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI']; //load contact management class require $GO_MODULES->class_path . "notes.class.inc"; $notes = new notes(); $page_title = $lang_modules['notes']; require $GO_THEME->theme_path . "header.inc"; echo '<form name="template" method="post" action="' . $_SERVER['PHP_SELF'] . '" />'; echo '<input type="hidden" name="template_id" value="" />'; echo '<input type="hidden" name="task" value="" />'; echo '<input type="hidden" name="close" value="false" />'; //create a tab window $tabtable = new tabtable('notes_tab', $lang_modules['notes'], '100%', '400'); if ($GO_MODULES->write_permissions) { $tabtable->add_tab('notes', $lang_modules['notes']); $tabtable->add_tab('catagories', $no_catagories); } $tabtable->print_head(); //set the user_id so it will only show notes from this user $user_id = $GO_SECURITY->user_id; if ($tabtable->get_active_tab_id() == 'catagories') { require 'catagories.inc'; } else { require 'notes.inc'; } $tabtable->print_foot(); echo '</form>'; require $GO_THEME->theme_path . "footer.inc";
$GO_HEADER['head'] = $datepicker->get_header(); require $GO_THEME->theme_path . 'header.inc'; if ($ab_module) { $ab->enable_contact_selector(); } echo '<form name="event_form" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="calendar_id" value="' . $calendar_id . '" />'; echo '<input type="hidden" name="event_id" value="' . $event_id . '" />'; echo '<input type="hidden" name="task" value="" />'; echo '<input type="hidden" name="close" value="false" />'; echo '<input type="hidden" name="emptyform" value="false" />'; echo '<input type="hidden" name="return_to" value="' . $return_to . '" />'; echo '<input type="hidden" name="link_back" value="' . $link_back . '" />'; //address_string used by the addressbok selector echo '<input type="hidden" name="address_string" value="" />'; $tabtable = new tabtable('event_table', $title, '600', '400', '120', '', true, 'left', 'top', 'event_form'); if ($event_id > 0) { if ($cal->get_participants($event_id)) { $tabtable->add_tab('properties', $strProperties); $tabtable->add_tab('participants', $sc_participants); } } $tabtable->print_head(); echo '<br />'; switch ($tabtable->get_active_tab_id()) { case 'participants': echo '<input type="hidden" name="status" />'; echo '<table border="0">'; echo '<tr><td><h3>' . $strName . '</td>'; echo '<td><h3>' . $strEmail . '</td>'; echo '<td><h3>' . $sc_status . '</td></tr>';
$tabtable->add_tab($cf->f('id'), $cf->f('name')); } } } //------------------------ $tabtable->add_tab('categories', $ab_category); //---------------- $tabtable->add_tab('contacts', $ab_employees); $tabtable->add_tab('read_permissions', $strReadRights); $tabtable->add_tab('write_permissions', $strWriteRights); $addressbook_id = $company['addressbook_id']; if (!($write_permission = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $company['acl_write']))) { $read_permission = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $company['acl_read']); } } else { $tabtable = new tabtable('company_table', $ab_new_company, '100%', '400', '120', '', true, 'left', 'top', 'company_form'); $write_permission = true; $read_permission = true; } if (!$write_permission && !$read_permission) { header('Location: ' . $GO_CONFIG->host . 'error_docs/403.php'); exit; } require $GO_THEME->theme_path . "header.inc"; $active_tab = isset($_REQUEST['active_tab']) ? $_REQUEST['active_tab'] : null; if (isset($active_tab)) { $tabtable->set_active_tab($active_tab); } if ($tabtable->get_active_tab_id() == 'contacts') { $ab->enable_contact_selector(); }
//we set the following for the control $acl_control_acl_id = $user["acl_id"]; //we hide ourself because we do not need to protect ourself from us. $acl_control_hide_self = true; //TIP: look in this file for more options. //we actually require the control here require $GO_CONFIG->control_path . "acl_control.inc"; //and we need a buttton to update this and that's all what's to it. $button = new button($cmdSave, 'javascript:document.forms[0].submit()'); //When you are creating your own secured objects you just call th e function: $GO_SECURITY->get_new_acl() //to create a new ACL. echo '<br /><br />'; echo '<p><b>A dropbox filled with grouped contacts</b></p>'; //Now we put some things in a table with tabs NOTE 'html_table.inc' is deprecated the class below should be used. // ID TITLE WIDTH HEIGHT $tabtable = new tabtable('example_tabtable', 'Example tab window title', '600', '400'); // ID TITLE $tabtable->add_tab('tab_1', 'Tab 1'); $tabtable->add_tab('tab_2', 'Tab 2'); $tabtable->print_head(); switch ($tabtable->get_active_tab_id()) { case 'tab_1': echo 'This is content in tab 1!'; break; case 'tab_2': echo 'This is content in tab 2!'; break; } $tabtable->print_foot(); ?> </td>
$query = "select * from acl where acl_id='" . Security::sqlsecure($_GET['acl_write']) . "' and user_id='" . whoami() . "'"; $mydb = new db($query); if (!$mydb->next_record()) { $query = "insert into acl (acl_id,user_id) values ('" . Security::sqlsecure($_GET['acl_write']) . "','" . whoami() . "')"; $mydb = new db($query); } } } // $return_to = isset($_REQUEST['return_to']) ? $_REQUEST['return_to'] : $_SERVER['HTTP_REFERER']; $link_back = isset($_REQUEST['link_back']) ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI']; $ticket['acl_read'] = get_cross_value("{$prefix}{$hlpdsk_prefix}_tickets", "acl_read", " where Ticket_Number='" . Security::sqlsecure($Ticket_Number) . "'"); $ticket['acl_write'] = get_cross_value("{$prefix}{$hlpdsk_prefix}_tickets", "acl_write", " where Ticket_Number='" . Security::sqlsecure($Ticket_Number) . "'"); $acl_read = $ticket['acl_read']; $acl_write = $ticket['acl_write']; $tabtable = new tabtable('ticket_tabtable', $tts_lang_tickets_details, '100%', '400', '120', '', true); if ($acl_read > 0 and $acl_write > 0) { $tabtable->add_tab('properties', $strProperties); $tabtable->add_tab('new_task', $helpdesk_add_comment); $tabtable->add_tab('show_tasks', $tts_lang_comments); $tabtable->add_tab('read_permissions', $strReadRights); $tabtable->add_tab('write_permissions', $strWriteRights); } $tabtable->print_head(); echo '</form>'; echo '<TABLE border=1 cellPadding=1 cellSpacing=1 width="100%"> <TBODY> <tr><td bgcolor="#def1f9" colspan=100%><H2 align=center>' . $tts_lang_ticket_number . ':' . $Ticket_Number . '</H2></td></tr></table>'; switch ($tabtable->get_active_tab_id()) { case 'read_permissions': if ($GO_SECURITY->user_in_acl(whoami(), $ticket['acl_read']) or $GO_SECURITY->user_in_acl(whoami(), $ticket['acl_write'])) {
case 'search_file': $task = 'file_properties'; $search_file = true; break; } //set the page title for the header file $page_title = $lang_modules['cms']; //require the header file. This will draw the logo's and the menu require $GO_THEME->theme_path . "header.inc"; echo '<form name="cms" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="site_id" value="' . $site_id . '" />'; echo '<input type="hidden" name="folder_id" value="' . $folder_id . '" />'; 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="close" value="false" />'; $tabtable = new tabtable('properties', $fbProperties, '600', '400', '100', '', true); if ($task == 'file_properties') { echo '<input type="hidden" name="task" value="file_properties" />'; echo '<input type="hidden" name="file_id" value="' . $file_id . '" />'; $write_perms = true; $item = $cms->get_file($file_id); $item['parent_id'] = $item['folder_id']; $item['size'] = format_size($item['size']); $tabtable->add_tab($fbProperties, 'properties'); if (strtolower($item['content_type']) == 'text/html') { $tabtable->add_tab('meta', 'meta'); } $tabtable->add_tab('search_words', $cms_search_words); } else { echo '<input type="hidden" name="task" value="folder_properties" />'; $item = $cms->get_folder($folder_id);
$feedback = "<p class=\"Error\">" . $error_missing_field . "</p>"; } break; } if ($calendar_id > 0) { $calendar = $cal->get_calendar($calendar_id); $title = $calendar['name']; $has_write_permission = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $calendar['acl_write']); } else { $calendar['start_hour'] = isset($_POST['calendar_start_hour']) ? $_POST['calendar_start_hour'] : '07'; $calendar['end_hour'] = isset($_POST['calendar_end_hour']) ? $_POST['calendar_end_hour'] : '20'; $calendar['name'] = isset($_POST['name']) ? smartstrip($_POST['name']) : ''; $title = $sc_new_calendar; $has_write_permission = true; } $tabtable = new tabtable('calendar', $title, '100%', '400', '120', '', true); if ($calendar_id > 0) { $tabtable->add_tab('calendar', $strProperties); $tabtable->add_tab('holidays', $sc_holidays); if ($has_write_permission) { $tabtable->add_tab('import', $cal_import); } $tabtable->add_tab('read_permissions', $strReadRights); $tabtable->add_tab('write_permissions', $strWriteRights); } if ($tabtable->get_active_tab_id() == 'holidays') { $datepicker = new date_picker(); $GO_HEADER['head'] = $datepicker->get_header(); } require $GO_THEME->theme_path . 'header.inc'; echo '<form name="event" method="post" action="' . $_SERVER['PHP_SELF'] . '" enctype="multipart/form-data">';
require "../../Group-Office.php"; $GO_SECURITY->authenticate(); $GO_MODULES->authenticate('projects'); require $GO_LANGUAGE->get_language_file('projects'); $page_title = $menu_projects; require $GO_MODULES->class_path . "projects.class.inc"; $projects = new projects(); $post_action = isset($_REQUEST['post_action']) ? $_REQUEST['post_action'] : ''; $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : ''; $link_back = isset($_REQUEST['link_back']) && $_REQUEST['link_back'] != '' ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI']; $time = get_time(); $day = date("j", $time); $year = date("Y", $time); $month = date("m", $time); $date = date($_SESSION['GO_SESSION']['date_format'], $time); $tabtable = new tabtable('projects_tab', $lang_modules['projects'], '100%', '400'); $tabtable->add_tab('projects.inc', $lang_modules['projects']); if ($GO_MODULES->write_permissions) { $tabtable->add_tab('template.inc', $pm_process_template); $tabtable->add_tab('category.inc', $pm_category); } /* $tabtable->add_tab('load.inc', $pm_load); $tabtable->add_tab('fees.inc', $pm_fees); */ switch ($post_action) { case 'projects': $tabtable->set_active_tab(0); break; case 'template': if ($GO_MODULES->write_permissions) {
<?php require "../../Group-Office.php"; //authenticate the user //if $GO_SECURITY->authenticate(true); is used the user needs admin permissons $GO_SECURITY->authenticate(); //see if the user has access to this module //for this to work there must be a module named 'vdict' $GO_MODULES->authenticate('vdict'); require $GO_THEME->theme_path . "header.inc"; require 'db/ev.php'; $tabtable = new tabtable('Dictionary', 'Dictionary', '100%', '400'); $tabtable->add_tab($dict_id, $dict_description); $tabtable->print_head(); $wtabtable = new tabtable('wlist_table', 'Word', '200', '300', '30', '', false, 'left', 'top', '', 'vertical'); echo '<table border="0" cellspacing="0" cellpadding="4">'; // Left panel echo '<tr><td>'; echo '<table border="0" cellspacing="0" cellpadding="0">'; echo '<tr><td>'; foreach ($dict_dbhash as $label => $file) { $wtabtable->add_tab($file, $label); } $active_tab = isset($_REQUEST['active_tab']) ? $_REQUEST['active_tab'] : null; if (isset($active_tab)) { $wtabtable->set_active_tab($active_tab); } $wtabtable->print_head(); echo '<table border="0" cellspacing="0" cellpadding="4">'; echo '<tr><td>'; echo '<input id="word" type="text" class="textbox" name="word" value="" style="width:160" onchange="word_lookup()">';
//load the CMS module class library require $GO_MODULES->class_path . 'cms.class.inc'; $cms = new cms(); //get the language file require $GO_LANGUAGE->get_language_file('cms'); $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : ''; $template_id = isset($_REQUEST['template_id']) ? $_REQUEST['template_id'] : 0; if ($template_id > 0) { $template = $cms->get_template($template_id); if (!$GO_SECURITY->has_permission($GO_SECURITY->user_id, $template['acl_write'])) { header('Location: ' . $GO_CONFIG->host . 'error_docs/403.php'); exit; } } //create a tab window $tpl_table = new tabtable('template_tab', $cms_theme, '100%', '100%', '100', '', true); switch ($task) { case 'save_template': if ($_SERVER['REQUEST_METHOD'] == 'POST') { $name = trim($_POST['name']); $restrict_editor = isset($_POST['restrict_editor']) ? $_POST['restrict_editor'] : ''; if ($name == '') { $feedback = '<p class="Error">' . $error_missing_field . '</p>'; } else { if (isset($_FILES['additional_style_file']) && is_uploaded_file($_FILES['additional_style_file']['tmp_name'])) { $fp = fopen($_FILES['additional_style_file']['tmp_name'], 'r'); $additional_style = addslashes(fread($fp, $_FILES['additional_style_file']['size'])); fclose($fp); unlink($_FILES['additional_style_file']['tmp_name']); } else { $additional_style = smart_addslashes($_POST['additional_style']);
$tts = new db(); require_once "classes.php"; require_once "menu.php"; $func = ''; if (isset($_POST['func'])) { $func = $_POST['func']; } if (isset($_GET['func'])) { $func = $_GET['func']; } $button = new button(); $button_left = $button->get_button($cmdAdd, 'addItems(this.form.AvailItems,this.form.AvailValue, this.form.SelItems);'); $button_right = $button->get_button($cmdDelete, 'addItemToTextBox(this.form.SelItems,this.form.AvailValue,this.form.AvailItems);removeItems(this.form.SelItems);'); $button_submit = $button->get_button($cmdOk, "javascript:this.form.Sel.value = makeStringFromSelect(this.form.SelItems); this.form.submit();"); $button_reset = $button->get_button($cmdReset, "javascript:this.form.reset();"); $tabtable = new tabtable('admin_tabtable', $helpdesk_title_admin, '100%', '400'); #$tabtable->add_tab('welcome', $helpdesk_menu_administration); $tabtable->add_tab('categories', $helpdesk_menu_categories); $tabtable->add_tab('agents', $helpdesk_menu_groups); $tabtable->add_tab('permissions', $helpdesk_menu_permissions); $tabtable->add_tab('priorities', $helpdesk_menu_priorities); $tabtable->add_tab('projects', $helpdesk_menu_projects); $tabtable->add_tab('status', $helpdesk_menu_status); #$tabtable->add_tab('edit_globals', $helpdesk_menu_globals); $tabtable->print_head(); $admin_tabtable = $tabtable->active_tab; if (Security::is_action_allowed("admin")) { switch ($tabtable->get_active_tab_id()) { case 'welcome': echo '<h1>' . $name . '</h1>'; break;
} $tabtable = new tabtable('sites', htmlspecialchars($site['name'] . ' (' . $site['domain'] . ')'), '600', '400', '100', '', true); $tabtable->add_tab('properties', $strProperties); $tabtable->add_tab('search_words', $cms_search_words); if ($root_publish_path != '') { $tabtable->add_tab('publish', $cms_publish); } $tabtable->add_tab('write_permissions', $strWriteRights); if ($site['acl_read'] > 0) { $tabtable->add_tab('read_permissions', $strReadRights); } if ($task == 'edit_search_words') { $tabtable->set_active_tab('search_words'); } } else { $tabtable = new tabtable('properties', $cms_new_site, '600', '400'); } switch ($task) { case 'save_search_word': if ($_POST['close'] == 'false') { $task = 'add_search_word'; } $search_word_name = smart_addslashes(trim($_POST['search_word_name'])); if ($search_word_name == '') { $feedback = '<p class="Error">' . $error_missing_field . '</p>'; $task = 'add_search_word'; } else { $search_word_id = isset($_POST['search_word_id']) ? $_POST['search_word_id'] : 0; if ($search_word_id > 0) { $search_word = $cms->get_search_word_by_name($site_id, $search_word_name); if ($search_word && $search_word['id'] != $search_word_id) {
<?php /* Copyright HPT Commerce 2004 Author: Tran Kien Duc <*****@*****.**> Version: 1.0 Release date: 25 August 2004 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ // $tabtable = new tabtable("config","Config","100%"); $tabtable = new tabtable('active_tab', $strConfig, '100%', '400', '120', '', true); $tabtable->add_tab("edit_config.php", $contacts_contacts); $tabtable->add_tab("edit_config.php", $ab_companies); $tabtable->add_tab("edit_config.php", $contacts_members); if ($GO_SECURITY->has_admin_permission($GO_SECURITY->user_id)) { $tabtable->add_tab("categories.php", $strModifyCategories); } $tabtable->set_active_tab(empty($_REQUEST['active_tab']) ? 0 : (isset($_REQUEST['config']) ? $_REQUEST['config'] : null)); $tabtable->print_head(); require $tabtable->get_active_tab_id(); $tabtable->print_foot();
$mail_client = isset($_POST['mail_client']) ? $_POST['mail_client'] : "0"; $DST = isset($_POST['DST']) ? '1' : '0'; //if date formats are not present in the settings then use this default $date_format = isset($_POST['date_format']) && $_POST['date_format'] != '' ? $_POST['date_format'] : 'd-m-Y H:i'; $GO_USERS->set_preferences($GO_SECURITY->user_id, smart_addslashes($_POST['date_format']), smart_addslashes($_POST['time_format']), smart_addslashes($_POST['thousands_seperator']), smart_addslashes($_POST['decimal_seperator']), smart_addslashes($_POST['currency']), $mail_client, $_POST['max_rows_list'], $_POST['timezone'], $DST, $_POST['start_module'], $_POST['language'], $_POST['theme'], $_POST['first_weekday']); $save_action = false; echo '<script type="text/javascript">'; if ($_POST['close'] == 'true') { echo 'parent.location="' . $GO_CONFIG->host . 'index.php?return_to=' . urlencode($return_to) . '";'; } else { echo 'parent.location="' . $GO_CONFIG->host . 'index.php?return_to=' . urlencode($_SERVER['PHP_SELF']) . '";'; } echo '</script>'; } } $tabtable = new tabtable('preferences_tab', $menu_preferences, '100%', '400', '120', '', true); $tabtable->add_tab('preferences', $menu_preferences_tab); $tabtable->add_tab('modules', $menu_modules_tab); ?> <form name="preferences" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?> "> <input type="hidden" name="save_action" /> <input type="hidden" name="task" /> <input type="hidden" name="close" value="false" /> <?php $tabtable->print_head(); if ($tabtable->get_active_tab_id() == 'preferences') { ?> <table border="0" cellpadding="0" cellspacing="3">
/* MS: If a standard user has only one site redirect him there directly. */ if (!$GO_MODULES->write_permissions) { if ($count = $cms->get_authorized_sites($GO_SECURITY->user_id)) { if ($count == 1) { $cms->next_record(); header('Location: browse.php?site_id=' . $cms->f('id')); exit; } } } //get the language file require $GO_LANGUAGE->get_language_file('cms'); //create a tab window $tabtable = new tabtable('sites', $lang_modules['cms'], '100%', '400'); //$tabtable->add_tab('subscribed.inc', $cms_your_sites); $tabtable->add_tab('sites.inc', $cms_all_sites); if ($GO_MODULES->write_permissions) { $tabtable->add_tab('templates.inc', $cms_themes_menu); $tabtable->add_tab('configuration.inc', $menu_configuration); } //perform tasks before output to client $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : ''; if (isset($_REQUEST['tabindex'])) { $tabtable->set_active_tab($_REQUEST['tabindex']); } switch ($task) { /* MS: Removed subscribing to sites
</tr> </table> <?php echo '<form name="projects_form" method="get" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="task" />'; echo '<br />'; if (isset($feedback)) { echo $feedback; } $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 'projects'; echo '<input type="hidden" name="page" value="' . $page . '"/>'; switch ($page) { case 'config': if ($GO_MODULES->write_permissions) { $tabtable = new tabtable('projects_tab', $pm_config, '100%', '400', '120', '&page=config'); $tabtable->add_tab('template.inc', $pm_process_template); $tabtable->add_tab('category.inc', $pm_category); $tabtable->print_head(); require $tabtable->get_active_tab_id(); $tabtable->print_foot(); } break; case 'projects': require 'projects.inc'; break; default: require 'projects.inc'; break; } echo '</form>';
} //require the header file. This should file should always be included before output //to the client starts. //some of the controls require some code in the <head></head> part of the HTML page. //You can use $GO_HEADER['head'] for this. //The HTMLArea control requires a header: $htmlarea = new htmlarea(); $GO_HEADER['head'] = $htmlarea->get_header('content', -70, -240, 25); //The JSCalendar control requires a header too: $datepicker = new date_picker(); $GO_HEADER['head'] .= $datepicker->get_header(); //several control classes are available from classes/base/controls/ //First we create a tabbed window. (From classes/base/controls/tabtable.class.inc) //We only create the object here but we actually print it later after the header.inc //file is included $tabtable = new tabtable('example_tabtable', 'Example tab window title', '100%', '400'); $tabtable->add_tab('welcome', 'Welcome'); $tabtable->add_tab('controls', 'Some controls'); $tabtable->add_tab('acl_demo', 'ACL'); $tabtable->add_tab('htmlarea', 'HTMLArea'); $tabtable->add_tab('jscalendar', 'JSCalendar'); //You can set <body> arguments too. This is required for HTMLArea: //but only if the htmlarea is in this page so we have to check if //we are in the htmlarea tab if ($tabtable->get_active_tab_id() == 'htmlarea') { $GO_HEADER['body_arguments'] = 'onload="initEditor()"'; } //now that the header is prepared we can actually include the header.inc file. require $GO_THEME->theme_path . "header.inc"; //Print out the heading of the tabbed table. $tabtable->print_head();
if ($addressbook_id > 0 && ($addressbook = $ab->get_addressbook($addressbook_id))) { if (!($write_permission = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $addressbook['acl_write']))) { $read_permission = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $addressbook['acl_read']); } $name = isset($name) ? $name : $addressbook['name']; $tabtable = new tabtable('addressbook', $name, '460', '400', '120', '', true); $tabtable->add_tab('name', $strProperties); if ($write_permission) { $tabtable->add_tab('groups', $contacts_groups); $tabtable->add_tab('import', $contacts_import); } $tabtable->add_tab('export', $contacts_export); $tabtable->add_tab('read_permissions', $strReadRights); $tabtable->add_tab('write_permissions', $strWriteRights); } else { $tabtable = new tabtable('addressbook', $ab_new_ab, '460', '400', '120', '', true); $write_permission = true; } if (!$write_permission && !$read_permission) { header('Location: ' . $GO_CONFIG->host . 'error_docs/403.php'); exit; } if (isset($_REQUEST['active_tab'])) { $tabtable->set_active_tab($_REQUEST['active_tab']); } $link_back .= '&active_tab=' . $tabtable->active_tab; require $GO_THEME->theme_path . "header.inc"; echo '<form name="addressbook" method="post" action="' . $_SERVER['PHP_SELF'] . '" enctype="multipart/form-data">'; echo '<input type="hidden" name="task" />'; echo '<input type="hidden" name="close" value="false" />'; echo '<input type="hidden" name="addressbook_id" value="' . $addressbook_id . '" />';
} } else { $feedback = '<p class="Error">' . $strSaveError . '</p>'; } } } break; } if ($note_id > 0) { $note = $notes->get_note($note_id); $tabtable = new tabtable('note_tab', $note['name'], '100%', '400', '120', '', true); $tabtable->add_tab('properties', $strProperties); $tabtable->add_tab('read_permissions', $strReadRights); $tabtable->add_tab('write_permissions', $strWriteRights); } else { $tabtable = new tabtable('note_tab', $no_new_note, '', '400', '120', '', true); $note = false; } if ($note && $task != 'save_note') { $name = $note['name']; $contact_id = $note['contact_id']; $project_id = $note['project_id']; $user_id = $note['user_id']; $file_path = $note['file_path']; $content = $note['content']; $catagory_id = $note['catagory_id']; $due_date = $note['due_date'] > 0 ? date($_SESSION['GO_SESSION']['date_format'], $note['due_date']) : ''; $responsible_user_id = $note['res_user_id']; $ctime = date($_SESSION['GO_SESSION']['date_format'] . ' ' . $_SESSION['GO_SESSION']['time_format'], $note['ctime'] + $_SESSION['GO_SESSION']['timezone'] * 3600); $mtime = date($_SESSION['GO_SESSION']['date_format'] . ' ' . $_SESSION['GO_SESSION']['time_format'], $note['mtime'] + $_SESSION['GO_SESSION']['timezone'] * 3600); } else {
require "../Group-Office.php"; $GO_SECURITY->authenticate(); //if the user is authorising but it's logged in under another user log him out first. if (isset($_REQUEST['requested_user_id']) && $_REQUEST['requested_user_id'] != $GO_SECURITY->user_id) { SetCookie("GO_UN", "", time() - 3600, "/", "", 0); SetCookie("GO_PW", "", time() - 3600, "/", "", 0); unset($_SESSION); unset($_COOKIES); $GO_SECURITY->logout(); $GO_SECURITY->authenticate(); } $return_to = $GO_CONFIG->host . 'configuration/'; require $GO_LANGUAGE->get_base_language_file('account'); require $GO_LANGUAGE->get_base_language_file('preferences'); $page_title = $acTitle; $tabtable = new tabtable('account', $menu_configuration, '100%', '300', '150', '', false, 'left', 'top', 'account_form', $tab_direction = 'vertical'); $tabtable->add_tab('profile.inc', $acProfile); $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : ''; switch ($task) { case 'save_look': $GO_USERS->set_look_and_feel($GO_SECURITY->user_id, $_POST['max_rows_list'], $_POST['start_module'], $_POST['language'], $_POST['theme']); echo '<script type="text/javascript">'; if ($_POST['close'] == 'true') { echo 'parent.location="' . $GO_CONFIG->host . 'index.php?return_to=' . urlencode($return_to) . '";'; } else { echo 'parent.location="' . $GO_CONFIG->host . 'index.php?return_to=' . urlencode($_SERVER['PHP_SELF'] . '?' . $_POST['query_string']) . '";'; } echo '</script>'; exit; break; case 'save_notations':
$birthday = $contact['birthday'] > 0 ? db_date_to_date($contact['birthday']) : ''; } $datepicker = new date_picker(); $GO_HEADER['head'] = $datepicker->get_header(); $overlib = new overlib(); $GO_HEADER['head'] .= $overlib->get_header(); require $GO_THEME->theme_path . "header.inc"; echo '<form name="add" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" value="' . $contact["source_id"] . '" name="source_id" />'; echo '<input type="hidden" name="task" value="" />'; echo '<input type="hidden" name="close" value="false" />'; echo '<input type="hidden" name="return_to" value="' . $return_to . '" />'; echo '<input type="hidden" name="contact_id" value="' . $contact_id . '" />'; echo '<table border="0"><tr>'; $title = $contact_id > 0 ? $ab_contact : $contacts_add; $tabtable = new tabtable('contact_table', $title, '100%', '400', '120', '', true, 'left', 'top', 'add', 'vertical'); if ($contact_id > 0) { $tabtable->add_tab('profile', $contact_profile); if ($custom_fields_plugin) { require_once $custom_fields_plugin['path'] . 'classes/custom_fields.class.inc'; $cf = new custom_fields('ab_custom_contact_fields'); if ($cf->get_catagories($GO_SECURITY->user_id) > 0) { while ($cf->next_record()) { $tabtable->add_tab($cf->f('id'), $cf->f('name')); } } } $projects_module = $GO_MODULES->get_module('projects'); if ($projects_module) { if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $projects_module['acl_read']) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $projects_module['acl_write'])) { $tabtable->add_tab('projects', $lang_modules['projects']);
exit; } } } if ($view_id > 0) { $view = $cal->get_view($view_id); $title = $view['name']; $has_write_permission = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $view['acl_write']); } else { $view['start_hour'] = isset($_POST['view_start_hour']) ? $_POST['view_start_hour'] : '07'; $view['end_hour'] = isset($_POST['view_end_hour']) ? $_POST['view_end_hour'] : '20'; $view['name'] = isset($_POST['name']) ? smartstrip($_POST['name']) : ''; $title = $cal_new_view; $has_write_permission = true; } $tabtable = new tabtable('view', $title, '100%', '400', '120', '', true); if ($view_id > 0) { $tabtable->add_tab('view', $strProperties); $tabtable->add_tab('read_permissions', $strReadRights); $tabtable->add_tab('write_permissions', $strWriteRights); } if ($tabtable->get_active_tab_id() == 'holidays') { $datepicker = new date_picker(); $GO_HEADER['head'] = $datepicker->get_header(); } require $GO_THEME->theme_path . 'header.inc'; echo '<form name="event" method="post" action="' . $_SERVER['PHP_SELF'] . '" enctype="multipart/form-data">'; echo '<input type="hidden" name="view_id" value="' . $view_id . '" />'; echo '<input type="hidden" name="task" value="" />'; echo '<input type="hidden" name="close" value="false" />'; echo '<input type="hidden" name="type" value="merged" />';
function show_html($Ticket_Number, $result) { global $name; $textmenu = menu("Show_Tickets", ''); eval($textmenu); $tabtable = new tabtable('newticket_tabtable', 'modifing ticket', '100%', '400'); $tabtable->print_head(); $statusbar = new statusbar(); $statusbar->info_text = "Modifing ticket {$Ticket_Number}"; $statusbar->turn_red_point = 90; echo "<center><br><br>" . $statusbar->print_bar(95, 100); echo " <script language=\"Javascript\" type=\"text/javascript\">\n <!--\n function gotoThread(){\n window.location.href=\"showline.php?Ticket_Number={$Ticket_Number}\";\n }\n window.setTimeout(\"gotoThread()\", 3000);\n //-->\n </script>\n"; $tabtable->print_foot(); }
$link_back = isset($_REQUEST['link_back']) && $_REQUEST['link_back'] != '' ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI']; if ($task == 'save') { $disable_accounts = isset($_POST['disable_accounts']) ? $_POST['disable_accounts'] : 'false'; $GO_CONFIG->save_setting('em_disable_accounts', $disable_accounts); if ($_POST['close'] == 'true') { header('Location: ' . $return_to); exit; } } require $GO_THEME->theme_path . "header.inc"; echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '" name="email_client">'; echo '<input type="hidden" name="task" value="" />'; echo '<input type="hidden" name="close" value="false" />'; echo '<input type="hidden" name="return_to" value="' . $return_to . '" />'; echo '<input type="hidden" name="link_back" value="' . $link_back . '" />'; $cfg_tab = new tabtable('configuration', $menu_configuration, '600', '300'); $cfg_tab->print_head(); $disable_accounts_check = $GO_CONFIG->get_setting('em_disable_accounts') == 'true' ? true : false; echo '<br />'; $checkbox = new checkbox('disable_accounts', 'true', $ml_disable_accounts, $disable_accounts_check); echo '<br /><br />'; $button = new button($cmdOk, "javascript:_save('true')"); echo ' '; $button = new button($cmdApply, "javascript:_save('false')"); echo ' '; $button = new button($cmdCancel, "javascript:document.location='" . $return_to . "';"); $cfg_tab->print_foot(); ?> <script type="text/javascript"> function _save(close) {
} else { //header('Content-Type: '.$type['mime']); header('Pragma: no-cache'); header('Content-Disposition: attachment; filename="' . $module_id . '.zip"'); } header('Content-Transfer-Encoding: binary'); $fd = fopen($GO_CONFIG->tmpdir . $module_id . '.zip', 'rb'); while (!feof($fd)) { print fread($fd, 32768); } fclose($fd); @unlink($GO_CONFIG->tmpdir . $module_id . '.zip'); exit; break; } $tabtable = new tabtable('module', 'Module configuration', '100%', '300', '150', '', true, 'left', 'top', 'module_form', $tab_direction = 'vertical', $module_id); $tabtable->add_tab('information.inc', 'Information'); if ($module) { $tabtable->add_tab('read_permissions.inc', 'Read Permission'); $tabtable->add_tab('write_permissions.inc', 'Admin Permission'); $tabtable->add_tab('backup.inc', 'Backup/Restore'); $tabtable->add_tab('update.inc', 'Update'); } require $GO_THEME->theme_path . "header.inc"; ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?> " name="module_form" method="post" enctype="multipart/form-data" > <input type="hidden" name="module_id" value="<?php echo $module_id;