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
10.4.22-MariaDB
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2022-01-22 13:08:58
Mysql Version: 10.4.22-MariaDB
PHP Version: 7.4.27
Apache Version: Apache/2

------------------------error--------------------------------------
Database Error in account-signup.php on line 180: Field 'subject' doesn't have a default value. Query was: INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, 453, '2022-01-21 20:47:15', 'Thank you for registering at our tracker! Please remember to keep your ratio at 1.00 or greater :)', 0).
--------------------------------------------------------------
2022-01-22 15:42:16
hello
your subject of sending a message to your choutbox does not correspond with your shoutbox

in the account-signup.php.php file look for: $msg_shout =
and check the column names of your shoutbox and this table on your cpanel

SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text)


Exemple AJ shoutbox v3:
     // Nouveau membre sur shoutbox
   $msg_shout = sqlesc("Bienvenue a notre nouveau membre ".$wantusername." :good: ");
   SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'Robot Crazy' ,".$msg_shout.")");
   // Fin

Last edited by spiritblue on 2022-01-22 15:47:41
2022-01-22 17:39:23
default should be NONE for subject field in database
Screenshot 2022-01-22 123823.jpg
File missing

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)
2022-01-22 20:11:20
ALTER TABLE messages ALTER COLUMN subject text DEFAULT '"';

set the default what ever you want and run it
follow the thread for updates
checkout my project: https://bvlist.com/showthread.php?t=12349
2022-01-29 22:12:21
this account-signup.php
i did not found  $msg_shout =
===================================

<?php
require_once("backend/functions.php");
dbconn();
$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false;
$username_length = 15; // Max username length. You shouldn't set this higher without editing the database first
$password_minlength = 6;
$password_maxlength = 40;

// Disable checks if we're signing up with an invite
if (!is_valid_id($_REQUEST["invite"]) || strlen($_REQUEST["secret"]) != 32) {
//invite only check
if ($site_config["INVITEONLY"]) {
show_error_msg(T_("INVITE_ONLY"), "<br /><br /><center>".T_("INVITE_ONLY_MSG")."<br /><br /></center>",1);

}

//get max members, and check how many users there is
$numsitemembers = get_row_count("users");
if ($numsitemembers >= $site_config["maxusers"])
show_error_msg(T_("SORRY")."...", T_("SITE_FULL_LIMIT_MSG") . number_format($site_config["maxusers"])." ".T_("SITE_FULL_LIMIT_REACHED_MSG")." ".number_format($numsitemembers)." members",1);
} else {
$res = SQL_Query_exec("SELECT id FROM users WHERE id = $_REQUEST[invite] AND MD5(secret) = ".sqlesc($_REQUEST["secret"]));
$invite_row = mysqli_fetch_assoc($res);
if (!$invite_row) {
show_error_msg(T_("ERROR"), T_("INVITE_ONLY_NOT_FOUND")." ".($site_config['signup_timeout']/86400)." days.", 1);

}
}

if ($_GET["takesignup"] == "1") {

$message == "";

function validusername($username) {
$allowedchars = "abcyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
for ($i = 0; $i < strlen($username); ++$i)
if (strpos($allowedchars, $username[$i]) === false)
return false;
return true;
}

$wantusername = $_POST["wantusername"];
$email = $_POST["email"];
$wantpassword = $_POST["wantpassword"];
$passagain = $_POST["passagain"];
$country = $_POST["country"];
$gender = $_POST["gender"];
$client = $_POST["client"];
$age = (int) $_POST["age"];

 if (empty($wantpassword) || (empty($email) && !$invite_row) || empty($wantusername))
$message = T_("DONT_LEAVE_ANY_FIELD_BLANK");
 elseif (strlen($wantusername) > $username_length)
$message = sprintf(T_("USERNAME_TOO_LONG"), $username_length);
 elseif ($wantpassword != $passagain)
$message = T_("PASSWORDS_NOT_MATCH");
 elseif (strlen($wantpassword) < $password_minlength)
$message = sprintf(T_("PASS_TOO_SHORT_2"), $password_minlength);
 elseif (strlen($wantpassword) > $password_maxlength)
$message = sprintf(T_("PASS_TOO_LONG_2"), $password_maxlength);
 elseif ($wantpassword == $wantusername)
$message = T_("PASS_CANT_MATCH_USERNAME");
 elseif (!validusername($wantusername))
$message = "Invalid username.";
 elseif (!$invite_row && !validemail($email))
$message = "That doesn't look like a valid email address.";

if ($message == "") {
// Certain checks must be skipped for invites
if (!$invite_row) {
//check email isnt banned
$maildomain = (substr($email, strpos($email, "@") + 1));
$a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from email_bans where mail_domain='$email'")));
if ($a[0] != 0)
$message = sprintf(T_("EMAIL_ADDRESS_BANNED_S"), $email);

$a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from email_bans where mail_domain LIKE '%$maildomain%'")));
if ($a[0] != 0)
$message = sprintf(T_("EMAIL_ADDRESS_BANNED_S"), $email);

 // check if email addy is already in use
 $a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from users where email='$email'")));
 if ($a[0] != 0)
$message = sprintf(T_("EMAIL_ADDRESS_INUSE_S"), $email);
}

  //check username isnt in use
 $a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from users where username='$wantusername'")));
 if ($a[0] != 0)
$message = sprintf(T_("USERNAME_INUSE_S"), $wantusername);

 $secret = mksecret(); //generate secret field

 $wantpassword = passhash($wantpassword);// hash the password
}

if ($message != "")
show_error_msg(T_("SIGNUP_FAILED"), $message, 1);

 if ($message == "") {
if ($invite_row) {
SQL_Query_exec("UPDATE users SET username=".sqlesc($wantusername).", password=".sqlesc($wantpassword).", secret=".sqlesc($secret).", status='confirmed', added='".get_date_time()."' WHERE id=$invite_row[id]");
//send pm to new user
if ($site_config["WELCOMEPMON"]){
$dt = sqlesc(get_date_time());
$msg = sqlesc($site_config["WELCOMEPMMSG"]);
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $invite_row[id], $dt, $msg, 0)");
}
if ($site_config["WELCOMEEMAIL"]) {
  require_once "Mail.php";
  $from    = $site_config['SITENAME'] . " <" . $site_config['SITEEMAIL'] . ">";
  $subject = "Welcome to " . $site_config['SITENAME'];
  $headers = array(
      'To' => $email,
      'From' => $from,
      'Subject' => $subject,
      'MIME-Version' => 1,
      'Content-type' => 'text/html;charset=iso-8859-1'
  );
  $smtp    = Mail::factory('smtp', array(
      'host' => $site_config["mail_smtp_host"],
      'auth' => $site_config["mail_smtp_auth"],
      'username' => $site_config["mail_smtp_user"],
      'password' => $site_config["mail_smtp_pass"]
  ));
  $mail    = $smtp->send($email, $headers, $site_config["WELCOMEEMAILBODY"]);
  // Log send error
  if (PEAR::isError($mail)) {
      write_log($mail->getMessage());
      return false;
  } else {
      write_log("Welcome Email successfully sent to " . $email);
  }
}

 

header("Refresh: 0; url=account-confirm-ok.php?type=confirm");
die;
}

if ($site_config["CONFIRMEMAIL"]) { //req confirm email true/false
$status = "pending";
}else{
$status = "confirmed";
}

//make first member admin
if ($numsitemembers == '0')
$signupclass = '7';
else
$signupclass = '1';

    SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, last_access, age, country, gender, client, stylesheet, language, class, ip, seedbonus) VALUES (" .
     implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass, getip(), 0.0))).")");

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

   $psecret = md5($secret);
   $thishost = $_SERVER["HTTP_HOST"];
   $thisdomain = preg_replace('/^www\./is', "", $thishost);

//ADMIN CONFIRM
if ($site_config["ACONFIRM"]) {
$body = T_("YOUR_ACCOUNT_AT")." ".$site_config['SITENAME']." ".T_("HAS_BEEN_CREATED_YOU_WILL_HAVE_TO_WAIT")."\n\n".$site_config['SITENAME']." ".T_("ADMIN");
}else{//NO ADMIN CONFIRM, BUT EMAIL CONFIRM
$body = T_("YOUR_ACCOUNT_AT")." ".$site_config['SITENAME']." ".T_("HAS_BEEN_APPROVED_EMAIL")."\n\n ".$site_config['SITEURL']."/account-confirm.php?id=$id&secret=$psecret\n\n".T_("HAS_BEEN_APPROVED_EMAIL_AFTER")."\n\n ".T_("HAS_BEEN_APPROVED_EMAIL_DELETED")."\n\n".$site_config['SITENAME']." ".T_("ADMIN");
}

