<?php  session_start();
	error_reporting(0);
	?>
	
<?php

$log=$_SESSION['lg_id'];

if(empty($log)) {
   echo "<script type='text/javascript'>window.location.href = 'superadmin.php';</script>";
	
}
?>	
<!doctype html>

<html lang="en">

<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<head>
  
    <!-- Basic -->
	<title>SP DYNAMIC VENTURE </title>
    
    <!-- Define Charset -->
	<meta charset="utf-8">
    
    <!-- Responsive Metatag -->
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <!-- Page Description and Author -->

    
    <!-- Favicon -->
    <link rel="shortcut icon" href="images/fav_logo.png">

    
    <!-- Bootstrap CSS  -->
	<link rel="stylesheet" href="css/bootstrap.css" type="text/css" media="screen">
  

  
    <!-- Vella CSS Styles  -->
	<link rel="stylesheet" type="text/css" href="css/style.css" media="screen">
  
    <!-- Responsive CSS Styles  -->
	<link rel="stylesheet" type="text/css" href="css/responsive.css" media="screen">
    
    <!-- Css3 Transitions Styles  -->
	<link rel="stylesheet" type="text/css" href="css/animate.css" media="screen">
  
    <!-- Color CSS Styles  -->


  
    <!-- Fontello Icons CSS Styles  -->
    <link rel="stylesheet" type="text/css" href="css/fontello.css" media="screen">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    
  
	
    <!-- Vella JS  -->
    <script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/jquery.migrate.js"></script>
    <script type="text/javascript" src="js/modernizrr.js"></script>
	<script type="text/javascript" src="js/bootstrap.js"></script>
    <script type="text/javascript" src="js/jquery.fitvids.js"></script>

	<script type="text/javascript" src="js/script.js"></script>

	  
	  
	  <script>
	
		
		$(document).ready(function() {
$('#aldate,#aldate1').datepicker({dateFormat: 'dd/mm/yy', autoclose: true});});
</script>



	
	
		<!--------------------------Responsive Data table Start------------------------------------------------->
<link rel="stylesheet" type="text/css" href="css/jquery.dataTables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js"></script>

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/1.0.3/css/dataTables.responsive.css">

<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/responsive/1.0.3/js/dataTables.responsive.js"></script>

<!--------------------------Responsive Data Table End ------------------------------------------------------>
	<script src="https://cdn.jsdelivr.net/jquery.loadingoverlay/latest/loadingoverlay.min.js" type="text/javascript"></script>
	<script src="https://cdn.jsdelivr.net/jquery.loadingoverlay/latest/loadingoverlay_progress.min.js" type="text/javascript"></script>
	

