<?php



$page = str_replace("/dx/","",$_SERVER['PHP_SELF']);

if($page != 'change-password.php'){
	$AddClass = array('Reuse','user');
	include(CONFIG_CLASS_PATH.'class.php');
	
	if(isset($_SESSION['utype']) || isset($_SESSION['S_utype']) || isset($_SESSION['C_utype']))
	{	
		if(isset($_SESSION['C_utype'])){
			
			$user = $user_manager->getSingleUser($_SESSION['C_uId']);
			
			$admin_password_date = $user->getAdminPasswordDate();
			$date = date('Y-m-d H:i:s', strtotime(' - 90 days'));
			
			if(strtotime($admin_password_date) < strtotime($date)){
				 //true			
				$redirect_to = 'change-password.php?homePage=corp-my-acct.php#review';
					$re->redirectPage($redirect_to);
					exit;
			}	
			
		
		}	
		if(isset($_SESSION['S_utype'])){
			
			$user = $user_manager->getSingleUser($_SESSION['C_uId']);
			
			$admin_password_date = $user->getAdminPasswordDate();
			$date = date('Y-m-d H:i:s', strtotime(' - 90 days'));
			if(strtotime($admin_password_date) < strtotime($date)){
				 //true			
				  $redirect_to = 'change-password.php?homePage=my-test-summary.php#review';
				  $re->redirectPage($redirect_to);
					exit;
			}	
			
			
		}	
	}
}

