<?php 
$accor=$_get['accordion1'];
include("homepage.php");

?>

<!DOCTYPE html>
<html>
<head>
<title><?php echo constant("title"); ?></title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/bootstrap.min.css"> 
<link rel="stylesheet" type="text/css" href="../pages/assets/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/animate.css">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/li-scroller.css">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/slick.css">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/theme.css">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/style.css">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/style2.css">
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="../assets/js/html5shiv.min.js"></script>
<script src="../assets/js/respond.min.js"></script>
<![endif]-->
<style>
#nv_menu a:hover{

background:rgb(221,97,47);
color:white;
} 
	h1{color:rgb(221,97,47);}
	
.morecontent span {
    display: none;
}

</style>
<style type="text/css">
  .morecontent span {
    display: none;
}
.morelink {
    display: block;
}
}
</style>
<script>

$('#english').click(function(){  
        //alert(window.location.href);  
          var english=document.getElementById('english').text;
          
                  //  document.getElementById('para').style.visibility = "hidden";      
            $.ajax({
              url: "homepage.php",
           type     : 'GET',
             data: ({english: english}),
                  cache: false,
                  dataType: "text",
                  success: onSuccess
                });
    $("#resultLog").ajaxError(function(event, request, settings, exception) {
          $("#resultLog").html("Error Calling: " + settings.url + "<br />HTTP Code: " + request.status);
        });
function onSuccess(data)
        {
       // alert(data);
      $("#resultLog").html("Result: " + data);
      var english1=document.getElementById('english').text;      
      if (typeof(Storage) != "undefined") 
    {
    localStorage.setItem("type", english1);

     }	
     // window.location.href='index.php?english='+english1;
      window.location.href='success_story.php?english='+localStorage.getItem("type");
        }
        });
         
    
    $('#marathi').click(function(){    
          var marathi=document.getElementById('marathi').text;   
        //  document.getElementById('para').style.visibility = "hidden";
            $.ajax({
              url: "homepage.php",
           type     : 'GET',
             data: ({marathi: marathi}),
                  cache: false,
                  dataType: "text",
                  success: onSuccess
                });
    $("#resultLog").ajaxError(function(event, request, settings, exception) {
          $("#resultLog").html("Error Calling: " + settings.url + "<br />HTTP Code: " + request.status);
        });
function onSuccess(data)
        {
       // alert(data);
      $("#resultLog").html("Result: " + data);
      var marathi1=document.getElementById('marathi').text;  
      if (typeof(Storage) != "undefined") 
    {
    localStorage.setItem("type", marathi1);

     }	    
      window.location.href='success_story.php?marathi='+localStorage.getItem("type");
        }
        });
        
 var lang; 
function typeeng(lang)
{
//alert('hello');
	 var type1=localStorage.getItem("type");  
 window.location.href="success_story.php?english="+lang;
	
	}    
  
   function typemarathi(lang)
{
//alert('hello');
	 var type1=localStorage.getItem("type");  
 window.location.href="success_story.php?marathi="+lang;
	
	} 
	</script>
<script type="text/javascript" >
$(document).ready(function() {
    // Configure/customize these variables.
    var showChar = 150;  // How many characters are shown by default
    var ellipsestext = "...";
    var moretext = "<button><font style='color:#696969;'><b>Read More</b></font></button>";
    var lesstext = "<button><font style='color:#696969;'><b>Read Less</b></font></button>";
    

    $('.more').each(function() {
        var content = $(this).html();
 
        if(content.length > showChar) {
 
            var c = content.substr(0, showChar);
            var h = content.substr(showChar, content.length - showChar);
 
            var html = c + '<span class="moreellipses">' + ellipsestext+ '&nbsp;</span><span class="morecontent"><span>' + h + '</span>&nbsp;&nbsp;<a href="" class="morelink">' + moretext + '</a></span>';
 
            $(this).html(html);
        }
 
    });
 
    $(".morelink").click(function(){
        if($(this).hasClass("less")) {
            $(this).removeClass("less");
            $(this).html(moretext);
        } else {
            $(this).addClass("less");
            $(this).html(lesstext);
        }
        $(this).parent().prev().toggle();
        $(this).prev().toggle();
        return false;
    });
});
</script>

</head>
<body>
<div id="preloader">
  <div id="status">&nbsp;</div>
</div>
<a class="scrollToTop" href="#" style="border-color:rgb(221,97,47);"><i class="fa fa-angle-up"></i></a>
<div class="container">
  <div class="box_wrapper">
    
    <header id="header" style="border-color:rgb(221,97,47);">
     
   <?php include("header.php") ?>

  
    <section id="contentbody">
      
                
