Jump to content

Need help with ptc script ( large script :P)


viko20

Recommended Posts

When i push the register link the only thing that stands is : 51 in the left corner.

what did i do wrong? i know its pretty long but i would really appreciate it.

 

 

this is the script:

 

<?
session_start();
if($_GET['r'] and !$_SESSION['r']) { $_SESSION['r'] = $_GET['r']; }
if(($_SESSION['r'] and !$_GET['r']) or (($_SESSION['r'] and $_GET['r']) and $_GET['r'] != $_SESSION['r'])) { $_GET['r'] = $_SESSION['r']; }
include "config.php";
global $c;
include "data.php";
global $config;
?>
<html>
<head>
<title><?=$config["title"];?></title>
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<body leftmargin="0" topmargin="0">
<script language=JavaScript>
<!--
function check_length(my_form) {
maxLen = 80; // max number of characters allowed
if (ad.ad_desc.value.length >= maxLen) {
ad.ad_desc.value = ad.ad_desc.value.substring(0, maxLen);
}
}
//-->
</script><br />
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="maintop">


<table width="100%" border="0" cellpadding="0" cellspacing="0">

<tr>
<td width="50%" height="80" class="maintopright">
<div class="maintopright">  <a href="index.php"><img src=images/top.png border="0" align="middle"></a></div>
</td>
<td width="49%" class="maintopright"><div align="right">
<?php
if($loggedin == 1)
{

if ($r["account"]=="premium")
{
$upgrade = "(Upgraded Member)";
} else {
$upgrade = "(Standard Member <a href=upgrade.php>Upgrade</a>)";
}
print "Logged in as {$r['username']} {$upgrade} [<a href=index.php?action=logout>Logout</a>]";
} else {
print "Guest [<a href=login.php>Login</a> | <a href=register.php>Register</a>]";
}
?></div></td><td width="1%" class="maintopright"><td>
</tr>

</table> </td>
</tr>
<tr>
<td align="left" valign="top" class="main"><div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="900" align="center" valign="top" class="maincenter"><div style="margin-top:2; margin-bottom:2;">
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td class="topper"><div align="center">
<?=$config["menu"];?>
</div></td>

</tr>
<tr>
<td colspan="5" style="FONT-SIZE: 5px; BACKGROUND-COLOR: #FFFFFF; border-top:solid 1px #999999;"> </td>
</tr>
</table> <table width="95%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td class="midinfo">
<div class='heading'>Register</div>
<br><br>
<?

if(isset($_COOKIE["usNick"]) && isset($_COOKIE["usPass"]))
{

?>

<b><a href="#" onClick="window.location.reload()">It seems you are logged in, click here to refresh. Also note you may not have 2 accounts per IP, or both will be deleted <br>
( this has been logged & will be verified soon by the staff )</a> <br>
<br>
<a href="./index.php?action=logout">Or if you are logged in, click here to logout. </a></b></font></td>
</tr></table>



<table width="900" cellpadding="0" cellspacing="0"><tr><td style="border:1px #666 solid;padding:2px;" bgcolor="#eeeeee">



<?

exit();

}

?>


<?


require('funciones.php');

