Esempio n. 1
0
        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>';
require $GO_THEME->theme_path . "footer.inc";
?>
<script type="text/javascript" language="javascript">
Esempio n. 2
0
}
$profile = $GO_USERS->get_user($GO_SECURITY->user_id);
$datepicker = new date_picker();
$GO_HEADER['head'] = $datepicker->get_header();
require $GO_THEME->theme_path . "header.inc";
if ($_SESSION['GO_SESSION']['first_name'] != '' && $_SESSION['GO_SESSION']['last_name'] != '' && $_SESSION['GO_SESSION']['email'] != '') {
    /*
    If the user manager of the authentication source is not equal
    then GO can't change the user's password.
    */
    if ($auth_sources[$_SESSION['auth_source']]['type'] == $auth_sources[$_SESSION['auth_source']]['user_manager'] && $GO_CONFIG->allow_password_change) {
        $tabtable->add_tab('security.inc', $acSecurity);
    }
    $tabtable->add_tab('privacy.inc', $acPrivacy);
    $tabtable->add_tab('statistics.inc', $acStatistics);
}
?>
<form action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" name="account_form" method="post">
<input type="hidden" name="task" />
<input type="hidden" name="close" value="false" />
<?php 
$tabtable->print_head();
require $tabtable->get_active_tab_id();
$tabtable->print_foot();
?>
</form>
<?php 
require $GO_THEME->theme_path . "footer.inc";
Esempio n. 3
0
    $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();
switch ($tabtable->get_active_tab_id()) {
    case 'read_permissions':
        $read_only = $view['user_id'] == $GO_SECURITY->user_id ? false : true;
        print_acl($view['acl_read']);
Esempio n. 4
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. 5
0
    }
}
$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>
<td>&nbsp;</td>
</tr>
<tr>
<td ><h2><?php 
    echo $pref_look;
    ?>
</h2></td>
</tr>
<tr>
<td>
<table border="0">
<tr>
Esempio n. 6
0
    $ctime = date($_SESSION['GO_SESSION']['date_format'], get_time());
    $mtime = date($_SESSION['GO_SESSION']['date_format'], get_time());
}
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 . '" />';
Esempio n. 7
0
            echo '<a target="_blank" href="' . $GO_MODULES->url . 'templates/download_oo_template.php?contact_id=' . $contact_id . '"><img src="' . $GO_THEME->images['new_letter'] . '" border="0" height="32" width="32" /><br />' . $ab_oo_doc . '</td>';
            echo '</td>';
        }
    }
    $tabtable->add_tab('read_permissions', $strReadRights);
    $tabtable->add_tab('write_permissions', $strWriteRights);
}
echo '</tr></table>';
$active_tab = isset($_REQUEST['active_tab']) ? $_REQUEST['active_tab'] : null;
if (isset($active_tab)) {
    $tabtable->set_active_tab($active_tab);
}
$link_back = cleanup_url($link_back . '&' . $tabtable->get_link_back());
echo '<input type="hidden" name="link_back" value="' . $link_back . '" />';
$tabtable->print_head();
if ($tabtable->get_active_tab_id() > 0) {
    $catagory_id = $tabtable->get_active_tab_id();
    $active_tab_id = 'custom_fields';
} else {
    $active_tab_id = $tabtable->get_active_tab_id();
}
switch ($active_tab_id) {
    case 'read_permissions':
        print_acl($contact['acl_read']);
        echo '<br />';
        echo '<br />&nbsp;&nbsp;&nbsp;&nbsp;';
        $button = new button($cmdClose, "javascript:document.location='" . $return_to . "';");
        break;
    case 'write_permissions':
        print_acl($contact['acl_write']);
        echo '<br />';
Esempio n. 8
0
$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
switch ($tabtable->get_active_tab_id()) {
    case 'welcome':
        echo '<h1>Welcome to the example module for starting Group-Office developers</h1>';
        //how do you get user info
        //the current user is stored in:
        echo '<p>Your user ID is "' . $GO_SECURITY->user_id . '"<br />';
        //Get the user using the user management object
        $user = $GO_USERS->get_user($GO_SECURITY->user_id);
Esempio n. 9
0
    }
} 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();
}
echo '<form method="post" name="company_form" action="' . $_SERVER['PHP_SELF'] . '">';
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 . '" />';
echo '<input type="hidden" name="company_id" value="' . $company_id . '" />';
if ($company_id == 0 || $task == 'save_company') {
    $company['name'] = isset($_REQUEST['name']) ? smartstrip($_REQUEST['name']) : '';
    $company['shortname'] = isset($_REQUEST['shortname']) ? smartstrip($_REQUEST['shortname']) : '';
    $company['engname'] = isset($_REQUEST['engname']) ? smartstrip($_REQUEST['engname']) : '';
    $company['relation_date'] = isset($_REQUEST['relation_date']) ? smartstrip($_REQUEST['relation_date']) : '0';
    $company['parent_id'] = isset($_REQUEST['parent_id']) ? smartstrip($_REQUEST['parent_id']) : '0';
    $company['address'] = isset($_REQUEST['address']) ? smartstrip($_REQUEST['address']) : '';
Esempio n. 10
0
        break;
    case 'template':
        if ($GO_MODULES->write_permissions) {
            $tabtable->set_active_tab(1);
        }
        break;
    case 'category':
        if ($GO_MODULES->write_permissions) {
            $tabtable->set_active_tab(2);
        }
        break;
    case 'fees':
        $tabtable->set_active_tab(2);
        break;
}
if ($tabtable->get_active_tab_id() == 'load.inc') {
    $datepicker = new date_picker();
    $GO_HEADER['head'] = $datepicker->get_header();
}
require $GO_THEME->theme_path . "header.inc";
echo '<form name="projects_form" method="get" action="' . $_SERVER['PHP_SELF'] . '">';
echo '<input type="hidden" name="task" />';
$tabtable->print_head();
echo '<br />';
if (isset($feedback)) {
    echo $feedback;
}
require $tabtable->get_active_tab_id();
$tabtable->print_foot();
echo '</form>';
require $GO_THEME->theme_path . "footer.inc";
Esempio n. 11
0
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>';
}
fclose($fp);
echo '</select></td></tr></table>';
$wtabtable->print_foot();
echo '</td></tr>';
echo '</table>';
echo '</td>';
// Right panel
echo '<td width="100%" height="100%">';
echo '<iframe src="contents.php" height="100%" width="100%" class="textbox"></iframe>';
echo '</td></tr>';
echo '</table>';
Esempio n. 12
0
?>
" name="module_form" method="post" enctype="multipart/form-data" >
<input type="hidden" name="module_id" value="<?php 
echo $module_id;
?>
"/>
<input type="hidden" name="return_to" value="<?php 
echo $return_to;
?>
"/>
<input type="hidden" name="task" />
<input type="hidden" name="close" value="false" />
<?php 
$tabtable->print_head();
//require($tabtable->get_active_tab_id());
switch ($tabtable->get_active_tab_id()) {
    case 'information.inc':
        $module_info = $GO_MODULES->get_module_info($module_id);
        ?>
<table border="0">
<tr><td>Module name:</td><td><?php 
        echo $module_id;
        ?>
</td></tr>
<tr><td>Version:</td><td><?php 
        echo $module_info['version'];
        ?>
</td></tr>
<?php 
        if ($module) {
            ?>