<!DOCTYPE html>
<html lang="zxx">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Carbon Blue</title>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
    <!-- Google Fonts of Lato -->
    <link href="https://fonts.googleapis.com/css?family=Lato:300,300i,400,400i,700,700i,900,900i" rel="stylesheet">


    <!-- Linking Bootstrap.min.css -->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet">

    <!-- Linking slicknav.css Icon For Responsive Menu -->
    <link href="assets/css/slicknav.min.css" rel="stylesheet">

    <!-- Linking icofont.css Icon -->
    <link href="assets/css/font-awesome.min.css" rel="stylesheet">

    <!-- Linking Custom.css -->
    <link href="style.css" rel="stylesheet">
    <link href="assets/css/responsive.css" rel="stylesheet">


    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
		
		
		   <?php



        $cookie_name = "user_cb";

if(!isset($_COOKIE[$cookie_name])) {
   // echo "Cookie named '" . $cookie_name . "' is not set!";
        header('Location: quiz-login.php');
        exit;
} else {
    //echo "Cookie '" . $cookie_name . "' is set!<br>";
    //echo "Value is: " . $_COOKIE[$cookie_name];
}
?>

		
		
		
		<?php $slide = $_GET['l'];
							
							if ($slide == '24')
							{
								header("Location: quiz-view.php?qid=1");	
								exit;
								
							}
							
							
							?>
						
		
</head>

