Registration form

\n"); echo("
\n Connect: $ERRMSG \n
\n

\n"); exit(0); } if (msqlSelectDB($sock, "MEMBERS")<0) { echo("

\n"); echo("
\n SelectDB: $ERRMSG \n
\n

\n"); exit(0); } if (msqlQuery($sock, "SELECT credit FROM credits WHERE id_us=$id_us")<0) { echo("

\n"); echo("
\n BILLING: $ERRMSG \n
\n

\n"); exit(0); } $fd=msqlStoreResult(); $credits=msqlFetchRow($fd); msqlFreeResult($fd); if (#$credits>0) { $credit=$credits[0]; } else { $credit="(not set)"; } if ($register>0) { if ($pass=="") { $err="You must supply your password!"; } if ($user!=$ouser) { if (msqlQuery($sock, "SELECT user FROM user_data WHERE user='$user'")<0) { echo("

\n"); echo("
\n USER_DATA: $ERRMSG \n
\n

\n"); exit(0); } $fd=msqlStoreResult(); $dt=msqlFetchRow($fd); msqlFreeResult($fd); if (#$dt>0) { $err="User '$user' already exists in our database.
Please chose another username."; } } if ($user=="") { $err="You must supply your user name!"; } if ($amount!=25 && $amount!=60) { $err="How the hell did you enter this amount (" + (char)$amount + ") ???"; } if ($ex1<1 || $ex1>12) { $err="Expire 'MONTH' value must be in range 1-12."; } $tme=time(); /* What's current time ? */ $year=(int)strftime("%y", $tme); /* $year = current year */ $month=unixtime2month($tme); /* $month = current month*/ $datum=strftime("%Y%m%d", $tme); /* Generate time stamp. */ if ($ex2<$year) { $yr=$year - 1; $err="Expire YEAR value must be grater than $yr.
Are you shure that your card did not expire?"; } if ($ex2==$year && $ex1<$month) { $err="Expire MONTH value must be grater than $month.
Are you shure that your card did not expire?"; } if ($ex2==0 && $ex1==0) { $ex2=""; $ex1=""; $err="You must enter expire date information
from your credit card."; } if ($cardno=="") { $err="You must supply credit card number."; } else { $prg="./check_card " + $cardno; $fd=open($prg, "<|"); if ($fd<0) { echo("

\n"); echo("
\n Program was unable to validate your card. Please, try again later!!! \n

\n"); exit(0); } $vald=chop(readln($fd)); $vld=split($vald, ","); $valid=(int)$vld[0]; $cardn=$vld[1]; if ($cardn=="") { $cardn=$cardno; } close($fd); if ($valid==0) { $err="It seems that your credit card number is not valid,
please check it once more."; } } $test=split($email, "\@"); if (#$test!=2) { $err="Your E-mail address should look like:
user@host.domain"; } if ($test[1]=="hotmail.com" || $test[1]=="juno.com") { $err="Users from your host is not allowed to register on this site.
Get your selve decent E-mail address."; } if ($email=="") { $err="You can not receive our reply mail
if you don't fill E-mail field!"; } if ($country=="") { $err="Could you please fill in your Country field?"; } if ($zip=="") { $err="Is it possible that you don't know your ZIP code?"; } if ($city=="") { $err="City field should be filled in."; } if ($address=="") { $err="Address field has to be supplied."; } if ($surname=="") { $err="Could you please fill in your last name?"; } if ($name=="") { $err="Please fill in your name."; } if ($pass!=$valpass) { $err="Password and Validate password does not match."; } if ($err!="") { echo("

\n"); echo("
\n $err \n
\n

\n"); echo("
\n"); } else { $update="UPDATE user_data SET user='$user'"; if ($pass!=$opass) { $update=$update + ",password='$pass'"; } if ($name!=$oname) { $update=$update + ",name='$name'"; } if ($surname!=$osurname) { $update=$update + ",surname='$surname'"; } if ($email!=$oemail) { $update=$update + ",email='$email'"; } if ($phone!=$ophone) { $update=$update + ",phone='$phone'"; } $update=$update + "WHERE id_us=$id_us"; if (msqlQuery($sock, $update)<0) { echo("

\n"); echo("
\n USER_DATA: $ERRMSG \n
\n

\n"); exit(0); } if ($cardno!=$ocardno || $expire!=$oexpire || $cardype!=$ocardtype) { if (msqlQuery($sock, "SELECT _seq FROM billing")<0) { echo("

\n"); echo("
\n BILLING: $ERRMSG \n
\n

\n"); exit(0); } $rd=msqlStoreResult(); $dt=msqlFetchRow($rd); $id_bill=$dt[0]; msqlFreeResult($rd); $do_it="INSERT INTO billing VALUES ($id_bill,$id_us,'$address','$city','$zip','$country','$cardtype','$cardn','$expire',$amount)"; } else { $do_it="UPDATE billing SET address='$address'"; if ($city!=$ocity) { $do_it=$do_it + ",city='$city'"; } if ($zip!=$ozip) { $do_it=$do_it + ",zip='$zip'"; } if ($country!=$ocountry) { $do_it=$do_it + ",country='$country'"; } $do_it=$do_it + " WHERE id_bill=$id_bill"; } if (msqlQuery($sock, $do_it)<0) { echo("

