当前位置: 首页>>代码示例>>PHP>>正文


PHP print_label函数代码示例

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


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

示例1: print_select

 } else {
     $table->data[2][1] = print_select($companies, 'inventory_companies', NULL, '', '', '', true, false, false, __('Associated companies'));
     $table->data[2][2] = print_select($users, 'inventory_users', NULL, '', '', '', true, false, false, __('Associated users'));
 }
 $objects_type = get_object_types();
 if ($id_object_type == 0) {
     $disabled = false;
 } else {
     $disabled = true;
 }
 if ($write_permission || !$id) {
     $table->data[3][0] = print_label(__('Object type'), '', '', true);
     $table->data[3][0] .= print_select($objects_type, 'id_object_type', $id_object_type, 'show_fields();', 'Select', '', true, 0, true, false, $disabled);
 } else {
     $object_name = get_db_value('name', 'tobject_type', 'id', $id_object_type);
     $table->data[3][0] = print_label(__('Object type'), '', '', true, $object_name);
     //show object hidden
     echo '<div id="show_object_fields_hidden" style="display:none;">';
     print_input_text('show_object_hidden', 1);
     echo '</div>';
     //id_object_type hidden
     echo '<div id="id_object_type_hidden" style="display:none;">';
     print_input_text('id_object_type_hidden', $id_object_type);
     echo '</div>';
 }
 $table->data[3][1] = print_input_text('receipt_date', $receipt_date, '', 15, 15, true, __('Receipt date'));
 $table->data[3][2] = print_input_text('issue_date', $issue_date, '', 15, 15, true, __('Removal date'));
 /* Fourth row */
 $table->colspan[4][0] = 3;
 $table->data[4][0] = "";
 /* Fifth row */
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:inventory_detail.php

示例2: get_invoice_irpf

	foreach ( $tax as $key => $campo) { 
		$result = $result + $campo;
		$contador++;
	}
	$tax = $result;
	$irpf = get_invoice_irpf($id_invoice);
	//~ Descuento sobre el total
	$before_amount = $amount * ($discount_before/100);
	$total_before = round($amount - $before_amount, 2);
	//~ Se aplica sobre el descuento los task 
	$tax_amount = $total_before * ($tax/100);
	//~ Se aplica sobre el descuento el irpf
	$irpf_amount = $total_before * ($irpf/100);
	$total = round($total_before + $tax_amount - $irpf_amount, 2);
	$table->data[15][0] = print_label(__('Total amount: ').format_numeric($total,2).' '.$invoice['currency'], 'total_amount', 'text', true);
	$table->data[15][1] = print_label(__('Total amount without taxes or discounts: ').format_numeric($amount,2).' '.$invoice['currency'], 'total_amount_without_taxes', 'text', true);
}


$table->colspan[16][0] = 2;
$table->data[16][0] = print_textarea ('description', 5, 40, $description, '', true, __('Description'));

$table->colspan[17][0] = 2;
$table->data[17][0] = print_textarea ('internal_note', 5, 40, $internal_note, '', true, __('Internal note'));

echo '<form id="form-invoice" method="post" enctype="multipart/form-data"
action="index.php?sec=customers&sec2=operation/companies/company_detail
&view_invoice=1&op=invoices&id_invoice='.$id_invoice.'">';

print_table ($table);
开发者ID:keunes,项目名称:integriaims,代码行数:30,代码来源:invoices.php

示例3: incidents_hours_to_dayminseg

	$table->data[1][0] .= "<input type='text' name='min_response' id='text-min_response' value='$min_response' size='5' maxlenght='100' onChange='hours_to_dms(\"min\")'>";
		
	$min_response_time = incidents_hours_to_dayminseg ($min_response);
	$table->data[1][0] .= print_input_text ('min_response_time', $min_response_time, '',
		7, 100, true, '', true);

	$table->data[1][1] = print_label(__('Max. resolution time (in hours)'), '', 'text', true);
	$table->data[1][1] .= "<input type='text' name='max_response' id='text-max_response' value='$max_response' size='5' maxlenght='100' onChange='hours_to_dms(\"max\")'>";
	$max_response_time = incidents_hours_to_dayminseg ($max_response);
	$table->data[1][1] .= print_input_text ('max_response_time', $max_response_time, '',
		7, 100, true, '', true);

	$table->data[1][2] = print_input_text ("max_incidents", $max_incidents, '',
		5, 100, true, __('Max. tickets at the same time'));

	$table->data[1][3] = print_label(__('Max. ticket inactivity (in hours)'), '', 'text', true);
	$table->data[1][3] .= "<input type='text' name='max_inactivity' id='text-max_inactivity' value='$max_inactivity' size='5' maxlenght='100' onChange='hours_to_dms(\"inactivity\")'>";
	$max_inactivity_time = incidents_hours_to_dayminseg ($max_inactivity);
	$table->data[1][3] .= print_input_text ('max_inactivity_time', $max_inactivity_time, '',
		7, 100, true, '', true);
		

	$table->data[2][0] = print_input_text ('time_from', $time_from, '',
		5, 10, true, __('Start hour to compute SLA'));
	$table->data[2][1] = print_input_text ('time_to', $time_to, '',
		5, 10, true, __('Last hour to compute SLA'));		
		
	$table->data[2][2] = print_checkbox ('five_daysonly', 1 ,$five_daysonly, true, __('Disable SLA on weekends'));

	$table->data[2][3] = print_checkbox ('no_holidays', 1 ,$no_holidays, true, __('Disable SLA on holidays'));
