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