<div class="row" align="center"> 
<h1 align="center" style="<?php echo $bgcolor; ?>"><?php  echo constant("success_story"); ?></h1><br><br>
<div class="col-sm-12" >
<div class="container">
 <?php
  include('connection.php');
 // $id=$_get['dept_name'];
  $english=$_GET['english'];
  $marathi=$_GET['marathi'];
if($english!="English" || $marathi=="मराठी")
 {
						//header('Content-Type:text/html;charset=utf8_unicode_ci');
						mysqli_query($GLOBALS["___mysqli_ston"], "set NAMES utf8");
						echo'<table class="table" border="2" style="width:100% ;margin-left:-90px">
						<tr>
						<td style="width:10%" align="center"><b>अनु. क्र. </b></td>
						<td style="width:60%" align="center"><b>माहिती  </b></td>
						<td style="width:10%" align="center"><b>दिनांक</b></td>
						<td style="width:10%" align="center"><b>फोटो</b></td>
						<td style="width:10%" align="center"><b>पी. डी. एफ. </b></td>
						<td style="width:10%" align="center"><b>विडिओ </b></td>
						</tr>'; 
						$i=1;
		//	$dept_id = urldecode($_GET['dept_id']);
		$dept_id = 	base64_decode($_GET['dept_id']);
			$Comp_id="SELECT * FROM success_stories where dept_name = '$dept_id'";
			$res=mysqli_query($GLOBALS["___mysqli_ston"], $Comp_id) or die('Query Failed: 4' . mysqli_error($GLOBALS["___mysqli_ston"]));
	while($rw = mysqli_fetch_assoc($res))
 {
							       $srno=$rw['Sr_No'];
													$disc=$rw['description'];
													$date=$rw['Sys_Date'];
													$path1=$rw['url1'];
													$file2=$rw['file_path'];
													$file1=$rw['photo_path'];
													
													$srno1 = urlencode(base64_encode("$srno"));
							
							echo'<tr>';
							echo'<td align="center">'.$i++.'</td>';
							echo'<td align="center" ><p class="more" id="more" align="justify">'.$disc.'</p></td>';
							echo'<td align="center">'.$date.'</td>';
							
							if($file1 != '')
							{
									echo'<td align="center"><a href="../'.$file1.'" target="blank" download="'.$file1.'"><button class="btn btn-info" id="file1" type="button" id="file1" style=" font-size:15pt; border-radius: 50px;">फोटो</button></a></td>';
									echo'<td align="center"><a href="../'.$file2.'" download="'.$file2.'"><button class="btn btn-warning" type="button" id="file2" style=" font-size:15pt; border-radius: 50px; background-color: gainsboro ;border-color: gainsboro ; " disabled>पी. डी. एफ. </button></a></td>';
									echo'<td align="center"><a href="video_view.php?Sr_No='.$srno1.'"><button class="btn btn-danger" type="button" id="video"  style=" font-size:15pt; background-color: gainsboro ;border-color: gainsboro ; ; border-radius: 50px;" disabled>विडिओ</button></a></td>';
									echo'</tr>';	
							}
							else if($file2 != '')
							{
										echo'<td align="center"><a href="../'.$file1.'" download="'.$file1.'"><button class="btn btn-info" id="file1" type="button" id="file1" style=" font-size:15pt; border-radius: 50px; background-color: gainsboro ;border-color: gainsboro ; " disabled>फोटो</button></a></td>';
										echo'<td align="center"><a href="../'.$file2.'" download="'.$file2.'"><button class="btn btn-warning" type="button" id="file2" style=" font-size:15pt; border-radius: 50px;">पी. डी. एफ.</button></a></td>';
										echo'<td align="center"><a href="video_view.php?Sr_No='.$srno1.'"><button class="btn btn-danger" type="button" id="video"  style=" font-size:15pt; border-radius: 50px; background-color: gainsboro ;border-color: gainsboro ; "disabled>विडिओ</button></a></td>';
										echo'</tr>';	
							}
							else 
							{
										echo'<td align="center"><a href="../'.$file1.'" download="'.$file1.'"><button class="btn btn-info" id="file1" type="button" id="file1" style=" font-size:15pt; border-radius: 50px; background-color: gainsboro ;border-color: gainsboro ; " disabled>फोटो</button></a></td>';
										echo'<td align="center"><a href="../'.$file2.'" download="'.$file2.'"><button class="btn btn-warning" type="button" id="file2" style=" font-size:15pt; border-radius: 50px; background-color: gainsboro ;border-color: gainsboro ; " disabled>पी. डी. एफ.</button></a></td>';
										echo'<td align="center"><a href="video_view.php?Sr_No='.$srno1.'"><button class="btn btn-danger" type="button" id="video"  style=" font-size:15pt; border-radius: 50px;">विडिओ</button></a></td>';
										echo'</tr>';
							}
						
	}
				echo'</table>';
			} 
			else
		{
						//header('Content-Type:text/html;charset=utf8_unicode_ci');
						mysqli_query($GLOBALS["___mysqli_ston"], "set NAMES utf8");
						echo'<table class="table" border="2" style="width:100% ;margin-left:-90px">
						<tr>
						<td style="width:10%" align="center"><b>Sr No.</b></td>
						<td style="width:60%" align="center"><b>Information</b></td>
						<td style="width:10%" align="center"><b>Date</b></td>
						<td style="width:10%" align="center"><b>Photo</b></td>
						<td style="width:10%" align="center"><b>Pdf</b></td>
						<td style="width:10%" align="center"><b>Video</b></td>
						</tr>'; 
						$i=1;
			$Comp_id="SELECT * FROM success_stories";
			$res=mysqli_query($GLOBALS["___mysqli_ston"], $Comp_id) or die('Query Failed: 4' . mysqli_error($GLOBALS["___mysqli_ston"]));
	while($rw = mysqli_fetch_assoc($res))
 {
							       $srno=$rw['Sr_No'];
													$disc=$rw['description'];
													$date=$rw['Sys_Date'];
													$path1=$rw['url1'];
													$file2=$rw['file_path'];
													$file1=$rw['photo_path'];
													
													$srno1 = urlencode(base64_encode("$srno"));
							
							echo'<tr>';
							echo'<td align="center">'.$i++.'</td>';
							echo'<td align="center" ><p class="more" id="more" align="justify">'.$disc.'</p></td>';
							echo'<td align="center">'.$date.'</td>';
							
							if($file1 != '')
							{
									echo'<td align="center"><a href="../'.$file1.'" target="blank" download="'.$file1.'"><button class="btn btn-info" id="file1" type="button" id="file1" style=" font-size:15pt; border-radius: 50px;">Photo</button></a></td>';
									echo'<td align="center"><a href="../'.$file2.'" download="'.$file2.'"><button class="btn btn-warning" type="button" id="file2" style=" font-size:15pt; border-radius: 50px; background-color: gainsboro ;border-color: gainsboro ; " disabled>Pdf</button></a></td>';
									echo'<td align="center"><a href="video_view.php?Sr_No='.$srno1.'"><button class="btn btn-danger" type="button" id="video"  style=" font-size:15pt; background-color: gainsboro ;border-color: gainsboro ; ; border-radius: 50px;" disabled>Video</button></a></td>';
									echo'</tr>';	
							}
							else if($file2 != '')
							{
										echo'<td align="center"><a href="../'.$file1.'" download="'.$file1.'"><button class="btn btn-info" id="file1" type="button" id="file1" style=" font-size:15pt; border-radius: 50px; background-color: gainsboro ;border-color: gainsboro ; " disabled>Photo</button></a></td>';
										echo'<td align="center"><a href="../'.$file2.'" download="'.$file2.'"><button class="btn btn-warning" type="button" id="file2" style=" font-size:15pt; border-radius: 50px;">Pdf</button></a></td>';
										echo'<td align="center"><a href="video_view.php?Sr_No='.$srno1.'"><button class="btn btn-danger" type="button" id="video"  style=" font-size:15pt; border-radius: 50px; background-color: gainsboro ;border-color: gainsboro ; "disabled>Video</button></a></td>';
										echo'</tr>';	
							}
							else 
							{
										echo'<td align="center"><a href="../'.$file1.'" download="'.$file1.'"><button class="btn btn-info" id="file1" type="button" id="file1" style=" font-size:15pt; border-radius: 50px; background-color: gainsboro ;border-color: gainsboro ; " disabled>Photo</button></a></td>';
										echo'<td align="center"><a href="../'.$file2.'" download="'.$file2.'"><button class="btn btn-warning" type="button" id="file2" style=" font-size:15pt; border-radius: 50px; background-color: gainsboro ;border-color: gainsboro ; " disabled>Pdf</button></a></td>';
										echo'<td align="center"><a href="video_view.php?Sr_No='.$srno1.'"><button class="btn btn-danger" type="button" id="video"  style=" font-size:15pt; border-radius: 50px;">Video</button></a></td>';
										echo'</tr>';
							}
						
	}
				echo'</table>';
			}
			
			
 ?>

</div>

      </div>
    </div>
        
    </section>
    
 
  <div>
   <?php include("footer.php") ?>

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

<script src="../pages/assets/js/jquery.min.js"></script>
<script src="../pages/assets/js/wow.min.js"></script>
<script src="../pages/assets/js/bootstrap.min.js"></script>
<script src="../pages/assets/js/slick.min.js"></script>
<script src="../pages/assets/js/jquery.li-scroller.1.0.js"></script>
<script src="../pages/assets/js/custom.js"></script>
</body>
</html>