<?php 
session_start();
ob_start();
include("../../pidbco/pidbjoin.php");
$sujpath="./";
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Projects</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.5 -->
    <link rel="stylesheet" href="<?php echo $sujpath; ?>bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="<?php echo $sujpath; ?>font-awesome/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="<?php echo $sujpath; ?>font-awesome/ionicons.min.css">
    <!-- DataTables -->
    <link rel="stylesheet" href="<?php echo $sujpath; ?>plugins/datatables/dataTables.bootstrap.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="<?php echo $sujpath; ?>dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="<?php echo $sujpath; ?>dist/css/skins/_all-skins.min.css">
    
    <script src="assets/jquery.min.js"></script>
    <script>
    
    $(document).ready(function(){
    $.ajax({
     type: "POST",
     url: "ajaxmarket5.php",
     data: {
      viewallcust     : 1
     },
     cache: true,
     success: function(res1)
     {    	
        $('#view_allcust').html(res1);
     }
  });
 });
 
  function view_all(){
   $.ajax({
    type: "POST",
    url: "ajaxmarket5.php",
    data: {
      viewallcust     : 1
    },
    cache: true,
    success: function(res1)
    {
      $('#view_allcust').html(res1);
    }
    });
   }
    
    
    
    
    function isValidEmail(email)
    {
    return /^[a-z0-9]+([-._][a-z0-9]+)*@([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,4}$/.test(email)
        && /^(?=.{1,64}@.{4,64}$)(?=.{6,100}$).*/.test(email);
    }
   
   	
   	
   	
   	    function add_new_customer()
   	    {
   	     var vcompany     = $('#vcompany').val();
     	 var vtype    = $('#vtype').val();
     	 var vcontact = $('#vcontact').val();
     	 var vdesignatn = $('#vdesignatn').val();
     	 
     	 var vmob    = $('#vmob').val();
     	 var vmob2  = $('#vmob2').val();
     	 var vemail  = $('#vemail').val();
     	 var vemail2    = $('#vemail2').val();
     	 var vland1     = $('#vland1').val();
     	 var vland2     = $('#vland2').val(); 
     	 var vmob3  = $('#vmob3').val();
       var vemail3  = $('#vemail3').val();   	 
     	 var permantaddrs    = $('#permantaddrs').val();
     	 var commnctnaddrs    = $('#commnctnaddrs').val();
     	 var vdistrict = $('#vdistrict').val();
     	 var vstate   = $('#vstate').val();
     	 var vcountry  = $('#vcountry').val();
     	 var vpincode  = $('#vpincode').val();
     	 var vremarks   = $('#vremarks').val();
     	 
     	 var vreferred   = $('#vreferred').val();
     	 var vsource   = $('#vsource').val();
     	 
     	  var vgoogle   = $('#vgoogle').val();
     	   var vstatus   = $('#vstatus').val();
         var gstNo   = $('#gstNo').val();
     	 
     	 var add_new_customer =1;
         var input1 = document.getElementById("vlogo");
          var input2 = document.getElementById("vbusiness");
        //alert(vmob2+vmob3+vemail+vemail3);
         if(vcompany == ''){
             alert("Enter Company Name");
         } else if(vmob == ''){
      	     alert("Enter Mobile");
         } else {	
      
         file1 = input1.files[0];
         file2 = input2.files[0];
         formData= new FormData();
         formData.append("image1", file1);
         formData.append("image2", file2);
      
         formData.append("add_new_customer", add_new_customer);
         formData.append("vcompany", vcompany);
         formData.append("vtype", vtype);
         formData.append("vcontact", vcontact);
         formData.append("vdesignatn", vdesignatn);
         
         formData.append("vmob", vmob);
         formData.append("vmob2", vmob2);
         formData.append("vemail", vemail);
         formData.append("vemail2", vemail2);
         formData.append("vland1", vland1);
         formData.append("vland2", vland2);
         formData.append("vmob3", vmob3);
         formData.append("vemail3", vemail3);

         formData.append("permantaddrs", permantaddrs);
         formData.append("commnctnaddrs", commnctnaddrs);      
         formData.append("vdistrict", vdistrict);
         formData.append("vstate", vstate);
         formData.append("vcountry", vcountry);
         formData.append("vpincode", vpincode);
         formData.append("vremarks", vremarks);
      
      formData.append("vreferred", vreferred);
      formData.append("vsource", vsource);
      
      formData.append("vgoogle", vgoogle);
      formData.append("vstatus", vstatus);
      formData.append("gstNo", gstNo);
        $.ajax({
        url: "ajaxmarket.php",
        type: "POST",
        data: formData,
        processData: false,
        contentType: false,
        cache: false,
        success: function(data){         	
        	alert("New Customer Added");
        	view_all();
        }
     });   
    }
   	    	
   	    }
   	
   	
   	
   	
   	
   	
   	
     function edit_new_customer()
     {
            var vcompany     = $('#vcompany').val();
     	 var vtype    = $('#vtype').val();
     	 var vcontact = $('#vcontact').val();
     	 var vdesignatn = $('#vdesignatn').val();
     	 
     	 var vmob    = $('#vmob').val();
     	 var vmob2  = $('#vmob2').val();
     	 var vemail  = $('#vemail').val();
     	 var vemail2    = $('#vemail2').val();
     	 var vland1     = $('#vland1').val();
     	 var vland2     = $('#vland2').val(); 
     	 
       var vmob3  = $('#vmob3').val();
       var vemail3  = $('#vemail3').val();

     	 var permantaddrs    = $('#permantaddrs').val();
     	 var commnctnaddrs    = $('#commnctnaddrs').val();
     	 var vdistrict = $('#vdistrict').val();
     	 var vstate   = $('#vstate').val();
     	 var vcountry  = $('#vcountry').val();
     	 var vpincode  = $('#vpincode').val();
     	 var vremarks   = $('#vremarks').val();
     	 
     	 var vreferred   = $('#vreferred').val();
     	 var vsource   = $('#vsource').val();
     	 var gstNo   = $('#gstNo').val();
     	  var vgoogle   = $('#vgoogle').val();
     	   var vstatus   = $('#vstatus').val();
     	   
     	   var hidvall = $('#hidvall').val();
     	 
     	 var edit_new_customer =1;
         var input1 = document.getElementById("vlogo");
          var input2 = document.getElementById("vbusiness");
      
         if(vcompany == ''){
             alert("Enter Company Name");
         } else if(vmob == ''){
      	     alert("Enter Mobile");
         } else {	
      
         file1 = input1.files[0];
         file2 = input2.files[0];
         formData= new FormData();
         formData.append("image1", file1);
         formData.append("image2", file2);
      
         formData.append("edit_new_customer", edit_new_customer);
         formData.append("vcompany", vcompany);
         formData.append("vtype", vtype);
         formData.append("vcontact", vcontact);
         formData.append("vdesignatn", vdesignatn);
         
         formData.append("vmob", vmob);
         formData.append("vmob2", vmob2);
         formData.append("vemail", vemail);
         formData.append("vemail2", vemail2);
         formData.append("vland1", vland1);
         formData.append("vland2", vland2);

         formData.append("vmob3", vmob3);
         formData.append("vemail3", vemail3);
         
         formData.append("permantaddrs", permantaddrs);
         formData.append("commnctnaddrs", commnctnaddrs);      
         formData.append("vdistrict", vdistrict);
         formData.append("vstate", vstate);
         formData.append("vcountry", vcountry);
         formData.append("vpincode", vpincode);
         formData.append("vremarks", vremarks);
      
      formData.append("vreferred", vreferred);
      formData.append("vsource", vsource);
      
      formData.append("hidvall", hidvall);
      
      formData.append("vgoogle", vgoogle);
      formData.append("vstatus", vstatus);
      formData.append("gstNo", gstNo);
        $.ajax({
        url: "ajaxmarket.php",
        type: "POST",
        data: formData,
        processData: false,
        contentType: false,
        cache: false,
        success: function(data){         	
        	alert("Customer Data Updated");
        	$("#marketingdiv2").load("customer.php #marketingdiv2"); 
        	view_all();
        }
     });   
    }

        }
        
        
    	
    	    	
    	function delete_customer(id)
    	{
    		var result = confirm("Want to delete?");
			if (result) 
			{
     		$.ajax({
			type: "POST",
			url: "ajaxmarket.php",
			data: {
			btn_delete_customers: 1,
			id:id
			},
			cache: true,
			success: function(res)
			{
			      //$("#marketingdiv123").load("customer.php #marketingdiv123");
			      //datat();
			      alert("Data Deleted");
			      view_all();
         	}  
			});
   			}
    	}
    	
    	
    	function edit_customer(id)
    	{   
    		$.ajax({
			type: "POST",
			url: "ajaxmarket.php",
			data: {
			btn_edit_market: 1,
			id:id
			},
			cache: true,
			success: function(res)
			{
	         	$("#marketingdiv2").load("customer.php?idd2="+id+" #marketingdiv2"); 	
			}  
			});
    	}
    	
    	
function state_change(str)
{
var xmlhttp;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("vdistrict").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","ajaxmarket.php?state_idd="+str,true);
xmlhttp.send();
}

    function setbutton(){
      document.getElementById('frasubmit1').style.display='none';
    }
    </script>
    
  </head>
  <body class="hold-transition skin-blue sidebar-mini" onload="setbutton()">
     <div class="wrapper">
  <?php include("head.php");
    include("left.php"); 
    ?> 
	 
      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper" >
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1> Customers
          	<small>- Control panel</small>
          	</h1>
          <ol class="breadcrumb">
            <li><a href="index.php"><i class="fa fa-dashboard"></i> Home</a></li>
            <li class="active">Customers</li> 
          </ol>
        </section>
  <!-- Main content -->
        <section class="content" >
          <div class="row" >
            <div class="col-xs-12" >


         	 
         
      <div class="col-md-5" style="padding-left: 0px">
        <div id="customer123">
      	<div class="box" >
          <div class="box-body" style="padding-left: 10px;padding-right: 10px;">
            <div class="x_panel">
              <div class="x_content" id="marketingdiv2">
               <?php
               if(empty($_GET)){
        
                  //$idd2 = strip_tags(base64_decode($_GET['idd2']));
                  $cname1='';
                  $ccontact1='';
                  $cdesignatn1='';
                  $cmob1='';
                  $cemail1='';
                  $cphone1='';
                  $cmob2='';
                  $cemail2='';
                  $cphone2='';
                  $cmob3='';
                  $cemail3='';
                  $perm_addr1='';
                  $comm_addr1='';
                  $cpincode1='';
                  $cremarks1='';
                  $crefered1='';
                  $cgoogle1='';
                  $cstatus1='';
                  $ctype1='';
                  $csource1='';
                  $gstNo='';
                }else{
                   $idd2 = strip_tags(base64_decode($_GET['idd2']));
	                 $sq = mysqli_query($con, "SELECT * FROM `p_customers` WHERE `cid`='$idd2' " );
	                 $rs = mysqli_fetch_assoc($sq);
                  $cname1=$rs['cname'];
                  $ccontact1=$rs['ccontact'];
                  $cdesignatn1=$rs['cdesignatn'];
                  $cmob1=$rs['cmob'];
                  $cemail1=$rs['cemail'];
                  $cphone1=$rs['cphone1'];
                  $cmob2=$rs['cmob2'];
                  $cemail2=$rs['cemail2'];
                  $cphone2=$rs['cphone2'];
                  $cmob3=$rs['cmob3'];
                  $cemail3=$rs['cemail3'];
                  $perm_addr1=$rs['perm_addr'];
                  $comm_addr1=$rs['comm_addr'];
                  $cpincode1=$rs['cpincode'];
                  $cremarks1=$rs['cremarks'];
                  $crefered1=$rs['crefered'];
                  $cgoogle1=$rs['cgoogle'];
                  $cstatus1= $rs['cstatus'];
                  $ctype1=$rs['ctype'];
                  $csource1=$rs['csource'];
                  $gstNo=$rs['gstNo'];
                  } ?>              	
                <div class="form-horizontal form-label-left">
                   
                   <div class="panel panel-default">
                    <div class="panel-heading">
                      <i class="fa fa fa-users"></i> &nbsp; Add New Customer
                    </div></div>  
                    
                    
                    <div class="form-group">
                      <div class="col-md-12 col-sm-12 col-xs-12">
                      	<input type="text" name="vcompany" id="vcompany" class="form-control" placeholder="Company Name" value="<?php echo $cname1; ?>"/>
                     </div></div> 
                     
                     <div class="form-group">
                      <div class="col-md-12 col-sm-12 col-xs-12">
                      	<select name="vtype" id="vtype" class="form-control" >
                      		<option value="">Type</option>
                      		<option value="Silver" <?php if($ctype1 == 'Silver'){ ?> selected <?php } ?> >Silver</option>
                      		<option value="Gold" <?php if($ctype1 == 'Gold'){ ?> selected <?php } ?>>Gold</option>
                      		<option value="Diamond" <?php if($ctype1 == 'Diamond'){ ?> selected <?php } ?>>Diamond</option>
                      		                      		
                      	</select>
                      </div></div>	
                     
                     <div class="form-group">
                      <div class="col-md-6 col-sm-12 col-xs-12">
                      	<input type="text" name="vcontact" id="vcontact" class="form-control" placeholder="Contact Person" value="<?php echo $ccontact1; ?>"/>
                     </div>
                      <div class="col-md-6 col-sm-12 col-xs-12">
                      	<input type="text" name="vdesignatn" id="vdesignatn" class="form-control" placeholder="Designation" value="<?php echo $cdesignatn1; ?>" />
                     </div></div> 
                     
                     
                     
                     <div class="form-group">
                      <div class="col-md-6 col-sm-12 col-xs-12">
                      	<input type="text" name="vmob" id="vmob" onkeypress="return isNumber(event)" class="form-control" placeholder="Mobile1" value="<?php echo $cmob1; ?>"/>
                     </div>
                      <div class="col-md-6 col-sm-12 col-xs-12">
                      	<input type="text" name="vmob2" id="vmob2" onkeypress="return isNumber(event)" class="form-control" value="<?php echo $cmob2; ?>" placeholder="Mobile2"/>
                     </div></div> 

                     <div class="form-group">
                     <div class="col-md-6 col-sm-12 col-xs-12">
                        <input type="text" name="vmob3" id="vmob3" onkeypress="return isNumber(event)" class="form-control" value="<?php echo $cmob3; ?>" placeholder="Mobile3"/>
                     </div> 
                     
                     
                      <div class="col-md-6 col-sm-12 col-xs-12">
                      	<input type="text" name="vemail" id="vemail" class="form-control" placeholder="Email1" value="<?php echo $cemail1; ?>"/>
                     </div></div>

                     <div class="form-group">

                      <div class="col-md-6 col-sm-12 col-xs-12">
                      	<input type="text" name="vemail2" id="vemail2" class="form-control" placeholder="Email2" value="<?php echo $cemail2; ?>"/>
                     </div>

                     <div class="col-md-6 col-sm-12 col-xs-12">
                        <input type="text" name="vemail3" id="vemail3" class="form-control" placeholder="Email3" value="<?php echo $cemail3; ?>"/>
                     </div></div> 
                     
                     <div class="form-group">
                      <div class="col-md-6 col-sm-12 col-xs-12">
                      	<input type="text" name="vland1" id="vland1" class="form-control" placeholder="Land Phone1" value="<?php echo $cphone1; ?>"/>
                     </div>
                      <div class="col-md-6 col-sm-12 col-xs-12">
                      	<input type="text" name="vland2" id="vland2" class="form-control" placeholder="Land Phone2" value="<?php echo $cphone2; ?>"/>
                     </div></div> 
                     
                     
                     <div class="form-group">
                      <div class="col-md-12 col-sm-12 col-xs-12">
                        <textarea name="permantaddrs" id="permantaddrs" class="form-control" placeholder="Permanant Address" ><?php echo $perm_addr1; ?></textarea>
                      </div></div>
                     
                     <div class="form-group">
                      <div class="col-md-12 col-sm-12 col-xs-12">
                        <textarea name="commnctnaddrs" id="commnctnaddrs" class="form-control" placeholder="Communication Address"><?php echo $comm_addr1; ?></textarea>
                      </div></div>
                      
                      
                      
                       
                      
                      
                      <div class="form-group">

                         <div class="col-md-6 col-sm-12 col-xs-12">
                        <select name="vcountry" id="vcountry" class="form-control">
  <option value="" >Country</option>
    <?php
  $sq2 = mysqli_query($con,"SELECT id,country_name FROM `countries` ");
  while($res2 = mysqli_fetch_array($sq2)){
     if($res2['country_name'] == 'India'){ ?> 
  <option value="<?php echo $res2['country_name']; ?>" selected><?php echo ucfirst($res2['country_name']); ?></option>
  <?php } else if($rs['ccountry'] == $res2['country_name']) { ?>
  <option value="<?php echo $res2['country_name']; ?>" selected><?php echo ucfirst($res2['country_name']); ?></option>
  <?php } else { ?>
    <option value="<?php echo $res2['country_name']; ?>"><?php echo ucfirst($res2['country_name']); ?></option>
    <?php } } ?>
</select>
                     </div>

                     
                      <div class="col-md-6 col-sm-12 col-xs-12">
                      	 <select class="form-control" id="vstate" name="vstate" onchange="state_change(this.value);">
  <option value="">State</option>
        <?php
        $stmt01 = mysqli_query($con,"SELECT * FROM `states` ");
        while($res01 = mysqli_fetch_array($stmt01)) {
          if($res01['state_name'] == 'KERALA'){ ?>
        <option value="<?php echo $res01['state_name']; ?>" selected><?php echo $res01['state_name']; ?></option>  			
        <?php } else if($rs['cstate'] == $res01['state_name']){ ?>
        <option value="<?php echo $res01['state_name']; ?>" selected><?php echo $res01['state_name']; ?></option>
	    <?php } else { ?>		 
         <option value="<?php echo $res01['state_name']; ?>"><?php echo $res01['state_name']; ?></option>
        <?php } } ?>
  </select> 
                     </div>
                     </div>
                     
                     
                     
                     <div class="form-group">
                       <div class="col-md-6 col-sm-12 col-xs-12">
                        <select class="form-control" id="vdistrict" name="vdistrict"  >
    <option value="">District</option>
     <?php 
     $dis = $rs['cdistrict'];
   $sta = $rs['cstate'];
   if($sta == ''){
    $sta = 'Kerala';
   }
   $stmt01 = mysqli_query($con,"SELECT * FROM `cities` WHERE `state_name`='$sta' ");
        while($res01 = mysqli_fetch_array($stmt01)) {
           if($res01['cities_name'] == 'Thrissur'){ ?>
         <option value="<?php echo $res01['cities_name']; ?>" selected><?php echo $res01['cities_name']; ?></option>     
          <?php } else if($res01['cities_name'] == $dis){ ?> 
        <option value="<?php echo $res01['cities_name']; ?>" selected><?php echo $res01['cities_name']; ?></option> 
        <?php } else { ?> 
        <option value="<?php echo $res01['cities_name']; ?>"><?php echo $res01['cities_name']; ?></option>    
       <?php } } ?>
    </select>
                     </div>
                     
                     <div class="col-md-6 col-sm-12 col-xs-12">
                      	<input type="text" name="vpincode" id="vpincode" class="form-control" placeholder="Pincode" value="<?php echo $cpincode1; ?>" />
                     </div>                     
                     </div> 
                     
                     
                     
                      <div class="form-group">
                      <div class="col-md-12 col-sm-12 col-xs-12">
                        <textarea name="vremarks" id="vremarks" class="form-control" placeholder="Remarks"><?php echo $cremarks1; ?></textarea>
                      </div></div>
                      
                     <div class="form-group">
                       <div class="col-md-6 col-sm-12 col-xs-12">    
                       	<input type="text" name="vreferred" id="vreferred" class="form-control" placeholder="Referred By" value="<?php echo $crefered1; ?>"/>                  	
                       </div>
                       <div class="col-md-6 col-sm-12 col-xs-12">   
                       	<select name="vsource" id="vsource" class="form-control">
                       	   <option value="">Source</option> 
                       	   <option value="NewsPaper" <?php if($csource1 == 'NewsPaper'){ ?> selected <?php } ?> >NewsPaper</option>
                           <option value="E-Directory" <?php if($csource1 == 'E-Directory'){ ?> selected <?php } ?> >E-Directory</option>
                           <option value="Magazine" <?php if($csource1 == 'Magazine'){ ?> selected <?php } ?> >Magazine</option>
                           <option value="Staff" <?php if($csource1 == 'Staff'){ ?> selected <?php } ?> >Staff</option>
                           <option value="Referred" <?php if($csource1 == 'Referred'){ ?> selected <?php } ?> >Referred</option>
                           <option value="Marketing" <?php if($csource1 == 'Marketing'){ ?> selected <?php } ?> >Marketing</option>
                           <option value="Other" <?php if($csource1 == 'Other'){ ?> selected <?php } ?> >Other</option>                      	   
                       	</select>               
                       </div>
                     </div>	
                      	
                      
                     
                     
                     <div class="form-group">
                      <div class="col-md-12 col-sm-12 col-xs-12">
                      	<input type="text" name="vgoogle" id="vgoogle" class="form-control" placeholder="Google Link" value="<?php echo $cgoogle1; ?>" />
                     </div></div> 
                     
                     <div class="form-group">

                      <div class="col-md-6 col-sm-12 col-xs-12">
                        <input type="text" name="gstNo" id="gstNo" class="form-control" placeholder="GST NO" value="<?php echo $gstNo; ?>" />
                     </div> 
                     
                     
              
                      <div class="col-md-6 col-sm-12 col-xs-12">
                       <select name="vstatus" id="vstatus" class="form-control">
                       <option value="Live" <?php if($cstatus1 == 'Live'){ ?> selected <?php } ?> >Live</option>
                       	<option value="Lost" <?php if($cstatus1 == 'Lost'){ ?> selected <?php } ?>>Lost</option>
                       	<option value="Closed" <?php if($cstatus1 == 'Closed'){ ?> selected <?php } ?>>Closed</option>
                       </select>
                     </div>
                   </div>

                    
                      <div class="form-group">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                        Logo  
                       <input type="file" name="vlogo" id="vlogo" />
                      </div></div>
                      
                      <div class="form-group">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                        Business Card 
                        <input type="file" name="vbusiness" id="vbusiness" />
                      </div></div>
                       
                     <div class="form-group">
                      <div class="col-md-12 col-sm-12 col-xs-12">
                      	
                      	
                      	<?php if(!empty($_GET)){ ?>
	<input type="hidden" name="hidvall" id="hidvall" value="<?php echo $rs['cid']; ?>" />
<input type="submit" class="btn btn-primary" name="frasubmit" id="frasubmit" value="Update" onclick="edit_new_customer();" style=" float: right; 
margin-right: 10px; " /> 

<?php } else { ?>
<input type="submit" class="btn btn-primary" name="frasubmit" id="frasubmit" value="Submit" onclick="add_new_customer();" style=" float: right; 
margin-right: 10px; " />	
<?php } ?>
<input type="submit" class="btn btn-primary" name="frasubmit1" id="frasubmit1" value="Back" onclick="window.location.href = 'orders.php';" style=" float: right; 
margin-right: 20px; " />

                     </div></div> 
                     
           
                    
                    

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










        <div class="col-md-7">
      	 <div class="box" >
           <div class="box-body"  style="padding-left: 10px;padding-right: 10px">
             <div class="x_panel">
                <div class="x_content" id="marketingdiv123" >
                   <div id="view_allcust">
          	
          	
          	
          


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



                           
               </div>
            </div><!-- /.row -->
        </section><!-- /.content -->
  </div><!-- /.content-wrapper -->
  </div>
	
 <!-- jQuery 2.1.4 -->
    <script src="<?php echo $sujpath; ?>plugins/jQuery/jQuery-2.1.4.min.js"></script>
    <!-- Bootstrap 3.3.5 -->
    <script src="<?php echo $sujpath; ?>bootstrap/js/bootstrap.min.js"></script>
    <!-- DataTables -->
	<script src="<?php echo $sujpath; ?>plugins/datatables/jquery.dataTables.min.js"></script>
    <script src="<?php echo $sujpath; ?>plugins/datatables/dataTables.bootstrap.min.js"></script>
    <!-- SlimScroll -->
    <script src="<?php echo $sujpath; ?>plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <!-- FastClick -->
    <script src="<?php echo $sujpath; ?>plugins/fastclick/fastclick.min.js"></script>
    <!-- AdminLTE App -->
    <script src="<?php echo $sujpath; ?>dist/js/app.min.js"></script>
    <!-- AdminLTE for demo purposes -->
    <script src="<?php echo $sujpath; ?>dist/js/demo.js"></script>
    <!-- page script -->
    
  <script type="text/javascript">
    function PreviewImage(no) {
    	var oFReader = new FileReader();
        oFReader.readAsDataURL(document.getElementById("uploadImage"+no).files[0]);
        oFReader.onload = function (oFREvent) {
            document.getElementById("uploadPreview"+no).src = oFREvent.target.result;
        };
    }
</script>

<style>
label.filebutton {
    width:120px;
    height:80px;
    overflow:hidden;
    position:relative;
}
label span input {
    z-index: 999;
    line-height: 0;
    font-size: 50px;
    position: absolute;
    top: -2px;
    left: -700px;
    opacity: 0;
    filter: alpha(opacity = 0);
    -ms-filter: "alpha(opacity=0)";
    cursor: pointer;
    _cursor: hand;
    margin: 0;
    padding:0;
}
</style>
  </body>
</html>