开发者ID:articaST,项目名称:integriaims,代码行数:30,代码来源:sla_detail.php

示例4: get_object_types

		//field object types
		$select_object = '<div class = "divform">';
			$select_object .= '<table class="search-table"><tr><td>';
				$objects_type = get_object_types ();
				$objects_type[-1] = __('All');
				$select_object .= print_label (__('Object type'), '','',true);
				$select_object .= print_select($objects_type, 'id_object_type_search', $params['id_object_type_search'], 'change_object_type();', '', '', true, 4, false, false, false, '');
			$select_object .= '</td></tr></table>';
		$select_object .= '</div>';
		
		print_container_div("inventory_type_object",__("Select type object").print_help_tip (__("Select ALL to see all objects"), true),$select_object, 'open', false, false);

		//field label object types
		$select_label_object = '<div class = "divform" id = "pr">';
			$select_label_object .= '<table class="search-table"><tr><td>';
				$select_label_object .= print_label (__('Object fields').'<span id="object_fields_select_all"><a href="javascript: select_all_object_field()" >'.__('Select all').'</a><span>', '','',true);
				$select_label_object .= '<div id = "object_fields_search_check" class="div_multiselect" >';
				//checkbox id
				if ($params['object_fields'][0]){
					$select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[0]" checked value="id" id="id"><label for="id">'.__('ID').'</label>';
				} else {
					$select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[0]" value="id" id="id"><label for="id">'.__('ID').'</label>';
				}

				//checkbox name
				if ($params['object_fields'][1]){	
					$select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[1]" checked value="name" id="name"><label for="name">'.__('Name').'</label>';
				} else {
					$select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[1]" value="name" id="name"><label for="name">'.__('Name').'</label>';
				}
开发者ID:articaST,项目名称:integriaims,代码行数:30,代码来源:inventory_search.php

