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
Movie-Torrentz QapTcha
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2012-11-27 20:32:14
Hi guys

i have been asked a few times now for this mod so instead of sending it to people one by one by pm, im posting it here for anyone thats looking for our version of the QapTcha login mod, you will have to change it to suit your site but here it is..



open header.php

find this line: (will be different for your theme)

<link rel="stylesheet" type="text/css" href="<?php echo $site_config["SITEURL"]; ?>/themes/M-Torrentz/theme.css" />
add underneath

<link rel="stylesheet" href="<?php echo $site_config["SITEURL"]; ?>/jquery/QapTcha.jquery.css" type="text/css" />
this is my account-login.php

<?php
//
// TorrentTrader v2.x
// $LastChangedDate: 2011-11-08 18:39:37 +0000 (Tue, 08 Nov 2011) $
// $LastChangedBy: dj-howarth1 $
//
// http://www.torrenttrader.org
//
//
require_once("backend/functions.php");
dbconn();

///if (!empty($_REQUEST["returnto"])) {
///if (!$_GET["nowarn"]) {
///$nowarn = T_("MEMBERS_ONLY");
///}
///}

if ($_POST["username"] && $_POST["password"]) {
$password = passhash($_POST["password"]);
if (!empty($_POST["username"]) && !empty($_POST["password"])) {
$res = SQL_Query_exec("SELECT id, password, secret, status, enabled FROM users WHERE username = " . sqlesc($_POST["username"]) . "");
$row = mysql_fetch_array($res);
if (!$row)
$message = T_("USERNAME_INCORRECT");
elseif ($row["status"] == "pending")
$message = T_("ACCOUNT_PENDING");
elseif ($row["password"] != $password)
$message = T_("PASSWORD_INCORRECT");
elseif ($row["enabled"] == "no")
$message = T_("ACCOUNT_DISABLED");
} else
$message = T_("NO_EMPTY_FIELDS");
if (!$message){
logincookie($row["id"], $row["password"], $row["secret"], $_POST["remember"]);
if (!empty($_POST["returnto"])) {
header("Refresh: 0; url=" . $_POST["returnto"]);
die();
} else {
header("Refresh: 0; url=index.php");
die();
}
} else {
show_error_msg(T_("ACCESS_DENIED"), $message, 1);
}
}
logoutcookie();
stdhead(T_("LOGIN"));
if ($nowarn)
show_error_msg("Error", $nowarn, 0);
begin_frame(T_("LOGIN"));
?>
<form method="post" action="account-login.php">
<table width="100%" border="0">
<tr>
<td width="50%">
<table border="0" align="right" cellpadding="3">
<tr>
<td><b><?php echo T_("USERNAME"); ?>:</b></td>
<td><input type="text" size="50" name="username"></td>
</tr>
<tr>
<td><b><?php echo T_("PASSWORD"); ?>:</b></td>
<td><input type="password" size="50" name="password"></td>
</tr>
<tr>
<td><b>Humans:</b></td>
<td><div class="clr"></div><div id="QapTcha"></div></td>
</tr>
<tr>
<td></td>
<td align="center"><input type="submit" value="<?php echo T_("LOGIN"); ?>"> &nbsp; <input type="checkbox" name="remember" value="yes"> [<?php echo T_("REMEMBERME"); ?>]
<br />
<br />
<i><?php echo T_("COOKIES");?></i>
<br />
<a href="account-signup.php"><?php echo T_("SIGNUP"); ?></a> | <a href="account-recover.php"><?php echo T_("RECOVER_ACCOUNT"); ?></a>
</td>
</tr>
</table>
</td>
<td width="50%" align="center">&nbsp;&nbsp;&nbsp;&nbsp;<a href="m-login.php"><img src="images/mobilelogin.png" alt="Mobile Login" title="Mobile Login" /></a></td>
</tr>
</table>
<?php
if (!empty($_REQUEST["returnto"]))
print("<input type="hidden" name="returnto" value="" . htmlspecialchars($_REQUEST["returnto"]) . "">n");
?>
</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/QapTcha.jquery.js"></script>
<!-- JS -->
<script type="text/javascript">
$(document).ready(function(){
$('#QapTcha').QapTcha({disabledSubmit:true});
});
</script>
<?php
end_frame();
stdfoot();
?>
account-signup.php

<?php
//
// TorrentTrader v2.x
// $LastChangedDate: 2011-11-11 01:47:12 +0000 (Fri, 11 Nov 2011) $
// $LastChangedBy: dj-howarth1 $, PureEvil
//
// http://www.torrenttrader.org
//
//
require_once("backend/functions.php");
dbconn();

