Вход Регистрация
Файл: module/blog/add.php
Строк: 48
<? 
   
if (isset($_POST['ok']))
 {
    
$BL=mysql_fetch_array($b_user_sql);
 
$post htmlspecialchars($_POST['textct']) ;
 
$post mysql_real_escape_string($post) ;
 
$name htmlspecialchars($_POST['name']) ;
 
$name mysql_real_escape_string($name) ;
$tags htmlspecialchars($_POST['tags']) ;
 
$tags mysql_real_escape_string($tags) ;
$tags_ad=explode(",",$tags) ;
 
$count=count($tags_ad);
 for(
$i=0$i<=$count;$i++){
   
mysql_query("INSERT INTO  `module_blog_tags` (
`id` ,
`tags` ,
`rang`
)
VALUES (
NULL ,  '"
.$tags_ad[$i]."',  '');")or(die(mysql_error())) ;
    print 
$tags_ad[$i];
    ;}
 
if(
strlen($name)<5){echo("Название не мение 5 символов") ;exitt($row,$opredelenie);}
if(
strlen($post)<10){echo("Текст не мение 10 символов") ;exitt($row,$opredelenie);}


mysql_query("INSERT INTO  `a36667_element`.`module_blog_tema` (
`id` ,
`name` ,
`text` ,
`autor` ,
`date` ,
`comment` ,
`avatar` ,
`status_u` ,
`status`,`tags`
)
VALUES (
NULL ,  '
$name',  '$post',  '$opredelenie',  '".time()."',  '0',  '".$BL['avatar']."',  '".$_POST['status_u']."',  '0'
,'
$tags');
"
);
$rik=mysql_fetch_array(mysql_query("SELECT * 
FROM  `module_blog_tema` 
ORDER BY  `module_blog_tema`.`id` DESC 
LIMIT 1 "
))
;
mysql_query("INSERT INTO  `a36667_element`.`module_blog_podpis` (
`tema` ,
`user`,`name`
)
VALUES (
'"
.$rik['id']."',  '$opredelenie','$post'
);"
);
header("Location:?go=blog");
 }
    








echo 
"<div class="chat_conteiner"><form name=form2ff action="" method=POST>

Название:<br>
<input type=text name=name>
<br>Сказать:<center>
<textarea class=x_text name=textct rows=5 cols=20 size=5 >" 
htmlspecialchars($pers) .
             
" </textarea><br><li>
<strong>Приватность:</strong><br>
<input type="
radio" value=0 selected name=status_u  />Для всех<br>
<input type="
radio" value=1 name=status_u />Только для друзей</li><br>
Теги через запятую:<br>
<input type=text name=tags><br>

"
;
echo 
"<input name=ok class=select type=submit value=Отправить>
</center></form></div>"
;exitt($row,$opredelenie);
?>
Онлайн: 1
Реклама