<?php
session_start();
ob_start();
 include "../config/config.php"; 
 include "../config/function.php"; 

 $private_key=get_privatekey($_SESSION['admin_name']);
 $request_from_server=$_SERVER['HTTP_REFERER'];
$this_server=$_SERVER['HTTP_HOST'];
if($request_from_server!=''){
	check_access_url($request_from_server,$this_server);
}

// echo $_SESSION['login_status'];echo "<br>";
// echo $_SESSION['private_key'];echo "<br>";
// echo $_SESSION['admin_name'];echo "<br>";

if($_SESSION['login_status']!='YES' || $_SESSION['private_key']!=$private_key || $_SESSION['private_key']=='' || $_SESSION['admin_name']=='')
{
    echo "Blank";
	header("Location:../AppLogin");
	exit();
}
else
{

    $project_id=text_input($_REQUEST['project_id']);
    $project_name=get_value("Select project_name from tbl_prject_master where project_id='$project_id'");
     $project_viewpoint=strtoupper(text_input($_REQUEST['project_viewpoint']));
   echo $Insrt="Insert Into tbl_project_point(project_id,project_name,project_viewpoint)values($project_id,'$project_name','$project_viewpoint')";
    mysqli_query($connection,$Insrt);
    

}
header("Location:../AddProjectDetails");
exit();
?>