<?php
/**
 * The setSites view file of leads module of ZDOO.
 *
 * @copyright   Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     商业软件，非开源软件
 * @author      Gang Liu <liugang@cnezsoft.com>
 * @package     leads 
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../../common/view/header.html.php';?>
<div id='menuActions'>
  <?php commonModel::printLink('leads', 'createSite', '', $lang->leads->createSite, "class='btn btn-primary'");?>
</div>
<div class='main-row'>
  <?php include 'side.html.php';?>
  <div class='main-col'>
    <div class='panel'>
      <form method='post' id='ajaxForm' data-ride='table' class='main-table'>
        <table class='table'>
          <thead>
            <tr>
              <th class='w-200px'><?php echo $lang->leads->name;?></th>
              <th class='w-100px'><?php echo $lang->leads->code;?></th>
              <th><?php echo $lang->leads->key;?></th>
              <th class='w-100px text-center'><?php echo $lang->actions;?></th>
            </tr>
          </thead>
          <tbody>
            <?php if(isset($config->leads->sites)):?>
            <?php foreach($config->leads->sites as $site):?>
            <?php $site = json_decode($site);?>
            <tr>
              <td><?php echo $site->name;?></td>
              <td><?php echo $site->code;?></td>
              <td><?php echo $site->key;?></td>
              <td class='text-center'>
              <?php
                commonModel::printLink('leads', 'editSite', "code={$site->code}", $lang->edit);
                commonModel::printLink('leads', 'deleteSite', "code={$site->code}", $lang->delete, "class='deleter'");
              ?>
              </td>
            </tr>
            <?php endforeach;?>
            <?php endif;?>
          </tbody>
        </table>
      </form>
    </div>
  </div>
</div>
<?php include '../../../common/view/footer.html.php';?>