if ($_POST) {


//round 1
$username = $_POST["username"];
$password = $_POST["password"];
$cpassword = $_POST["cpassword"];
$email = $_POST["email"];
$cemail = $_POST["cemail"];
$pemail = $_POST["pemail"];
$country = $_POST["country"];

//round 2
$username = uc($username);
$password = uc($password);
$cpassword = uc($cpassword);
$email = securedata($email);
$cemail = securedata($cemail);
$pemail = securedata($pemail);
$country = securedata($country);

//round 3
$laip = getRealIP();
$username=limitatexto($username,15);
$password=limitatexto($password,15);
$cpassword=limitatexto($cpassword,15);
$email=limitatexto($email,100);
$cemail=limitatexto($cemail,100);
$pemail=limitatexto($pemail,100);
$country=limitatexto($country,15);


    $checkip = mysql_query("SELECT ip FROM tb_users WHERE ip='$laip'");
    $ip_exist = mysql_num_rows($checkip);

minimo($username);
minimopass($password);

ValidaMail($email);

ValidaMail($pemail);


$checkuser = mysql_query("SELECT username FROM tb_users WHERE username='$username'");
$username_exist = mysql_num_rows($checkuser);

$checkemail = mysql_query("SELECT email FROM tb_users WHERE email='$email'");
$email_exist = mysql_num_rows($checkemail);

$checkpemail = mysql_query("SELECT pemail FROM tb_users WHERE pemail='$pemail'");
$pemail_exist = mysql_num_rows($checkpemail);

$referer = securedata($_POST["referer"]);
$referer=limitatexto($referer,15);
$checkref = mysql_query("SELECT username FROM tb_users WHERE username='$referer'");
$referer_exist = mysql_num_rows($checkref);

if(!$username)
{
$error = 1;
$errormsg .= "<p><b>Error -</b> Please supply a username.</p>";
}

if(!$password)
{
$error = 1;
$errormsg .= "<p><b>Error -</b> Please supply a password.</p>";
}

if(!$_POST['tos'])
{
$error = 1;
$errormsg .= "<p><b>Error -</b> You must agree to the TOS to sign up.</p>";
}

if(strlen($password) < 6)
{
$error = 1;
$errormsg .= "<p><b>Error -</b> Your password must be over 6 characters.</p>";
}


if(!$cpassword)
{
$error = 1;
$errormsg .= "<p><b>Error -</b> Please supply a confirm password.</p>";
}

if(!$email)
{
$error = 1;
$errormsg .= "<p><b>Error -</b> Please supply a email.</p>";
}

if(!$cemail)
{
$error = 1;
$errormsg .= "<p><b>Error -</b> Please supply a confirmation email.</p>";
}

if(!$pemail)
{
$error = 1;
$errormsg .= "<p><b>Error -</b> Please supply a PayPal email.</p>";
}

if(!$country)
{
$error = 1;
$errormsg .= "<p><b>Error -</b> Please supply a country.</p>";
}


if ($referer_exist<1 and $_POST['referer'] != "") 
{
$error = 1;
$errormsg .= "<p><b>Error -</b> That referrer does not exist, Please leave it blank if you cannot find a referer.</p>";
$_SESSION['r'] = false;
$_GET['r'] = false;
}

if ($pemail_exist>0) {
$error = 1;
$errormsg .= "<p><b>Error -</b> That PayPal address is already in use.</p>";
}

if($password!=$cpassword) {
$error = 1;
$errormsg .= "<p><b>Error -</b> The passwords do not match.</p>";
}

if($email!=$cemail) {
$error = 1;
$errormsg .= "<p><b>Error -</b> The emails do not match.</p>";
}

if($_POST['code']!=$_SESSION['string']){ 
$error = 1;
$errormsg .= "<p><b>Error -</b> The captcha was entered incorrectly.</p>";
$_SESSION['string'] = false;
}

if($laip=="127.0.0.1")
{
$error = 1;
$errormsg .= "<p><b>Error -</b> The IP 127.0.0.1 is disabled to use.</p>";
}

if ($ip_exist>0)
{
$error = 1;
$errormsg .= "<p><b>Error -</b> You already have one account</p>";
}

if ($email_exist>0)
{
$error = 1;
$errormsg .= "<p><b>Error -</b> That email address is already in use.</p>";
}

if($username_exist>0) {
$error = 1;
$errormsg .= "<p><b>Error -</b> That username is already in use.</p>";
}




if($error == 1)
{
print $errormsg;
} else {



// Si se ha introducido un referer comprobamos que exista

if ($_POST["referer"] != "") {

// Sanitizamos la variable

$referer = securedata($_POST["referer"]);
$referer=limitatexto($referer,15);

$checkref = mysql_query("SELECT username FROM tb_users WHERE username='$referer'");
$referer_exist = mysql_num_rows($checkref);


if ($referer_exist>0) {
// Si todo parece correcto procedemos con la inserccion
      $sqlz = "SELECT * FROM tb_users WHERE username='$referer'";
      $resultz = mysql_query($sqlz);        
      $myrowz = mysql_fetch_array($resultz);

$numero=$myrowz["referals"];

      $sqlex = "UPDATE tb_users SET referals='$numero' +1 WHERE username='$referer'";
      $resultex = mysql_query($sqlex);
}

}


// Si todo parece correcto procedemos con la inserccion

$joindate=time();

$query = "INSERT INTO tb_users (username, password, ip, email, pemail, referer, country, joindate, money,visits) VALUES('$username','$password','$laip','$email','$pemail','$referer','$country','$joindate', '0.05', '0')";
mysql_query($query) or die(mysql_error());

echo "You have been registered correctly <b>$username</b>. Now you can <a href=\"login.php\">login</a>.";
showFooter();
exit();


}
}

?>
<form action="register.php" method="POST">


<font color="9c1515">*</font> Username (3 - 15 characters - no special characters):<br>
<input type="text" size="25" maxlength="15" name="username" class="form" autocomplete="off" value="<?=$_POST["username"];?>">
<br><br>

