<?php
session_start();
include './connection_sql.php';
if ($_SESSION["CURRENT_USER"] == "") { 
    exit('Please Logging Again..');
} 
if ($_SESSION['company'] == "") { 
    exit('Please Logging Again..');
} 
 
header('Content-Type: text/xml'); 
if ($_GET['Command'] == "chk_sess") {
    
    
    
    
    if (!isset($_SESSION['CURRENT_USER'])) {
        $action = "not";
        $_SESSION['CURRENT_USER'] = "admin";
    }
    
    // if (!isset($_SESSION['company'])) {
    //     $action = "not";
    //     $_SESSION['company'] = "admin";
    // }
    
    $action = "ok";
    $ResponseXML = "";
    $ResponseXML .= "<salesdetails>";
    $ResponseXML .= "<action><![CDATA[" . $_GET['action'] . "]]></action>";
    $ResponseXML .= "<form><![CDATA[" . $_GET['form'] . "]]></form>";
    $ResponseXML .= "<stat><![CDATA[" . $action . "]]></stat>";
    $ResponseXML .= "</salesdetails>";
    echo $ResponseXML;
}