<?php
	class Footer extends PageCreater
	{	
		 
		function footer($text='')
		{  
		    
            $html = ' 
           
                    </div>
                </div>
    
                    <!-- Jquery JS-->
                    <script src="'.BASE_URL.'vendor/jquery-3.2.1.min.js"></script>
                    <!-- Bootstrap JS-->
                    <script src="'.BASE_URL.'vendor/bootstrap-4.1/popper.min.js"></script>
                    <script src="'.BASE_URL.'vendor/bootstrap-4.1/bootstrap.min.js"></script>
                    <!-- Vendor JS       -->
                    <script src="'.BASE_URL.'vendor/slick/slick.min.js">
                    </script>
                    <script src="'.BASE_URL.'vendor/wow/wow.min.js"></script>
                    <script src="'.BASE_URL.'vendor/animsition/animsition.min.js"></script>
                    <script src="'.BASE_URL.'vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
                    </script>
                    <script src="'.BASE_URL.'vendor/counter-up/jquery.waypoints.min.js"></script>
                    <script src="'.BASE_URL.'vendor/counter-up/jquery.counterup.min.js">
                    </script>
                    <script src="'.BASE_URL.'vendor/circle-progress/circle-progress.min.js"></script>
                    <script src="'.BASE_URL.'vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
                    <script src="'.BASE_URL.'vendor/chartjs/Chart.bundle.min.js"></script>
                    <script src="'.BASE_URL.'vendor/select2/select2.min.js">
                    </script>
                
                    <!-- Main JS-->
                    <script src="'.BASE_URL.'js/main.js"></script>
                     <script src="'.BASE_URL.'js/custom.js?v='.time().'"></script>
                    <script>
        			$(document).ready(function() {
        				$( document ).ajaxSend(function( event, jqxhr, settings ) {
        					if($(".chart_container").length > 0 || settings.show == "true")
        					{	
        						$("#wait").css("display", "none");
        					}
        					else
        					{
        						$("#wait").css("display", "block");
        					}
        				});
        			
        				$(document).ajaxComplete(function() {
        					$("#wait").css("display", "none");
        				});
        				$("[data-toggle=\'tooltip\']").tooltip();
        			});
			      </script>';
        			$alert_msg='';
        			if(isset($_SESSION['failed']) || isset($_SESSION['success']))
        			{
        				$alert_msg .= '<link rel="stylesheet" href="'.BASE_URL.'vendor/sweetalert2/sweetalert2.min.css">
        				<script src="'.BASE_URL.'vendor/sweetalert2/sweetalert2.min.js"></script>';
        			}
        			
        			if(isset($_SESSION['failed']) && $_SESSION['failed']!='')
        			{
        				$alert_msg .= 
        							'
        							<script>
        								$(document).ready(function(){
        									const Toast = Swal.mixin({
        										toast: true,
        										position: "top",
        										showConfirmButton: false,
        										timer: 12000
        									});
        
        									Toast.fire({
        										type: "error",
        										title: "'.$_SESSION['failed'].'"
        									});
        								});
        							</script>';
        				unset($_SESSION['failed']);
        			}
        			if(isset($_SESSION['success']) && $_SESSION['success']!='')
        			{
        				$alert_msg .= '<script>
        								$(document).ready(function(){
        									const Toast = Swal.mixin({
        										toast: true,
        										position: "top",
        										showConfirmButton: false,
        										timer: 12000
        									});
        									Toast.fire({
        										type: "success",
        										title:"'.$_SESSION['success'].'"
        									});
        								});
        							</script>';
        				unset($_SESSION['success']);
        			}
        			$html .=$alert_msg;
                $html .='
                </body>
            
            </html>
            <!-- end document-->';
            return $html;
		}
	}
?>
