4 * SourceForge Generic Tracker facility
6 * SourceForge: Breaking Down the Barriers to Open Source Development
7 * Copyright 1999-2001 (c) VA Linux Systems
8 * http://sourceforge.net
13 require_once $gfcommon.'tracker/ArtifactType.class.php';
14 require_once $gfcommon.'tracker/ArtifactExtraField.class.php';
15 require_once $gfcommon.'tracker/ArtifactExtraFieldElement.class.php';
16 require_once $gfcommon.'tracker/ArtifactWorkflow.class.php';
17 require_once $gfcommon.'include/utils_crossref.php';
19 class ArtifactTypeHtml extends ArtifactType {
22 * ArtifactType() - constructor
24 * @param $Group object
25 * @param $artifact_type_id - the id # assigned to this artifact type in the db
27 function ArtifactTypeHtml(&$Group,$artifact_type_id=false, $arr=false) {
28 return $this->ArtifactType($Group,$artifact_type_id,$arr);
31 function header($params) {
33 if (!forge_get_config('use_tracker')) {
36 $group_id= $this->Group->getID();
38 //required by new site_project_header
39 $params['group']=$group_id;
40 $params['toptab']='tracker';
41 $params['tabtext']=$this->getName();
43 site_project_header($params);
48 $labels[] = $this->getName().': '._('Browse');
49 $links[] = '/tracker/?func=browse&group_id='.$group_id.'&atid='. $this->getID();
50 $labels[] = _('Download .csv');
51 $links[] = '/tracker/?func=downloadcsv&group_id='.$group_id.'&atid='. $this->getID();
52 if ($this->allowsAnon() || session_loggedin()) {
53 $labels[] = _('Submit New');
54 $links[] = '/tracker/?func=add&group_id='.$group_id.'&atid='. $this->getID();
57 if (session_loggedin()) {
58 $labels[] = _('Reporting');
59 $links[] = '/tracker/reporting/?group_id='.$group_id.'&atid='. $this->getID();
60 if ($this->isMonitoring()) {
61 $labels[] = _('Stop Monitor');
62 $links[] = '/tracker/?group_id='.$group_id.'&atid='. $this->getID().'&func=monitor&stop=1';
64 $labels[] = _('Monitor');
65 $links[] = '/tracker/?group_id='.$group_id.'&atid='. $this->getID().'&func=monitor&start=1';
68 if ($this->userIsAdmin()) {
69 $labels[] = _('Admin');
70 $links[] = '/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID();
73 $labels[] = _('Monitor');
74 $links[] = '/tracker/?group_id='.$group_id.'&atid='. $this->getID().'&func=monitor&start=1';
77 echo $HTML->subMenu($labels,$links);
80 plugin_hook ("blocks", "tracker_".$this->getName());
84 function footer($params) {
85 site_project_footer($params);
88 function adminHeader($params) {
90 echo $this->header($params);
91 $group_id= $this->Group->getID();
93 $links_arr[]='/tracker/admin/?group_id='.$group_id;
94 $title_arr[]=_('New Tracker');
96 $links_arr[]='/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID().'&update_type=1';
97 $title_arr[]=_('Update Settings');
99 $links_arr[]='/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID().'&add_extrafield=1';
100 $title_arr[]=_('Manage Custom Fields');
102 $links_arr[]='/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID().'&workflow=1';
103 $title_arr[]=_('Manage Workflow');
105 $links_arr[]='/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID().'&customize_list=1';
106 $title_arr[]=_('Customize List');
108 $links_arr[]='/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID().'&add_canned=1';
109 $title_arr[]=_('Add/Update Canned Responses');
111 $links_arr[]='/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID().'&clone_tracker=1';
112 $title_arr[]=_('Clone Tracker');
114 $links_arr[]='/tracker/admin/?group_id='.$group_id.'&atid='.$this->getID().'&delete=1';
115 $title_arr[]=_('Delete');
117 echo $HTML->printSubMenu($title_arr,$links_arr);
120 function adminFooter($params) {
121 echo $this->footer($params);
124 function renderSubmitInstructions() {
125 $msg = $this->getSubmitInstructions();
126 return str_replace("\n","<br />", $msg);
129 function renderBrowseInstructions() {
130 $msg = $this->getBrowseInstructions();
131 return str_replace("\n","<br />", $msg);
134 function renderExtraFields($selected=array(),$show_100=false,$text_100='none',$show_any=false,$text_any='Any',$filter='',$status_show_100=false,$mode='') {
135 $efarr = $this->getExtraFields($filter);
136 //each two columns, we'll reset this and start a new row
138 $template = $this->getRenderHTML($filter, $mode);
140 if ($mode=='QUERY') {
141 $keys=array_keys($efarr);
142 for ($k=0; $k<count($keys); $k++) {
144 if ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_SELECT ||
145 $efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_CHECKBOX ||
146 $efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_RADIO ||
147 $efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_STATUS ||
148 $efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_MULTISELECT) {
149 $efarr[$i]['field_type'] = ARTIFACT_EXTRAFIELDTYPE_MULTISELECT;
151 $efarr[$i]['field_type'] = ARTIFACT_EXTRAFIELDTYPE_TEXT;
156 // 'DISPLAY' mode is for renderding in 'read-only' mode (for detail view).
157 if ($mode === 'DISPLAY') {
158 $keys=array_keys($efarr);
159 for ($k=0; $k<count($keys); $k++) {
162 if (!isset($selected[$efarr[$i]['extra_field_id']]))
163 $selected[$efarr[$i]['extra_field_id']] = '';
165 $value = @$selected[$efarr[$i]['extra_field_id']];
167 if ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_SELECT ||
168 $efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_CHECKBOX ||
169 $efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_RADIO ||
170 $efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_STATUS ||
171 $efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_MULTISELECT) {
175 $arr =& $this->getExtraFieldElements($efarr[$i]['extra_field_id']);
177 // Convert the values (ids) to names in the ids order.
179 for ($j=0; $j<count($arr); $j++) {
180 if (is_array($value)) {
181 if (in_array($arr[$j]['element_id'],$value))
182 $new[]= $arr[$j]['element_name'];
183 } elseif ($arr[$j]['element_id'] === $value) {
184 $new[] = $arr[$j]['element_name'];
187 $value = join('<br />', $new);
189 } else if ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_TEXT ||
190 $efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_TEXTAREA) {
191 $value = preg_replace('/((http|https|ftp):\/\/\S+)/',
192 "<a href=\"\\1\" target=\"_blank\">\\1</a>", $value);
193 } else if ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_RELATION) {
194 // Convert artifact id to links.
195 $value = preg_replace('/\b(\d+)\b/e', "_artifactid2url('\\1')", $value);
197 $template = str_replace('<!--'.$efarr[$i]['field_name'].'-->',$value,$template);
203 $keys=array_keys($efarr);
204 for ($k=0; $k<count($keys); $k++) {
208 if (!isset($selected[$efarr[$i]['extra_field_id']]))
209 $selected[$efarr[$i]['extra_field_id']] = '';
211 if ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_SELECT) {
212 $str = $this->renderSelect($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$show_100,$text_100,$show_any,$text_any);
214 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_CHECKBOX) {
216 $str = $this->renderCheckbox($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$show_100,$text_100);
218 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_RADIO) {
220 $str = $this->renderRadio($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$show_100,$text_100,$show_any,$text_any);
222 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_TEXT ||
223 $efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_INTEGER) {
225 $str = $this->renderTextField($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$efarr[$i]['attribute1'],$efarr[$i]['attribute2']);
226 if ($mode == 'QUERY') {
227 $post_name = ' <i>'._('(% for wildcards)').'</i> ';
230 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_TEXTAREA) {
232 $str = $this->renderTextArea($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$efarr[$i]['attribute1'],$efarr[$i]['attribute2']);
233 if ($mode == 'QUERY') {
234 $post_name = ' <i>'._('(% for wildcards)').'</i> ';
237 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_MULTISELECT) {
239 $str = $this->renderMultiSelectBox ($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$show_100,$text_100);
241 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_STATUS) {
243 // Get the allowed values from the workflow.
244 $atw = new ArtifactWorkflow($this, $efarr[$i]['extra_field_id']);
246 // Special treatement for the initial step (Submit).
247 // In this case, the initial value is the first value.
248 if ($selected === true) {
249 $selected_node = 100;
250 } elseif (isset($selected[$efarr[$i]['extra_field_id']]) && $selected[$efarr[$i]['extra_field_id']]) {
251 $selected_node = $selected[$efarr[$i]['extra_field_id']];
253 $selected_node = 100;
256 $allowed = $atw->getNextNodes($selected_node);
257 $allowed[] = $selected_node;
258 $str = $this->renderSelect($efarr[$i]['extra_field_id'],$selected_node,$status_show_100,$text_100,$show_any,$text_any, $allowed);
260 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_RELATION) {
262 $str = $this->renderRelationField($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$efarr[$i]['attribute1'],$efarr[$i]['attribute2']);
263 if ($mode == 'UPDATE') {
264 $post_name = html_image('ic/forum_edit.gif','37','15',array('title'=>"Click to edit", 'alt'=>"Click to edit", 'onclick'=>"switch2edit(this, 'show$i', 'edit$i')", 'border'=>"0"));
267 $template = str_replace('<!--PostName:'.$efarr[$i]['field_name'].'-->',$post_name,$template);
268 $template = str_replace('<!--'.$efarr[$i]['field_name'].'-->',$str,$template);
270 if($template != NULL){
275 function renderRelatedTasks($group, $ah) {
277 if (!$group->usesPM()) {
281 $result = $ah->getRelatedTasks();
282 $taskcount = db_numrows($ah->relatedtasks);
284 if ($taskcount > 0) {
285 echo '<tr><td colspan="2">';
286 echo '<b>'._("Related Tasks").':</b>'.'<br/>';
287 echo '<table cellspacing="0">';
288 for ($i = 0; $i < $taskcount; $i++) {
289 $taskinfo = db_fetch_array($ah->relatedtasks, $i);
290 $taskid = $taskinfo['project_task_id'];
291 $projectid = $taskinfo['group_project_id'];
292 $groupid = $taskinfo['group_id'];
293 $summary = util_unconvert_htmlspecialchars($taskinfo['summary']);
294 $startdate = date(_('Y-m-d H:i'), $taskinfo['start_date']);
295 $enddate = date(_('Y-m-d H:i'), $taskinfo['end_date']);
297 <td><a href="/pm/task.php?func=detailtask&project_task_id='.$taskid.
298 '&group_id='.$groupid.'&group_project_id='.$projectid.'">[T'.$taskid.'] '.$summary.'</a></td>
299 <td>'.$startdate.'</td>
300 <td>'.$enddate.'</td>
308 function renderFiles($group_id, $ah) {
310 $file_list =& $ah->getFiles();
311 $count=count($file_list);
314 echo '<tr><td colspan="2">';
315 echo '<b>'._("Attachments").':</b>'.'<br/>';
316 echo '<table cellspacing="0">';
317 for ($i=0; $i<$count; $i++) {
319 <td><a href="/tracker/download.php/'.$group_id.'/'. $this->getID().'/'. $ah->getID() .'/'.$file_list[$i]->getID().'/'.$file_list[$i]->getName() .'">'. htmlspecialchars($file_list[$i]->getName()) .'</a></td>';
320 // <td><input type="checkbox" name="delete_file[]" value="'. $file_list[$i]->getID() .'">'._("Delete").' </td>
331 * @return string HTML template.
333 function getRenderHTML($filter='', $mode='') {
334 // Use template only for the browse (not for query or mass update)
335 if (($mode === 'DISPLAY' || $mode === 'DETAIL' || $mode === 'UPDATE')
336 && $this->data_array['custom_renderer']) {
337 return $this->data_array['custom_renderer'];
339 return $this->generateRenderHTML($filter, $mode);
346 * @return string HTML template.
348 function generateRenderHTML($filter='', $mode) {
349 $efarr =& $this->getExtraFields($filter);
350 //each two columns, we'll reset this and start a new row
353 <!-- Start Extra Fields Rendering -->
354 <!-- COLUMN NAMES MUST BE PRESERVED EXACTLY, INCLUDING CASE! -->
358 $keys=array_keys($efarr);
360 if ($count == 0) return '';
362 for ($k=0; $k<$count; $k++) {
365 // Do not show the required star in query mode (creating/updating a query).
366 $is_required = ($mode == 'QUERY' || $mode == 'DISPLAY') ? 0 : $efarr[$i]['is_required'];
367 $name = $efarr[$i]['field_name'].($is_required ? utils_requiredField() : '').': ';
368 $name = '<strong>'.$name.'</strong>';
370 if ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_SELECT) {
373 <td width="50%" valign="top">'.$name.'<br /><!--'.$efarr[$i]['field_name'].'--></td>';
375 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_CHECKBOX) {
378 <td width="50%" valign="top">'.$name.'<br /><!--'.$efarr[$i]['field_name'].'--></td>';
380 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_RADIO) {
383 <td width="50%" valign="top">'.$name.'<br /><!--'.$efarr[$i]['field_name'].'--></td>';
385 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_TEXT ||
386 $efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_INTEGER) {
388 //text fields might be really wide, so need a row to themselves.
389 if (($col_count == 1) && ($efarr[$i]['attribute1'] > 30)) {
399 <td width="'.(50*$colspan).'%" colspan="'.$colspan.'" valign="top">'.$name.'<!--PostName:'.$efarr[$i]['field_name'].'--><br /><!--'.$efarr[$i]['field_name'].'--></td>';
401 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_TEXTAREA) {
403 //text areas might be really wide, so need a row to themselves.
404 if (($col_count == 1) && ($efarr[$i]['attribute2'] > 30)) {
414 <td width="'.(50*$colspan).'%" colspan="'.$colspan.'" valign="top">'.$name.'<!--PostName:'.$efarr[$i]['field_name'].'--><br /><!--'.$efarr[$i]['field_name'].'--></td>';
416 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_MULTISELECT) {
419 <td width="50%" valign="top">'.$name.'<br /><!--'.$efarr[$i]['field_name'].'--></td>';
421 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_STATUS) {
424 <td width="50%" valign="top">'.$name.'<br /><!--'.$efarr[$i]['field_name'].'--></td>';
426 } elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_RELATION) {
428 //text fields might be really wide, so need a row to themselves.
429 if (($col_count == 1) && ($efarr[$i]['attribute1'] > 30)) {
439 <td width="'.(50*$colspan).'%" colspan="'.$colspan.'" valign="top">'.$name.'<!--PostName:'.$efarr[$i]['field_name'].'--><br /><!--'.$efarr[$i]['field_name'].'--></td>';
443 //we've done two columns - if there are more to do, start a new row
444 if (($col_count == 2) && ($k != $count-1)) {
451 if ($col_count == 1) {
457 <!-- End Extra Fields Rendering -->';
462 * renderSelect - this function builds pop up
465 * @param int The ID of this field.
466 * @param string The item that should be checked
467 * @param string Whether to show the '100 row'
468 * @param string What to call the '100 row'
469 * @return box and choices
471 function renderSelect ($extra_field_id,$checked='xzxz',$show_100=false,$text_100='none',$show_any=false,$text_any='Any', $allowed=false) {
472 if ($text_100 == 'none'){
475 $arr =& $this->getExtraFieldElements($extra_field_id);
476 for ($i=0; $i<count($arr); $i++) {
477 $keys[$i]=$arr[$i]['element_id'];
478 $vals[$i]=$arr[$i]['element_name'];
480 return html_build_select_box_from_arrays ($keys,$vals,'extra_fields['.$extra_field_id.']',$checked,$show_100,$text_100,$show_any,$text_any, $allowed);
484 * renderRadio - this function builds radio buttons.
486 * @param int The ID of this field.
487 * @param string The item that should be checked
488 * @param string Whether to show the '100 row'
489 * @param string What to call the '100 row'
490 * @return radio buttons
492 function renderRadio ($extra_field_id,$checked='xzxz',$show_100=false,$text_100='none',$show_any=false,$text_any='Any') {
493 $arr =& $this->getExtraFieldElements($extra_field_id);
494 for ($i=0; $i<count($arr); $i++) {
495 $keys[$i]=$arr[$i]['element_id'];
496 $vals[$i]=$arr[$i]['element_name'];
498 return html_build_radio_buttons_from_arrays ($keys,$vals,'extra_fields['.$extra_field_id.']',$checked,$show_100,$text_100,$show_any,$text_any);
502 * renderCheckbox - this function builds checkboxes.
504 * @param int The ID of this field.
505 * @param array The items that should be checked
506 * @param string Whether to show the '100 row'
507 * @param string What to call the '100 row'
508 * @return radio buttons
510 function renderCheckbox ($extra_field_id,$checked=array(),$show_100=false,$text_100='none') {
511 if ($text_100 == 'none'){
514 if (!$checked || !is_array($checked)) {
517 $arr =& $this->getExtraFieldElements($extra_field_id);
520 <input type="checkbox" name="extra_fields['.$extra_field_id.'][]" value="100" '.
521 ((in_array(100,$checked)) ? 'checked="checked"' : '').'/> '.$text_100.'<br />';
523 for ($i=0; $i<count($arr); $i++) {
525 <input type="checkbox" name="extra_fields['.$extra_field_id.'][]" value="'.$arr[$i]['element_id'].'" '.
526 ((in_array($arr[$i]['element_id'],$checked)) ? 'checked="checked"' : '').'/> '.$arr[$i]['element_name'].'<br />';
532 * renderMultiSelectBox - this function builds checkboxes.
534 * @param int The ID of this field.
535 * @param array The items that should be checked
536 * @param string Whether to show the '100 row'
537 * @param string What to call the '100 row'
538 * @return radio multiselectbox
540 function renderMultiSelectBox ($extra_field_id,$checked=array(),$show_100=false,$text_100='none') {
541 $arr =& $this->getExtraFieldElements($extra_field_id);
545 if (!is_array($checked)) {
546 $checked = explode(',',$checked);
550 $arr =& $this->getExtraFieldElements($extra_field_id);
551 for ($i=0; $i<count($arr); $i++) {
552 $keys[]=$arr[$i]['element_id'];
553 $vals[]=$arr[$i]['element_name'];
555 $size = min( count($arr)+1, 15);
556 return html_build_multiple_select_box_from_arrays($keys,$vals,"extra_fields[$extra_field_id][]",$checked,$size,$show_100,$text_100);
560 * renderTextField - this function builds a text field.
562 * @param int The ID of this field.
563 * @param string The data for this field.
564 * @return text area and data.
566 function renderTextField ($extra_field_id,$contents,$size,$maxlength) {
568 <input type="text" name="extra_fields['.$extra_field_id.']" value="'.$contents.'" size="'.$size.'" maxlength="'.$maxlength.'"/>';
572 * renderRelationField - this function builds a relation field.
574 * @param int The ID of this field.
575 * @param string The data for this field.
576 * @return text area and data.
578 function renderRelationField ($extra_field_id,$contents,$size,$maxlength) {
579 $arr =& $this->getExtraFieldElements($extra_field_id);
580 for ($i=0; $i<count($arr); $i++) {
581 $keys[$i]=$arr[$i]['element_id'];
582 $vals[$i]=$arr[$i]['element_name'];
584 // Convert artifact id to links.
585 $html_contents = preg_replace('/\b(\d+)\b/e', "_artifactid2url('\\1','title')", $contents);
586 $edit_contents = $this->renderTextField ($extra_field_id,$contents,$size,$maxlength);
587 $edit_tips = '<br/><span class="tips">'._('Tip: Enter a space-separated list of artifact ids ([#NNN] also accepted)').'</span>';
589 <div id="edit'.$extra_field_id.'" style="display: none;">'.$edit_contents.$edit_tips.'</div>
590 <div id="show'.$extra_field_id.'" style="display: block;">'.$html_contents.'</div>';
594 * renderTextArea - this function builds a text area.
596 * @param int The ID of this field.
597 * @param string The data for this field.
598 * @return text area and data.
600 function renderTextArea ($extra_field_id,$contents,$rows,$cols) {
602 <textarea name="extra_fields['.$extra_field_id.']" rows="'.$rows.'" cols="'.$cols.'">'.$contents.'</textarea>';
605 function technicianBox ($name='assigned_to[]',$checked='xzxz',$show_100=true,$text_100='none',$extra_id='-1',$extra_name='',$multiple=false) {
606 if ($text_100=='none'){
607 $text_100=_('Nobody');
609 $result = $this->getTechnicians();
610 // this was a bad hack to allow you to mass-update to unassigned, which is ID=100, which
611 // conflicted with the "No Change" ID of 100.
612 $ids =& util_result_column_to_array($result,0);
613 $names =& util_result_column_to_array($result,1);
614 if ($extra_id != '-1') {
616 $names[]=$extra_name;
620 if (!is_array($checked)) {
621 $checked = explode(',',$checked);
623 $size = min( count($ids)+1, 15);
624 return html_build_multiple_select_box_from_arrays ($ids,$names,$name,$checked,$size,$show_100,$text_100);
626 return html_build_select_box_from_arrays ($ids,$names,$name,$checked,$show_100,$text_100);
630 function cannedResponseBox ($name='canned_response',$checked='xzxz') {
631 return html_build_select_box ($this->getCannedResponses(),$name,$checked);
635 * statusBox - show the statuses - automatically shows the "custom statuses" if they exist
639 function statusBox ($name='status_id',$checked='xzxz',$show_100=false,$text_100='none') {
640 if ($text_100=='none'){
643 return html_build_select_box($this->getStatuses(),$name,$checked,$show_100,$text_100);
650 // c-file-style: "bsd"