if ($site_config["CONFIRMEMAIL"]){ //email confirmation is on
sendmail($email, "Your $site_config[SITENAME] User Account", $body, "", "-f$site_config[SITEEMAIL]");
header("Refresh: 0; url=account-confirm-ok.php?type=signup&email=" . urlencode($email));
}else{ //email confirmation is off
header("Refresh: 0; url=account-confirm-ok.php?type=noconf");
}
//send pm to new user
if ($site_config["WELCOMEPMON"]){
$dt = sqlesc(get_date_time());
$msg = sqlesc($site_config["WELCOMEPMMSG"]);
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $id, $dt, $msg, 0)");
}
if ($site_config["WELCOMEEMAIL"]) {
  require_once "Mail.php";
  $from    = $site_config['SITENAME'] . " <" . $site_config['SITEEMAIL'] . ">";
  $subject = "Welcome to " . $site_config['SITENAME'];
  $headers = array(
      'To' => $email,
      'From' => $from,
      'Subject' => $subject,
      'MIME-Version' => 1,
      'Content-type' => 'text/html;charset=iso-8859-1'
  );
  $smtp    = Mail::factory('smtp', array(
      'host' => $site_config["mail_smtp_host"],
      'auth' => $site_config["mail_smtp_auth"],
      'username' => $site_config["mail_smtp_user"],
      'password' => $site_config["mail_smtp_pass"]
  ));
  $mail    = $smtp->send($email, $headers, $site_config["WELCOMEEMAILBODY"]);
  // Log send error
  if (PEAR::isError($mail)) {
      write_log($mail->getMessage());
      return false;
  } else {
      write_log("Welcome Email successfully sent to " . $email);
  }
}
   die;
 }

}//end takesignup



stdhead(T_("SIGNUP"));
begin_frame(T_("SIGNUP"));
?>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Dmq_raUlnqg?autoplay=1" frameborder="0">
</iframe>
<br /><br />  
<?php echo T_("COOKIES"); ?>
<form method="post" action="account-signup.php?takesignup=1">
<?php if ($invite_row) { ?>
<input type="hidden" name="invite" value="<?php echo $_GET["invite"]; ?>" />
<input type="hidden" name="secret" value="<?php echo htmlspecialchars($_GET["secret"]); ?>" />
<?php } ?>
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td><?php echo T_("USERNAME"); ?>: <font class="required">*</font></td>
<td><input type="text" size="40" name="wantusername" /></td>
</tr>
<tr>
<td><?php echo T_("PASSWORD"); ?>: <font class="required">*</font></td>
<td><input type="password" size="40" name="wantpassword" /></td>
</tr>
<tr>
<td><?php echo T_("CONFIRM"); ?>: <font class="required">*</font></td>
<td><input type="password" size="40" name="passagain" /></td>
</tr>
<?php if (!$invite_row) {?>
<tr>
<td><?php echo T_("EMAIL"); ?>: <font class="required">*</font></td>
<td><input type="text" size="40" name="email" /></td>
</tr>
<?php } ?>
<tr>
<td><?php echo T_("AGE"); ?>:</td>
<td><input type="text" size="40" name="age" maxlength="3" /></td>
</tr>
<tr>
<td><?php echo T_("COUNTRY"); ?>:</td>
<td>
<select name="country" size="1">
<?php
$countries = "<option value=\"0\">---- ".T_("NONE_SELECTED")." ----</option>\n";
$ct_r = SQL_Query_exec("SELECT id,name,domain from countries ORDER BY name");
while ($ct_a = mysqli_fetch_assoc($ct_r)) {
$countries .= "<option value=\"$ct_a[id]\">$ct_a[name]</option>\n";
}
?>
<?php echo $countries; ?>
</select>
</td>
</tr>
<tr>
<td><?php echo T_("GENDER"); ?>:</td>
<td>
<input type="radio" name="gender" value="Male" /><?php echo T_("MALE"); ?>
  
<input type="radio" name="gender" value="Female" /><?php echo T_("FEMALE"); ?>
</td>
</tr>
<tr>
<td><?php echo T_("PREF_BITTORRENT_CLIENT"); ?>:</td>
<td><input type="text" size="40" name="client"  maxlength="20" /></td>
</tr>
<tr>
<td align="center" colspan="2">
               <input type="submit" value="<?php echo T_("SIGNUP"); ?>" />
             </td>
