<!DOCTYPE HTML>
<html lang="cs">
  <head>
   <title>Sauron the Nameless | Temný pán Sauron a jeho Jeden prsten</title>
   
   <!-- linky na fontiky atd.-->
  <link href="styl.css" rel="stylesheet" type="text/css">
  <link rel="shortcut icon" href="favicon.ico" />
  <link href="https://fonts.googleapis.com/css?family=Metamorphous" rel="stylesheet"> <!-- automaticky vygenerovaný link ze stránky google fonts-->
  
  
  <!--meta srandy!-->
  <meta name="google-site-verification" content="BGbvrhywKmrT8BR0-434naDZw74DcSZEAXDJ4hLmn34" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <meta name="description" content="Sauron, kým ve skutečnosti byl, stvoření a moc jeho Jednoho prstenu, jak přišel o Jeden prsten">
  <meta name="keywords" content="Jeden prsten, Sauron, Středozemě, Temný pán">
  <meta name="author" content="Adam Foltýn">
  <meta property="og:title" content="Temný pán Sauron a jeho historie" />  <!-- OG: opengraph protocol; sloužící k nastavení vzhledu odkazu na facebooku -->
  <meta property="og:description" content="Dozvíte se více o Sauronově historii a původu, o historii Středozemě a vzniku Prstenů moci." />
  <meta property="og:site_name" content="Sauron" />
  <meta property="og:image" content="http://www.sauron.4fan.cz/index/barad.png" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>

	function commentSubmit(){ //procedura, ktera se spusti na zavolani
		if(form1.comments.value == ''){ //pokud je komentar prazdny, tak se neodesle (prazdne jmeno bude pozdeji nahrano do db jako anonym)
			alert('Enter your message !');
			return;
		}
		var name = form1.name.value; //nacita hodnoty z formulare
		var comments = form1.comments.value;
    var pwd = form1.pwd.value
		var xmlhttp = new XMLHttpRequest(); 
		
		xmlhttp.onreadystatechange = function(){ //vypise obsah insert.php az se uspesne nacte z databaze
			if(xmlhttp.readyState==4&&xmlhttp.status==200){
				document.getElementById('comment_logs').innerHTML = xmlhttp.responseText; //komentare se ukazou kazdy ve svem okne
			}
		}
		xmlhttp.open('GET', 'insert.php?name='+name+'&comments='+comments+'&pwd='+pwd, true); //otevre a odesle http zadost
		xmlhttp.send();
	}
	
		$(document).ready(function(e) {
			$.ajaxSetup({cache:false});
			setInterval(function() {$('#comment_logs').load('logs.php');}, 2000); //nacte komentare do divu comment_logs
		});

    
function FeedSubmit(){ //procedura, ktera se spusti na zavolani
    var name = form2.name.value; //nacita hodnoty z formulare
    var psw = form2.psw.value;
    var vzhled= form2.vzhled.value;
    var tema= form2.tema.value;
    var kvalita= form2.kvalita.value;
    var message= form2.message.value;
    var xmlhttp = new XMLHttpRequest(); 
    
    
    xmlhttp.open('GET', 'email.php?name='+name+'&psw='+psw+'&vzhled='+vzhled+'&tema='+tema+'&kvalita='+kvalita+'&message='+message, true); //otevre a odesle http zadost
    xmlhttp.send();
  };
  $(document).ready(function(e) {
      $.ajaxSetup({cache:false});
      setInterval(function() {$('#comment_logs').load('logs.php');}, 2000); //nacte komentare do divu comment_logs
    });
  
</script>


  </head>
  <body>
  
  <div style="display:none;"><endora></div>
  <div class="background">
  <img src="mace.png" class="foresize" alt="palcát">
  </div>
  <div class="foreground">
  <h1 class="nadpis" ><a href="index.php?stranka=sauron" class="hm">Dark Lord Sauron</a></h1> <!-- -->
  </div>
  <div id="mez2">
  </div>
  <div class="col-2 col-m-3 menu">
  <ul>
    <li class="special"><a href="index.php?stranka=sauron" class="button button" >Sauron</a></li>
    <li class="special"><a href="index.php?stranka=valar" class="button">Valar</a></li>
    <li class="special"><a href="index.php?stranka=maiar" class="button" >Maiar</a></li>
    <li class="special"><a href="index.php?stranka=rings" class="button" >Prsteny</a></li><br><br><br><br>
    <li class="special"><a href="index.php?stranka=comment" class="button" >Diskuze</a></li> 
    <li class="special"><a href="index.php?stranka=feedback" class="button" >Registrace a Feedback</a></li> <br> <br>
    <li class="special"><a href="http://minihra.4fan.cz/index.php" class="button" >Minihra</a></li>
  </ul>
