<?php
require_once ("config.inc.php");
require_once ("includes/mysql.inc.php");
require_once ("includes/arrays.inc.php");
require_once ("classes/userside.class.php");
require_once ("includes/Pager/Pager.php");
require_once ("classes/misc.class.php");
require_once ("classes/timespamp.php");
$ds = new FuzzyTime();

$message	= "";
$script		= "";
$pages		= "";
$data		= array();
$array		= array();
$page		= isset($_REQUEST['page'])	?	trim($_REQUEST['page'])	:	"1";
$name		= isset($_POST['vUN'])	?	stripslashes(trim($_POST['vUN']))	:	"";

if (!$objDB) {
	$message	= "Unable to Locate Database Server.";
} else {
	$objC		= new check();
	$objU		= new userside($objDB);
        $objSR		= new settings($objDB);
	$objM		= new misc($objDB);
        $settingDetail	= $objSR->select();
       
         if (isset($_REQUEST['profile_id'])) {

          $id =   $_REQUEST['profile_id'];

        if ($id == $_SESSION['user_id']) {



            $msg	= "Error: Invalid operation";



        } else {



            $msg	= $objM->add_to_friendslist($_SESSION['user_id'], $id, "AN");



            $msg	= $objM->add_to_friendslist($id, $_SESSION['user_id']);



        }

        echo $msg;
        exit;

    }
         
         
        
         
}

?>

