Location: PHPKode > projects > hnGuestbook > guestbook/index.php
<?php
include("gb_config.php");
//Check for banned IP
if (!(file_exists($ip_file))){ 
fopen($ip_file,"w") or die("Can't open the file $ip_file");;
$data=file($ip_file);	
}else{
fopen($ip_file,"r");
$data=file($ip_file);	
}
$userIP=$_SERVER['REMOTE_ADDR']; 
for ($i=0; $i<sizeof($data); $i++){
$bannedIP = trim($data[$i]);
if ($bannedIP == $userIP){
echo("<h3>$la34</h3>");
return 0;
}
} //end for
	 
?>
<html>
<head>
<title><? echo $gb_title; ?></title>
<meta name="description" content="hnGuestbook, an AJAX Php Guestbook" />
<meta name="keywords" content="ajax guestbook, free guestbook, php guestbook, hnGuestbook, hnScripts, ajax, guestbook, php" />
<script language="javascript" type="text/javascript">
var loadtext = '<? echo $la32; ?>';
var c_minute = <? echo $flood_protection; ?>;
</script>
<script language="javascript" src="gb_ajax.js" type="text/javascript"></script>
<link href="gb_style.css" rel="stylesheet" type="text/css" media="screen" />
<meta http-equiv="Content-Type" content="text/html; charset=<? echo $encoding; ?>">

</head>
<body>

<div align="center">
<div class="container">
<div class="content">

<h3><? echo $gb_title; ?></h3>

<?
$token = md5(uniqid(rand(), true));
$pcode = md5($spam_protection_code);
if($disable_gb=="1"){
echo ("<center><br><br><br><br><br><br><b>$la33</b><br><br><br><br><br><br></center>");
exit;
}
?>


<div id="signform" style="display:none;">
<font size="1"><? echo $la17; ?>.</font>
<br>

<form name="signgb">
<table border="0" cellpadding="0" cellspacing="2" width="100%" id="table1">
<tr>
<td valign="top"><? echo $la11; ?>: *</td>
<td valign="top"><input type="text" name="name" size="30"></td>
</tr>
<tr>
<td valign="top"><? echo $la12; ?>:</td>
<td valign="top"><input type="text" name="email" size="30"></td>
</tr>
<tr>
<td valign="top"><? echo $la13; ?>:</td>
<td valign="top"><input type="text" name="homepage" size="30" value="http://"></td>
</tr>
<tr>
<td valign="top"><? echo $la14; ?>: *</td>
<td valign="top"><textarea rows="5" name="message" cols="35"></textarea><br>
<a href="javascript:smiley(' :p ');"><img src="images/s1.gif" alt=":p" border="0"></a> <a href="javascript:smiley(' :) ');"><img src="images/s2.gif" alt=":)" border="0"></a> <a href="javascript:smiley(' :a ');"><img src="images/s3.gif" alt=":a" border="0"></a> <a href="javascript:smiley(' :o ');"><img src="images/s4.gif" alt=":o" border="0"></a> <a href="javascript:smiley(' :s ');"><img src="images/s5.gif" alt=":s" border="0"></a> <a href="javascript:smiley(' :r ');"> <img src="images/s6.gif" alt=":r" border="0"></a> <a href="javascript:smiley(' :v ');"><img src="images/s7.gif" alt=":v" border="0"></a> <a href="javascript:smiley(' :h ');"><img src="images/s8.gif" alt=":h" border="0"></a> <a href="javascript:smiley(' ;) ');"><img src="images/s9.gif" alt=";)" border="0"></a> <a href="javascript:smiley(' :m ');"><img src="images/s10.gif" alt=":m" border="0"></a></td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td valign="top"><input type="button" value="<? echo $la18; ?>" name="signbutton" onClick="javascript:ajax('POST','gb_sign.php','action','signgb');"> <input type="reset" value="<? echo $la19; ?>" name="B2"> <input type="button" value="<? echo $la20; ?>" name="" onClick="javascript:hidediv('signform');"></td>
</tr>
</table>
</form>

<br><div id="signdiv">
</div>

<br>	

</div> <!-- end hiddend sign form -->

<div id="entries"> 
</div>

<script language="Javascript" type="text/javascript">
var pcode = '<? echo $pcode; ?>';
ajax('POST','gb_view.php','page','1','<? echo $token; ?>');
</script>

</div> </div>

<center><br>Powered by <a href="http://www.hnscripts.com" target="_blank">hnGuestbook</a> v1.0.8 </center>


</div>
</body>
</html>
Return current item: hnGuestbook