/**
  * writeHeader - write the header of the output
  */
 function writeHeader()
 {
     site_project_header(array('title' => _('Advanced search'), 'group' => $this->groupId, 'toptab' => 'none'));
     $sectionarray = $this->getSectionArray();
     $this->handleTransferInformation($sectionarray);
     $GLOBALS['HTML']->advancedSearchBox($sectionarray, $this->groupId, $this->words, $this->isExact);
 }
function project_admin_header($params)
{
    global $DOCUMENT_ROOT, $group_id, $feedback;
    $params['toptab'] = 'admin';
    $params['group'] = $group_id;
    site_project_header($params);
    $project =& group_get_object($group_id);
    $is_admin = $project->userIsAdmin();
    if ($project->isProject()) {
        echo '
	<P><B>
	<A HREF="/project/admin/?group_id=' . $group_id . '">Admin</A> | ';
        if ($is_admin) {
            echo '<A HREF="/project/admin/userperms.php?group_id=' . $group_id . '">User Permissions</A> | 
	<A HREF="/project/admin/editgroupinfo.php?group_id=' . $group_id . '">Edit Public Info</A> |
	<A HREF="/project/admin/history.php?group_id=' . $group_id . '">Project History</A>
        <br>';
        }
        echo '
	<A HREF="/project/admin/editpackages.php?group_id=' . $group_id . '">Edit/Release Files</A>';
        if ($is_admin) {
            echo '
        | <A HREF="/people/createjob.php?group_id=' . $group_id . '">Post Jobs</A> | 
	<A HREF="/people/?group_id=' . $group_id . '">Edit Jobs</A> |
	<A HREF="/project/admin/editimages.php?group_id=' . $group_id . '">Screenshots</A> |
	<A HREF="/project/admin/mydatabase.php?group_id=' . $group_id . '">Database</A> |
	<A HREF="/project/admin/vhost.php?group_id=' . $group_id . '">Virtual Host</A> | 
    <A HREF="/project/admin/donation_admin.php?group_id=' . $group_id . '">Donation</A></B>
	<P>';
        }
    }
}
Пример #3
0
function news_header($params)
{
    global $HTML, $group_id, $news_name, $news_id, $sys_news_group, $sys_use_news;
    if (!$sys_use_news) {
        exit_disabled();
    }
    $params['toptab'] = 'news';
    $params['group'] = $group_id;
    /*
    	Show horizontal links
    */
    if ($group_id && $group_id != $sys_news_group) {
        site_project_header($params);
    } else {
        $HTML->header($params);
    }
    if ($group_id && $group_id != $sys_news_group) {
        $menu_texts = array();
        $menu_links = array();
        $menu_texts[] = _('Submit');
        $menu_links[] = '/news/submit.php?group_id=' . $group_id;
        if (session_loggedin()) {
            $project =& group_get_object($params['group']);
            if ($project && is_object($project) && !$project->isError()) {
                $perm =& $project->getPermission(session_get_user());
                if ($perm && is_object($perm) && !$perm->isError() && $perm->isAdmin()) {
                    $menu_texts[] = _('Admin');
                    $menu_links[] = '/news/admin/?group_id=' . $group_id;
                }
            }
        }
        echo $HTML->subMenu($menu_texts, $menu_links);
    }
}
Пример #4
0
/**
 * GForge SCM Library
 *
 * Copyright 2004 (c) GForge LLC
 *
 * @version   $Id$
 * @author Tim Perdue tim@gforge.org
 * @date 2005-04-16
 *
 * This file is part of GForge.
 *
 * GForge 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.
 *
 * GForge is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GForge; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
function scm_header($params)
{
    global $HTML, $sys_use_scm;
    if (!$sys_use_scm) {
        exit_disabled();
    }
    $project =& group_get_object($params['group']);
    if (!$project || !is_object($project)) {
        exit_error('Error', 'Could Not Get Project');
    } elseif ($project->isError()) {
        exit_error('Error', $project->getErrorMessage());
    }
    if (!$project->usesSCM()) {
        exit_error('Error', _('Error - This project has turned off SCM.'));
    }
    site_project_header(array('title' => _('SCM Repository'), 'group' => $params['group'], 'toptab' => 'scm'));
    /*
    	Show horizontal links
    */
    if (session_loggedin()) {
        $perm =& $project->getPermission(session_get_user());
        if ($perm && is_object($perm) && !$perm->isError() && $perm->isAdmin()) {
            echo $HTML->subMenu(array(_('SCM'), _('Admin'), _('Reporting')), array('/scm/?group_id=' . $params['group'], '/scm/admin/?group_id=' . $params['group'], '/scm/reporting/?group_id=' . $params['group']));
        }
    }
    echo '<div style="width:99%">';
}
Пример #5
0
function patch_header($params)
{
    global $group_id, $DOCUMENT_ROOT;
    $params['toptab'] = 'patch';
    $params['group'] = $group_id;
    //only projects can use the bug tracker, and only if they have it turned on
    $project = project_get_object($group_id);
    if (!$project->isProject()) {
        exit_error('Error', 'Only Projects Can Use The Patch Manager');
    }
    if (!$project->usesPatch()) {
        exit_error('Error', 'This Project Has Turned Off The Patch Manager');
    }
    site_project_header($params);
    echo '<P><B><A HREF="/patch/?func=addpatch&group_id=' . $group_id . '">Submit A Patch</A>';
    if (user_isloggedin()) {
        echo ' | <A HREF="/patch/?func=browse&group_id=' . $group_id . '&set=my">My Patches</A>';
    }
    echo ' | <A HREF="/patch/?func=browse&group_id=' . $group_id . '&set=open">Open Patches</A>';
    if (user_isloggedin()) {
        echo ' | <A HREF="/patch/reporting/?group_id=' . $group_id . '">Reporting</A>';
    }
    echo ' | <A HREF="/patch/admin/?group_id=' . $group_id . '">Admin</A>';
    echo '</B>';
}
Пример #6
0
function survey_header($params)
{
    global $group_id, $is_admin_page, $Language;
    $params['toptab'] = 'survey';
    $params['group'] = $group_id;
    $pm = ProjectManager::instance();
    $project = $pm->getProject($group_id);
    if (!$project->usesSurvey()) {
        exit_error($Language->getText('global', 'error'), $Language->getText('survey_s_utils', 's_off'));
    }
    site_project_header($params);
    echo "<P><B>";
    // Admin link is displayed only if the user is a project administrator
    if (user_ismember($group_id, 'A')) {
        echo "<A HREF=\"/survey/admin/?group_id={$group_id}\">" . $Language->getText('survey_s_utils', 'admin') . "</A>";
    }
    if ($is_admin_page && $group_id && user_ismember($group_id, 'A')) {
        echo " | <A HREF=\"/survey/admin/add_survey.php?group_id={$group_id}\">" . $Language->getText('survey_admin_index', 'add_s') . "</A>";
        echo " | <A HREF=\"/survey/admin/edit_survey.php?func=browse&group_id={$group_id}\">" . $Language->getText('survey_admin_browse_survey', 'edit_s') . "</A>";
        echo " | <A HREF=\"/survey/admin/add_question.php?group_id={$group_id}\">" . $Language->getText('survey_admin_index', 'add_q') . "</A>";
        echo " | <A HREF=\"/survey/admin/edit_question.php?func=browse&group_id={$group_id}\">" . $Language->getText('survey_admin_browse_question', 'edit_q') . "</A>";
        echo " | <A HREF=\"/survey/admin/show_results.php?group_id={$group_id}\">" . $Language->getText('survey_s_utils', 'show_r') . "</A>";
    }
    if (isset($params['help'])) {
        if (user_ismember($group_id, 'A')) {
            echo ' | ';
        }
        echo help_button($params['help'], false, $Language->getText('global', 'help'));
    }
    echo "</B><P>";
}
Пример #7
0
function support_header($params)
{
    global $group_id, $DOCUMENT_ROOT;
    //required by new site_project_header
    $params['group'] = $group_id;
    $params['toptab'] = 'support';
    //only projects can use the bug tracker, and only if they have it turned on
    $project = project_get_object($group_id);
    if (!$project->isProject()) {
        exit_error('Error', 'Only Projects Can Use The Tech Support Manager');
    }
    if (!$project->usesSupport()) {
        exit_error('Error', 'This Project Has Turned Off The Tech Support Manager');
    }
    site_project_header($params);
    echo '<P><B><A HREF="/support/?func=addsupport&group_id=' . $group_id . '">Submit A Request</A>';
    if (user_isloggedin()) {
        echo ' | <A HREF="/support/?func=browse&group_id=' . $group_id . '&set=my">My Requests</A>';
    }
    echo ' | <A HREF="/support/?func=browse&group_id=' . $group_id . '&set=open">Open Requests</A>';
    if (user_isloggedin()) {
        echo ' | <A HREF="/support/reporting/?group_id=' . $group_id . '">Reporting</A>';
    }
    echo ' | <A HREF="/support/admin/?group_id=' . $group_id . '">Admin</A>';
    echo '</B>';
    echo '<HR NoShade SIZE="1" SIZE="300">';
}
Пример #8
0
function bug_header($params)
{
    global $group_id, $is_bug_page, $DOCUMENT_ROOT;
    //used so the search box will add the necessary element to the pop-up box
    $is_bug_page = 1;
    //required params for site_project_header();
    $params['group'] = $group_id;
    $params['toptab'] = 'bugs';
    $project = project_get_object($group_id);
    //only projects can use the bug tracker, and only if they have it turned on
    if (!$project->isProject()) {
        exit_error('Error', 'Only Projects Can Use The Bug Tracker');
    }
    if (!$project->usesBugs()) {
        exit_error('Error', 'This Project Has Turned Off The Bug Tracker');
    }
    echo site_project_header($params);
    echo '<P><B><A HREF="/bugs/?func=addbug&group_id=' . $group_id . '">Submit A Bug</A>
	 | <A HREF="/bugs/?func=browse&group_id=' . $group_id . '&set=open">Open Bugs</A>';
    if (user_isloggedin()) {
        echo ' | <A HREF="/bugs/?func=browse&group_id=' . $group_id . '&set=my">My Bugs</A>';
        echo ' | <A HREF="/bugs/?func=modfilters&group_id=' . $group_id . '">Filters</A>';
        echo ' | <A HREF="/bugs/reporting/?group_id=' . $group_id . '">Reporting</A>';
    }
    echo ' | <A HREF="/bugs/admin/?group_id=' . $group_id . '">Admin</A></B>';
}
Пример #9
0
function project_admin_header($params)
{
    global $group_id, $feedback, $Language;
    $params['toptab'] = 'admin';
    $params['group'] = $group_id;
    site_project_header($params);
    echo '
	<P><TABLE width="100%"><TR>';
    echo '<TD width="1"><b>' . $Language->getText('project_admin_utils', 'menu_config') . '</b></td><td><b>
	<A HREF="/project/admin/editgroupinfo.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_utils', 'edit_public_info') . '</A> |
	<A HREF="/project/admin/servicebar.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_editservice', 's_conf') . '</A> |
	<A HREF="/project/admin/reference.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_utils', 'references') . '</A>';
    $em = EventManager::instance();
    $em->processEvent('admin_toolbar_configuration', array('group_id' => $group_id));
    echo '</td><td>';
    if (isset($params['help'])) {
        echo help_button($params['help'], false, $Language->getText('global', 'help'));
    }
    echo '</td></tr>';
    echo '</td></tr><tr><td><b>' . $Language->getText('project_admin_utils', 'menu_permissions') . '</b></td><td><b>
	<A HREF="/project/admin/userperms.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_utils', 'user_perms') . '</A> | 
	<A HREF="/project/admin/ugroup.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_utils', 'ug_admin') . '</A> | 
	<A HREF="/project/admin/permission_request.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_ugroup', 'permission_request') . '</A>';
    echo '</td><td></td></tr><tr><td><b>' . $Language->getText('project_admin_utils', 'menu_data') . '</b></td><td><b>
	<A HREF="/project/export/index.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_utils', 'project_data_export') . '</A> |
	<A HREF="/tracker/import_admin.php?group_id=' . $group_id . '&mode=admin">' . $Language->getText('project_admin_utils', 'tracker_import') . '</A> |
	<A HREF="/project/admin/history.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_history', 'proj_history') . '</A> |
    <A HREF="/project/stats/source_code_access.php/?group_id=' . $group_id . '">' . $Language->getText('project_admin_utils', 'access_logs') . '</A>';
    //Call hook that can be displayed in this area
    $em->processEvent('admin_toolbar_data', array('group_id' => $group_id));
    //<A HREF="/project/admin/?group_id='.$group_id.'&func=import">Tracker Import</A>
    echo '</td><td></td></tr></table>';
    echo '</B>
	<P>';
}
Пример #10
0
 function header($params)
 {
     global $DOCUMENT_ROOT, $HTML, $group_id;
     use_javascript('/js/sortable.js');
     html_use_jquery();
     $params['toptab'] = 'taskboard';
     $params['group'] = $group_id;
     $labels[] = _("View Taskboard");
     $links[] = '/plugins/taskboard/index.php?group_id=' . $group_id;
     if (session_loggedin()) {
         if (forge_check_perm('tracker', $this->getID(), 'manager')) {
             $labels[] = _('Administration');
             $links[] = '/plugins/taskboard/admin/index.php?group_id=' . $group_id;
             $action = getStringFromRequest('action');
             if ($action == 'edit_column') {
                 $labels[] = _('Configure Columns');
                 $links[] = '/plugins/taskboard/admin/index.php?group_id=' . $group_id . '&action=columns';
                 $column_id = getStringFromRequest('column_id', '');
                 if ($column_id) {
                     $labels[] = _('Delete Column');
                     $links[] = '/plugins/taskboard/admin/index.php?group_id=' . $group_id . '&action=delete_column&column_id=' . $column_id;
                 }
             }
         }
     }
     $params['submenu'] = $HTML->subMenu($labels, $links);
     site_project_header($params);
 }
