<?php echo $header; ?>
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <?php if ($success) { ?>
  <div class="success"><?php echo $success; ?></div>
  <?php } ?>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/product.png" alt="" /> <?php echo $heading_title_risco; ?></h1>
      <div class="buttons"><a onclick="$('form').submit();" class="button"><?php echo $button_save; ?></a>
      <a href="<?php echo $back; ?>" class="button"> <?php echo $button_back;  ?> </a></div>
    </div>
    <div class="content">
      <form action="<?php echo $update; ?>" method="post" enctype="multipart/form-data" id="form">
        <table class="list">
          <thead>
            <tr>
              <td class="center"><?php echo $column_image; ?></td>
              <td class="left"><?php echo $column_product_name; ?>
              </td>
              <td class="left">
                <?php echo $column_risk; ?>
              </td>
            </tr>
          </thead>
          <tbody>
            
            <?php if ($products) { ?>
            <?php foreach ($products as $product) { ?>
            <tr>
              <td class="center"><img src="<?php echo $product['image']; ?>" alt="<?php echo $product['name']; ?>" style="padding: 1px; border: 1px solid #DDDDDD;" /></td>
              <td class="left"><?php echo $product['name']; ?></td>
              <td class="left">
              		<input type="radio" value="Low" name="risco_produto[<?php echo $product['product_id']; ?>]" <?php if ($product['risco_produto'] == 'Low') { echo 'checked="checked"'; } ?>><?php echo $risco_low; ?>
              		<input type="radio" value="Medium" name="risco_produto[<?php echo $product['product_id']; ?>]" <?php if ($product['risco_produto'] == 'Medium') { echo 'checked="checked"'; } ?>><?php echo $risco_medium; ?>
              		<input type="radio" value="High" name="risco_produto[<?php echo $product['product_id']; ?>]" <?php if ($product['risco_produto'] == 'High') { echo 'checked="checked"'; } ?>><?php echo $risco_high; ?>
              </td>
            </tr>
            <?php } ?>
            <?php } else { ?>
            <tr>
              <td class="center" colspan="8"><?php echo $text_no_results; ?></td>
            </tr>
            <?php } ?>
          </tbody>
        </table>
      </form>
      <div class="pagination"><?php echo $pagination; ?></div>
    </div>
  </div>
</div>
<?php echo $footer; ?>