View Single Post
éùï 13-05-09, 23:36   # 2
fas19o
çáø çãù
ãéøåâ îñçø: (0)
 
îéðé ôøåôéì
úàøéê äöèøôåú: May 2009
äåãòåú: 4

fas19o ìà îçåáø  

odbc_register
קוד:
<?php
include("config/odbc.conf.php");
echo "<center>";
if($_POST['activ'] == '1') {
  $odbc_acc_con = odbc_connect($odbc['account'],$odbc['sa'],$odbc['Mohammedbu2k1']) or die("Verbinndung zum ODBC Server fehlgeschlagen,bitte zu einem spдteren zeitpunkt erneut probieren.");
 
  $result1 = odbc_exec($odbc_acc_con,"SELECT * FROM account.dbo.USER_PROFILE WHERE user_id = '".$_POST['accname']."'");
  $result2 = odbc_exec($odbc_acc_con,"SELECT * FROM account.dbo.Tbl_user WHERE user_id = '".$_POST['accname']."'");
  $result3 = odbc_exec($odbc_acc_con,"SELECT * FROM account.dbo.Tbl_user WHERE user_mail = '".$_POST['accmail']."'");
  $row1 = odbc_num_rows($result1);
  $row2 = odbc_num_rows($result2);
  $row3 = odbc_num_rows($result3);
  if(empty($_POST['accname']) || empty($_POST['accpass1']) || empty($_POST['accpass2']) || empty($_POST['accquest']) || empty($_POST['accname']) || empty($_POST['accansw']) || empty($_POST['accmail']) || empty($_POST['result1'])) {
   echo "Du hast nicht alle felder ausgefüllt. Bitte gehe zurück und hol dieses nach.";
  } elseif($row1 > '0' || $row2 > '0') {
   echo "Der von dir gewünschte Accountname existiert bereits.";
  } elseif($row3 > '0') {
   echo "Die angegebene E-Mail Adresse wurde bereits schon verwendet.";
  } elseif($_POST['accpass1'] != $_POST['accpass2']) {
   echo "Die von dir angegebenen Passwцrter sind nicht Identisch.";
  } elseif($_POST['accpass1'] == $_POST['accname']) {
   echo "Der Accountname und das Passwort dürfen nicht das gleiche sein.";
  } elseif(!preg_match("/^[0-9a-zA-Z]{6,12}$/i", $_POST['accname'])) {
   echo "In deinem Accountnamen sind nicht erlaubte sonderzeichen erhalten.";
  } elseif(!preg_match("/^[0-9a-zA-Z]{6,12}$/i", $_POST['accpass1'])) {
   echo "Dein Passwort enthдlt sonderzeichen welche nicht erlaubt sind im Passwort.";
  } elseif(!preg_match("/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i",$_POST['accmail'])) {
   echo "Du hast keine gültige E-Mail addresse angegeben.";
  } elseif(strlen($_POST['accname']) < 6 || strlen($_POST['accname']) > 12) {
   echo "Dein Accountname muss mindestens 6 Zeichen lang sein und darf maximal 12 zeichen lang sein.";
  } elseif(strlen($_POST['accpass1']) < 6 || strlen($_POST['accpass1']) > 12) {
   echo "Dein Passwort muss mindestens 6 Zeichen lang sein und darf maximal 12 zeichen lang sein.";
  } elseif(strlen($_POST['accquest']) < 10 || strlen($_POST['accquest']) > 20) {
   echo "Die Geheim Frage muss mindestens 10 zeichen lang sein und darf dabei nicht lдnger als 20 zeichen sein.";
  } elseif(strlen($_POST['accansw']) < 10 || strlen($_POST['accansw']) > 20) {
   echo "Die Geheim Antwort muss mindestens 10 zeichen lang sein und darf dabei nicht lдnger als 20 zeichen sein.";
  } elseif($_POST['result1'] != $_POST['result2']) {
   echo "Die Sicherheits Rechnung ist falsch.";
  } else {
   $accpass = md5($_POST['accpass1']);
   $date = date("m/d/Y H:i:s",time());
 
                        odbc_exec($odbc_acc_con,"INSERT INTO account.dbo.USER_PROFILE (user_id,user_pwd,resident_no,user_type,login_flag,login_tag,ipt_time,login_time,logout_time,user_ip_addr,server_id) VALUES ('".$_POST['accname']."','".$accpass."','0','1','0','Y',null,null,null,null,'000')"); 
                        odbc_exec($odbc_acc_con,"INSERT INTO account.dbo.Tbl_user (user_id,user_pwd,user_mail,user_answer,user_question) VALUES ('".$_POST['accname']."','".$_POST['accpass1']."','".$_POST['accmail']."','".$_POST['accquest']."','".$_POST['accansw']."')");  
 
   echo "Der Account wurde erfolgreich erstellt. Viel Spass auf dem Server.";
  }
  odbc_close($odbc_acc_con);
} else {
 
 $count1 = rand(1,49);
 $count2 = rand(1,49);
 $result2 = $count1+$count2;
 
 echo "<form action='".$_SEVER['PHP_SELF']."' method='POST'>";
 echo "<center><table>";
 echo "<tr><td colspan='2' align='center'><b><u>Dekaron-Israel Register Page</u></b></td></tr>";
 echo "<tr><td>Username :</td><td><input type='text' name='accname' maxlength='12' class='input'></td></tr>";
 echo "<tr><td>Password :</td><td><input type='password' name='accpass1' maxlength='12' class='input'></td></tr>";
 echo "<tr><td>Repeat Password :</td><td><input type='password' name='accpass2' maxlength='12' class='input'></td></tr>";
 echo "<tr><td colspan='2' align='center'><b><u></u></b></td></tr>";
 echo "<tr><td>E-Mail :</td><td><input type='text' name='accmail' maxlength='50' class='input'></td></tr>";
 echo "<tr><td>Secret Question :</td><td><input type='text' name='accquest' maxlength='20' class='input'></td></tr>";
 echo "<tr><td>Secret Answer :</td><td><input type='text' name='accansw' maxlength='20' class='input'></td></tr>";
 echo "<tr><td>&nbsp;</td><td>&nbsp;</td></tr>";
 echo "<tr><td colspan='2' align='center'><b><u>Security Question</u></b></td></tr>";
 echo "<td align='center'><font color='#FF0000'><b>".$count1."</b></font> + <font color='#FF0000'><b>".$count2."</b></font> =</td>";
 echo "<td><input type='text' name='result1' maxlength='2' class='input'></td>";
 echo "<tr><td>&nbsp;</td><td>&nbsp;</td></tr>";
 echo "<tr><td colspan='2' align='center'>
  <input type='hidden' name='result2' value='".$result2."'>
  <input type='hidden' name='activ' value='1'>
  <input type='submit' value='Account erstellen' class='input'></td></tr>";
 echo "</table></center>";
 echo "</form>";
}
echo "</center>";
?>
mssql.conf
קוד:
<?php
$mssql = array(
  'host' => "5.81.*******",
  'user' => "sa",
  'pass' => "*****"
 );
?>
odbc.conf
קוד:
<?php
$odbc = array(
  'data_acc' => "account",
  'data_bil' => "billing",
  'data_cas' => "cash",
  'data_cha' => "character",
  'user' => "sa",
  'pass' => "*****"
 );
?>
  Reply With Quote