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

<!DOCTYPE html>
<html>

<head>
   
  <?php include("../common/head.php") ?>
    <script src="../../ckeditor1/ckeditor/ckeditor.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.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="<?php print $baseurl; ?>welcome/employee/addEdit.php"><button class="btn btn-info " type="button"><i class="fa fa-paste"></i> Add Pages</button></a></li>
                    <li><a href="<?php print $baseurl; ?>welcome/employee/index.php"><button class="btn btn-success " type="button"><i class="fa fa-list"></i> <span class="bold">All Pages Show</span></button></a></li>
                </ol>
            </div>

            <h1> Page Listing</h1>
	
    
   
            
        </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>
                    Create Page
                </div>
                <div class="panel-body" >
                
               <form method="post" action="postAction.php" enctype="multipart/form-data" class="form-horizontal">
								   
                        <?php $getall = $getData->runQuery("SELECT * FROM `employee` where id='".$_GET['edit']."'"); ?>
                      <div class="tab-content">

                          <div id="step1" class="tab-pane active">
							  <div class="form-group">
								  <div class="col-md-6">
									<label >Standard Select Multiple:</label>
									  <select class="form-control js-example-basic-multiple" name="standard[]" multiple="multiple">
                                         <option> -- Select Standard -- </option>
                                         <?php
                                         $dataaa = $getall[0]['standard'];
                                        $result = explode(',',$dataaa);    
									       $getalls = $getData->runQuery("SELECT * FROM `standard_tbl`");
                                            foreach($getalls as $rows){
                                                 
                                            ?>
                                                <option value="<?= $rows['id']?>"  <?php if(in_array($rows['id'],$result)){ echo "selected"; } ?>><?= $rows['title']?></option>
                                            <?php } ?>
                                           
                                      </select>
						
							  </div>
								  <div class="col-md-6">
									  <label >Name:</label>
									  <input type="text" name="name" class="form-control" value="<?=$getall[0]['user_name']?>" placeholder=""   >
								  </div>
								  
								  
								</div><hr>
							  <div class="form-group">
								  <div class="col-md-6">
									  <label >Mobile:</label>
									  <input type="text" name="mobile" class="form-control" value="<?=$getall[0]['mobile']?>" placeholder=""   >
								  </div>
								  <div class="col-md-6">
									  <label >Email:</label>
									  <input type="email" name="email" class="form-control" value="<?=$getall[0]['email']?>" placeholder=""   >
								  </div>
								  
								</div><hr>
						
							  
                          </div>

                        </div>
				      
						<input type="hidden" name="dataid" value="<?=$getall[0]['id']?>">
						<input type="submit" name="imgSubmit" class="btn btn-success save-btn" value="SUBMIT">
            </form>
                 
                </div>
            </div>
        </div>
        
    </div>


</div>

</div>

   

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

</div>

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

<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
	<script>
    $(document).ready(function() {
        $('.js-example-basic-multiple').select2();
    });
    </script>
	
<script>
	
	
	$(document).ready(function(){
		$(".heading-input").on("input",function(){
			var heading = $(this).val();
			heading = heading.toLowerCase();
			heading = heading.replace(/ /g, '-');
			
			$(".url").val(heading);
		});
	});
	
	$(document).ready(function(){
		$(".heading-input").on("change",function(){
			
            $.ajax({
                type : "POST",
                url : "check_url_page.php",
                data : {
                    url : $(".url").val()
                },
                success : function(response)
                {
                    if(response.trim() == "success")
                    {
                        $("#url-error").css({"display" : "none"});
						$(".save-btn").removeAttr("disabled");

                    }
                    else{
                        $("#url-error").css({"display" : "block"});
						$(".save-btn").attr("disabled","disabled");
                    }
                }

            });
        });
	});
		
	

</script>
<script>

$(function(){

    $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
        $('a[data-toggle="tab"]').removeClass('btn-primary');
        $('a[data-toggle="tab"]').addClass('btn-default');
        $(this).removeClass('btn-default');
        $(this).addClass('btn-primary');
    })

    $('.next').click(function(){
        var nextId = $(this).parents('.tab-pane').next().attr("id");
        $('[href=#'+nextId+']').tab('show');
    })

    $('.prev').click(function(){
        var prevId = $(this).parents('.tab-pane').prev().attr("id");
        $('[href=#'+prevId+']').tab('show');
    })

    $('.submitWizard').click(function(){

        var approve = $(".approveCheck").is(':checked');
        if(approve) {
            // Got to step 1
            $('[href=#step1]').tab('show');

            // Serialize data to post method
            var datastring = $("#simpleForm").serialize();

            // Show notification
            swal({
                title: "Thank you!",
                text: "You approved our example form!",
                type: "success"
            });
//            Example code for post form
//            $.ajax({
//                type: "POST",
//                url: "your_link.php",
//                data: datastring,
//                success: function(data) {
//                    // Notification
//                }
//            });
        } else {
            // Show notification
            swal({
                title: "Error!",
                text: "You have to approve form checkbox.",
                type: "error"
            });
        }
    })
});
</script>
	<script>
CKEDITOR.addCss( "@font-face {" +
  "font-family: 'kruti-dev-010';" +
  "src: local('kruti-dev-010'), url(fonts/kruti-dev-010.ttf) format('truetype');" +
"}" );

CKEDITOR.replace( 'editor1', {
    on: {
        configLoaded: function() {
            this.config.font_names += ';kruti-dev-010';
        }
    }
} );
</script>
</body>

</html>

