Пример #1
0
function link_box($group_id, $name, $selected = 'xzxzxz')
{
    global $link;
    if (!$link) {
        $link = db_query("SELECT group_id,group_name,register_time FROM groups " . "WHERE  status='A' AND type_id=1 AND group_id != " . $group_id . " " . "AND  group_id NOT IN (SELECT sub_project_id FROM plugin_projects_hierarchy WHERE project_id = " . $group_id . " )" . " AND group_id NOT IN (SELECT project_id FROM plugin_projects_hierarchy WHERE sub_project_id = " . $group_id . " )");
    }
    return html_build_select_box($link, $name, $selected, false);
}
Пример #2
0
function role_box($group_id, $name, $selected = 'xzxzxz')
{
    global $roleres;
    if (!$roleres) {
        $roleres = db_query("SELECT role_id,role_name \n\t\t\tFROM role WHERE group_id='{$group_id}'");
    }
    return html_build_select_box($roleres, $name, $selected, false);
}
Пример #3
0
/**
 * get_canned_responses() - Get an HTML select-box of canned responses
 */
function get_canned_responses()
{
    global $canned_response_res;
    if (!$canned_response_res) {
        $canned_response_res = db_query("SELECT response_id, response_title FROM canned_responses");
    }
    return html_build_select_box($canned_response_res, 'response_id');
}
Пример #4
0
/**
 * GForge Trove Browsing Facility
 *
 * Copyright 2004 Guillaume Smet / Open Wide
 * 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 getLanguageSelectionPopup($alreadyDefined = array())
{
    $where = '';
    if (!empty($alreadyDefined)) {
        $where = ' WHERE language_id NOT IN(' . implode(',', $alreadyDefined) . ')';
    }
    $res = db_query('SELECT * FROM supported_languages' . $where . ' ORDER BY name ASC');
    return html_build_select_box($res, 'language_id', 'xzxz', false);
}
Пример #5
0
function people_skill_year_box($name = 'skill_year_id', $checked = 'xyxy')
{
    global $PEOPLE_SKILL_YEAR;
    if (!$PEOPLE_SKILL_YEAR) {
        //will be used many times potentially on a single page
        $sql = "SELECT * FROM people_skill_year";
        $PEOPLE_SKILL_YEAR = db_query($sql);
    }
    return html_build_select_box($PEOPLE_SKILL_YEAR, $name, $checked);
}
Пример #6
0
function display_groups_option($group_id = false, $checkedval = 'xyxy')
{
    if (!$group_id) {
        exit_no_group();
    } else {
        $query = "select doc_group, groupname " . "from doc_groups " . "where group_id = {$group_id} " . "order by groupname";
        $result = db_query($query);
        echo html_build_select_box($result, 'doc_group', $checkedval);
    }
    //end else
}
Пример #7
0
function report_time_category_box($name = 'category', $selected = false)
{
    global $report_time_category_res;
    if (!$report_time_category_res) {
        $report_time_category_res = db_query("SELECT * FROM rep_time_category");
    }
    return html_build_select_box($report_time_category_res, $name, $selected, false);
}
Пример #8
0
echo '

</head>
<body>
<h1>' . $feedback . '</h1>

<table border="3" cellpadding="4" rules="groups" frame="box" width="100%" class="tablecontent">
	<form action="' . getStringFromServer('PHP_SELF') . '?func=query&group_id=' . $group_id . '&atid=' . $ath->getID() . '" method="post">
	<input type="hidden" name="form_key" value="' . form_generate_key() . '">
	<tr>
		<td>
			<input type="submit" name="submit" value="' . _('Save Changes') . '" />
		</td>
		<td>';
if (db_numrows($res) > 0) {
    echo html_build_select_box($res, 'query_id', $query_id, false) . '';
}
echo '
		</td>
	</tr>
	<tr class="tablecontent">
		<td>
		<input type="radio" name="query_action" value="1" ' . (!$query_id ? 'checked' : '') . '>' . _('Name and Save Query') . '<br />';
if (db_numrows($res) > 0) {
    echo '
		<input type="radio" name="query_action" value="4">' . _('Load Query') . '<br />';
}
if ($query_id) {
    echo '
		<input type="radio" name="query_action" value="3" checked>' . _('Update Query') . '<br />
		<input type="radio" name="query_action" value="5">' . _('Delete Query') . '';
Пример #9
0
function snippet_edit_snippet_details($id)
{
    global $Language;
    $sql = "SELECT * FROM snippet WHERE snippet_id='{$id}'";
    $result = db_query($sql);
    echo '
	<FORM ACTION="" METHOD="POST" enctype="multipart/form-data">
	<INPUT TYPE="HIDDEN" NAME="post_changes" VALUE="y">
	<P>
	<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="2">

	<TR><TD COLSPAN="2">
        <B>' . $Language->getText('snippet_browse', 'title') . '</B>&nbsp;
	<INPUT TYPE="TEXT" NAME="snippet_name" SIZE="45" MAXLENGTH="60" VALUE="' . db_result($result, 0, 'name') . '">
	</TD></TR>

	<TR><TD><B>' . $Language->getText('snippet_utils', 'type') . '</B><BR>
		' . html_build_select_box(snippet_data_get_all_types(), 'snippet_type', db_result($result, 0, 'type'), false) . '
        </TD><TD><B>' . $Language->getText('snippet_package', 'category') . '</B><BR>
		' . html_build_select_box(snippet_data_get_all_categories(), 'snippet_category', db_result($result, 0, 'category'), false) . '
	</TD></TR>

	<TR><TD><B>' . $Language->getText('snippet_utils', 'license') . '</B><BR>
		' . html_build_select_box(snippet_data_get_all_licenses(), 'snippet_license', db_result($result, 0, 'license'), false) . '
        </TD><TD><B>' . $Language->getText('snippet_package', 'language') . '</B><BR>
		' . html_build_select_box(snippet_data_get_all_languages(), "snippet_language", db_result($result, 0, 'language'), false) . '
	</TD></TR>

	<TR><TD COLSPAN="2">&nbsp;<BR>
	<B>' . $Language->getText('snippet_package', 'description') . '</B><BR>
	    <TEXTAREA NAME="snippet_description" ROWS="5" COLS="45" WRAP="SOFT">' . db_result($result, 0, 'description') . '</TEXTAREA>
	</TD></TR>

	<TR><TD COLSPAN="2" ALIGN="center">
		<B>' . $Language->getText('snippet_add_snippet_to_package', 'all_info_complete') . '</B>
		<BR>
		<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="' . $Language->getText('global', 'btn_submit') . '">
	</TD></TR>
	</TABLE>
	</FORM>
        <HR>
';
}
Пример #10
0
function license_selectbox($title = 'license_id', $selected = 'xzxz')
{
    $res = db_query("SELECT license_id, license_name FROM licenses ORDER BY license_name");
    return html_build_select_box($res, $title, $selected, false);
}
Пример #11
0
function bug_status_box($name = 'bug_status_id', $checked = 'xyxy', $text_100 = 'None')
{
    /*
    	Returns a select box populated with the pre-defined bug statuses
    */
    $result = bug_data_get_statuses();
    return html_build_select_box($result, $name, $checked, true, $text_100);
}
Пример #12
0
        $monthArrayVals = array();
        for ($i = 1; $i <= 12; $i++) {
            array_push($monthArrayVals, $i < 10 ? "0" . $i : $i);
            array_push($monthArray, date("M", mktime(0, 0, 0, $i, 1, 1980)));
        }
        /* add skills. */
        echo '<h2>' . _('Add a new skill') . '</h2>';
        echo _('You can enter new skills you have acquired here. Please enter the start and finish dates as accurately as possible.') . '<br />' . '<span class="required-field">' . _('All fields are required!') . '</span>';
        echo '<form action="' . getStringFromServer('PHP_SELF') . '" METHOD="POST">';
        echo ' <input type="hidden" name="form_key" value="' . form_generate_key() . '">';
        $cell_data = array();
        $cell_data[] = array(_('Type'));
        $cell_data[] = array(_('Start Date'));
        $cell_data[] = array(_('End Date'));
        echo "<table border=0 >" . $HTML->multiTableRow('', $cell_data, TRUE);
        echo "<tr>" . "<td>" . html_build_select_box($skills, "type", 1, false, "") . "</td>" . "<td>" . html_build_select_box_from_arrays($monthArrayVals, $monthArray, "startM", date("m"), false, "") . html_build_select_box_from_arrays($yearArray, $yearArray, "startY", 0, false, "") . "</td>" . "<td>" . html_build_select_box_from_arrays($monthArrayVals, $monthArray, "endM", date("m"), false, "") . html_build_select_box_from_arrays($yearArray, $yearArray, "endY", 0, false, "") . "</td>" . "</tr>" . "</table>" . "<table border=0 >";
        $cell_data = array();
        $cell_data[] = array(_('Title (max 100 characters)'));
        echo $HTML->multiTableRow('', $cell_data, TRUE);
        echo "<tr>" . "<td><input type=text name=\"title\" size=100></td>" . "</tr>";
        $cell_data = array();
        $cell_data[] = array(_('Keywords (max 255 characters)'));
        echo $HTML->multiTableRow('', $cell_data, TRUE);
        echo "<tr>" . "<td><textarea name=\"keywords\" rows=\"3\" cols=\"85\" wrap=\"soft\"></textarea></td>" . "</tr>" . "<tr>" . "<td><input type=submit name=\"AddSkill\" value=\"" . _('Add This Skill') . "\"></td>" . "</tr>" . "</table>";
        echo '</form>';
        echo '<h2>' . _('Edit/Delete Your Skills') . '</h2>
		<table border="0" width="100%">';
        echo '<form action="' . getStringFromServer('PHP_SELF') . '" METHOD="POST">';
        displayUserSkills(user_getid(), 1);
        echo '</form>';
        echo '</table>';
