Código PHP:
<?
function welcome($error)
{
global $handle,$livetable,$sitename,$siteadmin,$livedb,$dbh,$no_guests,$PHP_SELF;
// Get a count of users currently online:
db_connect($livedb);
$result = mysql_query("SELECT COUNT(uid) FROM $livetable", $dbh) OR die("TBL: $livetable ".mysql_error());
$row = mysql_fetch_array($result);
$total_here = $row[0] OR 0;
mysql_free_result($result);
mysql_close();
if ($_SESSION['MY_UID'] AND $_SESSION['MY_RAND'] AND !$error){
show_hub($_SESSION['MY_UID'],$_SESSION['MY_RAND']);
}
print <<<END
<HTML>
<HEAD>
<TITLE>$sitename - HTML Live Chat System</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META Name="keywords" Content="ChatFreeLiveOnlineAdultsSexRoomsChattingchatsSitesDiscussionForumsbbsIrishLeisureEntertainmentircrelay chatVIPGroupsChatlineLinesFriendsCommunitiesCommunityxxxGamesWeatherNewsIrelandMusicJokesTravelTourismMapsAccommodationRegularsPubsCocktailsPrivateMessagesWomenMenChatSportsDrinksBeersAlcoholLocalStoutLagerBulletinBoardsWhiskeysWhiskysWinesLiquorCiderSoftDrinksMineralsCommunicationChatFriendshipMatchmakersMeetingsLoveDatingDatesTalksConversationsChatterChitchatConferencesDialogsSpeaksGossipReal TimeMembershipReviewsGuidesSponsorsChattaCultureCaintCraicCahtFrre">
<META Name="description" Content="All ages live chat in a friendly atmosphere. A forum to meet and talk to friends of either sex.">
</HEAD>
<body bgcolor=ffffff LINK="444444" VLINK="879BAD" ALINK="879BAD">
<FONT SIZE=-1 FACE="TREBUCHET MS,ARIAL,HELVETICA">
<CENTER>
<a name=top>
<form method=post action="$PHP_SELF">
<input type="hidden" name="action" value="login">
</a>
<TABLE BGCOLOR="#FFFFFF" >
<TR>
<TD>
<CENTER>
<IMG SRC="gfx/uc-text.gif" HEIGHT=60 WIDTH=348 ALT="Ultra Chat Logo">
<BR>
<font face=arial,helvetica><a href=$PHP_SELF?action=register>REGISTER FOR FREE!!</a>
<br>
<TABLE BORDER=0 WIDTH=392 CELLPADDING="3">
<TR>
<TD>
<center>
<br>
<FONT STYLE="font-size:10pt;color:#879BAD;" FACE="ARIAL,HELVETICA"><b>
A product of GuestWho Guestbooks<br>
<a href="http://www.guestwho.com" target="_new">[url]http://www.guestwho.com[/url]</a>
</FONT>
</center>
</TD>
</TR>
</TABLE>
<BR>
<FONT STYLE="font-size:10pt;color:#000000;" FACE="ARIAL,HELVETICA">
<font color="red"><b>Reminder:</font>
You should change your password regularly.</b>
</FONT>
<br>
<TABLE BORDER=0 WIDTH=392 CELLPADDING="1">
<tr><td colspan=3 BGCOLOR="879BAD">
<TABLE BORDER="0" CELLPADDING="5" WIDTH="100%"><TR><TD BGCOLOR="#B9CDE0">
<CENTER>
<FONT SIZE=-1 FACE="ARIAL,TREBUCHET MS,HELVETICA">
There are <font color='#879BAD'><B>$total_here people</B></font> Online right now, just waiting to chat with YOU. All you need to do to start chatting is LOG IN.<br>
</FONT>
</CENTER>
</TD></TR></TABLE>
</td></tr>
<TR>
<TD VALIGN=TOP WIDTH=106>
<FONT SIZE=-1 FACE="TREBUCHET MS,HELVETICA,ARIAL">
<BR>
<CENTER>
<IMG SRC="gfx/guest-login.gif" HEIGHT=19 WIDTH=106 ALT="Guest's Door for chat rooms">
<P>
END;
if ($no_guests != 1){
print <<<END
<input type=submit name=guest value="Guest Login"> <font size=1 face=arial,helvetica>YOU WILL BE ABLE TO LISTEN BUT NOT SPEAK</font><BR>
END;
}else{
print "Guest Logins Are Currently Disabled<br><br>";
}
print <<<END
(<a href=$PHP_SELF?action=register><FONT SIZE=-2>REGISTER FOR FREE!!</a>)
</FONT>
</CENTER>
</FONT>
</TD>
<TD VALIGN=TOP WIDTH=180>
<CENTER>
<br><br>
<input type=image border=0 width=167 height=64 src=gfx/uc-enter.gif>
</CENTER>
</TD>
<TD VALIGN=TOP WIDTH=106>
<FONT SIZE=-1 FACE="TREBUCHET MS,HELVETICA,ARIAL">
<BR>
<CENTER>
<IMG SRC="gfx/regular-login.gif" HEIGHT=19 WIDTH=106 ALT="Regular's Door for chat rooms"><P>
Name<br>
<input type=text name=my_handle size=10 value="$handle">
<br>
Password<br>
<input type=password name=my_passwd size=10 value="">
</CENTER>
</FONT>
</TD>
</TR>
END;
// Display any error messages:
if ($error){
print "<TR><TD COLSPAN=3 BGCOLOR=RED><FONT SIZE=-1 FACE=\"TREBUCHET MS,ARIAL,HELVETICA\"><B><FONT COLOR=WHITE><CENTER>";
if ( $error == "bad_language" ) { print "Sorry, you have used excessive course language !!"; }
elseif ( $error == "banned_user" ) { print "You have been temporarily banned.<br>Please contact <a href='mailto:$siteadmin'>$siteadmin</a> for further details."; }
elseif ( $error == "user_not_found" ) { print "Sorry, we have no such user called $handle.<br>If you would like to become a registered<br>user with the name $handle please <a href=register.php>Click-Here</a>";}
elseif ( $error == "wrong_password" ) { print "Oops! The password was not correct.";}
elseif ( $error == "registered" ) { print "THANKS FOR REGISTERING!!<br>An e-mail has been sent to you<br>with your password and user name!!";}
elseif ( $error == "no_pass" ) { print "Please enter a Username AND Password !"; }
elseif ( $error == "not_logged_in" ) { print "You were no longer logged in !"; }
elseif ( $error == "bad_rand") { print "Bad Session ID !"; }
elseif ( $error == "logout") { print "Come again soon !"; }
elseif ( !$handle && $error != "registered"){ print "No handle was typed in."; }
print "</CENTER></FONT></B></FONT></TD></TR>";
}
print <<<END
<TR>
<TD COLSPAN=3 WIDTH=392 BGCOLOR="#F7E9D9">
</TD>
</TR>
</TABLE>
<p>
<FONT SIZE=-1 FACE="TREBUCHET MS,HELVETICA,ARIAL">
END;
echo gmdate("D jS F Y - h:m:s",time())." GMT";
print <<<END
<br>
<p>
<font size=-1>
To enter $sitename, type in your details and then click on
"Enter Ultra Chat" !<BR>
This will allow you to explore all of the Ultra Chat rooms.<br>
Enjoy chatting with the friendliest chatters on the net!
This chatsite is <B>FREE</B> to use and all are welcome.
</font>
</form>
<hr size=1 noshade>
<font size=-1>© GuestWho.com 2003 All Rights Reserved
</font>
</FORM>
</TD>
</TR>
</TABLE></CENTER>
</FONT>
</BODY>
</HTML>
END;
exit;
} // End function
?>