<script>
$(document).ready(function(){
	 //$('#example').DataTable();
	var editor1 = $("#txtEditor1");
				editor1.Editor();

	 $('#example').DataTable({
				 "bProcessing": true,
         "serverSide": true,
		 "responsive": true,
         "ajax":{
            url :"alert_grid.php", // json datasource
            type: "post",  // type of method  ,GET/POST/DELETE
            error: function(){
              $("#employee_grid_processing").css("display","none");
            }
			
          }
        });

    $("#alert_title_insert").click(function(){
       var price = editor1.Editor("getText");
			
		
				    $("#desc").val(price);
			

	$("#alert_title_frm").LoadingOverlay("show");
		if($("#altitle").val()!=''){
	 $.LoadingOverlay("show");
		$.ajax({
			type:'POST',
			data:$("#alert_title_frm").serialize() +'&func=fn_alert_insert',
			url:"alert_insert.php",
			success: function(result) {
								//alert(result.op);
								if(result.op==1){
									$("#altitle").val("");
									$("#alby").val("");
									$("#aldesc").val("");
								
								$('#ins_message').html('Saved Sucessfully');
								setTimeout(function(){ 
								$("#ins_message").html("");
								$.LoadingOverlay("hide");
								}, 5000);
								
								
								}
							},
							async:false
			
			
			
		});
		}
		else{
			$('#ins_message').html('Title Required');
								setTimeout(function(){ 
								$("#ins_message").html(""); }, 5000);
		}
    });
	
			$('#gallery_image_delete').on("click", function(event){
		 
					if( $('.deleteRow:checked').length > 0 ){  // at-least one checkbox checked
					
						var ids = [];
						$('.deleteRow').each(function(){
							if($(this).is(':checked')) { 
								ids.push($(this).val());
							}
						});
						var ids_string = ids.toString();  // array to string conversion 
					alert(ids_string);
						
						$.ajax({
							type: "POST",
							url: "gallery_title_delete.php",
							
							data: {data_ids:ids_string},
							success: function(result) {
								
							},
							async:false
							
						});
						$('#example').DataTable().ajax.reload();
					}
					else{
						alert("Please select only one row");
					}
				});
				
	
	
});
</script>
	
	
<style>
.bluredBackground1{
    width:100%;
    height:100%;
    display:block;
    
    z-index:1;
    position:absolute;
    top:-20%;
    left:-20%;
    padding-left:20%;
    padding-top:20%;
    -webkit-filter: blur(5px);
}
.ad_menu{
	background-color:#ccc;
	padding:10px;
}
</style>	
	
	
		  
   </head>
   <body>
      <!-- HEADER -->
	   <div class="" >
	  
      <<div class="hidden-header"></div>
        <header class="clearfix">
            
            <!-- Start Top Bar -->
			<div class="top-bar">
				<div class="container">
					<div class="row">
						<div class="col-md-6">
                            <!-- Start Contact Info -->
							<ul class="contact-details">
                            	<li><a href="#"><i class="icon-mobile-2"></i> 07-364 7792 </a></li>
                                <li><a href="#"><i class="icon-mail-2"></i> <span>enquiry@spdventure.com</span></a></li>
                            </ul>
                            <!-- End Contact Info -->
						</div>
						<div class="col-md-6">
                            <!-- Start Social Links -->
							<ul class="social-list">
								<li>
									<a class="facebook sh-tooltip" data-placement="bottom" target="_blank" title="Facebook" href="https://www.facebook.com/Sp-Dynamic-Venture-Sdn-Bhd-1088562541281098/"><i class="icon-facebook-2"></i></a>
								</li>
								
								
							</ul>
                            <!-- End Social Links -->
						</div>
					</div>
				</div>
			</div>
            <!-- End Top Bar -->
          
			<!-- Start Header ( Logo & Naviagtion ) -->
			<div class="navbar navbar-default navbar-top">
				<div class="container">
					<div class="navbar-header">
                        <!-- Stat Toggle Nav Link For Mobiles -->
						<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
							<i class="icon-menu-1"></i>
						</button>
                        <!-- End Toggle Nav Link For Mobiles -->
						<a class="navbar-brand" href="index.html" style="padding:5px 0px;"><img alt="" src="images/logo1.png"></a>
					</div>
					<div class="navbar-collapse collapse">
                        <!-- Stat Search -->
                    	
                        <!-- End Search -->
                        <!-- Start Navigation List -->
						<ul class="nav navbar-nav navbar-right">
							<li>
								<a href="index.html">Home</a>
                             <!--   <ul class="dropdown">
									<li><a class="active" href="index.html">Home Main Version</a></li>
                                    <li><a href="index-01.html">Home Version 1</a></li>
									<li><a href="index-02.html">Home Version 2</a></li>
                                    <li><a href="index-03.html">Home Version 3</a></li>
                                    <li><a href="index-04.html">Home Version 4</a></li>
                                    <li><a href="index-05.html">Home Version 5</a></li>
                                    <li><a href="index-06.html">Home Version 6</a></li>
                                    <li><a href="index-07.html">Home Version 7</a></li>
                                    <li><a href="index-08.html">Home Version 8</a></li>
								</ul>-->
							</li>
							<li>
								<a href="about.html">About</a>
							<!--	<ul class="dropdown">
									<li><a href="about.html">About</a></li>
                                    <li><a href="services.html">Services</a></li>
                                    <li><a href="right-sidebar.html">Right Sidebar</a></li>
                                    <li><a href="left-sidebar.html">Left Sidebar</a></li>
									<li><a href="404.html">404 Page</a></li>
								</ul>--->
							</li>
                            <li>
								<a href="services.html">Services</a>
								<!--<ul class="dropdown">
									<li><a href="tabs.html">Tabs</a></li>
                                    <li><a href="lists.html">Lists</a></li>
                                    <li><a href="alerts.html">Alerts</a></li>
                                    <li><a href="divider.html">Divider</a></li>
                                    <li><a href="buttons.html">Buttons</a></li>
                                    <li><a href="dropcaps.html">Dropcaps</a></li>
                                    <li><a href="action-box.html">Action Box</a></li>
                                    <li><a href="icon-boxes.html">Icon Boxes</a></li>
                                    <li><a href="testimonials.html">Testimonials</a></li>
                                    <li><a href="latest-posts.html">Latest Posts</a></li>
                                    <li><a href="latest-projects.html">Latest Projects</a></li>
                                    <li><a href="pricing.html">Pricing Tables</a></li>
									<li><a href="animated-graphs.html">Animated Graphs</a></li>
                                    <li><a href="accordion-toggles.html">Accordion & Toggles</a></li>
                                    <li><a href="touch-slider-carousel.html">Touch Slider & Carousel</a></li>
								</ul>-->
							</li>
							<li>
								<a  class=""  href="boat.html">Boat/Assets</a>
							<!--	<ul class="dropdown">
									<li><a href="portfolio-2.html">2 Columns</a></li>
                                    <li><a href="portfolio-3.html">3 Columns</a></li>
									<li><a href="portfolio-4.html">4 Columns</a></li>
                                    <li><a href="single-project.html">Single Project</a></li>
								</ul>-->
							</li>
                            <li>
								<a href="projects.php">Project</a>
							<!--	<ul class="dropdown">
									<li><a href="blog.html">Blog - right Sidebar</a></li>
                                    <li><a href="blog-left-sidebar.html">Blog - Left Sidebar</a></li>
                                    <li><a href="single-post.html">Blog Single Post</a></li>
								</ul>--->
							</li>
							<li><a href="contact.html">Contact</a></li>
						</ul>
                        <!-- End Navigation List -->
					</div>
				</div>
			</div>
            <!-- End Header ( Logo & Naviagtion ) -->
          
		</header>
		<div class="ab" style="position:relative;width:100%;text-align:center; margin-top:100px;">
        <div class="cd">
            <div class="aboutban" >
                
                        
                        
                        <div style="margin-top:40px;position:absolute;width:100%;text-align:center;"><h4 style="font-size:28px;color:#ffd950;font-weight:bold;">Admin</h4></div>
                       
                        <a href="index.html" class="text2"style="position:absolute;font-size:14px;color:#084597;font-weight:bold;margin-top:100px;width:100%;text-align:center;"><i class="fa fa-home"style="color:#084597;"></i>   Home
                        </a>
						
						
						<a href="logout.php" class="text2"style="position:absolute;font-size:14px;color:#084597;font-weight:bold;margin-top:130px;width:100%;text-align:center;"><i class="fa fa-home"style="color:#084597;"></i>   Logout
                        </a>
						<img style="width:100%;height:200px;" src="images/boatban.jpg" >
	
	</div>
	</div>
	</div>
      <section>
         <!-- CAROUSEL -->  
         <?php
								error_reporting(0);