Пример #13
0
	<TR><TD COLSPAN="2"><B>' . $Language->getText('snippet_browse', 'title') . ':</B><BR>
		<INPUT TYPE="TEXT" NAME="name" SIZE="45" MAXLENGTH="60">
	</TD></TR>

	<TR><TD COLSPAN="2"><B>' . $Language->getText('snippet_package', 'description') . '</B><BR>
		<TEXTAREA NAME="description" ROWS="5" COLS="45" WRAP="SOFT"></TEXTAREA>
	</TD></TR>

	<TR>
	<TD><B>' . $Language->getText('snippet_package', 'language') . '</B><BR>
		' . html_build_select_box(snippet_data_get_all_languages(), 'language') . '
	</TD>

	<TD><B>' . $Language->getText('snippet_package', 'category') . '</B><BR>
		' . html_build_select_box(snippet_data_get_all_categories(), 'category') . '
	</TD>
	</TR>
 
	<TR><TD COLSPAN="2"><B>' . $Language->getText('snippet_addversion', 'version') . '</B><BR>
		<INPUT TYPE="TEXT" NAME="version" SIZE="10" MAXLENGTH="15">
	</TD></TR>
  
	<TR><TD COLSPAN="2" ALIGN="center">
		<B>' . $Language->getText('snippet_add_snippet_to_package', 'all_info_complete') . '</B>
		<BR>
		<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="' . $Language->getText('global', 'btn_submit') . '">
	</TD></TR>

	</TABLE>';
    snippet_footer(array());
