~ubuntu-branches/ubuntu/hardy/squirrelmail/hardy-updates

« back to all changes in this revision

Viewing changes to plugins/fortune/setup.php

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst
  • Date: 2006-08-11 13:53:20 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060811135320-a54q8uf2ncuwc5es
Tags: 2:1.4.8-1
* New upstream release
  - Includes security fix: variable overwriting in compose.php
    by logged-in user [CVE-2006-4019]
  - Does not ship SquirrelMail developer's documentation anymore.

* Remove duplicate content from README.locales.
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 *
11
11
 * @copyright (c) 1999-2006 The SquirrelMail Project Team
12
12
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
13
 
 * @version $Id: setup.php,v 1.5.2.10 2006/02/03 22:27:52 jervfors Exp $
 
13
 * @version $Id: setup.php,v 1.5.2.11 2006/07/07 13:16:41 tokul Exp $
14
14
 * @package plugins
15
15
 * @subpackage fortune
16
16
 *
44
44
    }
45
45
 
46
46
    $fortune_location = '/usr/games/fortune';
47
 
    $exist = file_exists($fortune_location);
 
47
    $exist = is_file($fortune_location);
48
48
    echo "<center><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"$color[10]\">\n".
49
49
        "<tr><td><table width=\"100%\" cellpadding=\"2\" cellspacing=\"1\" border=\"0\" bgcolor=\"$color[5]\">\n".
50
50
        "<tr><td align=\"center\">\n";
52
52
    if (!$exist) {
53
53
        printf(_("%s is not found."),$fortune_location);
54
54
    } else {
 
55
        // display only short fortune cookies
 
56
        $fortune_command = $fortune_location . ' -s';
55
57
        echo '<center><em>' . _("Today's Fortune") . '</em></center><br /><pre>' .
56
 
            htmlspecialchars(shell_exec($fortune_location)) .
 
58
            htmlspecialchars(shell_exec($fortune_command)) .
57
59
            '</pre>';
58
60
    }
59
61