示例5: IN

    if ($associated_user != '') {
        $sql_search .= " AND tinventory.id IN (SELECT id_inventory FROM tinventory_acl WHERE `type`='user' AND id_reference='{$associated_user}')";
        $sql_search_count .= " AND tinventory.id IN (SELECT id_inventory FROM tinventory_acl WHERE `type`='user' AND id_reference='{$associated_user}')";
        $params .= "&associated_user={$associated_user}";
    }
}
if (!$clean_output) {
    echo '<form id="tree_search" method="post" action="index.php?sec=inventory&sec2=operation/inventories/inventory">';
    $table_search->class = 'search-table';
    $table_search->width = '98%';
    $table_search->data = array();
    $table_search->data[0][0] = print_input_text('search_free', $search_free, '', 40, 128, true, __('Search'));
    $objects_type = get_object_types();
    $table_search->data[0][1] = print_label(__('Object type'), '', '', true);
    $table_search->data[0][1] .= print_select($objects_type, 'id_object_type_search', $id_object_type, 'show_type_fields();', 'Select', '', true, 0, true, false, false, 'width: 200px;');
    $table_search->data[0][2] = print_label(__('Object fields'), '', '', true);
    $table_search->data[0][2] .= print_select($object_fields, 'object_fields_search[]', '', '', 'Select', '', true, 4, true, false, false, 'width: 200px;');
    $params_assigned['input_id'] = 'text-owner';
    $params_assigned['input_name'] = 'owner';
    $params_assigned['input_value'] = $owner;
    $params_assigned['title'] = 'Owner';
    $params_assigned['return'] = true;
    $table_search->data[1][0] = user_print_autocomplete_input($params_assigned);
    $contracts = get_contracts();
    $manufacturers = get_manufacturers();
    $table_search->data[1][1] = print_select($contracts, 'id_contract', $id_contract, '', __('None'), 0, true, false, false, __('Contract'), '', 'width: 200px;');
    $table_search->data[1][2] = print_select($manufacturers, 'id_manufacturer', $id_manufacturer, '', __('None'), 0, true, false, false, __('Manufacturer'), '', 'width: 200px;');
    $table_search->data[1][3] = print_checkbox_extended('last_update', 1, $last_update, false, '', '', true, __('Last updated'));
    $buttons = '<div style=" text-align: right;">';
    $buttons .= print_input_hidden('search', 1, true);
    $buttons .= print_input_hidden('mode', $mode, true);
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:inventory_search.php

示例6: combo_project_user

function combo_project_user($actual, $id_user, $disabled = 0, $return = false)
{
    $output = '';
    if ($disabled) {
        $output .= print_label(__('Project'), '', '', true);
        $name = get_db_value('name', 'tproject', 'id', $actual);
        if ($name === false) {
            $name = __('N/A');
        }
        $output .= $name;
        if ($return) {
            return $output;
        }
        echo $output;
        return;
    }
    $values = array();
    $values[0] = __('N/A');
    $sql = sprintf('SELECT tproject.id, tproject.name as pname 
			FROM tproject, ttask, trole_people_task
			WHERE ttask.id_project = tproject.id AND tproject.disabled = 0 AND ttask.id = trole_people_task.id_task
			AND trole_people_task.id_user = "%s"
			ORDER BY pname', $id_user);
    $projects = get_db_all_rows_sql($sql);
    if ($projects === false) {
        $projects = array();
    }
    foreach ($projects as $project) {
        $values[$project['id']] = $project['pname'];
    }
    $output = print_select($values, 'id_project', $actual, '', '', 0, true, false, false, __('Project'));
    if ($return) {
        return $output;
    }
    echo $output;
    return;
}
开发者ID:keunes,项目名称:integriaims,代码行数:37,代码来源:functions_form.php

示例7: get_db_row_filter

        }
    }
}
if ($id_field) {
    $field_data = get_db_row_filter('tuser_field', array('id' => $id_field));
    $label = $field_data['label'];
    $type = $field_data['type'];
    $combo_value = $field_data['combo_value'];
}
echo '<h1>' . __('User fields editor') . '</h1>';
$table->width = "99%";
$table->class = "search-table-button";
$table->data = array();
$table->data[0][0] = print_input_text('label', $label, '', 45, 100, true, __('Field name'));
$types = array('text' => __('Text'), 'textarea' => __('Textarea'), 'combo' => __('Combo'));
$table->data[0][1] = print_label(__("Type"), "label-id", 'text', true);
$table->data[0][1] .= print_select($types, 'type', $type, '', __('Select type'), '0', true);
$table->data['id_combo_value'][0] = print_input_text('combo_value', $combo_value, '', 45, 100, true, __('Combo value')) . print_help_tip(__("Set values separated by comma"), true);
if (!$id_field) {
    $button = print_input_hidden('add_field', 1, true);
    $button .= print_submit_button(__('Create'), 'create_btn', false, 'class="sub next"', true);
} else {
    $button = print_input_hidden('update_field', 1, true);
    $button .= print_input_hidden('add_field', 0, true);
    $button .= print_input_hidden('id_field', $id_field, true);
    $button .= print_submit_button(__('Update'), 'update_btn', false, 'class="sub upd"', true);
}
$table->data['button'][0] = $button;
$table->colspan['button'][0] = 3;
echo '<form method="post" action="index.php?sec=users&sec2=godmode/usuarios/user_field_editor">';
print_table($table);
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:user_field_editor.php

示例8: round

$a = round ($hours);
$b = round (get_task_workunit_hours ($id_task));

$image = histogram_2values($a, $b, $labela, $labelb);
$table_advanced->data[0][1] = print_label (__('Estimated hours'), '', '', true, $image);

$labela = __('Total');
$labelb = __('Imp');
$a = round (task_workunit_cost ($id_task, 0));
$b = round (task_workunit_cost ($id_task, 1));
$image = histogram_2values($a, $b, $labela, $labelb);
$table_advanced->data[0][1] .= print_label (__('Imputable estimation'), '', '', true, $image);	

