<?php
namespace account;
require_once "verify_user_credentials.php";
require_once "verify_temporary_credentials.php";
require_once "add_temporary_account.php";
$GLOBALS["USERS_DIRECTORY"] = "users/";
$GLOBALS["COOKIE_LENGTH"] = "2592000";
$GLOBALS["COOKIE_PATH"] = "/";
$GLOBALS["TEMP_USERS_DIRECTORY"] = "_tmp/";
function get_user_path()
{
   $root = find_users_root();
   if (permanent_credentials_exist())
   {
      $name = $_COOKIE["name"];
      if (verify_user_credentials($name, null, $_COOKIE["hash"])->count() == 0)
      {
         renew_cookie("name");
         renew_cookie("hash");
         return $root . $name . "/";
      }
   }
   $id = null;
   if (temporary_credentials_exist())
   {
      $id = $_COOKIE["id"];
      if (!verify_temporary_credentials($id, $_COOKIE["code"]))
      {
         $id = null;
      }
      else
      {
         renew_cookie("id");
         renew_cookie("code");
      }
   }
   if (is_null($id))
   {
      $id = add_temporary_account();
   }
   return $root . $GLOBALS["TEMP_USERS_DIRECTORY"] . $id . "/";
}
function find_users_root()
{
   $path = $GLOBALS["USERS_DIRECTORY"];
   while (!is_dir($path))
   {
      $path = "../" . $path;
   }
   return $path;
}
function permanent_credentials_exist()
{
   $name = array_key_exists("name", $_COOKIE);
   $hash = array_key_exists("hash", $_COOKIE);
   return $name && $hash;
}
function renew_cookie($name)
{
   $expiration = time() + intval($GLOBALS["COOKIE_LENGTH"]);
   $path = $GLOBALS["COOKIE_PATH"];
   setcookie($name, $_COOKIE[$name], $expiration, $path);
}
function temporary_credentials_exist()
{
   $id = array_key_exists("id", $_COOKIE);
   $code = array_key_exists("code", $_COOKIE);
   return $id && $code;
}
function is_permanent_account($path)
{
   return !preg_match("/_tmp\/.+\/$/", $path);
}
function find_temp_users_root()
{
   $path = find_users_root() . $GLOBALS["TEMP_USERS_DIRECTORY"];
   if (!is_dir($path))
   {
      mkdir($path, 0770);
   }
   return $path;
}   
function build_user_path($name)
{
   return find_users_root() . "$name/";
}
<?php
namespace account;
require_once "Errors.php";
require_once "validate_submission.php";
require_once "get_user_path.php";
require_once "add_user_account.php";
require_once "add_user_cookie.php";
submit_change_password_request();
function submit_change_password_request()
{
   $name = $_GET["name"];
   $old_password = $_GET["old_pass"];
   $new_password = array($_GET["new_pass"], $_GET["new_pass_confirmation"]);
   $errors = verify_user_credentials($name, $old_password);
   validate_password($new_password, $errors);
   if ($errors->count() == 0)
   {
      store_password(build_user_path($name), $new_password[0]);
      add_user_cookie($name);
   }
   echo $errors;
}
<?php
namespace account;
require_once "user_exists.php";
require_once "validate_submission.php";
require_once "add_user_account.php";
require_once "add_user_cookie.php";
register_user();
function register_user()
{
   $username = $_GET["user"];
   $password = array($_GET["pass"], $_GET["repeat"]);
   $email_address = $_GET["email"];
   $errors = validate_submission($username, $password, $email_address);
   if ($errors->count() > 0)
   {
      echo $errors;
      return;
   }
   add_user_account($username, $password[0], $email_address);
   add_user_cookie($username);
}
EVR.include("account/form/forms/Forms.js");
EVR.include("account/form/input/Input.js");
EVR.include("account/form/error/Error.js");
EVR.Account.Form = function(container, title)
{
   this.container = container;
   this.title = title;
   this.focused = false;
   this.inputs = [];
   this.element = document.createElement("form");
   this.element.method = "post";
}
EVR.Account.Form.prototype.initialize = function()
{
   this.errors = new EVR.Account.Form.Error.Errors(this);
   this.add_title();
   this.add_listeners();
}   
EVR.Account.Form.prototype.append = function()
{
   this.container.appendChild(this.element);
}
EVR.Account.Form.prototype.add_title = function()
{
   var element = document.createElement("div");
   element.innerHTML = this.title;
   this.element.appendChild(element);
}
EVR.Account.Form.prototype.add_listeners = function()
{
   var current = this;
   this.element.onkeydown =
      function(event) {
	 var code = event ? event.keyCode : window.event.keyCode;
	 if (code == 13)
	 {
	    current.respond();
	    return false;
	 }
      };
   this.element.onsubmit = function() { return false };
}
EVR.Account.Form.prototype.add_input = function(name, value, type)
{
   if (type == null)
   {
      type = "text";
   }
   var input = new EVR.Account.Form.Input(this, value, type);
   input.append();
   this.inputs[name] = input;
   return input;
}
EVR.Account.Form.prototype.neutralize = function()
{
   var inputs = this.inputs;
   for (name in inputs)
   {
      inputs[name].set_background(FORM_NEUTRAL_COLOR);
   }
}
EVR.Account.Form.prototype.build_query = function()
{
   var inputs = this.inputs;
   var value, query = "";
   for (name in inputs)
   {
      value = encodeURIComponent(inputs[name].get_value());
      query += name + "=" + value + "&";
   }
   return query;
}
EVR.Account.Form.prototype.clear_errors = function()
{
   this.errors.clear();
   this.neutralize();
}   
EVR.Account.Form.prototype.add_error = function(message, affected)
{
   if (typeof(affected) == "string")
   {
      affected = [affected];
   }
   this.errors.add_error(message, affected);
}
EVR.Account.Form.prototype.display_errors = function()
{
   this.errors.display();
}
EVR.Account.Form.prototype.reset = function()
{
   var input, inputs = this.inputs;
   for (name in inputs)
   {
      input = inputs[name];
      input.set_value("");
      input.swap();
   }
   this.clear_errors();
}
216.73.216.62
216.73.216.62
216.73.216.62
 
December 3, 2013

Where in the mind's prism does light shine, inward, outward, or backward, and where in a plane does it intersect, experientially and literally, while possessing itself in a dripping wet phantasm?


Fig 1.1 What happens after you turn on a video game and before it appears?

The taxonomy of fun contains the difference between gasps of desperation and exaltation, simultaneously identical and opposite; one inspires you to have sex, while the other to ejaculate perpetually. A destruction and its procession are effervescent, while free play is an inseminated shimmer hatching inside you. Unlikely to be resolved, however, in such a way, are the climaxes of transitions between isolated, consecutive game states.

You walk through a door or long-jump face first (your face, not Mario's) into a painting. A moment passes for eternity, viscerally fading from your ego, corpus, chakra, gaia, the basis of your soul. It happens when you kill too, and especially when you precisely maim or obliterate something. It's a reason to live, a replicating stasis.


Fig 1.2 Sequence in a video game

Video games are death reanimated. You recurse through the underworld toward an illusion. Everything in a decision and logic attaches permanently to your fingerprint. At the core, you use its energy to soar, comatose, back into the biosphere, possibly because the formal structure of a mind by human standards is useful in the next world.