<?php
namespace entities\evr\security;

class Addresses
{
   public function __construct($user)
   {
      $this->user = $user;
      $this->set_path();
   }
   private function set_path()
   {
      $user = $this->user;
      $root = $GLOBALS["USERS_PATH"];
      $this->path = "$root/$user/" . $GLOBALS["USER_ADDRESSES_PATH"];
   }
   public function add_current()
   {
      if (!$this->find_current_address())
      {
         $entry = $_SERVER["REMOTE_ADDR"] . " " . time() . "\n";
         file_put_contents($this->path, $entry, FILE_APPEND);
      }
   }
   public function find_current_address()
   {
      foreach ($this->get() as $entry)
      {
         if ($_SERVER["REMOTE_ADDR"] == $this->extract($entry))
         {
            return true;
         }
      }
      return false;
   }
   private function get()
   {
      return file($this->path);
   }
   private function extract($entry)
   {
      $fields = explode(" ", $entry);
      return $fields[0];
   }
}
<?php
namespace entities\evr\security;

class Join_Beta_Mail extends Mail
{
   public function __construct($sender)
   {
      parent::__construct(
         $GLOBALS["BETA_RECIPIENT"], $sender, $GLOBALS["BETA_SUBJECT"]);
   }
   protected function build_message()
   {
      return $this->sender;
   }
}
<?php
namespace entities\evr\security\display;
use \entities\html as html;

class Alerts extends html\Div
{
   public function __construct()
   {
      parent::__construct("alerts");
   }
   protected function build_content()
   {
      $markup = $this->build_alert("boost", $GLOBALS["BOOST_ALERT"]);
      $markup .= $this->build_alert("sound", $GLOBALS["SOUND_ALERT"]);
      $markup .= $this->build_alert("fullscreen", $GLOBALS["FULLSCREEN_ALERT"]);
      return $markup;
   }
   private function build_alert($id, $text)
   {
      return new html\Div($id, null, $text);
   }
}
<?php
namespace entities\evr\security\display;
use \entities\html as html;

class Home extends html\Div
{
   protected function build_content()
   {
      $markup = new Header();
      $markup .= new forms\Login();
      $markup .= new Links();
      $markup .= new forms\Activate();
      $markup .= new Alerts();
      $markup .= new Beta_Invitation();
      $markup .= new \entities\evr\Trailer();
      $markup .= new Thumbs();
      return $markup;
   }
}
<?php
namespace entities\evr\security\display;
use \entities\html as html;

class Header extends html\Div
{
   public function __construct()
   {
      parent::__construct("header", null, $GLOBALS["HEADER"]);
   }
}
<?php
namespace entities\evr\security\display;
use \entities\html as html;

class Beta_Invitation extends html\Div
{
   public function __construct()
   {
      parent::__construct("invitation");
   }
   protected function build_content()
   {
      $markup = $this->build_heading();
      $markup .= file_get_contents(dirname(__FILE__) . "/invitation");
      $markup .= new forms\Join_Beta();
      return $markup;
   }
   private function build_heading()
   {
      $text = $GLOBALS["BETA_INVITATION_HEADING"];
      return new html\Div("heading", null, $text);
   }
}
<?php
namespace entities\evr\security\display;
use entities\html as html;

class Links extends html\Div
{
   public function __construct()
   {
      parent::__construct("links");
   }
   protected function build_content()
   {
      $markup = new html\A("?change", "change password", null, "password");
      $markup .= new html\A("?reset", "reset password", null, "password");
      return $markup;
   }
}
<?php
namespace entities\evr\security\display;
use \entities\html as html;

class Thumbs extends html\Div
{
   protected function build_content()
   {
      $markup = "";
      $directory = $GLOBALS["THUMBNAILS_PATH"];
      foreach (scandir($directory) as $file)
      {
         if ($file[0] != ".")
         {
            $path = $directory . $file;
            $markup .= new html\Image($path, null, "thumb");
         }
      }
      return $markup;
   }
}
<?php
namespace entities\evr\security\display\forms;
use \entities\html as html;

class Join_Beta extends html\Form
{
   protected function build_content()
   {
      $markup = new html\Input("email", "text", "email address", null, true);
      $markup .= $this->build_button();
      return $markup;
   }
   private function build_button()
   {
      $text = $GLOBALS["JOIN_BETA_BUTTON_TEXT"];
      return new html\Input("action", "submit", $text);
   }
}
18.117.228.247
18.117.228.247
18.117.228.247
 
September 30, 2015


Edge of Life is a form I made with Babycastles and Mouth Arcade for an event in New York called Internet Yami-ichi, a flea market of internet-ish goods. We set up our table to look like a doctor's office and pharmacy and offered free examinations and medication prescriptions, a system described by one person as "a whole pharmacy and medical industrial complex".

Diagnoses were based on responses to the form and observations by our doctor during a short examination. The examination typically involved bizarre questions, toy torpedoes being thrown at people and a plastic bucket over the patient's head. The form combined ideas from Myers-Briggs Type Indicators, Codex Seraphinianus and chain-mail personality tests that tell you which TV show character you are. In our waiting room, we had Lake of Roaches installed in a stuffed bat (GIRP bat). It was really fun!

The icons for the food pyramid are from Maple Story and the gun icons are from the dingbat font Outgunned. I'm also using Outgunned to generate the items in Food Spring.