Пример #11
0
function feature_header($params)
{
    global $group_id, $DOCUMENT_ROOT;
    //required by new site_project_header
    $params['group'] = $group_id;
    $params['toptab'] = 'feature';
    //only projects can use the bug tracker, and only if they have it turned on
    $project = project_get_object($group_id);
    if (!$project->isProject()) {
        exit_error('Error', 'Only Projects Can Use The Feature Request Manager');
    }
    if (!$project->usesFeature()) {
        exit_error('Error', 'This Project Has Turned Off The Feature Request Manager');
    }
    site_project_header($params);
    echo '<P><B><A HREF="/feature/?func=addfeature&group_id=' . $group_id . '">Submit A Feature Request</A>';
    if (user_isloggedin()) {
        echo ' | <A HREF="/feature/?func=browse&group_id=' . $group_id . '&set=my">My Feature Requests</A>';
    }
    echo ' | <A HREF="/feature/?func=browse&group_id=' . $group_id . '&set=open">Open Feature Requests</A>';
    if (user_isloggedin()) {
        echo ' | <A HREF="/feature/reporting/?group_id=' . $group_id . '">Reporting</A>';
    }
    echo ' | <A HREF="/feature/admin/?group_id=' . $group_id . '">Admin</A>';
    echo '</B><P>';
}
Пример #12
0
function docman_header($title, $pagehead, $style = 'xyz')
{
    global $group_id, $HTML, $sys_use_docman;
    if (!$sys_use_docman) {
        exit_disabled();
    }
    $project =& group_get_object($group_id);
    if (!$project || !is_object($project)) {
        exit_no_group();
    }
    if (!$project->usesDocman()) {
        exit_error(_('Error'), _('This project has turned off the Doc Manager.'));
    }
    site_project_header(array('title' => $title, 'group' => $group_id, 'toptab' => 'docman'));
    $menu_text = array();
    $menu_links = array();
    $menu_text[] = _('Submit new documentation');
    $menu_links[] = '/docman/new.php?group_id=' . $group_id;
    $menu_text[] = _('View Documentation');
    $menu_links[] = '/docman/index.php?group_id=' . $group_id;
    $menu_text[] = _('Search in documents');
    $menu_links[] = '/docman/search.php?group_id=' . $group_id;
    if (session_loggedin()) {
        $perm =& $project->getPermission(session_get_user());
        if ($perm && is_object($perm) && !$perm->isError() && $perm->isDocEditor()) {
            $menu_text[] = _('Admin');
            $menu_links[] = '/docman/admin/index.php?group_id=' . $group_id;
        }
    }
    echo $HTML->subMenu($menu_text, $menu_links);
}
Пример #13
0
function survey_header($params)
{
    global $group_id, $is_admin_page, $HTML, $sys_use_survey;
    if (!$sys_use_survey) {
        exit_disabled();
    }
    $params['toptab'] = 'surveys';
    $params['group'] = $group_id;
    if ($project =& group_get_object($group_id)) {
        if (!$project->usesSurvey()) {
            exit_error(_('Error'), _('This Group Has Turned Off Surveys.'));
        }
        site_project_header($params);
        if ($is_admin_page && $group_id) {
            echo $HTML->subMenu(array(_('Surveys'), _('Admin'), _('Add Survey'), _('Edit Survey'), _('Add Questions'), _('Edit Questions'), _('Show Results')), array('/survey/?group_id=' . $group_id, '/survey/admin/?group_id=' . $group_id, '/survey/admin/add_survey.php?group_id=' . $group_id, '/survey/admin/edit_survey.php?group_id=' . $group_id, '/survey/admin/add_question.php?group_id=' . $group_id, '/survey/admin/show_questions.php?group_id=' . $group_id, '/survey/admin/show_results.php?group_id=' . $group_id));
        } else {
            if (session_loggedin()) {
                $perm =& $project->getPermission(session_get_user());
                if ($perm && is_object($perm) && !$perm->isError() && $perm->isAdmin()) {
                    echo $HTML->subMenu(array(_('Admin')), array('/survey/admin/?group_id=' . $group_id));
                }
            }
        }
    }
    // end if (valid group id)
}
Пример #14
0
function quota_management_Project_Header($params)
{
    global $DOCUMENT_ROOT, $HTML, $id;
    $params['toptab'] = 'quota_management';
    $params['group'] = $id;
    /*                                                                                                                                                              
    	Show horizontal links                                                                                                                                   
    */
    site_project_header($params);
}
Пример #15
0
function projects_hierarchy_Project_Header($params)
{
    global $DOCUMENT_ROOT, $HTML, $id;
    $params['toptab'] = 'projects_hierarchy';
    $params['group'] = $id;
    /*                                                                                                                                                              
    	Show horizontal links                                                                                                                                   
    */
    site_project_header($params);
}
Пример #16
0
function wiki_Project_Header($params)
{
    global $id;
    $params['toptab'] = 'wiki';
    $params['group'] = $id;
    /*
        Show horizontal links
    */
    site_project_header($params);
}
Пример #17
0
function webcalendar_Project_Header($params)
{
    global $DOCUMENT_ROOT, $HTML, $id;
    $params['toptab'] = 'webcalendar';
    $params['group'] = $id;
    /*                                                                                                                                                              
    	Show horizontal links                                                                                                                                   
    */
    site_project_header($params);
}
Пример #18
0
function mediawiki_Project_Header($params)
{
    global $DOCUMENT_ROOT, $HTML, $id;
    $params['toptab'] = 'mediawiki';
    $params['group'] = $id;
    /*                                                                                                                                                              
    	Show horizontal links                                                                                                                                   
    */
    site_project_header($params);
}
Пример #19
0
function helloworld_Project_Header($params)
{
    global $DOCUMENT_ROOT, $HTML, $id;
    $params['toptab'] = 'helloworld';
    $params['group'] = $id;
    /*                                                                                                                                                              
    	Show horizontal links                                                                                                                                   
    */
    site_project_header($params);
}
Пример #20
0
function wiki_header($params)
{
    global $group_id;
    //required for site_project_header
    $params['group'] = $group_id;
    $params['toptab'] = 'wiki';
    $project = project_get_object($group_id);
    if (!$project->usesWiki()) {
        exit_error('Error', 'This Project Has Turned Off Wikis');
    }
    site_project_header($params);
}
function pm_header($params)
{
    // XXX ogi: What to do with these?
    global $group_id, $is_pm_page, $words, $group_project_id, $HTML, $order, $pg, $sys_use_pm;
    if (!$sys_use_pm) {
        exit_disabled();
    }
    //required by site_project_header
    $params['group'] = $group_id;
    $params['toptab'] = 'pm';
    //only projects can use the bug tracker, and only if they have it turned on
    $project =& group_get_object($group_id);
    if (!$project || !is_object($project)) {
        exit_no_group();
    }
    if (!$project->usesPm()) {
        exit_error(_('Error'), _('This Project Has Turned Off The Task Manager'));
    }
    site_project_header($params);
    $labels = array();
    $links = array();
    if ($group_project_id) {
        $labels[] = ($pg ? $pg->getName() . ': ' : '') . _('Browse tasks');
        $links[] = '/pm/task.php?group_id=' . $group_id . '&amp;group_project_id=' . $group_project_id . '&amp;func=browse';
        if (session_loggedin()) {
            $labels[] = _('Add task');
            $links[] = '/pm/task.php?group_id=' . $group_id . '&amp;group_project_id=' . $group_project_id . '&amp;func=addtask';
        }
        if ($group_project_id) {
            $gantt_width = 820;
            $gantt_height = 680;
            $gantt_url = "/pm/task.php?group_id={$group_id}&group_project_id={$group_project_id}&func=ganttpage";
            $gantt_title = _('Gantt Chart');
            $gantt_winopt = 'scrollbars=yes,resizable=yes,toolbar=no,height=' . $gantt_height . ',width=' . $gantt_width;
            $labels[] = $gantt_title;
            $links[] = $gantt_url . '" onclick="window.open(this.href, \'' . preg_replace('/\\s/', '_', $gantt_title) . '\', \'' . $gantt_winopt . '\'); return false;';
        }
        //upload/download as CSV files
        $labels[] = _('Download as CSV');
        $links[] = '/pm/task.php?group_id=' . $group_id . '&amp;group_project_id=' . $group_project_id . '&amp;func=downloadcsv';
        $labels[] = _('Upload CSV');
        $links[] = '/pm/task.php?group_id=' . $group_id . '&amp;group_project_id=' . $group_project_id . '&amp;func=uploadcsv';
    }
    if ($pg && is_object($pg) && $pg->userIsAdmin()) {
        $labels[] = _('Reporting');
        $links[] = '/pm/reporting/?group_id=' . $group_id;
        $labels[] = _('Admin');
        $links[] = '/pm/admin/?group_id=' . $group_id . '&amp;group_project_id=' . $group_project_id . '&amp;update_pg=1';
    }
    if (!empty($labels)) {
        echo $HTML->subMenu($labels, $links);
    }
}
Пример #22
0
function mail_header($params)
{
    global $group_id;
    //required for site_project_header
    $params['group'] = $group_id;
    $params['toptab'] = 'mail';
    $project = project_get_object($group_id);
    if (!$project->usesMail()) {
        exit_error('Error', 'This Project Has Turned Off Mailing Lists');
    }
    site_project_header($params);
    echo '
		<P><B><A HREF="/mail/admin/?group_id=' . $group_id . '">Admin</A></B>';
}
Пример #23
0
/**
 * GForge Help Wanted 
 *
 * Copyright 1999-2001 (c) VA Linux Systems
 * The rest Copyright 2002-2004 (c) GForge Team
 * http://gforge.org/
 *
 * @version   $Id$
 *
 * This file is part of GForge.
 *
 * GForge 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.
 *
 * GForge is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GForge; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
function people_header($params)
{
    global $group_id, $job_id, $HTML;
    if ($group_id) {
        $params['toptab'] = 'people';
        $params['group'] = $group_id;
        echo site_project_header($params);
    } else {
        echo $HTML->header($params);
    }
    if ($group_id && $job_id) {
        echo ' | ' . util_make_link('/people/editjob.php?group_id=' . $group_id . '&amp;job_id=' . $job_id, _('Edit Job'));
    }
}
Пример #24
0
function docman_header($title, $pagehead, $style = 'xyz')
{
    global $group_id;
    $project =& project_get_object($group_id);
    if (!$project->usesDocman()) {
        exit_error('Error', 'This Project Has Turned Off The Doc Manager');
    }
    site_project_header(array('title' => $title, 'group' => $group_id, 'toptab' => 'docman'));
    print "<p><b><a href=\"/docman/new.php?group_id=" . $group_id . "\">Submit new documentation</a> | " . "<a href=\"/docman/index.php?group_id=" . $group_id . "\">View Documentation</a> | " . "<a href=\"/docman/admin/index.php?group_id=" . $group_id . "\">Admin</a></b>";
    if ($style == 'admin') {
        print "<b>  | <a href=\"/docman/admin/index.php?mode=editdocs&group_id=" . $group_id . "\">Edit Documents</a> | " . "<a href=\"/docman/admin/index.php?mode=editgroups&group_id=" . $group_id . " \">Edit Document Groups</a></b>";
    }
    print "<p>";
    print "<h2>{$pagehead}</h2>\n<P>\n";
}
Пример #25
0
function pm_header($params)
{
    global $group_id, $is_pm_page, $words, $group_project_id, $DOCUMENT_ROOT, $order;
    //required by site_project_header
    $params['group'] = $group_id;
    $params['toptab'] = 'pm';
    //only projects can use the bug tracker, and only if they have it turned on
    $project = project_get_object($group_id);
    if (!$project->isProject()) {
        exit_error('Error', 'Only Projects Can Use The Task Manager');
    }
    if (!$project->usesPm()) {
        exit_error('Error', 'This Project Has Turned Off The Task Manager');
    }
    site_project_header($params);
    echo "<P><B>";
    echo "<A HREF=\"/pm/?group_id={$group_id}\">Subproject List</A>";
    $need_bar = 1;
    if ($group_project_id) {
        if (user_isloggedin()) {
            if ($need_bar) {
                echo ' | ';
            }
            echo "<A HREF=\"/pm/task.php?group_id={$group_id}&group_project_id={$group_project_id}&func=addtask\">Add Task</A>";
            echo " | <A HREF=\"/pm/task.php?group_id={$group_id}&group_project_id={$group_project_id}&func=browse&set=my\">My Tasks</A>";
            $need_bar = 1;
        }
        if ($need_bar) {
            echo ' | ';
        }
        echo "<A HREF=\"/pm/task.php?group_id={$group_id}&group_project_id={$group_project_id}&func=browse&set=open\">Browse Open Tasks</A>";
        $need_bar = 1;
    }
    if (user_isloggedin()) {
        if ($need_bar) {
            echo ' | ';
        }
        echo '<A HREF="/pm/reporting/?group_id=' . $group_id . '">Reporting</A>';
        $need_bar = 1;
    }
    if ($need_bar) {
        echo ' | ';
    }
    echo " <A HREF=\"/pm/admin/?group_id={$group_id}\">Admin</A>";
    echo "</B>";
}
Пример #26
0
function commits_header_admin($params)
{
    global $group_id, $Language;
    //required params for site_project_header();
    $params['group'] = $group_id;
    $params['toptab'] = 'cvs';
    $pm = ProjectManager::instance();
    $project = $pm->getProject($group_id);
    if (!$project->usesCVS()) {
        exit_error($Language->getText('global', 'error'), $Language->getText('cvs_commit_utils', 'error_off'));
    }
    echo site_project_header($params);
    if ($params['help']) {
        echo ' | <b>' . help_button($params['help'], false, $Language->getText('global', 'help')) . '</b>';
    }
    echo ' <hr width="300" size="1" align="left" noshade>';
}
Пример #27
0
function screenshots_header($params)
{
    global $DOCUMENT_ROOT, $HTML, $group_id;
    $params['toptab'] = 'screenshots';
    $params['group'] = $group_id;
    /*
    	Show horizontal links
    */
    if ($group_id) {
        site_project_header($params);
    } else {
        $HTML->header($params);
        echo '
			<H2>Screenshots</H2>';
    }
    echo '<P><B>';
    echo '<A HREF="/project/admin/editimages.php?group_id=' . $group_id . '">Admin</A></B>';
}
Пример #28
0
function news_header($params)
{
    global $HTML, $group_id, $news_name, $news_id, $Language;
    $params['toptab'] = 'news';
    $params['group'] = $group_id;
    if (isset($params['project_id'])) {
        $params['group'] = $params['project_id'];
        $group_id = $params['project_id'];
    }
    /*
    	Show horizontal links
    */
    if ($group_id && $group_id != $GLOBALS['sys_news_group']) {
        site_project_header($params);
    } else {
        $HTML->header($params);
        echo '
			<H2>' . $GLOBALS['sys_name'] . ' <A HREF="/news/">' . $Language->getText('news_index', 'news') . '</A></H2>';
    }
    if (!isset($params['pv']) || !$params['pv']) {
        echo '<P><B>';
        // 'Admin' tab is only displayed if the user is News admin or project admin
        if ($group_id) {
            if (user_ismember($group_id, 'A') || user_ismember($group_id, 'N2')) {
                echo '<A HREF="/news/submit.php?group_id=' . $group_id . '">' . $Language->getText('news_utils', 'submit_news') . '</A> | <A HREF="/news/admin/?group_id=' . $group_id . '">' . $Language->getText('news_utils', 'admin') . '</A>';
            } else {
                if (user_ismember($group_id, 'A') || user_ismember($group_id, 'N1')) {
                    // 'Submit News' tab is only displayed if the user is News writer, or project admin
                    echo '<A HREF="/news/submit.php?group_id=' . $group_id . '">' . $Language->getText('news_utils', 'submit_news') . '</A>';
                }
            }
            if (user_ismember($group_id, 'A') || user_ismember($group_id, 'N2') || user_ismember($group_id, 'N1')) {
                if (isset($params['help'])) {
                    echo ' | ';
                }
            }
        }
        if (isset($params['help'])) {
            echo help_button($params['help'], false, $Language->getText('global', 'help'));
        }
        echo '</b><P>';
    }
}
Пример #29
0
function people_header($params)
{
    global $group_id, $job_id, $DOCUMENT_ROOT, $HTML;
    if ($group_id) {
        $params['toptab'] = 'admin';
        $params['group'] = $group_id;
        echo site_project_header($params);
    } else {
        echo $HTML->header($params);
    }
    echo '
		<H2>Project Help Wanted</H2>
		<P><B>
	<A HREF="/people/admin/">Admin</A>';
    if ($group_id && $job_id) {
        echo ' | <A HREF="/people/editjob.php?group_id=' . $group_id . '&job_id=' . $job_id . '">Edit Job</A>';
    }
    echo '</B>';
}
Пример #30
0
function survey_header($params)
{
    global $group_id, $is_admin_page, $DOCUMENT_ROOT;
    $params['toptab'] = 'surveys';
    $params['group'] = $group_id;
    $project = project_get_object($group_id);
    if (!$project->usesSurvey()) {
        exit_error('Error', 'This Group Has Turned Off Surveys');
    }
    site_project_header($params);
    echo "<P><B><A HREF=\"/survey/admin/?group_id={$group_id}\">Admin</A>";
    if ($is_admin_page && $group_id) {
        echo " | <A HREF=\"/survey/admin/add_survey.php?group_id={$group_id}\">Add Surveys</A>";
        echo " | <A HREF=\"/survey/admin/edit_survey.php?group_id={$group_id}\">Edit Surveys</A>";
        echo " | <A HREF=\"/survey/admin/add_question.php?group_id={$group_id}\">Add Questions</A>";
        echo " | <A HREF=\"/survey/admin/show_questions.php?group_id={$group_id}\">Edit Questions</A>";
        echo " | <A HREF=\"/survey/admin/show_results.php?group_id={$group_id}\">Show Results</A></B>";
    }
}