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 741 additions and 555 deletions
{include file="../static/fragments/Front.txt"}
{if count($news) gt 0}
<div id="news">
<div class="box">
<div class="boxhead"><h2>Latest Announcements</h2></div>
<div class="boxcontent">
{foreach name=news from=$news key=itemnum item=item}
<h3>{$item.title}</h3>
<div>
{articlesummary id=$item.id article=$item.body title=$item.title}
</div>
{/foreach}
<div class="clear"></div>
</div>
<div class="hollowfoot"><div><div></div></div></div>
</div>
</div>
<div id="news">
<div class="box">
<div class="boxhead"><h2>Latest Announcements</h2></div>
<div class="boxcontent">
{foreach name=news from=$news key=itemnum item=item}
<h3>{$item.title}</h3>
<div>
{articlesummary id=$item.id article=$item.body title=$item.title}
</div>
{/foreach}
<div class="clear"></div>
</div>
<div class="hollowfoot">
<div>
<div></div>
</div>
</div>
</div>
</div>
{/if}
{include file="../static/fragments/Games.txt"}
<ul class="boxes">
{foreach name=games from=$games item=game}
<li><div class="cbb"><a href="/Games/{$game.name}"><div>
<img src="/pictures/games/{$game.name|escape:url}.jpg" alt="{$game.name}" />
<br />{$game.name}
</div></a></div></li>
{/foreach}
{foreach name=games from=$games item=game}
<li>
<div class="cbb"><a href="{$baseurl}/Games/{$game.name}">
<div>
<img src="{$baseurl}/pictures/games/{$game.name|escape:url}.jpg" alt="{$game.name}"/>
<br/>{$game.name}
</div>
</a></div>
</li>
{/foreach}
</ul>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$language.code}">
<!doctype html>
<html lang="{$language.code}">
<head>
<title>{$title} - SUCS</title>
<link rel="SHORTCUT ICON" href="/favicon.ico" />
<script type="text/javascript" src="/js/cb.js"></script>
<script type="text/javascript" src="/videos/talks/ufo.js"></script>
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/common.css" media="screen,print" />
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/sucs.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/box.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/downloads.css" media="screen" />
{if isset($extra_styles)}
{foreach from=$extra_styles item=style}
<link rel="stylesheet" type="text/css" href="{$style}" media="screen" />
{/foreach}
{/if}
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/print.css" media="print" />
{if isset($rss_url)}
<link rel="alternate" type="application/rss+xml" title="{$title}" href="{$rss_url}" />
{/if}
{if isset($atom_url)}
<link rel="alternate" type="application/atom+xml" title="{$title}" href="{$atom_url}" />
{/if}
<meta name="author" content="Denis Walker" />
<meta name="description" content="Swansea University Computer Society - providing student computing facilities and personal web pages." />
<!-- <meta name="keywords" content="" /> -->
{if $refresh} <meta http-equiv="REFRESH" content="{$refresh}" />{/if}
{if $action=="edit"}
<script language="javascript" type="text/javascript" src="{$baseurl}/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript" src="{$baseurl}/js/tiny_mce.js"></script>
{/if}
{if isset($extra_scripts)}
{foreach from=$extra_scripts item=script}
{$script}
{/foreach}
{/if}
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/ie.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/ielt7.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/boxie.css" media="screen" />
<script defer type="text/javascript" language="JavaScript" src="{$baseurl}/js/pngfix.js"></script>
<![endif]-->
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
<title>{$title} - SUCS</title>
<link rel="SHORTCUT ICON" href="{$baseurl}/favicon.ico"/>
<link rel="apple-touch-icon" href="{$baseurl}/images/apple-touch-icon.png"/>
<script type="text/javascript" src="{$baseurl}/videos/talks/ufo.js"></script>
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/common.css" media="screen,print"/>
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/sucs.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/box.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/downloads.css" media="screen"/>
{if isset($extra_styles)}
{foreach from=$extra_styles item=style}
<link rel="stylesheet" type="text/css" href="{$style}" media="screen"/>
{/foreach}
{/if}
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/print.css" media="print"/>
{if isset($rss_url)}
<link rel="alternate" type="application/rss+xml" title="{$title}" href="{$rss_url}"/>
{/if}
{if isset($atom_url)}
<link rel="alternate" type="application/atom+xml" title="{$title}" href="{$atom_url}"/>
{/if}
<meta name="description"
content="Swansea University Computer Society - providing student computing facilities and personal web pages."/>
{if $refresh}
<meta http-equiv="REFRESH" content="{$refresh}" />{/if}
{if isset($extra_scripts)}
{foreach from=$extra_scripts item=script}
{$script}
{/foreach}
{/if}
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/ie.css"/>
<script type="text/javascript" src="{$baseurl}/js/cb.js"></script>
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/ie8.css"/>
<![endif]-->
<!--[if lt IE 8]>
<link rel="stylesheet" type="text/css" href="{$baseurl}/css/ielt8.css" media="screen"/>
<![endif]-->
</head>
<body>
......@@ -62,5 +58,5 @@
<div id="wrapper">
<div id="content">
{include file="usermessages.tpl"}
<div id="content">
{include file="usermessages.tpl"}
{if $secondary}
<div id="primary">
{/if}
<div id="primaryC">
{$body}
{/if}
<div id="primaryC">
{$body}
{if $creatable}
<p>You can <a href="?action=create">create</a> this page though.</p>
{/if}
{* {if $creatable}
<p>You can <a href="?action=create">create</a> this page though.</p>
{/if} *}
{if $modified}
<div class="edit">
{if $editable}
<ul>
<li><a href="?action=delete-query">Delete</a></li>
<li><a href="?action=edit">Edit</a></li>
</ul>
<div class="clear"></div>
{/if}
Page last modified{if $modifiedby} by <a href="/Community/Members/{$modifiedby}">{$modifiedby}</a>{/if} on {$modified}
</div>
{/if}
</div>
{if $secondary}
{if $modified}
<div class="edit">
{* {if $editable}
<ul>
<li><a href="?action=delete-query">Delete</a></li>
<li><a href="?action=edit">Edit</a></li>
</ul>
<div class="clear"></div>
{/if} *}
Page last modified{if $modifiedby} by <a
href="{$baseurl}/Community/Members/{$modifiedby}">{$modifiedby}</a>{/if} on {$modified}
</div>
{/if}
</div>
{if $secondary}
</div>
<div id="secondary">
{foreach from=$secondary item=widget}
{$widget}
{/foreach}
</div>
<div id="secondary">
{foreach from=$secondary item=widget}
{$widget}
{/foreach}
</div>
{/if}
{if $mode == 'nojunk'}
{include file="../static/fragments/Junk.txt"}
<div class="box">
<div class="boxhead">
<h3>No Junk</h3>
</div>
<div class="boxcontent">
<h4>There is currently no junk</h4>
<h4></h4>
</div>
<div class="hollowfoot">
<div>
<div></div>
</div>
</div>
</div>
{if $admin}
<div class="edit">
<a href="{$componentpath}/Add">Add</a>
<div class="clear"></div>
</div>
{/if}
{/if}
{if $mode == 'list'}
{include file="../static/fragments/Junk.txt"}
{foreach name=junk from=$junk key=status item=statusitems}
<div class="box">
<div class="boxhead">
{if $status == 'available'} <h3>Free Stuff!</h3>
{elseif $status == 'requested'} <h3>Reserved Items</h3>
{elseif $status == 'taken'} <h3>Recently Taken</h3>
{else} <h3>Not Junk</h3> {/if}
</div>
<div class="boxcontent">
{foreach from=$statusitems item=category key=categoryname}
<h4>{$categoryname}</h4>
<ul>
{foreach from=$category item=item}
<li>
<strong>{$item.title}:</strong> {$item.description}
{if $item.donated_by != null}
<br /><small>Donated by {$item.donated_by}</small>
{include file="../static/fragments/Junk.txt"}
{foreach name=junk from=$junk key=status item=statusitems}
<div class="box">
<div class="boxhead">
{if $status == 'available'}
<h3>Free Stuff!</h3>
{elseif $status == 'requested'}
<h3>Reserved Items</h3>
{elseif $status == 'taken'}
<h3>Recently Taken</h3>
{else}
<h3>Not Junk</h3>
{/if}
{if $status == 'requested'}
<br /><small>Requested by {$item.requested_by} on {$item.requested_on|date_format:"%e %b %Y"}</small>
{elseif $status == "taken"}
<br /><small>Taken by {$item.requested_by} on {$item.taken_on|date_format:"%e %b %Y"}</small>
{/if}
{if $session->loggedin}
{if $admin || $item.status=='junk'}
<form action="{$url}" method="POST">
<input type="hidden" name="item" value="{$item.id}" />
{if $item.status=='junk'}
{if $item.requested_by==null}
<input type="submit" name="action" value="Request" />
{elseif ($item.requested_by==$session->username || $admin) && $item.taken_on==null}
<input type="submit" name="action" value="Un-Request" />
{/if}
{if $admin}
{if $item.requested_by!=null && $item.taken_on==null}
<input type="submit" name="action" value="Take" />
{elseif $item.taken_on!=null}
<input type="submit" name="action" value="Remove" />
{elseif $item.requested_by==null}
<input type="submit" name="action" value="Not Junk" />
{/if}
{/if}
{elseif $admin}
<input type="submit" name="action" value="Junk" />
{/if}
</form>
{/if}
{/if}
{if $admin && $item.requested_by==null}
<div class="edit">
<a href="{$componentpath}/Edit/{$item.id}">Edit</a>
<div class="clear"></div>
</div>
{/if}
</li>
{/foreach}
</ul>
{/foreach}
</div>
<div class="hollowfoot"><div><div></div></div></div>
</div>
{/foreach}
{if $admin}
<div class="edit">
<a href="{$componentpath}/Add">Add</a>
<div class="clear"></div>
</div>
{/if}
</div>
<div class="boxcontent">
{foreach from=$statusitems item=category key=categoryname}
<h4>{$categoryname}</h4>
<ul>
{foreach from=$category item=item}
<li>
<strong>{$item.title}:</strong> {$item.description}
{if $item.donated_by != null}
<br/>
<small>Donated by {$item.donated_by}</small>
{/if}
{if $status == 'requested'}
<br/>
<small>Requested by {$item.requested_by}
on {$item.requested_on|date_format:"%e %b %Y"}</small>
{elseif $status == "taken"}
<br/>
<small>Taken by {$item.requested_by}
on {$item.taken_on|date_format:"%e %b %Y"}</small>
{/if}
{if $session->loggedin}
{if $admin || $item.status=='junk'}
<form action="{$url}" method="POST">
<input type="hidden" name="item" value="{$item.id}"/>
{if $item.status=='junk'}
{if $item.requested_by==null}
<input type="submit" name="action" value="Request"/>
{elseif ($item.requested_by==$session->username || $admin) && $item.taken_on==null}
<input type="submit" name="action" value="Un-Request"/>
{/if}
{if $admin}
{if $item.requested_by!=null && $item.taken_on==null}
<input type="submit" name="action" value="Item Taken"/>
{elseif $item.requested_by==null}
<input type="submit" name="action" value="Not Junk"/>
<input type="submit" name="action" value="Remove"/>
{/if}
{/if}
{elseif $admin}
<input type="submit" name="action" value="Junk"/>
{/if}
</form>
{/if}
{/if}
{if $admin && $item.requested_by==null}
<div class="edit">
<a href="{$componentpath}/Edit/{$item.id}">Edit</a>
<div class="clear"></div>
</div>
{/if}
</li>
{/foreach}
</ul>
{/foreach}
</div>
<div class="hollowfoot">
<div>
<div></div>
</div>
</div>
</div>
{/foreach}
{if $admin}
<div class="edit">
<a href="{$componentpath}/Add">Add</a>
<div class="clear"></div>
</div>
{/if}
{elseif ($mode == 'edit' || $mode == 'add') && $admin}
<fieldset>
<legend>{if $mode=='edit'}Edit{else}New{/if} Item</legend>
<form action="{$componentpath}" method="POST">
<input type="hidden" name="id" value="{$item.id}" />
<div class="row">
<label for="title">Title*</label>
<span class="textinput"><input type="text" name="title"{if $mode == 'edit'} value="{$item.title}"{/if} /></span>
</div>
<div class="row">
<label for="category">Category*</label>
<fieldset>
<legend>{if $mode=='edit'}Edit{else}New{/if} Item</legend>
<form action="{$componentpath}" method="POST">
<input type="hidden" name="id" value="{$item.id}"/>
<div class="row">
<label for="title">Title*</label>
<span class="textinput"><input type="text"
name="title"{if $mode == 'edit'} value="{$item.title}"{/if} /></span>
</div>
<div class="row">
<label for="category">Category*</label>
<span class="textinput">
<select name="categorymenu">
<option value="">Other...</option>
{foreach name=categories from=$categories item=category}
<option{if ($category == $item.category) && ($mode == 'edit')} selected="selected"{/if}>{$category}</option>
{/foreach}
</select>
<option value="">Other...</option>
{foreach name=categories from=$categories item=category}
<option{if ($category == $item.category) && ($mode == 'edit')} selected="selected"{/if}>{$category}</option>
{/foreach}
</select>
</span>
<span class="textinput">
<div class="note">If none of the existing categories apply, enter one below:</div>
<input type="text" name="category"/>
</span>
</div>
<div class="row">
<label for="description">Description</label>
<span class="textinput"><textarea name="description" cols="25" rows="3">{if $mode == 'edit'}{$item.description}{/if}</textarea></span>
</div>
<div class="row">
<label for="donated_by">Donated by</label>
<span class="textinput"><input type="text" name="donated_by"{if $mode == 'edit'} value="{$item.donated_by}"{/if} /></span>
</div>
<div class="row">
<label for="status">Status</label>
</div>
<div class="row">
<label for="description">Description</label>
<span class="textinput"><textarea name="description" cols="25"
rows="3">{if $mode == 'edit'}{$item.description}{/if}</textarea></span>
</div>
<div class="row">
<label for="donated_by">Donated by</label>
<span class="textinput"><input type="text"
name="donated_by"{if $mode == 'edit'} value="{$item.donated_by}"{/if} /></span>
</div>
<div class="row">
<label for="status">Status</label>
<span class="textinput">
<select name="status">
{foreach name=statuses from=$statuses item=status}
<option{if ($status == $item.status) && ($mode == 'edit')} selected="selected"{/if}>{$status}</option>
{foreachelse}
<option>unknown</option>
{/foreach}
</select>
{foreach name=statuses from=$statuses item=status}
<option{if ($status == $item.status) && ($mode == 'edit')} selected="selected"{/if}>{$status}</option>
{foreachelse}
<option>unknown</option>
{/foreach}
</select>
</span>
</div>
<div class="row">
<span class="textinput"><input type="submit" name="{if $mode == 'edit'}update{else}add{/if}" value="{if $mode == 'edit'}Update{else}Add{/if}" /></span>
<div class="note row">* denotes required fields</div>
</div>
<div class="clear"></div>
</form>
</fieldset>
</div>
<div class="row">
<span class="textinput"><input type="submit" name="{if $mode == 'edit'}update{else}add{/if}"
value="{if $mode == 'edit'}Update{else}Add{/if}"/></span>
<div class="note row">* denotes required fields</div>
</div>
<div class="clear"></div>
</form>
</fieldset>
{/if}
<fieldset>
<legend>Add Book</legend>
<form action="{$self}" method="POST">
<input type="hidden" name="action" value="search" />
<div class="note row">Enter an ISBN to attempt to auto-fill book details</div>
<div class="row">
<label for="isbn">ISBN</label>
<span class="textinput"><input type="text" name="isbn" /></span>
</div>
<div class="row">
<span class="textinput"><input type="submit" value="Auto-fill" /></span>
</div>
</form>
<legend>Add Book</legend>
<form action="{$self}" method="POST">
<input type="hidden" name="action" value="search"/>
<div class="note row">Enter an ISBN to attempt to auto-fill book details</div>
<div class="row">
<label for="isbn">ISBN</label>
<span class="textinput"><input type="text" name="isbn"/></span>
</div>
<div class="row">
<span class="textinput"><input type="submit" value="Auto-fill"/></span>
</div>
</form>
{if isset($book.image_url)}
<div class="emblem">
<img src="{$book.image_url}"/>
</div>
{/if}
{if isset($book.image_url)}
<div class="emblem">
<img src="{$book.image_url}" />
</div>
{/if}
<div>
<form action="{$self}" method="POST">
<input type="hidden" name="action" value="add"/>
<input type="hidden" name="image_url" value="{$book.image_url}"/>
<div>
<form action="{$self}" method="POST">
<input type="hidden" name="action" value="add" />
<input type="hidden" name="image_url" value="{$book.image_url}" />
<div class="row">
<label for="isbn">ISBN Number</label>
<span class="textinput"><input type="text" name="isbn" value="{$book.isbn}"/></span>
</div>
<div class="row">
<label for="isbn">ISBN Number</label>
<span class="textinput"><input type="text" name="isbn" value="{$book.isbn}"/></span>
</div>
<div class="row">
<label for="title">Title</label>
<span class="textinput"><input type="text" name="title" width="200" value="{$book.title}" /></span>
</div>
<div class="row">
<label for="author">Author</label>
<span class="textinput"><input type="text" name="author" value="{$book.author}" /></span>
</div>
<div class="row">
<label for="publisher">Publisher</label>
<span class="textinput"><input type="text" name="publisher" value="{$book.publisher}" /></span>
</div>
<div class="row">
<label for="comments">Comments</label>
<span class="textinput"><textarea name="comments"></textarea></span>
</div>
<div class="row">
<input type="submit" name="add" value="Add Book" />
</div>
</form>
</div>
<div class="row">
<label for="title">Title</label>
<span class="textinput"><input type="text" name="title" width="200"
value="{$book.title|escape}"/></span>
</div>
<div class="row">
<label for="author">Author</label>
<span class="textinput"><input type="text" name="author" value="{$book.author|escape}"/></span>
</div>
<div class="row">
<label for="publisher">Publisher</label>
<span class="textinput"><input type="text" name="publisher" value="{$book.publisher|escape}"/></span>
</div>
<div class="row">
<label for="comments">Comments</label>
<span class="textinput"><textarea name="comments"></textarea></span>
</div>
<div class="row">
<input type="submit" name="add" value="Add Book"/>
</div>
</form>
</div>
</fieldset>
<div class="box">
<div class="boxhead"><h2>{$book.title}</h2></div>
<div class="boxcontent">
<strong>{if $book.onloan}On loan{else}Book Available{/if}</strong>
{if $book.image_url != ""}<img class="emblem" src="{$book.image_url|escape}" alt="{$book.title|escape}" />{/if}
{if $editable == true}
<form class="admin" action="{$baseurl}{$path}?action=save" method="POST">
<div class="row">
<label for="title">Title</label>
<span class="textinput"><input type="text" name="title" value="{$book.title}"/></span>
</div>
<div class="row">
<label for="author">Author</label>
<span class="textinput"><input type="text" name="author" value="{$book.author}"/></span>
</div>
<div class="row">
<label for="publisher">Publisher</label>
<span class="textinput"><input type="text" name="publisher" value="{$book.publisher}"/></span>
</div>
<div class="row"><label for="description">Description</label><textarea cols="50" rows="20"
name="description">{$book.description|escape}</textarea>
</div>
<input type="submit" value="Save"/>
</form>
{else}
<p>You don't have permission to edit books</p>
{/if}
<div class="clear"></div>
</div>
<div class="hollowfoot">
<div>
<div></div>
</div>
</div>
</div>
<div class="box">
<div class="boxhead"><h2>{$book.title}</h2></div>
<div class="boxcontent">
<strong>{if $book.onloan}On loan{else}Book Available{/if}</strong>
{if $book.image_url != ""}<img class="emblem" src="{$book.image_url|escape}" alt="{$book.title|escape}" />{/if}
<p>Author: {$book.author}</p>
{if isset($book.description)}
<div>{$book.description}</div>
{/if}
{if $editable == true}
<div class="edit">
<ul>
<li><a href="?action=edit">Edit</a></li>
</ul>
</div>
{/if}
<div class="clear"></div>
</div>
<div class="hollowfoot">
<div>
<div></div>
</div>
</div>
</div>
<div class="cbb">
<h3>Book Status</h3>
{if $book.onloan==true }
{if $librarian==true}
<p>This book is currently on loan to {$book.loanwho}</p>
<form action="{$url}" method="POST">
<input type="hidden" name="action" value="return" />
<input type="submit" value="Return" />
</form>
{else}
<p>This book is currently on loan</p>
{/if}
{elseif $librarian==true}
<p>This book is available</p>
<form action="{$url}" method="POST">
<input type="hidden" name="action" value="loan" />
<p>Loan to user</p>
<select name="member">
{foreach name=members from=$memberlist item=member}
<option value="{$member.uid}">{$member.uid}</option>
{/foreach}
</select>
<input type="submit" value="Loan" />
</form>
{elseif $checkout_request==true}
<p>You have requested to take out {$book.title} from the library.</p>
<p>You will be contacted by a member of our admin team when the book is available for collection.</p>
{else}
<p>This book is available</p>
<p>You may request to take it out of the library</p>
<form action="{$url}" method="POST">
<input type="hidden" name="action" value="loan" />
<input type="submit" value="Request" />
</form>
{/if}
<h3>Book Status</h3>
{if $book.onloan==true }
{if $librarian==true}
<p>This book is currently on loan to {$book.loanwho}</p>
<form action="{$url}" method="POST">
<input type="hidden" name="action" value="return"/>
<input type="submit" value="Return"/>
</form>
{else}
<p>This book is currently on loan</p>
{/if}
{elseif $librarian==true}
<p>This book is available</p>
<form action="{$url}" method="POST">
<input type="hidden" name="action" value="loan"/>
<p>Loan to user</p>
<select name="member">
{foreach name=members from=$memberlist item=member}
<option value="{$member.uid}">{$member.uid}</option>
{/foreach}
</select>
<input type="submit" value="Loan"/>
</form>
{elseif $checkout_request==true}
<p>You have requested to take out {$book.title} from the library.</p>
<p>You will be contacted by a member of our admin team when the book is available for collection.</p>
{else}
<p>This book is available</p>
<p>You may request to take it out of the library</p>
<form action="{$url}" method="POST">
<input type="hidden" name="action" value="loan"/>
<input type="submit" value="Request"/>
</form>
{/if}
</div>
<div class="cbb">
<h3>Search the Library</h3>
<form method="get" action="/Knowledge/Library">
<div>
<input class="text" type="text" name="search" value="{$search}" size="20" />
<input class="submit" type="submit" value="Search" />
</div>
</form>
<h3>Search the Library</h3>
<form method="get" action="/Knowledge/Library">
<div>
<input class="text" type="text" name="search" value="{$search}" size="20"/>
<input class="submit" type="submit" value="Search"/>
</div>
</form>
</div>
{if $mode == 'browse'}
<p>SUCS has a wide variety of computer and computer science related books available for loan to our members. If you'd like to borrow a book, speak to a member of admin or the exec.</p>
<h3>Browse by category</h3>
<ul>
{foreach name=tags from=$tags item=tag}
<li><a href="{$baseurl}/Knowledge/Library/Tags/{$tag.name|escape:'url'}">{$tag.name}</a></li>
{/foreach}
</ul>
<h3>Random Books</h3>
{foreach name=randoms from=$randoms item=randomitem}
<a href="{$baseurl}/Knowledge/Library/{$randomitem.id}"><img src="{$randomitem.image_url}" alt="{$randomitem.title}" height="120" /></a>
{/foreach}
<p>SUCS has a wide variety of computer and computer science related books available for loan to our members. If
you'd like to borrow a book, speak to a member of admin or the exec.</p>
<h3>Browse by category</h3>
<ul>
{foreach name=tags from=$tags item=tag}
<li><a href="{$baseurl}/Knowledge/Library/Tags/{$tag.name|escape:'url'}">{$tag.name}</a></li>
{/foreach}
</ul>
<h3>Random Books</h3>
{foreach name=randoms from=$randoms item=randomitem}
<a href="{$baseurl}/Knowledge/Library/{$randomitem.id}"><img src="{$randomitem.image_url}"
alt="{$randomitem.title}" height="120"/></a>
{/foreach}
{elseif $mode == 'display'}
<div class="box">
<div class="boxhead"><h2>{$book.title}</h2></div>
<div class="boxcontent">
{if $book.image_url != ""}<img class="emblem" src="{$book.image_url}" alt="{$book.title}" />{/if}
<p>{$book.author}</p>
<p>{$book.description}</p>
{if $book.onloan}<p>On loan</p>{else}<p>Book Available</p>{/if}
{if $editable==true}
<p>Loan stuff to people maybe</p>
{/if}
<div class="clear"></div>
</div>
<div class="hollowfoot"><div><div></div></div></div>
</div>
{include file='library-book.tpl' book=$book}
{elseif $mode == 'search'}
<h3>Search Results</h3>
{if $results|@count < 1}<p>No results found</p>
{else}
<ul>
{foreach name=results from=$results item=result}
<li><a href="{$baseurl}/Knowledge/Library/{$result.id}">{$result.title}</a>{if $result.onloan} <em>(on loan)</em>{/if} </li>
{/foreach}
</ul>
{/if}
<h3>Search Results</h3>
{if $results|@count < 1}
<p>No results found</p>
{else}
<ul>
{foreach name=results from=$results item=result}
<li><a href="{$baseurl}/Knowledge/Library/{$result.id}">{$result.title}</a>{if $result.onloan} <em>(on
loan)</em>{/if} </li>
{/foreach}
</ul>
{/if}
{elseif $mode == 'tagdisplay'}
{foreach name=results from=$results item=result}
<li><a href="{$baseurl}/Knowledge/Library/{$result.id}">{$result.title}</a> </li>
{/foreach}
{foreach name=results from=$results item=result}
<li><a href="{$baseurl}/Knowledge/Library/{$result.id}">{$result.title}</a></li>
{/foreach}
{elseif $mode == 'bookerror'}
<p>The requested book does not exist</p>
<p>The requested book does not exist</p>
{elseif $mode == 'tagerror'}
<p>The requested tag does not exist</p>
<p>The requested tag does not exist</p>
{/if}
{if $librarian == true}
<p><a href="{$baseurl}/Knowledge/Library/Admin">Library Admin</a></p>
<p><a href="{$baseurl}/Knowledge/Library/Admin">Library Admin</a></p>
{/if}
<p>Images provided by <a href="http://www.amazon.co.uk">Amazon</a></p>
<p>Images and descriptions provided by <a href="http://www.amazon.co.uk">Amazon</a></p>
<div id="loginForm">
<form method="post" action="{$ssl_url|escape:'htmlall'}{getparams gets=$gets}">
<div>
{if $session->loggedin}
Logged in as {$session->username}<br />
<a href="{$baseurl}/Options">Membership Options</a><br />
{if $session->email_forward}
Mail forwarded to {$session->email_forward}<br />
{* Don't bother alerting users to new mail at present; it's all broken because of noatime
{else}
{if $session->email=="0"}
No email<br />
{elseif $session->email=="1"}
No new email<br />
{elseif $session->email=="2"}
<a href="https://sucs.org/webmail/">New email</a><br />
{/if}
*}
{/if}
<input type="submit" class="button" name="Logout" id="Logout" value="Logout" />
{else}
<label for="session_user">Username</label> <input type="text" class="text" name="session_user" id="session_user" /><br />
<label for="session_pass">Password</label> <input type="password" class="text" name="session_pass" id="session_pass" /><br />
<input type="hidden" name="token" value="{$session->token}" />
<input type="submit" class="button" name="Login" id="Login" value="Login" />
{/if}
</div>
</form>
</div>
<div id="loginForm">
<form method="post" action="{$ssl_url|escape:'htmlall'}{getparams gets=$gets}">
<div>
{if $session->loggedin}
Hello
<a href="{$baseurl}/Community/Members/{$session->username}">{$session->username}</a>
! You have
{if $session->email_forward}
mail forwarded to {$session->email_forward}
<br/>
{else}
{if $session->email==0}
no new email
{elseif $session->email==1}
<a href="https://sucs.org/webmail/">new email</a>
{/if}
<br/>
Print balance: {$session->printbalance} |
<a href="{$baseurl}/Options">Membership Options</a>
<br/>
{/if}
<input type="submit" class="button" name="Logout" id="Logout" value="Logout"/>
{else}
<input type="text" class="text" name="session_user" id="session_user" placeholder="Username"/>
<input type="password" class="text" name="session_pass" id="session_pass" placeholder="Password"/>
<input type="hidden" name="token" value="{$session->token}"/>
<input type="submit" class="button" name="Login" id="Login" value="Login"/>
<br>
<a href="{$baseurl}/join">No Account? Don't worry, sign up today!</a>
{/if}
</div>
</form>
</div>
<div class="cbb">
<h3>Search</h3>
<form action="{$url}" method="post">
<div>
<p>Search for a member...</p>
<input type="text" name="search" />
<input type="submit" name="submit" value="Search" />
</div>
</form>
<form action="{$url}" method="post">
<div>
<p>...Or select from the list</p>
<select name="member">
{foreach name=members from=$members item=member}
<option value="{$member.uid}">{$member.uid}</option>
{/foreach}
</select>
<input name="submit" value="Display Details" type="submit" />
</div>
</form>
</div>
<div class="cbb">
<h3>Search</h3>
<form action="{$url}" method="post">
<div>
<p>Search for a member...</p>
<input type="text" name="search"/>
<input type="submit" name="submit" value="Search"/>
</div>
</form>
<form action="{$url}" method="post">
<div>
<p>...Or select from the list</p>
<select name="member">
{foreach name=members from=$members item=member}
<option value="{$member.uid}">{$member.uid}</option>
{/foreach}
</select>
<input name="submit" value="Display Details" type="submit"/>
</div>
</form>
</div>
{if isset($members) }
{if isset($results) }
{if count($results) > 1 }
<p>There are several matches for your query, please select one below - </p>
<ul>
{foreach name=results from=$results item=result}
<li><a href="{$url}/{$result.uid}">{$result.uid}</a></li>
{/foreach}
</ul>
{elseif count($results) == 1 }
{assign var=member value=$results[0]}
<div class="box">
<div class="boxhead"><h2>Membership Details for {$member.uid}</h2></div>
<div class="boxcontent">
{if isset($member.picture) }
<img class="emblem" src="{$baseurl}{$member.picture}" alt="Picture of {$member.uid}" />
{/if}
<dl class="member">
<dt>Username</dt>
<dd>{$member.uid|escape:'htmlall'}</dd>
<dt>Real Name</dt>
<dd>{$member.cn|escape:'htmlall'}</dd>
<dt>Account Type</dt>
<dd>{$member.acctype|escape:'htmlall'}</dd>
{if $member.website }
<dt>Website</dt>
<dd><a href="http://sucs.org/~{$member.uid|escape:'url'}/">http://sucs.org/~{$member.uid|escape:'url'}/</a></dd>
{/if}
{if isset($member.blog) }
<dt>Blog</dt>
<dd><a href="/Blogs/{$member.uid|escape:'url'}">{$member.blog}</a></dd>
{/if}
{if isset($member.project) }
<dt>Project</dt>
<dd id="project"><pre style="clear: left;">{$member.project|escape:'htmlall'}</pre></dd>
{/if}
{if isset($member.plan) }
<dt>Plan</dt>
<dd id="plan"><pre style="clear: left;">{$member.plan|escape:'htmlall'}</pre></dd>
{/if}
{if isset($results) }
{if count($results) > 1 }
<p>There are several matches for your query, please select one below - </p>
<ul>
{foreach name=results from=$results item=result}
<li><a href="{$url}/{$result.uid}">{$result.uid}</a></li>
{/foreach}
</ul>
{elseif count($results) == 1 }
{assign var=member value=$results[0]}
<div class="box">
<div class="boxhead"><h2>Membership Details for {$member.uid}</h2></div>
<div class="boxcontent">
{if isset($member.picture) }
<img class="emblem" src="{$baseurl}{$member.picture}" alt="Picture of {$member.uid}"/>
{/if}
<dl class="member">
<dt>Username</dt>
<dd>{$member.uid|escape:'htmlall'}</dd>
<dt>Real Name</dt>
<dd>{$member.cn|escape:'htmlall'}</dd>
<dt>Account Type</dt>
<dd>{$member.acctype|escape:'htmlall'}</dd>
{if $member.website }
<dt>Website</dt>
<dd>
<a href="https://sucs.org/~{$member.uid|escape:'url'}/">http://sucs.org/~{$member.uid|escape:'url'}/</a></dd>
{/if}
{if isset($member.project) }
<dt>Project</dt>
<dd id="project">{$member.project|escape:'htmlall'}</dd>
{/if}
{if isset($member.plan) }
<dt>Plan</dt>
<dd id="plan">{$member.plan|escape:'htmlall'}</dd>
{/if}
<dt>Banana Score</dt>
{if $member.awardsbyyear|@count >= 1}
<dd>{bananaprint score=$member.bananascore}{$member.bananascore} banana{if $member.bananascore<>1}s{/if}</dd>
{else}
<dd>{$member.uid} doesn't have any banana awards</dd>
{/if}
</dl>
<dt>Banana Score</dt>
{if $member.awardsbyyear|@count >= 1}
<dd>{bananaprint score=$member.bananascore}{$member.bananascore}
banana{if $member.bananascore<>1}s{/if}</dd>
{else}
<dd>{$member.uid} doesn't have any banana awards</dd>
{/if}
</dl>
<div class="clear"></div>
</div>
<div class="hollowfoot"><div><div></div></div></div>
</div>
{if $member.awardsbyyear|@count >= 1}
<div class="box">
<div class="boxhead"><h2>Banana Awards for {$member.uid}</h2></div>
<div class="boxcontent">
<dl class="bananas">
{foreach name=awardsbyyear from=$member.awardsbyyear key=yearname item=year}
<dt>{$yearname}/{math equation="x + 1" x=$yearname}: <small>{$year.sum} banana{if $year.sum|abs != 1}s{/if}</small></dt>
<dd>{include file=banana-awardlist.tpl awards=$year.awards singlemember=true}</dd>
{/foreach}
</dl>
</div>
<div class="hollowfoot"><div><div></div></div></div>
</div>
{/if}
{else}
<div class="errorbar">
<div><div><div>
Members: No Results (Invalid Search)
</div></div></div>
</div>
{/if}
{else}
<p> Please search for a member in the sidebar.</p>
<h3>Recent Awards</h3>
{include file=banana-awardlist.tpl awards=$stats.recent}
{/if}
<div class="clear"></div>
</div>
<div class="hollowfoot">
<div>
<div></div>
</div>
</div>
</div>
{if $member.awardsbyyear|@count >= 1}
<div class="box">
<div class="boxhead"><h2>Banana Awards for {$member.uid}</h2></div>
<div class="boxcontent">
<dl class="bananas">
{foreach name=awardsbyyear from=$member.awardsbyyear key=yearname item=year}
<dt>{$yearname}/{math equation="x + 1" x=$yearname}:
<small>{$year.sum} banana{if $year.sum|abs != 1}s{/if}</small>
</dt>
<dd>{include file='banana-awardlist.tpl' awards=$year.awards singlemember=true}</dd>
{/foreach}
</dl>
</div>
<div class="hollowfoot">
<div>
<div></div>
</div>
</div>
</div>
{/if}
{else}
<div class="errorbar">
<div>
<div>
<div>
Members: No Results (Invalid Search)
</div>
</div>
</div>
</div>
{/if}
{else}
<p> Please search for a member in the sidebar.</p>
<h3>Recent Awards</h3>
{include file='banana-awardlist.tpl' awards=$stats.recent}
{/if}
{else}
<p>Please log in to view full member details.</p>
<h3>Members with public websites:</h3>
<div class="memberlist">
{memberwebsitelist members=$public_members}
</div>
<p>Please log in to view full member details.</p>
<h3>Members with public websites:</h3>
<div class="memberlist">
{memberwebsitelist members=$public_members}
</div>
{/if}
{if $staff == TRUE}
<div class="cbb">
<h3>Settings</h3>
<form method="get" action="{$baseurl}{$path}">
<h4>Sort</h4>
<p>Select a sort column from the list:</p>
<select name="sort">
<option value="username"{if $optionsort == "username"} selected="selected"{/if}>Username</option>
<option value="sid"{if $optionsort == "sid"} selected="selected"{/if}>Student Number</option>
<option value="realname"{if $optionsort == "realname"} selected="selected"{/if}>Real Name</option>
</select>
<option value="username"{if $optionsort == "username"} selected="selected"{/if}>Username</option>
<option value="sid"{if $optionsort == "sid"} selected="selected"{/if}>Student Number</option>
<option value="realname"{if $optionsort == "realname"} selected="selected"{/if}>Real Name</option>
</select>
<h4>Auto Refresh</h4>
<p>Enter a value in seconds or n to disable:</p>
<input class="text" type="text" name="autorefresh" value="{$optionrefresh}" size="5" /><br />
<input class="submit" type="submit" value="Update" />
<input class="text" type="text" name="autorefresh" value="{$optionrefresh}" size="5"/><br/>
<input class="submit" type="submit" value="Update"/>
</form>
</div>
{/if}
{if $staff == TRUE}
<h2>DO NOT RENEW MEMBERSHIP UNLESS THE MONEY IS ACTUALLY IN THE POT!</h2>
<p>Pay until: {$paydate}</p>
<table border='1'>
<tr><th>Type</th><th>Username</th><th>Student Number</th><th>Real Name</th><th>Paid</th><th>Renew</th></tr>
{foreach name=members from=$members item=member}
<tr>
<td>{$member.typename|escape}</td>
<td>{$member.username|escape}</td>
<td>{$member.sid|escape}</td>
<td>{$member.realname|escape}</td>
<td>{$member.paid|escape}</td>
<td>
<form action='{$self}' method='POST' style="margin-bottom: 0px;">
<input type='hidden' name='uid' value='{$member.uid|escape}' />
<input type='hidden' name='lastupdate' value='{$member.lastupdate|escape}' />
<input type='submit' value='Renew'/>
</form>
</td>
</tr>
{/foreach}
</table>
<h2>DO NOT RENEW MEMBERSHIP UNLESS THE MONEY IS ACTUALLY IN THE POT!</h2>
<p>Pay until: {$paydate}</p>
<table border='1'>
<tr>
<th>Type</th>
<th>Username</th>
<th>Student Number</th>
<th>Real Name</th>
<th>Paid</th>
<th>Renew</th>
</tr>
{foreach name=members from=$members item=member}
<tr>
<td>{$member.typename|escape}</td>
<td>{$member.username|escape}</td>
<td>{$member.sid|escape}</td>
<td>{$member.realname|escape}</td>
<td>{$member.paid|escape}</td>
<td>
<form action='{$self}' method='POST' style="margin-bottom: 0px;">
<input type='hidden' name='uid' value='{$member.uid|escape}'/>
<input type='hidden' name='lastupdate' value='{$member.lastupdate|escape}'/>
<input type='submit' value='Renew'/>
</form>
</td>
</tr>
{/foreach}
</table>
{else}
<div class="errorbar">
<div><div><div>
You must be logged in and be a staff member to renew memberships.
</div></div></div>
</div>
<div class="errorbar">
<div>
<div>
<div>
You must be logged in and be a staff member to renew memberships.
</div>
</div>
</div>
</div>
{/if}
<div id="navigationC">
<ul>
{foreach name=menu from=$menu key=name item=target}
<li>{if is_array($target)}<a href="{$baseurl}/{$name}"{if $select==$name} class="select"{/if}>{$name}</a>
<ul>
{foreach name=submenu from=$target key=subitem item=subname}
<li><a href="{$baseurl}{$subname}"{if $subselect==$subitem} class="select"{/if}>{if $smarty.foreach.submenu.last}<span>{/if}{$subitem}{if $smarty.foreach.submenu.last}</span>{/if}</a></li>
{/foreach}
</ul>
{else}<a href="{$baseurl}{$target}"{if $select==$name} class="select"{/if}><span>{$name}</span></a>{/if}</li>
{/foreach}
</ul>
</div>
<div id="navigationC">
<ul>
{foreach name=menu from=$menu key=name item=target}
{if is_array($target)}
<li><a href="{$baseurl}/{$name}"{if $select==$name} class="select"{/if}>{$name}</a>
<ul>
{foreach name=submenu from=$target key=subitem item=subname}
<li{if $smarty.foreach.submenu.last} class="lastsub"{/if}><a
href="{$baseurl}{$subname}"{if $subselect==$subitem} class="select"{/if}>{if $smarty.foreach.submenu.last}
<span>{/if}{$subitem}{if $smarty.foreach.submenu.last}</span>{/if}</a></li>
{/foreach}
</ul>
{else}<li class="lastsub"><a href="{$baseurl}{$target}"{if $select==$name} class="select"{/if}>
<span>{$name}</span></a>{/if}</li>
{/foreach}
</ul>
</div>
<h2>Defnyddwyr Milliways Ar Hyn O Bryd</h2>
{if $people|@count < 1}
<p>No-one logged on to Milliways</p>
<p>No-one logged on to Milliways</p>
{else}
<table class="border">
<tr>
<th>Ffugenw</th>
<th>Amser Diogi</th>
<th>What</th>
</tr>
{foreach name=people from=$people key=personnum item=person}
<tr>
<td>{$person.username}</td>
<td>{$person.idle}</td>
<td>{$person.what}</td>
</tr>
{/foreach}
</table>
<table class="border">
<tr>
<th>Ffugenw</th>
<th>Amser Diogi</th>
<th>What</th>
</tr>
{foreach name=people from=$people key=personnum item=person}
<tr>
<td>{$person.username}</td>
<td>{$person.idle}</td>
<td>{$person.what}</td>
</tr>
{/foreach}
</table>
{/if}
<div class="cbb">
<h3>Current Milliways Users</h3>
{if $people|@count < 1}
<p>No-one active on Milliways</p>
{else}
<ul>
{foreach name=people from=$people key=personnum item=person}
<li>{$person.username} <small>({$person.idle} idle)</small></li>
{/foreach}
</ul>
{/if}
<h3>Current Milliways Users</h3>
{if $people|@count < 1}
<p>No-one active on Milliways</p>
{else}
<ul>
{foreach name=people from=$people key=personnum item=person}
<li>{$person.username}
<small>({$person.idle} idle)</small>
</li>
{/foreach}
</ul>
{/if}
</div>
<div class="cbb">
<h3>Filthy Milliways Idlers</h3>
{if $idlers|@count < 1}
<p>Everyone's awake..!</p>
{else}
<ul>
{foreach name=idlers from=$idlers item=person}
<li>{$person.username} <small>({$person.idle} idle)</small></li>
{/foreach}
</ul>
{/if}
<h3><a href="{$mwpath}/URI">Recent URIs</a></h3>
<ul>
{foreach name=list from=$urilist item=uri}
<li style="white-space: nowrap">{$uri.user}
<small><a href="{$uri.url|escape:'html'}"
title="{$uri.title|escape:'htmlall'}">{$uri.title|truncate:18:"..":true:false|escape:'htmlall'}</a>
</small>
</li>
{/foreach}
</ul>
</div>
<div class="cbb">
<h3><a href="{$mwpath}/tag">Recent TAGs</a></h3>
<ul>
{foreach name=taglist from=$taglist item=tag}
<li>{$tag.user} <a href="{$mwpath}/tag/{$tag.name|escape:'url'}">{$tag.tag}</a></li>
{/foreach}
</ul>
</div>
<table>
<tr>
<td nowrap="nowrap" class="date" colspan="3">
Year: {foreach from=$yearlist item=year}{if $year != $thisyear}<a
href="{$mwpath}/Status/{$year}-01-01">{$year}</a> {else}{$year} {/if}{/foreach}
</td>
</tr>
<tr>
<td nowrap="nowrap" class="date" colspan="3">
Month: {foreach from=$monthlist key=num item=month}{if $num != $thismonth}<a
href="{$mwpath}/Status/{$thisyear}-{$num}-01">{$month}</a> {else}{$month} {/if}{/foreach}
</td>
</tr>
{* do whole months for now
<tr>
<td nowrap="nowrap" class="date" colspan="3">
Day: {foreach from=$daylist item=day}{if $day != $thisday}<a href="{$mwpath}/Status/{$thisyear}-{$thismonth}-{$day}">{$day}</a> {else}{$day} {/if}{/foreach}
</td>
</tr>
*}
{assign var=lastday value=''}
{foreach from=$statuslist item=row name=list}
{if $row.day != $lastday}
{assign var=lastday value=$row.day}
<tr>
<td nowrap="nowrap" class="date" colspan="3">{$row.added|date_format:'%d %b %Y'}</td>
</tr>
{/if}
{assign var=rows value=1}
{if $row.title}{assign var=rows value=$rows+1}{/if}
{if count($row.taglist)}{assign var=rows value=$rows+1}{/if}
<tr>
<td nowrap="nowrap" class="time" rowspan="{$rows}">{$row.hour}</td>
<td>
<a href="{$mwpath}/Status/user/{$row.user|escape:'url'}">{$row.user|escape:'htmlall'}</a> {$row.doing|escape:'htmlall'}
</td>
</tr>
{/foreach}
</table>