<?php

	// include files
	require_once('../admin/php/config.php');
	require_once('../admin/php/db.php');
	require_once('../admin/php/login.php');
	require_once('php/info.php');
	require_once('../admin/php/status.php');
	//
	// query
	$userquery = $_SESSION['cityb'];
	$page_name = "city";
	$result = mysql_query("SELECT * FROM $page_name WHERE id = '$userquery' AND hidden_status <> '3' ORDER by list_number ASC", $db);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo($admin_title);?></title>
<link rel="stylesheet" type="text/css" href="../admin/css/style.css" />
</head>
<body>
<script src="../admin/script.js" language="javascript"></script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="18%" valign="top" style="padding:10px;"><?php include('menu.php'); ?></td>
    <td width="82%" valign="top" style="padding: 10px;">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td valign="top" class="adm_ct">
          <table width="100%" border="0" cellpadding="5" cellspacing="5">
            <tr>
              <td width="5%" valign="top"><strong>ID.LN</strong></td>
              <td width="95%" valign="top" colspan="2"><strong>City | Edit </strong></td>
            </tr>
            <?php
			// code
			echo('<tr bgcolor="'.$col["1"].'">'."\n");
			echo('<td width="100%" valign="top" colspan="3">'."\n");
			echo('<b>Page: <font color="#BB0000">'.$c1.' > '.$c2.'</font></b>');
			echo('</td>'."\n");
			echo('</tr>'."\n");
			// result
			if(@$myrow = mysql_fetch_array($result))
			{
				//do
				//{
			?>
              <tr bgcolor="<?php echo($col["1"]); ?>">
                <td width="5%" valign="top">
				<?php
					//
					echo('<b>'.$myrow['id'].'.'.$myrow['list_number'].'</b>');
				?>
				</td>
                <td width="90%" valign="top">
				<?php
					// title
					echo('Title: ');
					//
					if($myrow['title1'] != "")
					{
						echo('<font face="'.$info["langfont"]["1"].'"><b>'.$myrow['title1'].'</b></font>');
					}
					// title
					if($myrow['title2'] != "")
					{
						echo(', <font face="'.$info["langfont"]["2"].'"><b>'.$myrow['title2'].'</b></font>');
					}
					//
					echo('<br>');
				?>
				</td>
                <td width="5%" valign="top">
				<?php
					//
					$city = $myrow['id'];
					//
					$result3 = mysql_query("SELECT * FROM epage WHERE level1 = '$level1' AND level2 = '$level2' AND level3 = '$level3' AND info2 = '$city' AND hidden_status <> '3' ORDER by list_number ASC", $db);
					// result 
					if(@$myrow3 = mysql_fetch_array($result3))
					{
						//
						echo('<a href="edit_epage.php?id='.$myrow['id'].'&event=change&level1='.@$level1.'&level2='.@$level2.'&level3='.@$level3.'&c11='.@$c1.'&c12='.@$c2.'&c13='.@$city.'"><img src="img/t30.gif" border="0" alt="change"></a>&nbsp;');

					}
					else
					{
						//
						echo('<a href="edit_epage.php?id='.$myrow['id'].'&event=add&level1='.@$level1.'&level2='.@$level2.'&level3='.@$level3.'&c11='.@$c1.'&c12='.@$c2.'&c13='.@$city.'"><img src="img/t30b.gif" border="0" alt="add"></a>&nbsp;');

					}
					
					// status
					//echo('<a href="javascript:hidden_status(\''.$myrow['id'].'\',\''.$myrow['hidden_status'].'\',\'change_status\',\'epage\');"><img src="img/status'.$myrow['hidden_status'].'.gif" border="0" alt="hidden status"></a>&nbsp;');
					// delete
					//echo('<a href="javascript:delete_page(\''.$myrow['id'].'\',\'delete\',\'epage\');"><img src="img/delete.gif" border="0" alt="delete"></a>');	
				?>
				</td>
              </tr>
				<?php
				//} 
				//while($myrow = mysql_fetch_array($result));
			}
			?>
          </table>
		  </td>
      </tr>
    </table>
	</td>
  </tr>
</table>
</body>
</html>