Location: PHPKode > projects > ZompLog > plugins/calender/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 spamwords table

$query = "CREATE TABLE $prefix" . "_calender (
          font varchar (6) NOT NULL,
          back varchar(6) NOT NULL,
          today varchar(6) NOT NULL,
          todaybg varchar(6) NOT NULL,
          month varchar(6) NOT NULL,
          day varchar(6) NOT NULL,
          sat varchar(6) NOT NULL,
          sun varchar(6) NOT NULL
          )";
$q = mysql_query($query) or die ("Plugin could not be installed or has already been installed.<br /><br />".mysql_error()); 
$sql = "INSERT INTO $prefix" . "_calender (font,back,today,todaybg,month,day,sat,sun) values ('000000','EEEEEE','FFFFFF','CC0000','333399','666666','0000CC','CC0000');";
mysql_query($sql) or die(mysql_error().'ds');
echo "<div class='text'><img src='../../install/images/check.gif'> $prefix" . "_calender created</div>";
// all this plugin needs to do now is make itself known to Zomplog

$query = "INSERT INTO $table_plugins (name,active,installed) VALUES ('calender','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 back to <a href='../../admin/plugins.php'>plugins-panel</a>";

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