本文整理汇总了PHP中arraySelect函数的典型用法代码示例。如果您正苦于以下问题:PHP arraySelect函数的具体用法?PHP arraySelect怎么用?PHP arraySelect使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了arraySelect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addFilterCell
public function addFilterCell($label, $field, $values, $value)
{
$form = 'filter' . $this->count;
$this->addCell('<form action="?m=' . $this->module . '" method="post" name="' . $form . '" accept-charset="utf-8">' . arraySelect($values, $field, 'size="1" class="text" onChange="document.' . $form . '.submit();"', $value, false) . '</form>');
$this->addCell($this->_AppUI->_($label) . ':');
$this->count++;
}
示例2: showRow
function showRow($id = 0, $key = 0, $title = '', $value = '')
{
global $canEdit, $sysval_id, $CR, $AppUI, $keys;
$s = '<tr>' . $CR;
if ($sysval_id == $id && $canEdit) {
// edit form
$s .= '<form name="sysValFrm" method="post" action="?m=system&u=syskeys&a=do_sysval_aed">' . $CR;
$s .= '<input type="hidden" name="del" value="0" />' . $CR;
$s .= '<input type="hidden" name="sysval_id" value="' . $id . '" />' . $CR;
$s .= '<td> </td>';
$s .= '<td valign="top">' . arraySelect($keys, 'sysval_key_id', 'size="1" class="text"', $key) . '</td>';
$s .= '<td valign="top"><input type="text" name="sysval_title" value="' . dPformSafe($title) . '" class="text" /></td>';
$s .= '<td valign="top"><textarea name="sysval_value" class="small" rows="5" cols="40">' . $value . '</textarea></td>';
$s .= '<td><input type="submit" value="' . $AppUI->_($id ? 'edit' : 'add') . '" class="button" /></td>';
$s .= '<td> </td>';
} else {
$s .= '<td width="12" valign="top">';
if ($canEdit) {
$s .= '<a href="?m=system&u=syskeys&sysval_id=' . $id . '" title="' . $AppUI->_('edit') . '">' . dPshowImage('./images/icons/stock_edit-16.png', 16, 16, '') . '</a>';
$s .= '</td>' . $CR;
}
$s .= '<td valign="top">' . $keys[$key] . '</td>' . $CR;
$s .= '<td valign="top">' . dPformSafe($title) . '</td>' . $CR;
$s .= '<td valign="top" colspan="2">' . nl2br(dPformSafe($value)) . '</td>' . $CR;
$s .= '<td valign="top" width="16">';
if ($canEdit) {
$s .= '<a href="javascript:delIt(' . $id . ', \'' . addslashes(htmlentities($title)) . '\')" title="' . $AppUI->_('delete') . '">' . dPshowImage('./images/icons/stock_delete-16.png', 16, 16, '') . '</a>';
}
$s .= '</td>' . $CR;
}
$s .= '</tr>' . $CR;
return $s;
}
示例3: showRow
function showRow($id = 0, $key = 0, $title = '', $value = '')
{
global $canEdit, $sysval_id, $CR, $AppUI, $keys, $locale_char_set;
$s = '<tr>' . $CR;
if ($sysval_id == $id && $canEdit) {
// edit form
$s .= '<td>' . $CR;
$s .= '<input type="hidden" name="del" value="0" />' . $CR;
$s .= '<input type="hidden" name="sysval_id" value="' . $id . '" />' . $CR;
$s .= ' </td>';
$s .= '<td valign="top">' . arraySelect($keys, 'sysval_key_id', 'size="1" class="text"', $key) . '</td>';
$s .= '<td valign="top"><input type="text" name="sysval_title" value="' . dPformSafe($title) . '" class="text" /></td>';
$s .= '<td valign="top"><textarea name="sysval_value" class="small" rows="5" cols="40">' . htmlspecialchars($value, ENT_COMPAT, $locale_char_set) . '</textarea></td>';
$s .= '<td><input type="submit" value="' . $AppUI->_($id ? 'edit' : 'add') . '" class="button" /></td>';
$s .= '<td> </td>';
} else {
$s .= '<td width="12" valign="top">';
if ($canEdit) {
$s .= '<a href="?m=system&u=syskeys&sysval_id=' . $id . '" title="' . $AppUI->_('edit') . '">' . dPshowImage('./images/icons/stock_edit-16.png', 16, 16, '') . '</a>';
$s .= '</td>' . $CR;
}
$s .= '<td valign="top">' . $keys[$key] . '</td>' . $CR;
$s .= '<td valign="top">' . dPformSafe($title) . '</td>' . $CR;
$s .= '<td valign="top" colspan="2">' . htmlspecialchars($value, ENT_COMPAT, $locale_char_set) . '</td>' . $CR;
$s .= '<td valign="top" width="16">';
if ($canEdit) {
$s .= '<a href="javascript:delIt(' . $id . ')" title="' . $AppUI->_('delete') . '">' . dPshowImage('./images/icons/stock_delete-16.png', 16, 16, '') . '</a>';
}
$s .= '</td>' . $CR;
}
$s .= '</tr>' . $CR;
return $s;
}
示例4: _createCompanySelection
protected function _createCompanySelection($AppUI, $companyInput)
{
$company = new CCompany();
$companyMatches = $company->getCompanyList($AppUI, -1, $companyInput);
$company_id = count($companyMatches) == 1 ? $companyMatches[0]['company_id'] : $AppUI->user_company;
$companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$companies = arrayMerge(array('0' => ''), $companies);
$output .= '<td>' . arraySelect($companies, 'company_id', ' onChange=this.form.new_company.value=\'\'', $company_id) . '<input type="text" name="new_company" value="' . ($company_id > 0 ? '' : $companyInput) . '" />';
if ($company_id == 0) {
$output .= '<br /><em>' . $AppUI->_('compinfo') . '</em>';
}
$output .= '</td></tr>';
return $output;
}
示例5: arraySelectTree
function arraySelectTree(&$arr, $select_name, $select_attribs, $selected, $translate = false)
{
global $AppUI;
reset($arr);
$children = array();
// first pass - collect children
foreach ($arr as $k => $v) {
$id = $v[0];
$pt = $v[2];
$list = @$children[$pt] ? $children[$pt] : array();
array_push($list, $v);
$children[$pt] = $list;
}
$list = tree_recurse($arr[0][2], '', array(), $children);
return arraySelect($list, $select_name, $select_attribs, $selected, $translate);
}
示例6: w2PgetParam
$today = $ctoday->format(FMT_TIMESTAMP_DATE);
$date = w2PgetParam($_GET, 'date', $today);
// get the list of visible companies
$company = new CCompany();
$companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$companies = arrayMerge(array('0' => $AppUI->_('All')), $companies);
// setup the title block
$titleBlock = new CTitleBlock('Monthly Calendar', 'myevo-appointments.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=calendar&a=year_view&date=' . $date, 'year view');
$titleBlock->addCrumb('?m=calendar&date=' . $date, 'month view');
$titleBlock->addCrumb('?m=calendar&a=week_view&date=' . $date, 'week view');
$titleBlock->addCrumb('?m=calendar&a=day_view&date=' . $date, 'day view');
$titleBlock->addCell($AppUI->_('Company') . ':');
$titleBlock->addCell(arraySelect($companies, 'company_id', 'onChange="document.pickCompany.submit()" class="text"', $company_id), '', '<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" name="pickCompany" accept-charset="utf-8">', '</form>');
$titleBlock->addCell($AppUI->_('Event Filter') . ':');
$titleBlock->addCell(arraySelect($event_filter_list, 'event_filter', 'onChange="document.pickFilter.submit()" class="text"', $event_filter, true), '', '<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" name="pickFilter" accept-charset="utf-8">', '</form>');
$titleBlock->show();
?>
<script language="javascript" type="text/javascript">
function clickDay( uts, fdate ) {
window.location = './index.php?m=calendar&a=day_view&date='+uts+'&tab=0';
}
function clickWeek( uts, fdate ) {
window.location = './index.php?m=calendar&a=week_view&date='+uts;
}
</script>
<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td>
<?php
// establish the focus 'date'
示例7: arraySelect
/><label for="add_pwoid"><?php
echo $AppUI->_('Show Projects whose Owner is Member of the Dep.');
?>
?</label>
</form>
</td>
<td align="right" nowrap="nowrap">
<form action="?m=departments&a=view&dept_id=<?php
echo $dept_id;
?>
&tab=<?php
echo $tab;
?>
" method="post" name="pickProject" accept-charset="utf-8">
<?php
echo arraySelect($projFilter, 'proFilter', 'size=1 class=text onChange="document.pickProject.submit()"', $proFilter, true);
?>
</form>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="tbl">
<tr>
<?php
$fieldList = array('project_color_identifier', 'project_priority', 'project_name', 'company_name', 'project_start_date', 'project_duration', 'project_end_date', 'project_actual_end_date', 'task_log_problem', 'user_username', 'project_task_count', 'project_status');
$fieldNames = array('Color', 'P', 'Project Name', 'Company', 'Start', 'Duration', 'End', 'Actual', 'LP', 'Owner', 'Tasks', 'Status');
$baseUrl = '?m=' . $m . (isset($a) ? '&a=' . $a : '') . (isset($extraGet) ? $extraGet : '');
foreach ($fieldNames as $index => $name) {
?>
<th nowrap="nowrap">
<a href="<?php
示例8: dPformSafe
" /></td></tr>
<tr><td align='right'><?php
echo $AppUI->_('Resource Name');
?>
</td>
<td align='left'><input type='text' size="30" maxlength="255" name="resource_name"
value="<?php
echo dPformSafe($obj->resource_name);
?>
" /></td></tr>
<tr><td align='right'><?php
echo $AppUI->_('Type');
?>
</td>
<td align='left'><?php
echo arraySelect($typelist, 'resource_type', 'class=select', $obj->resource_type, true);
?>
</td></tr>
<tr><td align='right'><?php
echo $AppUI->_('Maximum Allocation Percentage');
?>
</td>
<td><input type='text' size="5" maxlength="5" value='<?php
if ($obj->resource_max_allocation) {
echo dPformSafe($obj->resource_max_allocation);
} else {
echo '100';
}
?>
'
name='resource_max_allocation'></td></tr>
示例9: arraySelect
<td align="center">
<select class="text" name="percentage_assignment" title="<?php
echo $AppUI->_('Assign with Percentage');
?>
">
<?php
for ($i = 0; $i <= 100; $i += 5) {
$selected = $i == 30 ? ' selected="selected"' : '';
echo "\t\t\t\t\t\t\t" . '<option value="' . $i . '"' . $selected . '>' . $i . '%</option>' . "\n";
}
?>
</select>
</td>
<td align="center">
<?php
echo arraySelect($taskPriority, 'user_task_priority', 'onchange="javascript:chPriority(' . $user_id . ');" size="1" class="text" title="' . $AppUI->_('Change User specific Task Priority of selected Tasks') . '"', 0, true);
?>
</td>
</tr></table>
<?php
$orphTasks = array_diff(array_map("getOrphanedTasks", $task_list), array(NULL));
$tmptasks = '';
$actual_date = $start_date;
$zi = 0;
foreach ($orphTasks as $task) {
$tmptasks .= displayTask($orphTasks, $task, 0, $display_week_hours, $sss, $sse, $user_id);
// do we need to get the children?
//$tmptasks.=doChildren($orphTasks,$task->task_id,$user_id,1,$max_levels,$display_week_hours,$sss,$sse);
}
echo $tmptasks . '</form>';
}
示例10: arraySelect
<input type='text' class='text' style='width:120px;text-align:right;' id='bulk_move_date' name='bulk_move_date' value='' />
</td>
<th width="15%"><?php
echo $AppUI->_('Other');
?>
</th>
<td width="130"><?php
echo arraySelect($sother, 'bulk_task_other', 'style="width:180px" class="text"', '');
?>
</td>
<th width="15%"><?php
echo $AppUI->_('Project');
?>
</th>
<td width="130"><?php
echo arraySelect($sprojects, 'bulk_task_project', 'style="width:300px" class="text"', '');
?>
</td>
<td width="100%"> </td>
</tr>
<tr>
<td colspan="20" align="right"><input type="button" class="button" value="<?php
echo $AppUI->_('update');
?>
" onclick="if (confirm('Are you sure you wish to apply the update(s) to the selected task(s)?')) document.frm_bulk.submit();" /></td>
</tr>
</table>
</form>
<?php
function getSpaces($amount)
示例11: arraySelect
echo $s;
}
$projectArray[$project_id] = $project_id;
}
}
}
if ($none) {
echo '<tr><td colspan="12">' . $AppUI->_('No projects available') . '</td></tr>';
} else {
?>
<tr>
<td colspan="12" align="right">
<?php
$s = '<input type="submit" class="button" value="' . $AppUI->_('Update projects status') . '" />';
$s .= '<input type="hidden" name="update_project_status" value="1" />';
$s .= '<input type="hidden" name="m" value="projects" />';
$s .= arraySelect($pstatus, 'project_status', 'size="1" class="text"', $project_status_filter + 1, true);
echo $s;
// 2 will be the next step
?>
</td>
</tr>
<?php
}
?>
</table>
</form>
<?php
if ($is_tabbed) {
echo buildPaginationNav($AppUI, $m, $currentTabId, $xpg_totalrecs, $xpg_pagesize, $page);
}
示例12: arraySelect
<form name="frmDel" action="./index.php?m=system" method="post" accept-charset="utf-8">
<input type="hidden" name="dosql" value="do_billingcode_aed" />
<input type="hidden" name="del" value="1" />
<input type="hidden" name="company_id" value="<?php
echo $company_id;
?>
" />
<input type="hidden" name="billingcode_id" value="" />
</form>
<table width="100%" border="0" cellpadding="1" cellspacing="1" class="std">
<tr>
<td>
<form name="changeMe" action="./index.php?m=system&a=billingcode" method="post" accept-charset="utf-8">
<?php
echo arraySelect($company_list, 'company_id', 'size="1" class="text" onchange="changeIt();"', $company_id, false);
?>
</form>
</td>
</tr>
<tr>
<th width="40">
<form name="changeuser" action="./index.php?m=system" method="post" accept-charset="utf-8">
<input type="hidden" name="dosql" value="do_billingcode_aed" />
<input type="hidden" name="del" value="0" />
<input type="hidden" name="company_id" value="<?php
echo $company_id;
?>
" />
<input type="hidden" name="billingcode_status" value="0" />
</th>
示例13: foreach
$titleBlock->addCrumb('?m=system&a=addeditpref', 'default user preferences');
$titleBlock->show();
// prepare the automated form fields based on db system configuration data
$output = null;
$last_group = '';
foreach ($rs as $c) {
$tooltip = $AppUI->_($c['config_name'] . '_tooltip');
// extraparse the checkboxes and the select lists
$extra = '';
$value = '';
switch ($c['config_type']) {
case 'select':
// Build the select list.
if ($c['config_name'] == 'system_timezone') {
$timezones = w2PgetSysVal('Timezones');
$entry = arraySelect($timezones, 'w2Pcfg[system_timezone]', 'class=text size=1', w2PgetConfig('system_timezone'), true);
} else {
$entry = '<select class="text" name="w2Pcfg[' . $c['config_name'] . ']">';
// Find the detail relating to this entry.
$children = $w2Pcfg->getChildren($c['config_id']);
foreach ($children as $child) {
$entry .= '<option value="' . $child['config_list_name'] . '"';
if ($child['config_list_name'] == $c['config_value']) {
$entry .= ' selected="selected"';
}
$entry .= '>' . $AppUI->_($child['config_list_name'] . '_item_title') . '</option>';
}
$entry .= '</select>';
}
break;
case 'checkbox':
示例14: array
<tr>
<td align="right"><?php
echo $AppUI->_('Postcode') . ' / ' . $AppUI->_('Zip Code');
?>
:</td>
<td colspan="2"><input type="text" class="text" name="contact_zip" value="" maxlength="50" size="40" /> </td>
</tr>
<tr>
<td align="right"><?php
echo $AppUI->_('Country');
?>
:</td>
<td colspan="2">
<?php
$countries = array('' => $AppUI->_('(Select a Country)')) + w2PgetSysVal('GlobalCountries');
echo arraySelect($countries, 'contact_country', 'size="1" class="text"', 0);
?>
</td>
</tr>
<tr>
<td valign="middle" align="right">* <?php
echo $AppUI->_('Anti Spam Security');
?>
:</td>
<td valign="middle" width="50"><input type="text" class="text" id="spam" name="spam_check" value="" maxlength="5" size="5" /></td>
<td valign="middle" align="left"><img src="<?php
echo W2P_BASE_URL;
?>
/lib/captcha/CaptchaImage.php?uid=54;<?php
echo $uid;
?>
示例15: w2p_Utilities_Date
$last_time->setTime(23, 59, 59);
$prev_day = new w2p_Utilities_Date(Date_calc::prevDay($dd, $mm, $yy, FMT_TIMESTAMP_DATE));
$next_day = new w2p_Utilities_Date(Date_calc::nextDay($dd, $mm, $yy, FMT_TIMESTAMP_DATE));
// get the list of visible companies
$company = new CCompany();
global $companies;
$companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$companies = arrayMerge(array('0' => $AppUI->_('All')), $companies);
// setup the title block
$titleBlock = new CTitleBlock('Day View', 'myevo-appointments.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=calendar&a=year_view&date=' . $this_day->format(FMT_TIMESTAMP_DATE), 'year view');
$titleBlock->addCrumb('?m=calendar&date=' . $this_day->format(FMT_TIMESTAMP_DATE), 'month view');
$titleBlock->addCrumb('?m=calendar&a=week_view&date=' . $this_week, 'week view');
$titleBlock->addCrumb('?m=calendar&a=day_view&date=' . $this_day->format(FMT_TIMESTAMP_DATE), 'day view');
$titleBlock->addCell($AppUI->_('Company') . ':');
$titleBlock->addCell(arraySelect($companies, 'company_id', 'onChange="document.pickCompany.submit()" class="text"', $company_id), '', '<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" name="pickCompany" accept-charset="utf-8">', '</form>');
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new event') . '">', '', '<form action="?m=calendar&a=addedit&date=' . $this_day->format(FMT_TIMESTAMP_DATE) . '" method="post" accept-charset="utf-8">', '</form>');
$titleBlock->show();
?>
<script language="javascript">
function clickDay( idate, fdate ) {
window.location = './index.php?m=calendar&a=day_view&date='+idate+'&tab=0';
}
</script>
<table class="std" width="100%" cellspacing="0" cellpadding="4">
<tr>
<td valign="top">
<table border="0" cellspacing="1" cellpadding="2" width="100%" class="motitle">
<tr>
<td>