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


PHP Technology::GetAllTechnologyBycategoryId方法代码示例

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


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

示例1: PageContent

function PageContent()
{
    ?>
    
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                // fix to preserve width of cells
                var fixHelper = function(e, ui) {
                    ui.children().each(function() {
                        $(this).width($(this).width());
                    });
                    return ui;
                };
                var saveIndex = function(e, ui) {
                    //alert("New position: " + ui.item.index());
                    //alert("Image Id: " + ui.item.attr("id"));
                    id = ui.item.attr("id").replace("img_", "");
                    $.ajax({
                        url: 'technology_list.php',
                        data: {
                            dragsort: 1,
                            idx: ui.item.index(),
                            id: id
                        },
                        type: 'POST',
                        dataType: 'html',
                        success: function (data) {
                            //alert("done");
                        },
                        error: function (xhr, status) {
                            alert('Sorry, there was a problem!');
                        }
                    });
                }; // end saveIndex
    
                $("#list_table tbody").sortable({
                    helper: fixHelper,
                    stop: saveIndex
                }).disableSelection();
    
            }); // end document.ready
        </script>
        <style>
            .icon-resize-vertical:hover {
                cursor:grab;
            }
        </style>        
    
            <div class="layout center-flex">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Category List';
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Technology';
    $aLinks[2] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading">Technology</p>
                    <a href="technology_admin.php?cat=<?php 
    echo $_REQUEST['cat'];
    ?>
" class="button_link"><button class="">Add New Technology</button></a>
                </div>
            </div>
    
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Technology Name</th>
                            <th>Info Items</th>
                            <th class="mid">Order</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objTechnology = new Technology();
    $oTechnology = $objTechnology->GetAllTechnologyBycategoryId($_REQUEST['cat']);
    $objTechnologyInfo = new TechnologyInfo();
    foreach ($oTechnology as $technology) {
        echo '<tr id="img_' . $technology->Id . '">' . PHP_EOL;
        echo '<td>' . $technology->Id . '</td>' . PHP_EOL;
        echo '<td>' . $technology->TechnologyName . '</td>' . PHP_EOL;
        switch ($technology->LinkUrl) {
            case 'tech-sound.php':
                echo '<td class="mid"><a href="sound_list.php?cat=' . $_REQUEST['cat'] . '"><img src="img/edit-icon.png" /></a></td>' . PHP_EOL;
                break;
            case 'tech-light.php':
                echo '<td class="mid"><a href="light_list.php?cat=' . $_REQUEST['cat'] . '"><img src="img/edit-icon.png" /></a></td>' . PHP_EOL;
//.........这里部分代码省略.........
开发者ID:brandfeverinc,项目名称:coke-cooler,代码行数:101,代码来源:technology_list.php


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