<!-- SIGN IN MODAL -->
        <div id="signin" class="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
              <div class="modal-content">

                <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                  <h4 class="modal-title" id="myModalLabel"><?php echo $a043;?></h4>
                </div>
                <div class="modal-body">
                  <!-- SIGN IN FORM -->
				<form action="signin" method="post" class="form-horizontal">
					<div class="form-group">
						<label for="inputEmail" class="col-lg-2 control-label"><?php echo $a112; ?></label>
						<div class="col-lg-10">
							<?php $token = NoCSRF::generate( 'csrf_token' ); ?>
							<input type="hidden" name="csrf_token" value="<?php echo $token; ?>">
							<input type="text" name="login_username" class="form-control" id="inputUsername" placeholder="<?php echo $a112; ?>">
						</div>
					</div>
					<div class="form-group">
						<label for="inputPassword" class="col-lg-2 control-label"><?php echo $a113;?></label>
						<div class="col-lg-10">
							<input type="password" class="form-control" id="inputPassword" placeholder="<?php echo $a113; ?>" name="login_password" AUTOCOMPLETE="off">
						</div>
					</div>
					<div class="form-group">
						<label for="inputAccountype" class="col-lg-2 control-label"><?php echo $a058;?></label>
						<div data-original-title="Select your account type" data-toggle="tooltip" data-placement="top" title="Publisher or Advertiser" class="input-group">
							<center>
								<input id="pub" class="toggle toggle-left" name="accounttype" value="pub" type="radio" checked><label style="width:auto" class="btn btn-default" for="pub" class="btn"><?php echo $a259;?></label>
								<input id="adv" class="toggle toggle-right" name="accounttype" value="adv" type="radio"><label style="width:auto" class="btn btn-default" for="adv" class="btn"><?php echo $a260;?></label>
							</center>					
						</div>
					</div>
				</div>
					<div class="modal-footer">
						<!-- LEFT BUTTONS -->
						<a data-toggle="modal" href="#forgotpass"><button type="button" style="float:left" class="btn btn-primary" data-dismiss="modal"><?php echo $a114;?></button></a>
						<a data-toggle="modal" href="#signup"><button type="button" style="float:left" class="btn btn-primary" data-dismiss="modal"><?php echo $a042;?></button></a>
						<!-- RIGHT BUTTONS -->
						<button type="button" class="btn btn-default" data-dismiss="modal">X</button>
						<input type="submit" class="btn btn-primary" value="<?php echo $a043; ?>" name="submit" id="submit">
					</div>
				</form> 

              </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
        
<!-- SIGN IN MODAL -->
        <div id="premiumlogin" class="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
              <div class="modal-content">

                <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                  <h4 class="modal-title" id="myModalLabel">Premium login</h4>
                </div>
                <div class="modal-body">
                  <!-- SIGN IN FORM -->
				<form method="post" class="form-horizontal">
					<div class="form-group">
						<label for="inputEmail" class="col-lg-2 control-label">Secret Hash</label>
						<div class="col-lg-10">
							<?php $token = NoCSRF::generate( 'csrf_token' ); ?>
							<input type="hidden" name="csrf_token" value="<?php echo $token; ?>">
							<input type="text" name="secret_hash" class="form-control" id="inputUsername">
						</div>
					</div>
				</div>
					<div class="modal-footer">
						<!-- RIGHT BUTTONS -->
						<button type="button" class="btn btn-default" data-dismiss="modal">X</button>
						<input type="submit" class="btn btn-primary" value="<?php echo $a043; ?>" name="premiumloginsubmit" id="submit">
					</div>
				</form> 

              </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
		
