<?php
  ///////////////////////////////////////////////////
  //2010 (C)
  //Карпухин Павел
  ///////////////////////////////////////////////////
  require_once "utils/chlang_osn.php";

  $title = $TEXT['book-rez'];
  $button = $TEXT['bok-rez-on'];
  $action = "film-rez_on.php";
?>
<script type="text/javascript" language="JavaScript" src="lang/<?php echo $lang; ?>/calendar_usr.js"></script>
<?php
  require_once "config.php";
  require_once "utils/functions.php";
  require_once "utils/top_film.php";

  if($result2['administrator'] == 0) {puterror($result2['skin'],$TEXT['error-loginform2']); require_once "../utils/bottom_film.php"; exit();}

  if(empty($_GET['film_id'])) {puterror2($result2['skin'],$TEXT['error-film5']); require_once "utils/bottom_film.php"; exit();}
  if(strlen($_GET['film_id'])>20) {puterror2($result2['skin'],$TEXT['error-film6']); require_once "utils/bottom_film.php"; exit();}
  $_GET['film_id'] = rep($_GET['film_id']);

  $date_day = date("d");
  $date_month = date("m");
  $date_year = date("Y");
  $chislo = (date("$date_year\-$date_month\-$date_day"));

  $query10 = "SELECT login_id,  name, familiya, otchestvo FROM `tbl_logins` WHERE login_id = '".$result2['login_id'] ."' ";
     $result10 = mysqli_query($dbcnx,$query10);
       if(!$result10) {puterror2($result2['skin'],$TEXT['error-tbl7']); require_once "utils/bottom_film.php"; exit();}
         $result_login = mysqli_fetch_array($result10);
?>
<form name="film" enctype="multipart/form-data" action="<?php echo $action; ?>" method="post">
<table align="center" >
<tr><td class="bold_it"><?php echo $TEXT['book-data5']; ?>:</td><td><input size="10" maxlength="10" type="text" name="data_zakaza" value="<?php echo $chislo; ?>" />
<script type="text/javascript" language="JavaScript">
	var o_cal = new tcal ({
		// form name
		'formname': 'film',
		// input name
		'controlname': 'data_zakaza'
	});
	</script></td></tr>
<tr><td class="bold_it"><?php echo $TEXT['user-tit']; ?>: </td><td class="input"><?php echo $result_login['familiya']."&nbsp;".$result_login['name']."&nbsp;".$result_login['otchestvo']; ?>
</td></tr>
<tr><td></td><td><input class="button2" type="submit" value="<?php echo $button; ?>" />
<input type="hidden" name="film_id" value="<?php echo $_GET['film_id']; ?>" />
<input  type="hidden" name="user_id" value="<?php echo $result_login['login_id']; ?>"  />
</td></tr>
</table>
</form>
<?php
  require_once "utils/bottom_film.php";
?>