<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Web management</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<?php include 'codes.php';?>
</head>
<body>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
    
<div><img src="img/frame-list.png" width="180" height="37" alt=""></div>
<div class="frame">

<?php 
$search = mysql_real_escape_string(stripslashes($_REQUEST['search'])); 
$search="%".$search."%";
?>

<?php 
$sql1 = "SELECT * FROM rooms WHERE (name LIKE '$search' OR text LIKE '$search') ORDER BY priority";
$result1 = mysql_query($sql1);
while ($myrow=mysql_fetch_array($result1)) {
$roomid=$myrow['insert_id'];
			
$result2 = mysql_query("SELECT * FROM rooms WHERE insert_id='$roomid' AND lang_id=1",$dbh);
$myrow=mysql_fetch_array($result2);
$id=$myrow['id'];
$insert_id=$myrow['insert_id'];
$name=$myrow['name'];
$image=$myrow['image'];
$publish=$myrow['publish'];
$publisha=$myrow['publisha'];
$publishb=$myrow['publishb'];
$priority=$myrow['priority'];
?>
<?php include 'roomin.php';?>
<?php }?>

<hr>

<?php 
$sql3 = "SELECT * FROM info WHERE (name LIKE '$search' OR text LIKE '$search') AND publish='yes' ORDER BY priority";
$result3 = mysql_query($sql3);
while ($myrow=mysql_fetch_array($result3)) {
$categoryid=$myrow['category_id'];
$id=$myrow['id'];
$insert_id=$myrow['insert_id'];
$lang_id=$myrow['lang_id'];
$category_id=$myrow['category_id'];
$name=$myrow['name'];
$description=$myrow['text'];
$publish=$myrow['publish'];
$priority=$myrow['priority'];
			
$sql4 = "SELECT * FROM infocategories WHERE insert_id='$categoryid' AND lang_id=1 AND publish='yes' ORDER BY priority";
$result4 = mysql_query($sql4);
while ($myrow=mysql_fetch_array($result4)) {
$isids2=$myrow['insert_id'];
$page2=$myrow['page'];
	
$result5 = mysql_query("SELECT * FROM infocategories WHERE insert_id='$isids2' AND lang_id=1",$dbh);
$myrow=mysql_fetch_array($result5);
$infocat=$myrow['title'];
?>

<?php include 'infoin.php';?>
<?php }?>
<?php }?>

</div>
</td>
  </tr>
</table>
<?php include 'menudown.php';?>
</body>
</html>
