rocksolid-light/Rocksolid_Light/rslight/fortunes.conf

30 lines
1.1 KiB
Plaintext
Raw Normal View History

<?php
/* This file is an example. Modify to match your system
* The fortunes package must be installed for this to work
* $enable_fortunes will enable or disable display of 'fortunes' in the header
*/
$enable_fortunes = true;
/* Creating a file: $config_dir.'/motd.txt' will override fortunes and display the file contents. */
if($enable_fortunes == true) {
ob_start();
if(!isset($config_name)) {
$config_name = null;
}
if($config_name == 'computers' || $config_name == 'programming') {
passthru('/usr/games/fortune -s -n 100 linux science debian perl linuxcookie cookie computers startrek math.fortunes');
} else if ($config_name == 'arts' || $config_name == 'interests') {
passthru('/usr/games/fortune -s -n 100 fortunes education people platitudes art magic wisdom tao cookie songs-poems work food miscellaneous literature pets science wisdom');
} else if ($config_name =='sport') {
passthru('/usr/games/fortune -s -n 100 sports');
} else {
passthru('/usr/games/fortune -s -n 100');
}
$motd = ob_get_contents();
$motd = htmlentities($motd);
ob_end_clean();
}