<?php

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

?>

<link rel="stylesheet" href="/static/css/jquery.datetimepicker.css"/>
<script src='/static/js/jquery.datetimepicker.js'></script>

<script type="text/javascript">
$(document).ready(function()
{
    $(".datepicker").datetimepicker({
        format: 'Y-m-d H:i',
        formatDate: 'Y-m-d H:i',
        datepicker: true,
        timepicker: true
    });

    $(".timepicker").datetimepicker({
        hours12: true,
        format: 'H:i A',
        formatTime: 'H:i',
        timepicker: true,
        datepicker: false,
        timepickerScrollbar: false,
        step: 30
    });
});
</script>

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

		<h1 style="margin-bottom:0px;"><?php
		
		if ($special) {
			echo "Edit";
		} else {
			echo "Add";
			$def = "/static/images/placeholder.jpg";
		}
		
		?> Link</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:50px; margin-right:5px;">Image:</label>
                <div class="val" style="margin-left:0px; margin-bottom:10px;">
                	<img src="<?php if($special) { echo "" .$special['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:50px; margin-right:5px;">Title:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt" type="text" name="title" value="<?= $special['title'] ?>" >
                    <p class="rs description-input"></p>
                </div>
				
				<label class="lbl" for="txt_name1" style="text-align:left; width:50px; margin-right:5px;">Text:</label>
                <div class="val" style="margin-left:0px;">
					<textarea class="txt" name="content"><?= $special['content'] ?></textarea>
                    <p class="rs description-input"></p>
                </div>

				<label class="lbl" for="txt_name1" style="text-align:left; width:50px; margin-right:5px;">Auth:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt" type="text" name="author" value="<?= $special['author'] ?>" >
                    <p class="rs description-input"></p>
                </div>				

				<label class="lbl" for="txt_name1" style="text-align:left; width:50px; margin-right:5px;">Short:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt" type="text" name="short" value="<?= $special['short'] ?>" >
                    <p class="rs description-input"></p>
                </div>	

				<label class="lbl" for="txt_name1" style="text-align:left; width:50px; margin-right:5px;">Link:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt" type="text" name="link" value="<?= $special['link'] ?>" >
                    <p class="rs description-input"></p>
                </div>	

				<label class="lbl" for="txt_name1" style="text-align:left; width:50px; margin-right:5px;">Label:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt" type="text" name="label" value="<?= $special['label'] ?>" >
                    <p class="rs description-input"></p>
                </div>	

				<label class="lbl" for="txt_name1" style="text-align:left; width:50px; margin-right:5px;">Custom:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt" type="text" name="custom" value="<?= $special['custom'] ?>" >
                    <p class="rs description-input"></p>
                </div>	

				<label class="lbl" for="txt_name1" style="text-align:left; width:50px; margin-right:5px;">Date:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt datepicker" type="text" name="date" value="<?= $special['date'] ?>" placeholder="<?= date('m/d/Y H:i') ?>">
                    <p class="rs description-input"></p>
                </div>	

				<label class="lbl" for="txt_name1" style="text-align:left; width:50px; margin-right:5px;">mm:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt" type="text" name="mm" value="<?= $special['mm'] ?>" >
                    <p class="rs description-input"></p>
                </div>	

				<label class="lbl" for="txt_name1" style="text-align:left; width:50px; margin-right:5px;">dd:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt" type="text" name="dd" value="<?= $special['dd'] ?>" >
                    <p class="rs description-input"></p>
                </div>	

				<label class="lbl" for="txt_name1" style="text-align:left; width:50px; margin-right:5px;">day:</label>
                <div class="val" style="margin-left:0px;">
                	<input class="txt" type="text" name="day" value="<?= $special['day'] ?>" >
                    <p class="rs description-input"></p>
                </div>					
				
                <label class="lbl" for="txt_name1" style="text-align:left; width:50px; margin-right:5px;">Img:</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-black" /> 
			<input type="button" value="Cancel" class="btn btn-black" onclick="location = '/admin/'" />
		</form>

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

<?php

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

?>