Location: PHPKode > projects > ZompLog > plugins/captcha/install.php
<?php
ob_start();

include_once("../../admin/functions.php");
include("../../admin/config.php");
include("../../admin/session.php");
include("../../admin/header.php");
?>

<div id="submenu"><a href="../../admin/plugins.php" class="sub">plugins</a></div>


<div id="side">
<div class="title">&nbsp;</div>
<div class="box"><?php
if(!empty($messages)){
	displayErrors($messages);
}

elseif($_GET[message] && empty($messages)){
  	displayMessage($_GET[message]);
}

else{
  	echo "Install plugin.";
}  
  
?>
</div></div>


<div id="main">
<h1>Install plugin</h1><br />
<?php
	//Create Settings Table;
	$query = "CREATE TABLE $prefix" . "_captcha (
		`setting` VARCHAR( 100 ) ,
		`value` VARCHAR( 100 )			
	)";

	$q = mysql_query($query) or die ("Plugin could not be installed or has already been installed.<br /><br />"); 
	
	$query="INSERT INTO $prefix" . "_captcha( `setting` , `value` ) 
		VALUES ('font', 'aispec.TTF'), 
	   ('bgColor', '0,0,0'),
	   ('fontColor', '255,255,255'),
	   ('bug', 'Your Comment is SPAM BLOCKED!'),
	   ('headline', 'Captcha');";
	
	$q = mysql_query($query);
	
	echo "<div class='text'><img src='../../install/images/check.gif'> table created!</div>";

	// all this plugin needs to do is make itself known to Zomplog

   	$query = "INSERT INTO $table_plugins (name,active,installed) VALUES ('captcha','1','1')";

   	mysql_query($query) or die (mysql_error());


echo "<div class='text'><img src='../../install/images/check.gif'> Plugin set to active! All set!</div><br />";

echo "go to <a href='../../admin/plugins.php'>plugins-panel</a>";

?>
</div>
<?php include ("../../admin/footer.php"); ?>
Return current item: ZompLog