Example #1
0
    $ids[] = 'commit';
    $texts[] = _('Commits');
}
if ($GLOBALS['sys_use_frs']) {
    $ids[] = 'frsrelease';
    $texts[] = _('FRS Release');
}
if (count($show) < 1) {
    $show = $ids;
}
foreach ($show as $showthis) {
    if (array_search($showthis, $ids) === false) {
        exit_error('Error', 'Invalid Data Passed to query');
    }
}
$multiselect = html_build_multiple_select_box_from_arrays($ids, $texts, 'show[]', $show, 5, false);
$sql = "SELECT * FROM activity_vw WHERE activity_date BETWEEN '" . $begin . "' AND '" . $end . "'\n\tAND group_id='{$group_id}' AND section IN ('" . implode("','", $show) . "') ORDER BY activity_date DESC";
//echo $sql;
$res = db_query($sql);
echo db_error();
$rows = db_numrows($res);
if ($rows < 1) {
    echo _('No Activity Found');
} else {
    ?>
<br />
<form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post">
<input type="hidden" name="group_id" value="<?php 
echo '</center></strong></tr><tr><td><strong><center>';
echo '</center></strong></td>';
echo '<td valign=top>';
?>
		
		<form action="<?php 
echo getStringFromServer('PHP_SELF') . '?group_id=' . $group_id . '&atid=' . $ath->getID();
?>
" method="post" >
		<input type="hidden" name="copy_opt" value="copy" >
		<input type="hidden" name="id" value="<?php 
echo $id;
?>
">
		<?php 
echo html_build_multiple_select_box_from_arrays($field_id_arr, $field_arr, 'copyid[]', array(), 10, false);
echo '</td><td><strong><center>';
//get a list of all extra fields in trackers and groups that you have perms to admin
$sql = "SELECT DISTINCT g.unix_group_name, agl.name AS tracker_name, aefl.field_name, aefl.extra_field_id\n\t\t\tFROM groups g, \n\t\t\tartifact_group_list agl, \n\t\t\tartifact_extra_field_list aefl,\n\t\t\tuser_group ug,\n                        role_setting rs\n\t\t\tWHERE\n                        (\n                           (rs.section_name = 'projectadmin' AND rs.value = 'A')\n                           OR (rs.section_name = 'trackeradmin' AND rs.value = '2')\n                           OR (rs.section_name = 'tracker' AND rs.value::integer >= 2 AND rs.ref_id = agl.group_artifact_id)\n                        )\n\t\t\tAND ug.user_id='" . user_getid() . "'\n\t\t\tAND ug.group_id=g.group_id\n\t\t\tAND g.group_id=agl.group_id \n\t\t\tAND rs.role_id=ug.role_id\n\t\t\tAND aefl.group_artifact_id=agl.group_artifact_id\n\t\t\tAND aefl.field_type IN (1,2,3,5)";
$res = db_query($sql);
//		echo db_error().$sql;
while ($arr = db_fetch_array($res)) {
    $name_arr[] = $arr['unix_group_name'] . '::' . $arr['tracker_name'] . '::' . $arr['field_name'];
    $id_arr[] = $arr['extra_field_id'];
}
echo '<td valign=top>';
echo html_build_select_box_from_arrays($id_arr, $name_arr, 'selectid', $selectid, false);
echo '</td></tr>';
echo '<tr><td>';
?>
		<br />
 function technicianBox($name = 'assigned_to[]', $checked = 'xzxz', $show_100 = true, $text_100 = 'none', $extra_id = '-1', $extra_name = '', $multiple = false)
 {
     if ($text_100 == 'none') {
         $text_100 = _('Nobody');
     }
     $result = $this->getTechnicians();
     //	this was a bad hack to allow you to mass-update to unassigned, which is ID=100, which
     //	conflicted with the "No Change" ID of 100.
     $ids =& util_result_column_to_array($result, 0);
     $names =& util_result_column_to_array($result, 1);
     if ($extra_id != '-1') {
         $ids[] = $extra_id;
         $names[] = $extra_name;
     }
     if ($multiple) {
         if (!is_array($checked)) {
             $checked = explode(',', $checked);
         }
         return html_build_multiple_select_box_from_arrays($ids, $names, $name, $checked, 15, $show_100, $text_100);
     } else {
         return html_build_select_box_from_arrays($ids, $names, $name, $checked, $show_100, $text_100);
     }
 }