<?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 ($tes) {
			echo "Edit";
		} else {
			echo "Add";
			$def = "static/uploads/storecats/placeholder.jpg";
		}
		
		?> Testimonial</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($tes) { echo "" .$tes['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;">Title:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt" type="text" name="title" value="<?= $tes['title'] ?>" >
                    <p class="rs description-input"></p>
                </div>
				
				<label class="lbl" for="txt_name1" style="text-align:left; width:auto; margin-right:5px;">Content:</label>
                <div class="val" style="margin-left:0px;">
					<textarea class="txt" name="content">
					<?= $tes['content'] ?>
					</textarea>
                    <p class="rs description-input"></p>
                </div>

				<label class="lbl" for="txt_name1" style="text-align:left; width:auto; margin-right:5px;">Auth:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt" type="text" name="author" value="<?= $tes['author'] ?>" >
                    <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');

?>