<!-- SIGN UP MODAL -->
        <div id="signup" class="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
              <div class="modal-content">

                <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                  <h4 class="modal-title" id="myModalLabel"><?php echo $a042;?></h4>
                </div>
                <div class="modal-body">
                  <!-- SIGN UP MODAL -->
				<form action="signup" method="post" class="form-horizontal">
					<div class="form-group">
						<label for="inputUsername" class="col-lg-2 control-label"><?php echo $a112;?></label>
						<div class="col-lg-10">
							<input type='hidden' name='refid' id='refid' value='<?php echo $_refid ?>'>
							<input type="hidden" name="csrf_token" value="<?php echo $token; ?>">
							<input type="text" name="login_username" class="form-control" id="inputUsername" placeholder="Username">
						</div>
					</div>
					<div class="form-group">
						<label for="inputEmail" class="col-lg-2 control-label">Email</label>
						<div class="col-lg-10">
							<input type="text" name="email" class="form-control" id="inputEmail" placeholder="Email">
						</div>
					</div>
					<div class="form-group">
						<label for="inputPassword" class="col-lg-2 control-label"><?php echo $a113;?></label>
						<div class="col-lg-10">
							<input type="password" name="pass1" class="form-control" id="inputPassword" placeholder="Password">
						</div>
					</div>
					<div class="form-group">
						<label for="inputRPassword" class="col-lg-2 control-label"><?php echo $a113;?></label>
						<div class="col-lg-10">
							<input type="password" name="pass2" class="form-control" id="inputRPassword" placeholder="Repeat Password">
						</div>
					</div>
					<div class="form-group">
						<label for="inputCountry" class="col-lg-2 control-label"><?php echo $a060;?></label>
						<div class="col-lg-10">
							<input type="text" class="form-control" name="country" id="inputCountry" value="<?php echo $countryreg; ?>" READONLY>
						</div>
					</div>
            
                </div>
					<div class="modal-footer">
						<!-- LEFT BUTTONS -->
						<a data-toggle="modal" href="#forgotpass"><button type="button" style="float:left" class="btn btn-primary" data-dismiss="modal"><?php echo $a114;?></button></a>
						<a data-toggle="modal" href="#signin"><button type="button" style="float:left" class="btn btn-primary" data-dismiss="modal"><?php echo $a043;?></button></a>
						<!-- RIGHT BUTTONS -->
						<button type="button" class="btn btn-default" data-dismiss="modal">X</button>
						<input type="submit" class="btn btn-primary" value="<?php echo $a042; ?>" name="submit" id="submit">
					</div>
				</form> 

              </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
        
        
<!-- FORGOT PASSWORD MODAL -->
        <div id="forgotpass" class="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
              <div class="modal-content">

                <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                  <h4 class="modal-title" id="myModalLabel"><?php echo $a114;?></h4>
                </div>
                <div class="modal-body">
                  <!-- SIGN IN MODAL -->
				<form action="forgotpass" method="post" class="form-horizontal">
					<div class="form-group">
						<label for="inputUsername" class="col-lg-2 control-label"><?php echo $a112;?></label>
						<div class="col-lg-10">
							<input type='hidden' name='refid' id='refid' value='<?php echo $_refid ?>'>
							<input type="hidden" name="csrf_token" value="<?php echo $token; ?>">
							<input type="text" name="login_username" class="form-control" id="inputUsername" placeholder="Username">
						</div>
					</div>
					<div class="form-group">
						<label for="inputEmail" class="col-lg-2 control-label">Email</label>
						<div class="col-lg-10">
							<input type="text" name="email" class="form-control" id="inputEmail" placeholder="Email">
						</div>
					</div>
            
                </div>
					<div class="modal-footer">
						<!-- LEFT BUTTONS -->
						<a data-toggle="modal" href="#signin"><button type="button" style="float:left" class="btn btn-primary" data-dismiss="modal"><?php echo $a043;?></button></a>
						<a data-toggle="modal" href="#signup"><button type="button" style="float:left" class="btn btn-primary" data-dismiss="modal"><?php echo $a042;?></button></a>
						<!-- RIGHT BUTTONS -->
						<button type="button" class="btn btn-default" data-dismiss="modal">X</button>
						<input type="submit" class="btn btn-primary" value="<?php echo"$a094"; ?>" name="submit" id="submit">
					</div>
				</form> 

              </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->

