<?php

/**
* @version 2.6.2
* @package Joomla 1.5
* @subpackage DT Register
* @copyright Copyright (C) 2006 DTH Development
* @copyright contact dthdev@dthdevelopment.com
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/

?>

<form action="index2.php" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data">

<table width="100%" class="adminlist">

  <tr>

    <th width="12px;">

     <input type="checkbox" name="toggle" size="12" value="" onclick="checkAll(<?php echo count( $locations ); ?>);" />

    </th>

    <th>

      <?php echo JText::_( 'DT_NAME');  ?></a>

    </th>

    <th>

      <?php echo JText::_( 'DT_ADDRESS'); ?>

    </th>

    <th>

      <?php echo JText::_( 'DT_CITY'); ?>

    </th>

    <th>

      <?php echo JText::_( 'DT_STATE'); ?>

    </th>

    <th>

      <?php echo JText::_( 'DT_ZIPCODE'); ?>

    </th>

   </tr>

  <tr>

  <?php 

  $k = 0;

  $i = 0;

    foreach($locations as $location){

	  	$link 	= 'index2.php?option=com_dtregister&task=editlocation&hidematinmenu=1&cid[]='. $location->id;

		  $checked 	= JHTML::_('grid.id', $i ,  $location->id );

	  ?>

     <tr class="<?php echo "row$k"; ?>">

     <td>

      <?php echo $checked; ?>

     </td>

    <td>

      <a href="<?php echo $link; ?>"><?php echo stripslashes($location->name); ?></a>

    </td>

    <td>

      <?php echo $location->address.' '.$location->address2;  ?>

    </td>

    <td>

      <?php echo $location->city ; ?>

    </td>

    <td>

      <?php echo $location->state ; ?>

    </td>

    <td>

      <?php echo $location->zip ; ?>

    </td>

   </tr>

  <tr>

  <?php $i++ ;	$k = 1 - $k; } ?>

   <td colspan="6">

     <?php  echo $pageNav->getListFooter();?>

      <input type="hidden" name="option" value="com_dtregister" />

      <input type="hidden" name="limitstart" value="<?php echo $pageNav->limitstart; ?>" />

	
	    <input type="hidden" name="task" value="locations" />

   </td>

  </tr>

</table>

</form>