<?php

define("SE_MENU", "ccm_menu");
define("SE_USERID","ccm_userid") ;
define("SE_EMPID","ccm_employeeid") ;
define("SE_USERNAME","ccm_username") ;
define("SE_USERGROUP","ccm_usergroup") ;
define("SE_FULLNAME","ccm_fullname") ;
define("SE_USERKEY","ccm_userkey") ;

define("SE_PORT_FULLNAME","ccm_portal_fullname") ;
define("SE_PORT_ORGNAME", "ccm_portal_orgname") ;
define("SE_TOKEN", "ccm_portal_token") ;

define("SE_THEME","ccm_uitheme") ;
define("SE_PAGE", "ccm_page") ;
define("SE_DB", "ccm_db") ;
define("SE_ORGID","ccm_orgid") ;
define("SE_ID","ccm_sessionid") ;
define("SE_INIT","ccm_initiated") ;
define("PORT_INIT","ccm_portal_initiated") ;
// define("MOB_INIT", "mobile_initiated");
define("SE_REMOTE_IP","ccm_remoteip") ;
define("SE_ORGNAME", "ccm_orgname") ;
define("SE_ORGCODE", "ccm_orgcode");
define("SE_URL", "ccm_url");

define("SE_BU", "ccm_businessunit");
define("SE_LEDGER", "ccm_ledger");

$path = $_SERVER['DOCUMENT_ROOT'] ;
if ($path != "/")
	$path = $path . "/" ;
define("PATH_ROOT",$path) ;

$path = __DIR__ ;
if ($path != "/")
	$path = $path . "/" ;
define("PATH_CODE",$path) ;
define("PATH_TEMPLATES",PATH_CODE . "templates/");
define("PATH_VIEWS",PATH_CODE . "views/") ;
define("PATH_LIB",PATH_CODE . "lib/") ;
define("PATH_PDF",PATH_CODE . "tcpdf/") ;
define("PATH_CONTROLLERS",PATH_CODE . "controllers/") ;
define("PATH_MODELS", PATH_CODE . "models/") ;
define("PATH_UTILS", PATH_CODE . "util/") ;
define("PATH_EXCEL", PATH_CODE . "excel/") ;
define("PATH_TABLES", PATH_CODE . "tables/") ;
define("PATH_MESSAGE", PATH_CODE . "message/") ;
define("PATH_HOST", $_SERVER['HTTP_HOST']) ;
define("PATH_SCRIPT", PATH_CODE . "js/") ;
define("PATH_LOG",PATH_CODE . "../log/") ;
define("PATH_PICTURE", PATH_CODE . "../web/picture/") ;
define("PATH_CLAIM", PATH_CODE . "../web/claims/") ;
define("PATH_CUSTOMER_POLICY", PATH_CODE . "../doc/customer_policy/") ;
define("PATH_DATABASE_BACKUP", PATH_CODE . "../database backup/") ;
define("PATH_RESOURCE", PATH_CODE . "../web/resource/") ;
define("PATH_TEMP", PATH_CODE . "../doc/temp/") ;
define("PATH_PORTAL_TEMP", PATH_CODE . "../portal/temp/") ;
define("PATH_DOC", PATH_CODE . "../doc/") ;
define("EMPLOYEE_DOC", PATH_CODE . "../web/emp_doc/") ;
define("PATH_WEB", PATH_CODE . "../web/") ;
define("PATH_PROSPECT_ATTACHMENT",  PATH_CODE ."../doc/prospect_attach/") ;
define("PATH_CAMPAIGN",  PATH_CODE ."../doc/campaign/") ;

define("PATH_VENDOR_COMPOSER",PATH_CODE . "../vendor/");

define("PATH_CUSTOMER_EXCEL",PATH_CODE . "../doc/customer/excel_temp/") ;
define("PATH_PROSPECT_EXCEL",PATH_CODE . "../doc/prospect/excel_temp/") ;
define("PATH_SUSPECT_EXCEL",PATH_CODE . "../doc/suspect/excel_temp/") ;

define("PATH_TCPDF_FONTS",PATH_CODE . "/tcpdf/fonts/") ;
define("PATH_COMPANY_PROFILE_LOGO",  PATH_CODE ."../doc/company_profile/") ;
define("PATH_CORPORATE_GIFT_ITEM",  PATH_CODE ."../doc/corporate_gift_item/") ;
define("PATH_CORPORATE_GIFT_HEADER",  PATH_CODE ."../doc/corporate_gift_header/") ;
//campaign
define("PATH_CAMPAIGN_PROFILE_LOGO",  PATH_CODE ."../doc/campaign_profile/") ;
define("PATH_CAMPAIGN_HEADER",  PATH_CODE ."../doc/campaign_header/") ;

