return; } //if (!$return) { //Invalid Username or Password if (!$_SESSION["wa_current_user"]->logged) { //Invalid Username or Password $error = "Invalid Username or Password!!!"; $resp = array("success" => false, "message" => $error); echo Zend_Json::encode($resp); } else { $arrObj = array(); switch ($method) { case 'get_all_account': $resp = get_all_account($param1, $pgIndex, $recordPerPage); break; case 'get_account_by_id': $resp = get_account_by_id($param1); break; case 'get_all_contact': $resp = get_all_contact($param1, $param2, $param3, $pgIndex, $recordPerPage); break; case 'get_contact_by_account': $resp = get_contact_by_account($param1, $param2, $param3, $pgIndex, $recordPerPage); break; case 'get_contact_by_id': $resp = get_contact_by_id($param1); break; case 'get_person_by_account': $resp = get_person_by_account($param1, $param2, $param3); break; case 'get_all_supplier': $resp = get_all_suppliers($param1, $pgIndex, $recordPerPage);
function get_account_techlevel($account_id = 0) { $role = \Zotlabs\Lib\System::get_server_role(); if ($role == 'basic') { return 0; } if ($role == 'standard') { return 5; } if (!$account_id) { $x = \App::get_account(); } else { $x = get_account_by_id($account_id); } return $x ? intval($x['account_level']) : 0; }