customer_key != FREE_USER) { if (! file_exists ($settings->keygen_path)) { echo '

'; echo __('Keygen file does not exists'); echo '

'; return ''; } if (! is_executable ($settings->keygen_path)) { echo '

'; echo __('Keygen file is not executable'); echo '

'; return ''; } global $config; $user_key = exec (escapeshellcmd ($settings->keygen_path. ' '.$settings->customer_key.' '.$config['dbhost']. ' '.$config['dbuser'].' '.$config['dbpass']. ' '.$config['dbname'])); return $user_key; } /* Free users. We only want to know this for statistics records. Feel free to disable this extension if you want. */ global $build_version; global $pandora_version; 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); 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); 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); break; } $user_key = array ('A' => $n, 'M' => $m, 'B' => $build_version, 'P' => $pandora_version); return json_encode ($user_key); } flush (); ?>