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
Showing
with 3932 additions and 3162 deletions
......@@ -10,16 +10,16 @@
// -------------------------------------------------------------
//$script_path="/home/member/eclipse/signuptests/";
$script_path="sudo /usr/local/sbin/";
$script_path = "sudo /usr/local/sbin/";
// DEV: CHNAGE THIS FOR DEV MODE
//$error_email="eclipse@sucs.org";
$error_email="admin@sucs.org";
$error_email = "admin@sucs.org";
$override_permission="sucsstaff";
$override_permission = "sucsstaff";
// is the validation (mostly) overridable
$overridable=isset($session->groups[$override_permission]);
$overridable = isset($session->groups[$override_permission]);
// ------------------------------------------------
// DEV: UNCOMMENT THIS FOR DEV MODE
......@@ -31,373 +31,340 @@ $overridable=isset($session->groups[$override_permission]);
$mode = 'login';
//login
if(isset($_REQUEST['signupid'])&&isset($_REQUEST['signuppw'])){
if (isset($_REQUEST['signupid']) && isset($_REQUEST['signuppw'])) {
//set signup details
$signupid = $_REQUEST['signupid'];
$signuppw = $_REQUEST['signuppw'];
// connect to sucs database
$sucsDB = NewADOConnection('postgres8');
//$sucsDB->debug = true;
// -------------------------------------------------
// DEV:SET THIS TO YOUR DATBASE FOR DEV MODE
// -------------------------------------------------
$sucsDB->Connect('dbname=sucs');
//$sucsDB->debug = true;
$sucsDB->SetFetchMode(ADODB_FETCH_ASSOC);
// get row(s)
$query = "SELECT * FROM signup WHERE id=? AND password=?";
$array = array($signupid,$signuppw);
$data = $sucsDB->GetAll($query,$array);
$array = array($signupid, $signuppw);
$data = $sucsDB->GetAll($query, $array);
// if data was returned and it was exactly 1 row
if(is_array($data)&&sizeof($data)==1){
$row=$data[0];
// if the id hasnt already been used
if(!(isset($row[activated])&&isset($row[username]))){
// pass on the id and passwd and id the validation is overridable
$smarty->assign("signupid",$signupid);
$smarty->assign("signuppw",$signuppw);
$smarty->assign("overridable",$overridable);
$smarty->assign("usertype",$row[type]);
// if accepting the form
if(isset($_REQUEST['username']) && isset($_REQUEST['realname']) && isset($_REQUEST['email']) && isset($_REQUEST['phone'])){
require_once("../lib/validation.php");
$override = $overridable && (isset($_POST['override']) && $_POST['override']=="on");
$valid=true;
$errors=array();
$fields=array();
if(!validUsername($_REQUEST['username'])){
$valid=false;
$errors['username']=$error;
}
$fields['username']=$_REQUEST['username'];
if(!(validSignupEmail($_REQUEST['email']) || $override)){
$valid=false;
$errors['email']=$error;
}
$fields['email']=$_REQUEST['email'];
if(!(validPhone($_REQUEST['phone']) || $override)){
$valid=false;
$errors['phone']=$error;
}
$fields['phone']=sanitizePhone($_REQUEST['phone']);
if($row[type]!=2){
if(!(validAddress($_REQUEST['address']) || $override)){
$valid=false;
$errors['address']=$error;
}
$fields['address']=sanitizeAddress($_POST['address']);
if(!validRealName($_REQUEST['realname'],$override)){
$valid=false;
$errors['realname']=$error;
}
$fields['realname']=$_REQUEST['realname'];
}
else{
if(!(validRealName($_REQUEST['contact'],false) || $override)){
$valid=false;
$errors['contact']=$error;
}
$fields['contact']=$_REQUEST['contact'];
if(!validSocName($_REQUEST['realname'], $override)){
$valid=false;
$errors['realname']=$error;
}
$fields['realname']=$_REQUEST['realname'];
}
if($row[type]==1){
if(!validSID($_REQUEST['studentid'],$override)){
$valid=false;
$errors['studentid']=$error;
}
$fields['studentid']=$_REQUEST['studentid'];
}
if($valid){
// include membership adding functions
require_once("../lib/member_functions.php");
$mode='result';
$failed=false;
// invalidate signup slip
$query = "UPDATE signup SET sid=?, username=?, activated=now() WHERE id=?";
if (is_array($data) && sizeof($data) == 1) {
$row = $data[0];
// if the id hasnt already been used
if (!(isset($row[activated]) && isset($row[username]))) {
// pass on the id and passwd and id the validation is overridable
$smarty->assign("signupid", $signupid);
$smarty->assign("signuppw", $signuppw);
// pass on the student id if it exists
if (isset($_REQUEST['signupsid'])) {
$smarty->assign("signupsid", $_REQUEST['signupsid']);
}
$smarty->assign("overridable", $overridable);
$smarty->assign("usertype", $row[type]);
// if accepting the form
if (isset($_REQUEST['username']) && isset($_REQUEST['realname']) && isset($_REQUEST['email']) && isset($_REQUEST['phone'])) {
require_once("../lib/validation.php");
$override = $overridable && (isset($_POST['override']) && $_POST['override'] == "on");
$valid = true;
$errors = array();
$fields = array();
if (!validUsername($_REQUEST['username'])) {
$valid = false;
$errors['username'] = $error;
}
$fields['username'] = $_REQUEST['username'];
if (!(validSignupEmail($_REQUEST['email']) || $override)) {
$valid = false;
$errors['email'] = $error;
}
$fields['email'] = $_REQUEST['email'];
if (!(validPhone($_REQUEST['phone']) || $override)) {
$valid = false;
$errors['phone'] = $error;
}
$fields['phone'] = sanitizePhone($_REQUEST['phone']);
if ($row[type] != 2) {
if (!(validAddress($_REQUEST['address']) || $override)) {
$valid = false;
$errors['address'] = $error;
}
$fields['address'] = sanitizeAddress($_POST['address']);
if (!validName($_REQUEST['realname'], $override)) {
$valid = false;
$errors['realname'] = $error;
}
$fields['realname'] = $_REQUEST['realname'];
} else {
if (!(validName($_REQUEST['contact'], false) || $override)) {
$valid = false;
$errors['contact'] = $error;
}
$fields['contact'] = $_REQUEST['contact'];
if (!validName($_REQUEST['realname'], $override)) {
$valid = false;
$errors['realname'] = $error;
}
$fields['realname'] = $_REQUEST['realname'];
}
if ($row[type] == 1) {
if (!validSID($_REQUEST['studentid'], $override)) {
$valid = false;
$errors['studentid'] = $error;
}
$fields['studentid'] = $_REQUEST['studentid'];
}
unset($atribs);
$atribs[0]=$fields['studentid'];
$atribs[1]=$fields['username'];
$atribs[2]=$signupid;
$responce = $sucsDB->Execute($query,$atribs);
if(!$responce){
mail(
$error_email,
"Signup Error",
"Unable to invalidate signup slip: ".$signupid."\nAborting\nError message:\n".$sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$failed=true;
}
else{
// determine the uid range
if($row[type]==2){
$baseuid=8;
}
else{
$baseuid=29;
}
$minuid=$baseuid*1000;
$maxuid=$minuid+999;
//get the new uid
$uid=findUid($minuid,$maxuid);
// make a password
$password=make_password();
// make the ldif
$ldif=generateLdif($uid,$password,$row[type],$fields['realname'],$fields['username']);
// write ldif file
file_put_contents('/tmp/useradd.'.$fields['username'].'.ldif',$ldif);
exec(
$script_path.'useradd.apache '.
escapeshellarg($fields['username']).' '.
escapeshellarg($fields['studentid']).' '.
escapeshellarg($fields['email']).
' 2>&1',
$execoutputarr,
$execreturn
);
if($execreturn!=0){
$execoutputstr=implode("\n",$execoutputarr);
mail(
$error_email,
"Error creating user for signup id: ".$signupid,
$execoutputstr,
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$failed=true;
}
// DEV: STICK THIS FOR DEV
if(posix_getpwnam($fields['username'])){
$query="SELECT count(*) from members where username = ?";
$data = $sucsDB->GetAll($query,array($fields['username']));
if($data[0]['count']!=0){
mail(
$error_email,
"Signup Error",
"User ".$fields['username']." already exists in the databse, THIS SHOULD NEVER HAPPEN\n Love the signup system.\n\nP.S. the signup id is: ".$signupid,
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$failed=true;
}
else{
$query = "INSERT INTO members (";
$query .= "uid, username, realname, email, address, phone, sid, type, paid, lastedit, comments";
$query .= ") values (";
$query .= "?, ?, ?, ?";
// if its a soc then it has no address
if($row[type]!=2){
$query .= ", ?"; //address
}
else{
$query .= ", DEFAULT"; //address
}
$query .= ", ?"; //phone
// only student had a sid
if($row[type]==1){
$query .= ", ?"; //sid
}
else{
$query .= ", DEFAULT";
}
$query .= ", ?, ?, ?";
// socienty add a default comment
if($row[type]==2){
$query .= ", ?";// comment
}
else{
$query .= ", DEFAULT";
}
$query .= ");";
unset($atribs);
$atribs[]=$uid;
$atribs[]=$fields['username'];
$atribs[]=$fields['realname'];
$atribs[]=$fields['email'];
if($row[type]!=2){
$atribs[]=$fields['address'];
}
$atribs[]=$fields['phone'];
if($row[type]==1){
$atribs[]=$fields['studentid'];
}
$atribs[]=$row[type];
include_once("../lib/date.php");
$atribs[]=paidUntil(time());
$atribs[]=$uid;
if($row[type]==2){
$atribs[]="Contact name: ".$fields['contact'];
}
$responce = $sucsDB->Execute($query,$atribs);
// if somthing broke then email
if(!$responce){
mail(
$error_email,
"Signup Error",
"Database problems for signup id: ".$signupid."\nError message:\n".$sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$failed=true;
}
else{
// if door card is connected to the signup slip move it to its proper home
if($row[card] != ''){
$query="INSERT INTO doorcards (uid,cardnumber) VALUES (?, ?);";
unset($atribs);
$atribs[0]=$uid;
$atribs[1]=$row[card];
$responce=$sucsDB->Execute($query,$atribs);
if(!$responce){
mail(
$error_email,
"Signup Error",
"Failed to migrate card details for signup id: ".$signupid."\nError message:\n".$sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
}
}
if ($valid) {
// include membership adding functions
require_once("../lib/member_functions.php");
$mode = 'result';
$failed = false;
$logsmessage = "New user '".$fields['username']."' has been created on SUCS\n";
$logsmessage .= "at: ".date("H:i ",time())." on ".date("l F jS Y", time())."\n";
$logsmessage .= "From: ".$_SERVER['REMOTE_ADDR']."\n";
$logsmessage .= "Using signup id: ".$signupid."\n";
if($override){
$logsmessage .= "User ".$session->username." overrode validation.\n";
}
$logsmessage .= "Love The Signup System";
// DEV: CHANGE THIS EMAIL ADDRESS
mail(
"logs@sucs.org",
"User '".$fields['username']."' Created on SUCS",
$logsmessage,
"From: \"SUCS Admin\" <admin@sucs.org>"
);
mail(
"treasurer@sucs.org",
"User '".$fields['username']."' Created on SUCS",
$logsmessage,
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$usermessage = "Welcome to the Swansea University Computer Society!\n\n";
$usermessage .= "Your account details are:\n\n";
$usermessage .= "Username: ".$fields['username']."\n";
$usermessage .= "Password: ".$password."\n\n";
$usermessage .= "Wondering what to do next? Check out our Getting Started page: http://sucs.org/Getting%20Started or go right ahead and post on our forum at http://sucs.org/Community/Forum or join in the discussion on our chat system, Milliways: http://sucs.org/Community/Milliways\n\n";
$usermessage .= "Our weekly social is held in the coffee end JC's at 1:00 PM every Wednesday\n\n";
$usermessage .= "Before you use the SUCS computers or the computer room, please make sure you are familiar with the conditions of use and room rules at http://sucs.org/About/Regulations\n\n";
$usermessage .= "If you require help using the system, introductory guides are available at http://sucs.org/Knowledge\n\n";
$usermessage .= "If you have any trouble using the system, reply to this e-mail describing the nature of the problem and we'll look into it.\n\n";
$usermessage .= "We hope you enjoy your SUCS membership.\n\n";
$usermessage .= "Regards,\n\n";
$usermessage .= "Swansea University Computer Society";
if($fields['email']!=''){
$user_email=$fields['email'];
}
elseif($fields['studentid']!=''){
$user_email=$fields['studentid']."@swan.ac.uk";
}
else{
$user_email=FALSE;
}
if($user_email){
mail(
$user_email,
"Your SUCS Account has been created!",
$usermessage,
"From: \"SUCS Admin\" <admin@sucs.org>"
);
}
}
}
}
//Wrong logic, only students have student email addresses ~imranh
if ($row['type']==1){
$addtolist ="".$fields['email']."\n".$fields['studentid']."@swan.ac.uk";
}else{
$addtolist="".$fields['email']."\n"; //Societies don't have student email addresses
}
file_put_contents('/tmp/listadd.'.$fields['username'],$addtolist);
unset($execoutputarr);
exec(
$script_path.'listadd.apache '.
escapeshellarg($fields['username']).' '.
escapeshellarg($row[type]).
' 2>&1',
$execoutputarr,
$ececreturn
);
if($execreturn!=0){
$execoutputstr=implode("\n",$execoutputarr);
// invalidate signup slip
$query = "UPDATE signup SET sid=?, username=?, activated=now() WHERE id=?";
unset($atribs);
$atribs[0] = $fields['studentid'];
$atribs[1] = $fields['username'];
$atribs[2] = $signupid;
$responce = $sucsDB->Execute($query, $atribs);
if (!$responce) {
mail(
$error_email,
"Signup Error",
"Unable to invalidate signup slip: " . $signupid . "\nAborting\nError message:\n" . $sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$failed = true;
} else {
//generate the new uid
$uid = generateUid();
// make a password
$password = make_password();
// make the ldif
$ldif = generateLdif($uid, $password, $row[type], $fields['realname'], $fields['username']);
// write ldif file
file_put_contents('/tmp/useradd.' . $fields['username'] . '.ldif', $ldif);
exec(
$script_path . 'useradd.apache ' .
escapeshellarg($fields['username']) . ' ' .
escapeshellarg($fields['studentid']) . ' ' .
escapeshellarg($fields['email']) .
' 2>&1',
$execoutputarr,
$execreturn
);
if ($execreturn != 0) {
$execoutputstr = implode("\n", $execoutputarr);
mail(
$error_email,
"Error creating user for signup id: " . $signupid,
$execoutputstr,
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$failed = true;
}
// DEV: STICK THIS FOR DEV
if (posix_getpwnam($fields['username'])) {
$query = "SELECT count(*) from members where username = ?";
$data = $sucsDB->GetAll($query, array($fields['username']));
if ($data[0]['count'] != 0) {
mail(
$error_email,
"Error adding user to mailing lists from signup id: ".$signupid,
$execoutputstr,
"Signup Error",
"User " . $fields['username'] . " already exists in the database, THIS SHOULD NEVER HAPPEN\n Love, the signup system.\n\nP.S. the signup id is: " . $signupid,
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$failed=true;
$failed = true;
} else {
$query = "INSERT INTO members (";
$query .= "uid, username, realname, email, address, phone, sid, type, paid, lastedit, comments";
$query .= ") values (";
$query .= "?, ?, ?, ?";
// if its a soc then it has no address
if ($row[type] != 2) {
$query .= ", ?"; //address
} else {
$query .= ", DEFAULT"; //address
}
$query .= ", ?"; //phone
// only student had a sid
if ($row[type] == 1) {
$query .= ", ?"; //sid
} else {
$query .= ", DEFAULT";
}
$query .= ", ?, ?, ?";
// socienty add a default comment
if ($row[type] == 2) {
$query .= ", ?";// comment
} else {
$query .= ", DEFAULT";
}
$query .= ");";
unset($atribs);
$atribs[] = $uid;
$atribs[] = $fields['username'];
$atribs[] = $fields['realname'];
$atribs[] = $fields['email'];
if ($row[type] != 2) {
$atribs[] = $fields['address'];
}
$atribs[] = $fields['phone'];
if ($row[type] == 1) {
$atribs[] = $fields['studentid'];
}
$atribs[] = $row[type];
include_once("../lib/date.php");
$atribs[] = paidUntil(time());
$atribs[] = $uid;
if ($row[type] == 2) {
$atribs[] = "Contact name: " . $fields['contact'];
}
$responce = $sucsDB->Execute($query, $atribs);
// if somthing broke then email
if (!$responce) {
mail(
$error_email,
"Signup Error",
"Database problems for signup id: " . $signupid . "\nError message:\n" . $sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$failed = true;
} else {
// if door card is connected to the signup slip move it to its proper home
if ($row[card] != '') {
$query = "INSERT INTO doorcards (uid,cardnumber) VALUES (?, ?);";
unset($atribs);
$atribs[0] = $uid;
$atribs[1] = $row[card];
$responce = $sucsDB->Execute($query, $atribs);
if (!$responce) {
mail(
$error_email,
"Signup Error",
"Failed to migrate card details for signup id: " . $signupid . "\nError message:\n" . $sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
}
}
$logsmessage = "New user '" . $fields['username'] . "' has been created on SUCS\n";
$logsmessage .= "at: " . date("H:i ", time()) . " on " . date("l F jS Y", time()) . "\n";
$logsmessage .= "From: " . $_SERVER['REMOTE_ADDR'] . "\n";
$logsmessage .= "Using signup id: " . $signupid . "\n";
if ($override) {
$logsmessage .= "User " . $session->username . " overrode validation.\n";
}
$logsmessage .= "Love, The Signup System";
// DEV: CHANGE THIS EMAIL ADDRESS
mail(
"logs@sucs.org,treasurer@sucs.org",
"User '" . $fields['username'] . "' Created on SUCS",
$logsmessage,
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$usermessage = "Welcome to the Swansea University Computer Society!\n\n";
$usermessage .= "Your account details are:\n\n";
$usermessage .= "Username: " . $fields['username'] . "\n";
$usermessage .= "Password: " . $password . "\n\n";
$usermessage .= "Wondering what to do next? Check out our Getting Started page: http://sucs.org/Getting%20Started or go right ahead and post on our forum at http://sucs.org/Community/Forum or join in the discussion on our chat system, Milliways: http://sucs.org/Community/Milliways\n\n";
$usermessage .= "Our weekly social is held in the coffee end JC's at 1:00 PM every Wednesday\n\n";
$usermessage .= "Before you use the SUCS computers or the computer room, please make sure you are familiar with the conditions of use and room rules at http://sucs.org/About/Regulations\n\n";
$usermessage .= "If you require help using the system, introductory guides are available at http://sucs.org/Knowledge\n\n";
$usermessage .= "If you have any trouble using the system, reply to this e-mail describing the nature of the problem and we'll look into it.\n\n";
$usermessage .= "We hope you enjoy your SUCS membership.\n\n";
$usermessage .= "Regards,\n\n";
$usermessage .= "Swansea University Computer Society";
if ($fields['email'] != '') {
$user_email = $fields['email'];
} elseif ($fields['studentid'] != '') {
$user_email = $fields['studentid'] . "@swan.ac.uk";
} else {
$user_email = FALSE;
}
if ($user_email) {
mail(
$user_email,
"Your SUCS Account has been created!",
$usermessage,
"From: \"SUCS Admin\" <admin@sucs.org>"
);
}
}
}
}
//Wrong logic, only students have student email addresses ~imranh
if ($row['type'] == 1) {
$addtolist = "" . $fields['email'] . "\n" . $fields['studentid'] . "@swan.ac.uk";
} else {
$addtolist = "" . $fields['email'] . "\n"; //Societies don't have student email addresses
}
file_put_contents('/tmp/listadd.' . $fields['username'], $addtolist);
unset($execoutputarr);
exec(
$script_path . 'listadd.apache ' .
escapeshellarg($fields['username']) . ' ' .
escapeshellarg($row[type]) .
' 2>&1',
$execoutputarr,
$execreturn
);
if ($execreturn != 0) {
$execoutputstr = implode("\n", $execoutputarr);
}
$smarty->assign("failed",$failed);
if($failed){
$errorreparray=$_POST;
unset($errorroparray[signuppw]);
$errorreparray[uid]=$uid;
$errorreport = "User input details:\n\n";
foreach ($errorreparray as $key => $value){
$errorreport .= $key.": ".$value."\n";
}
$errorreport .= "\nLove from the Signup System";
mail(
$error_email,
"Signup system error report",
$errorreport,
"From: \"SUCS Admin\" <admin@sucs.org>"
);
}
else{
$smarty->assign("username", $fields['username']);
$smarty->assign("password", $password);
$smarty->assign("email", $user_email);
}
mail(
$error_email,
"Error adding user to mailing lists from signup id: " . $signupid,
$execoutputstr . $execreturn,
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$failed = true;
}
exec($script_path . 'printeradd.apache ' . escapeshellarg($fields['username']));
}
$smarty->assign("failed", $failed);
if ($failed) {
$errorreparray = $_POST;
unset($errorroparray[signuppw]);
$errorreparray[uid] = $uid;
$errorreport = "User input details:\n\n";
foreach ($errorreparray as $key => $value) {
$errorreport .= $key . ": " . $value . "\n";
}
$errorreport .= "\nLove, the Signup System";
mail(
$error_email,
"Signup system error report",
$errorreport,
"From: \"SUCS Admin\" <admin@sucs.org>"
);
} else {
$smarty->assign("username", $fields['username']);
$smarty->assign("password", $password);
$smarty->assign("email", $user_email);
}
}
else{
//re-show form
$script = "<script language='javascript' type='text/javascript' src='".$baseurl."/js/jquery.js'></script>\n";
$script .= "<script language='javascript' type='text/javascript' src='$baseurl/js/signup.js'></script>\n";
$smarty->assign("fields",$fields);
$smarty->assign("errors",$errors);
$smarty->append('extra_scripts', $script);
$mode='re-form';
}
}
else{
// display the form
$script = "<script language='javascript' type='text/javascript' src='".$baseurl."/js/jquery.js'></script>\n";
$script .= "<script language='javascript' type='text/javascript' src='$baseurl/js/signup.js'></script>\n";
$smarty->append('extra_scripts', $script);
$mode='form';
}
}
else trigger_error("Signup ID already used",E_USER_WARNING);
}
else trigger_error("Invalid ID or Password", E_USER_WARNING);
} else {
//re-show form
$script = "<script language='javascript' type='text/javascript' src='" . $baseurl . "/js/jquery.js'></script>\n";
$script .= "<script language='javascript' type='text/javascript' src='$baseurl/js/signup.js'></script>\n";
$smarty->assign("fields", $fields);
$smarty->assign("errors", $errors);
$smarty->append('extra_scripts', $script);
$mode = 're-form';
}
} else {
// display the form
$script = "<script language='javascript' type='text/javascript' src='" . $baseurl . "/js/jquery.js'></script>\n";
$script .= "<script language='javascript' type='text/javascript' src='$baseurl/js/signup.js'></script>\n";
$smarty->append('extra_scripts', $script);
$mode = 'form';
}
} else trigger_error("Signup ID already used", E_USER_WARNING);
} else trigger_error("Invalid ID or Password", E_USER_WARNING);
}
//Set smarty Variables
$smarty->assign("mode", $mode);
$output = $smarty->fetch("signup.tpl");
$output = $smarty->fetch("signup.tpl");
$smarty->assign("title", "Sign Up");
$smarty->assign("body", $output);
......
<?
<?php
require_once("../lib/validation.php");
// don't output the site template
$no_template = TRUE;
header("Content-type: text/plain");
if (isset($_GET['key'])){
switch($_GET['key']){
case "sid":
$sid=$_GET['value'];
if(validSID($sid,false)){
echo "OK:".lookupSID($_GET['value']);
}
else{
echo "ERROR:".$error;
}
break;
case "postcode":
$postcode=implode("", explode(" ", $_GET['value']));
echo json_encode(lookup_postcode($postcode));
break;
case "username":
$username = $_GET['value'];
if(validUsername($username)){
echo "OK";
}
else{
echo $error;
}
break;
case "realname":
$realname = $_GET['value'];
if(validRealName($realname,false)){
echo "OK";
}
else{
echo $error;
}
break;
case "socname":
$socname = $_GET['value'];
if(validSocName($socname,false)){
echo "OK";
}
else{
echo $error;
}
break;
if (isset($_GET['key'])) {
switch ($_GET['key']) {
case "sid":
$sid = $_GET['value'];
if (validSID($sid, false)) {
echo "OK:" . lookupSID($_GET['value']);
} else {
echo "ERROR:" . $error;
}
break;
case "postcode":
$postcode = validPostcode($_GET['value']);
if ($postcode != false) {
lookup_postcode($postcode);
}
break;
case "username":
$username = $_GET['value'];
if (validUsername($username)) {
echo "OK";
} else {
echo $error;
}
break;
case "realname":
$realname = $_GET['value'];
if (validName($realname, false)) {
echo "OK";
} else {
echo $error;
}
break;
case "socname":
$socname = $_GET['value'];
if (validName($socname, false)) {
echo "OK";
} else {
echo $error;
}
break;
case "address":
$address = $_GET['value'];
if(validAddress($address)){
echo "OK";
}
else{
echo $error;
}
break;
$address = $_GET['value'];
if (validAddress($address)) {
echo "OK";
} else {
echo $error;
}
break;
case "email":
$email = $_GET['value'];
if(validSignupEmail($email)){
echo "OK";
}
else{
echo $error;
}
break;
case "phone":
$phone = $_GET['value'];
if(validPhone($phone)){
echo "OK";
}
else{
echo $error;
}
break;
}
case "email":
$email = $_GET['value'];
if (validSignupEmail($email)) {
echo "OK";
} else {
echo $error;
}
break;
case "phone":
$phone = $_GET['value'];
if (validPhone($phone)) {
echo "OK";
} else {
echo $error;
}
break;
}
}
?>
......@@ -10,24 +10,24 @@ $conn = ldap_connect(_LDAP_SERVER);
$search = ldap_search($conn, _BASE_DN, 'uid=*', array('uid', 'cn', 'homedirectory'));
// Sort By Username
ldap_sort($conn, $search, 'uid');
// Produce an array of usernames
$usernames = array();
$entryHandler = ldap_first_entry($conn, $search);
while($entryHandler) {
$username = ldap_get_values($conn, $entryHandler, 'uid');
$fullname = ldap_get_values($conn, $entryHandler, 'cn');
$homedir = ldap_get_values($conn, $entryHandler, 'homedirectory');
$homedir = $homedir[0];
$homedirArray = explode('/', $homedir);
if (($homedirArray[2]=="society") && file_exists( "$homedir/public_html")) {
$usernames[] = array( "username" => $username[0], "fullname" => $fullname[0]);
}
$entryHandler = ldap_next_entry($conn, $entryHandler);
}
// Sort By Username
ldap_sort($conn, $search, 'uid');
// Produce an array of usernames
$usernames = array();
$entryHandler = ldap_first_entry($conn, $search);
while ($entryHandler) {
$username = ldap_get_values($conn, $entryHandler, 'uid');
$fullname = ldap_get_values($conn, $entryHandler, 'cn');
$homedir = ldap_get_values($conn, $entryHandler, 'homedirectory');
$homedir = $homedir[0];
$homedirArray = explode('/', $homedir);
if (($homedirArray[2] == "society") && file_exists("$homedir/public_html")) {
$usernames[] = array("username" => $username[0], "fullname" => $fullname[0]);
}
$entryHandler = ldap_next_entry($conn, $entryHandler);
}
$smarty->assign("societies", $usernames);
......
......@@ -5,81 +5,81 @@
$permission = "html";
// Get the right filename...
$myfile = $base."static".$path.$language['file'].".txt";
$secondaryfile = $base."static".$path.$language['file']."-secondary.txt";
$myfile = $base . "static" . $path . $language['file'] . ".txt";
$secondaryfile = $base . "static" . $path . $language['file'] . "-secondary.txt";
if (!file_exists($myfile)) {
$myfile = $base."static$path.txt";
$secondaryfile = $base."static$path-secondary.txt";
// If the file doesn't exist...
if (!file_exists($myfile)) {
if (isset($session->groups[$permission]) && @$_REQUEST['action']=="create") {
// ...and we have permission and have been asked to, create it
$body = "foo";
} else {
$redirect_path = $DB->GetOne("SELECT to_uri FROM redirect where from_uri=?", array("/".$pathlist[1]));
if (isset($_SERVER['HTTPS'])) $proto = "https://";
else $proto = "http://";
if ($redirect_path!="") {
$variables = "";
for ($i=2;$i<count($pathlist);$i++) {
$variables .= "/".$pathlist[$i];
}
$redirect_uri = $proto.$_SERVER['SERVER_NAME'].$redirect_path.$variables;
if ($_SERVER['QUERY_STRING']!="") $redirect_uri.="?".$_SERVER['QUERY_STRING'];
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".$redirect_uri);
} else {
// ...serve a 404 error
header("HTTP/1.1 404 Not Found");
$body = @file_get_contents($base."static/404.txt");
$smarty->assign("pathlist", array("", "Error"));
$title = "File not found";
$smarty->assign("title", $title);
$smarty->assign("body", $body);
// Give those with permission the chance to create the page
if (isset($session->groups[$permission])) $smarty->assign("creatable", TRUE);
}
return;
}
}
$myfile = $base . "static$path.txt";
$secondaryfile = $base . "static$path-secondary.txt";
// If the file doesn't exist...
if (!file_exists($myfile)) {
if (isset($session->groups[$permission]) && @$_REQUEST['action'] == "create") {
// ...and we have permission and have been asked to, create it
$body = "foo";
} else {
$redirect_path = $DB->GetOne("SELECT to_uri FROM redirect where from_uri=?", array("/" . $pathlist[1]));
if (isset($_SERVER['HTTPS'])) $proto = "https://";
else $proto = "http://";
if ($redirect_path != "") {
$variables = "";
for ($i = 2; $i < count($pathlist); $i++) {
$variables .= "/" . $pathlist[$i];
}
$redirect_uri = $proto . $_SERVER['SERVER_NAME'] . $redirect_path . $variables;
if ($_SERVER['QUERY_STRING'] != "") $redirect_uri .= "?" . $_SERVER['QUERY_STRING'];
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . $redirect_uri);
} else {
// ...serve a 404 error
header("HTTP/1.1 404 Not Found");
$body = @file_get_contents($base . "static/404.txt");
$smarty->assign("pathlist", array("", "Error"));
$title = "File not found";
$smarty->assign("title", $title);
$smarty->assign("body", $body);
// Give those with permission the chance to create the page
if (isset($session->groups[$permission])) $smarty->assign("creatable", TRUE);
}
return;
}
}
}
// If we've got edit permission...
if (isset($session->groups[$permission])) {
switch (@$_REQUEST['action']) {
case "Save":
// ...save the file
$savesuccess = @file_put_contents($myfile, $_REQUEST['body'], LOCK_EX);
if (!$savesuccess) trigger_error("Write failed", E_USER_ERROR);
$id = $DB->GetOne("select id from static where path=?", array($path));
$record = array();
$record['summary'] = $_REQUEST['summary'];
$record['editor'] = $session->username;
$record['path'] = $path;
if ($id>0) {
$DB->AutoExecute("static", $record, 'UPDATE', "id = '".$id."'");
} else {
$DB->AutoExecute("static", $record, 'INSERT');
}
// probably need some error-handling here...
break;
case "Delete":
$deleted = unlink($myfile);
break;
}
switch (@$_REQUEST['action']) {
case "Save":
// ...save the file
$savesuccess = @file_put_contents($myfile, $_REQUEST['body'], LOCK_EX);
if (!$savesuccess) trigger_error("Write failed", E_USER_ERROR);
$id = $DB->GetOne("select id from static where path=?", array($path));
$record = array();
$record['summary'] = $_REQUEST['summary'];
$record['editor'] = $session->username;
$record['path'] = $path;
if ($id > 0) {
$DB->AutoExecute("static", $record, 'UPDATE', "id = '" . $id . "'");
} else {
$DB->AutoExecute("static", $record, 'INSERT');
}
// probably need some error-handling here...
break;
case "Delete":
$deleted = unlink($myfile);
break;
}
}
$title = end($pathlist);
if (file_exists($myfile)) {
$body = file_get_contents($myfile);
$modified = date("r", filectime($myfile));
$modifiedby = $DB->GetOne("select editor from static where path=?", array($path));
$body = file_get_contents($myfile);
$modified = date("r", filectime($myfile));
$modifiedby = $DB->GetOne("select editor from static where path=?", array($path));
}
if (file_exists($secondaryfile)) {
$secondary = file_get_contents($secondaryfile);
$smarty->assign("secondary", $secondary);
$secondary = file_get_contents($secondaryfile);
$smarty->assign("secondary", $secondary);
}
// include a widget for leaving feedback on this page if the user is logged in
......@@ -92,27 +92,27 @@ $smarty->assign("title", str_replace("_", " ", $title));
// Editing static pages - does the user have permission?
if (isset($session->groups[$permission])) {
// display Edit link on page
$smarty->assign("editable", TRUE);
$smarty->assign("editable", TRUE);
switch (@$_REQUEST['action']) {
switch (@$_REQUEST['action']) {
// load the editing template
case "create":
if (!file_exists($myfile)) file_put_contents($myfile, "Page under construction\n", LOCK_EX);
case "edit":
$smarty->assign("editcontent", $body);
$record['summary'] = $DB->GetOne("select summary from static where path=?", array($path));
$smarty->assign("record", $record);
$smarty->assign("action", "edit");
$modified = NULL;
$body = $smarty->fetch('static_edit.tpl');
break;
case "delete-query":
$body = $smarty->fetch('static_delete.tpl').$body;
break;
case "Delete":
if ($deleted) $body = "File deleted";
break;
}
case "create":
if (!file_exists($myfile)) file_put_contents($myfile, "Page under construction\n", LOCK_EX);
case "edit":
$smarty->assign("editcontent", $body);
$record['summary'] = $DB->GetOne("select summary from static where path=?", array($path));
$smarty->assign("record", $record);
$smarty->assign("action", "edit");
$modified = NULL;
$body = $smarty->fetch('static_edit.tpl');
break;
case "delete-query":
$body = $smarty->fetch('static_delete.tpl') . $body;
break;
case "Delete":
if ($deleted) $body = "File deleted";
break;
}
}
$smarty->assign("body", $body);
......
<?PHP
/***
* SU Signup admin
* Allows us to search the SU api for a given student number and checks if they're a SUCS member.
* If they are - allows account renewal
* If not - allows signup to be bootstrapped as per susignup component
***/
<?php
// gib errars plox
//error_reporting(E_ALL);
//ini_set('display_errors', 1);
// include functions and shit we need
include("../lib/member_functions.php");
include("../lib/date.php");
include("../suapi.inc.php");
include("../lib/suapiv2.php");
//Restrict access to staff.
$permission="sucsstaff";
$apibaseurl="https://$suapi_user:$suapi_pass@su-api.sucs.org/memberships/Membership.asmx";
//Restrict access to staff.
$permission = "sucsstaff";
// if they have the right privs then lets do shit
if (isset($session->groups[$permission])) {
//Setup smarty magic, step 1
$smarty->assign("staff", TRUE);
if(!isset($_REQUEST['mode'])) {
$mode = 'menu';
} else {
$mode = urldecode($_REQUEST['mode']);
}
//Set up SUCS DB Connection.
//Note that $DB is the generic sucssite connection
$sucsDB = NewADOConnection('postgres8');
$sucsDB->Connect('dbname=sucs user=apache');
$sucsDB->SetFetchMode(ADODB_FETCH_ASSOC);
if ($mode == 'search') {
if (empty($_REQUEST['sid']) || empty($_REQUEST['snsubmit'])) {
$mode = 'error';
$smarty->assign("error_text", "Invalid search request");
}else{
$pres=preg_match("/^[0-9]{6}$/",$_REQUEST['sid'],$sid);
if ($pres!=1) {
$mode = 'error';
$smarty->assign("error_text", "Search term doesn't look like a valid student ID");
} else {
$url = "$apibaseurl/IsPersonMember?strCriteria=".$sid[0]."&GroupingId=6613";
$apiReq = curl_init();
curl_setopt($apiReq, CURLOPT_URL, $url);
curl_setopt($apiReq, CURLOPT_RETURNTRANSFER, TRUE);
$apiResult = curl_exec($apiReq);
if ($apiResult === FALSE) {
$mode = 'error';
$smarty->assign("error_text", "An error occurred communicating with the SUSU API.");
}else {
// Ostensibly we now have a valid search result from the SU - go to work
libxml_use_internal_errors(true);
$xml=simplexml_load_string($apiResult);
if (!$xml||isset($xml->head->title)) {
$mode='error';
$smarty->assign("error_text", "An error occurred communicating with the SUSU API");
} else {
$ismember = $xml[0];
if ($ismember=="true") {
//Yay, we have a student who has paid and needs to be signed up.
//Check they don't have a signup slip already
$query = "SELECT transactionid, signupid FROM transactions WHERE cardNumber = ?;";
$qres = $sucsDB->Execute($query, $sid);
if ($qres->RecordCount()==0) {
// No transaction, but might have unused signup slip. If so, retrieve values.
$query = "SELECT id, username, password FROM signup WHERE sid=?;";
$qres = $sucsDB->Execute($query, array($sid[0]));
if ($qres && $qres->RecordCount() > 0) {
if ($qres->RecordCount() > 1) {
$mode='error';
$smarty->assign("error_text", "Student has multiple signup slips in the DB. Bork! Bork! Bork!");
} else if (!empty($qres->fields['username'])) {
$mode='error';
$smarty->assign("error_text", "Student hasn't tried to use the SU signup component (No transaction in DB), but has a previously used Signup Slip with username ".$qres->fields['username'].".<br />Is this a renewal? If not, ask an admin to generate a new signup slip for this student");
//TODO: Add option to generate new signup slip?
} else {
$id = $qres->fields['id'];
$pass = $qres->fields['password'];
}
} else {
$pass = make_password();
$query = "INSERT INTO signup (password,sid,issuedby) VALUES ( ?, ?, ?) RETURNING id";
$attribs[]=$pass;
$attribs[]=$sid[0];
$attribs[]='99999'; //SUCS Magic internal use UID
$id = $sucsDB->Execute($query,$attribs);
$id = $id->fields['id'];
if (!$id) {
$mode="error";
$smarty->assign("error_text", "An error occurred generating a signup ID. Report the following message to the admins:<br /><pre>".$sucsDB->ErrorMsg()."</pre>");
} else {
$smarty->assign('slipid', $id);
$smarty->assign('slippass', $pass);
$smarty->assign('sid', $sid[0]);
}
}
} else {
//Retrieve existing slip
$id = $qres->fields['signupid'];
$tid = $qres->fields['transactionid'];
if (empty($id)) {
$pass = make_password();
$query = "INSERT INTO signup (password,sid,issuedby) VALUES ( ?, ?, ?) RETURNING id";
$attribs[]=$pass;
$attribs[]=$sid[0];
$attribs[]='99999'; //SUCS Magic internal use UID
$qres = $sucsDB->Execute($query,$attribs);
if (!$qres) {
$mode="error";
$smarty->assign("error_text", "An error occurred generating a signup ID. Report the following message to the admins:<br /><pre>".$sucsDB->ErrorMsg()."</pre>");
} else {
$id = $qres->fields['id'];
$query = "UPDATE transactions SET signupid=? WHERE transactionid=?;";
$qres = $sucsDB->Execute($query, array($id, $tid));
$smarty->assign('slipid', $id);
$smarty->assign('slippass', $pass);
$smarty->assign('sid', $sid[0]);
}
}else {
$query = "SELECT username, password FROM signup WHERE id=?;";
$qres = $sucsDB->Execute($query, array($id));
if (!$qres) {
$mode="error";
$smarty->assign("error_text", "The user appears to have generated a signup ID using the SU Signup system (Slip ID: ".$id."), but the password for that slip can't be retrieved.<br />Request assistance.");
} else if ($qres->fields['username'] !== NULL) {
$mode="error";
$smarty->assign("error_text", "This user appears to have completed signup, with username <strong>".$qres->fields['username']."</strong><br />Check that this user exists, and offer to reset their password if necessary.");
}
$pass = $qres->fields['password'];
$smarty->assign('slipid', $id);
$smarty->assign('slippass', $pass);
$smarty->assign('sid', $sid[0]);
}
}
if(!$mode=='error') {
//Right, this should be the point where we hand off to signup
$smarty->assign('slipid', $id);
$smarty->assign('slippass', $pass);
$smarty->assign('sid', $sid[0]);
}
}else{
$mode='error';
$smarty->assign("error_text", "Student does not appear to have paid. Extract fees");
}
}
}
}
}
} else if ($mode=="renew") {
if (empty($_REQUEST['member'])){
$mode='error';
$smarty->assign('error_text',"Can't renew a member without knowing their username!");
} else if (!isset($_REQUEST['renewconf'])) {
//Should be trying to renew $_REQUEST['member']
$username=urldecode($_REQUEST['member']);
$q = "SELECT username, typename, sid, paid, email FROM members, member_type WHERE username=?";
$res = $sucsDB->Execute($q,array($username));
if (!$res) {
$mode='error';
$smarty->assign('error_text', "A database error occurred while trying to retrieve member details");
} else if ($res->fields['paid'] == paidUntil(time())) {
$mode='error';
$smarty->assign('error_text', 'User appears to have been renewed already?');
} else {
$smarty->assign('renew_user', $username);
$smarty->assign('renew_paid', $res->fields['paid']);
$smarty->assign('renew_type', $res->fields['typename']);
$url = "$apibaseurl/IsPersonMember?strCriteria=".$res->fields['sid']."&GroupingId=6613";
$apiReq = curl_init();
curl_setopt($apiReq, CURLOPT_URL, $url);
curl_setopt($apiReq, CURLOPT_RETURNTRANSFER, TRUE);
$apiResult = curl_exec($apiReq);
libxml_use_internal_errors(true);
$xml=simplexml_load_string($apiResult);
if (!$xml || isset($xml->head->title)) {
$mode='error';
$smarty->assign("error_text", "An error occurred communicating with the SUSU API.");
} else {
$ismember = $xml[0];
$user = posix_getpwnam($session->username);
if ($ismember!="true") {
$mode='error';
$smarty->assign('error_text', 'Member does not appear to have paid via the SU system. Use the old renewals system if they have paid using some other method');;
} else {
if (renew_member($username, $user['uid'], $user['name'])) {
message_flash("Successfully renewed");
$mode='menu';
} else {
$mode='error';
$smarty->assign('error_text', 'An error occurred renewing account '.$username);
}
}
}
}
}
} else if ($mode == 'renewals') {
//Get list of members according to the SU
$url = "$apibaseurl/GetMemberListData?GroupingId=6613";
$apiReq = curl_init();
curl_setopt($apiReq, CURLOPT_URL, $url);
curl_setopt($apiReq, CURLOPT_RETURNTRANSFER, TRUE);
$apiResult = curl_exec($apiReq);
$sumembers = su_response_decode($apiResult);
if (!$sumembers) {
$mode ='error';
$smarty->assign("error_text", "An error occurred communicating with the SUSU API.");
} else {
$matches = array();
$others=0;
$paidup=0;
foreach ($sumembers as $sumem) {
$sucsmem = get_sucs_record($sumem['uni_card_number']);
if ($sucsmem && $sucsmem['paid'] != paidUntil(time()) && $sucsmem['type']==1) {
$matches[]=array($sumem['firstName']." ".$sumem['lastName'], $sucsmem['realname'], $sumem['uni_card_number'], $sucsmem['username'], $sucsmem['paid']);
} else if ($sucsmem && $sucsmem['paid'] == paidUntil(time())) {
$others++;
$paidup++;
} else {
$others++;
}
}
$smarty->assign("matches", $matches);
$smarty->assign("others", $others);
$smarty->assign("paidup", $paidup);
$smarty->assign("pending", $others - $paidup);
}
} else if ($mode == 'renewals2') {
$failures = array();
$successes = array();
if (empty($_REQUEST['renew'])) {
$mode='error';
$smarty->assign("error_text", "Can't renew an empty list!");
} else {
foreach($_REQUEST['renew'] as $user) {
$admin_user=posix_getpwnam($session->username);
if (renew_member($user, $admin_user['uid'], $admin_user['name'])) {
$successes[]=$user;
} else {
$failures[]=$user;
}
}
$smarty->assign("attempt", count($_REQUEST['renew']));
$smarty->assign("failures", count($failures));
$smarty->assign("failusers", $failures);
$smarty->assign("successes", count($successes));
}
} else if ($mode == 'list') {
//Get list of members according to the SU
$url="$apibaseurl/GetMemberListData?GroupingId=6613";
$apiReq = curl_init();
curl_setopt($apiReq, CURLOPT_URL, $url);
curl_setopt($apiReq, CURLOPT_RETURNTRANSFER, TRUE);
$apiResult = curl_exec($apiReq);
$sumembers = su_response_decode($apiResult);
if (!$sumembers) {
$mode='error';
$smarty->assign("error_text", "An error occurred communicating with the SUSU API.");
} else {
$matches = array();
foreach ($sumembers as $sumem) {
$sucsmem = get_sucs_record($sumem['uni_card_number']);
if ($sucsmem) {
$matches[]=array($sumem['firstName']." ".$sumem['lastName'], $sucsmem['realname'], $sumem['uni_card_number'], $sucsmem['username'], $sucsmem['paid']);
} else {
$matches[]=array($sumem['firstName']." ".$sumem['lastName'], "N/A", $sumem['uni_card_number'], "N/A", "Not signed up");
}
}
function sortbypaid($a, $b) {
//Lets us array sort by final column ('Paid')
return ($a[4] < $b[4]) ? -1 : 1;
}
usort($matches, 'sortbypaid');
$smarty->assign("matches", $matches);
}
}
$smarty->assign('renewables', get_renewable_members());
//Setup smarty magic, step 1
$smarty->assign("staff", TRUE);
// if no mode has been requested then show options
if (!isset($_REQUEST['mode'])) {
$mode = 'menu';
} else {
$mode = urldecode($_REQUEST['mode']);
}
// We have a mode, lets try and work out wtf they want to do
// they have typed in a sid and want to bootstrap the signup processs
if ($mode == 'search') {
if (empty($_REQUEST['sid']) || empty($_REQUEST['snsubmit'])) {
$mode = 'error';
$smarty->assign("error_text", "Invalid search request");
} else {
$pres = preg_match("/^[0-9]{6}$/", $_REQUEST['sid'], $sid);
if ($pres != 1) {
$mode = 'error';
$smarty->assign("error_text", "Search term doesn't look like a valid student ID");
} else {
// they have given us a valid sid lets check to see if they have paid
$sid = $_REQUEST['sid'];
// make sure the user/admin/exec isn't an idiot
// check if they are already signed up and tell them so
$tmpresult = $sucsDB->Execute("SELECT * FROM members WHERE sid=?", array($_REQUEST['sid']));
if ($tmpresult->fields["sid"] == $sid && $tmpresult->fields["paid"] == paidUntil(time())) {
// let them know they are already signed up and renewed
$mode = 'error';
message_flash("You are a numpty and have already signed up and paid for this year.");
// else if check to see if they have signedup and paid for the new year but haven't renewed
} else if ($tmpresult->fields["sid"] == $sid && $tmpresult->fields["paid"] != paidUntil(time())) {
// renew them!
$mode = 'error';
renew_membership($tmpresult->fields["username"]);
// let them know that their account has been renewed
message_flash("Your SUCS account has been renewed.");
} else {
if (check_su_sid($_REQUEST['sid'])) {
// lets make them a signup slip
$pass = make_password();
$query = "INSERT INTO signup (password,sid,issuedby) VALUES ( ?, ?, ?) RETURNING id";
$attribs[] = $pass;
$attribs[] = $_REQUEST['sid'];
$attribs[] = '99999'; //SUCS Magic internal use UID
$id = $sucsDB->Execute($query, $attribs);
$id = $id->fields['id'];
if (!$id) {
$mode = "error";
$smarty->assign("error_text", "An error occurred generating a signup ID. Report the following message to the admins:<br /><pre>" . $sucsDB->ErrorMsg() . "</pre>");
} else {
$smarty->assign('slipid', $id);
$smarty->assign('slippass', $pass);
$smarty->assign('sid', $_REQUEST['sid']);
}
} else {
$mode = 'error';
$smarty->assign("error_text", "Student does not appear to have paid. Extract fees");
}
}
}
}
// mass renewals page
} else if ($mode == 'renewals') {
$matches = array();
$others = 0;
$paidup = 0;
foreach ($just_members as $sumem) {
$sucsmem = get_sucs_record($sumem['card_number']);
if ($sucsmem && $sucsmem['paid'] != paidUntil(time()) && $sucsmem['type'] == 1) {
$matches[] = array($sumem['purchaser'], $sucsmem['realname'], $sumem['card_number'], $sucsmem['username'], $sucsmem['paid']);
} else if ($sucsmem && $sucsmem['paid'] == paidUntil(time())) {
$others++;
$paidup++;
} else {
$others++;
}
}
$smarty->assign("matches", $matches);
$smarty->assign("others", $others);
$smarty->assign("paidup", $paidup);
$smarty->assign("pending", $others - $paidup);
} else if ($mode == 'renewals2') {
$failures = array();
$successes = array();
if (empty($_REQUEST['renew'])) {
$mode = 'error';
$smarty->assign("error_text", "Can't renew an empty list!");
} else {
foreach ($_REQUEST['renew'] as $user) {
if (admin_renew_member($user, $session->username)) {
$successes[] = $user;
} else {
$failures[] = $user;
}
}
$smarty->assign("attempt", count($_REQUEST['renew']));
$smarty->assign("failures", count($failures));
$smarty->assign("failusers", $failures);
$smarty->assign("successes", count($successes));
}
} else if ($mode == 'list') {
$matches = array();
foreach ($just_members as $sumem) {
$sucsmem = get_sucs_record($sumem['card_number']);
if ($sucsmem) {
$matches[] = array($sumem['purchaser'], $sucsmem['realname'], $sumem['card_number'], $sucsmem['username'], $sucsmem['paid']);
} else {
$matches[] = array($sumem['purchaser'], "N/A", $sumem['card_number'], "N/A", "Not signed up");
}
}
function sortbypaid($a, $b)
{
//Lets us array sort by final column ('Paid')
return ($a[4] < $b[4]) ? -1 : 1;
}
usort($matches, 'sortbypaid');
$smarty->assign("matches", $matches);
}
$smarty->assign('renewables', get_renewable_members());
}
......@@ -301,73 +150,46 @@ $body = $smarty->fetch("susignup-admin.tpl");
$smarty->assign('body', $body);
$smarty->assign("extra_styles", array("$baseurl/css/susignup-admin.css"));
function su_response_decode($text) {
global $smarty;
libxml_use_internal_errors(true);
$xml=simplexml_load_string($text);
if (!$xml || isset($xml->head->title)) {
return false;
} else {
return json_decode($xml[0],TRUE);
}
}
function get_sucs_record($sid)
{
global $sucsDB;
function get_sucs_record($sid) {
global $sucsDB;
$query = "SELECT * FROM members WHERE sid=?;";
$res = $sucsDB->Execute($query, array($sid));
if (!$res || $res->RecordCount()<>1) {
return FALSE;
}
return $res->FetchRow();
$query = "SELECT * FROM members WHERE sid=?;";
$res = $sucsDB->Execute($query, array($sid));
if (!$res || $res->RecordCount() <> 1) {
return FALSE;
}
return $res->FetchRow();
}
function get_renewable_members() {
global $sucsDB;
$q = "SELECT username, username||' ('||realname||')' AS display FROM members, member_type WHERE paid != ? AND type=1 AND type=member_type.id ORDER BY paid;";
$r = $sucsDB->Execute($q, array(paidUntil(time())));
if(!$r) {
return FALSE;
}
$retvals = array();
while ($rec=$r->FetchRow()) {
$retvals[$rec['username']]=$rec['display'];
}
return $retvals;
function get_renewable_members()
{
global $sucsDB;
$q = "SELECT username, username||' ('||realname||')' AS display FROM members, member_type WHERE paid != ? AND type=1 AND type=member_type.id ORDER BY paid;";
$r = $sucsDB->Execute($q, array(paidUntil(time())));
if (!$r) {
return FALSE;
}
$retvals = array();
while ($rec = $r->FetchRow()) {
$retvals[$rec['username']] = $rec['display'];
}
return $retvals;
}
function renew_member($renew_name, $admin_uid, $admin_name) {
global $sucsDB;
$q="UPDATE members SET paid=?, lastupdate=DEFAULT, lastedit=? WHERE username=?;";
$r=$sucsDB->Execute($q, array(paidUntil(time()), $admin_uid, $renew_name));
if (!$r) {
print $sucsDB->ErrorMsg();
return FALSE;
} else {
$q="SELECT email, typename FROM members, member_type WHERE username=? AND type=member_type.id;";
$r=$sucsDB->Execute($q, array($renew_name));
$message = "Account Renewal notification\n\n";
$message .= "Account : ".$renew_name."\n";
$message .= "User Type : ".$r->fields['typename']."\n";
$message .= "Renewed by: ".$admin_name."\n\n";
$message .= "**** Payment was made via the SU payments system ****\n";
$message .= "Regards\n The SU Renewals script";
mail("treasurer@sucs.org","Account Renewal",$message);
$message = "Your Swansea University Computer Society (SUCS) membership has been renewed\n\n";
$message .= "Username: ".$renew_name."\n";
$message .= "If you do not know or have forgotten your password, please email admin@sucs.org to arrange for it to be changed.\n\n";
$message .= "Regards\n The SUCS admin";
$header = "From: admin@sucs.org\r\n";
$header .= "Reply-To: admin@sucs.org";
// Personal account
mail($r->fields['email'],"SUCS account renewal",$message,$header);
// sucs account
mail($renew_name."@sucs.org","SUCS account renewal",$message,$header);
return TRUE;
}
function admin_renew_member($renew_name, $admin_name)
{
global $sucsDB;
renew_membership($renew_name);
$q = "SELECT email, typename FROM members, member_type WHERE username=? AND type=member_type.id;";
$r = $sucsDB->Execute($q, array($renew_name));
$message = "Account Renewal notification\n\n";
$message .= "Account : " . $renew_name . "\n";
$message .= "User Type : " . $r->fields['typename'] . "\n";
$message .= "Renewed by: " . $admin_name . "\n\n";
$message .= "**** Payment was made via the SU payments system ****\n";
$message .= "Regards\n The SU Renewals script";
mail("exec@sucs.org", "Account Renewal", $message);
return TRUE;
}
<?php
//unique society identifier
$GroupingID = "6613";
// gib errars plox
//error_reporting(E_ALL);
//ini_set('display_errors', 1);
// this is the php for sucs.org/susignup
// Include shit we need. like the renew_membership fucntion
include "../lib/member_functions.php";
include "../lib/date.php";
include "../suapi.inc.php";
$error_email = "admin@sucs.org";
$mode = 'login';
//login
if(!empty($_REQUEST['sid'])&&!empty($_REQUEST['transactionID'])){
//set signup details
$sid = $_REQUEST['sid'];
$transactionID = $_REQUEST['transactionID'];
//set POST variables
$url = "https://$suapi_user:$suapi_pass@su-api.sucs.org/memberships/Membership.asmx/GetMemberByTransactionID";
$fields = array(
'transactionID'=>urlencode($transactionID),
'GroupingID'=>urlencode($GroupingID),
);
//url-ify the data for the POST
$field_string = "";
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string,'&');
//open connection
$ch = curl_init();
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
//execute post
$result = curl_exec($ch);
//close connection
curl_close($ch);
if(!$result){
$mode = "error";
$smarty->assign("error_text", "Invalid query returned");
} else {
libxml_use_internal_errors(true);
$xml=simplexml_load_string($result);
if (!$xml||isset($xml->head->title)) {
$mode='error';
$smarty->assign("error_text", "An error occurred communicating with the SUSU API");
} else{
$re1='.*?';
$re2='(\\{.*?\\})';
if ($c=preg_match_all ("/".$re1.$re2."/is", $result, $matches))
{
$json_string=$matches[1][0];
} else{
$mode = "error";
}
$array = json_decode($json_string,TRUE);
if($array['cardNumber'] == $sid && $sid != ""){
$mode = 'form';
// connect to sucs database
$sucsDB = NewADOConnection('postgres8');
// SET THIS FOR DEBUG MODE
// $sucsDB->debug = true;
// SET THIS TO YOUR DB FOR TESTING
$sucsDB->Connect('dbname=sucs user=apache');
$sucsDB->SetFetchMode(ADODB_FETCH_ASSOC);
$fullName = $array['firstName']." ".$array['lastName'];
$query = "INSERT INTO transactions (transactionID,fullName,emailAddress,cardNumber,personID) values(?, ?, ?, ?, ?)";
$attribs[] = $transactionID;
$attribs[] = $fullName;
$attribs[] = $array['emailAddress'];
$attribs[] = $array['cardNumber'];
$attribs[] = $array['personID'];
$valid = true;
if(!$sucsDB->Execute($query,$attribs)) {
// We did this because Adodb ErrorNo command is broken
$query = "SELECT * FROM transactions WHERE transactionID = ?";
unset($attribs);
$attribs[]=$transactionID;
if($sucsDB->Execute($query,$attribs)) {
$query = "SELECT * FROM transactions WHERE transactionID = ?";
$attribs= array();
$attribs[]=$transactionID;
$data = $sucsDB->GetAll($query,$attribs);
if(is_array($data)&&sizeof($data)==1&&$data[0]['signupid']==NULL){
// As it stands this shouldn't happen but if it does, no reason not to let them carry on
$valid = true;
} elseif(is_array($data)&&sizeof($data)==1&&$data[0]['signupid']!=NULL) {
$query = "SELECT * FROM signup WHERE sid = ?";
unset($attribs);
$attribs[]=$sid;
$data = $sucsDB->Execute($query, $attribs);
if(!$data) {
mail(
$error_email,
"SUSignup Error",
"An error occured in the susignup system at stage 0\n Love the signup system.\n\nP.S. The Error is:\n ".$sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$valid=false;
} else if($data->fields['username']!=NULL){
$smarty->assign("username", $data->fields['username']);
$mode='numpty2';
// This happens if they already ahve a SUCS account and are trying to create a new signupid
$valid = false;
} else {
$smarty->assign("id", $data->fields['id']);
$smarty->assign("pass", $data->fields['password']);
$mode='numpty';
// If this happens they tried to get a new signupid/pass after already getting one, and should get weekly reminders about it
$valid = false;
}
} else {
$mode="error";
mail(
$error_email,
"SUSignup Error",
"An error occured in the susignup system at stage 1\n Love the signup system.\n\nP.S. The Error is:\n ".$sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
// include the suapiv2 stuff like check_su_sid_and_trans()
include "../lib/suapiv2.php";
$valid = false;
}
} else {
$mode="error";
mail(
$error_email,
"SUSignup Error",
"An error occured in the susignup system at stage 2\n Love the signup system.\n\nP.S. The Error is:\n ".$sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
$valid = false;
}
}
if($valid)
{
unset($attribs);
unset($query);
$query = "SELECT * FROM members WHERE sid = ?";
$attribs[] = $sid;
unset($data);
$data = $sucsDB->Execute($query, $attribs);
if (!$data) {
$mode = "error";
$smarty->assign("error_text", "Error in internal database check");
} elseif ($data->RecordCount()==1) {
$mode = "renew";
$q="UPDATE members SET paid=?, lastupdate=DEFAULT, lastedit=? WHERE username=?;";
$r=$sucsDB->Execute($q, array(paidUntil(time()), '99999', $data->fields['username']));
if (!$r) {
mail(
$error_email,
"SUSignup Error",
"An error occured in the susignup system at stage 2.5\n Love the signup system.\n\nP.S. The Error is:\n ".$sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
// since the rewrite by ~imranh this no longer sends out emails
// feel free to add it
// Where do errors go?
$error_email = "admin@sucs.org";
} else {
$q="SELECT email, typename FROM members, member_type WHERE username=? AND type=member_type.id;";
$r=$sucsDB->Execute($q, array($data->fields['username']));
// By default display a page asking for sid and transid
// this is called "login"
$mode = 'login';
$message = "Account Renewal notification\n\n";
$message .= "Account : ".$data->fields['username']."\n";
$message .= "User Type : ".$r->fields['typename']."\n";
$message .= "Renewed by: ".$data->fields['username'].".\n\n";
$message .= "**** Payment was made via the SU payments system ****\n";
$message .= "Regards\n The SU Renewals script";
mail("treasurer@sucs.org","Account Renewal",$message);
$message = "Your Swansea University Computer Society (SUCS) membership has been renewed\n\n";
$message .= "Username: ".$renew_name."\n";
$message .= "If you do not know or have forgotten your password, please email admin@sucs.org to arrange for it to be changed.\n\n";
$message .= "Regards\n The SUCS admin";
$header = "From: admin@sucs.org\r\n";
$header .= "Reply-To: admin@sucs.org";
// Personal account
mail($r->fields['email'],"SUCS account renewal",$message,$header);
// sucs account
mail($data->fields['username']."@sucs.org","SUCS account renewal",$message,$header);
unset($query);
unset($attribs);
$query = "UPDATE transactions set signupid=? WHERE transactionID=?";
$attribs[]="000";
$attribs[]=$transactionID;
$data = $sucsDB->Execute($query,$attribs);
if (!$data) {
$mode="error";
mail(
$error_email,
"SUSignup Error",
"An error occured in the susignup system at stage 2.6\n Love the signup system.\n\nP.S. The Error is:\n ".$sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
}
}
} else {
$pass = make_password();
unset($query);
$query = "insert into signup (password,sid,issuedby) values( ?, ?, ?) returning id";
unset($attribs);
$attribs[]=$pass;
$attribs[]=$array['cardNumber'];
$attribs[]='99999';
$iddata = $sucsDB->Execute($query,$attribs);
$id = $iddata->fields['id'];
if (!$iddata) {
$mode="error";
mail(
$error_email,
"SUSignup Error",
"An error occured in the susignup system at stage 3\n Love the signup system.\n\nP.S. The Error is:\n ".$sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
} else {
$query = "update transactions set signupid=? WHERE transactionID=?";
unset($attribs);
$attribs[]=$id;
$attribs[]=$transactionID;
if(!$sucsDB->Execute($query,$attribs)) {
$mode="error";
mail(
$error_email,
"SUSignup Error",
"An error occured in the susignup system at stage 4\n Love the signup system.\n\nP.S. The Error is:\n ".$sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
print($sucsDB->ErrorMsg());
} else {
$smarty->assign("id", $id);
$smarty->assign("pass", $pass);
mail(
$array['emailAddress'].','.$sid.'@swansea.ac.uk',
"SUCS Signup Information",
"Thankyou for joining Swansea University Computer Society, your signup details are below;\nSignupID: $id\nSignup Password: $pass\nIf you have successfully completed signup immediately then you can disregard this message.\n\nSUCS Admin Team.",
"From: \"SUCS Admin\" <admin@sucs.org>"
);
}
}
}
}
}
}
}
// if somone has post'd data to the page then do shit
if (!empty($_REQUEST['sid']) && !empty($_REQUEST['transactionID'])) {
// stick the post'd data in a variable we can call easily
$sid = $_REQUEST['sid'];
$transactionID = $_REQUEST['transactionID'];
// check if the data posted is valid
if (check_su_sid_and_trans($sid, $transactionID)) {
// probe the db for some info thatwe want to use in the if statements below
$tmpresult = $sucsDB->Execute("SELECT * FROM members WHERE sid=?", array($sid));
$signuptmpresult = $sucsDB->Execute("SELECT * FROM signup WHERE sid=?", array($sid));
// check to see if they are already a valid and paid member
if ($tmpresult->fields["sid"] == $sid && $tmpresult->fields["paid"] == paidUntil(time())) {
// let them know they are already signed up and renewed
message_flash("You are a numpty and have already signed up and paid for this year.");
// else if check to see if they have signedup and paid for the new year but haven't renewed
} else if ($tmpresult->fields["sid"] == $sid && $tmpresult->fields["paid"] != paidUntil(time())) {
// renew them!
renew_membership($tmpresult->fields["username"]);
// let them know that their account has been renewed
message_flash("Your SUCS account has been renewed.");
// else if they aren't in the SUCS DB but have a signup slip, take them back to that part of signup
} else if ($tmpresult->fields == false && $signuptmpresult->fields["sid"] == $sid && $signuptmpresult->fields["activated"] == NULL) {
$mode = "form";
$smarty->assign("id", $signuptmpresult->fields["id"]);
$smarty->assign("pass", $signuptmpresult->fields["password"]);
$smarty->assign("sid", $signuptmpresult->fields["sid"]);
// else if they aren't in the SUCS DB, then bootstrap signup process
} else if ($tmpresult->fields == false) {
$mode = "form";
$pass = make_password();
$iddata = $sucsDB->Execute("insert into signup (password,sid,issuedby) values( ?, ?, ?) returning id", array($pass, $sid, "99999"));
$id = $iddata->fields['id'];
$smarty->assign("id", $id);
$smarty->assign("pass", $pass);
$smarty->assign("sid", $sid);
} else {
// they should never get here
die("You'll see this if there has been a database error. Someone probably knows and is trying to fix it. Sorry.");
}
} else {
trigger_error("That Student Number and Transaction ID combo are invalid.", E_USER_ERROR);
}
}
$smarty->assign("mode", $mode);
$output = $smarty->fetch("susignup.tpl");
......
<?php
$uritable="shorturi";
<?php
$uritable = "shorturi";
$chrs = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S' ,'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
$chrs = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
$output = "";
function int_to_alph($int, $chrs) {
$int = (int) $int;
$base = (int) sizeof($chrs);
$alph = "";
do {
$alph = $chrs[($int % $base)] . $alph;
} while($int = intval($int / $base));
return $alph;
function int_to_alph($int, $chrs)
{
$int = (int)$int;
$base = (int)sizeof($chrs);
$alph = "";
do {
$alph = $chrs[($int % $base)] . $alph;
} while ($int = intval($int / $base));
return $alph;
}
function alph_to_int($alph, $chrs) {
$base = sizeof($chrs);
for($i = 0, $int = 0; $i < strlen($alph); $i++) {
$int += intval(array_search(substr($alph, strlen($alph) - $i - 1, 1), $chrs)) * pow($base, $i);
}
return (int) $int;
function alph_to_int($alph, $chrs)
{
$base = sizeof($chrs);
for ($i = 0, $int = 0; $i < strlen($alph); $i++) {
$int += intval(array_search(substr($alph, strlen($alph) - $i - 1, 1), $chrs)) * pow($base, $i);
}
return (int)$int;
}
if (isset($pathlist[3])) {
$url=$DB->GetOne("select url from $uritable where id='".alph_to_int($pathlist[3], $chrs)."'");
$url = $DB->GetOne("select url from $uritable where id='" . alph_to_int($pathlist[3], $chrs) . "'");
if ($url) {
header('Location: '.$url);
} else {
echo "URL not found";
}
if ($url) {
header('Location: ' . $url);
} else {
echo "URL not found";
}
} else {
if ($session->loggedin) {
if (@$_REQUEST['action']) {
$shorturi=$DB->GetOne("select id from $uritable where url=?", array(@$_REQUEST['uri']));
if (!$shorturi) {
$headers=get_headers($_REQUEST['uri'], 1);
if ($headers) {
if (preg_match("/ 4/", $headers[0])) {
trigger_error("HTTP 4xx error detected - not creating ShortURI", E_USER_WARNING);
} else {
$record['url'] = @$_REQUEST['uri'];
$record['creator'] = $session->username;
$record['created'] = "now";
$DB->AutoExecute($uritable, $record, 'INSERT');
$shorturi=$DB->GetOne("select id from $uritable where url=?", array(@$_REQUEST['uri']));
}
} else {
trigger_error("URI supplied is not valid", E_USER_WARNING);
}
}
if ($session->loggedin) {
if (@$_REQUEST['action']) {
$shorturi = $DB->GetOne("select id from $uritable where url=?", array(@$_REQUEST['uri']));
if (!$shorturi) {
$headers = get_headers($_REQUEST['uri'], 1);
if ($headers) {
if (preg_match("/ 4/", $headers[0])) {
trigger_error("HTTP 4xx error detected - not creating ShortURI", E_USER_WARNING);
} else {
$record['url'] = @$_REQUEST['uri'];
$record['creator'] = $session->username;
$record['created'] = "now";
$DB->AutoExecute($uritable, $record, 'INSERT');
$shorturi = $DB->GetOne("select id from $uritable where url=?", array(@$_REQUEST['uri']));
}
} else {
trigger_error("URI supplied is not valid", E_USER_WARNING);
}
}
if ($shorturi>0) $smarty->assign("uri", "http://".$_SERVER['SERVER_NAME']."/uri/".int_to_alph($shorturi, $chrs));
}
if ($shorturi > 0) $smarty->assign("uri", "http://" . $_SERVER['SERVER_NAME'] . "/uri/" . int_to_alph($shorturi, $chrs));
}
} else {
trigger_error("You are not logged in", E_USER_WARNING);
}
} else {
trigger_error("You are not logged in", E_USER_WARNING);
}
}
$output = $smarty->fetch('uri.tpl');
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
DELETE FROM session;
ALTER TABLE session DROP COLUMN time;
ALTER TABLE session ADD COLUMN logintime timestamp(0) without time zone;
ALTER TABLE session ADD COLUMN lastseen timestamp(0) without time zone;
DELETE FROM menu WHERE title='Bananas';
<!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
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="sucs.org" />
<allow-access-from domain="www.sucs.org" />
<allow-access-from domain="www.swansea-union.co.uk" />
<allow-access-from domain="swansea-union.co.uk" />
<allow-access-from domain="stream.sucs.org" />
<allow-access-from domain="www.fomore.com" />
</cross-domain-policy>
.archivelink {
text-align: right;
text-align: right;
}
ul.blognav {
text-align: left;
float: left;
width: 100%;
list-style-type: none;
margin: 0;
padding: 0;
text-align: left;
float: left;
width: 100%;
list-style-type: none;
margin: 0;
padding: 0;
}
li.prev {
float: left;
float: left;
}
li.next {
float: right;
float: right;
}
.errorinfo {
color: red;
color: red;
}
#spinner {
visibility: hidden;
margin-left: 4px;
margin-right: 4px;
visibility: hidden;
margin-left: 4px;
margin-right: 4px;
}
......@@ -2,95 +2,103 @@
================================================*/
/* Default styling. Used when JavaScript is unsupported */
.cbb {
padding: 5px 10px;
margin:1em 0;
margin-left: 0.5em;
margin-right: 0.5em;
background:#e76808;
font-size: 85%;
}
padding: 5px 10px;
margin: 1em 0;
margin-left: 0.5em;
margin-right: 0.5em;
background: #e76808;
font-size: 85%;
}
.cbb h1 {
margin:0 -10px;
padding:0.3em 10px;
background:#efece6;
font:bold 1.2em Arial, Helvetica, sans-serif;
}
margin: 0 -10px;
padding: 0.3em 10px;
background: #efece6;
font: bold 1.2em Arial, Helvetica, sans-serif;
}
div.cbb img.emblem, div.cb img.emblem {
float: right;
position: relative;
top: -1.5em;
float: right;
position: relative;
top: -1.5em;
}
/* Insert the custom corners and borders for browsers with sufficient JavaScript support */
/* Two of the boxes are floated just for this demo. Adjust to your needs. */
.cb {
margin:0.5em 0;
font-size: 85%;
}
margin: 0.5em 0;
font-size: 85%;
}
.two {
width:45%;
float:left;
}
width: 45%;
float: left;
}
.three {
width:45%;
float:right;
}
width: 45%;
float: right;
}
/* Rules for the top corners and border */
.bt {
background:url('/images/box.png') no-repeat 100% 0;
margin:0 0 0 19px;
height:18px;
}
background: url('/images/box.png') no-repeat 100% 0;
margin: 0 0 0 19px;
height: 18px;
}
.bt div {
height:18px;
width:19px;
position:relative;
left:-19px;
background:url('/images/box.png') no-repeat 0 0;
}
height: 18px;
width: 19px;
position: relative;
left: -19px;
background: url('/images/box.png') no-repeat 0 0;
}
/* Rules for the bottom corners and border */
.bb {
background:url('/images/box.png') no-repeat 100% 100%;
margin:0 0 0 19px;
height:18px;
}
background: url('/images/box.png') no-repeat 100% 100%;
margin: 0 0 0 19px;
height: 18px;
}
.bb div {
height:18px;
width:19px;
position:relative;
left:-19px;
background:url('/images/box.png') no-repeat 0 100%;
}
height: 18px;
width: 19px;
position: relative;
left: -19px;
background: url('/images/box.png') no-repeat 0 100%;
}
/* Insert the left border */
.i1 {
padding:0 0 0 12px;
background:url('/images/borders.png') repeat-y 0 0;
height: 100%;
}
padding: 0 0 0 12px;
background: url('/images/borders.png') repeat-y 0 0;
height: 100%;
}
/* Insert the right border */
.i2 {
padding:0 12px 0 0;
background:url('/images/borders.png') repeat-y 100% 0;
}
padding: 0 12px 0 0;
background: url('/images/borders.png') repeat-y 100% 0;
}
/* Wrapper for the content. Use it to set the background colour and insert some padding between the borders and the content. */
.i3 {
background:#e76808;
border:1px solid #e76808;
border-width:1px 0;
padding:0 10px;
}
background: #e76808;
border: 1px solid #e76808;
border-width: 1px 0;
padding: 0 10px;
}
.cbb h3, .cb h3 {
margin: 0;
color: #ffc62b;
margin: 0;
color: #ffc62b;
}
.cbb p, .cb p, .cbb ul, .cb ul {
margin: 0;
margin: 0;
}
/* --------------------------------------------------
......@@ -98,15 +106,15 @@ div.cbb img.emblem, div.cb img.emblem {
-------------------------------------------------- */
.cb a:link, .cbb a:link {
color: #ffc62b;
color: #ffc62b;
}
.cb a:visited, .cbb a:visited {
color: #a52f0f;
color: #a52f0f;
}
.cb a:active, .cbb a:active {
color: #ffffff;
color: #ffffff;
}
.cb a:hover, .cbb a:hover {
......
/* Serve gif images to IE/Win pre version 7 */
.i1, .i2 {
background-image:url('/images/borders.gif');
background-image: url('/images/borders.gif');
}
.bt, .bt div, .bb, .bb div {
background-image:url('/images/box.gif');
background-image: url('/images/box.gif');
}
/* Set a height to fix up some rendering issues. */
.i1, .i3 {
height:1px;
height: 1px;
}
......@@ -3,130 +3,128 @@
-------------------------------------------------- */
body {
font-family: Arial, sans-serif;
font-family: Arial, sans-serif;
}
p {
line-height: 1.4em;
line-height: 1.4em;
}
form {
margin-top: 0;
margin-bottom: 1em;
margin-top: 0;
margin-bottom: 1em;
}
img {
border: 0;
border: 0;
}
h1, h2, h3, h4, h5, h6 {
text-align: left;
margin-bottom: 0;
text-align: left;
margin-bottom: 0;
}
h2+p, h2+ul, h2+ol, h3+p, h3+ul, h3+ol, h4+p, h4+ul, h4+ol {
margin-top: 0;
h2 + p, h2 + ul, h2 + ol, h3 + p, h3 + ul, h3 + ol, h4 + p, h4 + ul, h4 + ol {
margin-top: 0;
}
#project pre, #plan pre {
margin: 0;
margin: 0;
}
dd {
margin-bottom: 0.5em;
margin-bottom: 0.5em;
}
acronym, abbr {
text-transform: lowercase;
font-variant: small-caps;
text-transform: lowercase;
font-variant: small-caps;
}
/* --------------------------------------------------
Branding
-------------------------------------------------- */
#branding {
width: 100%;
height: 5.2em;
min-height: 76px;
overflow: hidden;
width: 100%;
height: 5.2em;
min-height: 76px;
overflow: hidden;
}
#brandingC {
width: 100%;
height: 100%;
float: left;
width: 100%;
height: 100%;
float: left;
}
#logo {
float: left;
padding: 0.2em;
min-width: 170px;
width: 17%;
float: left;
padding: 0.2em;
min-width: 170px;
width: 17%;
}
#title {
float: left;
padding-left: 0.5em;
float: left;
padding-left: 0.5em;
}
#title h1 {
margin-top: 0.4em;
margin-top: 0.4em;
}
#loginForm form {
margin: 0;
margin: 0;
}
/* --------------------------------------------------
Columns
-------------------------------------------------- */
#primaryC {
margin: 0.5em 0;
text-align: justify;
margin: 0.5em 0;
text-align: justify;
}
#primaryC > *:first-child {
margin-top: 0;
padding-top: 0;
margin-top: 0;
padding-top: 0;
}
.clear {
clear: both;
height: 0;
margin: 0;
padding: 0;
clear: both;
height: 0;
margin: 0;
padding: 0;
}
/* --------------------------------------------------
Content box (e.g. for news items)
-------------------------------------------------- */
.box, .error {
margin: 0.5em 0;
margin: 0.5em 0;
}
.box div.boxcontent, .error div.errorcontent {
padding: 0 0.5em;
padding: 0 0.5em;
}
.box .boxhead h2, .box .boxhead h3, .box .boxfoot p, .error h3 {
margin: 0;
padding: 0 0.5em;
margin: 0;
padding: 0 0.5em;
}
.box .boxfoot p {
text-align: right;
font-weight: bold;
font-size: 95%;
text-align: right;
font-weight: bold;
font-size: 95%;
}
.box div.boxcontent img.emblem {
float: right;
position: relative;
top: -1.5em;
float: right;
position: relative;
top: -1.5em;
}
/* --------------------------------------------------
......@@ -134,29 +132,29 @@ acronym, abbr {
-------------------------------------------------- */
ol.roman {
list-style-type: lower-roman;
list-style-type: lower-roman;
}
dt {
font-weight: bold;
font-weight: bold;
}
ul.boxes {
display: inline;
display: inline;
}
ul.boxes li {
float: left;
display: inline;
text-align: center;
margin-right: 1em;
float: left;
display: inline;
text-align: center;
margin-right: 1em;
}
dd#plan, dd#project {
margin-left: 0;
word-wrap: break-word;
white-space: pre-wrap;
font-family: monospace;
margin-left: 0;
word-wrap: break-word;
white-space: pre-wrap;
font-family: monospace;
}
/* --------------------------------------------------
......@@ -164,25 +162,25 @@ dd#plan, dd#project {
-------------------------------------------------- */
table {
text-align: left;
text-align: left;
}
table.wide {
width: 100%;
width: 100%;
}
table.border, table.border td, table.border th {
border: 1px solid #e76808;
border-collapse: collapse;
border: 1px solid #e76808;
border-collapse: collapse;
}
table.border {
border-width: 2px;
border-width: 2px;
}
table.border td, table.border th {
padding: 0.2em;
vertical-align: top;
padding: 0.2em;
vertical-align: top;
}
/* --------------------------------------------------
......@@ -190,23 +188,23 @@ table.border td, table.border th {
-------------------------------------------------- */
div.row {
clear: both;
padding-top: 0.5em;
clear: both;
padding-top: 0.5em;
}
div.row label {
float: left;
width: 20%;
text-align: right;
float: left;
width: 20%;
text-align: right;
}
div.row span.textinput {
float: right;
width: 78%;
text-align: left;
float: right;
width: 78%;
text-align: left;
}
.note {
color: #888888;
font-size: 80%;
color: #888888;
font-size: 80%;
}
.downloads .screenshot {
padding: 0.4em;
margin: 0.2em;
float: right;
text-align: center;
padding: 0.4em;
margin: 0.2em;
float: right;
text-align: center;
}
.downloads h3 {
margin: 0.5em 0 0.2em 0;
padding: 0 0 0.1em 0;
border-bottom: 1px solid #ccc;
font-family: arial, verdana, sans-serif;
font-weight: bold;
margin: 0.5em 0 0.2em 0;
padding: 0 0 0.1em 0;
border-bottom: 1px solid #ccc;
font-family: arial, verdana, sans-serif;
font-weight: bold;
}
.downloads .links {
text-align: right;
font-size: 90%;
text-align: right;
font-size: 90%;
}
/****************************************************************/
/* 1. IMPORTED STYLESHEETS */
/****************************************************************/
/* Import the basic setup styles */
@import url(imports/base.css);
/* Import the colour scheme */
@import url(imports/Cobalt_cs.css);
/****************************************************************/
/* 2. TEXT SETTINGS */
/****************************************************************/
/* 2.1 This sets the default Font Group */
.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP {
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal}
/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/
* HTML .pun {FONT-SIZE: 68.75%}
/* End IE Win Font Size */
/* Set font size for tables because IE requires it */
.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em}
/* 2.2 Set the font-size for preformatted text i.e in code boxes */
.pun PRE {FONT-FAMILY: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace}
/* 2.3 Font size for headers */
.pun H2, .pun H4 {FONT-SIZE: 1em}
.pun H3 {FONT-SIZE: 1.1em}
#brdtitle H1 {FONT-SIZE: 1.4em}
/* 2.4 Larger text for particular items */
DIV.postmsg P {LINE-HEIGHT: 1.4}
DIV.postleft DT {FONT-SIZE: 1.1em}
.pun PRE {FONT-SIZE: 1.2em}
/* 2.5 Bold text */
DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI,
DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold}
/****************************************************************/
/* 3. LINKS */
/****************************************************************/
/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */
#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link,
.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited,
.blockmenu A:link, .blockmenu A:visited {
TEXT-DECORATION: none
}
/* 3.2 Underline on hover for links in headers and main menu */
#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline}
/****************************************************************/
/* 4. BORDER WIDTH AND STYLE */
/****************************************************************/
/* 4.1 By default borders are 1px solid */
DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {
BORDER-STYLE: solid;
BORDER-WIDTH: 1px
}
/* 4.2 Special settings for the board header. */
#brdheader DIV.box {BORDER-TOP-WIDTH: 4px}
/* 4.3 Borders for table cells */
.pun TD, .pun TH {
BORDER-BOTTOM: none;
BORDER-RIGHT: none
}
.pun .tcl {BORDER-LEFT: none}
/* 4.4 Special setting for fieldsets to preserve IE defaults */
DIV>FIELDSET {
BORDER-STYLE: solid;
BORDER-WIDTH: 1px
}
/****************************************************************/
/* 5. VERTICAL AND PAGE SPACING */
/****************************************************************/
/* 5.1 Page margins */
HTML, BODY {MARGIN: 0; PADDING: 0}
#punwrap {margin:12px 20px}
/* 5.2 Creates vertical space between main board elements (Margins) */
DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px}
#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px}
DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px}
/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */
DIV.linkst, DIV.linksb {MARGIN-TOP: -12px}
DIV.postlinksb {MARGIN-TOP: -6px}
/* 5.4 Put a 12px gap above the board information box in index because the category tables only
have a 6px space beneath them */
#brdstats {MARGIN-TOP: 12px}
/****************************************************************/
/* 6. SPACING AROUND CONTENT */
/****************************************************************/
/* 6.1 Default padding for main items */
DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px}
.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0}
.pun H2 {PADDING: 4px 6px}
/* 6.2 Special spacing for various elements */
.pun H1 {PADDING: 3px 0px 0px 0}
#brdtitle P {PADDING-TOP: 0px}
DIV.linkst {PADDING: 8px 6px 3px 6px}
DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px}
#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em}
#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em}
/* 6.4 Create some horizontal spacing for various elements */
#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px}
/****************************************************************/
/* 7. SPACING FOR TABLES */
/****************************************************************/
.pun TH, .pun TD {PADDING: 4px 6px}
.pun TD P {PADDING: 5px 0 0 0}
/****************************************************************/
/* 8. SPACING FOR POSTS */
/****************************************************************/
/* 8.1 Padding around left and right columns in viewtopic */
DIV.postleft DL, DIV.postright {PADDING: 6px}
/* 8.2 Extra spacing for poster contact details and avatar */
DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px}
DD.postavatar {MARGIN-BOTTOM: 5px}
/* 8.3 Extra top spacing for signatures and edited by */
DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px}
/* 8.4 Spacing for code and quote boxes */
DIV.postmsg H4 {MARGIN-BOTTOM: 10px}
.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px}
/* 8.5 Padding for the action links and online indicator in viewtopic */
DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px}
/* 8.6 This is the input on moderators multi-delete view */
DIV.blockpost INPUT, DIV.blockpost LABEL {
PADDING: 3px;
DISPLAY: inline
}
P.multidelete {
PADDING-TOP: 15px;
PADDING-BOTTOM: 5px
}
/* 8.7 Make sure paragraphs in posts don't get any padding */
DIV.postmsg P {PADDING: 0}
/****************************************************************/
/* 9. SPECIAL SPACING FOR FORMS */
/****************************************************************/
/* 9.1 Padding around fieldsets */
DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px}
DIV.inform {PADDING-BOTTOM: 12px}
/* 9.2 Padding inside fieldsets */
.pun FIELDSET {PADDING: 0px 12px 0px 12px}
DIV.infldset {PADDING: 9px 0px 12px 0}
.pun LEGEND {PADDING: 0px 6px}
/* 9.3 The information box at the top of the registration form and elsewhere */
DIV.forminfo {
MARGIN-BOTTOM: 12px;
PADDING: 9px 10px
}
/* 9.4 BBCode help links in post forms */
UL.bblinks LI {PADDING-RIGHT: 20px}
UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px}
/* 9.5 Horizontal positioning for the submit button on forms */
DIV.blockform P INPUT {MARGIN-LEFT: 12px}
/****************************************************************/
/* 10. POST STATUS INDICATORS */
/****************************************************************/
/* 10.1 These are the post status indicators which appear at the left of some tables.
.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and
.isticky = sticky topics. By default only .inew is different from the default.*/
DIV.icon {
FLOAT: left;
MARGIN-TOP: 0.1em;
MARGIN-LEFT: 0.2em;
DISPLAY: block;
BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em;
BORDER-STYLE: solid
}
DIV.searchposts DIV.icon {MARGIN-LEFT: 0}
/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The
margin creates space for the post status indicator */
TD DIV.tclcon {MARGIN-LEFT: 2.3em}
/****************************************************************/
/* 1. IMPORTED STYLESHEETS */
/****************************************************************/
/* Import the basic setup styles */
@import url(imports/base.css);
/* Import the colour scheme */
@import url(imports/Lithium_cs.css);
/****************************************************************/
/* 2. TEXT SETTINGS */
/****************************************************************/
/* 2.1 This sets the default Font Group */
.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP {
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal}
/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/
* HTML .pun {FONT-SIZE: 68.75%}
/* End IE Win Font Size */
/* Set font size for tables because IE requires it */
.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em}
/* 2.2 Set the font-size for preformatted text i.e in code boxes */
.pun PRE {FONT-FAMILY: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace}
/* 2.3 Font size for headers */
.pun H2, .pun H4 {FONT-SIZE: 1em}
.pun H3 {FONT-SIZE: 1.1em}
#brdtitle H1 {FONT-SIZE: 1.4em}
/* 2.4 Larger text for particular items */
DIV.postmsg P {LINE-HEIGHT: 1.4}
DIV.postleft DT {FONT-SIZE: 1.1em}
.pun PRE {FONT-SIZE: 1.2em}
/* 2.5 Bold text */
DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI,
DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold}
/****************************************************************/
/* 3. LINKS */
/****************************************************************/
/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */
#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link,
.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited,
.blockmenu A:link, .blockmenu A:visited {
TEXT-DECORATION: none
}
/* 3.2 Underline on hover for links in headers and main menu */
#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline}
/****************************************************************/
/* 4. BORDER WIDTH AND STYLE */
/****************************************************************/
/* 4.1 By default borders are 1px solid */
DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {
BORDER-STYLE: solid;
BORDER-WIDTH: 1px
}
/* 4.2 Special settings for the board header. */
#brdheader DIV.box {BORDER-TOP-WIDTH: 4px}
/* 4.3 Borders for table cells */
.pun TD, .pun TH {
BORDER-BOTTOM: none;
BORDER-RIGHT: none
}
.pun .tcl {BORDER-LEFT: none}
/* 4.4 Special setting for fieldsets to preserve IE defaults */
DIV>FIELDSET {
BORDER-STYLE: solid;
BORDER-WIDTH: 1px
}
/****************************************************************/
/* 5. VERTICAL AND PAGE SPACING */
/****************************************************************/
/* 5.1 Page margins */
HTML, BODY {MARGIN: 0; PADDING: 0}
#punwrap {margin:12px 20px}
/* 5.2 Creates vertical space between main board elements (Margins) */
DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px}
#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px}
DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px}
/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */
DIV.linkst, DIV.linksb {MARGIN-TOP: -12px}
DIV.postlinksb {MARGIN-TOP: -6px}
/* 5.4 Put a 12px gap above the board information box in index because the category tables only
have a 6px space beneath them */
#brdstats {MARGIN-TOP: 12px}
/****************************************************************/
/* 6. SPACING AROUND CONTENT */
/****************************************************************/
/* 6.1 Default padding for main items */
DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px}
.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0}
.pun H2 {PADDING: 4px 6px}
/* 6.2 Special spacing for various elements */
.pun H1 {PADDING: 3px 0px 0px 0}
#brdtitle P {PADDING-TOP: 0px}
DIV.linkst {PADDING: 8px 6px 3px 6px}
DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px}
#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em}
#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em}
/* 6.4 Create some horizontal spacing for various elements */
#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px}
/****************************************************************/
/* 7. SPACING FOR TABLES */
/****************************************************************/
.pun TH, .pun TD {PADDING: 4px 6px}
.pun TD P {PADDING: 5px 0 0 0}
/****************************************************************/
/* 8. SPACING FOR POSTS */
/****************************************************************/
/* 8.1 Padding around left and right columns in viewtopic */
DIV.postleft DL, DIV.postright {PADDING: 6px}
/* 8.2 Extra spacing for poster contact details and avatar */
DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px}
DD.postavatar {MARGIN-BOTTOM: 5px}
/* 8.3 Extra top spacing for signatures and edited by */
DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px}
/* 8.4 Spacing for code and quote boxes */
DIV.postmsg H4 {MARGIN-BOTTOM: 10px}
.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px}
/* 8.5 Padding for the action links and online indicator in viewtopic */
DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px}
/* 8.6 This is the input on moderators multi-delete view */
DIV.blockpost INPUT, DIV.blockpost LABEL {
PADDING: 3px;
DISPLAY: inline
}
P.multidelete {
PADDING-TOP: 15px;
PADDING-BOTTOM: 5px
}
/* 8.7 Make sure paragraphs in posts don't get any padding */
DIV.postmsg P {PADDING: 0}
/****************************************************************/
/* 9. SPECIAL SPACING FOR FORMS */
/****************************************************************/
/* 9.1 Padding around fieldsets */
DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px}
DIV.inform {PADDING-BOTTOM: 12px}
/* 9.2 Padding inside fieldsets */
.pun FIELDSET {PADDING: 0px 12px 0px 12px}
DIV.infldset {PADDING: 9px 0px 12px 0}
.pun LEGEND {PADDING: 0px 6px}
/* 9.3 The information box at the top of the registration form and elsewhere */
DIV.forminfo {
MARGIN-BOTTOM: 12px;
PADDING: 9px 10px
}
/* 9.4 BBCode help links in post forms */
UL.bblinks LI {PADDING-RIGHT: 20px}
UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px}
/* 9.5 Horizontal positioning for the submit button on forms */
DIV.blockform P INPUT {MARGIN-LEFT: 12px}
/****************************************************************/
/* 10. POST STATUS INDICATORS */
/****************************************************************/
/* 10.1 These are the post status indicators which appear at the left of some tables.
.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and
.isticky = sticky topics. By default only .inew is different from the default.*/
DIV.icon {
FLOAT: left;
MARGIN-TOP: 0.1em;
MARGIN-LEFT: 0.2em;
DISPLAY: block;
BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em;
BORDER-STYLE: solid
}
DIV.searchposts DIV.icon {MARGIN-LEFT: 0}
/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The
margin creates space for the post status indicator */
TD DIV.tclcon {MARGIN-LEFT: 2.3em}
/****************************************************************/
/* 1. IMPORTED STYLESHEETS */
/****************************************************************/
/* Import the basic setup styles */
@import url(imports/base.css);
/* Import the colour scheme */
@import url(imports/Mercury_cs.css);
/****************************************************************/
/* 2. TEXT SETTINGS */
/****************************************************************/
/* 2.1 This sets the default Font Group */
.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP {
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal}
/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/
* HTML .pun {FONT-SIZE: 68.75%}
/* End IE Win Font Size */
/* Set font size for tables because IE requires it */
.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em}
/* 2.2 Set the font-size for preformatted text i.e in code boxes */
.pun PRE {FONT-FAMILY: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace}
/* 2.3 Font size for headers */
.pun H2, .pun H4 {FONT-SIZE: 1em}
.pun H3 {FONT-SIZE: 1.1em}
#brdtitle H1 {FONT-SIZE: 1.4em}
/* 2.4 Larger text for particular items */
DIV.postmsg P {LINE-HEIGHT: 1.4}
DIV.postleft DT {FONT-SIZE: 1.1em}
.pun PRE {FONT-SIZE: 1.2em}
/* 2.5 Bold text */
DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI,
DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold}
/****************************************************************/
/* 3. LINKS */
/****************************************************************/
/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */
#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link,
.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited,
.blockmenu A:link, .blockmenu A:visited {
TEXT-DECORATION: none
}
/* 3.2 Underline on hover for links in headers and main menu */
#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline}
/****************************************************************/
/* 4. BORDER WIDTH AND STYLE */
/****************************************************************/
/* 4.1 By default borders are 1px solid */
DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {
BORDER-STYLE: solid;
BORDER-WIDTH: 1px
}
/* 4.2 Special settings for the board header. */
#brdheader DIV.box {BORDER-TOP-WIDTH: 4px}
/* 4.3 Borders for table cells */
.pun TD, .pun TH {
BORDER-BOTTOM: none;
BORDER-RIGHT: none
}
.pun .tcl {BORDER-LEFT: none}
/* 4.4 Special setting for fieldsets to preserve IE defaults */
DIV>FIELDSET {
BORDER-STYLE: solid;
BORDER-WIDTH: 1px
}
/****************************************************************/
/* 5. VERTICAL AND PAGE SPACING */
/****************************************************************/
/* 5.1 Page margins */
HTML, BODY {MARGIN: 0; PADDING: 0}
#punwrap {margin:12px 20px}
/* 5.2 Creates vertical space between main board elements (Margins) */
DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px}
#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px}
DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px}
/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */
DIV.linkst, DIV.linksb {MARGIN-TOP: -12px}
DIV.postlinksb {MARGIN-TOP: -6px}
/* 5.4 Put a 12px gap above the board information box in index because the category tables only
have a 6px space beneath them */
#brdstats {MARGIN-TOP: 12px}
/****************************************************************/
/* 6. SPACING AROUND CONTENT */
/****************************************************************/
/* 6.1 Default padding for main items */
DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px}
.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0}
.pun H2 {PADDING: 4px 6px}
/* 6.2 Special spacing for various elements */
.pun H1 {PADDING: 3px 0px 0px 0}
#brdtitle P {PADDING-TOP: 0px}
DIV.linkst {PADDING: 8px 6px 3px 6px}
DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px}
#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em}
#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em}
/* 6.4 Create some horizontal spacing for various elements */
#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px}
/****************************************************************/
/* 7. SPACING FOR TABLES */
/****************************************************************/
.pun TH, .pun TD {PADDING: 4px 6px}
.pun TD P {PADDING: 5px 0 0 0}
/****************************************************************/
/* 8. SPACING FOR POSTS */
/****************************************************************/
/* 8.1 Padding around left and right columns in viewtopic */
DIV.postleft DL, DIV.postright {PADDING: 6px}
/* 8.2 Extra spacing for poster contact details and avatar */
DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px}
DD.postavatar {MARGIN-BOTTOM: 5px}
/* 8.3 Extra top spacing for signatures and edited by */
DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px}
/* 8.4 Spacing for code and quote boxes */
DIV.postmsg H4 {MARGIN-BOTTOM: 10px}
.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px}
/* 8.5 Padding for the action links and online indicator in viewtopic */
DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px}
/* 8.6 This is the input on moderators multi-delete view */
DIV.blockpost INPUT, DIV.blockpost LABEL {
PADDING: 3px;
DISPLAY: inline
}
P.multidelete {
PADDING-TOP: 15px;
PADDING-BOTTOM: 5px
}
/* 8.7 Make sure paragraphs in posts don't get any padding */
DIV.postmsg P {PADDING: 0}
/****************************************************************/
/* 9. SPECIAL SPACING FOR FORMS */
/****************************************************************/
/* 9.1 Padding around fieldsets */
DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px}
DIV.inform {PADDING-BOTTOM: 12px}
/* 9.2 Padding inside fieldsets */
.pun FIELDSET {PADDING: 0px 12px 0px 12px}
DIV.infldset {PADDING: 9px 0px 12px 0}
.pun LEGEND {PADDING: 0px 6px}
/* 9.3 The information box at the top of the registration form and elsewhere */
DIV.forminfo {
MARGIN-BOTTOM: 12px;
PADDING: 9px 10px
}
/* 9.4 BBCode help links in post forms */
UL.bblinks LI {PADDING-RIGHT: 20px}
UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px}
/* 9.5 Horizontal positioning for the submit button on forms */
DIV.blockform P INPUT {MARGIN-LEFT: 12px}
/****************************************************************/
/* 10. POST STATUS INDICATORS */
/****************************************************************/
/* 10.1 These are the post status indicators which appear at the left of some tables.
.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and
.isticky = sticky topics. By default only .inew is different from the default.*/
DIV.icon {
FLOAT: left;
MARGIN-TOP: 0.1em;
MARGIN-LEFT: 0.2em;
DISPLAY: block;
BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em;
BORDER-STYLE: solid
}
DIV.searchposts DIV.icon {MARGIN-LEFT: 0}
/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The
margin creates space for the post status indicator */
TD DIV.tclcon {MARGIN-LEFT: 2.3em}
/****************************************************************/
/* 1. IMPORTED STYLESHEETS */
/****************************************************************/
/* Import the basic setup styles */
@import url(imports/base.css);
/* Import the colour scheme */
@import url(imports/Oxygen_cs.css);
/****************************************************************/
/* 2. TEXT SETTINGS */
/****************************************************************/
/* 2.1 This sets the default Font Group */
.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP {
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal}
/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/
* HTML .pun {FONT-SIZE: 68.75%}
/* End IE Win Font Size */
/* Set font size for tables because IE requires it */
.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em}
/* 2.2 Set the font-size for preformatted text i.e in code boxes */
.pun PRE {FONT-FAMILY: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace}
/* 2.3 Font size for headers */
.pun H2, .pun H4 {FONT-SIZE: 1em}
.pun H3 {FONT-SIZE: 1.1em}
#brdtitle H1 {FONT-SIZE: 1.4em}
/* 2.4 Larger text for particular items */
DIV.postmsg P {LINE-HEIGHT: 1.4}
DIV.postleft DT {FONT-SIZE: 1.1em}
.pun PRE {FONT-SIZE: 1.2em}
/* 2.5 Bold text */
DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI,
DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold}
/****************************************************************/
/* 3. LINKS */
/****************************************************************/
/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */
#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link,
.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited,
.blockmenu A:link, .blockmenu A:visited {
TEXT-DECORATION: none
}
/* 3.2 Underline on hover for links in headers and main menu */
#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline}
/****************************************************************/
/* 4. BORDER WIDTH AND STYLE */
/****************************************************************/
/* 4.1 By default borders are 1px solid */
DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {
BORDER-STYLE: solid;
BORDER-WIDTH: 1px
}
/* 4.2 Special settings for the board header. */
#brdheader DIV.box {BORDER-TOP-WIDTH: 4px}
/* 4.3 Borders for table cells */
.pun TD, .pun TH {
BORDER-BOTTOM: none;
BORDER-RIGHT: none
}
.pun .tcl {BORDER-LEFT: none}
/* 4.4 Special setting for fieldsets to preserve IE defaults */
DIV>FIELDSET {
BORDER-STYLE: solid;
BORDER-WIDTH: 1px
}
/****************************************************************/
/* 5. VERTICAL AND PAGE SPACING */
/****************************************************************/
/* 5.1 Page margins */
#punwrap {margin:12px 20px}
/* 5.2 Creates vertical space between main board elements (Margins) */
DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px}
#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px}
DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px}
/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */
DIV.linkst, DIV.linksb {MARGIN-TOP: -12px}
DIV.postlinksb {MARGIN-TOP: -6px}
/* 5.4 Put a 12px gap above the board information box in index because the category tables only
have a 6px space beneath them */
#brdstats {MARGIN-TOP: 12px}
/****************************************************************/
/* 6. SPACING AROUND CONTENT */
/****************************************************************/
/* 6.1 Default padding for main items */
DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px}
.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0}
.pun H2 {PADDING: 4px 6px}
/* 6.2 Special spacing for various elements */
.pun H1 {PADDING: 3px 0px 0px 0}
#brdtitle P {PADDING-TOP: 0px}
DIV.linkst {PADDING: 8px 6px 3px 6px}
DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px}
#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em}
#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em}
/* 6.4 Create some horizontal spacing for various elements */
#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px}
/****************************************************************/
/* 7. SPACING FOR TABLES */
/****************************************************************/
.pun TH, .pun TD {PADDING: 4px 6px}
.pun TD P {PADDING: 5px 0 0 0}
/****************************************************************/
/* 8. SPACING FOR POSTS */
/****************************************************************/
/* 8.1 Padding around left and right columns in viewtopic */
DIV.postleft DL, DIV.postright {PADDING: 6px}
/* 8.2 Extra spacing for poster contact details and avatar */
DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px}
DD.postavatar {MARGIN-BOTTOM: 5px}
/* 8.3 Extra top spacing for signatures and edited by */
DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px}
/* 8.4 Spacing for code and quote boxes */
DIV.postmsg H4 {MARGIN-BOTTOM: 10px}
.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px}
/* 8.5 Padding for the action links and online indicator in viewtopic */
DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px}
/* 8.6 This is the input on moderators multi-delete view */
DIV.blockpost INPUT, DIV.blockpost LABEL {
PADDING: 3px;
DISPLAY: inline
}
P.multidelete {
PADDING-TOP: 15px;
PADDING-BOTTOM: 5px
}
/* 8.7 Make sure paragraphs in posts don't get any padding */
DIV.postmsg P {PADDING: 0}
/****************************************************************/
/* 9. SPECIAL SPACING FOR FORMS */
/****************************************************************/
/* 9.1 Padding around fieldsets */
DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px}
DIV.inform {PADDING-BOTTOM: 12px}
/* 9.2 Padding inside fieldsets */
.pun FIELDSET {PADDING: 0px 12px 0px 12px}
DIV.infldset {PADDING: 9px 0px 12px 0}
.pun LEGEND {PADDING: 0px 6px}
/* 9.3 The information box at the top of the registration form and elsewhere */
DIV.forminfo {
MARGIN-BOTTOM: 12px;
PADDING: 9px 10px
}
/* 9.4 BBCode help links in post forms */
UL.bblinks LI {PADDING-RIGHT: 20px}
UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px}
/* 9.5 Horizontal positioning for the submit button on forms */
DIV.blockform P INPUT {MARGIN-LEFT: 12px}
/****************************************************************/
/* 10. POST STATUS INDICATORS */
/****************************************************************/
/* 10.1 These are the post status indicators which appear at the left of some tables.
.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and
.isticky = sticky topics. By default only .inew is different from the default.*/
DIV.icon {
FLOAT: left;
MARGIN-TOP: 0.1em;
MARGIN-LEFT: 0.2em;
DISPLAY: block;
BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em;
BORDER-STYLE: solid
}
DIV.searchposts DIV.icon {MARGIN-LEFT: 0}
/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The
margin creates space for the post status indicator */
TD DIV.tclcon {MARGIN-LEFT: 2.3em}