menu
person
[ Обновленные темы · Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Форум » Программы » Программы » Web-дизайн
Web-дизайн
red-lineДата: Пятница, 09.01.09, 13.55 | Сообщение # 1
Администратор сайта
Группа: Администраторы
Сообщений: 868
Статус:
Какими програмами Вы пользуетесь для создания Web-дизайна?
 
Vlad_vitaminДата: Суббота, 09.05.09, 20.23 | Сообщение # 2
Програмист/Помощник
Группа: Администраторы
Сообщений: 41
Статус:
adobe all!!! biggrin

Я второй Администратор!
 
ГостьДата: Пятница, 30.04.10, 13.23 | Сообщение # 3
Группа: Гости





<?php
include ("blocks/bd.php"); // тут происходит подключение к mySQL
if (isset($_POST['author'])) {
$author = $_POST['author'];
}
if (isset($_POST['text'])) {
$text = $_POST['text'];
}
if (isset($_POST['guard'])) {
$guard = $_POST['guard'];
}
if (isset($_POST['sub_com'])) {
$sub_com = $_POST['sub_com'];
}
if (isset($_POST['id_news'])) {
$id_news = $_POST['id_news'];
}
if (isset($_POST['id_guard'])) {
$id_guard = $_POST['id_guard'];
}
// Проверка правильности ввода данных
if (isset($sub_com)) {
if (isset($author)) {
trim($author);
} else {
$author='';
}
if (isset($text)) {
trim($text);
} else {
$text='';
}
if (empty($author) or empty($text) or $author=='Имя' or $text=='Текст') {
exit ("<table class='warning' width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td align='center'>
Не все поля заполнены.<br>
Их не так много. Пожалуйста, заполните все.<br>
<input name='back' type='button' value='Назад' onclick='jаvаscript:self.back();'>
</td>
</tr>
</table>");
}
$author = stripslashes($author);
$text = stripslashes($text);
$author = htmlspecialchars($author);
$text = htmlspecialchars($text);
$result = mysql_query("SELECT num FROM guard WHERE id=$id_guard",$db);
$myrow = mysql_fetch_array($result);
if ($guard != $myrow['num']) {
exit ("<table class='warning' width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td align='center'>
Введен неправильный код.<br>
Попробуйте еще раз<br>
<input name='back' type='button' value='Назад' onclick='jаvаscript:self.back();'>
</td>
</tr>
</table>");
}
$now = date("d.m.Y - H:i");
$result = mysql_query("INSERT INTO news_comments (news, author, text, date) VALUES ('$id_news', '$author', '$text', '$now')", $db);
$location = 'view.php?id='.$id_news.'#comments';
header("Refresh: 0;url=$location");
exit();
}

Добавлено (30.04.10, 13.23)
---------------------------------------------
[code]<?php
include ("blocks/bd.php"); // тут происходит подключение к mySQL
if (isset($_POST['author'])) {
$author = $_POST['author'];
}
if (isset($_POST['text'])) {
$text = $_POST['text'];
}
if (isset($_POST['guard'])) {
$guard = $_POST['guard'];
}
if (isset($_POST['sub_com'])) {
$sub_com = $_POST['sub_com'];
}
if (isset($_POST['id_news'])) {
$id_news = $_POST['id_news'];
}
if (isset($_POST['id_guard'])) {
$id_guard = $_POST['id_guard'];
}
// Проверка правильности ввода данных
if (isset($sub_com)) {
if (isset($author)) {
trim($author);
} else {
$author='';
}
if (isset($text)) {
trim($text);
} else {
$text='';
}
if (empty($author) or empty($text) or $author=='Имя' or $text=='Текст') {
exit ("<table class='warning' width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td align='center'>
Не все поля заполнены.<br>
Их не так много. Пожалуйста, заполните все.<br>
<input name='back' type='button' value='Назад' onclick='jаvаscript:self.back();'>
</td>
</tr>
</table>");
}
$author = stripslashes($author);
$text = stripslashes($text);
$author = htmlspecialchars($author);
$text = htmlspecialchars($text);
$result = mysql_query("SELECT num FROM guard WHERE id=$id_guard",$db);
$myrow = mysql_fetch_array($result);
if ($guard != $myrow['num']) {
exit ("<table class='warning' width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td align='center'>
Введен неправильный код.<br>
Попробуйте еще раз<br>
<input name='back' type='button' value='Назад' onclick='jаvаscript:self.back();'>
</td>
</tr>
</table>");
}
$now = date("d.m.Y - H:i");
$result = mysql_query("INSERT INTO news_comments (news, author, text, date) VALUES ('$id_news', '$author', '$text', '$now')", $db);
$location = 'view.php?id='.$id_news.'#comments';
header("Refresh: 0;url=$location");
exit();
}[/code]

 
Форум » Программы » Программы » Web-дизайн
  • Страница 1 из 1
  • 1
Поиск: