xbdevsponsor |
21st February 2023 14:53 |
mysqli_* plus PayPal/ credit card signup [mod]
Signup with credit card/ PayPal code to obtain email or card deets for future references or builds to utilise your website requirements. updated to mysqli_* also ... So here we go!
[b]reqPayPal-signup.php[/code]
Code:
/*
// +--------------------------------------------------------------------------+
// | Project: FTS - Free Torrent Source |
// +--------------------------------------------------------------------------+
// | Module: signup.php - Register for one account. |
// | Version: 3.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_once("include/bittorrent.php");
dbconn();
if($invitesys == 'yes') stderr('Error!','Invite system is on');
include "check_username.php";
foreach($_POST as $key => $value) {
$value=trim($value);
if (get_magic_quotes_gpc()) $value = stripslashes($value);
$value=htmlspecialchars($value,ENT_QUOTES);
$_POST[$key]=$value;
$value=str_replace("\r","",$value);
$value=str_replace("\n","",$value);
$msg[$key]=$value;
}
sajax_init();
sajax_export("check_user_exist");
sajax_handle_client_request();
function check_user_exist($username) {
$username = mysqli_escape_string($username);
$suggest = array('2005', '2006', '2007', 'best');
$sql = "SELECT `username` FROM `users` WHERE `username` = '$username'";
$result = sql_query($sql);
if(mysqli_num_rows($result) > 0) {
$avail[0] = 'no';
$i = 2;
foreach($suggest AS $postfix) {
$sql = "SELECT `username` FROM `users` WHERE `username` = '".$username.$postfix."'";
$result = sql_query($sql);
if(mysqli_num_rows($result) < 1) {
$avail[$i] = $username.$postfix;
$i ++;
}
}
$avail[1] = $i - 1;
return $avail;
}
return array('yes');
}
$max = 12; // Maximum chart
$min = 1; // Minimum chart
$siteweb = $BASEURL; // Your web site, no / at the end (you can change by $SITEURL (i think))
global $CURUSER;
if ($CURUSER) {
stderr("Error", "You are already registred.");
}
$a = (@mysqli_fetch_row(@sql_query("select count(*) from users where ip='" . $_SERVER['REMOTE_ADDR'] . "'"))) or die(mysql_error());
//if ($a[0] != )
//stderr("Error", "Youre IP adress " . $_SERVER['REMOTE_ADDR'] . " is already used.");
$res = sql_query("SELECT COUNT(*) FROM users") or sqlerr(__FILE__, __LINE__);
$arr = mysqli_fetch_row($res);
if ($arr[0] >= $maxusers)
stderr("Sorry", "The current user account limit (" . number_format($maxusers) . ") has been reached. Inactive accounts are pruned all the time, please check back again later...");
stdhead("Signup");
?>
Sign up for free
Get Credits 15 GB free towards space and ability to download files
|