$v){$_POST[$k]=addslashes($v);} foreach($_GET as $k=>$v){$_GET[$k]=addslashes($v);} if( $_POST[Q])$q=$_POST[Q];elseif($_GET[Q])$q=$_GET[Q];elseif($_POST[q])$q=$_POST[q];elseif($_GET[q])$q=$_GET[q]; //echo json_encode($_POST); return; if($q==1){ $pwd=$_POST[passwd]; $email=$_POST[email]; if($email && $pwd){ $rs=mysql_query("select * from login a,compDB b where a.compID=b.compID and email='$email' and passwd='$pwd'",$db); if (mysql_num_rows($rs)>=1) { $row=mysql_fetch_array($rs); if($row[jdt]){ $CID=$row[cid]; $pcid=decode($row["passwd"])-10000000000; $_SESSION["CID"]=$row[cid]; $_SESSION["compID"]=$row[compID]; $_SESSION[email]=$row[email]; $_SESSION[sms]=$row[sms]; $_SESSION[name]=$row[name]; $_SESSION[compName]=$row[cName]; $_SESSION[GSTNO]=$row[GSTNO]; $_SESSION[addr]=$row[addr]; if($row[mob1]<>'') $_SESSION[mob]=$row[mob1]; elseif($row[mob2]<>'') $_SESSION[mob]=$row[mob2]; $_SESSION[bal]=round($row[ewallet],3); $_SESSION[country]=$row[country]; if($pcid==$row[cid]) $_SESSION[passwd]="";else $_SESSION[passwd]=$row[passwd]; $_SESSION[OTP]=rand(1000,9999); $UID=$_COOKIE["_Labs"]; $UA=md5($_SERVER[HTTP_USER_AGENT]); $r=mysql_fetch_array(mysql_query("select max(id) as MIS from logme")); // and active if($r[MIS]<$UID) $UID=0; upd("update login set last='$dts',ip='$ip' where cid='$CID'"); upd("insert into logme values(0,'$UID','$dts','$CID','$ip','$UA')"); $nid=mysql_insert_ID($db); if($nid) { $_SESSION[secID] = $nid; if(!$UID ) $UID=$nid; setcookie ("_Labs", $UID, time() + 40*24*3600, "/",$dom, 0,1); if($row[alert]){ $msg="Dear $_SESSION[name]

Successfull Login to your $dom account using
LoginID: $_SESSION[email]
Date: $dts
IP: $ip
Login SessionID: $nid
If this is not you please contact $support with these details.
"; sndmail($_SESSION[name],$_SESSION[email],"login alert for your $dom account",$msg,"Login Alert - $dom"); } if(count($_SESSION[cart]))echo "2";else echo "1"; return; }else $err="Unable to set session login .."; }else $err="please check your email and click on verify link"; }else $err="Login ID or password not found"; }else $err="Unable to gather login Information"; if($err) echo ($err); }elseif($q==2){ session_destroy(); echo ""; }elseif($q==3){ $EID=$_POST[email];$name=$_POST[name];$mobile=$_POST[mob];$CNT=$_POST[CNT]; if(!$EID) {echo "

Email is required.";return;} else $rs=mysql_query("select * from login where email='$EID'",$db); if (mysql_num_rows($rs)>=1) { $r=mysql_fetch_array($rs); if($r[jdt]==0) { echo "Pending Verification: please check your email $EID for verification confirmation link."; $vcode=encode(10000000000+$r[cid]); $msg="Dear $r[name]

we have received your request and registered your email for further communication.

please click $WS/app/verify.php?vcode=$vcode to verify your email

Copy and paste this url in your browser if link is not working

to check communication status you may login to $WS

Login Email: $EID
Password: $vcode

"; $OK=sndmail($EID,$EID,"Request received at $WS",$msg); }else echo "eMail: $EID is registered with us already. you may use forget password to login first.."; }else{ upd("insert into login (cid,email,mob1,name,main) values(0,'$EID','$mobile','$name','1')"); $nid=mysql_insert_ID(); $vcode=encode(10000000000+$nid); $msg="Dear $name

we have received your request and registered your email for further communication.

please click $WS/app/verify.php?vcode=$vcode to verify your email

Copy and paste this url in your browser if link is not working

to check communication status you may login to $WS

Login Email: $EID
Password: $vcode

"; /*

You will be receiving Rs 1000 Discount coupon linked with your email on verification which you may use to purchase on the following services:-

