Пример #1
0
 *********************************************************************************/
$html->use_javascript(array('popup'));
$html->set_variable('keyword', $keyword, 'string');
$html->set_variable('hits_count', isset($hits_count) ? $hits_count : 0, 'integer');
$html->set_variable('search_name', $search_name, 'boolean');
$html->set_variable('search_category', $search_category, 'boolean');
$html->set_variable('search_description', $search_description, 'boolean');
$html->set_variable('search_comment', $search_comment, 'boolean');
$html->set_variable('search_supplier', $search_supplier, 'boolean');
$html->set_variable('search_supplierpartnr', $search_supplierpartnr, 'boolean');
$html->set_variable('search_storelocation', $search_storelocation, 'boolean');
$html->set_variable('search_footprint', $search_footprint, 'boolean');
$html->set_variable('search_manufacturer', $search_manufacturer, 'boolean');
if (!$fatal_error) {
    // export formats
    $html->set_loop('export_formats', build_export_formats_loop('searchparts'));
    // global stuff
    $html->set_variable('disable_footprints', $config['footprints']['disable'], 'boolean');
    $html->set_variable('disable_manufacturers', $config['manufacturers']['disable'], 'boolean');
    $html->set_variable('disable_auto_datasheets', $config['auto_datasheets']['disable'], 'boolean');
    $html->set_variable('use_modal_popup', $config['popup']['modal'], 'boolean');
    $html->set_variable('popup_width', $config['popup']['width'], 'integer');
    $html->set_variable('popup_height', $config['popup']['height'], 'integer');
}
/********************************************************************************
 *
 *   Generate HTML Output
 *
 *********************************************************************************/
$html->print_header($messages);
if (!$fatal_error) {
Пример #2
0
    $html->set_variable('disable_manufacturers', $config['manufacturers']['disable'], 'boolean');
    $html->set_variable('disable_auto_datasheets', $config['auto_datasheets']['disable'], 'boolean');
    $html->set_variable('use_modal_popup', $config['popup']['modal'], 'boolean');
    $html->set_variable('popup_width', $config['popup']['width'], 'integer');
    $html->set_variable('popup_height', $config['popup']['height'], 'integer');
    // device stuff
    $html->set_variable('device_id', $device->get_id(), 'integer');
    $html->set_variable('device_name', $device->get_name(), 'string');
    $parent_device_list = $root_device->build_html_tree($device->get_parent_id(), true, true);
    $html->set_variable('parent_device_list', $parent_device_list, 'string');
    // export stuff
    $html->set_variable('export_multiplier', $export_multiplier_original, 'integer');
    $html->set_variable('order_quantity', $device->get_order_quantity(), 'integer');
    $html->set_variable('order_only_missing_parts', $device->get_order_only_missing_parts(), 'boolean');
    $html->set_variable('export_only_missing', $export_only_missing, 'boolean');
    $html->set_loop('export_formats', build_export_formats_loop('deviceparts', $export_format_id));
    if (isset($export_string)) {
        $html->set_variable('export_result', str_replace("\n", '<br>', str_replace("\n  ", '<br>&nbsp;&nbsp;', str_replace("\n    ", '<br>&nbsp;&nbsp;&nbsp;&nbsp;', htmlspecialchars($export_string, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8')))), 'string');
    }
    // import stuff
    $html->set_variable('import_rowcount', isset($import_data) ? count($import_data) : 0, 'integer');
    $html->set_variable('import_file_content', $import_file_content, 'string');
    $html->set_variable('import_format', $import_format, 'string');
    $html->set_variable('import_separator', $import_separator, 'string');
    //$html->set_variable('import_data_is_valid',     (isset($import_data_is_valid) && ($import_data_is_valid)), 'boolean');
}
/********************************************************************************
 *
 *   Generate HTML Output
 *
 *********************************************************************************/
Пример #3
0
        }
        $html->set_loop('order_devices_loop', $order_devices_loop);
    } catch (Exception $e) {
        $messages[] = array('text' => nl2br($e->getMessage()), 'strong' => true, 'color' => 'red');
        $fatal_error = true;
    }
}
/********************************************************************************
 *
 *   Set the rest of the HTML variables
 *
 *********************************************************************************/
$html->use_javascript(array('popup', 'validatenumber'));
if (!$fatal_error) {
    // export formats
    $html->set_loop('export_formats', build_export_formats_loop('orderparts', $export_format_id));
    if (isset($export_string)) {
        $html->set_variable('export_result', str_replace("\n", '<br>', str_replace("\n  ", '<br>&nbsp;&nbsp;', str_replace("\n    ", '<br>&nbsp;&nbsp;&nbsp;&nbsp;', htmlspecialchars($export_string, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8')))), 'string');
    }
    // global stuff
    $html->set_variable('disable_footprints', $config['footprints']['disable'], 'boolean');
    $html->set_variable('disable_manufacturers', $config['manufacturers']['disable'], 'boolean');
    $html->set_variable('disable_auto_datasheets', $config['auto_datasheets']['disable'], 'boolean');
    $html->set_variable('use_modal_popup', $config['popup']['modal'], 'boolean');
    $html->set_variable('popup_width', $config['popup']['width'], 'integer');
    $html->set_variable('popup_height', $config['popup']['height'], 'integer');
}
/********************************************************************************
 *
 *   Generate HTML Output
 *