Guys anyone have script for site announcement?? here what am tried to make one
Code:
else if ($action="oshout")
{
$oantx=$_POST["oantx"];
addonline(getuid_sid($sid),"Owner Shouting","");
echo"<head>";
echo"<title>Announcing</title>";
echo"<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">';
echo"</head>";
echo"<body>";
echo"<p align=\"center\")";
$oshtxt=$oshtxt;
//$uid=getuid_sid($sid);
$oshtm=time();
$res=mysql_query("INSERT INTO ibwf_oannouncements SET oantext='".$oantx."',oantime='".$oshtm."',id='".$uid."'");
if($res)
{
echo"<img src=\"../images/ok.gif\"alt=\"o\"/>Announcement Added!";
}
else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error";
}
echo "<br/><br/><b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
Code:
/////index///////// $sql="SELECT id ,oantext,oantime FROM ibwf_oannouncements ORDER BY antime DESC LIMIT 1"; $itmes=mysql_query($sql); $oannc = htmlspecialchars($item[1]); echo"$oannc";
Code:
///form/// echo"<form action=\"ownrproc.php?action=oannc&sid=$sid& method=\"post\">"; echo"Text :<input name=\"oantx\" maxlength=\"200\"><br/>"; echo"<input type=\"submit\" name=\"announce!\"></form>'; ///sql/// CREATE TABLE `oibwf_announcements` ( `id` int(100) NOT NULL auto_increment, `oantext` varchar(200) NOT NULL default '', `oantime` int(100) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;