• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP html_build_select_box_from_arrays函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中html_build_select_box_from_arrays函数的典型用法代码示例。如果您正苦于以下问题:PHP html_build_select_box_from_arrays函数的具体用法?PHP html_build_select_box_from_arrays怎么用?PHP html_build_select_box_from_arrays使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了html_build_select_box_from_arrays函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getRankField

 function getRankField($value = 'end')
 {
     $html = '';
     $html .= '<tr>';
     $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'admin_md_detail_val_create_rank') . '</td>';
     $vals = array('beg', 'end', '--');
     $texts = array($GLOBALS['Language']->getText('plugin_docman', 'admin_md_detail_val_create_rank_beg'), $GLOBALS['Language']->getText('plugin_docman', 'admin_md_detail_val_create_rank_end'), '----');
     $i = 3;
     $vIter =& $this->md->getListOfValueIterator();
     $vIter->rewind();
     while ($vIter->valid()) {
         $e =& $vIter->current();
         if ($e->getStatus() == 'A' || $e->getStatus() == 'P') {
             $vals[$i] = $e->getRank() + 1;
             $texts[$i] = $GLOBALS['Language']->getText('plugin_docman', 'admin_md_detail_val_create_rank_after') . ' ' . Docman_MetadataHtmlList::_getElementName($e);
             $i++;
         }
         $vIter->next();
     }
     $html .= '<td>';
     $html .= html_build_select_box_from_arrays($vals, $texts, 'rank', $value, false, '');
     $html .= '</td>';
     $html .= '</tr>';
     return $html;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:25,代码来源:Docman_View_LoveDetails.class.php


