<?php 
session_start();
include 'config.php';
$date = date("Y-m-d");
$public_ip = $_SERVER['REMOTE_ADDR'];
$uid = $_SESSION['userid'];
$uname = $_SESSION['uname'];
$regime_type = $_SESSION['regime_type'];
$cargo_channel = $_SESSION['cargo_channel'];
$company_code = $_SESSION['company_code'];
$csv_generated = $_POST['csv_generated'];
$no_of_shipments = $_POST['no_of_shipments'];
$manifest_count = $no_of_shipments - 1;

$sql = "INSERT INTO activity_log (user_id,company_id, module, login_date_time,public_ip,csv_generated,no_of_shipments)
        VALUES ($uid,$company_code, $regime_type,'$date','$public_ip',$csv_generated,$manifest_count)";
if ($con->query($sql) === TRUE)
{
    $echo = "1";
} 
else
{
    $echo = "0";
}    
echo $echo;