define("TAG_TITLE","{%=Title=%}");
define("TAG_CONTENT","{%=Content=%}") ;
define("TAG_HEADER","{%=Header=%}") ;
define("TAG_FOOTER","{%=Footer=%}") ;
define("TAG_BOTTOM","{%=Bottom=%}") ;
define("TAG_MENU_BAR","{%=MenuBar=%}") ;
define("TAG_THEME","{%=Theme=%}") ;

define("APP_NAME","CRM") ;
define("APP_VER_MAJOR","3") ;
define("APP_VER_MINOR","0") ;
define("APP_VER_REV","0") ;
define("PRODUCT_CODE","11") ;	//
define("PRODUCT_TYPE","02") ;	//01-desktop 02-web 03-mobile

define("FIELD_STATUS","status") ;
define("FIELD_MESG","mesg") ;
define("FIELD_DATA","data") ;
define("FIELD_TYPE","type") ;

define("REQ_ADD", "a") ;
define("REQ_CHANGE","c") ;
define("REQ_DELETE","d") ;
define("REQ_EXPORT","e") ;
define("REQ_GET","g") ;
define("REQ_SIGNIN","i")  ;
define("REQ_LIST","l") ;
define("REQ_NEW","n") ;
define("REQ_SIGNOUT","o") ;
define("REQ_QUERY","q") ;
define("REQ_REPORT","r") ;
define("REQ_UPDATE","u") ;
define("REQ_VIEW","v") ;
define("REQ_REMOVE","rm") ;
define("REQ_SORT","s") ;
define("REQ_SHOW","sh") ;
define("REQ_LOAD","ld") ;
define("REQ_SAVE","sv") ;
define("REQ_DOWNLOAD","dl") ;
define("REQ_UPLOAD_LOGO","ul") ;

define("MAX_DATE","2999-12-31 23:59:59") ;
define("NULL_DATE","1969-12-31 23:59:59") ;

define("WEB_URL","http://localhost/portal/index.pzx");

class   Command {
	const checkConnection				  = "0" ;
	const signIn 						  = "1" ;
	const signOff 						  = "2" ;
	const authUser 						  = "3" ;
	const changePwd   					  = "4" ;
	const resetPwd 	  					  = "5" ;
    
	const PortalHome 					  = "500" ;
	const PortalClaim					  = "501" ;
	const PortalClaimGetAll				  = "502" ;
	const PortalAddView					  = "506" ;
	const PortalLogout					  = "504" ;
	
    //user group
    const UserGroupView 			      = "510" ;
	const UserGroupListView			      = "511" ;
	const UserGroupEntryView			  = "512" ;

    //report
    const CustomerContactListingView      = "600";
    const CustomerContactListingFilter    = "601";

    //corporate gift
    const SendCorporateGiftListView       = "700";
    const SendCorporateGiftListFilter     = "701";

    const CorporateGiftSummaryView        = "710";
    const CorporateGiftSummaryFilter      = "711";
    
    const CorporateGiftInquiryView        = "720";
    const CorporateGiftInquiryFilter      = "721";
    
    const CorporateGiftHistoryView        = "730";
    const CorporateGiftHistoryFilter      = "731";
    
    const ConversationReportView          = "740";
    const ConversationReportFilter        = "741";

    const AllAccountReportView            = "750";
    const AllAccountReportFilter          = "751";

    const DepartmentView                  = "72000";
    const SoftwareView                    = "73000";
    const BusinessSectorView              = "74000";
    const IndustryView                    = "75000";
    const BusinessNatureView              = "79000";

    const UserView                        = "76000";
    
    const ExportCustomerView              = "76100";
    const DestinationView                 = "76200";

    //company profile
    const CompanyProfileView              = "76300";
    const CompanyProfileListView          = "76301";
    const CompanyProfileEntryView         = "76302";

    //corporate gift
    const CorporateGiftMasterView         = "76400";
    const CorporateGiftMasterListView     = "76401";
    const CorporateGiftMasterEntryView    = "76402";

    //customer
    const CustomerView                    = "77000";
    const CustomerListView                = "77001";
    const CustomerEntryView               = "77002";
    const CustomerContactDelete           = "77003";
    const CustomerContactFilter           = "77004";
    const CustomerCustomerDeliveryDelete  = "77005";
    const CustomerCustomerDeliveryFilter  = "77006";

    //prospect
    const ProspectView                    = "77100";
    const ProspectListView                = "77101";
    const ProspectEntryView               = "77102";
    const ProspectContactDelete           = "77103";
    const ProspectContactFilter           = "77104";
    const ProspectProspectDeliveryDelete  = "77105";
    const ProspectProspectDeliveryFilter  = "77106";
    
