Esempio n. 1
0
//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()">';
echo '</td></tr><tr><td>';
echo '<select name="list" class="textbox" id="wordlist" onchange="change_word(this)" ondblclick="show_word(this)" multiple="true" size="23" style="width:160">';
$fp = fopen('db/' . $wtabtable->get_active_tab_id(), "r");
while (!feof($fp)) {
    $w = fgets($fp, 512);
    echo '<option>' . $w . '</option>';
Esempio n. 2
0
$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']);
        }
    }
Esempio n. 3
0
$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':
        $DST = isset($_POST['DST']) ? '1' : '0';
Esempio n. 4
0
    }
}
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" />';
echo '<input type="hidden" name="return_to" value="' . $return_to . '" />';
$tabtable->print_head();
Esempio n. 5
0
    $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>';
        while ($cal->next_record()) {
            echo '<tr><td nowrap>';
            if ($cal->f('user_id') > 0) {
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. 
You can also give preferred Variable Names for these columns, but 
Esempio n. 7
0
            $cf = new custom_fields('ab_custom_company_fields');
            $cf->update_record($company_id, $_POST['fields'], $_POST['values']);
            if ($_POST['close'] == 'true') {
                header('Location: ' . $return_to);
                exit;
            }
        }
        break;
}
//check permissions
if ($company_id > 0 && ($company = $ab->get_company($company_id))) {
    $myab = new addressbook();
    $myab->query("SELECT * FROM ab_addressbooks WHERE id='" . $ab->f('addressbook_id') . "'");
    $myab->next_record();
    $tabtable = new tabtable('company_table', $company['name'], '100%', '400', '120', '', true, 'left', 'top', 'company_form', 'vertical', $myab->f('name'));
    $tabtable->add_tab('profile', $ab_company_properties);
    if ($custom_fields_plugin) {
        require_once $custom_fields_plugin['path'] . 'classes/custom_fields.class.inc';
        $cf = new custom_fields('ab_custom_company_fields');
        if ($cf->get_catagories($GO_SECURITY->user_id) > 0) {
            while ($cf->next_record()) {
                $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);
Esempio n. 8
0
$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";
Esempio n. 9
0
        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'])) {
            print_acl($ticket['acl_read']);
            echo '<br />';
Esempio n. 10
0
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);
    $item['content_type'] = 'folder';
    $item['size'] = '-';
    if ($item['parent_id'] == 0) {
        $no_hide = true;
    } else {
        $no_hide = false;
    }
}
Esempio n. 11
0
        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">';
echo '<input type="hidden" name="calendar_id" value="' . $calendar_id . '" />';
echo '<input type="hidden" name="task" value="" />';
Esempio n. 12
0
$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) {
            $tabtable->set_active_tab(1);
                        if ($_POST['close'] == 'true') {
                            header('Location: ' . $return_to);
                            exit;
                        }
                    }
                } else {
                    $feedback = '<p class="Error">' . $strSaveError . '</p>';
                }
            }
        }
        break;
}
if ($announcement_id > 0) {
    $announcement = $announcements->get_announcement($announcement_id);
    $tabtable = new tabtable('announcement_tab', $announcement['title'], '100%', '400', '120', '', true);
    $tabtable->add_tab('properties', $strProperties);
    $tabtable->add_tab('read_permissions', $strReadRights);
} else {
    $tabtable = new tabtable('announcement_tab', $sum_new_announcement, '', '400', '120', '', true);
    $announcement = false;
}
if ($announcement && $task != 'save_announcement') {
    $title = $announcement['title'];
    $user_id = $announcement['user_id'];
    $content = $announcement['content'];
    $due_time = $announcement['due_time'] > 0 ? date($_SESSION['GO_SESSION']['date_format'], $announcement['due_time']) : '';
    $ctime = date($_SESSION['GO_SESSION']['date_format'] . ' ' . $_SESSION['GO_SESSION']['time_format'], $announcement['ctime'] + $_SESSION['GO_SESSION']['timezone'] * 3600);
    $mtime = date($_SESSION['GO_SESSION']['date_format'] . ' ' . $_SESSION['GO_SESSION']['time_format'], $announcement['mtime'] + $_SESSION['GO_SESSION']['timezone'] * 3600);
} else {
    $title = isset($_REQUEST['title']) ? smartstrip($_REQUEST['title']) : '';
    $content = isset($_REQUEST['content']) ? smartstrip($_REQUEST['content']) : '';
Esempio n. 14
0
echo $_SERVER['PHP_SELF'];
?>
" enctype="multipart/form-data">
<input type="hidden" name="template_id" value="<?php 
echo $template_id;
?>
" />

  <?php 
switch ($task) {
    case 'upload':
        require 'upload_template_file.inc';
        break;
    default:
        if ($template_id > 0) {
            $tpl_table->add_tab('template.inc', $strProperties);
            $tpl_table->add_tab('template_items.inc', $cms_templates);
            $tpl_table->add_tab('template_files.inc', $cms_files);
            $tpl_table->add_tab('template_read_permissions.inc', $strReadRights);
            $tpl_table->add_tab('template_write_permissions.inc', $strWriteRights);
            if (isset($active_tab)) {
                $tpl_table->set_active_tab($active_tab);
            }
            $tpl_table->print_head();
            require $tpl_table->get_active_tab_id();
        } else {
            $tpl_table->print_head();
            require 'template.inc';
        }
        $tpl_table->print_foot();
        break;
Esempio n. 15
0
//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>
</tr>
</table>
Esempio n. 16
0
                        exit;
                    }
                }
            }
        }
    }
}
if ($site_id > 0) {
    //create a tab window
    $site = $cms->get_site($site_id);
    if (!$GO_SECURITY->has_permission($GO_SECURITY->user_id, $site['acl_write'])) {
        header('Location: ' . $GO_CONFIG->host . 'error_docs/403.php');
        exit;
    }
    $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) {
Esempio n. 17
0
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;
        case 'permissions':
            if ($func == 'mod_permissions') {
Esempio n. 18
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">
<tr>
Esempio n. 19
0
        $pstatus = STATUS_OFFER;
        if ($projects->num_rows() > 0 && $projects->next_record()) {
            $pstatus = $projects->f('level');
        }
        if (!isset($pstatus)) {
            $pstatus = STATUS_OFFER;
        }
        $projects->query("UPDATE pmProjects SET status={$pstatus},probability=100 " . "WHERE id={$project_id}");
        $active_tab = 0;
        break;
}
if ($project_id > 0) {
    $project = $projects->get_project($project_id);
    $project_name = $project['description'] == '' ? $project['name'] : $project['name'] . ' (' . $project['description'] . ')';
    $tabtable = new tabtable('project_tab', $project_name, '700', '400', '145', '', true);
    $tabtable->add_tab('properties', $strProperties);
    $write_permissions = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $project['acl_write']);
    $read_permissions = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $project['acl_read']);
    if (!$write_permissions && !$read_permissions) {
        header('Location: ' . $GO_CONFIG->host . 'error_docs/403.php');
        exit;
    }
    /*
    if ($write_permissions)
    {
      $tabtable->add_tab('book', $pm_enter_data);
    }
    */
    $tabtable->add_tab('write_permissions', $strWriteRights);
    $tabtable->add_tab('task', $pm_task);
    //$tabtable->add_tab('load', $pm_load);
Esempio n. 20
0
</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 $GO_THEME->theme_path . "footer.inc";
Esempio n. 21
0
<?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();
Esempio n. 22
0
                    $record = $quote . implode($quote . $seperator . $quote, $record) . $quote;
                    echo $utf16 ? mb_convert_encoding($record, "UTF-16LE", "UTF-8") : $vnconv->VnConv($record);
                    echo $utf16 ? mb_convert_encoding($crlf, "UTF-16LE", "UTF-8") : $crlf;
                }
            }
            exit;
        }
        break;
}
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;
}
Esempio n. 23
0
*/
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
    
      case 'sites':
        if($_SERVER['REQUEST_METHOD'] == 'POST')
Esempio n. 24
0
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 {
                $feedback = '<p class="Error">' . $ac_auth_error . '</p>';
Esempio n. 25
0
//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();
//Determine what to display
Esempio n. 26
0
        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 />&nbsp;&nbsp;&nbsp;&nbsp;';
                $button = new button($cmdClose, "javascript:document.location='" . $return_to . "';");
                break;
        }
        $tabtable->print_foot();
        break;
}
echo '</form>';
Esempio n. 27
0
            //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;
?>