<commit_before><?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="description" content="">
    <title>MWash | Explore Water Points In Sierra Leone</title>

    <link rel="icon" href="<?php echo base_url(); ?>assets/img/favicon.png" type="image/x-icon"/>

    <link rel='stylesheet prefetch' href='<?php echo base_url(); ?>assets/css/materialize.min.css'>
    <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/icon?family=Material+Icons'>
    <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Architects+Daughter|Roboto&subset=latin,devanagari'>
    <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'>

    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/custom.css">

    <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDYHe93URHILf69tc1EtK7wuVd0rwKEOHw"></script>

    <script type="text/javascript">
        function initialize() {
            google.maps.visualRefresh = true;
            var body = document.body,
                html = document.documentElement;
            var height = Math.max( body.scrollHeight, body.offsetHeight,
                html.clientHeight, html.scrollHeight, html.offsetHeight );
            var rheight = height - 64;
            var mapDiv = document.getElementById('googft-mapCanvas');
            mapDiv.style.width = '100%';
            mapDiv.style.height = rheight +'px';
            var map = new google.maps.Map(mapDiv, {
                center: new google.maps.LatLng(8.646785826402805, -11.696121582031306),
                zoom: 8,
                mapTypeId: google.maps.MapTypeId.ROADMAP,
                streetViewControl: false,
                zoomControl: true,
                zoomControlOptions: {
                    position: google.maps.ControlPosition.LEFT_TOP
                }
            });
            layer = new google.maps.FusionTablesLayer({
                map: map,
                heatmap: { enabled: false },
                query: {
                    select: "col49",
                    from: "<KEY>",
                    where: "<?php
                        $conditions = array();

                        if($province != 'all'){
                            $conditions[] = "province = '$province'";
                        }
                        if ($season == 'Unknown'){
                            $conditions[] = "season = ''";
                        }elseif ($season == 'Water'){
                            $conditions[] = "season = 'Water year-round'";
                        }elseif ($season == 'Dry'){
                            $conditions[] = "season = 'Dry Always / Never water'";
                        }elseif($season == 'Seasonal'){
                            $conditions[] = "season = 'Seasonal'";
                        }
                        if($functionality == 'functional'){
                            $conditions[] = "funct = 'Yes- functional'";
                        }elseif ($functionality == 'bdown'){
                            $conditions[] = "funct = 'No- broken down'";
                        }elseif ($functionality == 'pdamaged'){
                            $conditions[] = "funct = 'Yes- but partly damaged'";
                        }elseif ($functionality == 'sucon'){
                            $conditions[] = "funct = 'No- still under construction'";
                        }
                        if($mechanic == 'yes'){
                            $conditions[] = "mechanic = 'Yes'";
                        }elseif ($mechanic == 'no'){
                            $conditions[] = "mechanic = 'No'";
                        }elseif ($mechanic == 'unknown'){
                            $conditions[] = "mechanic = 'Unknown'";
                        }
                        if($parts == 'm20'){
                            $conditions[] = "parts = 'More than 20 miles'";
                        }elseif ($parts == 'wcom'){
                            $conditions[] = "parts = 'In this community'";
                        }elseif ($parts == 'w20'){
                            $conditions[] = "parts = 'Within 20 miles'";
                        }
                        if (count($conditions) > 0) {
                            $sql = implode(' and ', $conditions);
                            echo $sql;
                        }
                        ?>"
                },
                options: {
                    styleId: 2,
                    templateId: 2
                }
            });
        }
        google.maps.event.addDomListener(window, 'load', initialize);
    </script>

</head>
<body site-url="<?php echo base_url(); ?>">