示例2: showTypeBox

 function showTypeBox($name = 'group_type', $checked_val = 'xzxz')
 {
     $localizedTypes = array();
     foreach (array_keys($this->data_array) as $type_id) {
         $localizedTypes[] = $this->getLabel($type_id);
     }
     return html_build_select_box_from_arrays(array_keys($this->data_array), $localizedTypes, $name, $checked_val, false);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:TemplateSingleton.class.php


示例3: get_canned_responses

function get_canned_responses()
{
    $result = db_query("SELECT response_id, response_title FROM canned_responses");
    while ($res_array = db_fetch_array($result)) {
        $ids[] = $res_array["response_id"];
        $texts[] = $res_array["response_title"];
    }
    return html_build_select_box_from_arrays($ids, $texts, "response_id");
}
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:9,代码来源:canned_responses.php


示例4: showTypeBox

 function showTypeBox($name = 'question_type', $checked_val = 'xzxz')
 {
     $ranked_ids = array();
     $localizedTypes = array();
     foreach ($this->ranked_array as $val) {
         $ranked_ids[] = $val;
         $localizedTypes[] = $this->getLabel($val);
     }
     return html_build_select_box_from_arrays($ranked_ids, $localizedTypes, $name, $checked_val, false);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:SurveySingleton.class.php


示例5: showSelectNestedGroups

 /**
  * showSelectNestedGroups - Display the tree of document groups inside a <select> tag
  *
  * @param array	Array of groups.
  * @param string	The name that will be assigned to the input
  * @param bool	Allow selection of "None"
  * @param int	The ID of the group that should be selected by default (if any)
  * @param array	Array of IDs of groups that should not be displayed
  */
 function showSelectNestedGroups(&$group_arr, $select_name, $allow_none = true, $selected_id = 0, $dont_display = array())
 {
     // Build arrays for calling html_build_select_box_from_arrays()
     $id_array = array();
     $text_array = array();
     if ($allow_none) {
         // First option to be displayed
         $id_array[] = 0;
         $text_array[] = "(None)";
     }
     // Recursively build the document group tree
     $this->buildArrays($group_arr, $id_array, $text_array, $dont_display);
     echo html_build_select_box_from_arrays($id_array, $text_array, $select_name, $selected_id, false);
 }
开发者ID:neymanna,项目名称:fusionforge,代码行数:23,代码来源:DocumentGroupHTML.class.php


示例6: bug_user_project_box

function bug_user_project_box($name = 'project_id', $user_id = false, $checked = 'xyxy', $text_100 = 'None')
{
    /*
    	Returns a select box populated with projects that the user is bug admin of
    */
    if (!$user_id) {
        return 'ERROR - no user_id';
    } else {
        $result = bug_data_get_user_projects($user_id);
        if (!db_numrows($result)) {
            return html_build_select_box_from_arrays($group_id, $checked, $name, $checked, false);
        } else {
            return html_build_select_box($result, $name, $checked, false, $text_100);
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:16,代码来源:bug_utils.php


示例7: reports_header

function reports_header($group_id, $vals, $titles)
{
    global $what;
    global $period;
    global $span;
    print "<form method=\"GET\" action=\"{$PHP_SELF}#b\">";
    print html_build_select_box_from_arrays($vals, $titles, 'what', $what, false);
    $periods = array('day' => 'Last day', 'week' => 'Last week');
    $vals = array('day', 'week', 'month', 'year', 'lifespan');
    $texts = array('Last day(s)', 'Last week(s)', 'Last month(s)', 'Last year(s)', 'Project lifespan');
    if (!$period) {
        $period = "lifespan";
    }
    print " for ";
    print html_build_select_box_from_arrays(array('', '1', '4', '7', '12', '14', '30', '52'), array('', '1', '4', '7', '12', '14', '30', '52'), 'span', $span, false);
    print html_build_select_box_from_arrays($vals, $texts, 'period', $period, false);
    print "<input type=\"hidden\" name=\"group_id\" value=\"{$group_id}\">";
    print ' <input type="submit" value="Show">';
    print "</form>\n";
}
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:20,代码来源:tool_reports.php


示例8: reports_header

/**
 * reports_header() - Show the reports header
 *
 * @param		int		The group ID
 * @param		array	Array of select box values
 * @param		string	The select box title
 * @param		string	Any additional HTML
 */
function reports_header($group_id, $vals, $titles, $html = '')
{
    global $what;
    global $period;
    global $span;
    print '<form method="get" action="' . getStringFromServer('PHP_SELF') . '#b">';
    print $html;
    print html_build_select_box_from_arrays($vals, $titles, 'what', $what, false);
    $periods = array('day' => 'Last day', 'week' => 'Last week');
    $vals = array('day', 'week', 'month', 'year', 'lifespan');
    $texts = array(_('Last day(s)'), _('Last week(s)'), _('Last month(s)'), _('Last year(s)'), _('Project lifespan'));
    if (!$period) {
        $period = "lifespan";
    }
    print _('for');
    print html_build_select_box_from_arrays(array('', '1', '4', '7', '12', '14', '30', '52'), array('', '1', '4', '7', '12', '14', '30', '52'), 'span', $span, false);
    print html_build_select_box_from_arrays($vals, $texts, 'period', $period, false);
    print "<input type=\"hidden\" name=\"group_id\" value=\"{$group_id}\" />";
    print ' <input type="submit" value="' . _('Show') . '" />';
    print "</form>\n";
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:29,代码来源:tool_reports.php


示例9: _

echo $typ;
?>
">
<table><tr>
<td><strong><?php 
echo _('Project');
?>
:</strong><br /><?php 
echo report_group_box('g_id', $g_id);
?>
</td>
<td><strong><?php 
echo _('Type');
?>
:</strong><br /><?php 
echo html_build_select_box_from_arrays($a2, $a, 'type', $type, false);
?>
</td>
<td><strong><?php 
echo _('Start');
?>
:</strong><br /><?php 
echo report_months_box($report, 'start', $start);
?>
</td>
<td><strong><?php 
echo _('End');
?>
:</strong><br /><?php 
echo report_months_box($report, 'end', $end);
?>
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:projecttime.php


示例10: _getReviewerTable

 function _getReviewerTable()
 {
     $html = '';
     $uh = UserHelper::instance();
     $html .= '<h3>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_table_title') . '</h3>';
     $html .= '<div id="docman_approval_table_create_table">';
     if (!$this->table->isClosed()) {
         $html .= '<div class="docman_help">' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_table_help') . '</div>';
     }
     $rIter = $this->table->getReviewerIterator();
     if ($rIter !== null) {
         $docmanIcons =& $this->_getDocmanIcons();
         $html .= html_build_list_table_top(array($GLOBALS['Language']->getText('plugin_docman', 'details_approval_select'), $GLOBALS['Language']->getText('plugin_docman', 'details_approval_reviewer'), $GLOBALS['Language']->getText('plugin_docman', 'details_approval_review'), $GLOBALS['Language']->getText('plugin_docman', 'details_approval_rank')), false, false, false);
         $isFirst = true;
         $isLast = false;
         $nbReviewers = $rIter->count();
         $i = 0;
         $rIter->rewind();
         while ($rIter->valid()) {
             $isLast = $i == $nbReviewers - 1;
             $reviewer = $rIter->current();
             // i+1 to start with 'white'
             $html .= '<tr class="' . html_get_alt_row_color($i + 1) . '">';
             // Select
             if (!$this->table->isClosed()) {
                 $checkbox = '<input type="checkbox" name="sel_user[]" value="' . $reviewer->getId() . '" />';
             } else {
                 $checkbox = '&nbsp;';
             }
             $html .= '<td align="center">' . $checkbox . '</td>';
             // Username
             $html .= '<td>' . $this->hp->purify($uh->getDisplayNameFromUserId($reviewer->getId())) . '</td>';
             // Review
             $html .= '<td>' . $this->atf->getReviewStateName($reviewer->getState()) . '</td>';
             // Rank
             if (!$this->table->isClosed()) {
                 $rank = $reviewer->getRank();
                 $baseUrl = '?group_id=' . $this->item->getGroupId() . '&action=approval_upd_user&id=' . $this->item->getId() . '&user_id=' . $reviewer->getId() . '&rank=';
                 $begLink = '';
                 $upLink = '';
                 if (!$isFirst) {
                     $begIcon = '<img src="' . $docmanIcons->getIcon('move-beginning') . '" alt="Beginning" />';
                     $begLink = '<a href="' . $baseUrl . 'beginning">' . $begIcon . '</a>';
                     $upIcon = '<img src="' . $docmanIcons->getIcon('move-up') . '" alt="Up" />';
                     $upLink = '<a href="' . $baseUrl . 'up">' . $upIcon . '</a>';
                 }
                 $endLink = '';
                 $downLink = '';
                 if (!$isLast) {
                     $endIcon = '<img src="' . $docmanIcons->getIcon('move-end') . '" alt="End" />';
                     $endLink = '<a href="' . $baseUrl . 'end">' . $endIcon . '</a>';
                     $downIcon = '<img src="' . $docmanIcons->getIcon('move-down') . '" alt="Down" />';
                     $downLink = '<a href="' . $baseUrl . 'down">' . $downIcon . '</a>';
                 }
                 $rankHtml = $upLink . '&nbsp;' . $downLink . '&nbsp;' . $begLink . '&nbsp;' . $endLink;
             } else {
                 $rankHtml = '&nbsp;';
             }
             $html .= '<td align="center">' . $rankHtml . '</td>';
             $html .= '</tr>';
             $isFirst = false;
             $i++;
             $rIter->next();
         }
         $html .= '</table>';
         // Action with selected reviewers
         if (!$this->table->isClosed()) {
             $html .= '<p>';
             $html .= $GLOBALS['Language']->getText('plugin_docman', 'details_approval_create_table_act');
             $vals = array('del', 'mail');
             $txts = array($GLOBALS['Language']->getText('plugin_docman', 'details_approval_create_table_act_rm'), $GLOBALS['Language']->getText('plugin_docman', 'details_approval_create_table_act_mail'));
             $html .= html_build_select_box_from_arrays($vals, $txts, 'sel_user_act', 100, true);
             $html .= '</p>';
         }
     }
     $html .= '</div>';
     return $html;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:78,代码来源:Docman_View_ItemDetailsSectionApprovalCreate.class.php


示例11: frs_show_release_popup

function frs_show_release_popup($group_id, $name = 'release_id', $checked_val = "xzxz")
{
    /*
    	return a pop-up select box of releases for the project
    */
    global $FRS_RELEASE_ID_RES, $FRS_RELEASE_NAME_RES, $Language;
    $frsrf = new FRSReleaseFactory();
    if (!$group_id) {
        return $Language->getText('file_file_utils', 'g_id_err');
    } else {
        if (!isset($FRS_RELEASE_ID_RES)) {
            $res = $frsrf->getFRSReleasesInfoListFromDb($group_id);
            $FRS_RELEASE_ID_RES = array();
            $FRS_RELEASE_NAME_RES = array();
            foreach ($res as $release) {
                $FRS_RELEASE_ID_RES[] = $release['release_id'];
                $FRS_RELEASE_NAME_RES[] = $release['package_name'] . ':' . $release['release_name'];
            }
        }
        return html_build_select_box_from_arrays($FRS_RELEASE_ID_RES, $FRS_RELEASE_NAME_RES, $name, $checked_val, false);
    }
}
开发者ID:rinodung,项目名称:tuleap,代码行数:22,代码来源:file_utils.php


示例12: handle_multi_edit

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 />';
        }
    }
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:45,代码来源:skills_utils.php


示例13: getReviewForm

 function getReviewForm($user)
 {
     $html = '';
     $uh = UserHelper::instance();
     // Values
     $itemCurrentVersion = $this->_getReviewCurrentVersion();
     $reviewer = $this->table->getReviewer($user->getId());
     $reviewVersion = $reviewer->getVersion();
     // Output
     $html .= '<h3>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_doc_review_title') . '</h3>';
     $html .= '<table>';
     // Doc title
     $html .= '<tr>';
     $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_doc_review_name') . '</td>';
     $html .= '<td>';
     $html .= $this->hp->purify($this->item->getTitle(), CODENDI_PURIFIER_CONVERT_HTML);
     if ($itemCurrentVersion == null) {
         $url = Docman_View_View::buildUrl($this->url, array('action' => 'show', 'id' => $this->item->getId()));
         $html .= ' - ';
         $html .= '<a href="' . $url . '">' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_doc_review_link') . '</a>';
     }
     $html .= '</td>';
     $html .= '</tr>';
     // Doc version
     $html .= '<tr>';
     $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_doc_review_version') . '</td>';
     $html .= '<td>';
     if ($itemCurrentVersion !== null) {
         $html .= $this->_getItemVersionLink($itemCurrentVersion);
         if (!$this->atf->userAccessedSinceLastUpdate($user)) {
             // Warn user if he didn't access the last version of document
             $html .= '<span style="margin-left: 2em;">' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_review_wo_access') . '</span>';
         }
     } else {
         $html .= $GLOBALS['Language']->getText('plugin_docman', 'details_approval_doc_review_version_na');
     }
     $html .= '</td>';
     $html .= '</tr>';
     $html .= '</table>';
     $html .= '<h3>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_approval_title') . '</h3>';
     $html .= '<table>';
     // Requester name
     $html .= '<tr>';
     $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_requester') . '</td>';
     $html .= '<td>';
     $html .= $this->hp->purify($uh->getDisplayNameFromUserId($this->table->getOwner()));
     $html .= '</td>';
     $html .= '</tr>';
     // Notification type
     $html .= '<tr>';
     $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_notif_type') . '</td>';
     $html .= '<td>';
     $html .= $this->atf->getNotificationTypeName($this->table->getNotification());
     $html .= '</td>';
     $html .= '</tr>';
     // Cycle start date
     $html .= '<tr>';
     $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_cycle_start_date') . '</td>';
     $html .= '<td>';
     $html .= util_timestamp_to_userdateformat($this->table->getDate(), true);
     $html .= '</td>';
     $html .= '</tr>';
     // Owner comment
     $html .= '<tr>';
     $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_owner_comment') . '</td>';
     $html .= '<td>';
     $html .= $this->hp->purify($this->table->getDescription(), CODENDI_PURIFIER_BASIC, $this->item->getGroupId());
     $html .= '</td>';
     $html .= '</tr>';
     $html .= '</table>';
     $html .= '<h3>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_review_title') . '</h3>';
     $html .= '<div class="docman_help">' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_review_help') . '</div>';
     $html .= '<form name="docman_approval_review" method="post" action="?" class="docman_form">';
     $html .= '<input type="hidden" name="group_id" value="' . $this->item->getGroupId() . '" />';
     $html .= '<input type="hidden" name="id" value="' . $this->item->getId() . '" />';
     $html .= '<input type="hidden" name="action" value="approval_user_commit" />';
     if ($itemCurrentVersion !== null) {
         // Add version here because someone can submit a new version while
         // current user is reviewing.
         $html .= '<input type="hidden" name="version" value="' . $itemCurrentVersion . '" />';
     }
     $html .= '<table>';
     $html .= '<tr>';
     $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_review_table') . '</td>';
     $url = $this->buildUrl($this->url, array('action' => 'details', 'section' => 'approval', 'id' => $this->item->getId()));
     $html .= '<td>';
     $html .= '<a href="' . $url . '">' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_review_table_link') . '</a>';
     $html .= '</td>';
     $html .= '</tr>';
     $html .= '<tr>';
     $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_review_review') . '</td>';
     $vals = array(PLUGIN_DOCMAN_APPROVAL_STATE_NOTYET, PLUGIN_DOCMAN_APPROVAL_STATE_APPROVED, PLUGIN_DOCMAN_APPROVAL_STATE_REJECTED, PLUGIN_DOCMAN_APPROVAL_STATE_COMMENTED, PLUGIN_DOCMAN_APPROVAL_STATE_DECLINED);
     $txts = array($GLOBALS['Language']->getText('plugin_docman', 'approval_review_state_' . PLUGIN_DOCMAN_APPROVAL_STATE_NOTYET), $GLOBALS['Language']->getText('plugin_docman', 'approval_review_state_' . PLUGIN_DOCMAN_APPROVAL_STATE_APPROVED), $GLOBALS['Language']->getText('plugin_docman', 'approval_review_state_' . PLUGIN_DOCMAN_APPROVAL_STATE_REJECTED), $GLOBALS['Language']->getText('plugin_docman', 'approval_review_state_' . PLUGIN_DOCMAN_APPROVAL_STATE_COMMENTED), $GLOBALS['Language']->getText('plugin_docman', 'approval_review_state_' . PLUGIN_DOCMAN_APPROVAL_STATE_DECLINED));
     $html .= '<td>';
     $html .= html_build_select_box_from_arrays($vals, $txts, 'state', $reviewer->getState(), false);
     $html .= '</td>';
     $html .= '</tr>';
     // If reviewer already approved or reject, display date
     if ($reviewer->getReviewDate()) {
         $html .= '<tr>';
//.........这里部分代码省略.........
开发者ID:rinodung,项目名称:tuleap,代码行数:101,代码来源:Docman_View_ItemDetailsSectionApproval.class.php


示例14: report_tracker_box

function report_tracker_box($name = 'datatype', $selected = '1')
{
    $arr[] = _('Bugs');
    $arr[] = _('Support');
    $arr[] = _('Patches');
    $arr[] = _('Feature Requests');
    $arr[] = _('Other Trackers');
    $arr[] = _('Forum Messages');
    $arr[] = _('Tasks');
    $arr[] = _('Downloads');
    $arr2[] = '1';
    $arr2[] = '2';
    $arr2[] = '3';
    $arr2[] = '4';
    $arr2[] = '0';
    $arr2[] = '5';
    $arr2[] = '6';
    $arr2[] = '7';
    return html_build_select_box_from_arrays($arr2, $arr, $name, $selected, false);
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:20,代码来源:report_utils.php


示例15: html_build_multiple_select_box_from_arrays

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 />
	 	<input type="submit" name="post_changes" value="<?php 
echo _('Submit');
?>
" />
		</td></tr></table></form>
		
		<?php 
$ath->footer(array());
// Local Variables:
// mode: php
// c-file-style: "bsd"
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:form-extrafieldcopy.php


示例16: _

</h4>
		<p>
		<?php 
        echo _('You can unsubscribe user either from admin-initiated sitewide mailings or from all site mailings (admin-initiated and automated mailings, like forum and file release notifications).');
        ?>
		</p>
		<form action="<?php 
        echo getStringFromServer('PHP_SELF');
        ?>
" method="post">
		<input type="hidden" name="user_name" value="<?php 
        echo $user_name;
        ?>
" />
		Unsubscription type: <?php 
        echo html_build_select_box_from_arrays(array(_('MAIL'), _('ALL')), array(_('Admin-initiated mailings'), _('All site mailings')), 'type', false, false);
        ?>
		<input type="submit" name="submit" value="<?php 
        echo _('Unsubscribe');
        ?>
" />
		</form>

		<?php 
        site_admin_footer(array());
        exit;
    } else {
        /*
        	Perform unsubscription
        */
        $u =& user_get_object_by_name($user_name);
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:unsubscribe.php


示例17: _

<table width="100%" class="tablecontent">
	<tr>
		<td>' . _('Assignee') . '</a><br />' . $tech_box . '</td>
		<td>';
if (!$ath->usesCustomStatuses()) {
    echo _('State') . ':&nbsp;<br />' . $ath->statusBox('_status', $_status, true, _('Any'));
}
echo '</td>
	</tr>';
$ath->renderExtraFields($extra_fields, true, 'None', true, 'Any', ARTIFACT_EXTRAFIELD_FILTER_INT, false, 'QUERY');
echo '
	<tr>
		<td colspan="2">' . _('Last Modified Date range') . ':<strong>(YYYY-MM-DD&nbsp;YYYY-MM-DD Format)</strong><br />
		<input type="text" name="_moddaterange" size="21" maxlength="21" value="' . htmlspecialchars($_moddaterange) . '"><p/>
		' . _('Open Date range') . ': <strong>(YYYY-MM-DD&nbsp;YYYY-MM-DD Format)</strong><br />
		<input type="text" name="_opendaterange" size="21" maxlength="21" value="' . htmlspecialchars($_opendaterange) . '"><p/>
		' . _('Close Date range') . ': <strong>(YYYY-MM-DD&nbsp;YYYY-MM-DD Format)</strong><br />
		<input type="text" name="_closedaterange" size="21" maxlength="21" value="' . htmlspecialchars($_closedaterange) . '">
		</td>
	</tr>
	<tr>
		<td>' . _('Order by') . '<br />
		' . html_build_select_box_from_arrays($order_arr, $order_name_arr, '_sort_col', $_sort_col, false) . '</td>
		<td>&nbsp;<br />
		' . html_build_select_box_from_arrays($sort_arr, $sort_name_arr, '_sort_ord', $_sort_ord, false) . '</td>
	</tr>
	</form></table></body></html>';
// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:query.php


示例18: html_build_select_box

function html_build_select_box($result, $name, $checked_val = "xzxz", $show_100 = true, $text_100 = '', $show_any = false, $text_any = '', $show_unchanged = false, $text_unchanged = '', $purify_level = CODENDI_PURIFIER_CONVERT_HTML, $show_unknown_value = true)
{
    global $Language;
    /*
    	Takes a result set, with the first column being the "id" or value
    	and the second column being the text you want displayed
    
    	The second parameter is the name you want assigned to this form element
    
    	The third parameter is optional. Pass the value of the item that should be checked
    
    	The fourth parameter is an optional boolean - whether or not to show the '100 row'
    
    	The fifth parameter is optional - what to call the '100 row' defaults to none
    */
    // Position default values for special menu items
    if ($text_100 == '') {
        $text_100 = $Language->getText('global', 'none');
    }
    if ($text_any == '') {
        $text_any = $Language->getText('global', 'any');
    }
    if ($text_unchanged == '') {
        $text_unchanged = $Language->getText('global', 'unchanged');
    }
    return html_build_select_box_from_arrays(util_result_column_to_array($result, 0), util_result_column_to_array($result, 1), $name, $checked_val, $show_100, $text_100, $show_any, $text_any, $show_unchanged, $text_unchanged, $purify_level, $show_unknown_value);
}
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:27,代码来源:html.php


示例19: support_header

//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
*/
echo '<H2>Browse Support Requests by</H2>
	<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="6"><FORM ACTION="' . $PHP_SELF . '" METHOD="GET">
	<INPUT TYPE="HIDDEN" NAME="group_id" VALUE="' . $group_id . '">
	<INPUT TYPE="HIDDEN" NAME="set" VALUE="custom">
	<TR><TD><b>Assigned User:</b></TD><TD><b>Status:</b></TD><TD><b>Category:</b></TD></TR>
	<TR><TD><FONT SIZE="-1">' . $tech_box . '</TD><TD><FONT SIZE="-1">' . support_status_box('_status', $_status, 'Any') . '</TD>' . '<TD><FONT SIZE="-1">' . support_category_box($group_id, $name = '_category', $_category, 'Any') . '</TD>' . '<TD><FONT SIZE="-1"><INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Browse"></TD></TR></FORM></TABLE>';
//echo "<p>$sql\n";
$result = db_query($sql, 51, $offset);
if ($result && db_numrows($result) > 0) {
    echo '
		<P>
		<h3>' . $statement . '</H3>
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:31,代码来源:browse_support.php


示例20: _

)
</span>
<p><?php 
echo _('Upload a new file');
?>
: <input type="file" name="userfile"
 size="30" /></p>
	  <?php 
if (forge_get_config('use_manual_uploads')) {
    echo '<p>';
    printf(_('Alternatively, you can use a file you already uploaded (by SFTP or SCP) to the <a href="%2$s">project\'s incoming directory</a> (%1$s).'), $incoming, "sftp://" . forge_get_config('web_host') . $incoming . "/");
    echo ' ' . _('This direct <tt>sftp://</tt> link only works with some browsers, such as Konqueror.') . '<br />';
    $manual_files_arr = ls($incoming, true);
    if (count($manual_files_arr) > 0) {
        echo _('Choose an already uploaded file:') . '<br />';
        echo html_build_select_box_from_arrays($manual_files_arr, $manual_files_arr, 'manual_filename', '');
    } else {
        echo '<input type="hidden" name="manual_filename" value="">';
    }
    ?>
	     </p>
	  <?php 
}
?>
<p><input type="checkbox" name="logo_nuke" value="1" /><?php 
echo _("… or delete the currently uploaded logo and revert to the site default");
?>
</p>
<p><input type="submit" name="logo_submit" value="<?php 
echo _("Upload new logo");
?>
开发者ID:pombredanne,项目名称:tuleap,代码行数:31,代码来源:plugin_admin.php



注:本文中的html_build_select_box_from_arrays函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP html_buildlist函数代码示例发布时间:2022-05-15
下一篇:
PHP html_build_select_box函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap