W15 Kitchen Scheduler

“Eleanor & Zsofia”,
1 => “Catalin & Chatlin”,
2 => “Dima”,
3 => “Elyse & Jelena”,
4 => “Charlotte & Claire”,
5 => “Duncan & Osman”,
6 => “Agnes & Bisera”,
7 => “Adea & Maggie”,
8 => “Pirachula”
);

$start_date = “2014-02-03”;
$current_date = date(“Y-m-d”);

$days = sizeof(GetDays($start_date, $current_date))-1;
$current_guy = $days % 9;

$name = $people[$current_guy];
$tomorrow_name = $people[($current_guy+1) % 9];

// choose the cat
$cat_number = rand(0,1000) % 93;
$cat_address = “http://blog.berlin.bard.edu/cats/”.$cat_number.”.jpg”;

// send the e-mail

$headers[] = ‘From: Kitchen of 15 ‘;
$headers[] = ‘Content-type: text/html’;
$subject = “Kitchen Cleaners of the Day: “.$name;
$message =

Dear 15ers,

The residents that are responsible today for cleaning me are: ‘.$name.’

The residents that are responsible tomorrow are: ‘.$tomorrow_name.’

Please make sure that:
* the sinks are empty
* the counters and stove tops are clean
* the dishwashers are dishwashing
* the garbage bins are not on fire

Yours,
The Kitchen


Here is a cat: (*)


* If you are using Gmail, in order to see the cat, you need to select “Display Images” at the top of the e-mail.

** This is an automatic message.


;

if ($GLOBALS[‘double_bug’] == 0)
{
if (isset($_GET[‘curcubeu’]))
{
wp_mail(‘d.tsapkou@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘p.chulanon@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘z.hornyai@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘c.moise@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘c.helm@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘e.charles@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘j.barac@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘c.boccone@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘a.pohunkova@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘d.routh@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘o.chaudhry@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘a.sandstrom@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘b.djundeva@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘e.turrell@berlin.bard.edu>’, $subject, $message, $headers);
wp_mail(‘a.lennox@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘m.berke@berlin.bard.edu’, $subject, $message, $headers);
}
if (isset($_GET[‘test’]))
{
wp_mail(‘d.barbulescu@berlin.bard.edu’, $subject, $message, $headers);
}
}

echo $message;
?>

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.