<?php
session_start();
$website_name = "https://erp.aurarichconsult.com";
$_SESSION["website_name"] = $website_name;
$website_name = $_SESSION["website_name"];
include($_SERVER['DOCUMENT_ROOT'] . "/API-Others/connection/business-conn.php");
include($_SERVER['DOCUMENT_ROOT'] . "/API-Others/connection/conn.php");

header("Access-Control-Allow-Origin: *");
// header("Access-Control-Allow-Credentials: true ");
// header("Access-Control-Allow-Methods: OPTIONS, GET, POST");
// header("Access-Control-Allow-Headers: Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control");
?>


<script>
    var domain = "https://erp.aurarichconsult.com";
    var domain_api = "https://erp.aurarichconsult.com/API-Others";
    sessionStorage.setItem("domain_user", domain_user);
    sessionStorage.setItem("domain_admin", domain_admin);
    sessionStorage.setItem("domain_api", domain_api);

    var domain_user = sessionStorage.getItem("domain_user");
    var domain_admin = sessionStorage.getItem("domain_admin");
    var domain_api = sessionStorage.getItem("domain_api");

    var token = sessionStorage.getItem("userId");
    var role = sessionStorage.getItem("role");
    var user_nationality = sessionStorage.getItem("user_nationality");
    var living_town = sessionStorage.getItem("living_town");
    var fullname = sessionStorage.getItem("fullname");
    var dob = sessionStorage.getItem("dob");
    var email = sessionStorage.getItem("email");
    var phone = sessionStorage.getItem("phone");
    var whatsapp_no = sessionStorage.getItem("whatsapp_no");
    var date_added = sessionStorage.getItem("date_added");

    var worker_type = sessionStorage.getItem("worker_type");
    var profile_photo = sessionStorage.getItem("profile_photo");
    var mlss_sos_no = sessionStorage.getItem("mlss_sos_no");
    var email = sessionStorage.getItem("email");
    var phone = sessionStorage.getItem("phone");
    var whatsapp_no = sessionStorage.getItem("whatsapp_no");
    var placement_agency_id = sessionStorage.getItem("placement_agency_id");
    var job_id = sessionStorage.getItem("job_id");
    var expected_salary = sessionStorage.getItem("expected_salary");
    var title = sessionStorage.getItem("title");
    var first_name = sessionStorage.getItem("first_name");
    var middle_name = sessionStorage.getItem("middle_name");
    var last_name = sessionStorage.getItem("last_name");
    var gender = sessionStorage.getItem("gender");
    var marital_status = sessionStorage.getItem("marital_status");
    var children = sessionStorage.getItem("children");
    var religion = sessionStorage.getItem("religion");
    var language = sessionStorage.getItem("language");
    var weight = sessionStorage.getItem("weight");
    var height = sessionStorage.getItem("height");
    var video_link = sessionStorage.getItem("video_link");
    var nationality = sessionStorage.getItem("nationality");
    var living_town = sessionStorage.getItem("living_town");
    var address = sessionStorage.getItem("address");
    var dob = sessionStorage.getItem("dob");
    var referral = sessionStorage.getItem("referral");
    var worked_oversees = sessionStorage.getItem("worked_oversees");
    var scars_marks = sessionStorage.getItem("scars_marks");
    var teeth_issue = sessionStorage.getItem("teeth_issue");
    var special_need = sessionStorage.getItem("special_need");
    var status_id = sessionStorage.getItem("status_id");
    var status = sessionStorage.getItem("status");
    var date_of_application = sessionStorage.getItem("date_of_application");
    var date_edited = sessionStorage.getItem("date_edited");

    var institution = sessionStorage.getItem("institution");
    var job_title = sessionStorage.getItem("job_title");
    var experience_start_date = sessionStorage.getItem("experience_start_date");
    var experience_end_date = sessionStorage.getItem("experience_end_date");

    var school = sessionStorage.getItem("school");
    var qualification = sessionStorage.getItem("qualification");
    var field = sessionStorage.getItem("field");
    var education_start_date = sessionStorage.getItem("education_start_date");
    var education_end_date = sessionStorage.getItem("education_end_date");

    var passport_issued_no = sessionStorage.getItem("passport_issued_no");
    var passport_issued_date = sessionStorage.getItem("passport_issued_date");
    var passport_expiry_date = sessionStorage.getItem("passport_expiry_date");

    //Current Page Storage

    if (sessionStorage.getItem('contentPath') == null) {} else {
        sessionStorage.setItem('UserType', domain + sessionStorage.getItem('indexURL'));
        sessionStorage.setItem('ActivePage', domain + "/COMPONENTS/" + sessionStorage.getItem('contentPath'));
    }


    Date.prototype.monthNames = [
        "January", "February", "March",
        "April", "May", "June",
        "July", "August", "September",
        "October", "November", "December"
    ];

    Date.prototype.getMonthName = function() {
        return this.monthNames[this.getMonth()];
    };
    Date.prototype.getShortMonthName = function() {
        return this.getMonthName().substr(0, 3);
    };

    // var d = new Date();
    // alert(d.getMonthName()); // "October"
</script>