include_once("connection.php");
$sql="select * from tbl_admin where a_id='$log'";
$query=mysqli_query($conn, $sql) or die("Error");
$row=mysqli_fetch_array($query);


$addr=$row['address'];
$city=$row['city'];
$state=$row['state'];
$uname=$row['username'];
$pwd=$row['password'];

$mobile=$row['contact_no'];
$phone=$row['postal_code'];
					
								?>
      
        
         <!-- ASIDE NAV AND CONTENT -->
         <div class=" container line" style="margin-top:20px;">
		 <div class="col-md-12 text-center" style="padding:10px 0px 0px 0px; margin:30px; auto;">
		 <a class="ad_menu" href="superadmin.php"></i>Admin</a> 
			<a class="ad_menu" href="master_gallery.php"></i>Gallery Title</a> 
			<a class="ad_menu" href="gl_img_upload.php">  Gallery Image</a></div>
		 
            <div class="box margin-bottom" >
               <div class="margin" >
                  <!-- CONTENT -->
                 <div class="col-md-12 font ">
				 
				 <h4>Welcome, Administrator</h4>

				 </div>
				 
                     <div class="login-page">
					    
						
      <form id="demo-form2" data-parsley-validate class="form-horizontal" method="POST">
                                
								 <div class="form-group">
                                            <label for="middle-name" class="control-label col-md-4 col-sm-4 col-xs-12">User Name</label>
                                            <div class="col-md-4 col-sm-4 col-xs-12">
                                                <input id="uname" value="<?php echo $uname;?>" class="form-control" type="text" name="uname">
                                            </div>
                                        </div>
				<div class="form-group" >
                                            <label for="middle-name" class="control-label col-md-4 col-sm-4 col-xs-12">Password</label>
                                            <div class="col-md-4 col-sm-4 col-xs-12">
                                                <input id="pwd"  value="<?php echo $pwd;?>" class="form-control " type="text" name="pwd">
                                            </div>
                                        </div>
									<div class="col-md-12" style="padding:0px 50px 0px 50px;"><hr  ></div>
									<div class="col-md-12" style="padding:0px 50px 0px 50px;"><Label><u>Admin Details</u></label></div>
                                      
                                       
                                        <div class="form-group">
                                            <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Address</label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <textarea id="addr"  class="form-control col-md-7 col-xs-12" type="text" name="addr"><?php echo $addr;?></textarea>
                                            </div>
                                        </div>
								
										
									
										 <div class="form-group">
                                            <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">City</label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="city" value="<?php echo $city;?>" class="form-control col-md-7 col-xs-12" type="text" name="city">
                                            </div>
                                        </div>
													  
										   <div class="form-group">
                                            <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">State</label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="state" value="<?php echo $state;?>" class="form-control col-md-7 col-xs-12" type="text" name="state">
                                            </div>
                                        </div>
										<!--<div class="form-group">
                                            <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Country</label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="country" value="<?php echo $country;?>" class="form-control col-md-7 col-xs-12" type="text" name="country">
                                            </div>
                                        </div>--->
										<div class="form-group">
                                            <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Mobile</label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="mobile" value="<?php echo $mobile;?>" class="form-control col-md-7 col-xs-12" type="text" name="mobile">
                                            </div>
                                        </div>
										<div class="form-group">
                                            <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Phone</label>
                                            <div class="col-md-6 col-sm-6 col-xs-12">
                                                <input id="phone" value="<?php echo $phone;?>" class="form-control col-md-7 col-xs-12" type="text" name="phone">
                                            </div>
                                        </div>
										
                                      
                                   
							
                                        <div class="ln_solid"></div>
                                        <div class="form-group">
                                            <div class="col-md-12 col-sm-12 col-xs-12 text-center">
                                                
                                                <button type="submit" name="insertsubmit" class="btn btn-success">Submit</button>
                                            </div>
                                        </div>

                                    </form>

		
									  
									  
									  
  <br/>								
  
 
			   </div>
			 

				 </div>
				  
				  
				  
				  
				  
				  
                 
               </div>
	
		
            </div>
         </div>
       
      </section>
	  <footer>
			<div class="container">
				<div class="row footer-widgets">
                  
                    <!-- Start Contact Widget -->
					<div class="col-md-4">
                        <div class="footer-widget contact-widget">
							<h4>About Us<span class="head-line"></span></h4>
							<p>SP Dynamic Venture Sdn Bhd was venture company between Straight Perkasa Services and Dynamic Group of companies to provide a variety of marine services to domestic market in Malaysia.</p>
						</div>
					</div>
                    <!-- End Contact Widget -->
                  
                    <!-- Start Flickr Widget -->  
                    <div class="col-md-4">
						<div class="footer-widget flickr-widget">
							<h4>Visitors<span class="head-line"></span></h4>
								<a href="https://info.flagcounter.com/BxwQ"><img src="https://s04.flagcounter.com/count2/BxwQ/bg_222222/txt_FFFFFF/border_CCCCCC/columns_3/maxflags_15/viewers_3/labels_1/pageviews_1/flags_0/percent_0/" alt="Flag Counter" border="0"></a>
						</div>
					</div>
                    <!-- End Flickr Widget -->
                    
                    <!-- Start Twitter Widget -->
				
                    <!-- End Twitter Widget -->
                    
					<!-- Start Subscribe & Social Links Widget -->
                    <div class="col-md-4">
						<div class="footer-widget contact-widget">
							<h4>Contact info<span class="head-line"></span></h4>
							<ul>
								<li><span>Address:</span> No.26-01 JalanMolek 1/9, TmnMolek, 81100 Johor Bahru.</li>
								<li><span>Phone Number:</span> 07-364 7792 </li>
                               
								<li><span>Email:</span> <a href="http://zoomarts.works/cdn-cgi/l/email-protection" > enquiry@spdventure.com</a></li>
                                
							</ul>
						</div>
                     
					</div>
				</div>
                <!-- End Subscribe & Social Links Widget -->
              
                <!-- Start Copyright -->
				<div class="copyright-section">
					<div class="row">
						<div class="col-md-6">
							<p>© 2017 SP DYNAMIC VENTURE  -  All Rights Reserved</p>
						</div>
						<div class="col-md-6" >
							<p class="footer_global"><a href="http://www.krglobalsystems.com/" target="_blank">KR Global Systems</a></p>
						</div>						
					</div>
				</div>
                <!-- End Copyright -->
                
			</div>
		</footer>
      <!-- FOOTER -->
	  <?php 