    //Prospect To Do
    const ProspectToDoView                = "77107";
    const ProspectToDoListView            = "77108";
    const ProspectToDoEntryView           = "77109";

    //Suspect
    const TelemarketingView               = "77113";
    const TelemarketingListView           = "77114";
    const SuspectAdd                      = "77115";
    const SuspectConversationHistory      = "77116";
    const SuspectEntryView                = "77117";
    const PersonContactDetail             = "77118";
    const FollowUpActionListView          = "77119";//not in sued
    
    const FollowUpListView                = "77120";
    const UpdateCallScript                = "77121";
    const TelemarketingAccountView        = "77122";

    //campaign profile
    const CampaignProfileView               = "78000";
    const CampaignProfileListView           = "78001";
    const CampaignProfileEntryView          = "78002";
    
    //campaign
    const CampaignMasterView                = "78100";
    const CampaignMasterListView            = "78101";
    const CampaignMasterEntryView           = "78102";
    const SendCampaignListView              = "78103";
    const SendCampaignListFilter            = "78104";
    const CampaignProfileEntryUpload        = "78105";
    const CampaignDownloadAttachment        = "78106";
    const CampaignDeleteAttachment          = "78107";
    
    //audit log
    const AuditLogInquiryView             = "81000";

    const InvalidSession                  = "C_INVALID_SESSION";

    // user group
    const UserGroupDelete  = "88000";
    const UserGroupFilter  = "88001";
}

class DbType {
	const MySql = "mysql" ;
	const MsSql = "mssql" ;
	const PostgreSql = "postgre";
	const MySqli = "mysqli" ;
}

class Status {
	const Ok = "0" ;
	const Info = "6" ;
	const Invalid = "7";
	const Confirm = "8" ;
	const Error = "9" ;
    const HttpSuccess = "200";
    const HttpError = "400";
}

class AppType {
    const CRM = "CRM";
}

class AuditLogActivityType{
    const Login             = 1000;
    const ChangePassword    = 1001;
    const ResetPassword     = 1002; //Reset -> From backend by admin
    const ForgetPassword    = 1003; //Forget -> From portal by user
    const FailedLogin       = 1004;


    const InsertRecord      = 2000;
    const UpdateRecord      = 2001;
    const DeleteRecord      = 2002;
}

class DatabaseTableType{
    const Master            = 100;
    const Transaction       = 200;
}

class ProspectSalesStatus{
    const Raw               = 0;
    const Suspect           = 1;
    const Prospect          = 1;
}

class ProspectCompanyStatus{
    const Inactive          = 0;
    const Active            = 1;
    const Converted         = 2;
    const Assigned          = 3;
}

class CCMAPIURL {
    const AOC        = "http://192.168.1.15/aoc-php8/code/PortalWebView.php?c=CCMApi";
    const pService   = "http://192.168.1.15/pservice/code/PortalWebView.php?c=CCMApi";
    const eSupport   = "http://192.168.1.15/eSupport/code/PortalWebView.php?c=CCMApi";
}

class MeetingStatus{
    const FollowUp  = 0;
    const Confirm   = 1;
    const Closed    = 2;
    const KIV       = 3;
}

class AccountFlags{
    const Supplier  = "S";
    const Customer   = "C";
}
class WhatsappAPI
{
	const WHATSAPP_API_URL = "https://graph.facebook.com/v14.0/101489562726113/messages";
	const FROM_PHONE_ID = "101489562726113";
	const ACC_TOKEN = "EAAF0P4hzqGMBAMlbR6hNy1ZA4sUDuXFKEZCBWapXk2fqS1zWWlGYbCmJZCNGet9ZBsm0IICqdZAvQyp5whbomDu6gZBg6D6qCDhMSUgugxMK1G9B3zwHRZA3EJouaoMYnbPg7Xmkjg34GA8ZCrMrvuh8aPbhaDMUwHIJnjLflPJCcrtx9c4koTn8";
	const SHORTLISTED_URL = "http://localhost:85/web/submitschedule.pzx?ref=";
	const ZOOM_ID = "908 907 9055";
	const ZOOM_PASSWORD = "123456";
	const CONTACT_NUMBER = "+6281232700748";
	const CONTACT_PERSON = "Darren";
	const COMPANY_NAME = "AO Plus Pte. Ltd";
}

class MicrosoftOAuth{
	//Microsoft OAuth
	const ClientID = "53256e79-1622-4c4b-b0cb-78370a0418e9";
}