</tr>
</table>
</form>
<?php
end_frame();
stdfoot();
?>


======================================
Last edited by leech24 on 2022-01-30 03:12:30
2022-01-30 10:18:50
@ leech24 , Try my  and maybe it work. Is a huge difference from yours

<?php
require_once("backend/functions.php");
dbconn();

$site_config["LEFTNAV"] = false;
$site_config["MIDDLENAV"] = false;
$site_config["RIGHTNAV"]  = false;

$username_length = 15; // Max username length. You shouldn't set this higher without editing the database first
$password_minlength = 6;
$password_maxlength = 40;

// Disable checks if we're signing up with an invite
if (!is_valid_id($_REQUEST["invite"]) || strlen($_REQUEST["secret"]) != 32)
{
// invite only check
if ($site_config["INVITEONLY"])
{
show_error_msg(T_("INVITE_ONLY"), "<div style='margin:10px' align='center'>".T_("INVITE_ONLY_MSG")."</div>", 1);
}

// get max members, and check how many users there is
$numsitemembers = get_row_count("users");
if ($numsitemembers >= $site_config["maxusers"])
show_error_msg(T_("SORRY")."...", T_("SITE_FULL_LIMIT_MSG") . number_format($site_config["maxusers"])." ".T_("SITE_FULL_LIMIT_REACHED_MSG")." ".number_format($numsitemembers)." members",1);
}
else
{
$res = SQL_Query_exec("SELECT id FROM users WHERE id = $_REQUEST[invite] AND MD5(secret) = ".sqlesc($_REQUEST["secret"]));
$invite_row = mysqli_fetch_array($res);
if (!$invite_row)
{
show_error_msg(T_("ERROR"), T_("INVITE_ONLY_NOT_FOUND")." ".($site_config['signup_timeout']/86400)." days.", 1);
}
}

