<?php
require_once('sql.php');
require_once('functions.php');
//$avatars = get_user_avatars();
?>

<!DOCTYPE html>
<html lang="sr">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="robots" content="noindex">
  <meta name="description" content="U atraktivnom Klubu RESET 25.07. #DigitalNight okuplja preko 200 uticajnih pojedinaca u svetu digitalnih medija.">
  <meta name="author" content="Homepage doo">
  <link rel="shortcut icon" type="image/x-icon" href="../../images/favicon.ico">
  <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,800&subset=latin,latin-ext' rel='stylesheet' type='text/css'>

  <!-- Bootstrap core CSS -->
  <link href="../../css/bootstrap.min.css" rel="stylesheet">
  
  <!-- Custom styles for this template -->
  <link href="../../css/style.css" rel="stylesheet">
  <link href="../../css/vip-style.css" rel="stylesheet">

  <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
  <![endif]-->
  
  <!--[if gte IE 9]>
    <style type="text/css">
      .gradient {
         filter: none;
      }
    </style>
  <![endif]-->  
  <script src='//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script>
	<script>
		(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
		(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
		m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
		})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
	
		ga('create', 'UA-30238296-1', 'homepage.rs');
		ga('send', 'pageview');
	
	</script>
  <title>Twitter zamena avatara | Digital Night</title>
</head>
    <body>
    <section id="vip-registration">
      <div class="container">
        <div class="row">
          <div class="col-xs-12 col-sm-offset-2 col-sm-8 col-md-offset-3 col-md-6 registration-logo">
              <img src="../../images/digitalnight-logo.png" alt="DigitalNight Reset" class="img-responsive" />
          </div>
          
          <!-- Primer box-a sa dugmićima -->
          <div class="col-xs-12 col-sm-offset-1 col-sm-10 col-md-offset-2 col-md-8">
          	<div class="step-box">
						<?php if(!empty($_SESSION['access_token']) || !empty($_SESSION['access_token']['oauth_token']) || !empty($_SESSION['access_token']['oauth_token_secret'])) :?>
              <div class="second_screen">
                
                <div class="avatar_border">
                    <img class = "avatar" src="user_img/<?php echo $_SESSION['tw_screen_name']; ?>.png">
                </div>
                
                <p class="message_after copy avatarchange-copy"><?php if(isset($msg)){echo $msg;} ?></p>
                <form action="index.php" method="POST">
                	<div class="action-btns">
                    <input type="submit" class="avatar-change btn" name="submit" value="Potvrdi promenu" />
                    <a class="action-btn finish-btn" href="http://digitalnight.rs">Digital Night</a>
                  </div>
                </form>
              </div>
            <?php else :  ?>
                <!--Preusmeri ga odmah na auhentikaciju-->
                <script>top.location.href='./redirect.php';</script>
            <?php  endif; ?>
            </div>
					</div>
        </div>
      </div>
   		<div id="vip-footer">
        <p>Copyright &copy; DigitalNight 2014.</p>
      </div>
    </section>
    
</body>
</html>