customer_key; switch ($config['dbtype']) { case 'mysql': $n = (int) db_get_value ('COUNT(`id_agente`)', 'tagente', 'disabled', 0); $m = (int) db_get_value ('COUNT(`id_agente_modulo`)', 'tagente_modulo', 'disabled', 0); $u = (int) db_get_value ('MAX(UNIX_TIMESTAMP()-UNIX_TIMESTAMP(keepalive))', 'tserver'); break; case 'postgresql': $n = (int) db_get_value ('COUNT("id_agente")', 'tagente', 'disabled', 0); $m = (int) db_get_value ('COUNT("id_agente_modulo")', 'tagente_modulo', 'disabled', 0); $u = (int) db_get_value ('MAX(UNIX_TIMESTAMP()-UNIX_TIMESTAMP(keepalive))', 'tserver'); break; case 'oracle': $n = (int) db_get_value ('COUNT(id_agente)', 'tagente', 'disabled', 0); $m = (int) db_get_value ('COUNT(id_agente_modulo)', 'tagente_modulo', 'disabled', 0); $u = (int) db_get_value ('MAX(UNIX_TIMESTAMP()-UNIX_TIMESTAMP(keepalive))', 'tserver'); break; } $user_key = array ('S' => $s, 'A' => $n, 'U' => $u, 'M' => $m, 'B' => $build_version, 'P' => $pandora_version); return json_encode ($user_key); } flush (); ?>