Файл: Ajax_Chat_by_Valen_v1.1/index.php
Строк: 45
<?php
include"db_con.php";
/* Значения идентефикации пользователя берем с сессии*/
/*Для примера создам сессию с данными юзера*/
$_SESSION['us_id'] = 11; /*id пользователя*/
$_SESSION['us'] = 'тест'; /*имя пользователя*/
?>
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<script src="/JS/jquery.min.js"></script>
<script type="text/javascript" src="/JS/mess.js"></script>
<script src="/TextEditor/jquery.wysibb.min.js"></script>
<link rel="stylesheet" href="/TextEditor/theme/default/wbbtheme.css" />
<link rel="stylesheet" type="text/css" href="style.css">
<title>Ajax Чат от Valen'а</title>
</head>
<body>
<script>
$(document).ready(function() {
var wbbOpt = {
buttons: "bold,italic,underline,strike,|,justifyleft,justifycenter,justifyright,quote,|,img,link,|,table,|,fontcolor,fontsize,|,smilebox,|video,"
}
$("#mess").wysibb(wbbOpt);
});
</script>
</head>
<div class="form-container">
<?php
if($inf['id'])
{
echo'<div class="form-title"><h2>Ajax Чат от Valen'а</h2></div>';
echo'<textarea class="form-field" id="mess" name=" " autofocus="autofocus"></textarea>';
echo'<input id="add_mess" name="add_mess" type="button" class="submit-button" onclick="document.getElementById('mess').value='';" value="Oтправить"/>';
echo'<br /><br />';
}
else
{
echo'
<div class="form-container-aut">
<div class="form-title"><h2>Ajax Чат от Valen'а</h2></div>
<form action="aut.php" method="POST">
<div class="form-title-aut">Логин</div>
<input class="form-field-aut" type="text" name="login" /><br />
<div class="form-title-aut">Пароль</div>
<input class="form-field-aut" type="password" name="pass"><br />
<input class="submit-button-aut" type="submit" value="Войти" />
</form>
<a href="reg.php">Регистрация</a>
</div>
<br /><br />
';
}
?>
<div id="content" class="content"></div>
</div>
</body>
</html>