Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Invite Code System [v3.0 Port]
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods in Progress

2019-07-04 16:46:00
well, I was able to invite myself. Im still looking for any errors, but I dont see any right now. I invited myself, entered the invite code, signed up, and then confirmed it on the admin account and it wrks fine. Yea, the code is still there, but what should I be looking for? What other errors? The system I am testing on is in my signature below. Ubuntu has always worked great, so thats what I use, none of that fancy shit lol
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2019-07-04 16:50:35
The error is that in take-confirm line 6 the code is supposed to update the SQL table invites and field confirmed to yes then the code is no longer active ie disappears from bottom  if it does not you can use the code over and over and everybody can sign up with that code over and over that's the only error I'm assuming shadows issue is the same the implode string on line 6 is giving invalid arguments ie the inviteid isn't getting picked up from the implode string
Unknown User
2019-07-04 16:53:24
"MicroMonkey, post: 66759, member: 311":

Oh, ok , very well then. 1 mistake found. In account-signup.php
find
    $id = mysqli_insert_id($GLOBALS[DBconnector]);

change to
   $id = mysqli_insert_id($GLOBALS["DBconnector"]);

double quotes missing. It would screw up everything if it cant connect to the database.

This is not a relevant part as it is for shoutbox mod which is not required

 
 @SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'System', 'New User:".$wantusername." ')");
   $id = mysqli_insert_id($GLOBALS["DBconnector"]);


Edit: Try pressing confirm user without selecting them into invite.php it will show you `Database Error. Please report this to an administrator.`

Edit2: Can you try to use the same code 2 times before confirming the user. It is a bug which is letting people register multiple times.
2019-07-04 17:08:47
I see what you mean.
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2019-07-04 17:49:51
should solve the "nothing selected" problem. Still thinking about the other issues
takeconfirm.php
<?php
require_once("backend/functions.php");
dbconn();
$id = (int) $_GET["id"];
if (!@count($_POST['conusr'])) autolink("invite.php", "Nothing Selected.");
SQL_Query_exec("UPDATE users SET status = 'confirmed' WHERE id IN (" . implode(", ", $_POST['conusr']) . ") AND status='pending'");
SQL_Query_exec("UPDATE invites SET confirmed='yes' WHERE inviteid IN (" . implode(", ", $_POST['conusr']) . ") AND confirmed='no'");
header("Refresh: 0; url=invite.php?id=$id");
?>

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2019-07-04 17:56:15
"MicroMonkey, post: 66782, member: 311":

should solve the "nothing selected" problem. Still thinking about the other issues
takeconfirm.php
<?php
require_once("backend/functions.php");
dbconn();
$id = (int) $_GET["id"];
if (!@count($_POST['conusr'])) autolink("invite.php", "Nothing Selected.");
SQL_Query_exec("UPDATE users SET status = 'confirmed' WHERE id IN (" . implode(", ", $_POST['conusr']) . ") AND status='pending'");
SQL_Query_exec("UPDATE invites SET confirmed='yes' WHERE inviteid IN (" . implode(", ", $_POST['conusr']) . ") AND confirmed='no'");
header("Refresh: 0; url=invite.php?id=$id");
?>


Do you have a database error when user registers with invitation code successfully? It shows for me the empty sqlerr with dataase error. If code is invalid then it shows the code is invalid, but the problem is that valid registration shows this database error, but account is created.
2019-07-04 18:19:57
I did not get any sql error when registering a user while using the code generated invite. I did get the implode error when I didnt select a user to confirm, which seems to be solved by the code I posted above. I will test some more tho, but right now, its the 4th of july and imma go get drunk as piss. Wish me luck :D
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2019-07-04 19:45:26
   $ret = SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, age, country, gender, client, stylesheet, language, class, ip, invited_by, invitedate) VALUES (" .
     implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass, getip(), $i["inviter"], get_date_time()))).")");


I found a bug. $i["inviter"], get_date_time() are not working from the code. Could it be a SQL error when signing up?
2019-07-04 19:56:16
the invited_by table in my test database shows 1, so I have to assume its working and I saw no such errors in my  tests. invitedate is also recorded
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2019-07-04 20:19:00
"MicroMonkey, post: 66786, member: 311":

the invited_by table in my test database shows 1, so I have to assume its working and I saw no such errors in my  tests. invitedate is also recorded

The problem was my windows localhost mistake heh. Okay it works perfect. The only bug left is to fix when code is used it can't be used again and to be removed automatically from invite list.
Unknown User
2019-07-04 21:09:50
ok ive got it working looks like the ajshoutbox code was cuasing it to bug out remove it from account-signup.php

  @SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'System', 'New User:".$wantusername." ')");


it working for me if it works for everyone else ill clean up the code a bit and post in completed ive found one bug that needs sorted
Unknown User
2019-07-04 21:20:38
"serph, post: 66788, member: 1398":

ok ive got it working looks like the ajshoutbox code was cuasing it to bug out remove it from account-signup.php

  @SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'System', 'New User:".$wantusername." ')");


it working for me if it works for everyone else ill clean up the code a bit and post in completed ive found one bug that needs sorted

Yes, that works!

Now 2 bugs left:
1. After code is used, it should be removed automatically from the inviter list and reduce -1 to invites.
2. Delete and recreate code is still bugged you can recreate as many as you want codes because deleting doesn't reduce -1 to your invite list. It just let you recreate a new code.
Unknown User
2019-07-04 21:42:09
"shadows, post: 66789, member: 20311":

Yes, that works!

Now 2 bugs left:
1. After code is used, it should be removed automatically from the inviter list and reduce -1 to invites.
2. Delete and recreate code is still bugged you can recreate as many as you want codes because deleting doesn't reduce -1 to your invite list. It just let you recreate a new code.

Deleting a code gives you the code back that's what it's supposed to do confirming a pending member removes the created code after you have confirmed them and you don't get the invite back the invites are already reduced because you've created a code ie -1 invite or am I not understanding your post
Unknown User
2019-07-04 21:45:23
"serph, post: 66790, member: 1398":

Deleting a code gives you the code back that's what it's supposed to do confirming a pending member removes the created code after you have confirmed them and you don't get the invite back the invites are already reduced because you've created a code ie -1 invite or am I not understanding your post

For example, my profile has 1 invites left.

I generated "ce913c8d140f6f0277940ea88e3f2a7" and registered a new account which is confirmed. This code can not be used again, but it stays inside my invite list. If i delete this code, I again can create 1 new code. And i can repeat that cycle infinite times. So I will always have 1 code left. Is it possible to delete it without confirming them? To disable this confirm option as it should be automatically removed once code is used
Unknown User
2019-07-04 21:50:37
did you remove the @SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'System', 'New User:".$wantusername." ')"); in account-signup.php
on my site its removing the created invite after you confirm the user i need [USER=311]@MicroMonkey[/USER] to test it on his end and see if its doing the same for him
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728