$labela = __('Est.');
$labelb = __('Real');
$a = $estimated_cost;
$b = round (task_workunit_cost ($id_task, 1));
$image = histogram_2values($a, $b, $labela, $labelb);
$table_advanced->data[0][1] .= print_label (__('Cost estimation'), '', '', true, $image);	

//Workload distribution chart
$image = graph_workunit_task (200, 170, $id_task, true);
$image = '<div class="graph_frame">' . $image . '</div>';
$table_advanced->data[0][2] = print_label (__('Workunit distribution'), '', '', true, $image);

$table->colspan['row_task_stats'][0] = 3;
$table->data['row_task_stats'][0] = print_container_div('task_stats', __('Task statitics'), print_table($table_advanced, true), 'open', true, true);	

print_table ($table);

?>
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:task_report.php

示例9: print_input_text_extended

	
	$table->data[0][1] = print_input_text_extended ('owner_search', $owner, 'text-user', '', 21, 30, false, '',
			array(), true, '', __('Owner'). print_help_tip (__("Type at least two characters to search"), true));

	$table->data[0][2] =  print_checkbox ("show_100_search", 1, $show_100, true, __("Show finished leads"));


	$table->data[1][0] = print_input_text ("country_search", $country, "", 21, 100, true, __('Country'));

	$table->data[1][1] = print_input_text ("est_sale_search", $est_sale, "", 21, 100, true, __('Estimated Sale'));
	
	$table->data[1][2] =  print_checkbox ("show_not_owned_search", 1, $show_not_owned, true, __("Show not owned leads"));

	
	$tag_editor_props = array('name' => 'tags', 'selected_tags' => $tags);
	$table->data['tags'][0] = print_label (__('Tags'), '', 'select', true);
	$table->data['tags'][0] .= html_render_tags_editor($tag_editor_props, true); 
	
	//~ $table_advanced->class = 'search-table';
	//~ $table_advanced->style = array ();
	//~ $table_advanced->style[0] = 'font-weight: bold;';
	//~ $table_advanced->data = array ();
	//~ $table_advanced->width = "99%";
	//~ $table_advanced->colspan = array();
	//~ $table_advanced->colspan[1][1] = 2;
	$table_advanced = '<tr>';
	$params = array();
	$params['input_id'] = 'id_company_search';
	$params['input_name'] = 'id_company_search';
	$params['input_value'] = $id_company;
	$params['title'] = __('Managed by');
开发者ID:articaST,项目名称:integriaims,代码行数:30,代码来源:lead_detail.php

示例10: combo_task_user_manager

} else {
    $combo_none = false;
}
$table->data[0][2] = combo_task_user_manager($config['id_user'], $parent, true, __('Parent'), 'parent', $combo_none, false, $id_project, $id_task);
$table->data[1][0] = print_input_text('start_date', $start, '', 15, 15, true, __('Start'));
$table->data[1][1] = print_input_text('end_date', $end, '', 15, 15, true, __('End'));
$table->data[1][2] = print_select(get_periodicities(), 'periodicity', $periodicity, '', __('None'), 'none', true, false, false, __('Recurrence'));
$table->data[2][0] = print_input_text('hours', $hours, '', 5, 5, true, __('Estimated hours'));
$table->data[2][0] .= "&nbsp;&nbsp;<a href='javascript: show_calculation();'>" . print_image('images/play.gif', true, array('title' => __('Calculate hours'))) . "</a>";
$table->data[2][1] = print_input_text('estimated_cost', $estimated_cost, '', 7, 11, true, __('Estimated cost'));
$table->data[2][1] .= ' ' . $config['currency'];
$table->data[2][2] = print_checkbox_extended('count_hours', 1, $count_hours, false, '', '', true, __('Completion based on hours')) . print_help_tip(__("Calculated task completion using workunits inserted by project members, if not it uses Completion field of this form"), true);
$table->data[3][0] = print_input_text('cc', $cc, '', 60, 240, true, __('CC') . print_help_tip(__("Email to notify changes in workunits"), true));
$table->colspan[4][0] = 3;
$completion_label = __('Completion') . " <em>(<span id=completion>" . $completion . "%</span>)</em>";
$table->data[4][0] = print_label($completion_label, '', '', true, '<div id="slider" style="margin-top: 5px;"><div class="ui-slider-handle"></div></div>');
$table->data[4][0] .= print_input_hidden('completion', $completion, true);
//////TABLA ADVANCED
$table_advanced->width = '98%';
$table_advanced->class = 'search-table';
$table_advanced->size = array();
$table_advanced->size[0] = '33%';
$table_advanced->size[1] = '33%';
$table_advanced->size[2] = '33%';
$table_advanced->style = array();
$table_advanced->data = array();
$links_1 = projects_get_task_links($id_project, $id_task, 1);
$hint = print_help_tip(__("The task cannot start before all tasks in this section start"), true);
$table_advanced->data[0][0] = print_select($links_1, 'link_1', NULL, '', '', '', true, false, false, __('Start to start') . $hint);
$table_advanced->data[0][0] .= "&nbsp;&nbsp;<a href='javascript: show_task_link_selector(1," . $id_project . "," . $id_task . ");'>" . print_image('images/add.png', true, array('title' => __('Add'))) . "</a>";
$table_advanced->data[0][0] .= "&nbsp;&nbsp;<a href='javascript: remove_link(1);'>" . print_image('images/cross.png', true, array('title' => __('Remove'))) . "</a>";
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:task_detail.php