<body class="js" id="welcome">
    <!-- Window Preloader start -->
    <div class="loader">
        <div class="cssload-thecube">
            <div class="cssload-cube cssload-c1"></div>
            <div class="cssload-cube cssload-c2"></div>
            <div class="cssload-cube cssload-c4"></div>
            <div class="cssload-cube cssload-c3"></div>
        </div>
    </div>
    <!-- Window Preloader End -->

    <!-- =================================================================================
								Hero-Section Starts
        ================================================================================== -->
    <!--- Header Top area Start -->
    <!--- Header Top area End -->

    <!--- Header ToBottom area Start -->
    <div class="header-bottom-area">
        <div class="container">
            <div class="row">
                <div class="col-md-3 col-sm-2 ">
                    <div class="logo">
                           <a href="index.html"><img src='logo.png' style='height:60px;'></a>
                    </div>
                </div>
                <div class="col-md-9 col-sm-10">
                   <div class="slick-wrap">
                        <div class="main-menu-wrap">
                            <ul class="main-menu">
                                <li style='color:#043454;'><a href="index.html">Home</a></li>
                                <li><a href="about.html">About Us</a></li>
                                <!--<li><a href="blog.html">Blog</a>
                                    <ul class="drop-menu">
                                        <li><a href="blog.html">Blog</a></li>
                                        <li><a href="single-blog.html">Single Blog</a></li>
                                    </ul>
                                </li>-->
                                <li><a href="#">Services</a>
                                    <ul class="drop-menu">
                                        <li><a href="service-site-assessments.html">Site Assessments</a></li>
                                        <li><a href="service-project-management.html">Project Management</a></li>
										<li><a href="service-lighting-upgrades.html">Lighting Upgrades</a></li>
										<li><a href="service-metering.html">Metering and Verification</a></li>
										<li><a href="service-airconditioning-upgrades.html">Air-Conditioning Upgrades</a></li>
                                    </ul>
                                </li>
                                <li><a href="#">Case Studies</a>
                                    <ul class="drop-menu">
                                        <li><a href="elizabeth-st-sydney.html">60-70 Elizabeth St Sydney</a></li>
                                        <li><a href="channel-7.html">Channel 7</a></li>
                                        <li><a href="gilbarco.html">Gilbarco Head Office</a></li>
										<li><a href="enacon.html">Enacon Car Park </a></li>
										 <li><a href="hydro-majestic-hotel.html">Hydro Majestic Hotel</a></li>
                                    </ul>
                                </li>
                                 <!--<li><a href="#">Pages</a>
                                    <ul class="drop-menu">
                                        <li><a href="index.html">Home</a></li>
                                        <li><a href="shop.html">Shop</a></li>
                                        <li><a href="product-details.html">Product Details</a></li>
                                        <li><a href="cart.html">Cart</a></li>
                                        <li><a href="checkout.html">Checkout</a></li>
                                        <li><a href="thank-you.html">Thank YouS</a></li>
                                        <li><a href="error-404.html">404 Error</a></li>
                                        <li><a href="faq.html">FAQ</a></li>
                                    </ul>-->
                                </li>
                                <li><a href="contact.php">Contact</a></li>
								 <li><a href="request-assessment.php">Request Site Assessment</a></li>
								 <li><a href="sign-in.php"><div style='color:white; padding:5px;border-radius:3px;background-color:#52b4fe;'>Sign In</div></a></li>
                            </ul>
                        </div>
                    </div></div>
                </div>
            </div>
        </div>
    
    <!--- Header Bottom area End -->

    <!--- Hero area SStart -->
    <!--<div style="background-image:url(assets/images/breadcroumb.jpg)" class="factory-breadcroumb-area">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <h2>Quiz</h2>
                     
                </div>
            </div>
        </div>
    </div>-->
    <!--- Hero area End -->

    <!--- Google-Map area Start -->
    
    <!--- Google-Map area End -->

    <!--- Google-Map area Start -->
    <section class="contact-form-area">
        <div class="container">
            <div class="row">
                <div class="col-sm-10">
                    <div class="factory-contact-form" id='ll'>
					
								   <?php
								
				$qidIs = $_GET['qid'];
					
				$examId = $_GET['e'];
					
					
					?>
					
                        <form action="submitExam2.php?qid=<?php echo $qidIs;?>&e=<?php echo $examId;?>" method="POST" id="ajax-contact">
                             
							
								<div style='color:green;margin-bottom:10px;display:<?php if ($_GET['rt'] == '1') echo ""; else echo "none"; ?>'>
							<p style='font-size:22px;margin-bottom:20px;'>Thank you - your quiz is submitted.</p>
							</div>
							
							
							
						
							<?php 
							
							if ($slide != '')
								echo '<object data="slides/' .  $slide . ".pdf"  . '" type="application/pdf" width="100%" height="600px"></object>';
						   
						   
						   
							?>
						   
						   
						<?php 
						$t = $_GET['t'];
						
						if (($t != 0) && ($t != ''))
						{
							echo "<div style='color:red;font-family:calibri;'>You achieved " . $t . "/25. You must answer <u>ALL</u> questions correctly. Please continue until you achieve this.<br/><br/></div>";
							
						
						}

						?>						
						 
			<?php 
					 
				$con = mysql_connect('localhost', 'root', 'Boom95z') or die(mysql_error());
								mysql_select_db('cgg_web', $con);
								
								$examId = $_GET['e'];
								
								// ans1 | ans2 | ans3 | ans4 | ans5 | ans6 | ans7 | ans8 | ans9 | ans10 | ans11 | ans12 | ans13 | ans14 | ans15 | ans16 | ans17 | ans18 | ans19 | ans20 | ans21 | ans22 | ans23 | ans24 | ans25
								$result5 = mysql_query("select * from exam where  initialcode='" . $examId . "'");
										
								//echo "select * from exam where initialcode='" . $examId . "'";
										
								while($row = mysql_fetch_array($result5))
								{
									$ans1 = $row['ans1'];
									$ans2 = $row['ans2'];
									$ans3 = $row['ans3'];
									$ans4 = $row['ans4'];
									$ans5 = $row['ans5'];
									$ans6 = $row['ans6'];
									$ans7 = $row['ans7'];
									$ans8 = $row['ans8'];
									$ans9 = $row['ans9'];
									$ans10 = $row['ans10'];
									$ans11 = $row['ans11'];
									$ans12 = $row['ans12'];
									$ans13 = $row['ans13'];
									$ans14 = $row['ans14'];
									$ans15 = $row['ans15'];
									$ans16 = $row['ans16'];
									$ans17 = $row['ans17'];
									$ans18 = $row['ans18'];
									$ans19 = $row['ans19'];
									$ans20 = $row['ans20'];
									$ans21 = $row['ans21'];
									$ans22 = $row['ans22'];
									$ans23 = $row['ans23'];
									$ans24 = $row['ans24'];
									$ans25 = $row['ans25'];
								}
								
								
								if ($qidIs == '1') $myVar = 'ans1';
								if ($qidIs == '2') $myVar = 'ans2';
								if ($qidIs == '3') $myVar = 'ans3';
								if ($qidIs == '4') $myVar = 'ans4';
								if ($qidIs == '5') $myVar = 'ans5';
								if ($qidIs == '6') $myVar = 'ans6';
								if ($qidIs == '7') $myVar = 'ans7';
								if ($qidIs == '8') $myVar = 'ans8';
								if ($qidIs == '9') $myVar = 'ans9';
								if ($qidIs == '10') $myVar = 'ans10';
								if ($qidIs == '11') $myVar = 'ans11';
								if ($qidIs == '12') $myVar = 'ans12';
								if ($qidIs == '13') $myVar = 'ans13';
								if ($qidIs == '14') $myVar = 'ans14';
								if ($qidIs == '15') $myVar = 'ans15';
								if ($qidIs == '16') $myVar = 'ans16';
								if ($qidIs == '17') $myVar = 'ans17';
								if ($qidIs == '18') $myVar = 'ans18';
								if ($qidIs == '19') $myVar = 'ans19';
								if ($qidIs == '20') $myVar = 'ans20';
								if ($qidIs == '21') $myVar = 'ans21';
								if ($qidIs == '22') $myVar = 'ans22';
								if ($qidIs == '23') $myVar = 'ans23';
								if ($qidIs == '24') $myVar = 'ans24';
								if ($qidIs == '25') $myVar = 'ans25';
								
								
								$result2 = mysql_query("select qid, textis from questions where qid = " . $qidIs);
								while($row = mysql_fetch_array($result2))
								{	  
									$qid = $row['qid'];
									$textis = $row['textis'];
									
									echo "<b style='font-size:16px;'>" . $textis . "</b><div style='height:10px;'></div>";
									
									$result3 = mysql_query("select ans_bullet, textis from answers where qid=" . $qid);
									while($rowA = mysql_fetch_array($result3))
									{
										$ans_bullet = $rowA['ans_bullet'];
										$textisA = $rowA['textis'];
										
										if ($qidIs == '1') $ans_bulletX = $ans1;
										if ($qidIs == '2') $ans_bulletX = $ans2;
										if ($qidIs == '3') $ans_bulletX = $ans3;
										if ($qidIs == '4') $ans_bulletX = $ans4;
										if ($qidIs == '5') $ans_bulletX = $ans5;
										if ($qidIs == '6') $ans_bulletX = $ans6;
										if ($qidIs == '7') $ans_bulletX = $ans7;
										if ($qidIs == '8') $ans_bulletX = $ans8;
										if ($qidIs == '9') $ans_bulletX = $ans9;
										if ($qidIs == '10') $ans_bulletX = $ans10;
										if ($qidIs == '11') $ans_bulletX = $ans11;
										if ($qidIs == '12') $ans_bulletX = $ans12;
										if ($qidIs == '13') $ans_bulletX = $ans13;
										if ($qidIs == '14') $ans_bulletX = $ans14;
										if ($qidIs == '15') $ans_bulletX = $ans15;
										if ($qidIs == '16') $ans_bulletX = $ans16;
										if ($qidIs == '17') $ans_bulletX = $ans17;
										if ($qidIs == '18') $ans_bulletX = $ans18;
										if ($qidIs == '19') $ans_bulletX = $ans19;
										if ($qidIs == '20') $ans_bulletX = $ans20;
										if ($qidIs == '21') $ans_bulletX = $ans21;
										if ($qidIs == '22') $ans_bulletX = $ans22;
										if ($qidIs == '23') $ans_bulletX = $ans23;
										if ($qidIs == '24') $ans_bulletX = $ans24;
										if ($qidIs == '25') $ans_bulletX = $ans25;
										
										echo "<input type='radio' "; if ($ans_bulletX ==  $ans_bullet) echo " checked "; echo " required name='rd_" . $qid . "' value='" . $ans_bullet . "'> " . "(" . $ans_bullet  . ") " . $textisA  . "<br>";
										
									}
									echo "<div style='height:20px;'></div>";
								}
															
								
								
								mysql_close($con);
								?>
						   
						   
						
							
							
							
							
							<br/>
					 

