[Release] Registration Script (ODBC)
Heres the new register Script with ODBC Connection instead of Mssql
Have fun
FileUpload: File-Upload.net - reg_script--ODBC-.rar
-----------
If you get some SET IDENTITY INSERT OFF Error than just delete on Line 38
AccountUniqueNumber, and '$n', (delete the decimal point too). This Error is because your AccountUniqueNumber Field is set to "AutoIncrement"
Hope this helps a bit
If you want to AutoIncrement instead of the accounts.txt then have a look here:
http://stackoverflow.com/questions/4...server-2008-r2
Re: [Release] Registration Script
Thank for share. But I use SQL 2000 how can I config it.
Re: [Release] Registration Script
Quote:
Originally Posted by
lionking_3000
Thank for share. But I use SQL 2000 how can I config it.
Im not familiar with MSSQL 2000 but maybe this Website will help you:
Access Microsoft SQL Server 2000 using PHP - Program - MySQL - Builder AU
Re: [Release] Registration Script
Quote:
Originally Posted by
Shakir
Hey Folks,
Heres my Registration Script for you guys who dont want or dont know how to do that.
Just edit the config.php, index.php and register.php (its a copy from index.php)
Have fun !
Works with MSSQL 2008 RC2 maybe with 2005 i dont know
This Registration Script will work perfect with your own Webserver.
But if you have a Webhoster, then ask your Provider to enable MSSQL Extension.
Also copy this to your 'config.php' with your data to get this script running if you want to run it on a Webhoster:
Remember that '9979' is your MSSQL Port. If you didnt changed the Port than type 1433
em, gamesever is allright,but the registration system wiht your script isn't work fine。
MSSQL2008, PHP, APACHE
above that,need any other software esle?
Re: [Release] Registration Script
Re: [Release] Registration Script
Use this script if you want your server to be hacked, lol!!!!!
Is good if you're staying local, though.
Re: [Release] Registration Script
Quote:
Originally Posted by
HrxLux
Use this script if you want your server to be hacked, lol!!!!!
Is good if you're staying local, though.
Zumina have the same system :D
Re: [Release] Registration Script
Humm hack maybe not,if you call the registration script by another way that can be ok i think
Re: [Release] Registration Script
12/08/2010 was the last post.
Way to necro a dead thread
Re: [Release] Registration Script
Hey friend i have modify files registration by ace online ep 3.3.
This script, work in windows server dedicated and xampp installed (apache running).
files:
config.php:
Code:
<?php
$server = 'localhost';
$dbhandle = mssql_connect('195.36.2.11,1433', 'atum', 'callweb')//change ip and user and pass!
or die("Couldn't connect to SQL Server on $myServer");
?>
This is important configuration file by sincronization mssql database.
------------------------
index.php:
Code:
<HTML>
<HEAD>
<TITLE>Registration</TITLE>
<STYLE>
body {
background-image: url(bg.jpg);
background-repeat: no-repeat;
background-position: top center;
display: block;
width: 1280px;
background-color: black;
color: white;
margin: auto;
}
</STYLE>
</HEAD>
<BODY>
<?php
if (!strstr($_SERVER["HTTP_USER_AGENT"], "Opera") && strstr($_SERVER["HTTP_USER_AGENT"], "MSIE")){
?>
<div style="margin-top: 250px; border: 2px solid blue; background-color: black; color: white; width: 600px; margin-left: 500px;" align="center">
<?php } else { ?>
<div style="margin-top: 150px; border: 2px solid blue; background-color: black; color: white; width: 500px; margin-left: 350px;" align="center">
<?php } ?>
<div align="center"><h1>Registrazione al gioco</h1></div>
<?php
include 'config.php';
$online=mssql_num_rows(mssql_query("SELECT ConnectingServerGroupID FROM atum2_db_account.dbo.td_Account WHERE ConnectingServerGroupID = '0'"));
mssql_close($dbhandle);;
echo "<div align='center'> Attualmente vi sono ".$online." account registrati.</div>";
$sql2 = "SELECT * FROM [atum2_db_1].[dbo].[td_Character]";
$ergebnis = mssql_query($sql2);
while($row = mssql_fetch_object($ergebnis))
{
##### Nation Translation ###
$nation = $row->InfluenceType;
if ($nation == '1') { $bcu++; }
if ($nation == '2') { $ani++; }
if ($nation == '4') { $free++; }
}
$ges = $bcu + $ani + $free;
$prob = $bcu / $ges * 100;
$proba = $ani / $ges * 100;
$probr = $free / $ges * 100;
$prob = round($prob, 0);
$proba = round ($proba, 0);
$probr = round ($probr, 0);
echo "<font color=#FFFFF><u><b>Nazioni:</u></b></font>";
echo "<br>";
echo "<br>";
echo "<font color=#FF000> BCU: $bcu piloti $prob %</font>";
echo "<br>";
echo "<font color=#00FF00> ANI: $ani piloti $proba %</font>";
echo "<br>";
echo "<font color=#FF000> FreeSKA: $free piloti $probr %</font>";
?>
<h4>
<table >
<form method="post" action="register_do.php">
<input type="hidden" name="step2" value="1" />
<tbody>
<tr height="30">
<td width="189"><div align="center">
<h4><font color='996600'>Nome </font></h4>
</div></td>
<td width="144"><div align="left">
<h5>
<input name="username" type="text" value="" tabindex="1" />
</h5>
</div></td>
<td width="410"><div align="left">
<h5><font color='996600'> 6-15 caratteri.</font></h5>
</div></td>
</tr>
<tr>
<td height="30"><div align="center">
<h4><font color='996600'>Mail </font></h4>
</div></td>
<td height="30"><div align="left">
<h5>
<input name="mail1" type="text" value="" tabindex="2" />
</h5>
</div></td>
<td height="30"><div align="left">
<h5><font color='996600'> la tua mail.</font></h5>
</div></td>
</tr>
<tr>
<td height="30"><div align="center">
<h4><font color='996600'>Password </font></h4>
</div></td>
<td height="30"><div align="left">
<h5>
<input name="password1" type="password" value="" tabindex="3" />
</h5>
</div></td>
<td height="30"><div align="left">
<h5><font color='996600'> 6-15 caratteri.</font></h5>
</div></td>
</tr>
<tr>
<td height="30"><div align="center">
<h4><font color='996600'>Ripeti password </font></h4>
</div></td>
<td height="30"><div align="left">
<h5>
<input name="password2" type="password" value="" tabindex="4" />
</h5>
</div></td>
<td height="30"><div align="left">
<h5><font color='996600'> Ripeti la tua password.</font></h5>
</div></td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="3" height="10"><div align="center"><input name="submit" type="submit" value="Registrati" /></div> </td>
</tr>
</tbody>
</form>
</table>
</h4>
<CENTER>
<h2>Scarica il gioco</h2><br>
<a style="color: yellow; text-decoration: none;" href="#">Parte 1</a> / <a style="color: yellow; text-decoration: none;" href="#">Parte 2</a><br>
<br>
</CENTER>
</div>
</BODY>
</HTML>
This is homepage file and registration.
-----------------------------------------------------
register_do.php:
Code:
<?php
if(isset($_POST[step2])) {
$errorStr = formStep3();
if($errorStr!=null){
#echo $errorStr;
echo "<body style=\"background-color: black; color: white;\"><CENTER><h2>Spiacente!</h2><br><h3>Ci risulta che esiste gia un account o mail uguale a quello da te scelto! Cambia nome o mail nella registrazione account!</h3><br><a href='javascript:history.back()'><font color='green'><b>torna indietro</b></font></a></CENTER></body>";
#echo $errorStr;
}else{
echo "<body style=\"background-color: black; color: white;\"><CENTER><h2>Account ".$_POST[username]." registrato!</h2><br><h3>Ora puoi effettuare il Login sul tuo PC!</h3><br><a href='javascript:history.back()'><font color='green'><b>torna indietro</b></font></a></CENTER></body>";
}}
else {
require_once('index.php');
$_SESSION[step2] = 1; }
function formStep3(){
include 'config.php';
//select a database to work with
$selected = mssql_select_db('atum2_db_account', $dbhandle)
or die("Couldn't open database Account");
//$errors = array();
$errorStr = null;
if(preg_match("/^[0-9a-zA-Z]{3,15}$/i", $_POST[username])){
$strSql="select * from td_Account where AccountName='$_POST[username]'";
$result = mssql_query($strSql);
$ount = mssql_num_rows($result);
if ($ount >0) $errorStr = "Questo Username esiste gia sul nostro database, perfavore cambia l'username.<br><a href='javascript:history.back()'><font color='green'><b>torna indietro</b></font></a>";
$strSqlmail="select * from td_Account where Email='$_POST[mail1]'";
$result2 = mssql_query($strSqlmail);
$ountmail = mssql_num_rows($result2);
if ($ountmail >0) $errorStr = "Questo indirizzo mail esiste gia sul nostro database, perfavore cambia email.<br><a href='javascript:history.back()'><font color='green'><b>torna indietro</b></font></a>";
}
if ($_POST[username] == "") { echo "<body style=\"background-color: black; color: white;\"><CENTER><br/><br/><br/><b>Attenzione:</b><br/>Non hai inserito il Nome account!<br/>Torna indietro e compila il campo Nome.<br><a href='javascript:history.back()'><font color='green'><b>torna indietro</b></font></a></CENTER></body>"; exit; }
if ($_POST[password1] == "" OR $_POST[password1] != $_POST[password2] OR $_POST[password2] == "") { echo "<body style=\"background-color: black; color: white;\"><CENTER><br/><br/><br/><b>Attenzione:</b><br/>Perfavore verifica di nuovo i campi password.<br/>Qualcosa non ha funzionato correttamente!<br><a href='javascript:history.back()'><font color='green'><b>torna indietro</b></font></a></CENTER></body>"; exit;
}else{
$userid= $_POST[username];
$passwd_user=$_POST[password1];
$mail_user=$_POST[mail1];
if ($errorStr==null){
$idaccount = mssql_query("SELECT MAX (AccountUniqueNumber) FROM atum2_db_account.dbo.td_Account");
$ultimoid = mssql_fetch_row($idaccount);
$NewID = $ultimoid[0] + 1;
$regquery = "INSERT INTO td_Account (AccountUniqueNumber, AccountName, Password, Email) VALUES ('$NewID', '$userid', '$passwd_user', '$mail_user')";
//$dk_account_result1=odbc_do($regquery);
mssql_query($regquery);
mssql_close($dbhandle);}
}
return $errorStr;
}
?>
Sorry, but is in italian lang because i'm italian....
In other day i update this by include sistem payment paypal
and statistic game top10 charapters...
Bye
:ott1:
Re: [Release] Registration Script
in other day i update this by include sistem
Re: [Release] Registration Script
Nice laura =) Keep good Working
Re: [Release] Registration Script
Laura:
First Qestion:
what is this ?
Notice: Undefined variable: ani in //masterserv\weapllications\xampp\DS\web1\index.php on line 40
Notice: Undefined variable: free in //masterserv\weapllications\xampp\DS\web1\index.php on line 41
Notice: Undefined variable: bcu in //masterserv\weapllications\xampp\DS\web1\index.php on line 39
// application code is:
line 39 if ($nation == '1') { $bcu++; }
line 40 if ($nation == '2') { $ani++; }
line 41 if ($nation == '4') { $free++; }
// End Code
i dont understund it because next info is:
BCU: 972 piloti 46 %
ANI: 464 piloti 22 %
FreeSKA: 660 piloti 31 %
.... but why i got this warn ?
- its bad variable or not ?:)))
=================================
Second: its mssql_query :((
Do you tested it for weakness by SQL Injection ?
Imho PDO will be better:
http://www.phpeveryday.com/articles/...ment-P552.html
Re: [Release] Registration Script
Papasmurf
This script is for ace ep 3.3 by connection database,
Your first question is for ANI player, BCU player and player not assign in This two Nation.
The error variable if because you not definite by php version...
include 'config.php';
$sql2 = "SELECT * FROM [atum2_db_1].[dbo].[td_Character]";
$ergebnis = mssql_query($sql2);
while($row = mssql_fetch_object($ergebnis))
{
##### Nation Translation ###
$nation = $row->InfluenceType;
if ($nation == '1') { $bcu++; }
if ($nation == '2') { $ani++; }
if ($nation == '4') { $free++; }
}
--------------------------------------
{ $bcu++; } count number player assign this nation
Piloti = Players in english
Remember: For sql_injection you need creation new variable and change character vulnerable in other character....The code i have in my website...if you want contact me in pvt ok?
Bye
Re: [Release] Registration Script
I keep getting call to undefined function mssql_connect() but all my extensions are working and my apahe is configured correctly
windows 7 32bit SQL 08 R2 datacenter edition.
errg this is annoying.
Re: [Release] Registration Script
Refer to my reply to a similar thread as to why it does that: http://forum.ragezone.com/f611/regis...9/#post7035604
Re: [Release] Registration Script
Meh no need, i found that my hosting had sqlsrv disabled, so i just made a webserver and it's working just fine
with a few minor tweaks.
Re: [Release] Registration Script
link fail
link release please.