<font color="9c1515">*</font> Password (at least 6 characters):<br>
<input type="password" size="25" maxlength="15" name="password" class="form" autocomplete="off">
<br><br>

<font color="9c1515">*</font> Confirm Password:<br>
<input type="password" size="25" maxlength="15" name="cpassword" class="form" autocomplete="off">
<br><br>

<font color="9c1515">*</font> Email Address:<br>
<input type="text" size="25" maxlength="100" name="email" class="form" autocomplete="off" value="<?=$_POST["email"];?>">
<br><br>

<font color="9c1515">*</font> Confirm Email Address:<br>
<input type="text" size="25" maxlength="100" name="cemail" class="form" autocomplete="off" value="<?=$_POST["cemail"];?>">
<br><br>

<font color="9c1515">*</font> <a href=http://paypal.com target=_blank>PayPal</a> E-mail Address For Payments:<br>
<input type="text" size="25" maxlength="100" name="pemail" class="form" autocomplete="off" value="<?=$_POST["pemail"];?>">
<br><br>

<font color="9c1515">*</font> Your Country (only PayPal allowed countries):<br>
<select name="country" class="form" autocomplete="off">

               <option value=""></option>

               <option value=1>United States</option><option value=2>Albania</option><option value=3>Algeria</option><option value=4>Andorra</option><option value=5>Angola</option><option value=6>Anguilla</option><option value=7>Antigua and Barbuda</option><option value=8>Argentina</option><option value=9>Armenia</option><option value=10>Aruba</option><option value=11>Australia</option><option value=12>Austria</option><option value=13>Azerbaijan Republic</option><option value=14>Bahamas</option><option value=15>Bahrain</option><option value=16>Barbados</option><option value=17>Belgium</option><option value=18>Belize</option><option value=19>Benin</option><option value=20>Bermuda</option><option value=21>Bhutan</option><option value=22>Bolivia</option><option value=23>Bosnia and Herzegovina</option><option value=24>Botswana</option><option value=25>Brazil</option><option value=26>British Virgin Islands</option><option value=27>Brunei</option><option value=28>Bulgaria</option><option value=29>Burkina Faso</option><option value=30>Burundi</option><option value=31>Cambodia</option><option value=32>Canada</option><option value=33>Cape Verde</option><option value=34>Cayman Islands</option><option value=35>Chad</option><option value=36>Chile</option><option value=37>China Worldwide</option><option value=38>Colombia</option><option value=39>Comoros</option><option value=40>Cook Islands</option><option value=41>Costa Rica</option><option value=42>Croatia</option><option value=43>Cyprus</option><option value=44>Czech Republic</option><option value=45>Democratic Republic of the Congo</option><option value=46>Denmark</option><option value=47>Djibouti</option><option value=48>Dominica</option><option value=49>Dominican Republic</option><option value=50>Ecuador</option><option value=51>El Salvador</option><option value=52>Eritrea</option><option value=53>Estonia</option><option value=54>Ethiopia</option><option value=55>Falkland Islands</option><option value=56>Faroe Islands</option><option value=57>Federated States of Micronesia</option><option value=58>Fiji</option><option value=59>Finland</option><option value=60>France</option><option value=61>French Guiana</option><option value=62>French Polynesia</option><option value=63>Gabon Republic</option><option value=64>Gambia</option><option value=65>Germany</option><option value=66>Gibraltar</option><option value=67>Greece</option><option value=68>Greenland</option><option value=69>Grenada</option><option value=70>Guadeloupe</option><option value=71>Guatemala</option><option value=72>Guinea</option><option value=73>Guinea Bissau</option><option value=74>Guyana</option><option value=75>Honduras</option><option value=76>Hong Kong</option><option value=77>Hungary</option><option value=78>Iceland</option><option value=79>India</option><option value=80>Indonesia</option><option value=81>Ireland</option><option value=82>Israel</option><option value=83>Italy</option><option value=84>Jamaica</option><option value=85>Japan</option><option value=86>Jordan</option><option value=87>Kazakhstan</option><option value=88>Kenya</option><option value=89>Kiribati</option><option value=90>Kuwait</option><option value=91>Kyrgyzstan</option><option value=92>Laos</option><option value=93>Latvia</option><option value=94>Lesotho</option><option value=95>Liechtenstein</option><option value=96>Lithuania</option><option value=97>Luxembourg</option><option value=98>Madagascar</option><option value=99>Malawi</option><option value=100>Malaysia</option><option value=101>Maldives</option><option value=102>Mali</option><option value=103>Malta</option><option value=104>Marshall Islands</option><option value=105>Martinique</option><option value=106>Mauritania</option><option value=107>Mauritius</option><option value=108>Mayotte</option><option value=109>Mexico</option><option value=110>Mongolia</option><option value=111>Montserrat</option><option value=112>Morocco</option><option value=113>Mozambique</option><option value=114>Namibia</option><option value=115>Nauru</option><option value=116>Nepal</option><option value=117>Netherlands</option><option value=118>Netherlands Antilles</option><option value=119>New Caledonia</option><option value=120>New Zealand</option><option value=121>Nicaragua</option><option value=122>Niger</option><option value=123>Niue</option><option value=124>Norfolk Island</option><option value=125>Norway</option><option value=126>Oman</option><option value=127>Palau</option><option value=128>Panama</option><option value=129>Papua New Guinea</option><option value=130>Peru</option><option value=131>Philippines</option><option value=132>Pitcairn Islands</option><option value=133>Poland</option><option value=134>Portugal</option><option value=135>Qatar</option><option value=136>Republic of the Congo</option><option value=137>Reunion</option><option value=138>Romania</option><option value=139>Russia</option><option value=140>Rwanda</option><option value=141>Saint Vincent and the Grenadines</option><option value=142>Samoa</option><option value=143>San Marino</option><option value=144>São Tomé and Príncipe</option><option value=145>Saudi Arabia</option><option value=146>Senegal</option><option value=147>Seychelles</option><option value=148>Sierra Leone</option><option value=149>Singapore</option><option value=150>Slovakia</option><option value=151>Slovenia</option><option value=152>Solomon Islands</option><option value=153>Somalia</option><option value=154>South Africa</option><option value=155>South Korea</option><option value=156>Spain</option><option value=157>Sri Lanka</option><option value=158>St. Helena</option><option value=159>St. Kitts and Nevis</option><option value=160>St. Lucia</option><option value=161>St. Pierre and Miquelon</option><option value=162>Suriname</option><option value=163>Svalbard and Jan Mayen Islands</option><option value=164>Swaziland</option><option value=165>Sweden</option><option value=166>Switzerland</option><option value=167>Taiwan</option><option value=168>Tajikistan</option><option value=169>Tanzania</option><option value=170>Thailand</option><option value=171>Togo</option><option value=172>Tonga</option><option value=173>Trinidad and Tobago</option><option value=174>Tunisia</option><option value=175>Turkey</option><option value=176>Turkmenistan</option><option value=177>Turks and Caicos Islands</option><option value=178>Tuvalu</option><option value=179>Uganda</option><option value=180>Ukraine</option><option value=181>United Arab Emirates</option><option value=182>United Kingdom</option><option value=183>Uruguay</option><option value=184>Vanuatu</option><option value=185>Vatican City State</option><option value=186>Venezuela</option><option value=187>Vietnam</option><option value=188>Wallis and Futuna Islands</option><option value=189>Yemen</option><option value=190>Zambia</option>
               </select>
