<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
<?php
  ///////////////////////////////////////////////////
  //2007 (C)
  //Карпухин Павел
  ///////////////////////////////////////////////////

   if(empty($title)) $title = $TEXT['global-title'];
   if(empty($description)) $description = $TEXT['global-description'];
   if(empty($keywords)) $keywords = $TEXT['global-keywords'];
?>
<html>
<head>
<meta http-equiv="Expires" content="Mon, 23 May 1995 02:00:00 GMT" />
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
<meta name="description" content="<?php echo $description; ?>" />
<meta name="keywords" content="<?php echo $keywords; ?>" />
<title><?php echo $title; ?></title>
<link rel="StyleSheet" type="text/css" href="../util/admin.css" />
<link rel="icon" href="../favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
</head>
<?php
  if(! @mysql_select_db($dbname,$dbcnx))
  {
    echo("<p>At this moment database is not available, therefore correct display of page is impossible.<br />If you do not install project previously, run script <a href=install.php>http://".$_SERVER['SERVER_ADDR']."/personal/install.php</a></p>");
    exit();
  }

  if(empty($_COOKIE['login'])) puterror2($TEXT['error-loginform5']);
  if(empty($_COOKIE['passwrd'])) puterror2($TEXT['error-loginform5']);

  $query = "SELECT * FROM `tbl_logins` WHERE `login`='".$_COOKIE['login']."' ";
  $result = mysql_query($query);
  if(!$result) puterror2($TEXT['error-tbl20']);
      $result2 = mysql_fetch_array($result);
      $passw1 = $_COOKIE['passwrd'];
      $passw2 = $result2['pass'];

       if($passw1 !== $passw2) puterror2($TEXT['error-loginform3']);
       if(empty($passw1)) puterror2($TEXT['error-loginform3']);
       if($result2['otvetstvenniy'] == 1) puterror2($TEXT['error-supp11']);

  $query_srv = "SELECT `glob_w`, `glob_h`, `user_w`, `user_h`, `res_w`, `res_h`, `admin_mail_rss`, `admin_mail_news` FROM `tbl_srv_param` LIMIT 1";
  $result_srv = mysql_query($query_srv);
  if(!$result_srv) puterror2($TEXT['error-tbl44']);
   $result_srv_set = mysql_fetch_array($result_srv,MYSQL_ASSOC);

  $TEXT['about-width'] = "520"; // ширина формы - инф. о программе
  $TEXT['about-height'] = "250"; // высота формы - инф. о программе
  $TEXT['about-top'] = ($result_srv_set['glob_h']/2)-(250/2); // выравнивание на экране (пикселей от верхнего края) - о программе
  $TEXT['about-left'] = ($result_srv_set['glob_w']/2)-(520/2); // выравнивание на экране (пикселей от левого края) - о программе