<div style='display:<?php if ($slide != '') echo "none";?>;'>
 	<button type='submit' id='subme' style='width:150px;padding:10px;color:white; border:solid 0px white; background-color:#52b4fe;' name='subme' value='PREVIOUS'>< PREVIOUS</button>
					<div style='display:inline-block;width:50px;'></div><button  style='width:150px; border:solid 0px white; padding:10px;color:white;background-color:#52b4fe;'type='submit' id='subme' name='subme' value='NEXT'>NEXT ></button>
			</div>	


					</form>
                    </div>
                </div>
                <div class="col-sm-2">
				<?php
				
				$next = intval($slide) + 1;
				
				if ($slide == '1')
					$prv = '1';
				else
					$prv =  intval($slide) - 1;
				
				
				
				?>
				
				
				
				
				
				
				<div style='display:<?php if ($slide == '') echo "none";?>;'>
				<hr/>
				  <a href='quiz-view.php?l=<?php echo $prv;?>'><div style='width:150px;padding:10px;color:white;background-color:#52b4fe;'><center>< PREVIOUS</center></div></a> 
				  <br/><br/>
				 
				  <a href='quiz-view.php?l=<?php echo $next;?>'><div style='width:150px;padding:10px;color:white;background-color:#52b4fe;'><center>NEXT ></center></div></a> 
				 </div>
				 
				 <div style='height:500px;'></div>
				 
				 </div>
            </div>
        </div>
    </section>
    <!--- Google-Map area End -->

    <!--- Footer area End -->
    <footer id="colophon" class="site-footer">
        
       <div class="site-info" style='background-color:#043454;'>
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                          <div class="footer-bottom-text" style='color:white; font-family:arial;font-size:8px;'>
                            <p ><small> &copy; 2017 Carbon Blue Pty Ltd &nbsp&nbsp&nbsp| <a target='blank' href="Carbon-Green-COC.pdf"><span style='color:white;'>Insurance Information</span></a></small></p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- .site-info -->
    </footer>
    <!--- Footer area End -->

    <!-- jquery.min.js -->
    <script src="assets/js/jQuery.min.js"></script>

    <!-- bootstrap.min.js -->
    <script src="assets/js/bootstrap.min.js"></script>

    <!--  Slick Nav js for Responsive Menu -->
    <script src="assets/js/jquery.slicknav.min.js"></script>

    <!-- maps.googleapis.com/maps/api/js -->
    <script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyD7CQl6fRhagGok6CzFGOOPne2X1u1spoA"></script>
    <script>
        function initialize() {
            var farmgate = {
                lat: -33.918054,
                lng: 151.157252
            };
            var mapProp = {
                center: new google.maps.LatLng(-33.918054,151.157252),
                zoom: 15,
                scrollwheel: false,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            var map = new google.maps.Map(document.getElementById("googleMap"), mapProp);

            var marker = new google.maps.Marker({
                position: farmgate,
                map: map,
                icon: 'assets/images/map-marker.png'
            });
        }
        google.maps.event.addDomListener(window, 'load', initialize);
    </script>

    <!-- jquery custom.js for document ready function and window load function -->
    <script src="assets/js/main.js"></script>

</body>

</html>
