|
#11
|
||||
|
||||
You run a tracker this should be bread and butter creating table entrys anyhoo :
PHP Code:
The op must have neglected to check that there was 2 user table entries required for this mod when he posted it. I'll assit with missing sql i was on Tbdev long enough to know every single modification used, there is no way im fixing the code, i already done that for Tbdev. |
The Following User Says Thank You to Bigjoos For This Useful Post: | ||
wdq (20th December 2011)
|
#12
|
||||
|
||||
a little help
so i installed succesfully the invitation mod but now i added in bittorrent.php this line
PHP Code:
PHP Code:
and if it`s closed to require the invitation code |
#13
|
||||
|
||||
PHP Code:
|
The Following User Says Thank You to Bigjoos For This Useful Post: | ||
wdq (24th December 2011)
|
#14
|
||||
|
||||
Thanks for your Great HELP Bigjoos
a last question if someone knows how to do it .... is there any way ... so i can
change $TBDEV['openreg'] = true; //==true=open, false = closed from true to false, from staffpanel.php ? thanks in advance! Last edited by wdq; 24th December 2011 at 18:19. |
#15
|
||||
|
||||
Could make a table named site_configs, move any global you want to that and execute a select to have the values available just as it would be hard coded, then you make a simple admin script to allow you to edit them, if your not sure how ask.
|
#16
|
||||
|
||||
Thanks For the Quick answer
well i did a config.php file but ... i`m lost in how to make that admin.php and the line that will change that line pfff , sorry but i`m like new but i learned a lot,
so a tip will be great ... thanks a lot Bigjoos but now i`m geting a little bit lost |
#17
|
|||
|
|||
Quote:
Thanks in advance. Maybe this for takeconfirm.php? Code:
<?php require_once("include/bittorrent.php"); dbconn(); loggedinorreturn(); $id = intval($_GET["id"]); if (!is_valid_id($id)) stderr("Error", "..."); if (isset($_POST["conusr"])) sql_query("UPDATE users SET status = 'confirmed' WHERE id IN (" . implode(", ", array_map("sqlesc", $_POST["conusr"])) . ") AND status = 'pending'".( get_user_class() < UC_SYSOP ? " AND invitedby = $CURUSER[id]" : "")) or sqlerr(__FILE__,__LINE__); else header("Location: invite.php?id=$id"); header("Refresh: 0; url=invite.php?id=$id"); ?> PHP Code:
|
#18
|
||||
|
||||
If you won't change invites in userdetails.php....that you can add a user invites.....do somebody have this mod
|
#19
|
|||
|
|||
Quote:
Code:
if (get_user_class() > UC_ADMINISTRATOR) print("<form method=post action=inviteadd.php>\n"); print("<tr><td class=row5>Invites</td><td colspan=2 align=left class=row1><input type=text size=5 name=invites value=\"" . htmlspecialchars($user[invites]) . "\"></tr>\n"); } Code:
<? // invite add/remove from users by Alex2005 for TBDEV.NET \\ include('include/bittorrent.php'); dbconn(); loggedinorreturn(); if (get_user_class() < UC_ADMINISTRATOR) stderr("Error","Access denied!"); if ($HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST"){ $class = $_POST['class']; if(empty($class) && $class != '0') stderr("Error","Please select a class."); if(!is_numeric($class)) stderr("Error","Invalid class number."); $res = mysql_query("SELECT id, invites FROM users WHERE class ".($class == '0' ? ">= '0'" : "= '$class'")." AND enabled = 'yes' AND status = 'confirmed'") or sqlerr(__FILE__, __LINE__); while ($arr = mysql_fetch_assoc($res)){ $userid = 0+$arr["id"]; $curinvites = 0+$arr['invites']; $added = sqlesc(get_date_time()); if (!empty($_POST['inviteadd'])){ $toadd = $_POST["inviteadd"]; if (!is_numeric($toadd)) stderr("Error","Invalid invite number."); mysql_query("UPDATE users SET invites = invites + ".sqlesc($toadd)." WHERE id = ".sqlesc($userid)) or sqlerr(__FILE__, __LINE__); if (!empty($_POST['sendpm'])){ $subject = sqlesc("Invite(s) added."); $msg = sqlesc("We have added to your class, ".number_format($toadd)." invite(s)."); mysql_query("INSERT INTO messages (sender, receiver, msg, added, subject) VALUES(0, ".sqlesc($userid).", $msg, $added, $subject)") or sqlerr(__FILE__, __LINE__); }}elseif (!empty($_POST['inviteremove'])){ $toremove = $_POST["inviteremove"]; if (!is_numeric($toremove)) stderr("Error","Invalid invite number."); mysql_query("UPDATE users SET invites = ".(($curinvites - $toremove) <= 0 ? "0" : "invites - ".sqlesc($toremove))." WHERE id = ".sqlesc($userid)) or sqlerr(__FILE__, __LINE__); if (!empty($_POST['sendpm'])){ $subject = sqlesc("Invite(s) removed."); $msg = sqlesc("We have removed from your class, ".number_format($toremove)." invite(s)."); mysql_query("INSERT INTO messages (sender, receiver, msg, added, subject) VALUES(0, ".sqlesc($userid).", $msg, $added, $subject)") or sqlerr(__FILE__, __LINE__); }}elseif (!empty($_POST['removeallinvites'])){ if (!empty($_POST['sendpmremoveallinvites'])){ $subject = sqlesc("Invites removed from ".($class == '0' ? "all the classes" : "your class")."."); $msg = sqlesc("We have removed from ".($class == '0' ? "all the classes" : "your class")." the invites."); mysql_query("INSERT INTO messages (sender, receiver, msg, added, subject) VALUES(0, ".sqlesc($userid).", $msg, $added, $subject)") or sqlerr(__FILE__, __LINE__); } mysql_query("UPDATE users SET invites = 0 WHERE class ".($class == '0' ? ">= '0'" : "= '$class'")) or sqlerr(__FILE__, __LINE__); }else stderr("Error", "Please select something.<br>Go <a href=/inviteadd.php>back</a>."); }} stdhead("Add Invites"); ?> <p> <table align="center" border=0 class=main cellspacing=0 cellpadding=0> <tr> <td class=embedded></td> <td class=embedded style='padding-left: 10px'><font size=3><b>Update User's Invites</b></font></td> </tr> </table> </p> <form method="POST" action="inviteadd.php"> <table width="60%" border="0" cellpadding="5" cellspacing="0"> <td colspan="2"><h2><b><center>Select Class(es):</center></b></h2></td> <tr> <td colspan="2"><table style="border: 0" width="100%" cellpadding="0" cellspacing="0"> <tr> <td style="border: 0" width="20"><input type="radio" name="class" value="0"><!-- don't change this value --></td> <td style="border: 0">All Classes</td> <td style="border: 0" width="20"><input type="radio" name="class" value="<?=UC_PEASANT?>"></td> <td style="border: 0">Peasant Users</td> <td style="border: 0" width="20"><input type="radio" name="class" value="<?=UC_USER?>"></td> <td style="border: 0">Users</td> <td style="border: 0" width="20"><input type="radio" name="class" value="<?=UC_POWER_USER?>"></td> <td style="border: 0">Power Users</td> <td style="border: 0" width="20"><input type="radio" name="class" value="<?=UC_EXTREME_USER?>"></td> <td style="border: 0">eXtreme Users</td> </tr> <tr> <td style="border: 0" width="20"><input type="radio" name="class" value="<?=UC_VIP?>"></td> <td style="border: 0">VIP's</td> <td style="border: 0" width="20"><input type="radio" name="class" value="<?=UC_UPLOADER?>"></td> <td style="border: 0">Uploaders</td> <td style="border: 0" width="20"><input type="radio" name="class" value="<?=UC_MODERATOR?>"></td> <td style="border: 0">Moderators</td> <td style="border: 0" width="20"><input type="radio" name="class" value="<?=UC_ADMINISTRATOR?>"></td> <td style="border: 0">Administrators</td> <td style="border: 0" width="20"><input type="radio" name="class" value="<?=UC_SYSOP?>"></td> <td style="border: 0">SysOp</td> </tr> </table> </td> </tr> <tr> <td colspan="2" align="center"><b>Number of Invites you want to <u>add</u>:</b><br><input type=text name='inviteadd' size=3></td> </tr> <tr> <td colspan="2" align="center"><b>Number of Invites you want to <u>remove</u>:</b><br><input type=text name='inviteremove' size=3></td> </tr> <tr> <td align=center><input type=submit value="Update" class=button></td> <td><center><b>Send PMs:</b> <input type="checkbox" name="sendpm"></center></td> </tr> <tr> <td align=center><input type=submit value="Remove all invites" class=button name='removeallinvites'> <td align="center"><b>Send PMs:</b> <input type="checkbox" name="sendpmremoveallinvites"></td> </tr> </td></tr> </table> </form> <? stdfoot(); ?> |
#20
|
|||
|
|||
Invited bonus upload
hello guys, I use this invites mod.
I want to give you 10 GB each member invited another member on the my website. I tried everything but I could not do it, please if anyone can help me. |
Tags |
invites , mod |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Lockerz.com Invites | DrNet | Community Cafe | 6 | 24th February 2010 14:41 |
Any Torrent Invites? | 1only | Community Cafe | 0 | 20th December 2009 01:57 |
Reset Invites | elvira | Mods & Themes | 0 | 30th October 2009 14:35 |
ICTorrents Invites | kooldre | Tracker Invites | 2 | 14th March 2009 18:39 |
Invites in PR7 | zerovz | Yuna Scatari Edition (YSE) | 3 | 27th January 2009 03:38 |