示例11: print_label

    $output .= print_label(__('Serial number') . ': ', '', '', true, $filter['serial_number']) . '<br />';
}
if ($filter['part_number'] != '') {
    $output .= print_label(__('Part number') . ': ', '', '', true, $filter['part_number']) . '<br />';
}
if ($filter['ip_address'] != '') {
    $output .= print_label(__('IP address') . ': ', '', '', true, $filter['ip_address']) . '<br />';
}
if ($filter['id_building'] != 0) {
    $output .= print_label(__('Building') . ': ', '', '', true, get_db_value('name', 'tbuilding', 'id', $filter['id_building'])) . '<br />';
}
if ($filter['id_company'] != 0) {
    $output .= print_label(__('Company') . ': ', '', '', true, get_db_value('name', 'tcompany', 'id', $filter['id_company'])) . '<br />';
}
if ($filter['id_contract'] != 0) {
    $output .= print_label(__('Contract') . ': ', '', '', true, get_db_value('name', 'tcontract', 'id', $filter['id_contract'])) . '<br />';
}
$output .= '</div>';
echo '<div class="report_info" style="text-align: left; width: 95%">';
if ($output != '') {
    echo $output;
} else {
    echo __('All inventory');
}
echo '</div>';
// Build object tree
$tree = array();
$tree_root = array();
foreach ($inventories as $inventory) {
    $id = $inventory['id'];
    $id_parent = $inventory['id_parent'];
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:inventories_html.php

示例12: print_field

function print_field($field)
{
    // Container
    $html = "\t" . '<div class="field clearfix' . (isset($field['class']) ? ' ' . $field['class'] : ' ' . $field['name']) . (isset($field['error']) && $field['error'] != '' ? ' error' : '') . '">' . "\n";
    $labelHTML = '';
    $inputHTML = '';
    $errorHTML = '';
    // Label
    if (isset($field['label']) && $field['label'] != '') {
        $label = array();
        $label['label'] = $field['label'];
        if (isset($field['labelFor'])) {
            $label['labelFor'] = $field['labelFor'];
        } else {
            if (isset($field['id'])) {
                $label['labelFor'] = $field['id'];
            }
        }
        $label['labelClass'] = $field['type'] . '_label';
        if (isset($field['labelClass'])) {
            $label['labelClass'] .= ' ' . $field['labelClass'];
        }
        if (isset($field['hint'])) {
            $label['hint'] = $field['hint'];
        }
        if (isset($field['mandatory'])) {
            $label['mandatory'] = $field['mandatory'];
        }
        $labelHTML .= print_label($label);
    }
    if (isset($field['mandatory']) && $field['mandatory']) {
        if (isset($field['placeholder'])) {
            $field['placeholder'] .= ' *';
        }
        if (isset($field['label'])) {
            $field['label'] .= ' *';
        }
    }
    // Input element
    switch ($field['type']) {
        case 'hidden':
            $input = array('name' => $field['name'], 'id' => isset($field['id']) ? $field['id'] : '', 'value' => isset($field['value']) ? $field['value'] : '');
            $inputHTML = print_input_hidden($input);
            break;
        case 'text':
            $input = array('name' => $field['name'], 'id' => isset($field['id']) ? $field['id'] : '', 'value' => isset($field['value']) ? $field['value'] : '', 'placeholder' => isset($field['placeholder']) ? $field['placeholder'] : '', 'tabindex' => isset($field['tabindex']) ? $field['tabindex'] : '');
            $inputHTML = print_input_text($input);
            break;
        case 'textarea':
            $input = array('name' => $field['name'], 'id' => isset($field['id']) ? $field['id'] : '', 'value' => isset($field['value']) ? $field['value'] : '', 'placeholder' => isset($field['placeholder']) ? $field['placeholder'] : '', 'tabindex' => isset($field['tabindex']) ? $field['tabindex'] : '');
            $inputHTML = print_input_textarea($input);
            break;
        case 'xhtml_textarea':
            $input = array('name' => $field['name'], 'id' => isset($field['id']) ? $field['id'] : '', 'value' => isset($field['value']) ? $field['value'] : '', 'placeholder' => isset($field['placeholder']) ? $field['placeholder'] : '', 'tabindex' => isset($field['tabindex']) ? $field['tabindex'] : '');
            $inputHTML = print_input_xhtml_textarea($input);
            break;
        case 'select':
            if (!$field['mandatory']) {
                $field['options'] = array('' => 'Select from the list') + $field['options'];
            }
            $input = array('name' => $field['name'], 'id' => isset($field['id']) ? $field['id'] : '', 'label' => $label, 'value' => isset($field['value']) ? $field['value'] : '', 'tabindex' => isset($field['tabindex']) ? $field['tabindex'] : '', 'options' => $field['options']);
            $inputHTML = print_input_select($input);
            break;
        case 'multiselect':
            $input = array('name' => $field['name'], 'id' => isset($field['id']) ? $field['id'] : '', 'label' => $label, 'value' => isset($field['value']) ? $field['value'] : '', 'tabindex' => isset($field['tabindex']) ? $field['tabindex'] : '', 'options' => $field['options']);
            $inputHTML = print_input_multiselect($input);
            break;
        case 'checkbox':
            foreach ($field['options'] as $option => $label) {
                $input = array('name' => $field['name'], 'id' => isset($field['id']) ? $field['id'] : '', 'label' => $label, 'checked' => isset($field['checked']) && $field['checked'] ? TRUE : FALSE, 'value' => $option, 'tabindex' => isset($field['tabindex']) ? $field['tabindex'] : '');
                $inputHTML = print_input_checkbox($input);
            }
            break;
        case 'multicheckbox':
            foreach ($field['options'] as $option => $label) {
                $input = array('name' => $field['name'] . '[]', 'id' => (isset($field['id']) ? $field['id'] : '') . '_' . $option, 'label' => $label, 'checked' => isset($field['value']) && $field['value'] != '' && in_array($option, $field['value']) ? TRUE : FALSE, 'value' => $option, 'tabindex' => isset($field['tabindex']) ? $field['tabindex'] : '');
                $inputHTML .= print_input_multicheckbox($input);
            }
            break;
        case 'radio':
            foreach ($field['options'] as $option => $label) {
                $input = array('name' => $field['name'], 'id' => (isset($field['id']) ? $field['id'] : '') . '_' . $option, 'label' => $label, 'checked' => isset($field['value']) && $field['value'] == $option ? TRUE : FALSE, 'value' => $option, 'tabindex' => isset($field['tabindex']) ? $field['tabindex'] : '');
                $inputHTML .= print_input_radio($input);
            }
            break;
        case 'image_upload':
            $input = array('name' => $field['name'], 'id' => isset($field['id']) ? $field['id'] : '', 'value' => isset($field['value']) ? $field['value'] : '', 'tabindex' => isset($field['tabindex']) ? $field['tabindex'] : '');
            $inputHTML = print_input_image_upload($input);
            break;
        case 'file_upload':
            $input = array('name' => $field['name'], 'id' => isset($field['id']) ? $field['id'] : '', 'value' => isset($field['value']) ? $field['value'] : '', 'tabindex' => isset($field['tabindex']) ? $field['tabindex'] : '');
            $inputHTML = print_input_file_upload($input);
            break;
        case 'gallery':
            $input = array('name' => $field['name'], 'id' => isset($field['id']) ? $field['id'] : '', 'value' => isset($field['value']) ? $field['value'] : '', 'tabindex' => isset($field['tabindex']) ? $field['tabindex'] : '', 'attachs' => $field['attachs']);
            $inputHTML = print_input_gallery($input);
            break;
        case 'password':
            $input = array('name' => $field['name'], 'id' => isset($field['id']) ? $field['id'] : '', 'value' => isset($field['value']) ? $field['value'] : '', 'placeholder' => isset($field['placeholder']) ? $field['placeholder'] : '', 'tabindex' => isset($field['tabindex']) ? $field['tabindex'] : '');
            $inputHTML = print_input_password($input);
//.........这里部分代码省略.........
开发者ID:VeronaFabLabRepo,项目名称:comune-grezzana-app-backend,代码行数:101,代码来源:print_field_helper.php

示例13: process_sql

    $res = process_sql($sql);
    $valid = true;
    if ($res) {
        $valid = false;
    }
    echo json_encode(array("result" => $valid));
    exit;
}
if ($get_calculator) {
    $days = get_parameter('days', 0);
    $people = get_parameter('people', 0);
    $hours_per_day = $config['hours_perday'];
    $total = $days * $people * $hours_per_day;
    $table->width = "99%";
    $table->class = "search-table-button";
    $table->data = array();
    $table->colspan = array();
    $table->colspan[3][1] = 2;
    $table->data[0][0] = print_label(__('Days'), '', 'text', true);
    $table->data[0][1] = print_input_text('days', $days, '', 15, 15, true);
    $table->data[1][0] = print_label(__('People'), '', 'text', true);
    $table->data[1][1] = print_input_text('people', $people, '', 15, 15, true);
    $table->data[2][0] = print_label(__('Total hours'), '', 'text', true);
    $table->data[2][1] = print_input_text('total', $total, '', 15, 15, true, '', true);
    $table->data[3][1] = print_submit_button(__('Set value'), 'set_value', false, 'class="sub upd"', true);
    $table->data[3][1] .= print_submit_button(__('Calculate'), 'calculate', false, 'class="sub search"', true);
    '<form id="calculator_form">';
    print_table($table, false);
    '</form>';
    exit;
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:projects.php

示例14: combo_project_user

function combo_project_user($actual, $id_user, $disabled = 0, $return = false, $full_report = false, $start_date = null, $end_date = null, $user_id = false)
{
    $output = '';
    global $config;
    if ($disabled) {
        $output .= print_label(__('Project'), '', '', true);
        $name = get_db_value('name', 'tproject', 'id', $actual);
        if ($name === false) {
            $name = __('N/A');
        }
        $output .= $name;
        if ($return) {
            return $output;
        }
        echo $output;
        return;
    }
    $values = array();
    $values[0] = __('N/A');
    if ($full_report == 100) {
        if ($user_id != "") {
            $user_search = " AND tworkunit.id_user = '" . $user_id . "'";
        } else {
            $user_search = "";
        }
        if (dame_admin($config["id_user"]) or $config["id_user"] == $user_id) {
            $sql = sprintf('SELECT tproject.id as id, tproject.name as name
				FROM tproject, ttask, tworkunit_task, tworkunit
				WHERE tworkunit_task.id_workunit = tworkunit.id ' . $user_search . '
				AND tworkunit_task.id_task = ttask.id
				AND ttask.id_project = tproject.id
				AND tworkunit.timestamp >= "%s"
				AND tworkunit.timestamp <= "%s"
				GROUP BY tproject.name', $start_date, $end_date);
        } else {
            $sql = sprintf('SELECT tproject.id as id, tproject.name as name
				FROM tproject, ttask, tworkunit_task, tworkunit
				WHERE tworkunit_task.id_workunit = tworkunit.id ' . $user_search . '
				AND tworkunit_task.id_task = ttask.id
				AND ttask.id_project = tproject.id
				AND tworkunit.timestamp >= "%s"
				AND tworkunit.timestamp <= "%s"
				AND tproject.id_owner = "%s" 
				GROUP BY tproject.name', $start_date, $end_date, $config["id_user"]);
        }
    } else {
        $sql = sprintf('SELECT tproject.id, tproject.name as name 
			FROM tproject, ttask, trole_people_task
			WHERE ttask.id_project = tproject.id AND tproject.disabled = 0 AND ttask.id = trole_people_task.id_task
			AND trole_people_task.id_user = "%s"
			ORDER BY pname', $id_user);
    }
    $projects = get_db_all_rows_sql($sql);
    if ($projects === false) {
        $projects = array();
    }
    foreach ($projects as $project) {
        $values[$project['id']] = $project['name'];
    }
    $output = print_select($values, 'id_project', $actual, '', '', 0, true, false, false, __('Project'));
    if ($return) {
        return $output;
    }
    echo $output;
    return;
}
开发者ID:articaST,项目名称:integriaims,代码行数:66,代码来源:functions_form.php

示例15: form_inventory

function form_inventory($params)
{
    //field label object types
    $select_label_object = '<div class = "divform" id = "pr">';
    $select_label_object .= '<table class="search-table"><tr><td>';
    $select_label_object .= print_label(__('Object fields') . '<span id="object_fields_select_all"><a href="javascript: select_all_object_field()" >' . __('Select all') . '</a><span>', '', '', true);
    $select_label_object .= '<div id = "object_fields_search_check" class="div_multiselect" >';
    //checkbox id
    if ($params['object_fields'][0]) {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[0]" checked value="id" id="id"><label for="id">' . __('ID') . '</label>';
    } else {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[0]" value="id" id="id"><label for="id">' . __('ID') . '</label>';
    }
    //checkbox name
    if ($params['object_fields'][1]) {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[1]" checked value="name" id="name"><label for="name">' . __('Name') . '</label>';
    } else {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[1]" value="name" id="name"><label for="name">' . __('Name') . '</label>';
    }
    //checkbox owner
    if ($params['object_fields'][2]) {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[2]" checked value="owner" id="owner"><label for="owner">' . __('Owner') . '</label>';
    } else {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[2]" value="owner" id="owner"><label for="owner">' . __('Owner') . '</label>';
    }
    //checkbox id_parent
    if ($params['object_fields'][3]) {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[3]" checked value="id_parent" id="id_parent"><label for="id_parent">' . __('Parent object') . '</label>';
    } else {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[3]" value="id_parent" id="id_parent"><label for="id_parent">' . __('Parent object') . '</label>';
    }
    //checkbox id_object_type
    if ($params['object_fields'][4]) {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[4]" checked value="id_object_type" id="id_object_type"><label for="id_object_type">' . __('Object type') . '</label>';
    } else {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[4]" value="id_object_type" id="id_object_type"><label for="id_object_type">' . __('Object type') . '</label>';
    }
    //checkbox manufacturer
    if ($params['object_fields'][5]) {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[5]" checked value="id_manufacturer" id="id_manufacturer"><label for="id_manufacturer">' . __('Manufacturer') . '</label>';
    } else {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[5]" value="id_manufacturer" id="id_manufacturer"><label for="id_manufacturer">' . __('Manufacturer') . '</label>';
    }
    //checkbox id_contract
    if ($params['object_fields'][6]) {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[6]" checked value="id_contract" id="id_contract"><label for="id_contract">' . __('Contract') . '</label>';
    } else {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[6]" value="id_contract" id="id_contract"><label for="id_contract">' . __('Contract') . '</label>';
    }
    //checkbox status
    if ($params['object_fields'][7]) {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[7]" checked value="status" id="status"><label for="status">' . __('Status') . '</label>';
    } else {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[7]" value="status" id="status"><label for="status">' . __('Status') . '</label>';
    }
    //checkbox status
    if ($params['object_fields'][8]) {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[8]" checked value="receipt_date" id="receipt_date"><label for="receipt_date">' . __('Receipt date') . '</label>';
    } else {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[8]" value="receipt_date" id="receipt_date"><label for="receipt_date">' . __('Receipt date') . '</label>';
    }
    //checkbox status
    if ($params['object_fields'][9]) {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[9]" checked value="issue_date" id="issue_date"><label for="issue_date">' . __('Issue date') . '</label>';
    } else {
        $select_label_object .= '<input type="checkbox" class="checkbox_object_field" name="object_fields[9]" value="issue_date" id="issue_date"><label for="issue_date">' . __('Issue date') . '</label>';
    }
    //checkbox custom fields
    if ($params['object_fields_custom']) {
        $i = 10;
        foreach ($params['object_fields_custom'] as $object) {
            if ($params['object_fields'][$i]) {
                $select_label_object .= '<input name="object_fields[' . $i . ']" checked class="checkbox_object_field" value="' . $object['id'] . '" type="checkbox" id="' . $object['id'] . '">';
            } else {
                $select_label_object .= '<input name="object_fields[' . $i . ']" class="checkbox_object_field" value="' . $object['id'] . '" type="checkbox" id="' . $object['id'] . '">';
            }
            $select_label_object .= '<label for="' . $object['id'] . '">' . $object['label'] . '</label>';
            $i++;
        }
    }
    $select_label_object .= '</div>';
    $select_label_object .= '</td></tr></table>';
    $select_label_object .= '</div>';
    echo $select_label_object;
}
开发者ID:articaST,项目名称:integriaims,代码行数:85,代码来源:functions_inventories.php


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