Пример #14
0
function commits_tags_box($group_id, $name = '_tag', $checked = 'xzxz', $text_100 = 'None')
{
    $sql = "SELECT unix_group_name from groups where group_id={$group_id}";
    $result = db_query($sql);
    $projectname = db_result($result, 0, 'unix_group_name');
    $sql = "select distinct stickytag, stickytag from cvs_checkins, cvs_repositories where cvs_checkins.repositoryid=cvs_repositories.id AND cvs_repositories.repository='/cvsroot/" . $projectname . "'";
    $result = db_query($sql);
    return html_build_select_box($result, $name, $checked, true, $text_100);
}
Пример #15
0
function handle_multi_edit($skill_ids)
{
    global $HTML;
    $numSkills = count($skill_ids);
    $SQL = "select * from skills_data where skills_data_id in(" . (int) $skill_ids[0];
    for ($i = 1; $i < $numSkills; $i++) {
        $SQL .= ", " . (int) $skill_ids[$i];
    }
    $SQL .= ")";
    $result = db_query($SQL);
    $rows = db_numrows($result);
    if (!$result || $rows < 1) {
        echo db_error();
    } else {
        $sql = "SELECT * FROM skills_data_types WHERE type_id > 0";
        $skills = db_query($sql);
        if (!$skills || db_numrows($skills) < 1) {
            echo db_error();
            $feedback .= _('User fetch FAILED');
            echo '<h2>' . _('No Such User') . '<h2>';
        }
        $yearArray = array();
        for ($years = date("Y"); $years >= 1980; $years--) {
            array_push($yearArray, $years);
        }
        $monthArray = array();
        $monthArrayVals = array();
        for ($i = 1; $i <= 12; $i++) {
            array_push($monthArrayVals, $i < 10 ? "0" . $i : $i);
            array_push($monthArray, date("M", mktime(0, 0, 0, $i, 1, 1980)));
        }
        for ($i = 0; $i < $rows; $i++) {
            $start = db_result($result, $i, 'start');
            $finish = db_result($result, $i, 'finish');
            $startY = substr($start, 0, 4);
            $startM = substr($start, 4, 2);
            $finishY = substr($finish, 0, 4);
            $finishM = substr($finish, 4, 2);
            echo '<table border="0">' . '<tr ' . $HTML->boxGetAltRowStyle($i + 1) . '>' . '<td><h3>' . db_result($result, $i, 'title') . '</h3></td></tr>' . '<tr><td>' . '<table border="0" >' . '<tr class="tableheading">' . '<td >' . _('Type') . '</td>' . '<td >' . _('Start Date') . '</td>' . '<td >' . _('End Date') . '</td>' . '</tr>';
            echo '<tr ' . $HTML->boxGetAltRowStyle($i + 1) . '>' . '<td>' . html_build_select_box($skills, 'type[]', db_result($result, $i, 'type'), false, '') . '</td>' . '<td>' . html_build_select_box_from_arrays($monthArrayVals, $monthArray, 'startM[]', $startM, false, '') . html_build_select_box_from_arrays($yearArray, $yearArray, 'startY[]', $startY, false, '') . '</td>' . '<td>' . html_build_select_box_from_arrays($monthArrayVals, $monthArray, 'endM[]', $finishM, false, '') . html_build_select_box_from_arrays($yearArray, $yearArray, 'endY[]', $finishY, false, '') . '</td>' . '</tr>' . '</table>' . '</td></tr>' . '<tr ' . $HTML->boxGetAltRowStyle($i + 1) . '><td>' . '<table border="0">' . '<tr class="tableheading">' . '<td>' . _('Title (max 100 characters)') . '</td>' . '</tr>' . '<tr>' . '<td><input type="hidden" name="skill_edit[]" value="' . db_result($result, $i, 'skills_data_id') . '" />' . '<input type="text" name="title[]" size="100" value="' . db_result($result, $i, 'title') . '" /></td>' . '</tr>' . '<tr>' . '<td class="tableheading">' . _('Keywords (max 255 characters)') . '</td>' . '</tr>' . '<tr>' . '<td><textarea name="keywords[]" rows="3" cols="85" wrap="soft">' . db_result($result, $i, 'keywords') . '</textarea></td>' . '</tr>' . '</table>';
            '</td></tr>';
            echo '</table><br />';
        }
    }
}
Пример #16
0
function support_status_box($name = 'status_id', $checked = 'xzxz', $text_100 = 'None')
{
    $result = support_data_get_statuses();
    return html_build_select_box($result, $name, $checked, true, $text_100);
}
Пример #17
0
    $status_box = $ath->statusBox('_status', $_status, true, _('Any'));
}
echo '
<table width="100%" border="0">';
echo '
	<tr>';