// ==| Check IP
if ($site_config["ipcheck"] && $site_config["accountmax"] > "0")
{
$ip = $_SERVER['REMOTE_ADDR'];
$ipc = SQL_Query_exec("SELECT COUNT(ip) FROM users WHERE ip = '$ip'") or die (mysqli_error($GLOBALS["DBconnector"]));
$ipq = mysqli_result($ipc, 0);
if ($ipq == $site_config["accountmax"]) {
$error = "".T_("NUMBER_WAS_REACHED").": ".$ip." (".$ipq." ".($ipq != 1 ? "".T_("IP_ACCOUNTS")."" : "".T_("IP_ACCOUNT")."").")";
} elseif ($ipq > $site_config["accountmax"]) {
$error = "".T_("NUMBER_WAS_EXCEDED").": ".$ip." (".$ipq." ".($ipq != 1 ? "".T_("IP_ACCOUNTS")."" : "".T_("IP_ACCOUNT")."").")";
}

if ($ipq >= $site_config["accountmax"])
show_error_msg("".T_("SIGNUP_ERROR")."", "<div style='margin-top:20px; margin-bottom:20px' align='center'><font size='2'>
<font color='#0090FF'>".$site_config["SITENAME"]."</font> ".T_("ONLY_ALLOWS")." <font color='#0090FF'>".$site_config["accountmax"]."</font>
".($site_config["accountmax"] != 1 ? "".T_("ACCOUNTS_PER_IP")."" : "".T_("ACCOUNT_PER_IP")."")."
<div style='margin-top:10px'><font color='#FF2000'>".$error."</font></div>
</font></div>", 1);
}
//==| End Check IP

if ($_GET["takesignup"] == "1")
{

$message == "";

function validusername($username)
{
$allowedchars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
for ($i = 0; $i < strlen($username); ++$i)
if (strpos($allowedchars, $username[$i]) === false)
return false;
return true;
}

$wantusername = $_POST["wantusername"];
$email = $_POST["email"];
$wantpassword = $_POST["wantpassword"];
$passagain = $_POST["passagain"];
$country = $_POST["country"];
$gender = $_POST["gender"];
$client = $_POST["client"];
$age = (int) $_POST["age"];

if (empty($wantpassword) || (empty($email) && !$invite_row) || empty($wantusername) || empty($country) || empty($gender))
$message = T_("DONT_LEAVE_ANY_FIELD_BLANK");
elseif (strlen($wantusername) > $username_length)
$message = sprintf(T_("USERNAME_TOO_LONG"), $username_length);
elseif ($wantpassword != $passagain)
$message = T_("PASSWORDS_NOT_MATCH");
elseif (strlen($wantpassword) < $password_minlength)
$message = sprintf(T_("PASS_TO_SHORT_2"), $password_minlength);
elseif (strlen($wantpassword) > $password_maxlength)
$message = sprintf(T_("PASS_TO_LONG_2"), $password_maxlength);
elseif ($wantpassword == $wantusername)
$message = T_("PASS_CANT_MATCH_USERNAME");
elseif (!validusername($wantusername))
$message = "".T_("INVALID_USERNAME").".";
elseif (!$invite_row && !validemail($email))
$message = "".T_("NOT_A_VALID_EMAIL").".";

if ($message == "")
{
// certain checks must be skipped for invites
if (!$invite_row)
{
// check email isnt banned
$maildomain = (substr($email, strpos($email, "@") + 1));
$a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from email_bans where mail_domain='$email'")));
if ($a[0] != 0)
$message = sprintf(T_("EMAIL_ADDRESS_BANNED_S"), $email);

$a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from email_bans where mail_domain='$maildomain'")));
if ($a[0] != 0)
$message = sprintf(T_("EMAIL_ADDRESS_BANNED_S"), $email);

// check if email addy is already in use
$a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from users where email='$email'")));
if ($a[0] != 0)
$message = sprintf(T_("EMAIL_ADDRESS_INUSE_S"), $email);
}

// check username isnt in use
$a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from users where username='$wantusername'")));
if ($a[0] != 0)
$message = sprintf(T_("USERNAME_INUSE_S"), $wantusername);
$secret = mksecret(); // generate secret field
$wantpassword = passhash($wantpassword);// hash the password
}

if ($message != "")
show_error_msg(T_("SIGNUP_FAILED"), $message, 1);

if ($message == "")
{
if ($invite_row)
{
// confirm and update invited members
$upload = 5368709120; //===| Upload received as default to signup (Default 5 GB)
$download = 1073741824; //===| Download received as default to signup (Default 1 GB)
$modcomment_text = "...";
$seedbonus = "0.0";

SQL_Query_exec("UPDATE users SET
username = ".sqlesc($wantusername).",
password = ".sqlesc($wantpassword).",
secret = ".sqlesc($secret).",
age = ".sqlesc($age).",
country = ".sqlesc($country).",
gender = ".sqlesc($gender).",
client = ".sqlesc($client).",
status = 'confirmed',
uploaded = '$upload',
downloaded = '$download',
modcomment = '$modcomment_text',
seedbonus = '$seedbonus',
added = '".get_date_time()."' WHERE id = $invite_row[id]");

// send pm to new user
if ($site_config["WELCOMEPMON"])
{
$dt = sqlesc(get_date_time());
$msg = sqlesc($site_config["WELCOMEPMMSG"]);
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $invite_row[id], $dt, $msg, 0)");
}

header("Refresh: 0; url=account-confirm-ok.php?type=confirm");
die;
}

// req confirm email true/false
if ($site_config["CONFIRMEMAIL"])
{
$status = "pending";
}
else
{
$status = "confirmed";
}

// make first member admin
if ($numsitemembers == '0')
$signupclass = '10';
else
$signupclass = '1';

$ret = SQL_Query_exec("INSERT INTO users (username, password, secret, email, uploaded, downloaded, modcomment, seedbonus, status, added, age, country, gender, client, stylesheet, language, class, ip) VALUES (" .
implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $upload, $download, $modcomment_text, $seedbonus, $status, get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass, getip()))).")");

$id = mysqli_insert_id($GLOBALS["DBconnector"]);
$psecret = md5($secret);
$thishost = $_SERVER["HTTP_HOST"];
$thisdomain = preg_replace('/^www\./is', "", $thishost);

// ADMIN CONFIRM
if ($site_config["ACONFIRM"])
{
$body = T_("YOUR_ACCOUNT_AT")." ".$site_config['SITENAME']." ".T_("HAS_BEEN_CREATED_YOU_WILL_HAVE_TO_WAIT")."\n\n".$site_config['SITENAME']." ".T_("ADMIN");
}
else
{
// NO ADMIN CONFIRM, BUT EMAIL CONFIRM
$body = T_("YOUR_ACCOUNT_AT")." ".$site_config['SITENAME']." ".T_("HAS_BEEN_APPROVED_EMAIL")."\n\n ".$site_config['SITEURL']."/account-confirm.php?id=$id&secret=$psecret\n\n".T_("HAS_BEEN_APPROVED_EMAIL_AFTER")."\n\n ".T_("HAS_BEEN_APPROVED_EMAIL_DELETED")."\n\n".$site_config['SITENAME']." ".T_("ADMIN");
}