$username_min_length = 3;
$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 = mysql_fetch_array($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") {

//check if IP is already a peer
if ($site_config["ipcheck"] && $site_config["accountmax"] > "0") {
$ip = $_SERVER['REMOTE_ADDR'];
$ipc = mysql_query("SELECT COUNT(ip) FROM users WHERE ip = '$ip'") or die (mysql_error());
$ipq = mysql_result($ipc, 0);
if ($ipq >= $site_config["accountmax"])
show_error_msg("Error","$site_config[SITENAME] only allows $site_config[accountmax] account per IP. If you would like to create a new account, please contact a staff member via PM or IRC.<br><br> The error was: <font color=red>maximum account count($site_config[accountmax]) exceeded for $ip($ipq), cannot proceed with signup.</font>",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"];

$wherefrom = $_POST["wherefrom"];
$age = (int) $_POST["age"];

if (empty($wantpassword) || (empty($email) && !$invite_row) || empty($wantusername))
$message = T_("DONT_LEAVE_ANY_FIELD_BLANK");
elseif (strlen($wantusername) < $username_min_length)
$message = sprintf(T_("USERNAME_TOO_SHORT"), $username_length);
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 = (@mysql_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 = (@mysql_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 = (@mysql_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 = (@mysql_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)");
}
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';
$ret = SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, age, country, gender, client, wherefrom, stylesheet, language, class, ip) VALUES (" .
implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), $age, $country, $gender, $client, $wherefrom, $site_config["default_theme"], $site_config["default_language"], $signupclass, getip()))).")");
$id = mysql_insert_id();
$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")."nn".$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")."nn ".$site_config['SITEURL']."/account-confirm.php?id=$id&secret=$psecretnn".T_("HAS_BEEN_APPROVED_EMAIL_AFTER")."nn ".T_("HAS_BEEN_APPROVED_EMAIL_DELETED")."nn".$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"));
?>
<?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 $_GET["secret"]; ?>" >
<?php } ?>
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td><?php echo T_("USERNAME"); ?>: <font class="small" color="#ff0000">*</font></td>
<td><input type="text" size="40" name="wantusername" ></td>
</tr>
<tr>
<td><?php echo T_("PASSWORD"); ?>: <font class="small" color="#ff0000">*</font></td>
<td><input type="password" size="40" name="wantpassword" ></td>
</tr>
<tr>
<td><?php echo T_("CONFIRM"); ?>: <font class="small" color="#ff0000">*</font></td>
<td><input type="password" size="40" name="passagain" ></td>
</tr>
<?php if (!$invite_row) {?>
<tr>
<td><?php echo T_("EMAIL"); ?>: <font class="small" color="#ff0000">*</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 = mysql_fetch_array($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"); ?>
&nbsp;&nbsp;
<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><?php echo T_("HOW_DID_YOU_FIND_US"); ?>:</td>
<td><input type="text" size="40" name="wherefrom" maxlength="20" ></td>
</tr>
<tr>
<td><b>Humans:</b></td>
<td><div class="clr"></div><div id="QapTcha"></div></td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" value="<?php echo T_("SIGNUP"); ?>" >
</tr>
</table>
</td>
<td><b>GMAIL, LIVE, YAHOO PLEASE CHECK SPAM FOR CONFIRMATION EMAIL</b></td>
</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/QapTcha.jquery.js"></script>
<!-- JS -->
<script type="text/javascript">
$(document).ready(function(){
$('#QapTcha').QapTcha({disabledSubmit:true});
});
</script>
<?php
end_frame();
stdfoot();
?>
upload the files in the zip to your root dir

I have added our old sprites image and our new one to match our theme, i have also included the .psd to you can tweak your slider..


hope this helps regards

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6275"]Movie-Torrentz QapTcha.rar[/url]



Movie-Torrentz QapTcha.rar
Download
sprites2.png
sprites2.png
sprites.png
sprites.png
2012-11-27 21:15:06
Thanks! ;)
2012-11-27 21:17:56
thanks
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
2012-11-27 23:07:00
Thanks kev :-)
Unknown User
2012-11-28 05:06:14
Thank you very very much  mate.....
Unknown User
2012-11-28 21:15:29
Your all welcome...
Unknown User
2012-11-29 01:24:23
"Movie-Torrentz, post: 87047":
Your all welcome...

Tnx for this..Great mod..I have one question..? Is this possible to implement in login_block, so every user if want to login, must move the slide, and then to login to site..Tnx in advance :)
2012-11-29 01:55:48
"zamunda, post: 87055":
Tnx for this..Great mod..I have one question..? Is this possible to implement in login_block, so every user if want to login, must move the slide, and then to login to site..Tnx in advance  :)
I thought about that also, but it would be really big in the block. You would have to make it really small to fit into the block, otherwise it would be rediculous. I personally dont see any reason for it to be in the login-block. Thats just my opinion tho :)
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
2012-11-29 19:51:26
You could had it any login form, if you want to add it to the login block have a go at editing the psd to make the slider smaller width but you will also have to resize the the css code too.

if was gonna add it to a login block i would disable the right block and make the left wider and the site would,nt look too silly..
Unknown User
2012-12-02 22:54:46
OK..Tnx
Unknown User
2012-12-13 13:20:32
I installed this mod and works perfectly  :)   Now it's impossible for anyone to use a program for find the password at an account.

It would be great if it could be applied and to Signup page. Is this possible?

A year ago I wake up with 5000 ghost accounts makes into a night  :lol:  so it would be a good thing for security...
Unknown User
2012-12-13 16:08:01
I have this on account sign up its only a small change but ill post you that code as well but i cant post it at min as in on my mobile web browser...
Unknown User
2012-12-13 22:34:14
account-signup added to 1st post, you might want to remove the how did u find us mod..
Unknown User
2012-12-14 07:10:27
As you said Movie-Torrentz, is a small change, are only 2 adds in the the original account-signup.php.

Before the Signup code:



<tr>

<td>Humans:</td>

<td><div class="clr"></div><div id="QapTcha"></div></td>

</tr>

And after </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/QapTcha.jquery.js"></script>

<!-- JS -->

<script type="text/javascript">

$(document).ready(function(){

$('#QapTcha').QapTcha({disabledSubmit:true});

});

</script>




I have included these 2 codes and it works perfectly. Thank you very much  :D

I think that this topic should be set sticky
Unknown User
2013-01-02 15:43:33
nice job  ;)

only with iphone not working

seems it need another js file ([size=12px] jquery.ui.touch.js)[/size]

[size=12px]i upload it this the other but nothing better [/size][size=12px] [/size] :( [size=12px] [/size]
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: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728