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


PHP Manufacturer::build_html_tree方法代码示例

本文整理汇总了PHP中Manufacturer::build_html_tree方法的典型用法代码示例。如果您正苦于以下问题:PHP Manufacturer::build_html_tree方法的具体用法?PHP Manufacturer::build_html_tree怎么用?PHP Manufacturer::build_html_tree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Manufacturer的用法示例。


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

示例1: Category

     $manufacturer_id = $new_manufacturer_id;
 }
 if (isset($searched_element) && get_class($searched_element) == 'Category') {
     $category_id = $searched_element->get_id();
 }
 if (isset($searched_element) && get_class($searched_element) == 'Footprint') {
     $footprint_id = $searched_element->get_id();
 }
 if (isset($searched_element) && get_class($searched_element) == 'Storelocation') {
     $storelocation_id = $searched_element->get_id();
 }
 if (isset($searched_element) && get_class($searched_element) == 'Manufacturer') {
     $manufacturer_id = $searched_element->get_id();
 }
 // dropdown lists -> generate lists
 $manufacturer_list = $root_manufacturer->build_html_tree($manufacturer_id, true, false);
 $category_list = $root_category->build_html_tree($category_id, true, false);
 $storelocation_list = $root_storelocation->build_html_tree($storelocation_id, true, false);
 $footprint_list = $root_footprint->build_html_tree($footprint_id, true, false);
 // the category ID is used for creating a new part (in *.tmpl file the latest DIV element)
 $html->set_variable('category_id', $category_id, 'integer');
 // dropdown lists -> set html variables
 $html->set_variable('manufacturer_list', $manufacturer_list, 'string');
 $html->set_variable('category_list', $category_list, 'string');
 $html->set_variable('storelocation_list', $storelocation_list, 'string');
 $html->set_variable('footprint_list', $footprint_list, 'string');
 // global/category stuff
 $category = new Category($database, $current_user, $log, $category_id);
 $html->set_variable('disable_footprints', $config['footprints']['disable'] || $category->get_disable_footprints(true), 'boolean');
 $html->set_variable('disable_manufacturers', $config['manufacturers']['disable'] || $category->get_disable_manufacturers(true), 'boolean');
 $html->set_variable('max_upload_filesize', ini_get('upload_max_filesize'), 'string');
开发者ID:AlexanderS,项目名称:Part-DB,代码行数:31,代码来源:edit_part_info.php

示例2: elseif

        if (is_object($selected_manufacturer)) {
            $parent_id = $selected_manufacturer->get_parent_id();
            $html->set_variable('id', $selected_manufacturer->get_id(), 'integer');
            $html->set_variable('name', $selected_manufacturer->get_name(), 'string');
            $html->set_variable('address', $selected_manufacturer->get_address(), 'string');
            $html->set_variable('phone_number', $selected_manufacturer->get_phone_number(), 'string');
            $html->set_variable('fax_number', $selected_manufacturer->get_fax_number(), 'string');
            $html->set_variable('email_address', $selected_manufacturer->get_email_address(), 'string');
            $html->set_variable('website', $selected_manufacturer->get_website(), 'string');
            $html->set_variable('auto_product_url', $selected_manufacturer->get_auto_product_url(NULL), 'string');
        } elseif ($action == 'add') {
            $parent_id = $new_parent_id;
        } else {
            $parent_id = 0;
        }
        $manufacturer_list = $root_manufacturer->build_html_tree($selected_id, true, false);
        $html->set_variable('manufacturer_list', $manufacturer_list, 'string');
        $parent_manufacturer_list = $root_manufacturer->build_html_tree($parent_id, true, true);
        $html->set_variable('parent_manufacturer_list', $parent_manufacturer_list, 'string');
    } catch (Exception $e) {
        $messages[] = array('text' => nl2br($e->getMessage()), 'strong' => true, 'color' => 'red');
        $fatal_error = true;
    }
}
/********************************************************************************
 *
 *   Generate HTML Output
 *
 *********************************************************************************/
$reload_link = $fatal_error ? 'edit_manufacturers.php' : '';
// an empty string means that the...
开发者ID:AlexanderS,项目名称:Part-DB,代码行数:31,代码来源:edit_manufacturers.php


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