<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<?php
  ///////////////////////////////////////////////////
  //2010 (C)
  //Карпухин Павел
  ///////////////////////////////////////////////////

  $month["1"] = $TEXT['month01'];
  $month["2"] = $TEXT['month02'];
  $month["3"] = $TEXT['month03'];
  $month["4"] = $TEXT['month04'];
  $month["5"] = $TEXT['month05'];
  $month["6"] = $TEXT['month06'];
  $month["7"] = $TEXT['month07'];
  $month["8"] = $TEXT['month08'];
  $month["9"] = $TEXT['month09'];
  $month["01"] = $TEXT['month01'];
  $month["02"] = $TEXT['month02'];
  $month["03"] = $TEXT['month03'];
  $month["04"] = $TEXT['month04'];
  $month["05"] = $TEXT['month05'];
  $month["06"] = $TEXT['month06'];
  $month["07"] = $TEXT['month07'];
  $month["08"] = $TEXT['month08'];
  $month["09"] = $TEXT['month09'];
  $month["10"] = $TEXT['month10'];
  $month["11"] = $TEXT['month11'];
  $month["12"] = $TEXT['month12'];

  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` 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['user-width'] = $result_srv_set['user_w']; // ширина формы - инф. о пользователе
  $TEXT['user-height'] = $result_srv_set['user_h']; // высота формы - инф. о пользователе
  $TEXT['user-top'] = ($result_srv_set['glob_h']/2)-($result_srv_set['user_h']/2); // выравнивание на экране (пикселей от верхнего края) - инф. о пользователе
  $TEXT['user-left'] = ($result_srv_set['glob_w']/2)-($result_srv_set['user_w']/2); // выравнивание на экране (пикселей от левого края) - инф. о пользователе

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
<title><?php echo $TEXT['prn-title']; ?></title>
<link rel="StyleSheet" type="text/css" href="../utils/reader.css" />
<link rel="StyleSheet" type="text/css" href="../utils/grid.css" />
<link rel="icon" href="../Favicon/print.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../Favicon/print.ico" type="image/x-icon" />
</head>
<body leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" bottommargin="0" topmargin="0" >
<script type="text/javascript" language="JavaScript" src="../lang/calendar-<?php echo $lang; ?>.js"></script>