<!DOCTYPE html>

<html class="no-js" lang="en">
<head>
<link rel="shortcut icon" type="image/x-icon" href="images/Anandvanfevicon.ico">
  <!-- title and meta -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0" />
<meta name="description" content="">
<meta name="keywords" content="De-Addiction Centers in Pune, E-Addiction Center, Pune Addiction, Mobile De-Addiction">
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico"> 
<title>Child Technology Test | Anandvan</title>
  
<link href="css/stylesheet.css" type="text/css" rel="stylesheet" />
<link href="css/responsive.css" type="text/css" rel="stylesheet" />
<link href="css/bootstrap.min.css" type="text/css" rel="stylesheet">

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>

<!--for slider-->
 <link rel="stylesheet" href="css/demo.css">


  <!-- css 
  <link rel="stylesheet" href="css/base.css">-->
  <link rel="stylesheet" href="css/style.css">

  <!-- js -->
  <script src="js/modernizr.js"></script>
</head>

<body>
	<?php 
		include 'database.php';
		$show_modal1 = false;
		$usermsg="";
		$score=0;

	if (isset($_POST['email']) && ($_POST['email'] != "")) {
		$question1 = $_POST['question1'];
		$question2 = $_POST['question2'];
		$question3 = $_POST['question3'];
		$question4 = $_POST['question4'];
		$question5 = $_POST['question5'];
		$question6 = $_POST['question6'];
		$username = $_POST['user-name'];
		$phonenumber = $_POST['phone_number'];
		$email = $_POST['email'];

		if($question1=="yes"){
			$score++;			
		}
		if($question2=="yes"){
			$score++;			
		}
		if($question3=="yes"){
			$score++;			
		}
		if($question4=="yes"){
			$score++;			
		}
		if($question5=="yes"){
			$score++;			
		}
		if($question6=="yes"){
			$score++;			
		}
	$resultpercent=round((100*$score)/6);

    /*insert data*/
	
    $created_date = date("Y-m-d H:i:s");
	
	$sql = "INSERT INTO `child_technology_test`(`question1`,`question2`,`question3`,`question4`,`question5`,`question6`,`name`,`email`,`contactno`,`test_on`) VALUES('" . $question1 . "','" . $question2 . "','" . $question3 . "','".$question4."','".$question5."','".$question6."','".$username."','".$email."','".$phonenumber."','".$created_date."')";
	$query = mysqli_query($conn, $sql);
	if($query){
		$show_modal1 = true;
		if($resultpercent==33){
		    $usermsg = "<span class='safem'>Your child is ".$resultpercent."% Addicted</span>";
    	}else{
    		if($score<=2){
    		    $usermsg = "<span class='safem'>Your child is ".$resultpercent."% Addicted! Keep it up! Your child have an appropriate use of Internet</span>";
    		}elseif ($score==3) {
    		    $usermsg = "<span class='warningm'>Your child is".$resultpercent."% Addicted! Your child can head towards addiction! Take care!</span>";
    		}elseif ($score>=4) {
    		    $usermsg = "<span class='alertm'>Your Child is ".$resultpercent."% Internet Addicted! Your child needs a Treatment to come out of it!</span>";
    		}
		}
	}else{
		$show_modal1 = true;
		    $usermsg = "Something went wrong! Please try later!";
	}
	
	mysqli_close($conn);
	}

	?>
	<?php if($show_modal1):?>
  <script>$(document).ready(function(){ $('#myModal').modal('show');});</script>
<?php endif;?>

<div class="wrapper">

<div class="topline"></div><!--topline-->
<div class="header">
<div class="container">

<div class="rightside">
<div class="menu">
<nav class="navbar navbar-default navigation">
  <div class="container-fluid space2">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
	  <!--<a class="navbar-brand" href="#">Menu</a>-->
     </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse style_menu" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="spin"><a href="index.html" class="active_tab spin"><span class="blue">Home</span></a></li>
		<li class="save"><a href="about-us.html">Publications & Achievements</a></li>
		<li class="save space"><a href="contact-us.html" class="space">Contact Us</a></li>
      </ul>
      
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
</div>
</div><!--rightside-->

<div class="top_header">
<div class="info">
<div class="num">
<div class="bing"><img src="images/call-icon.png">&nbsp;</div>
<div class="bing once">+91 987654321</div>
</div>

<div class="num">
<div class="bing"><img src="images/mail-icon.png">&nbsp;</div>
<div class="bing once"><a href="mailto:info@anandvan.org" target="_top">info@anandvan.org</a></div>
</div>

</div>