you may ignore this email if you think you have recieved this email in error: any or all information related to your email will be deleted with next 7 days and you will not receive any email from us until you verify your email with us. */ $OK=sndmail($EID,$EID,"Request received at $WS",$msg); if($OK==1){ echo "request received please check your email: $EID for email verification link"; upd("update login set passwd='$vcode' where cid='$nid'"); }else { upd("delete from login where cid='$nid'"); echo "Unable to send email to your email: $EID for verification, please check your email address or provide some other email address.."; } } }elseif($q==4){ $EID=$_POST[email];$name=$_POST[name];$mobile=$_POST[mob];$CNT=$_POST[CNT]; if(!$EID) {echo "

Email is required.";return;} else $rs=mysql_query("select * from login where email='$EID'",$db); if (mysql_num_rows($rs)>=1) { echo "eMail: $EID is registered with us already. you may use forget password to login first.."; }else{ upd("insert into compDB (compID) values(0)"); $compID=mysql_insert_ID(); upd("insert into login (cid,email,mob1,name,main,compID) values(0,'$EID','$mobile','$name','1','$compID')"); $nid=mysql_insert_ID(); $vcode=encode(10000000000+$nid); $msg="Dear $name

we have received your request and registered your email for further communication.

please click $WS/app/verify.php?vcode=$vcode&go=1 to verify your email

Copy and paste this url in your browser if link is not working

to check communication status you may login to $WS

Login Email: $EID
Password: $vcode

"; $OK=sndmail($EID,$EID,"Request received at $WS",$msg); if($OK==1){ $CID=$nid; $_SESSION["CID"]=$nid; $_SESSION["compID"]=$compID; $_SESSION[email]=$EID; $_SESSION[name]=$name; $_SESSION[mob]=$mobile; echo "request received please check your email: $EID for email verification link and login password, you may close this window your cart will remain in your login.."; upd("update login set passwd='$vcode' where cid='$nid'"); }else { upd("delete from login where cid='$nid'"); upd("delete from compDB where compID='$compID'"); echo "Unable to send email to your email: $EID for verification, pleaskxe check your email address or provide some other email address.."; } } }elseif($q==6){ //set password $pwd1=$_POST[pwd1];$pwd2=$_POST[pwd2]; if($pwd1==$pwd2){ upd("update login set passwd='$pwd1' where cid='$CID'"); echo "Password is saved successfully"; $_SESSION[passwd]=$pwd1; } }elseif($q==7){ if($_POST[eid]){ $EID=$_POST[eid]; if($EID) $rs=mysql_query("select * from login where email='$EID'",$db); if (mysql_num_rows($rs)>=1) { $r=mysql_fetch_array($rs); sndmail($r[email],$r[email],"Password recovey from $WS","Dear $r[name]

please find your $dom password: $r[passwd]

"); echo "password sent to email $EID"; //send email }else{ echo "

unregistered email please signup

"; } } }elseif($q==9){//update Profile $pass=$_POST[Pass];$email=strtolower($_POST[email]);$name=$_POST[name];$mob=$_POST[mob]; $company=$_POST[Company];$GSTNO=$_POST[GSTNO];$addr=$_POST[Addr]; $r=mysql_fetch_array(mysql_query("select * from login where cid='$CID'",$db)); if($email<>$_SESSION[email]) { $upd=",email='$email'"; $_SESSION[email]=$email; } upd("update login set passwd='$pass',mob1='$mob',name='$name'$upd where cid='$CID'"); upd("update compDB set addr='$addr',GSTNO='$GSTNO',cName='$company' where compID='$r[compID]'"); echo "Profile is updated.$err"; }elseif($q==18){ // OTP request $email=strtolower($_POST[email]);$name=$_POST[name]; if($q==9) { if($_SESSION[email]<>$email){ $OTP1=rand(1000,9999); $email1=$email; }else $OTP1=""; $email=$_SESSION[email]; } if(!$email) {$email=$_SESSION[email];$name=$_SESSION[name];} $OTP=rand(1000,9999); $_SESSION[OTP]="$OTP$OTP1"; $msg="Dear $name

Attempting changes at your $dom account using

Verification OTP: $OTP
If this is not you please ignore this email or contact $support with these details.
"; echo sndmail("$name",$email,"OTP Verification for your $dom account",$msg,"OTP Alert - $dom"); if($OTP1){ $msg="Dear $name

Attempting changes at your $dom account using

Verification OTP: $OTP1
If this is not you please ignore this email or contact $support with these details.
"; echo sndmail("$name",$email1,"OTP Verification for your $dom account",$msg,"OTP Alert - $dom"); } }elseif($q==20){ // PASSWORD forget $UID=$_POST[email]; $r=mysql_fetch_array(mysql_query("select * from login where email='$UID' or UID='$UID'",$db)); if($r[UID]){ if($r[email]==$UID){ $rs=mysql_query("select * from login where email='$UID' or UID='$UID'",$db); while($row=mysql_fetch_array($rs)){ $UIDs.="$row[UID], ";} $msg="Dear $r[name]

Your Login IDs are $UIDs


Please enter user login in forget password link to get password in your email...

"; }else $msg="Dear $r[name]

Your login password request id received


PASSWORD: $r[passwd]

"; sndmail($r[name],$r[email],"Password request received for your $dom account",$msg); echo "please check your email $r[email] for login details"; }else echo "Unable to find login details for: $UID"; }elseif($q==21){ // Support Message $UID=$_POST[email];$name=$_POST[name];$msg=$_POST[message]; $r=mysql_fetch_array(mysql_query("select * from login where email='$UID' or UID='$name'",$db)); if($r[UID]){ $rs=mysql_query("select * from login where email='$UID' or email='$r[email]'",$db); while($row=mysql_fetch_array($rs)){ $UIDs.="$row[UID], ";} } $msg="Message from: $name

Email: $UID

Login IDs: $UIDs


Message:
$msg

"; $ok=sndmail("Support","support@$dom","Message from website support form",$msg,$UID,$UID); if($ok)echo "Your message is sent to support@$dom, you will receive reply on email: $UID"; else echo "Unable to send email from Email: $UID"; }elseif($q==22){ $tx=$bitcoin->validateaddress($_POST[btcAddr]); if($tx['isvalid']!= true) echo 0; }elseif($q==23 && $CID==$SU){ $btc=$_POST[USD]+$fee;$BTA=$_POST[BTC]; if($_SESSION[OTP]==$_POST[otp]){ $_SESSION[OTP]=rand(1000,9999); $txid=$bitcoin->sendfrom("WTC",$BTA,$btc); if($txid){ $tx=$bitcoin->gettransaction($txid); $fee=$tx[fee]; echo "Payout with $btc BTC"; upd("insert into recv values('$txid','$BTA','BTC',-$btc,'$fee',0,$t,$CID,'$_SESSION[UID]',$t,0)"); }else echo "2"; }else echo "1"; }elseif($q==24){ $btc=$_POST[BTC];$payID=$_POST[spid];$detl=addslashes($_POST[detl]); if($_SESSION[OTP]==$_POST[otp] ){ $_SESSION[OTP]=rand(1000,9999); $k=mysql_fetch_array(mysql_query("select * from login where cid='$_SESSION[CID]'",$db)); if($k[ewallet]>=$btc && $btc>0 || $SU==$_SESSION[CID]){ $r=mysql_fetch_array(mysql_query("select * from login where UID='$payID'",$db)); if($k[hold] && $r[cid]==$SU) $k[hold]=0; //resetting hold for ID 4 if($r[cid] && $k[hold]==0){ upd("update login set ewallet=ewallet-$btc where cid=$k[cid]"); upd("update login set ewallet=ewallet+$btc where cid=$r[cid]"); if($_SESSION[CID]==$SU && $btc<0){ $btc*=-1; upd("insert into ledger values(13,$k[cid],'$k[UID]',0,$btc,$k[ewallet]+$btc,$t,'$gid','$_SESSION[secID]','PayIn Transfer from: $payID, $detl')"); upd("insert into ledger values(3,$r[cid],'$r[UID]',$btc,0,$r[ewallet]-$btc,$t,'$gid','$_SESSION[secID]','PayOut Transfer to: $_SESSION[login], $detl')"); }else{ upd("insert into ledger values(3,$k[cid],'$k[UID]',$btc,0,$k[ewallet]-$btc,$t,'$gid','$_SESSION[secID]','USD Transfer to: $payID, $detl')"); upd("insert into ledger values(13,$r[cid],'$r[UID]',0,$btc,$r[ewallet]+$btc,$t,'$gid','$_SESSION[secID]','PayIn Transfer from: $_SESSION[login], $detl')"); } echo "Transfer with $btc USD completed.."; }else echo "3"; }else echo "2"; }else echo "1"; }else echo json_encode($_POST); function getprice($pid){return 1;}