\n"); echo("
\n BILLING: $ERRMSG \n
\n

\n"); exit(0); } msqlClose($sock); echo("Data has been updated.
\n"); exit(0); } msqlClose($sock); } else { if (msqlQuery($sock, "SELECT * FROM user_data WHERE id_us=$id_us")<0) { echo("

\n"); echo("
\n BILLING: $ERRMSG \n
\n

\n"); exit(0); } $fd=msqlStoreResult(); $user_data=msqlFetchRow($fd); msqlFreeResult($fd); if (msqlQuery($sock, "SELECT * FROM billing WHERE id_us=$id_us ORDER BY id_bill DESC")<0) { echo("

\n"); echo("
\n BILLING: $ERRMSG \n
\n

\n"); exit(0); } $fd=msqlStoreResult(); $billing=msqlFetchRow($fd); msqlFreeResult($fd); $name=$user_data[3]; $address=$billing[2]; $city=$billing[3]; $zip=$billing[4]; $valpass=$user_data[2]; $country=$billing[5]; $email=$user_data[6]; $phone=$user_data[7]; $cardno=$billing[7]; $old_user=$user_data[1]; $user=$user_data[1]; $pass=$user_data[2]; $surname=$user_data[4]; $cardtype=$billing[6]; $ex=split($billing[8], "/"); $ex1=$ex[0]; $ex2=$ex[1]; $oname=$user_data[3]; $oaddress=$billing[2]; $ocity=$billing[3]; $ozip=$billing[4]; $ovalpass=$user_data[2]; $ocountry=$billing[5]; $oemail=$user_data[6]; $ophone=$user_data[7]; $ocardno=$billing[7]; $oex1=strseg($billing[8], 0, 1); $oex2=strseg($billing[8], 3, 4); $ouser=$user_data[1]; $opass=$user_data[2]; $osurname=$user_data[4]; msqlClose($sock); } echo("

\n"); echo("
\n"); echo("\n"); echo("\n"); echo("

\n"); echo("\n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo("

  \n"); echo("
  \n"); echo(" User Information as on the Credit Card\n"); echo("
  \n"); echo("
  \n"); echo(" First Name: \n"); echo(" | Write your full name as on the CREDIT CARD\n"); echo("
  \n"); echo("
  \n"); echo(" Last Name: \n"); echo("
  \n"); echo("
  \n"); echo(" Address: \n"); echo(" | It's very important for fast\n"); echo(" verification !\n"); echo("
  \n"); echo("
  \n"); echo(" City: \n"); echo(" | \n"); echo("
  \n"); echo("
  \n"); echo(" Zip Code: \n"); echo(" | correct Zip or Postal Code \n"); echo("
  \n"); echo("
  \n"); echo(" Country: \n"); echo(" | \n"); echo("
  \n"); echo("
  \n"); echo(" E-Mail: \n"); echo(" | (real one if you want a password )\n"); echo("
  \n"); echo("
  \n"); echo(" * Phone No.: \n"); echo(" | optional\n"); echo("
  \n"); echo("
  \n"); echo(" Credit Card Information\n"); echo("
  \n"); echo("
  \n"); echo(" Type of the\n"); echo(" Credit Card \n"); echo(" | \n"); echo("
  \n"); echo("
  \n"); echo(" Card No: \n"); echo(" | format xxxx-xxxx-xxxx-xxxx\n"); echo("
  \n"); echo("
  \n"); echo(" Expire:"); echo(" /"); echo(" "); echo(" \n"); echo(" | (format mm/yy e.g 01/99)\n"); echo("
  \n"); echo("
  \n"); echo(" Amount: \n"); echo(" Monthly - 25 US-Dollars\n"); echo(" Three months - 60 US-Dolars\n"); echo(" \n"); echo(" | \n"); echo("
  \n"); echo("
  \n"); echo(" \n"); echo("
  \n"); echo("
  \n"); echo(" User Name : \n"); echo(" | case\n"); echo(" sensitive one word no spaces\n"); echo("
  \n"); echo("
  \n"); echo(" User Pass : \n"); echo(" | case\n"); echo(" sensitive one word no spaces\n"); echo("
  \n"); echo("
  \n"); echo(" Pass Validation : \n"); echo(" | \n"); echo(" \n"); echo("
  \n"); echo("
  \n"); echo(" \n"); echo(" \n"); echo("
  \n"); echo("
  \n \n"); echo("
  \n"); echo("\n"); echo(""); echo("Look at the TRANSACTIONS records\n"); echo(" | \n"); if ((int)$credit<0) { $rr="REVOKED"; } else { $rr=(char)$credit +" bytes"; } echo("Credits: $rr\n"); echo("\n"); echo("
  \n"); echo("

  \n"); echo(" \n"); echo("
\n"); echo(" \n"); echo("
\n"); echo("BACK"); >