if (isset($_POST['insertsubmit']))
{
	error_reporting(0);
include_once("connection.php");
	
	$addr=$_POST['addr'];
	$city=$_POST['city'];
	$state=$_POST['state'];
	$uname=$_POST['uname'];
	$pwd=$_POST['pwd'];
	$mobile=$_POST['mobile'];
	$phone=$_POST['phone'];
	

	
	$sql="update tbl_admin set address='$addr',city='$city',state='$state',username='$uname',password='$pwd',contact_no='$mobile',postal_code='$phone' where a_id='".$_SESSION['lg_id']."'";
	
$query=mysqli_query($conn, $sql) or die("Error");
;
echo "<script type='text/javascript'>window.location.href='superadmin.php'</script>";
	
	
}	
?>
	  

</div>	
  <div class="modal fade"  id="modal-signin" tabindex="-1" role="dialog" aria-labelledby="modal-signin" aria-hidden="true" >
  <div class="modal-dialog modal-lg">

    <!-- Modal content-->
    <div class="modal-content my-modal-style">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title"><b>Upload Alerts</b></h4>
      </div>
	  
      <div class="modal-body">
	  <form method="POST" action="alert_insert.php" name="alert_insert_update" id="alert_insert_update">
       <div class="row">
	   <div class="col-md-4">
	   <label>News Title:</label>
	   <input type="text" name="altitle1" id="altitle1" class="form-control" />
	   </div>
	     <div class="col-md-4">
	  <label for="alby">News By:</label><input type="text" id="alby1"  class="form-control " name="alby1" >
	
	   </div>
	     <div class="col-md-4">
	 	  <label for="aldate">News Date:</label> <input type="text" name="aldate1" id="aldate1"  class="form-control"  >
	   </div>
	   
	   
	   </div>
	   <div class="row"><div class="col-md-12">
	   <textarea id="txtEditor2"  >
	   </textarea>
					<input type="hidden" name="desc1" id="desc1">
					<input type="hidden" name="alert_id" id="alert_id"></div>
      </div>
	   <div class="row"><div class="col-md-12 text-center" style="padding-top:12px;">
	    <button id="alert_title_insert1" name="gallery_title_insert1"  class="btn btn-danger">Save</button>
	   </div>
      </div></div>
	  </form>
	   
     
    </div>

  </div>
</div>  

      <script type="text/javascript">
         jQuery(document).ready(function($) {	  
           $("#owl-demo").owlCarousel({		
           	navigation : true,
           	slideSpeed : 300,
           	paginationSpeed : 400,
           	autoPlay : true,
           	singleItem:true
           });
           $("#owl-demo2").owlCarousel({
        		items : 4,
           	lazyLoad : true,
           	autoPlay : true,
           	navigation : true,
           	pagination : false
           });
         });	 
      </script>
	  
	  
   </body>
</html>