<header>
    <nav class="nav-wrapper indigo darken-4">
        <div class="container"><a href="#" data-activates="nav-mobile" class="button-collapse top-nav waves-effect waves-light circle hide-on-large-only"><i class="material-icons">menu</i></a></div>
        <div class="col s12">
            <ul class="right">
                <li class="right">
                    <a href="https://github.com/Code4SierraLeone/MWash/" target="_blank" class="fa fa-github-square fa-2x waves-effect waves-light tooltipped" data-position="bottom" data-delay="1" data-tooltip="Github"><span class="icon-text"></span></a>
                </li>
                <li class="right">
                    <a href="<?php echo base_url(); ?>index.php/login" target="_blank" class="fa fa-user fa-2x waves-effect waves-light tooltipped" data-position="bottom" data-delay="1" data-tooltip="Dashboard"><span class="icon-text"></span></a>
                </li>
                <li class="right">
                    <a data-target="modal3" href="#modal3" class="modal-trigger fa fa-question-circle fa-2x waves-effect waves-light tooltipped" data-position="down" data-delay="1" data-tooltip="Quick Help"><span class="icon-text"></span></a><commit_msg>updated marker icon by waterpoint functionality and updated responsive map by province<commit_after><?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="description" content="">
    <title>MWash | Explore Water Points In Sierra Leone</title>

    <link rel="icon" href="<?php echo base_url(); ?>assets/img/favicon.png" type="image/x-icon"/>

    <link rel='stylesheet prefetch' href='<?php echo base_url(); ?>assets/css/materialize.min.css'>
    <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/icon?family=Material+Icons'>
    <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Architects+Daughter|Roboto&subset=latin,devanagari'>
    <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'>

    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/custom.css">

    <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDYHe93URHILf69tc1EtK7wuVd0rwKEOHw"></script>

    <script type="text/javascript">
        function initialize() {
            google.maps.visualRefresh = true;
            var body = document.body,
                html = document.documentElement;
            var height = Math.max( body.scrollHeight, body.offsetHeight,
                html.clientHeight, html.scrollHeight, html.offsetHeight );
            var rheight = height - 64;
            var mapDiv = document.getElementById('googft-mapCanvas');
            mapDiv.style.width = '100%';
            mapDiv.style.height = rheight +'px';
            var map = new google.maps.Map(mapDiv, {
            	<?php if ($province == 'Northern'){ ?>
				center: new google.maps.LatLng(8.9851565, -11.9271358),
				zoom: 9,
            	<?php }elseif ($province == 'Southern'){ ?>
				center: new google.maps.LatLng(7.7202549, -12.0994481),
				zoom: 10,
            	<?php }elseif ($province == 'Eastern'){?>
				center: new google.maps.LatLng(8.1509098, -11.0891087),
				zoom: 9,
            	<?php }elseif ($province == 'Western'){ ?>
				center: new google.maps.LatLng(8.3456411, -13.1650893),
				zoom: 12,
				<?php }else{ ?>
				center: new google.maps.LatLng(8.646785826402805, -11.696121582031306),
				zoom: 9,
				<?php } ?>
				mapTypeId: google.maps.MapTypeId.ROADMAP,
                streetViewControl: false,
                zoomControl: true,
                zoomControlOptions: {
                    position: google.maps.ControlPosition.LEFT_TOP
                }
            });
            layer = new google.maps.FusionTablesLayer({
                map: map,
                heatmap: { enabled: false },
                query: {
                    select: "col49",
                    from: "<KEY>",
                    where: "<?php
                        $conditions = array();

                        if ($province != 'all'){
                            $conditions[] = "province = '$province'";
                        }
                        if ($season == 'Unknown'){
                            $conditions[] = "season = ''";
                        }elseif ($season == 'Water'){
                            $conditions[] = "season = 'Water year-round'";
                        }elseif ($season == 'Dry'){
                            $conditions[] = "season = 'Dry Always / Never water'";
                        }elseif($season == 'Seasonal'){
                            $conditions[] = "season = 'Seasonal'";
                        }
                        if($functionality == 'functional'){
                            $conditions[] = "funct = 'Yes- functional'";
                        }elseif ($functionality == 'bdown'){
                            $conditions[] = "funct = 'No- broken down'";
                        }elseif ($functionality == 'pdamaged'){
                            $conditions[] = "funct = 'Yes- but partly damaged'";
                        }elseif ($functionality == 'sucon'){
                            $conditions[] = "funct = 'No- still under construction'";
                        }
                        if($mechanic == 'yes'){
                            $conditions[] = "mechanic = 'Yes'";
                        }elseif ($mechanic == 'no'){
                            $conditions[] = "mechanic = 'No'";
                        }elseif ($mechanic == 'unknown'){
                            $conditions[] = "mechanic = 'Unknown'";
                        }
                        if($parts == 'm20'){
                            $conditions[] = "parts = 'More than 20 miles'";
                        }elseif ($parts == 'wcom'){
                            $conditions[] = "parts = 'In this community'";
                        }elseif ($parts == 'w20'){
                            $conditions[] = "parts = 'Within 20 miles'";
                        }
                        if (count($conditions) > 0) {
                            $sql = implode(' and ', $conditions);
                            echo $sql;
                        }
                        ?>"
                },
				styles: [{
					where: "funct = 'Yes- functional'",
					markerOptions: {
						iconName: "small_green"
					}
				}, {
					where: "funct = 'No- broken down'",
					markerOptions: {
						iconName: "small_red"
					}
				}, {
					where: "funct = 'Yes- but partly damaged'",
					markerOptions: {
						iconName: "small_yellow"
					}
				}, {
					where: "funct = 'No- still under construction'",
					markerOptions: {
						iconName: "small_blue"
					}
				}],
                options: {
                    styleId: 2,
                    templateId: 2
                },
            });
        }
        google.maps.event.addDomListener(window, 'load', initialize);
    </script>

</head>
<body site-url="<?php echo base_url(); ?>">

<header>
    <nav class="nav-wrapper indigo darken-4">
        <div class="container"><a href="#" data-activates="nav-mobile" class="button-collapse top-nav waves-effect waves-light circle hide-on-large-only"><i class="material-icons">menu</i></a></div>
        <div class="col s12">
            <ul class="right">
                <li class="right">
                    <a href="https://github.com/Code4SierraLeone/MWash/" target="_blank" class="fa fa-github-square fa-2x waves-effect waves-light tooltipped" data-position="bottom" data-delay="1" data-tooltip="Github"><span class="icon-text"></span></a>
                </li>
                <li class="right">
                    <a href="<?php echo base_url(); ?>index.php/login" target="_blank" class="fa fa-user fa-2x waves-effect waves-light tooltipped" data-position="bottom" data-delay="1" data-tooltip="Dashboard"><span class="icon-text"></span></a>
                </li>
                <li class="right">
                    <a data-target="modal3" href="#modal3" class="modal-trigger fa fa-question-circle fa-2x waves-effect waves-light tooltipped" data-position="down" data-delay="1" data-tooltip="Quick Help"><span class="icon-text"></span></a>
{'fraction_non_alphanumeric': 0.14983570646221248, 'fraction_numerical': 0.016502373128879155, 'mean_word_length': 1.689709347996858, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 125, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3282934', 'n_tokens_mistral': 4070, 'n_tokens_neox': 3698, 'n_words': 766}