if ($site_config["CONFIRMEMAIL"])
{
// email confirmation is on
sendmail($email, "Your $site_config[SITENAME] User Account", $body, "", "-f$site_config[SITEEMAIL]");
header("Refresh: 0; url=account-confirm-ok.php?type=signup&email=" . urlencode($email));
}
else
{
// email confirmation is off
header("Refresh: 0; url=account-confirm-ok.php?type=noconf");
}

// send pm to new user
if ($site_config["WELCOMEPMON"]){
$dt = sqlesc(get_date_time());
$msg = sqlesc($site_config["WELCOMEPMMSG"]);
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $id, $dt, $msg, 0)");
}
die;
}
} // end takesignup

stdhead(T_("SIGNUP"));
begin_frame(T_("SIGNUP"));
?>

<div style="margin-top:10px; margin-bottom:10px" align="center">
<font size="2" color="#19c1c7"><?php echo T_("SIGNUP_HELP"); ?>: <?php echo $site_config['HELPEMAIL']; ?></font>
</div>

<div style="margin-top:10px; margin-bottom:10px" align="center">
<font size="3" color="#ff0000"><?php echo T_("SPAM"); ?></font>
</div>

<div style="margin-top:10px; margin-bottom:10px" align="center">
<font size="3" color="#ff0000"><?php echo T_("REGISTRATION"); ?></font>
</div>

<div style='margin-bottom:10px' align='center'><?php echo T_("COOKIES"); ?></div>

<form method="post" action="account-signup.php?takesignup=1">
<?php if ($invite_row) { ?>
<input type="hidden" name="invite" value="<?php echo $_GET["invite"]; ?>" />
<input type="hidden" name="secret" value="<?php echo $_GET["secret"]; ?>" />
<?php } ?>

<div style='margin-bottom:5px' align='center'>
<table class="f-border f-title" cellspacing="0" cellpadding="5" border="0" align="center">
<tr>
<td style="padding-top:10px"> <font color="#FF0000">*</font> <?php echo T_("USERNAME"); ?>: </td>
<td style="padding-top:10px; padding-left:15px"><input type="text" class="btnLarge" name="wantusername" /></td>
</tr>
<tr>
<td> <font color="#FF0000">*</font> <?php echo T_("PASSWORD"); ?>: </td>
<td style="padding-left:15px"><input type="password" class="btnLarge" name="wantpassword" /></td>
</tr>
<tr>
<td> <font color="#FF0000">*</font> <?php echo T_("CONFIRM_PASSWORD"); ?>: </td>
<td style="padding-left:15px"><input type="password" class="btnLarge" name="passagain" /></td>
</tr>

<?php if (!$invite_row) { ?>
<tr>
<td> <font color="#FF0000">*</font> <?php echo T_("EMAIL"); ?>: </td>
<td style="padding-left:15px"><input type="text" class="btnLarge" name="email" /></td>
</tr>
<?php } ?>

<tr>
<td> <font color="#FF0000">*</font> <?php echo T_("COUNTRY"); ?>:</td>
<td style="padding-left:15px">
<select name="country" size="1">
<?php
$countries = "<option value=\"0\">---- ".T_("NONE_SELECTED")." ----</option>\n";
$ct_r = SQL_Query_exec("SELECT id,name,domain from countries ORDER BY name");
while ($ct_a = mysqli_fetch_array($ct_r))
{
$countries .= "<option value=\"$ct_a[id]\">$ct_a[name]</option>\n";
}
?>
<?php echo $countries; ?>
</select>
</td>
</tr>
<tr>
<td> <font color="#FF0000">*</font> <?php echo T_("GENDER"); ?>:</td>
<td style="padding-left:15px">
<input type="radio" name="gender" value="Male" /> <?php echo T_("MALE"); ?>
  
