コード例 #1
0
ファイル: execute.php プロジェクト: jstockwin/Film-Night
  <br>
  <p>Best wishes,<br>The HiveBot&trade;</p>
  </body>
  ';
    mail($to, "Film Night Attendance", $message, "Content-type:text/html");
    $webPush = new WebPush(array('GCM' => $push_api));
    $endpoints = get_endpoints("Roll_Call_Start");
    // send multiple notifications
    foreach ($endpoints as $endpoint) {
        $webPush->sendNotification($endpoint['Endpoint']);
    }
    $webPush->flush();
}
if (in_array("Roll_Call_End", $events)) {
    // Select films:
    selectFilms();
}
if (in_array("Voting_Start", $events)) {
    // Email users:
    $to = get_emails("Voting_Start");
    $message = '
  <html>
  <body>
  <p>Dear HiveMember,</p>
  <br>
  <p>Please <a href="https://films.jakestockwin.co.uk/voting.php">click here</a> to vote for this week&apos;s film night.</p>
  <br>
  <p>Best wishes,<br>The HiveBot&trade;</p>
  </body>
  ';
    mail($to, "Film Night Voting", $message, "Content-type:text/html");
コード例 #2
0
ファイル: selectfilms.php プロジェクト: jstockwin/Film-Night
<?php

include "../setup.php";
$whitelist = array('127.0.0.1', '178.62.48.243', '::1');
if (!in_array($_SERVER['REMOTE_ADDR'], $whitelist)) {
    die('Only the server may access this page.');
}
echo selectFilms();