403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/HostingSpaces/admin/penpalamerica.com/wwwroot/penpal/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/HostingSpaces/admin/penpalamerica.com/wwwroot/penpal//userdetailspenpal.php
<?php

include "general.php";
include "connect.php";


if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
    header('Access-Control-Allow-Origin : *');
    header('Access-Control-Allow-Methods : POST, GET, OPTIONS, PUT, DELETE');
    header('Access-Control-Allow-Headers : *');
    exit;
}


//****************** Function starts


function getUserJSON( $email,$domain)
{
 $query= "select name,country,email,gender,phonenumber,location,profileMessage,birthDate,photo_url1,photo_url2,photo_url3,photo_url4,photo_url5,photo_url6,userType,lastSeen,usertoken,photoUpload,userStatus,genderSearch,domain,wallet_backup,gift_out,payment_method from penpal where email ='$email' and domain ='$domain'";
 //echo $query;
 $cnt ="#";

       $con=mysqli_connect("127.0.0.1","smsEngine","guEnaR28T","smartsmsrouter");
       ///Check connection
 if (mysqli_connect_errno())
 {
         // //echo mysqli_error($con);
         //echo "-1";
         return '#';
         die();
 }
 if(!$result= mysqli_query($con,$query))
 {
       mysqli_close($con);
     return "#";
 }
 else
 {
    $photo_number=0;
    $items= [];
   while($row = mysqli_fetch_array($result))
   {
     	if($row[8]  !=""){
        	$photo_number++;
        }

        if($row[9]  !=""){
        	$photo_number++;
        }

 	if($row[10]  !=""){
        	$photo_number++;
        }

 	if($row[11]  !=""){
        	$photo_number++;
        }

 	if($row[12]  !=""){
        	$photo_number++;
        }

 	if($row[13]  !=""){
        	$photo_number++;
        }
       


              
//computer fans:
$query= "select count(*) as response from penpalfriends as a, penpal as b where (email_u='$email' and (b.email =email_f)  and b.domain='$domain' and a.domain='$domain' and a.deleteaccount='0' and a.unmatch='0' and photoupload ='true') or (email_f='$email' and (b.email =email_u)  and b.domain='$domain' and a.domain='$domain' and b.deleteaccount='0' and a.unmatch='0' and photoupload ='true')";
$response1 = getQuery1($query);
$fans =$response1;



$query= "select count(*) as tot from penpalfollowers where email_f='$email' and deleteaccount ='0'";
$response1 = getQuery1($query);


$fans= $fans+$response1;


//computer following
$query= "select count(*) as tot from penpalfollowers where email_u='$email' and deleteaccount ='0'";
$response1 = getQuery1($query);
$following =$response1;




	
        $items[] = [
       'name' => $row[0],
	'country' => $row[1],	
	'email' =>  $row[2],	
	'gender' => $row[3],
	'phonenumber' => $row[4],
	'location' =>  $row[5],
	'profileMessage' => $row[6],
	'birthDate' => $row[7],
        'photo_url1' =>  $row[8],
        'photo_url2' =>  $row[9],
        'photo_url3' =>  $row[10],
	'photo_url4' =>  $row[11],
	'photo_url5' =>  $row[12],
	'photo_url6' =>  $row[13],
	'photo_number' => $photo_number,
         'userType' => $row[14],
        'lastSeen' =>  $row[15],
        'usertoken' =>$row[16],
        'photoUpload' =>$row[17],
	'userStatus' =>$row[18],
	'genderSearch' =>$row[19],
	'domain' =>$row[20],
    'wallet_backup' =>$row[21],
  'gift_out' => $row[22],
  'fans' => $fans,
  'following' => $following,
  'payment_method' =>$row[23]
    ];

	

   }
   echo json_encode($items);

   mysqli_close($con);
   return $cnt;
 }
}//getUserJSON





function getPenpalFriends($email,$gender,$domain){


if (($email !="") && ($gender != "")){
    $lastSearchID = "";
   //get user's last search 

  $query ="select lastsearchID from penpallastsearch where email = '$email' and gender ='$gender' and domain ='$domain'";
    $resSearch = getQuery1($query);
    if ($resSearch =="#"){

              //get the total records
    		$query ="select sn from penpal where gender ='$gender' and domain ='$domain' and photoUpload='true' order by sn  desc limit 1";
    		$totalRecord = getQuery1($query);
                $lastSearchID = $totalRecord;
 
    }else{
       if (($resSearch-1) > 0){
       $lastSearchID = $resSearch-1;
       }else{
          $query ="select sn from penpal where gender ='$gender' and domain ='$domain' and photoUpload='true'  order by sn  desc limit 1";
    		$totalRecord = getQuery1($query);
                $lastSearchID = $totalRecord;
       }

    }


    
    
do {
  
        //$query ="select sn,uid from penpalprofile where uid !='$email' and gender ='$gender'and sn >$sn order by sn asc limit 1";    

        $query = "select sn, email from penpal where email  != '$email' and gender ='$gender' and sn <= $lastSearchID and domain ='$domain' and photoUpload='true' order by sn desc limit 1";
       
        $response = getQuery2($query);
        
        if($response !="#"){
            $splitResponse = explode(",", $response);
            $nextSN = $splitResponse[0];
            $frdEmail = $splitResponse[1];
        
            //check if email is in the friendlist
            $query ="select email_f from penpalFriends where email_u='$email' and email_f='$frdEmail' and domain ='$domain'";
            $queryFriend = getQuery2($query);
            if($queryFriend=="#"){
                
               //update 
               //updateQuery("update penpalprofile set last_sn ='$nextSN' where uid ='$email'");
              // $query=  "select lastsearchID from penpallastsearch where email = '$email' and gender ='$gender'
              if ($resSearch=="#"){
                 //echo "james";
                $query ="Insert into penpallastsearch( email,gender, lastsearchID,domain) values ('$email','$gender','$nextSN','$domain')";   
	      }else{
                //echo "nosa";
		$query = "update penpallastsearch set lastsearchID ='$nextSN' where email = '$email' and gender ='$gender' and domain ='$domain'";
		}
	    $updateResponse = updateQuery($query);
                return $frdEmail; 
                
                exit();
            }else{
             
              $lastSearchID--;
              
            }//
        
        }else{
            //no record found  . Move record to last point
             $query ="select sn from penpal where gender ='$gender' and domain ='$domain' and photoUpload='true'  order by sn  desc limit 1";
    		$totalRecord = getQuery1($query);
                $lastSearchID = $totalRecord;

            //echo "#";
            //exit();
        }
    
} while ( $lastSearchID >= 1);

echo "#";

}



}
//********************** Function ends


//$response = array();

$gender =$_POST["gender"];
$email=$_POST["email"];
$domain =$_POST["domain"];

//$friendemail= getPenpalFriends($email,$gender,$domain);
getUserJSON ($email,$domain);



?>

Youez - 2016 - github.com/yon3zu
LinuXploit