include("top-menu.php");
if($tab_name=="index") {
	$index		= 'active'; 
}
if($tab_name=="test") {
	
	$tests		= 'active'; 
}
if($tab_name=="information") {
	
	$information= 'active'; 
}
if($tab_name=="advice") {
	
	$helpful_tips= 'active'; 
}
if($tab_name=="distributors") {
	
	$distributors= 'active'; 
}
if($tab_name=="pricing") {
	
	$pricing		= 'active'; 
}
if($tab_name=="blog") {
	
	$blog		= 'active'; 
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="TestingColorVision.com (TCV) was made to raise awareness and inform the public about color vision deficiencies (sometimes referred to as colorblindness). People with a color vision deficiency see colors but have a hard time differentiating between specific colors - brown and green being a good example. A color vision deficiency is often a major concern for parents of young children. TestingColorVision.com wants to teach parents and teachers how to help children be more effective in the school environment and in developing coping mechanisms to help them in every day life. Here is who we are" />
<title><?php echo TITLE ?></title>
<?php include(NAVIGATION_PATH."common-includes.php" ); ?>
<script type="text/javascript" language="javascript">
var Messages = {
		reqEnterUname 		 	: "<?=$const['JQSignInUserName'];?>",
		reqEnterUnamePwd 		: "<?=$const['JQSignInPwd'];?>",
		reqEnterValidPwd 		: "<?=$const['JQSignInValidPwd'];?>",
		reqEnterNoSpPwd 		: "<?=$const['JQPwdNoSp'];?>"
	};
</script>
</head>
<script type="text/javascript">
			var _gaq = _gaq || [];
			_gaq.push(['_setAccount', 'UA-16460764-1']);
			_gaq.push(['_trackPageview']);
			(function() {
				var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
				ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
			})();
</script>
<body>
<?php include(NAVIGATION_PATH."common-dialog-includes.php" ); ?>
<div id="wrapper">

  <div id="header">
    <div class="inn">
      <div class="logo"> <a href="<?php echo FOLDER_PATH_HTTP;?>index.php"><img src="<?php echo SITE_IMAGE_PATH_HTTP;?>logo.png" alt="TCV" border="0"/></a> </div>
      <div class="header_right fr">
	  <?php 	//Error Messages
	  				
					$color = $_SESSION['Message'] == 129 ? "green" : "red" ; 
					//echo $_SESSION['T_uId'];die; && $page != 'distributors.php'
		  		if(!isset($_SESSION['uId']) && !isset($_SESSION['S_utype']) && !isset($_SESSION['C_utype']) && !isset($_SESSION['T_uId']))
					
					include(MODULE_PATH."messages.php");
			 ?>
	  	<?php if(isset($_REQUEST['log_status']) || $_REQUEST['log_status'] == 'nologin')
		{
		?>
		<div style="float:left;width:480px;text-align:center;color:<?= $color ?>;font-weight:bold;" class="pt5"><?= !isset($_SESSION['utype']) && !isset($_SESSION['S_utype']) ? $rec_msg : '' ?></div>
		<?php } ?>
		 <?php
	  	  if(!isset($_SESSION['utype']) && !isset($_SESSION['S_utype']) && !isset($_SESSION['C_utype'])  && !isset($_SESSION['T_utype']))
		  {	
	  		 ?>
		<span id="lang_idCont">
		<!--<select name="getlanguage_id" id="getlanguage_id" class="filled_box" onchange="select_lang();">
                                    <?php
										  if(isset($getlanguages) && $getlanguages!=""){
												for($loop=0;$loop<count($getlanguages);$loop++){
													$get_language_id	 = $getlanguages[$loop]->getLanguageId();
													$get_language_name	 = $getlanguages[$loop]->getLanguageName();
									?>
                                    <option value="<?=$get_language_id?>" <?php if($language_id == $get_language_id) echo "selected"; ?>>
                                      <?=$get_language_name?>
                                    </option>
                                    <?php
								  				}
											}
								  ?>
                                  </select>-->
								  </span> <img src="<?=IMAGE_PATH_HTTP?>loading_combo.gif" width="17" height="17" style="display:none" id="comboLoadingImagepic" />
								  <?php }?>
		<div class="sign_div fr">
		
			  <?php
	  	  if(isset($_SESSION['utype']) || isset($_SESSION['S_utype']) || isset($_SESSION['C_utype'])  || isset($_SESSION['T_utype']))
		  {	
	  		 ?>
			 
			 <div class="welcome-text"><?php echo $const['Welcome'];?> <?php  if(isset($_SESSION['S_uName'])) { echo ucwords (  $_SESSION['S_uName']);} else if(isset($_SESSION['C_uName'])) {echo $_SESSION['C_uName'];} else if (isset($_SESSION['uName'])) {echo $_SESSION['uName'];}  else if (isset($_SESSION['T_uName'])) {echo $_SESSION['T_uName'];}?>!</div>
	 <?php } ?>
				<div class="sign-leftdiv"></div>
				<div class="sign-rightdiv">
				<ul class="sign_div_ul reset">
			 <?php
	  			if(isset($_SESSION['utype']))
				{		
	  			?>
					<li> <a href="<?=$_SESSION['myhome']?>"><?php echo $const['MyAccount'];?></a> </li>
					<li> <a href="<?= FOLDER_PATH_HTTP?>logout.php" class="signout"><span><?php echo $const['SignOut'];?></span></a> </li>
			 <?php
			 	}
				
	  			elseif(isset($_SESSION['C_utype']))
				{		
	  			?>
					<li> <a href="<?=$_SESSION['C_myhome']?>"><?php echo $const['MyAccount'];?></a> </li>
					<li> <a href="<?= FOLDER_PATH_HTTP?>logout.php" class="signout"><span><?php echo $const['SignOut'];?></span></a> </li>
			  <?php
			  	}
	  			elseif(isset($_SESSION['S_utype']))
				{		
	  			?>
					<li> <a href="<?=$_SESSION['S_myhome']?>"><?php echo $const['MyAccount'];?></a> </li>
					<li> <a href="<?= FOLDER_PATH_HTTP?>logout.php" class="signout"><span><?php echo $const['SignOut'];?></span></a> </li>
				<?php 
				} 
				elseif(isset($_SESSION['T_uId']))
				{		
	  			?>
					<!--<li> <a href="<?=$_SESSION['T_myhome']?>">My Account</a> </li>
-->					<li> <a href="<?= FOLDER_PATH_HTTP?>logout.php" class="signout"><span><?php echo $const['SignOut'];?></span></a> </li>
			  <?php
			  	}
				else {?>
				    <li> <a href="<?php echo FOLDER_PATH_HTTP;?>pricing.php"><?php echo $const['SignUp'];?></a> </li>
            		<li> <a href="index.php" class="signin"><span><?php echo $const['SignIn'];?></span></a> </li>
				<?php }	?>
				</ul>
			  </div>
          <fieldset id="signin_menu"  >
          <form method="post" id="signin" action="<?= FOLDER_PATH_HTTP ?>my-account-controller.php" >
		  
		  	<input type="hidden" name="step" value="ULogin"  />
			
			<?php //* user type selection commented by Mrunal Malusare on 22 June 11.*//?>
           <!-- <p><label>
              <input name="user_type" type="radio" value="I"  style="margin-left:0"/>
              Individual</label>
			  <label>
              <input name="user_type" type="radio" value="C" checked="checked" style="margin-left:0"/>
              Corporate </label></p>-->
            
			
			<p>
              <label for="username"><?php echo $const['Username'];?> <span class="mandatory-field">*</span></label>
              <input id="txtusername" name="txtusername" value="" title="username" tabindex="4" type="text"/>
            </p>
            <p>
              <label for="password"><?php echo $const['Password'];?> <span class="mandatory-field">*</span></label>
              <input id="txtpassword" name="txtpassword" value="" title="password" tabindex="5" type="password"/>
            </p>
            <p class="remember">
              <input id="signin_btn" value="<?php echo $const['SignIn'];?>" tabindex="6" type="submit"/>
              <a href="#" id="resend_password_link" class="fr"><u><?php echo $const['ForgotPass'];?></u></a> </p>
          </form>
		  <!--<p style="color:#FF0000">< ?= !isset($_SESSION['utype']) ? $rec_msg : ''?></p>-->
          </fieldset>
		  <fieldset id="forgot_menu" style="display:none;">
          <!--<form method="post" id="frmForgotpassword" action="< ?= FOLDER_PATH_HTTP ? >forgot-password-controller.php" name="frmForgotpassword">-->
		  <form method="post" id="frmForgotpassword" action="<?= FOLDER_PATH_HTTP ?>my-account-controller.php" name="frmForgotpassword">
		  <h4><?php echo $const['ForgotPass'];?></h4>
		
           <p> 
              <label for="username"><?php echo $const['Username'];?> <span class="mandatory-field">*</span></label>
              <input id="txtusernameForgot" name="txtusername" value="" title="username" tabindex="4" type="text"/><input type="hidden" name="step" value="forgot_Pass"  />
            </p>
            
            <p class="remember">
              <input id="signin_btn" value="<?php echo $const['Send'];?>" tabindex="6" type="submit"/>
			  
              <a href="#" id="cancel_link" class="fr"><u><?php echo $const['Cancel'];?></u></a> </p>
          </form>
          </fieldset>
		  
          <div class="cb"></div>
        </div>
		
        <div id="myslidemenu" class="menu jqueryslidemenu">
          <ul class="menu_ul reset">
  		   <?php 
			if($cms_content_count > 0 && $cms_contentlist!='') 
			{
			  $i=1;
			  foreach($cms_contentlist as $cms_content)
				{
				 if($cms_content['add_to_menu'] == 'Y')
				 { 
				
					 
				 if($parent_page_cat_id == 0)
				 {
				 	 if($page_cat_id  == $cms_content['pages_categories_id']){$cls = "active";}else{ $cls = "";}
				 }
				 else
				 {
					if($parent_page_cat_id  == $cms_content['pages_categories_id']){$cls = "active";}else{ $cls = "";}
				 }
				 
				  /*** Following code added by Mrunal m on 13 oct 11 to link 1st submenu's link to parent menu starts here ***/
				 $page_link_new = "";
				 if(count($sub_cms_contentlist[$cms_content['pages_categories_id']]) > 0) 
				 {				 
					 $j=1;
					 $k = 0; 
					 $page_link_new = ""; 
					 foreach($sub_cms_contentlist[$cms_content['pages_categories_id']] as $sub_cms_contentss)
					 {
					
						   if($sub_cms_contentss['add_to_menu'] == 'Y')
						   {
								if($k == 0)
								{
									$page_link_new = FOLDER_PATH_HTTP.$sub_cms_contentss['page_link'];
									$k++;
									break;
								}
						   }		
						   $j++;
					 }
				  }
				  
				  if($page_link_new == "")
					 $page_link_new = FOLDER_PATH_HTTP.$cms_content['page_link'];
				 
				 /*** Above code added by Mrunal m on 13 oct 11 to link 1st submenu's link to parent menu ends here ***/
			?>
        <!-- <li class="<? //=$cls?>"><a href="<?php //echo FOLDER_PATH_HTTP.$cms_content['page_link'];?>"><? //=$cms_content['title']?> </a>-->
		 <li class="<?=$cls?>"><a href="<?php echo $page_link_new;//FOLDER_PATH_HTTP.$cms_content['page_link'];
		 ?>"><?=$cms_content['title']?> </a>
			 <?php if(count($sub_cms_contentlist[$cms_content['pages_categories_id']]) > 0) { ?>
	             <ul class="reset">
                 <li class="topround"> &nbsp;</li>
				<?php 
				$j=1;
				foreach($sub_cms_contentlist[$cms_content['pages_categories_id']] as $sub_cms_contentss)
				{
				
				  if($sub_cms_contentss['add_to_menu'] == 'Y')
				   {
					if(count($sub_cms_contentlist[$cms_content['pages_categories_id']]) == $j){ $cls = "bottomround"; }else{ $cls = "";}
				?>
                <li class="<?=$cls?>"><a href="<?php echo FOLDER_PATH_HTTP.$sub_cms_contentss['page_link'];?>"><?=$sub_cms_contentss['title']?></a></li>				
           		<?php 
				}		
				$j++;
				} 
				?>
  			   </ul>
			  <?php } ?>
            </li>
			<?php
			$i++;
			 } 
			}
			}?>
              <li class="<?=$blog?>"><a href="<?php echo FOLDER_PATH_HTTP;?>blog/" target="_blank">Blog &amp; Articles</a></li>
          </ul>
        </div>
      </div>
      <div class="cb"></div>
    </div>
  </div>
<script type="text/javascript" language="javascript">
function select_lang()
{ 
//alert($("#getlanguage_id").val());
    $.ajax({
    type: "POST",
    url: "ajax/select_language_ajax.php",
    data: "language_id="+$("#getlanguage_id").val(),
    beforeSend: function() {
         $("#comboLoadingImagepic").show(); 
       },
  success: function(response){  
 //alert(response);
   $("#comboLoadingImagepic").hide();
   $("#lang_idCont").html(response);
    }
  });
}
</script>	
