View file add.php

File size: 935B
<?php
#########################################
#
# Create By LEM
# http://wapjava.org
# http://hostwap.info
#
#########################################
// reg user
$system ='';
if($p[ban]==1)
exit("Вы забанены".$end);


if($log)
{
	$msg = substr($msg,0,300);
	$tema = substr($tema,0,60);

if ($check == $_SESSION[mona])
{

	if($msg!='' and $tema!='')
	{
 $time = time();
 mysql_qw('INSERT INTO tems SET id=?, avtor=?, name=?, creat=?, id_razdel=?, hide=?,time=?,fix=?','',$log,$tema,$time,$id,0,$time,'');
 # Ищем тему
 $q=mysql_qw('SELECT * FROM tems WHERE creat=?',$time);
 $numb = mysql_fetch_array($q);
 $tid = $numb['id'];
// нашли,добавляем пост
mysql_qw('INSERT INTO post SET id=?,name=?,avtor=?,time=?,id_tema=?,id_razdel=?','',$msg,$log,$time,$tid,$id);
$system = '<u>Тема добавленна</u><br/>';
$_SESSION[mona] = rand (9,999);
}


}
}

?>