<style type="text/css">
<!--
body,td,th {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #000000;
}
-->
</style>
<?
include("config.php");
?>
<?
$userb = ''.$_SESSION['nume'].'';
$getusersonline="SELECT * FROM utilizatori WHERE nume='$userb'";
$getusersonline2=mysql_query($getusersonline) or die("Could not get users");
$num=mysql_num_rows($getusersonline2);
while($getusersonline3=mysql_fetch_array($getusersonline2))
{
$uid = $getusersonline3["id"];    
}


?>
<?
$ac=$_GET['ac'];
if($ac=="added")
{
if(!$act){
include("../stop.php");
}
if(empty($_POST["name_txt"]))
{
print "Please complete the name!<br/>";
}
elseif($_POST["name_txt"] > $uid && $_POST["name_txt"] < $uid)
{
print "Please use your name!<br/>";
}
elseif(empty($_POST["message_txt"]))
{
print "Please complete the message!<br/>";
}
else{ 
$uid= $_POST["name_txt"];
$message = htmlspecialchars($_POST["message_txt"], ENT_QUOTES);

if(!$act){mysql_query("INSERT INTO shoutbox (id,uid,message,data) VALUES ('NULL','$uid', '$message' , '".time()."')");}
}
echo "<meta http-equiv=refresh content=0;url=shoutbox.php>";
}
?>