Location: PHPKode > projects > Spam free PHP GuestBook > Spam free PHP GuestBook-1.2beta/gb/templates/red/head.php
<?php
/*
Copyright (c) 2008 http://ramui.com. All right reserved.
This product is protected by copyright and distributed under licenses restricting copying, distribution. Permission is granted to the public to download and use this script provided that this Notice and any statement of authorship are reproduced in every page on all copies of the script.
*/
$disabled=''; $fw_link='<a href="gb/user/index.php">Register</a> | <a href="gb/user/index.php">Forget password</a>';
if(isset($_SESSION['fw_login'])){$disabled='disabled '; $fw_link='<a href="gb/user/index.php">UserCP</a> | <a href="javascript:fwLogout()">Logout</a>';}
?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title><?php echo $fw_page_array['title'].' : '.$fw_site_array['sitename']; ?></title>
<link rel="stylesheet" type="text/css" href="http://<?php echo getenv('HTTP_HOST').fw_get_docroot().'gb/templates/'.$fw_site_array['defaultstyle'].'/css/screen.css'; ?>" media="screen" />
<meta name="DESCRIPTION" content="<?php echo $fw_page_array['description']; ?>" />
<meta name="KEYWORDS" content="<?php echo $fw_page_array['keywords']; ?>" />
<script type="text/javascript" src="http://<?php echo getenv('HTTP_HOST').fw_get_docroot().'gb/script/common.js'; ?>"></script>
<script type="text/javascript">
function fwRemoteLogin(){
var errors='';
var params='';
document.getElementById('fw_feedback').innerHTML ='&nbsp;';
var str=fw_trim(document.getElementById('fw_email').value);
if (!((str.indexOf(".") > 0) && (str.indexOf("@") > 0)&&(str.length < 100))){errors+='Enter correct email id\n';}
params+="email="+fw_total_encode(str);
str=fw_trim(document.getElementById('fw_password').value);
errors+=fw_checkpassword(str);
params+="&password="+fw_total_encode(str);
if (errors){alert('The following error(s) occurred:\n'+errors);return false;}
var url="gb/user/index.php?query=8";
var fw_connection=fw_connect(url,params);
fw_connection.onreadystatechange = function(){
if(fw_connection.readyState == 4){fwBusy=false;
if(fw_connection.status == 200){
if(fw_connection.responseText=='success'){fwDisabledControls(true);}
else{document.getElementById('fw_feedback').innerHTML = fw_connection.responseText;}}}}}
function fwDisabledControls(b){
document.getElementById('fw_email').value='';
document.getElementById('fw_email').disabled=b;
document.getElementById('fw_password').value='';
document.getElementById('fw_password').disabled=b;
document.getElementById('fw_btnlogin').disabled=b;
document.getElementById('fw_link').innerHTML =(b)? '<a href="gb/user/index.php">UserCP</a> | <a href="javascript:fwLogout()">Logout</a>' : '<a href="gb/user/index.php">Register</a> | <a href="gb/user/index.php">Forget password</a>';
}
function fwLogout(){
var fw_connection=fw_connect("gb/user/index.php?query=7","");
fw_connection.onreadystatechange = function(){
if(fw_connection.readyState == 4){fwBusy=false;
if(fw_connection.status == 200){
if(fw_connection.responseText=='success'){alert("You have been successfully logged out"); fwDisabledControls(false);}
}}}}
</script>
</head>
<body>
Return current item: Spam free PHP GuestBook