/*
	Logged in users get the option of seeing a power-browse box
*/
if (session_loggedin()) {
    echo '<td rowspan="2">';
    echo '<form action="' . getStringFromServer('PHP_SELF') . '?group_id=' . $group_id . '&atid=' . $ath->getID() . '" method="post">';
    echo '<input type="hidden" name="power_query" value="1">';
    $res = db_query("SELECT artifact_query_id,query_name \n\tFROM artifact_query WHERE user_id='" . user_getid() . "' AND group_artifact_id='" . $ath->getID() . "'");
    if (db_numrows($res) > 0) {
        echo html_build_select_box($res, 'query_id', $af->getDefaultQuery(), false) . '<br />
		<input type="submit" name="run" value="' . _('Power Query') . '"></input>
		<strong><a href="javascript:admin_window(\'' . util_make_url('/tracker/?func=query&group_id=' . $group_id . '&atid=' . $ath->getID()) . '\')">' . _('Build Query') . '</a></strong>';
    } else {
        echo '<strong>
		<a href="javascript:admin_window(\'' . util_make_url('/tracker/?func=query&group_id=' . $group_id . '&atid=' . $ath->getID()) . '\')">' . _('Build Query') . '</a></strong>';
    }
    echo '
		</form>
		</td>';
}
echo '
	<form action="' . getStringFromServer('PHP_SELF') . '?group_id=' . $group_id . '&atid=' . $ath->getID() . '" method="post">
	<input type="hidden" name="set" value="custom" />
	<td>' . _('Assignee') . '<br />' . $tech_box . '</td>' . '<td>' . _('Status') . '<br />' . $status_box . '</td>';