</div><!--top_header-->
</div><!--container-->
</div><!--header-->





  <main>
      


      <section class="module test-outerblock">
        	<div class="test-heading">
		 		<h2>Child Technology Test: Are Your Children Too Connected?</h2>
		    </div><!--test-club-->
        <div class="container">
        
        	<div class="row">
        		<div class="col-md-10 col-md-offset-1">
        	<form method="POST" id="testform" class="testform" action="">
                <p class="text-center">
                    <img src="images/anandvan-logo-1.png"><br>
                    <img src="images/manovikas-web-logo.png"><br>
                    This simple Child Technology Test will help you determine if your child is suffering from Digital Distraction. Our short test can help you see if your child may be too digitally connected and that you may want to help your child step away from the devices and “Plug Back into Life…”</p>
                <hr>
                <div class="style-form">
                <div class="row form-group">
                	<div class="col-sm-12">
		                <label>1. Do you find your child spending more and more time online or on their digital devices (computer, laptop, tablet or Smartphone) than they seem to realize ?</label>
		                <div class="radioouterdiv">
		                    <span class="form-radio-control">
		                        <input type="radio" name="question1" id="question1a" value="yes" required/>
		                        <label class="radiolabel" for="question1a" >Yes</label>
		                    </span>
		                    <span class="form-radio-control">
		                        <input type="radio" name="question1" id="question1b" value="no">
		                        <label class="radiolabel" for="question1b">No</label>
		                    </span>
		                </div>
		            </div>
                </div>	
                <div class="row form-group">
                	<div class="col-sm-12">
		                <label>2. Do you find your child mindlessly passing time on a regular basis by staring at their Smartphone, Tablet, or Computer–even when there might be better or more productive things to do? And do they seem to lose track of time when on any of these devices ?</label>
		                <div class="radioouterdiv">
		                    <span class="form-radio-control">
		                        <input type="radio" name="question2" id="question2a" value="yes" required/>
		                        <label class="radiolabel" for="question2a" >Yes</label>
		                    </span>
		                    <span class="form-radio-control">
		                        <input type="radio" name="question2" id="question2b" value="no">
		                        <label class="radiolabel" for="question2b">No</label>
		                    </span>
		                </div>
		            </div>
                </div>	               
                <div class="row form-group">
                	<div class="col-sm-12">
		                <label>3. Do you find your child spending more time with ‘virtual friends’as opposed to real people nearby ?</label>
		                <div class="radioouterdiv">
		                    <span class="form-radio-control">
		                        <input type="radio" name="question3" id="question3a" value="yes" required/>
		                        <label class="radiolabel" for="question3a" >Yes</label>
		                    </span>
		                    <span class="form-radio-control">
		                        <input type="radio" name="question3" id="question3b" value="no">
		                        <label class="radiolabel" for="question3b">No</label>
		                    </span>
		                </div>
		            </div>
                </div>	                
                <div class="row form-group">
                	<div class="col-sm-12">
		                <label>4. Does your child sleep with his or her Smartphone ON under their pillow or next to their bed regularly ?</label>
		                <div class="radioouterdiv">
		                    <span class="form-radio-control">
		                        <input type="radio" name="question4" id="question4a" value="yes" required/>
		                        <label class="radiolabel" for="question4a" >Yes</label>
		                    </span>
		                    <span class="form-radio-control">
		                        <input type="radio" name="question4" id="question4b" value="no">
		                        <label class="radiolabel" for="question4b">No</label>
		                    </span>
		                </div>
		            </div>
                </div>	                
                <div class="row form-group">
                	<div class="col-sm-12">
		                <label>5. Do you find your child viewing and answering texts, tweets, and emails at all hours of the day and night—even when it means interrupting other things they’re doing, such and schoolwork, meals, sports, or other family activities ? </label>
		                <div class="radioouterdiv">
		                    <span class="form-radio-control">
		                        <input type="radio" name="question5" id="question5a" value="yes" required/>
		                        <label class="radiolabel" for="question5a" >Yes</label>
		                    </span>
		                    <span class="form-radio-control">
		                        <input type="radio" name="question5" id="question5b" value="no">
		                        <label class="radiolabel" for="question5b">No</label>
		                    </span>
		                </div>
		            </div>
                </div>	                
                <div class="row form-group">
                	<div class="col-sm-12">
		                <label>6. Do you wish your child could be a little less wired or connected to digital devices such as Smartphones, laptops, tablet, Internet, video games, etc.?</label>
		                <div class="radioouterdiv">
		                    <span class="form-radio-control">
		                        <input type="radio" name="question6" id="question6a" value="yes" required/>
		                        <label class="radiolabel" for="question6a" >Yes</label>
		                    </span>
		                    <span class="form-radio-control">
		                        <input type="radio" name="question6" id="question6b" value="no">
		                        <label class="radiolabel" for="question6b">No</label>
		                    </span>
		                </div>
		            </div>
                </div>	                
                <div class="form-group row">
                	<div class="col-sm-4">
    	                <input type="text" name="user-name" id="user-name" class="form-control" placeholder="Your Name" required />
	                </div>
                	<div class="col-sm-4">
	                    <input type="number" name="phone_number" id="phone_number" class="form-control" placeholder="Contact Number" />
	                </div>
	                <div class="col-sm-4">
	                    <input type="email" name="email" id="email" class="form-control" placeholder="Email Id" required />
	                </div>
	            </div>    
                <div class="row">
                	<div class="col-sm-12">
    	                <button class="btn submitBtn btn-primary btn-md" type="submit">Submit</button>
  	              </div>
                </div>
                </div>
            </form>
        </div></div>
		</div>
      </section>
	   
	   <div class="footer">
	   <div class="container">
	   <div class="copy">
	   &copy Copyright 2019 Anandvan.org   |   All Rights Reserved
	   </div><!--copy-->
	   
	   <div class="craft">
	   Crafted by - <span class="ak"><a href="http://akmediaservice.com/" target="_blank">AK Media Services</a></span><!--ak-->
	   </div><!--craft-->
	   
	   </div><!--container-->
	   </div><!--footer-->
	   
	

	
</main><!-- /main -->

  
</div><!-- /#wrapper -->

<div id="myModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Child Technology Test - Results</h4>
      </div>
      <div class="modal-body">
        <h4 class="resultmsg"><?php echo $usermsg;?></h4>
        <div class="smalltext">This is not meant as diagnosis tool! Disclaimer: We are not responsible for any use or misuse of this tool and we disclaim all warranties, express or implied, on the information provided here.</div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>

  </div>
</div>

</body>
</html>