<?php

include('views/_header.tpl.php');

?>

 <div class="home-feature-category" style="background:none; border:none;">
        <div class="container_12 clearfix">
        <div class="grid_8 marked-category">

		<h1 style="margin-bottom:0px;"><?php
		
		if ($cat) {
			echo "Edit";
		} else {
			echo "Add";
			$def = "static/uploads/storecats/placeholder.jpg";
		}
		
		?> Shop Category</h1>

		<form method="post" class="form form-profile" enctype="multipart/form-data" style="padding:25px 0px 0px;">
			<div class="row-item clearfix" style="padding-bottom:10px;">
				<label class="lbl" for="txt_name1" style="text-align:left; width:auto; margin-right:5px;">Image:</label>
                <div class="val" style="margin-left:0px; margin-bottom:10px;">
                	<img src="/<?php if($cat) { echo "" .$cat['image']. ""; } else { echo "" . $def . ""; } ?>" style="height:100px; width:auto;" />
                    <p class="rs description-input"></p>
                </div>			
				<label class="lbl" for="txt_name1" style="text-align:left; width:auto; margin-right:5px;">Name:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt" type="text" name="name" value="<?= $cat['name'] ?>" >
                    <p class="rs description-input"></p>
                </div>

                <label class="lbl" for="txt_name1" style="text-align:left; width:auto; margin-right:5px;">Image:</label>
                <div class="val" style="margin-left:0px;">
                    <input class="txt" type="file" name="image" >
                    <p class="rs description-input"></p>
                </div>			
            </div>
            <br />
            <input type="submit" style="font-weight:300" class="btn btn-blue" /> <input type="button" value="Cancel" class="btn btn-black" onclick="location = '/admin/'" />
		</form>

		</div>
	</div>
</div>

<?php

include('views/_footer.tpl.php');

?>