Example #1
0
function patch_quick_report($group_id, $title, $subtitle1, $sql1, $subtitle2, $sql2)
{
    global $bar_colors;
    patch_header(array("title" => $title));
    patch_reporting_header($group_id);
    echo "\n<H2>{$title}</H2>";
    reports_quick_graph($subtitle1, $sql1, $sql2, $bar_colors);
    patch_footer(array());
}
Example #2
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: mod_patch.php,v 1.3 2003/11/26 15:01:17 helix Exp $
patch_header(array('title' => 'Modify a Patch'));
$sql = "SELECT * FROM patch WHERE patch_id='{$patch_id}' AND group_id='{$group_id}'";
$result = db_query($sql);
if (db_numrows($result) > 0) {
    echo '
	<H2>[ Patch #' . $patch_id . ' ] ' . db_result($result, 0, 'summary') . '</H2>';
    echo '
	<FORM ACTION="' . $PHP_SELF . '" METHOD="POST" enctype="multipart/form-data">
	<INPUT TYPE="HIDDEN" NAME="func" VALUE="postmodpatch">
	<INPUT TYPE="HIDDEN" NAME="group_id" VALUE="' . $group_id . '">
	<INPUT TYPE="HIDDEN" NAME="patch_id" VALUE="' . $patch_id . '">

	<TABLE WIDTH="100%">
	<TR>
		<TD><B>Submitted By:</B><BR>' . user_getname(db_result($result, 0, 'submitted_by')) . '</TD>
		<TD><B>Group:</B><BR>' . group_getname($group_id) . '</TD>
	</TR>

	<TR>
		<TD><B>Date Submitted:</B><BR>
		' . date($sys_datefmt, db_result($result, 0, 'open_date')) . '
		</TD>
		<TD><FONT SIZE="-1">
Example #3
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: add_patch.php,v 1.2 2003/11/13 11:29:25 helix Exp $
patch_header(array('title' => 'Submit a Patch'));
echo '
		<P>
		<H2>Submit A Patch</H2>
		<P>
		<B>Fill out the form below.</B> You can either paste your patch into the window 
		below or check the box and upload your patch.
		<P>
		<FORM ACTION="' . $PHP_SELF . '" METHOD="POST" enctype="multipart/form-data">
		<INPUT TYPE="HIDDEN" NAME="func" VALUE="postaddpatch">
		<INPUT TYPE="HIDDEN" NAME="group_id" VALUE="' . $group_id . '">
		<TABLE>
		<TR><TD VALIGN="TOP" COLSPAN="2"><B>Group:</B><BR>' . group_getname($group_id) . '</TD></TR>
		<TR><TD VALIGN="TOP" COLSPAN="2"><B>Category:</B><BR>';
echo patch_category_box($group_id, 'patch_category_id');
?>
	</TD></TR>

	<TR><TD COLSPAN="2"><B>Summary:</B><BR>
		<INPUT TYPE="TEXT" NAME="summary" SIZE="45" MAXLENGTH="60">
	</TD></TR>

	<TR><TD COLSPAN="2">
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: detail_patch.php,v 1.2 2003/11/13 11:29:25 helix Exp $
patch_header(array('title' => 'Patch Detail: ' . $patch_id));
$sql = "SELECT patch.code,patch.summary,users.user_name AS submitted_by," . "user2.user_name AS assigned_to,patch_status.status_name,patch.open_date,patch_category.category_name " . "FROM patch,users,users user2,patch_category,patch_status " . "WHERE patch.submitted_by=users.user_id " . "AND patch.assigned_to=user2.user_id " . "AND patch.patch_status_id=patch_status.patch_status_id " . "AND patch.patch_category_id=patch_category.patch_category_id " . "AND patch.patch_id='{$patch_id}'";
$result = db_query($sql);
if (db_numrows($result) > 0) {
    echo '
		<H2>[ Patch #' . $patch_id . ' ] ' . db_result($result, 0, 'summary') . '</H2>

	<TABLE CELLPADDING="0" WIDTH="100%">
		<TR><TD COLSPAN="2"><B>Date:</B><BR>' . date($sys_datefmt, db_result($result, 0, 'open_date')) . '</TD></TR>

		<TR>
			<TD><B>Submitted By:</B><BR>' . db_result($result, 0, 'submitted_by') . '</TD>
			<TD><B>Assigned To:</B><BR>' . db_result($result, 0, 'assigned_to') . '</TD>
		</TR>

		<TR>
			<TD><B>Category:</B><BR>' . db_result($result, 0, 'category_name') . '</TD>
			<TD><B>Status:</B><BR>' . db_result($result, 0, 'status_name') . '</TD>
		</TR>

		<TR><TD COLSPAN="2"><B>Summary:</B><BR>' . db_result($result, 0, 'summary') . '</TD></TR>';
    echo '
		<TR><TD COLSPAN="2"><P><B>Patch:</B><BR>
    $category_str = "AND patch.patch_category_id ='{$_category}'";
} else {
    //no status was chosen, so don't add it to where clause
    $category_str = '';
}
//if assigned to selected, and more to where clause
if ($_assigned_to) {
    $assigned_str = "AND patch.assigned_to='{$_assigned_to}'";
} else {
    //no assigned to was chosen, so don't add it to where clause
    $assigned_str = '';
}
//build page title to make bookmarking easier
//if a user was selected, add the user_name to the title
//same for status
patch_header(array('title' => 'Browse Patches' . ($_assigned_to ? ' For: ' . user_getname($_assigned_to) : '') . ($_status && $_status != 100 ? ' By Status: ' . get_patch_status_name($_status) : '')));
$sql = "SELECT patch.group_id,patch.patch_id,patch.summary," . "patch.open_date AS date,users.user_name AS submitted_by,user2.user_name AS assigned_to_user " . "FROM patch,users,users user2 " . "WHERE users.user_id=patch.submitted_by " . " {$category_str} " . " {$status_str} " . "AND user2.user_id=patch.assigned_to " . " {$assigned_str} " . "AND group_id='{$group_id}'" . $order_by;
$statement = 'Viewing custom patches';
$result = db_query($sql, 51, $offset);
/*
	creating a custom technician box which includes "any" and "unassigned"
*/
$res_tech = patch_data_get_technicians($group_id);
$tech_id_arr = util_result_column_to_array($res_tech, 0);
$tech_id_arr[] = '0';
//this will be the 'any' row
$tech_name_arr = util_result_column_to_array($res_tech, 1);
$tech_name_arr[] = 'Any';
$tech_box = html_build_select_box_from_arrays($tech_id_arr, $tech_name_arr, '_assigned_to', $_assigned_to, true, 'Unassigned');
/*
	Show the new pop-up boxes to select assigned to and/or status
Example #6
0
    echo "\n";
    echo "Setup username:      {$config['config_user']}\n";
    echo "      password:      {$config['config_passwd']}\n";
    echo "\n";
    echo "EGroupware username: {$config['admin_user']}\n";
    echo "           password: {$config['admin_passwd']}\n";
    echo "\n";
    echo "You can log into EGroupware by pointing your browser to http://localhost/egroupware/\n";
    echo "Please replace localhost with the appropriate hostname, if you connect remote.\n\n";
    if (empty($config['db_root_pw'])) {
        echo "*** Database has no root password set, please fix that immediatly: mysqladmin -u root password NEWPASSWORD\n\n";
    }
} else {
    // --> existing install --> update
    // get user from header and replace password, as we dont know it
    $old_password = patch_header($config['header'], $config['config_user'], $config['config_passwd']);
    // register a shutdown function to put old password back in any case
    register_shutdown_function('patch_header', $config['header'], $config['config_user'], $old_password);
    // update egroupware
    $setup_update = $setup_cli . ' --update ' . escapeshellarg('all,' . $config['config_user'] . ',' . $config['config_passwd'] . ',,' . $config['install-update-app']);
    $ret = run_cmd($setup_update, $output, array(4, 15));
    switch ($ret) {
        case 4:
            // header needs an update
            $header_update = $setup_cli . ' --update-header ' . escapeshellarg($config['config_passwd'] . ',' . $config['config_user']);
            run_cmd($header_update);
            $ret = run_cmd($setup_update, $output, 15);
            if ($ret != 15) {
                break;
            }
            // fall through
Example #7
0
			<P>
			<B><FONT COLOR="RED">It is not recommended that you change the category name because other things are dependant upon it.</FONT></B>
			<P>
			<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="SUBMIT">
			</FORM>
			<?php 
            } else {
                echo '
				<H1>The patch category that you requested a change on was not found</H1>';
            }
            patch_footer(array());
        } else {
            /*
            	Show main page
            */
            patch_header(array('title' => 'Patch Administration'));
            echo '
			<H2>Patch Administration</H2>';
            echo '<P>
			<A HREF="' . $PHP_SELF . '?group_id=' . $group_id . '&patch_cat=1">Add Patch Categories</A><BR>';
            echo "\nAdd categories of patchs like, 'mail module','gant chart module','interface', etc<P>";
            patch_footer(array());
        }
    }
} else {
    //browse for group first message
    if (!$group_id) {
        exit_no_group();
    } else {
        exit_permission_denied();
    }