function support_quick_report($group_id, $title, $subtitle1, $sql1, $subtitle2, $sql2) { global $bar_colors; support_header(array("title" => $title)); support_reporting_header($group_id); echo "\n<H2>{$title}</H2>"; reports_quick_graph($subtitle1, $sql1, $sql2, $bar_colors); support_footer(array()); }
<?php // // SourceForge: Breaking Down the Barriers to Open Source Development // Copyright 1999-2000 (c) The SourceForge Crew // http://sourceforge.net // // $Id: add_support.php,v 1.2 2003/11/13 11:29:27 helix Exp $ support_header(array('title' => 'Submit a Support Request')); echo ' <P> <H2>Submit A Support Request</H2> <P> <B>Fill out the form below.</B> Fill in complete information and make sure you include enough info that someone will be able to help you. <P> If you are requesting something that could affect security, <B>YOU MUST BE LOGGED IN</B>. <P> <FORM ACTION="' . $PHP_SELF . '" METHOD="POST" enctype="multipart/form-data"> <INPUT TYPE="HIDDEN" NAME="func" VALUE="postaddsupport"> <INPUT TYPE="HIDDEN" NAME="group_id" VALUE="' . $group_id . '"> <TABLE> <TR><TD VALIGN="TOP" COLSPAN="2"><B>For Project:</B><BR>' . group_getname($group_id) . '</TD></TR> <TR><TD VALIGN="TOP" COLSPAN="2"><B>Category:</B><BR>'; echo support_category_box($group_id, 'support_category_id'); ?> </TD></TR> <TR><TD COLSPAN="2"><B>Summary:</B><BR> <INPUT TYPE="TEXT" NAME="summary" SIZE="35" MAXLENGTH="40"> </TD></TR>
$assigned_str = "AND support.assigned_to='{$_assigned_to}'"; } else { //no assigned to was chosen, so don't add it to where clause $assigned_str = ''; } //if category selected, add to where clause if ($_category && $_category != 100) { $category_str = "AND support.support_category_id='{$_category}'"; } else { //no assigned to was chosen, so don't add it to where clause $category_str = ''; } //build page title to make bookmarking easier //if a user was selected, add the user_name to the title //same for status support_header(array('title' => 'Browse Support Requests' . ($_assigned_to ? ' For: ' . user_getname($_assigned_to) : '') . ($_status && $_status != 100 ? ' By Status: ' . support_data_get_status_name($_status) : ''))); //now build the query using the criteria built above $sql = "SELECT support.priority,support.group_id,support.support_id,support.summary," . "support_category.category_name,support_status.status_name," . "support.open_date AS date,users.user_name AS submitted_by,user2.user_name AS assigned_to_user " . "FROM support,support_category,support_status,users,users user2 " . "WHERE users.user_id=support.submitted_by " . " {$status_str} {$assigned_str} {$category_str} " . "AND user2.user_id=support.assigned_to " . "AND support_category.support_category_id=support.support_category_id " . "AND support_status.support_status_id=support.support_status_id " . "AND support.group_id='{$group_id}'" . $order_by; /* creating a custom technician box which includes "any" and "unassigned" */ $res_tech = support_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 */
<?php // // SourceForge: Breaking Down the Barriers to Open Source Development // Copyright 1999-2000 (c) The SourceForge Crew // http://sourceforge.net // // $Id: mod_support.php,v 1.3 2003/11/24 11:05:05 helix Exp $ support_header(array('title' => 'Modify a Support Request')); $sql = "SELECT * FROM support WHERE support_id='{$support_id}' AND group_id='{$group_id}'"; $result = db_query($sql); if (db_numrows($result) > 0) { echo ' <H2>[ Support #' . $support_id . ' ] ' . db_result($result, 0, 'summary') . '</H2>'; echo ' <FORM ACTION="' . $PHP_SELF . '" METHOD="POST" enctype="multipart/form-data"> <INPUT TYPE="HIDDEN" NAME="func" VALUE="postmodsupport"> <INPUT TYPE="HIDDEN" NAME="group_id" VALUE="' . $group_id . '"> <INPUT TYPE="HIDDEN" NAME="support_id" VALUE="' . $support_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">
<P> <B><FONT COLOR="RED">It is not recommended that you change the support category name because other things are dependent upon it.</FONT></B> <P> <INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="SUBMIT"> </FORM> <?php } else { echo ' <H1>The support category that you requested a modification on was not found.</H1>'; } support_footer(array()); } else { /* Show main page */ support_header(array('title' => 'Support Manager Administration')); echo ' <H2>Support Manager Administration</H2>'; echo '<P> <A HREF="' . $PHP_SELF . '?group_id=' . $group_id . '&support_cat=1">Add Support Request Categories</A><BR>'; echo "\nAdd categories of support like, 'mail module','gant chart module','cvs', etc<P>"; echo '<P> <A HREF="' . $PHP_SELF . '?group_id=' . $group_id . '&create_canned=1">Add Canned Responses</A><BR>'; echo "\nCreate/Change generic response messages for the support tool.<P>"; support_footer(array()); } } } } } else { //browse for group first message
<?php // // SourceForge: Breaking Down the Barriers to Open Source Development // Copyright 1999-2000 (c) The SourceForge Crew // http://sourceforge.net // // $Id: detail_support.php,v 1.2 2003/11/13 11:29:27 helix Exp $ support_header(array('title' => 'Support Request Detail: ' . $support_id)); $sql = "SELECT support.summary,users.user_name AS submitted_by,support.priority," . "user2.user_name AS assigned_to,support_status.status_name,support.open_date,support_category.category_name " . "FROM support,users,users user2,support_category,support_status " . "WHERE support.submitted_by=users.user_id " . "AND support.assigned_to=user2.user_id " . "AND support.support_status_id=support_status.support_status_id " . "AND support.support_category_id=support_category.support_category_id " . "AND support.support_id='{$support_id}'"; $result = db_query($sql); if (db_numrows($result) > 0) { echo ' <H2>[ Support Request #' . $support_id . ' ] ' . db_result($result, 0, 'summary') . '</H2> <TABLE CELLPADDING="0" WIDTH="100%"> <TR> <TD><B>Date:</B><BR>' . date($sys_datefmt, db_result($result, 0, 'open_date')) . '</TD> <TD><B>Priority:</B><BR>' . db_result($result, 0, 'priority') . '</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>