Location: PHPKode > projects > H-tracker > invite.php
<?
//
//  H-Tracker v0.2
//    http://h-tracker.org
//    Based on TorrentTrader (http://www.torrenttrader.org)
//
//

require_once("backend/functions.php");
dbconn();
loggedinonly();


if (!$site_config['ENABLEINVITES']) {
stdhead("Invite");
begin_frame("Sorry!");
echo "<BR><BR>Invites are disabled, please use the register link.<BR><BR>";
end_frame();
stdfoot();
exit;
}


stdhead("Invite someone");
begin_frame("Invite someone");

$res = mysql_query("SELECT COUNT(*) FROM users") or die(mysql_error());
$arr = mysql_fetch_row($res);

if ($arr[0] >= $site_config['maxsiteusers']){
	print("Sorry, The current user account limit (" . number_format($invites) . ") has been reached. Inactive accounts are pruned all the time, please check back again later...");
	end_frame();
	exit;
}

if($CURUSER["invites"] > 0){
print ("You have <b>" . $CURUSER["invites"] . "</b> invites left. Use them carefully as you are responsible for those you invite!<br>");
} else {
print ("You have <b>" . $CURUSER["invites"] . "</b> invites.<br>");
}

if($CURUSER["invites"] > 0) {
?>

<p>
<form method="post" action="takeinvite.php">
<table border="0" cellspacing=0 cellpadding="3">
<tr valign=top><td align="right" class="invite"><B>Email Address:</B></td><td align=left><input type="text" size="40" name="email" onfocus="tooltips('Please make sure this is a valid email address, the recipient will receive a confirmation email.');" /></td>
<tr><td align="right" class="invite"><B>Message:</B></td><td align=left><textarea name="mess" rows="10" cols="40" onfocus="tooltips('Type a message for your user invited.');" /></textarea>
</td></tr>
<tr><td colspan="2" align="center"><input type=submit value="Send Invite (PRESS ONLY ONCE)" class="lbutton"></td></tr>
</table>
</form>
<?

} else {

echo "<br><center>You can earn invites through seeding bonuses...<br><br>";

}

end_frame();
stdfoot();

?>
Return current item: H-tracker