<?php
require_once($_SERVER['DOCUMENT_ROOT']."/erm/base/userMgt.php");
require_once($_SERVER['DOCUMENT_ROOT']."/erm/config/config.php");

if($_REQUEST['service']== "login"){
echo json_encode( @login($_REQUEST['username'], $_REQUEST['password']));
}
if($_REQUEST['service']== "register"){
  echo json_encode( @createUser($_REQUEST['username'], $_REQUEST['fullName'], $_REQUEST['email'], $_REQUEST['tell'], $_REQUEST['userGroup'], $_REQUEST['possition'], $_REQUEST['status'], $_REQUEST['user']));
}


?>