</div>
  <div class="mez">
  </div>

  <?php
				if (isset($_GET['stranka'])) {
        require($_GET['stranka'] . '.php');
}
else {
  require('sauron' . '.php');
}
        
              ?>
  
  
  
  <div class="col-12 col-m-12 mez">
  </div>
  <div class="col-12 col-m-12 pata">
  <p class="ppat">Vytvořil Adam Foltýn IT3B 2016, <a href="foltyn_sauron.pdf" download>stáhnout pdf</a>, <a href="foltyn_sauron.rar" download>stáhnout rar</a> 
  <br> Kontrola validity <a href="http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.sauron.4fan.cz%2F&profile=css3&usermedium=all&warning=1&vextwarning=&lang=cs" target="_blank">CSS</a>, 
  <a href="http://validator.w3.org/nu/?doc=http%3A%2F%2Fwww.sauron.4fan.cz%2F" target="_blank">HTML</a> a <a href="http://www.silaseo.cz/seo-test/sauron.4fan.cz" target="_blank">SEO</a>
  </p>
  <?php 
  $zdroj=$_GET['stranka'];
  switch($zdroj){
    case "sauron":
    echo '<p class="cnt">
  Sauron. In: The Lord of the Rings Wiki: Fandom powered by Wikia [online]. [cit. 28.11.2016]. Dostupné z: <a href="http://lotr.wikia.com/wiki/Sauron" target="_blank">http://lotr.wikia.com/wiki/Sauron</a>
  </p>';
    break;
    case "valar":
    echo '<p class="cnt">
  Valar. In: The Lord of the Rings Wiki: Fandom powered by Wikia [online]. [cit. 28.11.2016]. Dostupné z: <a href="http://lotr.wikia.com/wiki/Valar" target="_blank">http://lotr.wikia.com/wiki/Valar </a>
  </p>';
    break;
    case "maiar":
    echo '<p class="cnt">Maiar. In: The Lord of the Rings Wiki: Fandom powered by Wikia [online]. [cit. 28.11.2016]. Dostupné z: <a href="http://lotr.wikia.com/wiki/Maiar" target="_blank">http://lotr.wikia.com/wiki/Maiar</a>
  </p>';
    break;
    case "rings":
    echo '<p class="cnt">Rings of Power. In: The Lord of the Rings Wiki: Fandom powered by Wikia [online]. [cit. 28.11.2016]. Dostupné z: <a href="http://lotr.wikia.com/wiki/Rings_of_Power" target="_blank">http://lotr.wikia.com/wiki/Rings_of_Power</a>
  </p>';
    break;
    case "feedback":
    echo '<p class="cnt"> Markle, B (2016) PHPMailer (Verze 5.2.0) [Source code]. Dostupné z: <a href="http://www.inmotionhosting.com/support/email/send-email-from-a-page/using-phpmailer-to-send-mail-through-php">http://www.inmotionhosting.com/support/email/send-email-from-a-page/using-phpmailer-to-send-mail-through-php</a>
  </p>';
    break;
    case "comment":
    echo '<p class="cnt">Parbuaya, G (2014) Chat box (Verze 1.0.0) [Source code]. Dostupné z: <a href="http://www.sourcecodester.com/php/7191/how-create-comment-box-using-php-mysql.html">http://www.sourcecodester.com/php/7191/how-create-comment-box-using-php-mysql.html</a> </p>';
    break;
    default: 
    echo '<p class="cnt">
  Sauron. In: The Lord of the Rings Wiki: Fandom powered by Wikia [online]. [cit. 28.11.2016]. Dostupné z: <a href="http://lotr.wikia.com/wiki/Sauron" target="_blank">http://lotr.wikia.com/wiki/Sauron</a>
  </p>';
  }
  ?>
  </div>
  </body>
</html>
