Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#795694
The system language is defined as SYS_LANG, the workspace is SYS_SYS and the skin is SYS_SKIN.
Code: Select all
For example:
if (SYS_LANG == 'en')
   $label = 'system';
elseif (SYS_LANG == 'pt-BR')
    $label = 'sistema';
else
    $label = 'sístemn'; 
A lot of information is also stored in the $_SESSION variable such as $_SESSION['USER_LOGGED'] and $_SESSION['USR_USERNAME']. If this info doesn't exist in the session variable, then you need to redirect back to the login screen because the login session has expired:
Code: Select all
if (!isset($_SESSION['USER_LOGGED'])) {
   header("Location:../login/login");
}
Here is a var_dump of the $_SESSION variable when a case is open. (Note: You probably won't have all this info available in a plugin since cases normally aren't open.):
Code: Select all
array(26) {
  ["__EE_INSTALLATION__"]=>
  int(28)
  ["__EE_SW_PMLICENSEMANAGER__"]=>
  int(1)
  ["phpLastFileFound"]=>
  string(117) "/sysworkflow/en/neoclassic/cases/cases_Step?UID=28383180359c1cb92a268b0050730493&TYPE=DYNAFORM&POSITION=1&ACTION=EDIT"
  ["USERNAME_PREVIOUS1"]=>
  string(0) ""
  ["USERNAME_PREVIOUS2"]=>
  string(5) "admin"
  ["WORKSPACE"]=>
  string(8) "workflow"
  ["USER_LOGGED"]=>
  string(32) "00000000000000000000000000000001"
  ["USR_USERNAME"]=>
  string(5) "admin"
  ["USR_TIME_ZONE"]=>
  string(16) "America/New_York"
  ["USR_FULLNAME"]=>
  string(19) "Administrator admin"
  ["user_experience"]=>
  string(6) "NORMAL"
  ["currentSkin"]=>
  string(10) "neoclassic"
  ["currentSkinVariant"]=>
  string(5) "extJs"
  ["CONDITION_DYN_UID"]=>
  string(0) ""
  ["current_ux"]=>
  string(6) "NORMAL"
  ["__currentTabDashboard"]=>
  string(9) "startCase"
  ["TASK"]=>
  string(32) "53921958759c0a033465d50018382783"
  ["BREAKSTEP"]=>
  array(1) {
    ["NEXT_STEP"]=>
    array(4) {
      ["TYPE"]=>
      string(8) "DYNAFORM"
      ["UID"]=>
      string(32) "28383180359c1cb92a268b0050730493"
      ["POSITION"]=>
      int(1)
      ["PAGE"]=>
      string(70) "open?APP_UID=14257425359c5bc04b81ab7003066784&DEL_INDEX=1&action=draft"
    }
  }
  ["CURRENT_TASK"]=>
  string(32) "53921958759c0a033465d50018382783"
  ["APPLICATION"]=>
  string(32) "14257425359c5bc04b81ab7003066784"
  ["INDEX"]=>
  string(1) "1"
  ["PROCESS"]=>
  string(32) "12101699559c09ffaca1697013185037"
  ["STEP_POSITION"]=>
  int(1)
  ["TRIGGER_DEBUG"]=>
  array(8) {
    ["ISSET"]=>
    int(1)
    ["ERRORS"]=>
    array(0) {
    }
    ["DATA"]=>
    array(0) {
    }
    ["TRIGGERS_NAMES"]=>
    array(1) {
      [0]=>
      string(10) "test group"
    }
    ["TRIGGERS_VALUES"]=>
    array(1) {
      [0]=>
      array(5) {
        ["TRI_UID"]=>
        string(32) "78366778159c1d89be29be0023456094"
        ["TRI_TITLE"]=>
        string(10) "test group"
        ["ST_CONDITION"]=>
        string(0) ""
        ["TRI_TYPE"]=>
        string(6) "SCRIPT"
        ["TRI_WEBBOT"]=>
        string(0) ""
      }
    }
    ["TRIGGERS_EXECUTION_TIME"]=>
    array(0) {
    }
    ["NUM_TRIGGERS"]=>
    int(1)
    ["TIME"]=>
    string(6) "BEFORE"
  }
  ["PMDEBUGGER"]=>
  bool(true)
  ["_CODE_"]=>
  string(0) " "
}

If a case is open then you will also have $_SESSION['APPLICATION'] and $_SESSION['APPLICATION']

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]