echo '
Пример #18
0
    }
    echo '</textarea></td>
			</tr>

			<tr>
			<th>Group doc belongs in:</th>
        	<td>';
    display_groups_option($group_id, $row['doc_group']);
    echo '	</td>
				</tr>

				<tr>
				<th>State:</th>
				<td>';
    $res_states = db_query("select * from doc_states;");
    echo html_build_select_box($res_states, 'stateid', $row['stateid']);
    echo '
       		</td>
			</tr>

		</table>

		<input type="hidden" name="docid" value="' . $row['docid'] . '">
		<input type="submit" value="Submit Edit">

		</form>';
    docman_footer($params);
} elseif (strstr($mode, "groupdelete")) {
    $query = "select docid " . "from doc_data " . "where doc_group = " . $doc_group . "";
    $result = db_query($query);
    if (db_numrows($result) < 1) {
Пример #19
0
    echo getStringFromServer('PHP_SELF');
    ?>
"
	method="get" /><input type="hidden" name="week"
	value="<?php 
    echo $week;
    ?>
" />
<table>
	<tr>
		<td><strong><?php 
    echo _('Task Manager Project');
    ?>
:</strong></td>
		<td><?php 
    echo html_build_select_box($respm, 'group_project_id', false, false);
    ?>
</td>
		<td><input type="submit" name="submit"
			value="<?php 
    echo _('Next');
    ?>
" /></td>
	</tr>
</table>
</form>
<p>
<h3>Change Week</h3>
<p>
<form action="<?php 
    echo getStringFromServer('PHP_SELF');
Пример #20
0
/**
 * html_get_ccode_popup() - Pop up box of supported country_codes.
 *
 * @param		string	The title of the popup box.
 * @param		string	Which element of the box is to be selected.
 * @return	string	The html select box.
 */
function html_get_ccode_popup($title = 'ccode', $selected = 'xzxz')
{
    $res = db_query("SELECT ccode,country_name FROM country_code ORDER BY country_name");
    return html_build_select_box($res, $title, $selected, false);
}
Пример #21
0
<A HREF="/forum/admin/?group_id=' . $group_id . '">Forum Admin</A><BR>
<A HREF="/mail/admin/?group_id=' . $group_id . '">Mail Admin</A><BR>
<A HREF="/news/submit.php?group_id=' . $group_id . '">Submit Your News</A><BR>
<A HREF="/foundry/' . $expl_pathinfo[2] . '/admin/news/">Foundry-wide News Admin</A><BR>
<A HREF="/foundry/' . $expl_pathinfo[2] . '/admin/html/">Edit FreeForm HTML</A><BR>
';
$HTML->box1_bottom();
echo '<P>';
$HTML->box1_top('Images &amp; Trove Categories Admin');
$images_res = db_query("SELECT id,description FROM db_images WHERE group_id='{$group_id}'");
//echo db_error();
echo '<FORM ACTION="/foundry/' . $expl_pathinfo[2] . '/admin/" METHOD="POST">
	<INPUT TYPE="HIDDEN" NAME="func" VALUE="setfoundrydata">
	<TABLE>
	<TR><TD><B>Guide Image:</B></TD><TD>' . html_build_select_box($images_res, 'guide_image_id', $foundry->getGuideImageID(), true) . '</TR>
	<TR><TD><B>Logo Image:</B></TD><TD>' . html_build_select_box($images_res, 'logo_image_id', $foundry->getLogoImageID(), true) . '</TD></TR>
	<TR><TD><B>Trove Categories:</B><BR>(must comma separate)</TD><TD><INPUT TYPE="TEXT" NAME="trove_categories" VALUE="' . $foundry->getTroveCategories() . '" SIZE="6"></TD></TR>
	<TR><TD COLSPAN="2" ALIGN="CENTER"><INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Update"></TD></TR>
	</TABLE>
	</FORM>
';
$HTML->box1_bottom();
echo '</TD>

<TD>&nbsp;</TD>

<TD width=50%>';
/*
	Add project/users
*/
$HTML->box1_top('Add Projects/Users');
Пример #22
0
function people_job_category_box($name = 'category_id', $checked = 'xyxy')
{
    $sql = "SELECT category_id,name FROM people_job_category WHERE private_flag=0";
    $result = db_query($sql);
    return html_build_select_box($result, $name, $checked);
}
Пример #23
0
function frs_show_processor_popup($group_id, $name = 'processor_id', $checked_val = "xzxz")
{
    /*
    	return a pop-up select box of the available processors 
    */
    global $FRS_PROCESSOR_RES, $Language;
    if (!isset($FRS_PROCESSOR_RES)) {
        $FRS_PROCESSOR_RES = db_query("SELECT * FROM frs_processor WHERE group_id=100 OR group_id=" . db_ei($group_id) . " ORDER BY rank");
    }
    return html_build_select_box($FRS_PROCESSOR_RES, $name, $checked_val, true, $Language->getText('file_file_utils', 'must_choose_one'), true, '', false, '', false, '', CODENDI_PURIFIER_CONVERT_HTML);
}
Пример #24
0
function show_group_type_box($name = 'group_type', $checked_val = 'xzxz')
{
    $result = db_query("SELECT * FROM group_type");
    return html_build_select_box($result, 'group_type', $checked_val, false);
}
Пример #25
0
function doc_get_state_box($checkedval = 'xzxz')
{
    $res_states = db_query("select * from doc_states;");
    echo html_build_select_box($res_states, 'stateid', $checkedval, false);
}
Пример #26
0
function frs_show_package_popup($group_id, $name = 'package_id', $checked_val = "xzxz")
{
    /*
    	return a pop-up select box of packages for this project
    */
    global $FRS_PACKAGE_RES;
    if (!$group_id) {
        return 'ERROR - GROUP ID REQUIRED';
    } else {
        if (!isset($FRS_PACKAGE_RES)) {
            $FRS_PACKAGE_RES = db_query("SELECT package_id,name \n\t\t\t\tFROM frs_package WHERE group_id='{$group_id}'");
            echo db_error();
        }
        return html_build_select_box($FRS_PACKAGE_RES, $name, $checked_val, false);
    }
}
Пример #27
0
">

Question:
<BR>
<INPUT TYPE="TEXT" NAME="question" VALUE="<?php 
    echo $question;
    ?>
" SIZE="60" MAXLENGTH="150">

<P>
Question Type:
<BR>
<?php 
    $sql = "SELECT * FROM survey_question_types";
    $result = db_query($sql);
    echo html_build_select_box($result, 'question_type', $question_type, false);
    ?>
<P>

<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Submit Changes">
</FORM>  

<P>
<FORM>
<INPUT TYPE="BUTTON" NAME="none" VALUE="Show Existing Questions" ONCLICK="show_questions()">
</FORM>

<?php 
    survey_footer(array());
} else {
    exit_no_group();
 function groupProjectBox($name = 'group_project_id', $checked = 'xzxz', $show_100 = true, $text_100 = 'None')
 {
     $res = db_query("SELECT group_project_id,project_name \n\t\t\tFROM project_group_list \n\t\t\tWHERE group_id='" . $this->Group->getID() . "'");
     return html_build_select_box($res, $name, $checked, $show_100, $text_100);
 }
Пример #29
0
    /**
     *  Display the default value form for fields having a value function (e.g. group_members, artifact_submitters)
     *
     *  @param field_id: the field id to edit
     *  @param default_value: the default value
     *  @param show_none,text_none,show_any,text_any,show_value: values used by html_build_select_box function
     *
     *  @return void
     */
    function displayDefaultValueFunctionForm($field_id, $default_value, $show_none = true, $text_none = false, $show_any = false, $text_any = false, $show_value = false)
    {
        global $ath, $art_field_fact, $Language;
        if (!$text_any) {
            $text_any = $Language->getText('global', 'any');
        }
        if (!$text_none) {
            $text_none = $Language->getText('global', 'none');
        }
        $field = $art_field_fact->getFieldFromId($field_id);
        if (!$field) {
            return;
        }
        echo '<h3>' . $Language->getText('tracker_include_type', 'def_default') . ' ' . help_button('TrackerAdministration.html#TrackerDefiningaDefaultFieldValue') . '</h3>';
        echo '
	      <FORM ACTION="" METHOD="POST" name="artifact_form">
	      <INPUT TYPE="HIDDEN" NAME="func" VALUE="update_default_value">
	      <INPUT TYPE="HIDDEN" NAME="field_id" VALUE="' . (int) $field_id . '">
	      <INPUT TYPE="HIDDEN" NAME="group_id" VALUE="' . (int) $this->Group->getID() . '">
	      <INPUT TYPE="HIDDEN" NAME="atid" VALUE="' . (int) $this->getID() . '">';
        //new stuff by MLS
        $field_value = $field->getDefaultValue();
        $predefinedValues = $field->getFieldPredefinedValues($this->getID());
        if ($field->isSelectBox()) {
            echo html_build_select_box($predefinedValues, "default_value", $default_value);
        } else {
            if ($field->isMultiSelectBox()) {
                echo html_build_multiple_select_box($predefinedValues, "default_value[]", $default_value, $field->getDisplaySize() != "" ? $field->getDisplaySize() : "6", $show_none, $text_none, $show_any, $text_any, false, '', $show_value);
            } else {
                echo 'Why are we in this case ??';
            }
        }
        echo '
		 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <INPUT type="submit" name="submit" value="' . $Language->getText('global', 'btn_update') . '">
		</form><hr>';
    }
Пример #30
0
function doc_get_state_box()
{
    $res_states = db_query("select * from doc_states;");
    echo html_build_select_box($res_states, 'stateid', $row['stateid']);
}