Advertisement
Guest User

default.php

a guest
Nov 2nd, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 9.31 KB | None | 0 0
  1. <?php
  2.   $rows = $this->rows;
  3.   $lists = $this->lists;
  4.   $pageNav = $this->pagination;
  5.   $text_search = $this->text_search;
  6.   $category_id = $this->category_id;
  7.   $manufacturer_id = $this->manufacturer_id;
  8.   $currency = $this->currency;
  9.   $count = count ($rows);
  10.   $i = 0;
  11.   $saveOrder = $this->filter_order_Dir=="asc" && $this->filter_order=="ordering";
  12. ?>
  13. <form action = "index.php?option=com_jshopping&controller=products" method = "post" name = "adminForm">
  14.     <table width = "100%" style="padding-bottom:5px;">
  15.       <tr>
  16.         <td width = "95%" align = "right">
  17.             <?php echo _JSHOP_CATEGORY.": ".$lists['treecategories'];?>&nbsp;&nbsp;&nbsp;
  18.             <?php echo _JSHOP_NAME_MANUFACTURER.": ".$lists['manufacturers'];?>&nbsp;&nbsp;&nbsp;
  19.             <?php
  20.             if ($this->config->admin_show_product_labels) {
  21.                 echo _JSHOP_LABEL.": ".$lists['labels']."&nbsp;&nbsp;&nbsp;";
  22.             }
  23.             ?>
  24.             <?php echo _JSHOP_SHOW.": ".$lists['publish'];?>&nbsp;&nbsp;&nbsp;
  25.         </td>
  26.         <td>
  27.             <input type = "text" name = "text_search" value = "<?php echo htmlspecialchars($text_search);?>" />
  28.         </td>
  29.         <td>
  30.             <input type = "submit" class = "button" value = "<?php echo _JSHOP_SEARCH;?>" />
  31.         </td>
  32.       </tr>
  33.     </table>
  34.  
  35.     <table class = "adminlist" >
  36.     <thead>
  37.       <tr>
  38.         <th class = "title" width  = "10">
  39.           #
  40.         </th>
  41.         <th width = "20">
  42.           <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo $count;?>);" />
  43.         </th>
  44.         <th width="93">
  45.             <?php print _JSHOP_IMAGE; ?>
  46.         </th>
  47.         <th>
  48.           <?php echo JHTML::_( 'grid.sort', _JSHOP_TITLE, 'name', $this->filter_order_Dir, $this->filter_order); ?>
  49.         </th>
  50.         <th>
  51.           <?php echo JHTML::_( 'grid.sort', _JSHOP_ALIAS, 'alias', $this->filter_order_Dir, $this->filter_order); ?>
  52.         </th>
  53.         <?php if (!$category_id){?>
  54.         <th width="80">
  55.             <?php echo JHTML::_( 'grid.sort', _JSHOP_CATEGORY, 'category', $this->filter_order_Dir, $this->filter_order);?>
  56.         </th>
  57.         <?php }?>
  58.         <?php if (!$manufacturer_id){?>
  59.         <th width="80">
  60.             <?php echo JHTML::_( 'grid.sort', _JSHOP_MANUFACTURER, 'manufacturer', $this->filter_order_Dir, $this->filter_order);?>
  61.         </th>
  62.         <?php }?>
  63.         <?php if ($this->show_vendor){?>
  64.         <th width="80">
  65.           <?php echo JHTML::_( 'grid.sort', _JSHOP_VENDOR, 'vendor', $this->filter_order_Dir, $this->filter_order);?>
  66.         </th>
  67.         <?php }?>
  68.         <th width="80">
  69.             <?php echo JHTML::_( 'grid.sort', _JSHOP_EAN_PRODUCT, 'ean', $this->filter_order_Dir, $this->filter_order);?>
  70.         </th>
  71.         <th width="60">
  72.             <?php echo JHTML::_( 'grid.sort', _JSHOP_QUANTITY_PRODUCT, 'qty', $this->filter_order_Dir, $this->filter_order);?>
  73.         </th>
  74.         <th width="80">
  75.             <?php echo JHTML::_( 'grid.sort', _JSHOP_PRICE, 'price', $this->filter_order_Dir, $this->filter_order);?>
  76.         </th>
  77.         <th width="40">
  78.             <?php echo JHTML::_( 'grid.sort', _JSHOP_HITS, 'hits', $this->filter_order_Dir, $this->filter_order);?>
  79.         </th>
  80.         <th width="60">
  81.             <?php echo JHTML::_( 'grid.sort', _JSHOP_DATE, 'date', $this->filter_order_Dir, $this->filter_order);?>
  82.         </th>
  83.         <?php if ($category_id) {?>
  84.         <th colspan="3" width="40">
  85.           <?php echo JHTML::_( 'grid.sort', _JSHOP_ORDERING, 'ordering', $this->filter_order_Dir, $this->filter_order);?>
  86.           <?php if ($saveOrder){?>
  87.           <a class="saveorder" href="javascript:saveorder(<?php echo ($count-1);?>, 'saveorder')" title="Save Order"></a>
  88.           <?php }?>
  89.         </th>
  90.         <?php }?>
  91.         <th width = "40">
  92.           <?php echo _JSHOP_PUBLISH;?>
  93.         </th>
  94.         <th width="40">
  95.             <?php echo _JSHOP_EDIT;?>
  96.         </th>
  97.         <th width="40">
  98.             <?php echo _JSHOP_DELETE;?>
  99.         </th>
  100.         <th width = "30">
  101.           <?php echo JHTML::_( 'grid.sort', _JSHOP_ID, 'product_id', $this->filter_order_Dir, $this->filter_order);?>
  102.         </th>
  103.       </tr>
  104.     </thead>
  105.     <?php foreach ($rows as $row){ ?>
  106.       <tr class = "row<?php echo $i % 2;?>">
  107.        <td>
  108.          <?php echo $pageNav->getRowOffset($i);?>
  109.        </td>
  110.        <td>
  111.          <input type = "checkbox" onclick = "isChecked(this.checked)" name = "cid[]" id = "cb<?php echo $i;?>" value = "<?php echo $row->product_id?>" />
  112.        </td>
  113.        <td>
  114.         <?php if ($row->label_id){?>
  115.             <div class="product_label">
  116.                 <?php if ($row->_label_image){?>
  117.                     <img src="<?php print $row->_label_image?>" width="25" alt="" />
  118.                 <?php }else{?>
  119.                     <span class="label_name"><?php print $row->_label_name;?></span>
  120.                 <?php }?>
  121.             </div>
  122.         <?php }?>
  123.         <?php if ($row->image){?>
  124.             <a href = "index.php?option=com_jshopping&controller=products&task=edit&product_id=<?php print $row->product_id?>">
  125.                 <img src="<?php print $this->config->image_product_live_path."/".$row->image?>" width="90" border="0" />
  126.             </a>
  127.         <?php }?>
  128.        </td>
  129.        <td>
  130.          <b><a href = "index.php?option=com_jshopping&controller=products&task=edit&product_id=<?php print $row->product_id?>"><?php echo $row->name;?></a></b>
  131.          <br/><?php echo $row->short_description;?>
  132.        </td>
  133.        <td>
  134.          <b><a href = "index.php?option=com_jshopping&controller=products&task=edit&product_id=<?php print $row->product_id?>"><?php echo $row->alias;?></a></b>
  135.        </td>
  136.        <?php if (!$category_id){?>
  137.        <td>
  138.           <?php echo $row->namescats;?>
  139.        </td>
  140.        <?php }?>
  141.        <?php if (!$manufacturer_id){?>
  142.        <td>
  143.           <?php echo $row->man_name;?>
  144.        </td>
  145.        <?php }?>
  146.        <?php if ($this->show_vendor){?>
  147.        <td>
  148.             <?php echo $row->vendor_name;?>
  149.        </td>
  150.        <?php }?>
  151.        <td>
  152.         <?php echo $row->ean?>
  153.        </td>
  154.        <td>
  155.         <?php if ($row->unlimited){
  156.             print _JSHOP_UNLIMITED;
  157.         }else{
  158.             echo $row->qty;
  159.         }
  160.         ?>
  161.        </td>
  162.        <td>
  163.         <?php echo formatprice($row->product_price, sprintCurrency($row->currency_id));?>
  164.        </td>
  165.        <td>
  166.         <?php echo $row->hits;?>
  167.        </td>
  168.        <td>
  169.         <?php echo $row->product_date_added;?>
  170.        </td>
  171.        <?php if ($category_id) {?>
  172.        <td align = "right" width = "20">
  173.         <?php
  174.           if ($i!=0 && $saveOrder) echo '<a href = "index.php?option=com_jshopping&controller=products&task=order&product_id='.$row->product_id.'&category_id='.$category_id.'&order=up&number='.$row->product_ordering.'"><img alt="' . _JSHOP_UP . '" src="components/com_jshopping/images/uparrow.png"/></a>';
  175.         ?>
  176.        </td>
  177.        <td align = "left" width = "20">
  178.           <?php
  179.             if ($i!=($count-1) && $saveOrder) echo '<a href = "index.php?option=com_jshopping&controller=products&task=order&product_id='.$row->product_id.'&category_id='.$category_id.'&order=down&number='.$row->product_ordering.'"><img alt="' . _JSHOP_DOWN . '" src="components/com_jshopping/images/downarrow.png"/></a>';
  180.           ?>
  181.        </td>
  182.        <td align = "center" width = "10">
  183.         <input type="text" name="order[]" id = "ord<?php echo $row->product_id;?>"  size="5" value="<?php echo $row->product_ordering; ?>" <?php if (!$saveOrder) echo 'disabled'?> class="text_area" style="text-align: center" />
  184.        </td>
  185.        <?php }?>
  186.        <td align="center">
  187.          <?php
  188.            echo $published = ($row->product_publish) ? ('<a href = "javascript:void(0)" onclick = "return listItemTask(\'cb'.$i. '\', \'unpublish\')"><img title = "' . _JSHOP_PUBLISH . '" alt="" src="components/com_jshopping/images/tick.png"></a>') : ('<a href = "javascript:void(0)" onclick = "return listItemTask(\'cb' . $i . '\', \'publish\')"><img title = "' . _JSHOP_UNPUBLISH . '" alt="" src="components/com_jshopping/images/publish_x.png"></a>');
  189.          ?>
  190.        </td>
  191.        <td align="center">
  192.             <a href='index.php?option=com_jshopping&controller=products&task=edit&product_id=<?php print $row->product_id?>'><img src='components/com_jshopping/images/icon-16-edit.png'></a>
  193.        </td>
  194.        <td align="center">
  195.         <a href='index.php?option=com_jshopping&controller=products&task=remove&cid[]=<?php print $row->product_id?>' onclick="return confirm('<?php print _JSHOP_DELETE?>')"><img src='components/com_jshopping/images/publish_r.png'></a>
  196.        </td>
  197.        <td align="center">
  198.          <?php echo $row->product_id; ?>
  199.        </td>
  200.       </tr>
  201.      <?php
  202.      $i++;
  203.      }
  204.      ?>
  205.      <tfoot>
  206.      <tr>
  207.         <td colspan="18"><?php echo $pageNav->getListFooter();?></td>
  208.      </tr>
  209.      </tfoot>
  210.      </table>
  211.      <input type="hidden" name="filter_order" value="<?php echo $this->filter_order; ?>" />
  212.      <input type="hidden" name="filter_order_Dir" value="<?php echo $this->filter_order_Dir; ?>" />
  213.      <input type="hidden" name="task" value="" />
  214.      <input type="hidden" name="hidemainmenu" value="0" />
  215.      <input type="hidden" name="boxchecked" value="0" />
  216. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement