K24 Kitchen Scheduler

“David”,
1 => “Sergey & Linda”,
2 => “Kristine & Dorothy”,
3 => “Maria & Dylan”,
4 => “Jack & Ben”,
5 => “Lysan & Aurelia”,
6 => “Nadia & Lucas”,
7 => “Shaoul & Niv”,
8 => “Ana & Veronica”
);

$start_date = “2014-02-02”;
$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 24 ‘;
$headers[] = ‘Content-type: text/html’;
$subject = “Kitchen Cleaners of the Day: “.$name;
$message =

Dear 24ers,

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

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

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_2’] == 0)
{
if (isset($_GET[‘curcubeu’]))
{
wp_mail(‘l.boshuijzen@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘a.cojocaru@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘n.shevchenko@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘s.sussman@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘n.segev@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘d.kretz@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘d.david@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘l.eggert@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘l.moeller@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘k.buus@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘v.marcinschi@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘m.androushko@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘j.lammert@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘a.valdessalazar@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘s.wolkow@berlin.bard.edu’, $subject, $message, $headers);
wp_mail(‘d.oneil@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.