<?
session_start();
include ('../kernel/nastaveni.php');
?>
<!-- TinyMCE -->
<script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
	// Default skin
	tinyMCE.init({
		// General options
		
		mode : "exact",
		elements : "tiny",
    language : "cs",
		theme : "advanced",
		plugins : "safari,pagebreak,style,layer,advhr,advimage,advlink,emotions,iespell,insertdatetime,media,contextmenu,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",

		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "bullist,numlist,|,undo,redo,|,link,unlink,image,|,forecolor,backcolor,|,sub,sup,|,charmap,emotions,iespell,media",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "center",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,

		// Example content CSS (should be your site CSS)
		content_css : "tinymce/css/content.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "tinymce/lists/template_list.js",
		external_link_list_url : "tinymce/lists/link_list.js",
		external_image_list_url : "tinymce/lists/image_list.js",
		media_external_list_url : "tinymce/lists/media_list.js",

		// Replace values for the template plugin
		template_replace_values : {
			username : "MyThings CMS",
			staffid : "991234"
		}
	});
</script> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>     
  <head>         
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">         
    <meta name="generator" content="PSPad, Bluefish">          
    <meta http-equiv="content-language" content="cs" >            
    <meta NAME="description" CONTENT="Redakční systém MyPage">	        
    <meta name="robots" content="noindex,nofollow">          
    <meta NAME="distribution" CONTENT="global">	        
    <meta name="author" content="Jiří Bednář">	          
    <title>MyPage - Administrace          
    </title>        
       
    <link href="style.css" rel="stylesheet" type="text/css" media="screen">     
  </head>     
  <body>	          
    <div id="wrapper">    	<h1>                 
        <a href="index.php">                     
          <span id="a">My</span><span id="b">Page</span> Administrace</a> <span id="c">Beta</span></h1>            
      <span id="lookweb">                 
        <a href="../index.php">Zobrazit web</a>             
      </span>                               
      <ul id="mainNav">
<?
include("index/menu.php");
                        ?>                      
      </ul>                                     
      <div id="containerHolder">			                  
        <div id="container">                                                                                       
          <div id="main">
<?
$chmod_1 = substr(sprintf('%o', fileperms('../publikace/clanky')), -4);
$chmod_1_1 = substr(sprintf('%o', fileperms('../publikace/clanky/clanky.php')), -4);
$chmod_2 = substr(sprintf('%o', fileperms('../publikace/odkazy')), -4);
$chmod_2_1 = substr(sprintf('%o', fileperms('../publikace/odkazy/odkazy.php')), -4);
$chmod_3 = substr(sprintf('%o', fileperms('../publikace/rubriky')), -4);
$chmod_3_1 = substr(sprintf('%o', fileperms('../publikace/rubriky/rubriky.php')), -4);
$chmod_4 = substr(sprintf('%o', fileperms('../publikace/stranky')), -4);
$chmod_4_1 = substr(sprintf('%o', fileperms('../publikace/stranky/stranky.php')), -4);
$chmod_5 = substr(sprintf('%o', fileperms('../kernel/nastaveni.php')), -4);


if($chmod_1 == '0777' && $chmod_1_1 == '0666' && $chmod_2 == '0777' && $chmod_2_1 == '0666' && $chmod_3 == '0777' && $chmod_3_1 == '0666' && $chmod_4 == '0777'&& $chmod_4_1 == '0666' && $chmod_5 == '0666'){
if($account['pass'] == "dc647eb65e6711e155375218212b3964"){
echo "<div id=\"info\"><div id=\"bad\">Z bezpečnostních důvodů si změnte heslo</div></div>";
}
}
else{
echo "<div id=\"info\"><div id=\"bad\">Pro správnou funkčnost systému nastavte složkám a souborů správný CHMOD.<br > Seznam s návodem naleznete <a href=\"index.php?id=chmod\">zde</a>.</div></div>";
}
if(!isset($_SESSION['name']) && !isset($_SESSION['pass'])){
exit ("<div id=\"info\"><div id=\"bad\">Nejste přihlášen/a</div></div>
<meta http-equiv=\"refresh\" content=\"0;URL=../index.php\">
");
}

if(isset($_GET['id'])){
include("index/$_GET[id].php");
}
else{
include("index/uvod.php");
}
?>                                       
          </div>                                                                     
          <div class="clear">                     
          </div>                              
        </div>                                
      </div>	                      
<?
include("index/zapati.php");
?>               
    </div>          
  </body>
</html>