<?php
    session_start();
    if(empty($_SESSION['username']))
    {
        echo "<meta http-equiv='refresh' content='0; url=login.php'>";
    }
    else
    {
        include("../inc/koneksi.php");
        $user = $_SESSION['username'];
        $nama = $_SESSION['nama'];
        $email = $_SESSION['email'];

?>
<!DOCTYPE HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0 minimal-ui" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black">

<link rel="icon" type="image/png" href="images/splash/android-chrome-192x192.png" sizes="192x192">
<link rel="apple-touch-icon" sizes="196x196" href="images/splash/apple-touch-icon-196x196.png">
<link rel="apple-touch-icon" sizes="180x180" href="images/splash/apple-touch-icon-180x180.png">
<link rel="apple-touch-icon" sizes="152x152" href="images/splash/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="144x144" href="images/splash/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="120x120" href="images/splash/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/splash/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="76x76" href="images/splash/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/splash/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="60x60" href="images/splash/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="57x57" href="images/splash/apple-touch-icon-57x57.png">
<link rel="icon" type="image/png" href="images/splash/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="images/splash/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="images/splash/favicon-16x16.png" sizes="16x16">
<link rel="shortcut icon" href="images/splash/favicon.ico" type="image/x-icon" />
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
    
<title>Tagor.</title>

<link rel="stylesheet" type="text/css" href="styles/style.css">
<link rel="stylesheet" type="text/css" href="styles/menu.css">
<link rel="stylesheet" type="text/css" href="styles/framework.css">
<link rel="stylesheet" type="text/css" href="styles/font-awesome.css">

<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/plugins.js"></script>
<script type="text/javascript" src="scripts/custom.js"></script>

<script src="http://maps.google.com/maps?file=api&v=2&key=AIzaSyCe-95nlLo7bu1FWl94IwoZ14o5WnE9L_M&sensor=false" type="text/javascript"></script>
<style type="text/css">
	body {font:10pt arial; }
	.main { text-align:center; font:12pt Arial; width:100%; height:auto; }
	.eventtext {width:100%; margin-top:20px; font:10pt Arial; text-align:left; line-height:25px; background-color:#EDF4F8;
	padding:5px; border:1px dashed #C2DAE7;}
	#mapa {width:100%; height:340px; border:5px solid #DEEBF2;}

	.code {border:1px dashed #cecece; background-color:#F7F7F7; padding:5px;}
	.small {font:9pt arial; color:gray; padding:2px; }
	.jimi { margin:0px;}
	</style>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</head>

<body>
<div class="gallery-fix"></div><!-- Fix Gallery next/prev error on Android -->
<div class="sidebar-tap-close"></div><!-- Overlay for content to close Sidebar -->

<div class="header-fixed header-light">
    <a href="index.php" class="header-icon-1"><i class="fa fa-home"></i></a>
	<a href="index.php" class="header-logo"></a>
</div>              
<div id="page-content">
    <div id="page-content-scroll"><!--Enables this element to be scrolled -->        
        <div class="header-clear"></div>

       <div class="content-fullscreen">                
            <iframe class="responsive-image maps" src="https://maps.google.com/?ie=UTF8&amp;ll=128184616,-3695170&amp;spn=0.006186,0.016512&amp;t=h&amp;z=17&amp;output=embed"></iframe>
            <a href="page-map.html" class="button button-red button-fullscreen uppercase ultrabold">FullScreen Map</a>
       </div>
       <div class="content">
            <div class="one-half-responsive">
                <div class="container heading-style">
                    <h4 class="heading-title">Hubungi Kami!</h4>
                    <i class="fa fa-envelope-o heading-icon"></i>
                    <div class="line bg-black"></div>
                    <p class="heading-subtitle">
                        A fully working PHP/AJAX contact form made to be as easy as possible to username.
                    </p>
                </div>
                <div class="container no-bottom">
                    <div class="contact-form no-bottom"> 
                        <div class="formSuccessMessageWrap" id="formSuccessMessageWrap">
                            <div class="container">
                                <div class="decoration"></div>
                                <h4 class="center-text">Message Sent </h4>
                                <p class="center-text">Your message has been successfuly sent. Please allow up to 48 hours for a reply! Thanks!</p>
                            </div>
                        </div>

                        <form action="php/contact.php" method="post" class="contactForm" id="contactForm">
                            <fieldset>
                                <div class="formValidationError bg-red-dark color-white" id="contactNameFieldError">
                                    <p class="center-text uppercase small-text">Name is required!</p>
                                </div>             
                                <div class="formValidationError bg-red-dark color-white" id="contactEmailFieldError">
                                    <p class="center-text uppercase small-text">Mail address required!</p>
                                </div> 
                                <div class="formValidationError bg-red-dark color-white" id="contactEmailFieldError2">
                                    <p class="center-text uppercase small-text">Mail address must be valid!</p>
                                </div> 
                                <div class="formValidationError bg-red-dark color-white" id="contactMessageTextareaError">
                                    <p class="center-text uppercase small-text">Message field is empty!</p>
                                </div>   
                                <div class="formFieldWrap">
                                    <label class="field-title contactNameField" for="contactNameField">Name:<span>(required)</span></label>
                                    <input type="text" name="contactNameField" value="" class="contactField requiredField" id="contactNameField"/>
                                </div>
                                <div class="formFieldWrap">
                                    <label class="field-title contactEmailField" for="contactEmailField">Email: <span>(required)</span></label>
                                    <input type="text" name="contactEmailField" value="" class="contactField requiredField requiredEmailField" id="contactEmailField"/>
                                </div>
                                <div class="formTextareaWrap">
                                    <label class="field-title contactMessageTextarea" for="contactMessageTextarea">Message: <span>(required)</span></label>
                                    <textarea name="contactMessageTextarea" class="contactTextarea requiredField" id="contactMessageTextarea"></textarea>
                                </div>
                                <div class="formSubmitButtonErrorsWrap contactFormButton">
                                    <input type="submit" class="buttonWrap button button-green contactSubmitButton" id="contactSubmitButton" value="Send Message" data-formId="contactForm"/>
                                </div>
                            </fieldset>
                        </form>       
                    </div>
                </div>
            </div>
            <div class="decoration hide-if-responsive"></div>
            <div class="one-half-responsive last-column">
                <div class="container no-bottom">
                    <h4>Informasi Kontak</h4>
                    <p>
                        <strong>Alamat Kantor</strong><br>
                        PO Box 22161 Street Collins East<br>
                        PO Box 16122 Collins Street West<br>
                        Victoria 8007 Australia
                    </p>
                    <p>
                        <strong>Kontak:</strong><br>
                        <a href="tel: +123 456 7890" class="contact-call"><i class="fa fa-phone"></i>+ 123 456 7890</a>
                        <a href="sms: +123 456 7890" class="contact-text"><i class="fa fa-comments"></i>+ 123 456 7890</a>
                        <a href="mailto:name@domain.com" class="contact-mail"><i class="fa fa-envelope"></i>mail@doamin.com</a>
                        <a href="#" class="contact-facebook"><i class="fa fa-facebook"></i>enabled.labs</a>
                        <a href="#" class="contact-twitter"><i class="fa fa-twitter"></i>@iEnabled</a>
                    </p>
                </div>            
            </div>
           <div class="decoration"></div>
        </div>
      
        <div class="footer-clear disabled"></div>
    </div>
    
    <a href="#" class="back-to-top-badge"><i class="fa fa-caret-up"></i>Back to top</a>
</div>

    
<script type="text/javascript">
	if (GBrowserIsCompatible())
	{
		map = new GMap2(document.getElementById("mapa"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl(3));
		map.setCenter( new GLatLng(-4.5407415, 129.8852402), 12,0);
		
		// Create a marker
		var marker = new GMarker(new GLatLng(<?php echo "$r[5]";?>, <?php echo "$r[6]";?>))
		// Add the marker to the map	
		map.addOverlay(marker)
	
	}
	 
</script>
</body>
<?php 
    } 
?>