///////////////////////////////////////////////////// --> <script type="text/javascript"> $(document).ready(function() { var category_content = []; var technology_content = []; var category_names = []; <?php $objItem = new Item(); $objCategory = new Category(); $oCategory = $objCategory->getAllCategoryByIsActive('1', 'sort_order ASC'); $iCnt = 0; $cat_content = array(); foreach ($oCategory as $cat) { $this_content = ""; $oItem = $objItem->getAllItemByCategoryId($cat->Id); $iCnt = 8; // Go ahead and set it to the max to kick off a new div $iTotalInView = 8; $cClass = ' active'; foreach ($oItem as $item) { $iCnt++; if ($iCnt > $iTotalInView) { if ($cClass == '') { $this_content .= '</div>'; } $this_content .= '<div class="item' . $cClass . '">'; $iCnt = 1; } $objItemImage = new ItemImage(); $oItemImage = $objItemImage->getAllItemImageByItemIdItemImageSide($item->Id, 'Front');
echo $background; ?> ;"></div> <div class="wrap equipment-wrap"> <header class="equipment"> <div class="col-sm-6"><a class="main-logo" href="/">Coca-Cola</a></div> <div class="col-sm-6 header-tagline"><?php echo $_SESSION['sessCategoryName']; ?> Innovation</div> </header> <div id="carousel-equipment" class="equipment-menu-items carousel slide" data-ride="carousel"> <div class="carousel-inner" role="listbox"> <?php $objItem = new Item(); $oItem = $objItem->getAllItemByCategoryId($_SESSION['sessCategory']); $iCnt = 6; // Go ahead and set it to the max to kick of a new div $iTotalInView = 6; $cClass = ' active'; foreach ($oItem as $item) { $iCnt++; if ($iCnt > $iTotalInView) { if ($cClass == '') { echo '</div>' . PHP_EOL; } echo '<div class="item' . $cClass . '">' . PHP_EOL; $iCnt = 1; } $objItemImage = new ItemImage(); $oItemImage = $objItemImage->getAllItemImageByItemIdItemImageSide($item->Id, 'Front');
<script type="text/javascript" src="assets/js/scripts.js"></script> </head> <body> <div class="background-gradient" style="background:<?php echo $background; ?> "></div> <!-- // // Top row displaying 3 products // --> <div class="menu-nav-container top-nav"> <?php $objItem = new Item(); $oItem = $objItem->getAllItemByCategoryId($_REQUEST['id']); $nGetNum = 3; $fGetSome = true; $iCnt = 0; $iIndex = 0; while ($fGetSome) { $iCnt++; $objItemImage = new ItemImage(); $oItemImage = $objItemImage->getAllItemImageByItemIdItemImageSide($oItem[$iIndex]->Id, 'Front'); echo '<div class="menu-item menu-nav-item col-sm-4 css-mousedown">' . PHP_EOL; echo ' <div class="menu-nav-item-bg"></div>' . PHP_EOL; echo ' <a href="single-product.php?id=' . $oItem[$iIndex]->Id . '"><img src="' . $objItemImage->getPath() . $oItemImage[0]->ItemImageUrl . '" alt="' . $oItem[$iIndex]->ItemName . '"></a>' . PHP_EOL; echo '</div>' . PHP_EOL; $iIndex++; if ($iCnt == $nGetNum) { $fGetSome = false;
function PageContent() { global $category; ?> <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: 'item_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->CategoryName; $aLinks[1] = ''; echo Helpers::CreateBreadCrumbs($aLabels, $aLinks); ?> <div class="bigbotspace flex-container space-between"> <p class="larger auto heading"><?php echo $category->CategoryName; ?> </p> <a href="item_admin.php?cat=<?php echo $category->Id; ?> " class="button_link"><button class="">Add New Item</button></a> </div> </div> <div class="layout"> <table class="tablestyle" id="list_table"> <thead> <tr> <th>ID</th> <th>Name</th> <th>Item<br />Images</th> <th>Item<br />Info</th> <th>Item<br />Info<br />Images</th> <th>Videos</th> <th>Gallery Images</th> <th>Presentations</th> <th class="mid">Order</th> <th class="mid">Actions</th> </tr> </thead> <tbody> <?php $objItem = new Item(); $oItem = $objItem->getAllItemByCategoryId($category->Id, 'sort_order'); foreach ($oItem as $item) { echo '<tr id="img_' . $item->Id . '">' . PHP_EOL; echo '<td>' . $item->Id . '</td>' . PHP_EOL; echo '<td>' . $item->ItemName . '</td>' . PHP_EOL; echo '<td style="text-align: center;">'; $objItemImage = new ItemImage(); echo '(<a href="itemimage_list.php?cat=' . $_REQUEST['cat'] . '&item=' . $item->Id . '">' . $objItemImage->GetItemImageCountByItemId($item->Id) . '</a>)'; echo '</td>' . PHP_EOL; echo '<td style="text-align: center;">'; echo '<a href="iteminfo_list.php?cat=' . $_REQUEST['cat'] . '&item=' . $item->Id . '"><img src="img/edit-icon.png" /></a>'; echo '</td>' . PHP_EOL; echo '<td style="text-align: center;">'; $objItemInfoImage = new ItemInfoImage(); echo '(<a href="iteminfoimage_list.php?cat=' . $_REQUEST['cat'] . '&item=' . $item->Id . '">' . $objItemInfoImage->GetItemInfoImageCountByItemId($item->Id) . '</a>)'; echo '</td>' . PHP_EOL; echo '<td style="text-align: center;">'; $objItemVideo = new ItemVideo(); echo '(<a href="itemvideo_list.php?cat=' . $_REQUEST['cat'] . '&item=' . $item->Id . '">' . $objItemVideo->GetItemVideoCountByItemId($item->Id) . '</a>)'; echo '</td>' . PHP_EOL; echo '<td style="text-align: center;">'; $objItemGalleryImage = new ItemGalleryImage(); echo '(<a href="itemgalleryimage_list.php?cat=' . $_REQUEST['cat'] . '&item=' . $item->Id . '">' . $objItemGalleryImage->GetItemGalleryImageCountByItemId($item->Id) . '</a>)'; echo '</td>' . PHP_EOL; echo '<td style="text-align: center;">'; $objItemPresentation = new ItemPresentation(); echo '(<a href="itempresentation_list.php?cat=' . $_REQUEST['cat'] . '&item=' . $item->Id . '">' . $objItemPresentation->GetItemPresentationCountByItemId($item->Id) . '</a>)'; echo '</td>' . PHP_EOL; echo '<td class="mid"><img src="img/arrow-up-down.png" /></td>' . PHP_EOL; echo '<td class="mid"><a href="item_admin.php?id=' . $item->Id . '"><img src="img/edit-icon.png" /></a> <a href="item_delete.php?id=' . $item->Id . '"><img src="img/delete-icon.png" /></a></td>' . PHP_EOL; echo '</tr>' . PHP_EOL; } ?> </tbody> </table> </div> <!-- layout --> <?php }