Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add Glados file

  • Loading branch information...
commit a94356517387597f5814d5aaa786e2184bc42246 1 parent 4a0f217
@marksteward marksteward authored
View
3  etc/schema.sql
@@ -9,7 +9,8 @@ CREATE TABLE users (
subscription_period INTEGER NOT NULL DEFAULT 1,
hackney BOOLEAN NOT NULL DEFAULT 0,
nickname VARCHAR(255) UNIQUE,
- irc_nick VARCHAR(255) UNIQUE
+ irc_nick VARCHAR(255) UNIQUE,
+ gladosfile VARCHAR(255)
);
CREATE TABLE transactions (
View
2  london.hackspace.org.uk/carddb.php
@@ -5,6 +5,7 @@
select
u.id,
ifnull(u.nickname, u.full_name) nick,
+ u.gladosfile,
c.uid
from
cards c,
@@ -25,6 +26,7 @@
$lastid = $row['id'];
$sub = array(
'nick' => $row['nick'],
+ 'gladosfile' => $row['gladosfile'],
'perms' => array(),
'cards' => array()
);
View
13 london.hackspace.org.uk/members/cards.php
@@ -8,10 +8,11 @@
fURL::redirect('/login.php?forward=/members/cards.php');
}
-if (isset($_POST['update_nick'])) {
+if (isset($_POST['update_details'])) {
try {
fRequest::validateCSRFToken($_POST['token']);
$user->setNickname($_POST['nickname']);
+ $user->setGladosfile($_POST['gladosfile']);
$user->store();
fURL::redirect('?saved');
exit;
@@ -49,7 +50,7 @@
<h3>Your Authorised Cards</h3>
-<p>As a member, you may authorise your RFID card for 24/7 access to the space and equipment. You can also set a nickname to be announced to the space instead of your full name.</p>
+<p>As a member, you may authorise your RFID card for 24/7 access to the space and equipment. You can also set a nickname or audio file to be announced to the space instead of your full name.</p>
<p>Any 13.56 MHz device will work, including Oyster cards. The system will only read the unique identifier from it.</p>
@@ -80,11 +81,15 @@
<form method="POST">
<input type="hidden" name="token" value="<?=fRequest::generateCSRFToken()?>" />
- <input type="hidden" name="update_nick" value="" />
+ <input type="hidden" name="update_details" value="" />
<table>
<tr>
<td><label for="nickname">Nickname:</label></td>
- <td><input type="text" id="nickname" name="nickname" value="<?php echo $user->getNickname() ?>" /></td>
+ <td><input type="text" id="nickname" name="nickname" size="10" value="<?php echo $user->getNickname() ?>" /></td>
+ </tr>
+ <tr>
+ <td><label for="gladosfile">Glados file:</label></td>
+ <td><input type="text" id="gladosfile" name="gladosfile" size="20" value="<?php echo $user->getGladosfile() ?>" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit" value="Save" /></td>
Please sign in to comment.
Something went wrong with that request. Please try again.