Thread: Help sos
View Single Post
  #3  
Old 6th August 2008, 02:55
Subzero's Avatar
Subzero Subzero is offline
Coder
 
Join Date: Jul 2008
P2P
Posts: 190
Default
here it is :D
Code:
<?

$max = 12; // Maximum chart
$min = 1; // Minimum chart
$siteweb = "http://www.unitedtorrents.net"; // Your web site, no / at the end (you can change by $SITEURL (i think))

require_once("include/bittorrent.php");
include("vImage.php");
$vImage = new vImage();
dbconn();

stdhead("Signup");

?>

<script type="text/javascript">
function writediv(texte)
     {
     document.getElementById('pseudobox').innerHTML = texte;
     }

function verifPseudo(pseudo)
     {
     if(pseudo != '')
               {
               if(pseudo.length<<?=$min;?>)
                         writediv('<span style="color:#cc0000"><b>'+pseudo+' - </b>The username is too short.</span>');
               else if(pseudo.length><?=$max;?>)
                         writediv('<span style="color:#cc0000"><b>'+pseudo+' - </b> This username is too long.</span>');
               else if(texte = file('<?=$siteweb;?>/verifpseudo.php?pseudo='+escape(pseudo)))
                         {
          if(texte == 1)
               writediv('<span style="color:#cc0000"><b>'+pseudo+' - </b> This username already exist.</span>');
          else if(texte == 2)
               writediv('<span style="color:#1A7917"><b>'+pseudo+' - </b> This username is free :D</span>');
          else if(!isNaN(pseudo.charAt(0)))
                writediv('<span style="color:#cc0000"><b>'+pseudo+' -</b> The username is not a valid username. The username can't start with number.</span>')
          else
               writediv('Enter an username.');
                         }
               }

     }

function file(fichier)
     {
     if(window.XMLHttpRequest) // FIREFOX
          xhr_object = new XMLHttpRequest();
     else if(window.ActiveXObject) // IE
          xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
     else
          return(false);
     xhr_object.open("GET", fichier, false);
     xhr_object.send(null);
     if(xhr_object.readyState == 4) return(xhr_object.responseText);
     else return(false);
     }
</script>

<!--
<table width=500 border=1 cellspacing=0 cellpadding=10><tr><td align=left>
<h2 align=center>Proxy check</h2>
<b><font color=red>Important - please read:</font></b> We do not accept users connecting through public proxies. When you
submit the form below we will check whether any commonly used proxy ports on your computer is open. If you have a firewall it may alert of you of port
scanning activity. This is only our proxy-detector in action.
<b>The check takes up to 30 seconds to complete, please be patient.</b> The IP address we will test is <b><?= $_SERVER["REMOTE_ADDR"]; ?></b>.
By proceeding with submitting the form below you grant us permission to scan certain ports on this computer.
</td></tr></table>
<p>
-->
<?= _('Note: You need cookies enabled to sign up or log in.')?>
<p>
<form method="post" action="takesignup.php">
<table border="1" cellspacing=0 cellpadding="10">
<tr><td align="right" class="heading"><?= _('Desired username') ?>:</td><td align=left><input type="text" name="wantusername" size="40" onKeyUp="verifPseudo(this.value)" /></td></tr>
<tr><td align="right" class="heading"><?= _('Pick a password') ?>:</td><td align=left><input type="password" size="40" name="wantpassword" /></td></tr>
<tr><td align="right" class="heading"><?= _('Enter password again') ?>:</td><td align=left><input type="password" size="40" name="passagain" /></td></tr>
<tr><td align="right" class="heading"><?= _('Security Image') ?>:</td><td align=left><img src="img.php?size=6"></td></tr>

<tr><td align="right" class="heading"><?= _('Security Code') ?>:</td><td align=left><? $vImage->showCodBox(1); ?> <table width=250 border=0 cellspacing=0 cellpadding=0><tr><td class=embedded><font class=small>The security code is case sensitive.

</font></td></tr></table></td></tr>
<tr valign=top><td align="right" class="heading"><?= _('Email address') ?>:</td><td align=left><input type="text" size="40" name="email" />
<table width=250 border=0 cellspacing=0 cellpadding=0><tr><td class=embedded><font class=small><?= _('The email address must be valid.
You will receive a confirmation email which you need to respond to. The email address won\'t be publicly shown anywhere.') ?></td></tr>
</font></td></tr></table>
<?
tr( _("Gender"),"<input type=radio name=gender" . ($CURUSER["gender"] == "Male" ? " checked" : "") . " value=Male>"._('Male')."<input type=radio name=gender" .  ($CURUSER["gender"] == "Female" ? " checked" : "") . " value=Female>"._('Female')." <font color=red>&nbsp;*</font>",1);
tr( _("Age (optional)"), "<input type=\"text\" name=\"age\" size=5 value=\"" . htmlspecialchars($CURUSER["age"]) . "\" /> ", 1);
tr( _("Website (optional)"), "<input type=\"text\" name=\"website\" size=40 value=\"" . htmlspecialchars($CURUSER["website"]) . "\" /> ", 1); ?>
</td></tr>
<tr><td align="right" class="heading"></td><td align=left>
<input type=checkbox name=rulesverify value=yes><? printf( _('I have read the site %s rules %s page.'), '<a href="'.$GLOBALS['DEFAULTBASEURL'].'/rules.php" target=_blank font color=red>', '</a>') ?><br>
<input type=checkbox name=faqverify value=yes> <? printf( _('I agree to read the %s FAQ %s before asking questions.'), '<a href='.$GLOBALS['DEFAULTBASEURL'].'/faq.php target=_blank font color=red>', '</a>') ?><br>
<input type=checkbox name=ageverify value=yes> <?= _('I am at least 13 years old.') ?></td></tr>
<tr><td colspan="2" align="center"><input type=submit value="<?= _('Sign up! (PRESS ONLY ONCE)') ?>" style='height: 25px'></td></tr>
</table>
</form>
<?

stdfoot();

?>
Reply With Quote