<?php include("../check.php"); ?>
<!DOCTYPE html>
<html>

<head>

    <?php include("common/head.php") ?>
    <script src="../ckeditor1/ckeditor/ckeditor.js"></script>

</head>
<body class="fixed-navbar fixed-sidebar">

<?php include("common/header.php") ?>


<?php include("common/aside.php") ?>

<div id="wrapper">

<div class="small-header transition animated fadeIn">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li><a href="index.php">Dashboard</a></li>
                </ol>
            </div>
            <?php if($_GET['s']=='true') { ?>
            <h2 class="font-light m-b-xs">"Home Page Data Updated Successfully..."</h2>
            <?php } ?>
            <?php if($_GET['s']!=='true') { ?>
            <small style="color:#FF0000;"><?php print $_GET['error']; ?></small>
            <?php } ?>
        </div>
    </div>
</div>

<div class="content animate-panel">

<div>

    <div class="row">
        <div class="col-lg-12">
            <div class="hpanel">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                        <a class="closebox"><i class="fa fa-times"></i></a>
                    </div>
                    Home Page Data
                </div>
                <div class="panel-body">
                <?php 
			    $query2 = "SELECT * FROM `otherpage` where `page_title`='home'";
	            $result2 = mysql_query($query2);
	            while($row = mysql_fetch_array($result2))
	            {
			   ?>
                <form action="update-home-handler.php?q=home" method="POST" enctype="multipart/form-data" onSubmit="return validform(this)" id="demo-form2" data-parsley-validate class="form-horizontal">
                <div class="form-group">
                	<label class="col-sm-1 control-label">Title</label>
                    <div class="col-sm-5"><input type="text" name="title" class="form-control" value="<?php print $row['title']; ?>"></div>
                    <label class="col-sm-1 control-label">Metakey</label>
                    <div class="col-sm-5"><input type="text" name="metakey" class="form-control" value="<?php print $row['metakey']; ?>"></div>
                </div>
               
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                	<label class="col-sm-1 control-label">Description</label>
                    <div class="col-sm-5"><input type="text" name="description" class="form-control" value="<?php print $row['description']; ?>"></div>
                    <label class="col-sm-1 control-label">Heading</label>
                    <div class="col-sm-5"><input type="text" name="heading" class="form-control" value="<?php print $row['heading']; ?>"></div>
                </div>
                <div class="form-group"><label class="col-sm-2 control-label">Page Data Textarea</label>
                    <div class="col-sm-12">
                        <textarea class="ckeditor" id="editor1" required="required" name="data" class="form-control input-lg m-b"><?php print $row['data']; ?></textarea>
                    </div>
                <div class="hr-line-dashed"></div>
                </div>
                <div class="form-group">
                	<label class="col-sm-1 control-label">Image Upload</label>
                    
                    <div class="col-sm-5"><input type="file" name="file" id="file"  class="form-control" ><br>image size: 1000px/350px(width/height)</div>
                </div>
                
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-2">
                        <button class="btn btn-default" type="submit">Cancel</button>
                        <button class="btn btn-primary" type="submit">Save changes</button>
                    </div>
                </div>
                </form>
                 <?php 
			   }
			 ?>
                </div>
            </div>
        </div>
        
    </div>


</div>

</div>

    <!-- Right sidebar -->
    

    <?php include("common/footer.php") ?>

</div>

<?php include("common/js.php") ?>

</body>

</html>