<input type="radio" name="gender" value="Female" /> <?php echo T_("FEMALE"); ?>
</td>
</tr>
<tr>
<td> <font color="#005EFF">*</font> <?php echo T_("AGE"); ?>:</td>
<td style="padding-left:15px"><input type="text" class="btnSmall" name="age" maxlength="2" /></td>
</tr>
<tr>
<td> <font color="#005EFF">*</font> <?php echo T_("BITTORRENT_CLIENT"); ?>:</td>
<td style="padding-left:15px"><input type="text" class="btnLarge" name="client"  maxlength="20" /></td>
</tr>
<!--<tr>
<td> <font color="#FF0000">*</font> <?php echo T_("FOR_HUMANS"); ?>:</td>
<td><div class="clr"></div><div id="QapTcha"></div></td>
</tr>-->
<tr>
<td colspan="2" align="center" style="padding-top:5px">
<input type="submit" value="<?php echo T_("SIGNUP"); ?>" />
</td>
</tr>
<tr>
<td align="left" colspan="2" style="padding-top:10px; padding-bottom:10px">
<div style="margin-bottom:5px"> <font color="#FF0000">*</font> <?php echo T_("COMPLETION_FIELD_REQUIRED"); ?></div>
 <font color="#005EFF">*</font> <?php echo T_("COMPLETION_FIELD_REQUIRED_PROFILE"); ?> 
</td>
</tr>
</table>
</div>
<table cellspacing="0" cellpadding="10" border="0" align="center">
<tr>
<td align="center">
<a href="account-login.php"><?php echo T_("LOGIN"); ?></a>
| <a href="account-recover.php"><?php echo T_("RECOVER_ACCOUNT"); ?></a>
<!--| <a href="contact.php"><?php echo T_("ASK_FOR_HELP"); ?>!</a>-->
</td>
</tr>
</table>
</form>

<script type="text/javascript" src="jquery/jquery.js"></script>
<script type="text/javascript" src="jquery/jquery-ui.js"></script>
<script type="text/javascript" src="jquery/jquery.ui.touch.js"></script>
<script type="text/javascript" src="jquery/jquery.ui.touch-punch.js"></script>

<?php if($site_config['default_language'] == 2) { ?>
<script type="text/javascript" src="jquery/QapTcha.jquery.ro.js"></script>
<?php } else { ?>
<script type="text/javascript" src="jquery/QapTcha.jquery.js"></script>
<?php } ?>

<!--<script type="text/javascript">$(document).ready(function(){ $('#QapTcha').QapTcha({disabledSubmit:true}); });</script>-->

<?php
end_frame();
stdfoot();
?>

Last edited by ronan on 2022-01-30 10:19:53
2022-02-01 21:10:05
ronan i try your file
sql error

Database Error in account-signup.php on line 187: Incorrect integer value: '' for column `admin_l24`.`users`.`uploaded` at row 1. Query was: INSERT INTO users (username, password, secret, email, uploaded, downloaded, modcomment, seedbonus, status, added, age, country, gender, client, stylesheet, language, class, ip) VALUES ('crowle','3ce477b75bbe**a065af5122fbb199d9cd661f88','a2ofYe40wUBJhDuNNLnk','darkklor**auron@gmail.com','','','','','pending','2022-02-01 20:48:20',26,86,'Male','*bittorrent',1,1,1,'27.147.226.219').
2022-02-02 08:08:17
your account-signup page is fine. You need to set a default for subject, as I mentioned above, set it to NONE. You can do this in phpmyadmin. Also turn off mysql strict mode
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)
2022-02-06 04:09:34
Open account-signup.php and around line 153-158 (TTv3)

Replace

//send pm to new user
if ($site_config["WELCOMEPMON"]){
  $dt = sqlesc(get_date_time());
  $msg = sqlesc($site_config["WELCOMEPMMSG"]);
  SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $id, $dt, $msg, 0)");
}


With

//send pm to new user
if ($site_config["WELCOMEPMON"]){
  $dt = sqlesc(get_date_time());
  $msg = sqlesc($site_config["WELCOMEPMMSG"]);
  $subject = sprintf('Thank you for registering at our tracker! Please remember to keep your ratio at %s or greater :)', $site_config['RATIOA']);
  SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster, subject) VALUES(0, $id, $dt, $msg, 0, $subject)");
}


Now you can read the config setting for RATIOA from /backend/config.php and handle it accordingly without modifying your database table field.


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: 8
  • Members: 0
  • Guests online: 8
  • Comments: 3
  • Messages: 1,728