Exemplo n.º 1
0
 /**
  * Get unit data for current user
  *
  * @author 
  **/
 function get_data()
 {
     $out = array();
     // Initiate session
     $this->authorized();
     if (isset($_SESSION['business_unit'])) {
         // Get data for this unit
         $unit = new Business_unit();
         $out = $unit->all($_SESSION['business_unit']);
     }
     $obj = new View();
     $obj->view('json', array('msg' => $out));
 }
Exemplo n.º 2
0
 /**
  * Return BU data for unitid or all units if unitid is empty
  *
  * @return void
  * @author
  **/
 function get_bu_data($unitid = "")
 {
     $obj = new View();
     $bu = new Business_unit();
     $obj->view('json', array('msg' => $bu->all($unitid)));
 }