<?php
// FOOTER FOR NORMAL SITE // EXCLUDING HOME PAGE
// LOADING STATS
$time = microtime(true);
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
if ($total_time == '0') {$total_time = '0.001';}
?>
  <footer class="text-center">
		<p>
		<nav style="margin: 0px 0px;" class="navbar navbar-inverse" role="navigation">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex2-collapse">
                    <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="#"><i class="fa fa-caret-square-o-up"></i></a>
                </div>

                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse navbar-ex2-collapse">
			<ul style="float: left;width: 70%;" class="nav navbar-nav">
          <?php
				$queryis = "SELECT * FROM Web_Footer_Menu WHERE up='0' ORDER BY ordernum ASC";
				$resultis = mysql_query($queryis) or die('1Error, query failed');
     			while($rowss = mysql_fetch_array($resultis))
				{
					$id = $rowss['id'];
					$name = $rowss['name'];
					$local = $rowss['local'];
					$modal = $rowss['modal'];
					$link = $rowss['link'];
					$querynext = "SELECT * FROM Web_Footer_Menu WHERE up='$id' ORDER BY ordernum ASC";
					$resultnext = mysql_query($querynext) or die('2Error, query failed');
					if(mysql_num_rows($resultnext)<1){
   				?>
   					<li style="float:left">
            			<a 
            			<?php 
            			if($modal == '1'){
            				echo 'data-toggle="modal" ';
            			} 
            			?>href="<?php echo $link; ?>">
            			<?php 
            			if($local == 0){
            				echo $name;
            			} 
            			if($local == 1){
            				$translationtext = $name;
								$translationtext = str_replace("[","",$translationtext);
								$translationtext = str_replace("]","",$translationtext);
            				echo $LANG[$translationtext]['definition'];
            			} 
            			?></a>
         			</li>
   				<?php
   				}else{
   					?>
   						<li style="float:left" class="dropdown">
            				<a href="#" class="dropdown-toggle" data-toggle="dropdown">
            				<?php 
            				if($local == 0){
            					echo $name;
            				} if($local == 1){
            					$translationtext = $name;
									$translationtext = str_replace("[","",$translationtext);
									$translationtext = str_replace("]","",$translationtext);
            					echo $LANG[$translationtext]['definition'];
            				} 
            				?> <b class="caret"></b></a>
            				<ul class="dropdown-menu">
   					<?php
     					while($rowe = mysql_fetch_array($resultnext))
						{
							$namee = $rowe['name'];
							$locale = $rowe['local'];
							$modale = $rowe['modal'];
							$linke = $rowe['link'];
							?>
										<li style="float:left"><a 
										<?php 
            						if($modal == '1'){
            							echo 'data-toggle="modal" ';
            						} 
            						?>href="<?php echo $linke; ?>">
										<?php 
										if($local == 0){
											echo $namee;
										} 
										if($locale == 1){
											$translationtext = $namee;
											$translationtext = str_replace("[","",$translationtext);
											$translationtext = str_replace("]","",$translationtext);
            							echo $LANG[$translationtext]['definition'];
										} 
										?></a></li>
							<?php
						}
						?>
							 	</ul>
          				</li> 
						<?php
					}
				}
          ?>
        </ul>
					<ul style="float: right;width: 20%;" class="nav navbar-nav">
						<li style="float:right"><a href="#">© <?php echo date('Y');?> <?php echo"$title";?> | <?php echo $a034;?></a></li>
					</ul>
                </div><!-- /.navbar-collapse -->
              </nav>
		</p>
		</br>
		<p>
		</p>
	</div>
  </footer>

<div id="cookiealert" style="position: fixed; width: 100%; bottom: 0px;" class="alert alert-info">
  <button type="button" class="close" data-dismiss="alert" onclick="hideMe()">×</button>
  <p>
    <strong>COOKIES POLICY:</strong> By using our website,  you agree that we may save cookies on your device. Cookies help to improve our service.
  </p>
</div>
  <!-- jQuery CDN and fallback -->
  <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
  <script>window.jQuery || document.write('<script src="data/templates/frontend/superhero/assets/js/jquery.js">\x3C/script>')</script>

  <!-- Main Scripts-->
  <script src="data/templates/frontend/superhero/assets/js/bootstrap.min.js"></script>
  <script src="data/templates/frontend/superhero/assets/js/plan.ui.js"></script>
  <!-- Bootstrap Select -->
  <script src="data/templates/frontend/superhero/assets/js/bootstrap-select.min.js"></script>

  <script src="system/general/components/jsoncookies/jquery.cookie.js"></script>
<script>
    function runOnLoad(){
        	if($.cookie('alert-box') == null) {
         	$.cookie('alert-box', 'closed', { expires: 7 });
        	} else if( $.cookie('alert-box') === 'closed' ){
				document.getElementById("cookiealert").style.visibility = "hidden";
			}
	}

</script>
</body></html>