<br><br>

Referrer (if any):<br>
<input type="text" size="25" maxlength="15" name="referer" class="form" autocomplete="off" value="<? if($_POST["referer"]) { print $_POST["referer"]; } else { echo securedata($_GET["r"]); } if($_POST['referer'] or $_GET['r']) { print "\" readonly disabled"; } ?>">
<br><br>

Terms of Service<br>
<textarea cols="45" rows="7" readonly class="form" autocomplete="off"><?php
$buxtos = include("tos.txt");
$buxtos = str_replace("Bux.to", $config["site_name"], $buxtos);
print $buxtos;
?></textarea>

<br><br>

<input type='checkbox' name='tos' value='1' class="form" autocomplete="off" <? if($_POST["tos"]) { print "checked"; } ?>> I Accept Terms Of Service

<br><br>

<font color="9c1515">*</font> Security code:<br>
<img src="image.php" onclick="this.src='image.php?newtime=' + (new Date()).getTime();">(Click to reload)<br />
<input type="text" size="5" maxlength="5" name="code" class="form" autocomplete="off" value="">
<br><br>

<input type="submit" value="Register">

</form>





<?
showFooter();
?>

Link to comment
Share on other sites

Oke i think i found whats wrong but i dont know what to do about it,

I checked with dreamweaver cs3 and thats a highlighted error

 

<tr>

<td width="50%" height="80" class="maintopright">

<div class="maintopright">  <a href="index.php"><a href="index.php"><img src=images/top.png border="0" align="middle"></a></a></div></td>

<td width="49%" class="maintopright"><div align="right">

<?php

if($loggedin == 1)

{

 

Sorry fixed it :P didnt notice twice the same :P

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.