Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • osian/sucs-site
  • kais58/sucs-site
  • imranh/sucs-site
  • foshjedi2004/sucs-site
  • gigosaurus/sucs-site
  • matstn/sucs-site
  • ripp_/sucs-site
  • eggnog/sucs-site
  • sucssite/sucs-site
  • elbows/sucs-site
  • realitykiller/sucs-site
  • crox/sucs-site
  • vectre/sucs-site
  • welshbyte/sucs-site
  • paperclipman/sucs-site
15 results
Show changes
Commits on Source (38)
Showing with 281 additions and 160 deletions
......@@ -11,10 +11,11 @@ stages:
php-syntax-check:
stage: test
image: php:7.0-cli-jessie
script:
- apt-get clean
- apt-get update
- apt-get install -y php-cli
# - apt-get clean
# - apt-get update
# - apt-get install -y php-cli
- php -l htdocs/index.php
- find components -name *.php | xargs -n 1 php -l
- find plugins -name *.php | xargs -n 1 php -l
......@@ -22,29 +23,29 @@ php-syntax-check:
js-syntax-check:
stage: test
image:
name: node:16
#entrypoint: ["/bin/bash", "-c"]
script:
- apt-get clean
- apt-get update
# - apt-get install -y nodejs
# - ln -s /usr/bin/nodejs /usr/bin/node
- apt-get install -y curl gnupg
- curl -sL https://deb.nodesource.com/setup_8.x | bash -
- apt-get install -y nodejs
- npm install -g jshint
- find htdocs/js/ -name *.js ! -name jquery* | xargs -n 1 jshint --verbose
fake-deploy-beta:
deploy-beta:
stage: deploy
script:
- echo "Hello World!"
- apt update
- apt install -y curl
- curl https://beta.sucs.org/pull.php
only:
- beta
environment: beta
fake-deploy-live:
deploy-live:
stage: deploy
script:
- echo "Hello World!"
- apt update
- apt install -y curl
- curl https://sucs.org/pull.php
only:
- sucs-site
environment: live
\ No newline at end of file
environment: live
......@@ -3,16 +3,22 @@ $motd_file = "/etc/motd";
function decode_entities($text, $quote_style = ENT_COMPAT)
{
if (function_exists('html_entity_decode')) {
$text = html_entity_decode($text, $quote_style, 'ISO-8859-1'); // NOTE: UTF-8 does not work!
} else {
$trans_tbl = get_html_translation_table(HTML_ENTITIES, $quote_style);
$trans_tbl = array_flip($trans_tbl);
$text = strtr($text, $trans_tbl);
}
$text = html_entity_decode($text, $quote_style, 'ISO-8859-1'); // NOTE: UTF-8 does not work!
$text = preg_replace('~&ndash\;~i', '-', $text);
$text = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $text);
$text = preg_replace('~&#([0-9]+);~e', 'chr("\\1")', $text);
$text = preg_replace_callback('~&#x([0-9a-f]+);~i',
function ($matches) {
foreach ($matches as $match) {
return chr(hexdec($match));
}
},
$text);
$text = preg_replace_callback('~&#([0-9]+);~',
function ($matches) {
foreach ($matches as $match) {
return chr($match);
}
},
$text);
return $text;
}
......@@ -52,7 +58,12 @@ for ($i = count($news) - 1; $i > -1; $i--) {
$body = str_replace("…", "...", $body);
$body = str_replace("'", "'", $body);
// remove hyperlinks, collect to display later
$body = preg_replace(":<a href=['\"](.+?)['\"].*?>(.*?)</a>:e", "'\\2['.linkcounter('\\1').']'", $body);
$body = preg_replace_callback(":<a href=['\"](.+?)['\"].*?>(.*?)</a>:",
function ($matches) {
$i = linkcounter($matches[1]);
return $matches[0]."[".$i."]";
},
$body);
$body = strip_tags($body);
$body = decode_entities($body);
$body = wordwrap($body, 75, "\n ", 1);
......@@ -76,9 +87,11 @@ for ($i = count($news) - 1; $i > -1; $i--) {
}
$motd .= "---------------------------- [ http://sucs.org/ ] -----------------------------\n";
//print($motd);
//if (time()-filemtime($motd_file) < 86000 && $poemmode == 1) { //86000 to allow a little slack depending on when cron runs
// print "MOTD too recent to replace with a poem!\n";
//} else {
file_put_contents($motd_file, $motd);
//}
?>
?>
\ No newline at end of file
......@@ -4,9 +4,9 @@ require("/var/www/sucssite/htdocs/settings.php");
require("/usr/share/php/adodb/adodb.inc.php");
$dbname = 'sucssite';
$dbuser = 'apache';
$dbuser = 'sucs_site_user';
$DB = NewADOConnection('postgres8');
$DB = NewADOConnection('postgres9');
$DB->Connect('dbname=' . $dbname . ' user=' . $dbuser);
$DB->SetCharSet('utf8');
$DB->SetFetchMode(ADODB_FETCH_ASSOC);
......
......@@ -5,6 +5,8 @@ require_once("../lib/validation.php");
require_once("Net/MAC.php");
include_once("../lib/date.php");
// password hash, renewal functions
include_once("../lib/member_functions.php");
// Some Constants
// These could possibly be moved somewhere saner?
......@@ -47,7 +49,7 @@ function changePassword($oldpass, $newpass1, $newpass2)
// if everything looks OK, attempt to make the change
$success = ldap_mod_replace($ldap, "uid=" . $session->username . ",ou=People,dc=sucs,dc=org",
array('userpassword' => "{SHA}" . base64_encode(pack("H*", sha1($newpass1)))));
array('userpassword' => "{CRYPT}" . cryptPassword($newpass1)));
ldap_close($ldap);
return $success;
......@@ -214,7 +216,6 @@ function updateRenew()
return FALSE;
}
include_once("../lib/member_functions.php");
renew_membership($member['username']);
$sucsDB->Execute("update signup set activated=NOW(), username=? where id=?", array($member['username'], $signup['id']));
return TRUE;
......
......@@ -98,7 +98,7 @@ $res->Close();
//get the number of pages printed by "old" users and add it to the total
$res = $sucsDB->Execute("select sum(pages) as pages from printer where username = 'old' group by username order by sum(pages) desc");
$old = $res->FetchRow();
$old = $old[0];
$old = $old['pages'];
$res->Close();
$total += $old;
//Output two lines at the bottem of the table, one for "old" users and the other for the total
......
<!DOCTYPE html>
<html lang="en">
<head>
<title>SUCS 3 Step Signup</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="plaster-files/css/3step.css">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</head>
<body>
<div class="jumbotron jumbotron-fluid text-center">
<!--h1>Swansea University Computer Society</h1-->
<img src="https://sucs.org/~imranh/img/sucslogo_trans_white.png"/>
<!--p>1. Pay, 2. Create, 3. Enjoy</p-->
</div>
<div class="container text-center">
<div class="row d-flex justify-content-center">
<div class="col-8">
<div class="card mb-4">
<div class="card-body">
<h4 class="card-title">💳</h4>
<p class="card-text">1. Pay for membership</p>
<a href="https://sucs.org/join" target="_blank" rel="noopener noreferrer" class="btn btn-primary">Pay Online</a>
</div>
</div>
</div>
</div>
<div class="row d-flex justify-content-center">
<div class="col-8">
<div class="card mb-4">
<div class="card-body">
<h5 class="card-title">👤</h5>
<p class="card-text">2. Create your username</p>
<a href="https://sucs.org/susignup" target="_blank" rel="noopener noreferrer" class="btn btn-primary">Create Username</a>
</div>
</div>
</div>
</div>
<div class="row d-flex justify-content-center">
<div class="col-8">
<div class="card mb-4">
<div class="card-body">
<h5 class="card-title">💬</h5>
<p class="card-text">3. Join the conversation</p>
<a href="https://chat.sucs.org" target="_blank" rel="noopener noreferrer" class="btn btn-primary">Join Discord</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
.jumbotron {
background-image: linear-gradient(to bottom left, #FA0, #f60);
}
.jumbotron img {
width: auto;
height: auto;
max-height: 12em;
}
h1 {
color: #fff;
font-weight: bold;
}
.btn-primary {
background-color: #f60;
border-color: #f60;
}
.btn-primary:hover {
background-color: #f80;
border-color: #f80;
}
\ No newline at end of file
<?php
exec("cd ..; git reset --hard HEAD; git pull", $retArr, $retVal);
if ($retVal == 0) {
print("ok");
exit(0);
}
print("not ok\n");
var_dump($retArr);
var_dump($retVal);
?>
\ No newline at end of file
......@@ -12,7 +12,7 @@ will return "nope" if the user/pass passed is inavlid
Example usage:
include_once("ldap-auth.php");
require "ldap-auth.php";
isAuthd = ldapAuth("usaername", "password");
......@@ -29,6 +29,8 @@ if (isAuthd == "sucs"){
// we don't care about warnings, we write our own
error_reporting(E_ERROR | E_PARSE);
define(LDAP_OPT_DIAGNOSTIC_MESSAGE, 0x0032);
function ldapAuth($username, $password)
{
......@@ -45,24 +47,29 @@ function ldapAuth($username, $password)
$username = implode("@", $s);
}
// filter out everything but A-Z a-z 0-9 . - _ from username
$safeusername = preg_replace("/[^A-Za-z0-9\.\-\_]/", '', $username);
// if safeusername isn't the same as username just error out
if ($safeusername != $username) {
return "nope";
}
// ldap servers
$sucsLDAPServer = 'silver.sucs.swan.ac.uk';
$lisLDAPServer = 'ccs-suld1.swan.ac.uk';
// lis auth stuffs
$lisUsernameOu = substr($username, -1);
$lisOtherOu = "Moved";
$issLDAPServer = '192.168.10.16';
// how to bind
$sucsBindDn = "uid=$username,ou=People,dc=sucs,dc=org";
$lisBindDn1 = "cn=$username,ou=$lisUsernameOu,ou=Students,ou=SWANSEA,o=SWANUNI";
$lisBindDn2 = "cn=$username,ou=$lisOtherOu,ou=Students,ou=SWANSEA,o=SWANUNI";
$sucsBindDn = "uid=$safeusername,ou=People,dc=sucs,dc=org";
$issBindDn = "cn=$safeusername,ou=Students,ou=Active,ou=Resources,o=Swansea";
// Main auth
// Try and connect to silver
$ldapconnSUCS = ldap_connect($sucsLDAPServer) or die("Could not connect to SUCS LDAP server.");
ldap_set_option($ldapconnSUCS,LDAP_OPT_PROTOCOL_VERSION,3);
if ($ldapconnSUCS) {
//echo "Connected to $sucsLDAPServer <br>";
......@@ -73,28 +80,28 @@ function ldapAuth($username, $password)
if ($ldapbindSUCS) {
//echo "Auth'd as $username using SUCS LDAP<br>";
return "sucs";
// turns out they didn't give us valid sucs creds, lets try lis now
// turns out they didn't give us valid sucs creds, lets try iss now
} else {
// try and connect to the lis ldap server
$ldapconnLIS = ldap_connect($lisLDAPServer) or die("Could not connect to uni LDAP server.");
//echo "Connected to $lisLDAPServer <br>";
// try and connect to the iss ldap server
$ldapconnISS = ldap_connect($issLDAPServer) or die("Could not connect to uni LDAP server.");
// echo "Connected to $issLDAPServer <br>";
ldap_set_option($ldapconnISS,LDAP_OPT_PROTOCOL_VERSION,3);
// lets try and bind to the uni ldap
$ldapbindLIS1 = ldap_bind($ldapconnLIS, $lisBindDn1, $password);
if ($ldapbindLIS1) {
//echo "Auth'd as $username using uni LDAP using ou=$lisUsernameOu<br>";
$ldapbindiss = ldap_bind($ldapconnISS, $issBindDn, $password);
/*if (ldap_get_option($ldapconnISS, LDAP_OPT_DIAGNOSTIC_MESSAGE, $extended_error)) {
echo "Error Binding to LDAP: $extended_error";
}*/
if ($ldapbindiss) {
//echo "Auth'd as $username using uni LDAP using ou=$issUsernameOu<br>";
return "uni";
} else {
$ldapbindLIS2 = ldap_bind($ldapconnLIS, $lisBindDn2, $password);
if ($ldapbindLIS2) {
//echo "Auth'd as $username using uni LDAP using ou=moved<br>";
return "uni";
// shit, couldn't bind to anything
} else {
//exit("Invalid Username or Password");
return "nope";
}
//exit("Invalid Username or Password");
return "nope";
}
}
}
......
......@@ -29,6 +29,19 @@ function make_password($length = 8)
return $password;
}
// https://stackoverflow.com/a/44428794
function cryptPassword($password, $salt = "", $rounds = 5000)
{
if ($salt == "") {
// Generate random salt
$salt = substr(bin2hex(openssl_random_pseudo_bytes(16)),0,16);
}
// $6$ specifies SHA512
$hash = crypt($password, sprintf('$6$rounds=%d$%s$', $rounds, $salt));
return $hash;
}
function generateUid()
{
......@@ -63,7 +76,7 @@ function generateLdif($uid, $password, $type, $realname, $username)
// explode the realname
$nameexplode = explode(' ', trim($realname));
// hash the password
$ldappassword = "{SHA}" . base64_encode(pack("H*", sha1($password)));
$ldappassword = "{CRYPT}" . cryptPassword($password);
// compile ldif
$ldif = "dn: uid=" . $username . ",ou=People,dc=sucs,dc=org\n";
$ldif .= "uid: " . $username . "\n";
......
......@@ -116,7 +116,15 @@ class Session
// Is this a login attempt ?
if ($submit != '' && $session_user != '' && $session_pass != '') {
$this->session_init($session_user, $session_pass);
// filter out everything but A-Z a-z 0-9 . - _ from username
$safeusername = preg_replace("/[^A-Za-z0-9\.\-\_]/", '', $session_user);
if ($safeusername != $session_user) {
trigger_error("Invalid username", E_USER_NOTICE);
$this->newsession();
return;
} elseif ($safeusername == $session_user) {
$this->session_init($safeusername, $session_pass);
}
}
// Retrieve session information
......
......@@ -125,7 +125,7 @@ function validSID($SID, $override)
return true;
}
} else {
if (!preg_match("/^[0-9]*$/", $SID) || strlen($SID) != 6) {
if (!preg_match("/^[0-9]{6,}$/", $SID)) {
$error = "Invalid student ID";
return false;
} elseif (sidUsed($SID)) {
......
......@@ -3,6 +3,7 @@
function lookupSID($sid)
{
$ds = ldap_connect("192.168.10.16");
ldap_set_option($ds, LDAP_OPT_NETWORK_TIMEOUT, 10); /* 10 second timeout */
ldap_bind($ds);
$sr = ldap_search($ds, "ou=Active,ou=Resources,o=Swansea", "EDUPERSONTARGETEDID=" . $sid);
$info = ldap_get_entries($ds, $sr);
......
......@@ -13,14 +13,22 @@
<th>Gaming</th>
</tr>
<tr>
<td><p>2019</p></td>
<td><a href="/~colours/">colours</a> (Declan Morbey)</td>
<td><a href="/~elbows/">elbows</a> (Laurence Sebastian Bowes)</td>
<td><a href="/~mr_miyagi_420/">mr_miyagi_420</a> (Rafal Gajewski)</td>
<td><a href="/~vectre/">vectre</a> (Alexander Moras)</td>
<td><a href="/~mpg/">mpg</a> (Maxwell Michael Gisborne)</td>
</tr>
<tr>
<td>
<p><strong>2018</strong></p>
<p>2018</p>
</td>
<td><strong><a href="/~vectre">vectre</a> (Alexander Moras)</strong></td>
<td><strong><a href="/~elbows">elbows</a> (Laurence Sebastian Bowes)</strong></td>
<td><strong><a href="/~xray_effect">xray_effect</a> (Ryan Williams)</strong></td>
<td><strong><em>None</em></strong></td>
<td><strong><a href="/~arcryalis">arcryalis</a> (Hywel Williams)</strong></td>
<td><a href="/~vectre">vectre</a> (Alexander Moras)</td>
<td><a href="/~elbows">elbows</a> (Laurence Sebastian Bowes)</td>
<td><a href="/~xray_effect">xray_effect</a> (Ryan Williams)</td>
<td><em>None</em></td>
<td><a href="/~arcryalis">arcryalis</a> (Gwen Williams)</td>
</tr>
<tr>
<td>
......@@ -280,4 +288,4 @@
</tr>
</tbody>
</table>
<p>In 2001, the elections were moved so that the committee now stays in position for one calendar year.</p>
\ No newline at end of file
<p>In 2001, the elections were moved so that the committee now stays in position for one calendar year.</p>
......@@ -4,9 +4,9 @@
<p>The following people were elected to the following posts in accordance with the <a href="../About/Constitution">SUCS constitution</a>.</p>
<ul class="boxes">
<li>
<div>&nbsp;<img height="100" src="https://sucs.org/pictures/people/vectre.png" width="100" />
<div>&nbsp;<img height="100" src="https://sucs.org/pictures/people/colours.png" width="100" />
<br />
<strong>President</strong><br />Alexander Moras (~vectre)</div>
<strong>President</strong><br />Declan Morbey (~colours)</div>
</li>
<li>
<div>&nbsp;<img height="100" src="https://sucs.org/pictures/people/elbows.png" width="100" />
......@@ -14,14 +14,18 @@
<strong>Treasurer</strong><br />Laurence Sebastian Bowes (~elbows)</div>
</li>
<li>
<div>&nbsp;<img height="100" src="https://sucs.org/pictures/people/xray_effect.png" width="100" />
<div>&nbsp;<img height="100" src="https://sucs.org/pictures/people/mr_miyagi_420.png" width="100" />
<br />
<strong>Secretary</strong><br />Ryan Williams (~xray_effect)</div>
<strong>Secretary</strong><br />Rafal Gajewski (~mr_miyagi_420)</div>
</li>
<li>
<div>&nbsp;<img height="100" src="https://sucs.org/pictures/people/arcryalis.png" width="100" />
<div>&nbsp;<img height="100" src="https://sucs.org/pictures/people/mpg.png" width="100" />
<br />
<strong>Events</strong><br />Maxwell Michael Gisborne (~mpg)</div>
</li>
<div>&nbsp;<img height="100" src="https://sucs.org/pictures/people/vectre.png" width="100" />
<br />
<strong>Gaming</strong><br />Hywel Williams (~arcryalis)</div>
<strong>Publicity</strong><br />Alexander Moras (~vectre)</div>
</li>
</ul>
<div class="clear"></div>
......@@ -100,4 +104,4 @@ exceptional help over the years.</p>
</div>
</div>
</div>
-->
\ No newline at end of file
-->
<p>We have put together a set of tools to make it easier to access SUCS services from your own computer. Note that you don't have to use the SUCS Tools to use our services - they're just a time-saving way to do so. The tools consist of the following:</p>
<ul>
<li><a href="/Tools/Desktop%20on%20Demand">Desktop on Demand (VNC)</a></li>
<li><a href="/Community/Milliways">Milliways chat rooms</a></li>
<li><a href="/Knowledge/Help/SUCS%20Services/Logging%20in%20remotely">SUCS remote shell (SSH)</a></li>
<li><a href="/">SUCS Website</a></li>
<li><a href="/Knowledge/Help/SUCS%20Services/Accessing%20your%20email">Your Email</a></li>
<li><a href="/Knowledge/Help/SUCS%20Services/Using%20WebDAV">Your Files (WebDAV)</a></li>
</ul>
<p>For more information about the services, click on the links.</p>
<h2>Downloading and installing the tools</h2>
<p>There are two versions of the tools. Which one you need depends on which operating system you use - <a href="#windows">Windows</a> or <a href="#macosx">Mac OS X</a>. If you use Linux, you probably already have an SSH and a VNC client installed and so don't need the SUCS Tools.</p>
<a name="windows"></a>
<h3>Windows</h3>
<ol>
<li><a href="/files/sucstools-latest.exe">Download SUCS Tools for Windows</a></li>
<li>Once the file has downloaded, double-click on it to start installing the SUCS Tools. A dialog box might appear telling you that "the publisher could not be verified." This is because we haven't paid for a digital certificate to sign the file with. Click "Run" to start the installation.</li>
<li>Follow the instructions provided by the installer.</li>
</ol>
<p>When the installation has completed, you can access the SUCS Tools via Start > All Programs > SUCS Tools.</p>
<a name="macosx"></a>
<h3>Mac OS X</h3>
<ol>
<li><a href="/files/SUCS-latest.dmg">Download SUCS Tools for Mac OS X</a></li>
<li>Once the file has downloaded, it might automatically open (it depends which browser you use). If it doesn't, double click on the file to mount the disk image.</li>
<li>Drag the SUCS folder to the Applications shortcut to install the tools.</li>
</ol>
<p>When the files have finished copying, you will find the SUCS Tools in your Applications folder.</p>
\ No newline at end of file
......@@ -7,5 +7,5 @@ hour access. There are usually members present through the week
so feel free to stop by.</p>
<p>Visit the <a href="Community">Community</a> section of the site for more
ways to get in touch with your fellow members, including <a href="Community/Milliways">Milliways</a>, our chat room.&nbsp;</p>
<p>SUCS celebrated its twenty-fifth birthday in the summer of 2014. We have compiled a site about the society's history. To read about it and contribute your part of the story, visit <a href="http://history.sucs.org/">http://history.sucs.org/</a>.</p>
<div style="text-align: center"><a href="http://history.sucs.org/"><img alt="SUCS history" height="50" src="https://sucs.org/images/sucshistory.png" width="231" /></a></div>
\ No newline at end of file
<p>SUCS celebrated its thirtieth birthday in the summer of 2019. We have compiled a site about the society's history. To read about it and contribute your part of the story, visit <a href="http://history.sucs.org/">http://history.sucs.org/</a>.</p>
<div style="text-align: center"><a href="http://history.sucs.org/"><img alt="SUCS history" height="50" src="https://sucs.org/images/sucshistory.png" width="231" /></a></div>
{if $mode=='login'}
<form action="{$componentpath}" method="post">
<div class="box" style="width: 70%; margin: auto;">
<div class="boxhead"><h2>Membership Signup</h2></div>
<div class="boxcontent">
<p>Please enter your Transation ID. It can be found by logging into <a
href='http://www.swansea-union.co.uk/shop/purchasehistory/'>swansea-union.com</a> and
selecting purchase history.</p>
<div class="row">
<label for="sid">Student Number:</label>
<span class="textinput"><input type="text" size="20" name="sid" id="sid"/></span>
</div>
<div class="row">
<label for="transactionID">Transaction ID:</label>
<span class="textinput"><input type="text" size="20" name="transactionID"
id="transactionID"/></span>
</div>
<div class="row"><span class="textinput">
<input type="submit" name="submit" value="Join"/></span>
</div>
<div class="clear"></div>
<div class="note">If you already have an account and wish to renew, simply buy an additional years
membership from the <a href='https://sucs.org/join'>SUSU website</a>. Enter
the details above and click "Join"
</div>
</div>
<div class="hollowfoot">
<div>
<div></div>
</div>
</div>
</div>
</form>
{elseif $mode=='form'}
<h1>Signup</h1>
<p>To contiune signup now click below</p>
<form action="{$baseurl}/signup/" method="post">
<input type=hidden name="signupid" id="id" value="{$id}"/>
<input type=hidden name="signuppw" id="pass" value="{$pass}"/>
<input type=hidden name="signupsid" id="sid" value="{$sid}"/>
<input type=submit name="submit" value="Proceed"/>
</form>
{else}
<h1>Error</h1>
<div class='errorbar'>
<strong>Error: </strong> {$error_text}
</div>
An error occured during signup, please email, with as much information as you can provide,
<a href='mailto:admin@sucs.org'>admin@sucs.org</a>
for assistance.
{/if}
{if $mode=='login'}
<form action="{$componentpath}" method="post">
<div class="box" style="width: 70%; margin: auto;">
<div class="boxhead"><h2>Membership Signup</h2></div>
<div class="boxcontent">
<p>Please enter your Transation ID. It can be found by logging into <a
href='http://www.swansea-union.co.uk/shop/purchasehistory/'>swansea-union.co.uk</a> and
selecting purchase history.</p>
<div class="row">
<label for="sid">Student Number:</label>
<span class="textinput"><input type="text" size="20" name="sid" id="sid"/></span>
</div>
<div class="row">
<label for="transactionID">Transaction ID:</label>
<span class="textinput"><input type="text" size="20" name="transactionID"
id="transactionID"/></span>
</div>
<div class="row"><span class="textinput">
<input type="submit" name="submit" value="Join"/></span>
</div>
<div class="clear"></div>
<div class="note">If you already have an account and wish to renew, simply buy an additional years
membership from the <a href='https://sucs.org/join'>SUSU website</a>. Enter
the details above and click "Join"
</div>
</div>
<div class="hollowfoot">
<div>
<div></div>
</div>
</div>
</div>
</form>
{elseif $mode=='form'}
<h1>Signup</h1>
<p>To contiune signup now click below</p>
<form action="{$baseurl}/signup/" method="post">
<input type=hidden name="signupid" id="id" value="{$id}"/>
<input type=hidden name="signuppw" id="pass" value="{$pass}"/>
<input type=hidden name="signupsid" id="sid" value="{$sid}"/>
<input type=submit name="submit" value="Proceed"/>
</form>
{else}
<h1>Error</h1>
<div class='errorbar'>
<strong>Error: </strong> {$error_text}
</div>
An error occured during signup, please email, with as much information as you can provide,
<a href='mailto:admin@sucs.org'>admin@sucs.org</a>
for assistance.
{/if}