Location: PHPKode > projects > BSW Simple Board > functions.php
<?php
//**************** Do HTML *************************
function dohtml($msg,$name,$comment,$string){
global $File,$mail,$msg,$comment,$string;
$style="<link rel=\"stylesheet\" type=\"text/css\" href=\"../bswstyle.css\">";
$string ="<html>
          <head>
	  $style
          </head>
          <body>
              ";
$string .="<br/>";

$string  .="<table width=\"580\"align=\"center\">";
$string .=" <td class=\"topic\" align=\"center\"><h1>$msg</h1></td>";
$string .="<tr><td>Submitted by:";
$string .="<a class=\"topic\" href=\"mailto:$name\">";
$string .=$name;
$string .="</a>";
$string .=" : ";
$string .=date("D:d M Y");
$string .="<br>";
$string .="<br>";
$string .=$comment;

 $string .="<br/>";
 $string .="<a class=\"topic\"href=\"../index.php\">Return to Main Page</a>";
 $string .="</td></table>";
$string .="</body>
          </html>";

}//******** end function dohtml **************
//************** Do abstract ********************
function doabst($abst,$count,$name,$msg,$string1){
global $abst,$count,$name,$msg,$string1;
$string1  ="<!-- '$count'-->";
$string1  .="<tr><td>Title :";
$string1 .="<a class=\"topic\" target=\"_self\" href=\"topics/$count.html\">$msg</a>";
$string1 .="<br/><br/>";
$string1  .="Submitted by:   ";
$string1 .="<a class=\"topic\"href=\"mailto:$name\">";
$string1 .=$name;
$string1 .="</a>";
$string1 .=" : ";
$string1 .=date("D:d M Y");
$string1 .="<br>";
$string1 .="$abst ......";
$string1 .="<center>*****</center>
          </td></tr>";
}//***** end function doabstract ******
//*******************capacha*****************
function capacha(){
global $File,$name,$msg,$comment,$string,$string1;
$name=$_POST["name"];
$msg=$_POST["message"];
$comment=$_POST["comment"];
$arr=array($name,$msg,$comment);
$capacha =rand(10000,100000);



$displ="<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">
               
		<table><tr><td width=\"150\"></td><td><input type=\"text\"name=\"capacha\" value=\"$capacha\"></td></tr>
		<tr><td width=\"150\" align=\"right\">Write the number:</td><td><input type=\"text\" name=\"secur\"></td></tr>
		</table><table>
		<tr><td width=\"300\"align=\"right\"><input class=\"bar\"type=\"submit\" name=\"submit\" value=\"Submit \"></tr></td>
		</table></form>";

echo $displ;
if($_POST["secur"]==$_POST["capacha"]){return "true";}
else {return "false";}

}

?>
Return current item: BSW Simple Board