<?php
session_start();
require_once "sys/config.php";
require_once "sys/database.php";
require_once "sys/func.php";
require_once "sys/action_msg.php";
$_SESSION['code'] = rand(111,999);
?>
<!DOCTYPE html PUBLIC "//-W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $title; ?></title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="description" content="<?php echo $description; ?>" />
<meta name="keywords" content="<?php echo $keywords; ?>" />
<link rel="stylesheet" href="css/main.css" type="text/css" />
</head>
<body>
<div id="main"><center>
<h2><?php echo $namesite; ?></h2>
<form action="" method="POST">
<input type="text" name="name" placeholder="Введите ваше имя" /><br/><br/>
<textarea placeholder="Введите сообщения" name="msg"></textarea><br/>
<input size="1" maxlength="3" type="text" name="code" placeholder="<?php echo $_SESSION['code']; ?>" />
<input type="submit" name="add" value="Отправить" />
</form><hr/>
<?php require_once "sys/list_msg.php"; ?>
</center></div>
<div id="foot"><?php echo $copyright; ?></div>
</body>
</html>
<?php require_once "sys/mysql_close.php"; ?>