<?php
mysql_select_db($database_telmanik_press, $telmanik_press);
$query_all_pages = "SELECT * FROM pages WHERE id >= 2 ORDER BY page_name ASC";
$all_pages = mysql_query($query_all_pages, $telmanik_press) or die(mysql_error());
$row_all_pages = mysql_fetch_assoc($all_pages);
$totalRows_all_pages = mysql_num_rows($all_pages);

mysql_select_db($database_telmanik_press, $telmanik_press);
$query_theme_select = "SELECT * FROM theme";
$theme_select = mysql_query($query_theme_select, $telmanik_press) or die(mysql_error());
$row_theme_select = mysql_fetch_assoc($theme_select);
$totalRows_theme_select = mysql_num_rows($theme_select);


mysql_select_db($database_telmanik_press, $telmanik_press);
$query_webinfo_select = "SELECT * FROM info";
$webinfo_select = mysql_query($query_webinfo_select, $telmanik_press) or die(mysql_error());
$row_webinfo_select = mysql_fetch_assoc($webinfo_select);
$totalRows_webinfo_select = mysql_num_rows($webinfo_select);


mysql_select_db($database_telmanik_press, $telmanik_press);
$query_logo_select = "SELECT * FROM logo";
$logo_select = mysql_query($query_logo_select, $telmanik_press) or die(mysql_error());
$row_logo_select = mysql_fetch_assoc($logo_select);
$totalRows_logo_select = mysql_num_rows($logo_select);


?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">

<title><?php echo $title; ?></title>
 <link rel="stylesheet" type="text/css" href="<?php echo $row_webinfo_select['website']?>/themes/<?php echo $row_theme_select['theme']?>/css/telmanik_press.css" />
<link rel="shortcut icon" href="<?php echo $row_webinfo_select['website']?>/themes/<?php echo $row_theme_select['theme']?>/images/favicon.ico">

</head>

<body><div id="full_layout"><div id="header"><div id="logo"><img src="<?php echo $row_webinfo_select['website']?>/logo/<?php echo $row_logo_select['image_name'];?>" alt="<?php echo $row_logo_select['title'];?>" /></div></div>

<div id="navigation_bar"><div id="navigation"><div id="navigation_font">
<a href="<?php echo $row_webinfo_select['website']?>">Home</a> <?php do { ?>
  - <a href="<?php echo $pages_space = str_replace(' ', '_', $row_all_pages['page_name']);  ?>"><?php echo $row_all_pages['page_name']; ?></a>
  <?php } while ($row_all_pages = mysql_fetch_assoc($all_pages)); ?></div></div></div>