<?php  session_start();
	error_reporting(0);
	
if($_SESSION['lg_id']=='') {
   echo "<script type='text/javascript'>window.location.href = 'index.html';</script>";
	
}
	?>
	
	<?php
include_once("connection.php");
$select_master_gallery_title="select gi_id, title, title_desc from tbl_gallery_img where gi_id='".$_GET['id']."' ";
$exec_select_master_gallery_title=mysqli_query($conn,$select_master_gallery_title) or die("error");
$row=mysqli_fetch_array($exec_select_master_gallery_title);
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en"><!--<![endif]-->


<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>

 
	<!----------services---------->
	<!-----------------------datatable------------------------------>
	<script src="js/datatable/jquery-1.12.4.js" type="text/javascript"></script>
    <script src="js/datatable/jquery.dataTables.min.js" type="text/javascript"></script>
	<script src="js/datatable/dataTables.bootstrap.min.js" type="text/javascript"></script>
	<script src="js/datatable/dataTables.responsive.min.js" type="text/javascript"></script>
	<link rel='stylesheet' href='css/datatable/bootstrap.min.css' type='text/css' media='all' />
    <link rel='stylesheet' href='css/datatable/dataTables.bootstrap.min.css' type='text/css' media='all' />
	<link rel='stylesheet' href='css/datatable/responsive.bootstrap.min.css' type='text/css' media='all' />
	<!-----------------------datatable 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();
	 $('#example').DataTable({
				 "bProcessing": true,
         "serverSide": true,
		 "responsive": true,
         "ajax":{
            url :"gallery_image_grid.php", // json datasource
            type: "post",  // type of method  ,GET/POST/DELETE
            error: function(){
              $("#employee_grid_processing").css("display","none");
            }
			
          }
        });
	$('#gallery_title_frm').submit(function(evt) {
                evt.preventDefault();

                var formData = new FormData(this);
//alert($(this).attr('action'));
if($("#gtitle").val()!=''){
	
 $.LoadingOverlay("show");
                $.ajax({
                type: 'POST',
                url: $(this).attr('action'),
                data:formData,
                cache:false,
                contentType: false,
                processData: false,
                success: function(data) {
                   //alert(data.op);
				   if(data.op==1){
					   $('#example').DataTable().ajax.reload();
				   $('#ins_message').html("uploaded Sucessfully");
				   setTimeout(function(){ 
								$("#ins_message").html(""); $.LoadingOverlay("hide"); }, 5000);
				                $("#gtitle,#sm_image,#bg_image").val('');
				   }
                },
                error: function(data) {
                    $('#imagedisplay').html("<h2>this file type is not supported</h2>");
                }
                });
	}
	else{
		  $('#ins_message').html("Fill all details Correctly");
	}
            });


					$('#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_img_delete.php",
							
							data: {data_ids:ids_string},
							success: function(result) {
								
							},
							async:false
							
						});
						$('#example').DataTable().ajax.reload();
					}
					else{
						alert("Please select only one row");
					}
				});
	

				    $("#gallery_title_insert").click(function(){
        
		if($("#p_title").val()!=''){
		$.LoadingOverlay("show");
		$.ajax({
			type:'POST',
			data:$("#gallery_title_frm").serialize(),
			url:"gallery_title_update.php",
			success: function(result) {
								
								if(result.op==1){
									window.location.href='gl_img_upload.php';
								$('#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);
		}
    });
	
				
	
	
});
</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 id="roof-care" >
	<!-- BOF Loader -->
	
		
	

    
    <!-- EOF Loader -->
<!--button-->
<button class="slicknav_btn">
    <i class="fa fa-tasks"></i>
</button>
  
     
    
    
    <!-- BOF Header -->
    
        
    < <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>
							
							
 
     
	 
  <div class="jx-container jx-darkgrey-bg jx-padding logo-block">
        
        	<div class="jx-container-slope jx-top-slope jx-right-slope" ></div>
            <!-- container slope -->
                        
            <div class="container" id="care" style="background-color:#fff;"  > 
             
               <div class="row gallery_form" >
			   
			<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="row" style="padding:10px 0px 10px 0px;margin:10px 10px 10px 10px;border:3px solid #ffcc00;border-radius:5px;">
			 <form method="POST" action="class_gallery_image.php" id="gallery_title_frm" name="gallery_title_frm" enctype="multipart/form-data">
			 
			 <!--   <div class="col-md-4"><label>Image</label><input type="file" name="sm_image" id="sm_image" class="form-control"/></div>-->
			 <input type="hidden" name="gi_id" id="gi_id" class="form-control" value="<?php echo $row['gi_id'];?> "/>
			 
				<div class="col-md-4"><label>Title</label><input type="text" name="p_title" id="p_title" class="form-control" value="<?php echo $row['title']; ?>"/></div>
				<div class="col-md-4"><label>Title_Description</label><input type="text" name="p_title_desc" id="p_title_desc" class="form-control" value="<?php echo $row['title_desc']; ?>"/></div>
				<!--<div class="col-md-4"><label>Big Image</label><input type="file" name="bg_image" id="bg_image" class="form-control"/></div>-->
			   <div class="col-md-3  col-md-offset-4 text-center" style="padding-top:22px;">
			    
					<button type="submit" id="gallery_title_insert" name="gallery_title_insert" class="btn btn-danger ">SAVE</button></div>
				 <div class="col-md-12 text-center" id="ins_message" style="padding:22px 0px 0px 0px;" ></div>
			
			   </form>
			
        </div>
		<div class="row">

				 <div class="col-md-2 text-center" style="">
			    
			     
		</br>
		
	</div>
	</div>
            </div>
        </div>
<!--------------------contact------------------->




	
<!--------------------/contact------------------->
		
       <!-- BOF Footer -->
   
		
        
        		<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="#" > 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>
        
			
     
    <!-- EOF Footer -->
    
        
    <!-- Footer -->
	



</body>


</html>