<?php
  include("category_func.php");
  $hddnCategoryId = $_SESSION['caller']['args'][1];
  if ($_SESSION['user']['access_level'] < 9)
  {
    if ((isset($hddnCategoryId)) && ($hddnCategoryId != $_SESSION['user']['user_code'])) SableGeneralFunctions::divertFromPage("category/view.php");
  }
$row = $sableDB->getRow("select * from category where category_id = ".$hddnCategoryId, 3, '');
?>

<script src="<?php SableGeneralFunctions::printModuleJS('category'); ?>"></script>
<!--// Category -->
<form id="frmCategory" name="frmCategory" autocomplete="on">
<input type="hidden" value="<?php echo(SableSystem::sableEncode($hddnCategoryId)); ?>" id="hddnCategoryId" name="hddnCategoryId" />
<div class="forms">
  <div class="container">
    <div class="forms-grids">
      <div class="col-md-12 form-grid">
        <h3 class="title"><i class="fa fa-eye" aria-hidden="true"></i>&nbsp;View Category</h3>
        <p></p>
        <div class="clearfix"> </div>
      </div>
    </div>
  </div>
<p></p>
<!--// edtCategoryName -->
<div class="container">
  <div class="forms-grids">
    <div class="col-md-4 forms-grid">
<input name="edtCategoryName" type="text" id="edtCategoryName"
readonly value="<?php echo($row['category_name'])?>" />
    </div>
    <div class="col-md-8">
      <div class="fieldHint" id="hint_edtCategoryName">Category name.</div>
    </div>
    <div class="clearfix"> </div>
  </div>
</div>
<!-- edtCategoryName //-->
<p></p>
<!--// buttons -->
<div class="container">
  <div class="forms-grids">
    <div class="col-md-2 forms-grid">
      <input type="button" id="btnCancel" value="Cancel"
      class="submit" onclick="window.location = '<?php SableSystem::printCallPageLink('/category/'); ?>'"/>
    </div>
    <div class="col-md-2 forms-grid">
      <input id="btnOk" type="button" onclick="editCategory('<?php echo(SableSystem::sableEncode($hddnCategoryId)); ?>')" value="Modify Category" class="submit"/>
    </div>
  </div>
</div>
<!-- buttons //-->
  </div>
</form>
<!-- Category //-->
