/*-----------------------------------------------------
COPYRIGHT NOTICE
Copyright (c) 2002 by Aryadana
All Rights Reserved
Script name : ArdGuest Standard
Version : 1.0
WebSite : http://www.promosi-web.com/script/guestbook
Email : aryasmail@yahoo.com.au
File name : ardguest.php
------------------------------------------------------*/
//--Change the following variables
//Title of your guestbook
$title = " ";
//Change "admin" with your own password. It's required when you delete an entry
$admin_password = "cuteskunki";
//Enter your email here
$admin_email = "skunki@sites.inka.de";
//Your website URL
$home = "http://sites.inka.de/skunki";
//Send you an email when someone add your guestbook, YES or NO
$notify = "NO";
//Your Operating System
//For Windows/NT user : WIN
//For Linux/Unix user : UNIX
$os = "UNIX";
//Maximum entry per page when you view your guest book
$max_entry_per_page = "10";
//Name of file used to store your entry, change it if necessary
$data_file = "skunki.dat";
//Maximum entry stored in data file
$max_record_in_data_file = "500";
//Color setting
$background = "#000000";
$table_top = "#000000";
$table_content_1a = "#FBB1F5";
$table_content_1b = "#FBB1F5";
$table_content_2a = "#FBB1F5";
$table_content_2b = "#FBB1F5";
$table_bottom = "#000000";
$table_border = "#ffffff";
$title_color = "white";
$title_color = "white";
$link = "#ff00e4";
$visited_link = "#ff00e4";
$active_link = "#ff00e4";
//-- Don't change below this line
if (!defined('PMA_GRAB_GLOBALS_INCLUDED')) {
define('PMA_GRAB_GLOBALS_INCLUDED', 1);
if (!empty($_GET)) extract($_GET);
else if (!empty($HTTP_GET_VARS)) extract($HTTP_GET_VARS);
if (!empty($_POST)) extract($_POST);
else if (!empty($HTTP_POST_VARS)) extract($HTTP_POST_VARS);
}
if (!isset($PHP_SELF)) $PHP_SELF = $_SERVER["PHP_SELF"];
if (!isset($do)) $do = "";
if (!isset($page)) $page=1;
if (!file_exists($data_file)) {
if ($f = fopen($data_file,"w")) fclose($f);
else { echo "Error !!Can't create data file. "; exit; }
} else {
if ($max_record_in_data_file <> "0"):
$f = file($data_file);
rsort($f);
$j = count($f);
if ($j > $max_record_in_data_file):
$rf = fopen($data_file,"w");
if (strtoupper($os)=="UNIX") {
if (flock($rf,2)):
for ($i=0; $i<$max_record_in_data_file; $i++):
fwrite($rf,$f[$i]);
endfor;
flock($rf,3);
endif;
} else {
for ($i=0; $i<$max_record_in_data_file; $i++):
fwrite($rf,$f[$i]);
endfor;
}
fclose($rf);
endif;
endif;
}
switch ($do) {
case "":
$record = file($data_file);
rsort($record);
$jmlrec = count($record);
?>