-
- echo "<center><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"$color[10]\">\n".
- "<tr><td><table width=\"100%\" cellpadding=\"2\" cellspacing=\"1\" border=\"0\" bgcolor=\"$color[5]\">\n".
- "<tr><td align=\"center\">\n";
- echo '<table><tr><td>';
- if (!$exist) {
- printf(_("%s is not found."),$fortune_location);
- } else {
- echo "<center><em>" . _("Today's Fortune") . "</em></center><pre>\n" .
- htmlspecialchars(shell_exec($fortune_command)) .
- "</pre>\n";
+ /* if pclose return != 0, popen command failed. Yes, I know that it is broken when --enable-sigchild is used */
+ if (pclose($handle)) {
+ // i18n: %s shows executed fortune cookie command.
+ $fortune = sprintf(_("Unable to execute \"%s\"."),$fortune_command);