<?php /* Smarty version 2.6.10, created on 2010-02-07 15:53:05
         compiled from production.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'production.tpl', 7, false),array('function', 'formatnumber', 'production.tpl', 47, false),array('function', 'math', 'production.tpl', 48, false),array('function', 'daycalc', 'production.tpl', 51, false),array('modifier', 'default', 'production.tpl', 48, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'header.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

  <h3 class="txtcenter" style="color:#aaaaaa;">Production Overview</h3>
  <form style="text-align: center;" method="post" action="production.php">
  <p style="text-align:center;">
    <?php echo smarty_function_html_options(array('name' => 'filter_regionID','options' => $this->_tpl_vars['optregions'],'selected' => $this->_tpl_vars['filter_regionID']), $this);?>

    <?php if ($this->_tpl_vars['access'] > 2):  echo smarty_function_html_options(array('name' => 'filter_systemID','options' => $this->_tpl_vars['optsystems'],'selected' => $this->_tpl_vars['filter_systemID']), $this); endif; ?>
    <?php echo smarty_function_html_options(array('name' => 'filter_pos_id','options' => $this->_tpl_vars['optposids'],'selected' => $this->_tpl_vars['filter_pos_id']), $this);?>

    <input type="submit" name="submit" value="Filter" /> - <a href="production.php" title="Clear Filter">Clear Filter</a>
  </p>
  </form>
  <table class="mcenter" style="padding:0; width:70%; border:1px #aaaaaa solid; font-family: Arial,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal;" cellspacing="1">
  <tbody>
    <tr class="arialwhitebold12" style="background-color:#4f0202;">
      <td style="border:1px #aaaaaa solid;">System</td>
      <td style="border:1px #aaaaaa solid;">Id</td>
      <td class="txtcenter" style="border:1px #aaaaaa solid;">Type</td>
      <td class="txtcenter" style="border:1px #aaaaaa solid;">&nbsp;M3&nbsp;</td>
      <td class="txtcenter" style="border:1px #aaaaaa solid;">Starting Amount</td>
      <td class="txtcenter" style="border:1px #aaaaaa solid;">Amount in Silo</td>
      <td class="txtcenter" style="border:1px #aaaaaa solid;">Amount in Silo (M3)</td>
      <td class="txtcenter" style="border:1px #aaaaaa solid;">Input/Output</td>
      <td class="txtcenter" style="border:1px #aaaaaa solid;">Time Until Full/Empty</td>
    </tr>

  <?php $this->assign('systemback', $this->_tpl_vars['allsilos'][0]['systemID']); ?>
  <?php $_from = $this->_tpl_vars['allsilos']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['tower']):
?>
  <?php if ($this->_tpl_vars['tower']['owner_id'] == $this->_tpl_vars['userinfo']['eve_id']): ?>
    <?php $this->assign('bgcolor', $this->_tpl_vars['owner_bgcolor']); ?>
  <?php elseif ($this->_tpl_vars['tower']['secondary_owner_id'] == $this->_tpl_vars['userinfo']['eve_id']): ?>
    <?php $this->assign('bgcolor', $this->_tpl_vars['owner_bgcolor']); ?>
  <?php else: ?>
    <?php $this->assign('bgcolor', "#111111"); ?>
  <?php endif; ?>

  <?php if ($this->_tpl_vars['systemback'] != $this->_tpl_vars['tower']['systemID']): ?>
    <?php $this->assign('systemback', $this->_tpl_vars['tower']['systemID']); ?>
  <?php endif; ?>
  <?php $_from = $this->_tpl_vars['tower']['silos']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['silo']):
?>
    <tr style="border:1px #aaaaaa solid;background-color:<?php echo $this->_tpl_vars['bgcolor']; ?>
;">
      <td><a style="color: white;" href="viewpos.php?i=<?php echo $this->_tpl_vars['tower']['pos_id']; ?>
" title="<?php echo $this->_tpl_vars['tower']['locationName']; ?>
"><?php echo $this->_tpl_vars['tower']['locationName']; ?>
</a></td>
      <td><?php echo $this->_tpl_vars['silo']['silo_id']; ?>
</td>
      <td><?php echo $this->_tpl_vars['silo']['material_name']; ?>
</td>
      <td class="txtcenter">&nbsp;<?php echo $this->_tpl_vars['silo']['material_volume']; ?>
&nbsp;</td>
      <td class="txtcenter"><form style="margin: 0pt; padding: 0pt;" method="post" action="production.php"><div><input name="referer" value="production.php" type="hidden" /><input name="filter_systemID" value="<?php echo $this->_tpl_vars['filter_regionID']; ?>
" type="hidden" /><input name="filter_pos_id" value="<?php echo $this->_tpl_vars['filter_pos_id']; ?>
" type="hidden" /><input name="filter_systemID" value="<?php echo $this->_tpl_vars['filter_systemID']; ?>
" type="hidden" /><input name="structure_id" value="<?php echo $this->_tpl_vars['silo']['silo_id']; ?>
" type="hidden" /><input size="7" name="new_amount" value="" style="text-align:right;" type="text" /> <input name="action" value="Update Amount" class="mainoption" type="submit" /></div></form></td>
      <td class="txtright" ><?php echo smarty_function_formatnumber(array('value' => $this->_tpl_vars['silo']['material_amount']), $this);?>
&nbsp;&nbsp;</td>
      <?php echo smarty_function_math(array('equation' => "x*y",'x' => $this->_tpl_vars['silo']['material_amount'],'y' => ((is_array($_tmp=@$this->_tpl_vars['silo']['material_volume'])) ? $this->_run_mod_handler('default', true, $_tmp, 0) : smarty_modifier_default($_tmp, 0)),'assign' => 'matvolume'), $this);?>

      <td class="txtright"><?php echo smarty_function_formatnumber(array('value' => $this->_tpl_vars['matvolume']), $this);?>
&nbsp;&nbsp;</td>
      <td class="txtcenter">&nbsp;<?php echo $this->_tpl_vars['silo']['direction']; ?>
&nbsp;</td>
      <td class="txtcenter" style="border:1px <?php if ($this->_tpl_vars['silo']['full'] || $this->_tpl_vars['silo']['empty']): ?>red<?php else: ?>#aaaaaa<?php endif; ?> solid;"><?php if ($this->_tpl_vars['silo']['full']): ?>FULL<?php elseif ($this->_tpl_vars['silo']['empty']): ?>EMPTY<?php else:  echo smarty_function_daycalc(array('hours' => $this->_tpl_vars['silo']['hourstofill']), $this); endif;  if ($this->_tpl_vars['silo']['silo_link']): ?> (Link: <?php echo $this->_tpl_vars['silo']['silo_link']; ?>
)<?php endif; ?></td>
    </tr>
  <?php endforeach; endif; unset($_from); ?>
    <tr>
      <td colspan="9"><hr></td>
    </tr>
  <?php endforeach; endif; unset($_from); ?>
  </tbody>
  </table>


<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'footer.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>