48 lines
1.6 KiB
Plaintext
48 lines
1.6 KiB
Plaintext
<?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;
|
|
|
|
// Uncomment (remove '//' for only one selection below)
|
|
//$fortune_command = '/usr/games/fortune -s -n 100'; // Debian
|
|
$fortune_command = '/usr/bin/fortune -s'; // BSD
|
|
|
|
/* 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($fortune_command . ' linux science debian perl linuxcookie cookie computers startrek math.fortunes');
|
|
} else if ($config_name == 'arts' || $config_name == 'interests') {
|
|
passthru($fortune_command . ' fortunes education people platitudes art magic wisdom tao cookie songs-poems work food miscellaneous literature pets science wisdom');
|
|
} else if ($config_name =='sport') {
|
|
passthru($fortune_command . ' sports');
|
|
} else {
|
|
passthru($fortune_command);
|
|
}
|
|
|
|
$motd = ob_get_contents();
|
|
$motd = htmlentities($motd);
|
|
ob_end_clean();
|
|
|
|
$nicole = date('i');
|
|
$ellen = rand(1,59);
|
|
|
|
if($nicole == $ellen - 1) {
|
|
$motd = "<center>*** YOU'RE A WINNER!!! Your next 30 days of service for half price! ***</center>";
|
|
}
|
|
|
|
if(isset($_COOKIE['mail_name'])) {
|
|
if($nicole == $ellen) {
|
|
$motd = '"' . $_COOKIE['mail_name'] . ' was here" -- ' . $_COOKIE['mail_name'];
|
|
}
|
|
}
|
|
}
|