View Single Post
  #2  
Old 28th May 2008, 04:08
Fynnon's Avatar
Fynnon Fynnon is offline
xxx
 
Join Date: Nov 2007
P2P
Posts: 984
Default Re: missing file invite.php
Try this one:

[code]
<?
/*
// +--------------------------------------------------------------------------+
// | Project: FTS - Free Torrent Source |
// +--------------------------------------------------------------------------+
// | Module: invite.php - Invite System. |
// | Version: 0.1 |
// +--------------------------------------------------------------------------+
// | This file is part of FTS. Fts is based on TBDev, |
// | originally by RedBeard of TorrentBits, extensively modified by |
// | Gartenzwerg. |
// | |
// | FTS is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | FTS is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with FTS; if not, write to the Free Software Foundation, |
// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +--------------------------------------------------------------------------+
// | FTS IS FREE SOFTWARE, but it still can contain some encoded files. |
// +--------------------------------------------------------------------------+
// | Do not remove above lines! |
// +--------------------------------------------------------------------------+
*/
require "include/bittorrent.php";

dbconn();

loggedinorreturn();
if($invitesys == 'no') stderr('Error!','Invite system is off');
$id = 0 + $_GET["id"];
$type = unesc($_GET["type"]);


stdhead("Invites");





$res = mysql_query("SELECT invites FROM users WHERE id = $id") or sqlerr();
$inv = mysql_fetch_assoc($res);


if ($inv["invites"] != 1){
$_s = "s";
} else {
$_s = "";
}

if ($type == 'new'){
print("<form method=post action=takeinvite.php?id=$id>".
"<table border=1 width=750 cellspacing=0 cellpadding=5>".
"<tr class=tabletitle><td colspan=2>Invite someone to join F1RW ($inv[invites] invitation$_s left)</td></tr>".
"<tr class=tableb><td width=15%>Email Address</td><td><input type=text size=40 name=email>
<font class=small>Email Address must be valid. The invitee will receive an email about your invite.</font></td></tr>".
"<tr class=tableb><td>Message</td><td><textarea name=body rows=6 cols=80></textarea></td></tr>".
"<tr class=tableb><td align=center colspan=2><input type=submit value=Invite style='height: 20px'></td></tr>".
"</form></table>");



} else {


$rel = mysql_query("SELECT COUNT(*) FROM users WHERE invited_by = $id") or sqlerr();
$arro = mysql_fetch_row($rel);
$number = $arro[0];


$ret = mysql_query("SELECT id, username, email, uploaded, downloaded, status, warned, enabled, donor, email FROM users WHERE invited_by = $id") or sqlerr();
$num = mysql_num_rows($ret);

print("<form method=post action=takeconfirm.php?id=$id><table border=1 width=750 cellspacing=0 cellpadding=5>".
"<tr class=tabletitle><td colspan=7>Current status of invitees ($number)</td></tr>");

if(!$num){
print("<tr class=tableb><td colspan=7>No invitees yet.</tr>");
} else {


print("<tr class=tableb><td>Username</td><td>Email</td><td>Uploaded</td><td>Downloaded</td><td>Ratio</td><td>Status</td>");
if ($CURUSER[id] == $id || get_user_class() >= UC_SYSOP)
print("<td align=center>Confirm</td>");

print("</tr>");
for ($i = 0; $i < $num; ++$i)
{
$arr = mysql_fetch_assoc($ret);
if ($arr[status] == 'pending')
$user = "<td align=left><a href=checkuser.php?id=$arr[id]>$arr[username]</a></td>";
else
$user = "<td align=left><a href=userdetails.php?id=$arr[id]>$arr[username]</a>" .($arr["warned"] == "yes" ? "
Reply With Quote