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 599 additions and 304 deletions
// Magnific Popup v1.1.0 by Dmitry Semenov
// http://bit.ly/magnific-popup#build=inline+image+ajax+iframe+gallery+retina+imagezoom
(function(a){typeof define=="function"&&define.amd?define(["jquery"],a):typeof exports=="object"?a(require("jquery")):a(window.jQuery||window.Zepto)})(function(a){var b="Close",c="BeforeClose",d="AfterClose",e="BeforeAppend",f="MarkupParse",g="Open",h="Change",i="mfp",j="."+i,k="mfp-ready",l="mfp-removing",m="mfp-prevent-close",n,o=function(){},p=!!window.jQuery,q,r=a(window),s,t,u,v,w=function(a,b){n.ev.on(i+a+j,b)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(b,c){n.ev.triggerHandler(i+b,c),n.st.callbacks&&(b=b.charAt(0).toLowerCase()+b.slice(1),n.st.callbacks[b]&&n.st.callbacks[b].apply(n,a.isArray(c)?c:[c]))},z=function(b){if(b!==v||!n.currTemplate.closeBtn)n.currTemplate.closeBtn=a(n.st.closeMarkup.replace("%title%",n.st.tClose)),v=b;return n.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(n=new o,n.init(),a.magnificPopup.instance=n)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(a.transition!==undefined)return!0;while(b.length)if(b.pop()+"Transition"in a)return!0;return!1};o.prototype={constructor:o,init:function(){var b=navigator.appVersion;n.isLowIE=n.isIE8=document.all&&!document.addEventListener,n.isAndroid=/android/gi.test(b),n.isIOS=/iphone|ipad|ipod/gi.test(b),n.supportsTransition=B(),n.probablyMobile=n.isAndroid||n.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),s=a(document),n.popupsCache={}},open:function(b){var c;if(b.isObj===!1){n.items=b.items.toArray(),n.index=0;var d=b.items,e;for(c=0;c<d.length;c++){e=d[c],e.parsed&&(e=e.el[0]);if(e===b.el[0]){n.index=c;break}}}else n.items=a.isArray(b.items)?b.items:[b.items],n.index=b.index||0;if(n.isOpen){n.updateItemHTML();return}n.types=[],u="",b.mainEl&&b.mainEl.length?n.ev=b.mainEl.eq(0):n.ev=s,b.key?(n.popupsCache[b.key]||(n.popupsCache[b.key]={}),n.currTemplate=n.popupsCache[b.key]):n.currTemplate={},n.st=a.extend(!0,{},a.magnificPopup.defaults,b),n.fixedContentPos=n.st.fixedContentPos==="auto"?!n.probablyMobile:n.st.fixedContentPos,n.st.modal&&(n.st.closeOnContentClick=!1,n.st.closeOnBgClick=!1,n.st.showCloseBtn=!1,n.st.enableEscapeKey=!1),n.bgOverlay||(n.bgOverlay=x("bg").on("click"+j,function(){n.close()}),n.wrap=x("wrap").attr("tabindex",-1).on("click"+j,function(a){n._checkIfClose(a.target)&&n.close()}),n.container=x("container",n.wrap)),n.contentContainer=x("content"),n.st.preloader&&(n.preloader=x("preloader",n.container,n.st.tLoading));var h=a.magnificPopup.modules;for(c=0;c<h.length;c++){var i=h[c];i=i.charAt(0).toUpperCase()+i.slice(1),n["init"+i].call(n)}y("BeforeOpen"),n.st.showCloseBtn&&(n.st.closeBtnInside?(w(f,function(a,b,c,d){c.close_replaceWith=z(d.type)}),u+=" mfp-close-btn-in"):n.wrap.append(z())),n.st.alignTop&&(u+=" mfp-align-top"),n.fixedContentPos?n.wrap.css({overflow:n.st.overflowY,overflowX:"hidden",overflowY:n.st.overflowY}):n.wrap.css({top:r.scrollTop(),position:"absolute"}),(n.st.fixedBgPos===!1||n.st.fixedBgPos==="auto"&&!n.fixedContentPos)&&n.bgOverlay.css({height:s.height(),position:"absolute"}),n.st.enableEscapeKey&&s.on("keyup"+j,function(a){a.keyCode===27&&n.close()}),r.on("resize"+j,function(){n.updateSize()}),n.st.closeOnContentClick||(u+=" mfp-auto-cursor"),u&&n.wrap.addClass(u);var l=n.wH=r.height(),m={};if(n.fixedContentPos&&n._hasScrollBar(l)){var o=n._getScrollbarSize();o&&(m.marginRight=o)}n.fixedContentPos&&(n.isIE7?a("body, html").css("overflow","hidden"):m.overflow="hidden");var p=n.st.mainClass;return n.isIE7&&(p+=" mfp-ie7"),p&&n._addClassToMFP(p),n.updateItemHTML(),y("BuildControls"),a("html").css(m),n.bgOverlay.add(n.wrap).prependTo(n.st.prependTo||a(document.body)),n._lastFocusedEl=document.activeElement,setTimeout(function(){n.content?(n._addClassToMFP(k),n._setFocus()):n.bgOverlay.addClass(k),s.on("focusin"+j,n._onFocusIn)},16),n.isOpen=!0,n.updateSize(l),y(g),b},close:function(){if(!n.isOpen)return;y(c),n.isOpen=!1,n.st.removalDelay&&!n.isLowIE&&n.supportsTransition?(n._addClassToMFP(l),setTimeout(function(){n._close()},n.st.removalDelay)):n._close()},_close:function(){y(b);var c=l+" "+k+" ";n.bgOverlay.detach(),n.wrap.detach(),n.container.empty(),n.st.mainClass&&(c+=n.st.mainClass+" "),n._removeClassFromMFP(c);if(n.fixedContentPos){var e={marginRight:""};n.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}s.off("keyup"+j+" focusin"+j),n.ev.off(j),n.wrap.attr("class","mfp-wrap").removeAttr("style"),n.bgOverlay.attr("class","mfp-bg"),n.container.attr("class","mfp-container"),n.st.showCloseBtn&&(!n.st.closeBtnInside||n.currTemplate[n.currItem.type]===!0)&&n.currTemplate.closeBtn&&n.currTemplate.closeBtn.detach(),n.st.autoFocusLast&&n._lastFocusedEl&&a(n._lastFocusedEl).focus(),n.currItem=null,n.content=null,n.currTemplate=null,n.prevHeight=0,y(d)},updateSize:function(a){if(n.isIOS){var b=document.documentElement.clientWidth/window.innerWidth,c=window.innerHeight*b;n.wrap.css("height",c),n.wH=c}else n.wH=a||r.height();n.fixedContentPos||n.wrap.css("height",n.wH),y("Resize")},updateItemHTML:function(){var b=n.items[n.index];n.contentContainer.detach(),n.content&&n.content.detach(),b.parsed||(b=n.parseEl(n.index));var c=b.type;y("BeforeChange",[n.currItem?n.currItem.type:"",c]),n.currItem=b;if(!n.currTemplate[c]){var d=n.st[c]?n.st[c].markup:!1;y("FirstMarkupParse",d),d?n.currTemplate[c]=a(d):n.currTemplate[c]=!0}t&&t!==b.type&&n.container.removeClass("mfp-"+t+"-holder");var e=n["get"+c.charAt(0).toUpperCase()+c.slice(1)](b,n.currTemplate[c]);n.appendContent(e,c),b.preloaded=!0,y(h,b),t=b.type,n.container.prepend(n.contentContainer),y("AfterChange")},appendContent:function(a,b){n.content=a,a?n.st.showCloseBtn&&n.st.closeBtnInside&&n.currTemplate[b]===!0?n.content.find(".mfp-close").length||n.content.append(z()):n.content=a:n.content="",y(e),n.container.addClass("mfp-"+b+"-holder"),n.contentContainer.append(n.content)},parseEl:function(b){var c=n.items[b],d;c.tagName?c={el:a(c)}:(d=c.type,c={data:c,src:c.src});if(c.el){var e=n.types;for(var f=0;f<e.length;f++)if(c.el.hasClass("mfp-"+e[f])){d=e[f];break}c.src=c.el.attr("data-mfp-src"),c.src||(c.src=c.el.attr("href"))}return c.type=d||n.st.type||"inline",c.index=b,c.parsed=!0,n.items[b]=c,y("ElementParse",c),n.items[b]},addGroup:function(a,b){var c=function(c){c.mfpEl=this,n._openClick(c,a,b)};b||(b={});var d="click.magnificPopup";b.mainEl=a,b.items?(b.isObj=!0,a.off(d).on(d,c)):(b.isObj=!1,b.delegate?a.off(d).on(d,b.delegate,c):(b.items=a,a.off(d).on(d,c)))},_openClick:function(b,c,d){var e=d.midClick!==undefined?d.midClick:a.magnificPopup.defaults.midClick;if(!e&&(b.which===2||b.ctrlKey||b.metaKey||b.altKey||b.shiftKey))return;var f=d.disableOn!==undefined?d.disableOn:a.magnificPopup.defaults.disableOn;if(f)if(a.isFunction(f)){if(!f.call(n))return!0}else if(r.width()<f)return!0;b.type&&(b.preventDefault(),n.isOpen&&b.stopPropagation()),d.el=a(b.mfpEl),d.delegate&&(d.items=c.find(d.delegate)),n.open(d)},updateStatus:function(a,b){if(n.preloader){q!==a&&n.container.removeClass("mfp-s-"+q),!b&&a==="loading"&&(b=n.st.tLoading);var c={status:a,text:b};y("UpdateStatus",c),a=c.status,b=c.text,n.preloader.html(b),n.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),n.container.addClass("mfp-s-"+a),q=a}},_checkIfClose:function(b){if(a(b).hasClass(m))return;var c=n.st.closeOnContentClick,d=n.st.closeOnBgClick;if(c&&d)return!0;if(!n.content||a(b).hasClass("mfp-close")||n.preloader&&b===n.preloader[0])return!0;if(b!==n.content[0]&&!a.contains(n.content[0],b)){if(d&&a.contains(document,b))return!0}else if(c)return!0;return!1},_addClassToMFP:function(a){n.bgOverlay.addClass(a),n.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),n.wrap.removeClass(a)},_hasScrollBar:function(a){return(n.isIE7?s.height():document.body.scrollHeight)>(a||r.height())},_setFocus:function(){(n.st.focus?n.content.find(n.st.focus).eq(0):n.wrap).focus()},_onFocusIn:function(b){if(b.target!==n.wrap[0]&&!a.contains(n.wrap[0],b.target))return n._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(f,[b,c,d]),a.each(c,function(c,d){if(d===undefined||d===!1)return!0;e=c.split("_");if(e.length>1){var f=b.find(j+"-"+e[0]);if(f.length>0){var g=e[1];g==="replaceWith"?f[0]!==d[0]&&f.replaceWith(d):g==="img"?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(j+"-"+c).html(d)})},_getScrollbarSize:function(){if(n.scrollbarSize===undefined){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),n.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return n.scrollbarSize}},a.magnificPopup={instance:null,proto:o.prototype,modules:[],open:function(b,c){return A(),b?b=a.extend(!0,{},b):b={},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(b){A();var c=a(this);if(typeof b=="string")if(b==="open"){var d,e=p?c.data("magnificPopup"):c[0].magnificPopup,f=parseInt(arguments[1],10)||0;e.items?d=e.items[f]:(d=c,e.delegate&&(d=d.find(e.delegate)),d=d.eq(f)),n._openClick({mfpEl:d},c,e)}else n.isOpen&&n[b].apply(n,Array.prototype.slice.call(arguments,1));else b=a.extend(!0,{},b),p?c.data("magnificPopup",b):c[0].magnificPopup=b,n.addGroup(c,b);return c};var C="inline",D,E,F,G=function(){F&&(E.after(F.addClass(D)).detach(),F=null)};a.magnificPopup.registerModule(C,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){n.types.push(C),w(b+"."+C,function(){G()})},getInline:function(b,c){G();if(b.src){var d=n.st.inline,e=a(b.src);if(e.length){var f=e[0].parentNode;f&&f.tagName&&(E||(D=d.hiddenClass,E=x(D),D="mfp-"+D),F=e.after(E).detach().removeClass(D)),n.updateStatus("ready")}else n.updateStatus("error",d.tNotFound),e=a("<div>");return b.inlineElement=e,e}return n.updateStatus("ready"),n._parseMarkup(c,{},b),c}}});var H="ajax",I,J=function(){I&&a(document.body).removeClass(I)},K=function(){J(),n.req&&n.req.abort()};a.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){n.types.push(H),I=n.st.ajax.cursor,w(b+"."+H,K),w("BeforeChange."+H,K)},getAjax:function(b){I&&a(document.body).addClass(I),n.updateStatus("loading");var c=a.extend({url:b.src,success:function(c,d,e){var f={data:c,xhr:e};y("ParseAjax",f),n.appendContent(a(f.data),H),b.finished=!0,J(),n._setFocus(),setTimeout(function(){n.wrap.addClass(k)},16),n.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),b.finished=b.loadError=!0,n.updateStatus("error",n.st.ajax.tError.replace("%url%",b.src))}},n.st.ajax.settings);return n.req=a.ajax(c),""}}});var L,M=function(b){if(b.data&&b.data.title!==undefined)return b.data.title;var c=n.st.image.titleSrc;if(c){if(a.isFunction(c))return c.call(n,b);if(b.el)return b.el.attr(c)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=n.st.image,d=".image";n.types.push("image"),w(g+d,function(){n.currItem.type==="image"&&c.cursor&&a(document.body).addClass(c.cursor)}),w(b+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),r.off("resize"+j)}),w("Resize"+d,n.resizeImage),n.isLowIE&&w("AfterChange",n.resizeImage)},resizeImage:function(){var a=n.currItem;if(!a||!a.img)return;if(n.st.image.verticalFit){var b=0;n.isLowIE&&(b=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",n.wH-b)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(n.content&&n.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var b=0,c=a.img[0],d=function(e){L&&clearInterval(L),L=setInterval(function(){if(c.naturalWidth>0){n._onImageHasSize(a);return}b>200&&clearInterval(L),b++,b===3?d(10):b===40?d(50):b===100&&d(500)},e)};d(1)},getImage:function(b,c){var d=0,e=function(){b&&(b.img[0].complete?(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("ready")),b.hasSize=!0,b.loaded=!0,y("ImageLoadComplete")):(d++,d<200?setTimeout(e,100):f()))},f=function(){b&&(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("error",g.tError.replace("%url%",b.src))),b.hasSize=!0,b.loaded=!0,b.loadError=!0)},g=n.st.image,h=c.find(".mfp-img");if(h.length){var i=document.createElement("img");i.className="mfp-img",b.el&&b.el.find("img").length&&(i.alt=b.el.find("img").attr("alt")),b.img=a(i).on("load.mfploader",e).on("error.mfploader",f),i.src=b.src,h.is("img")&&(b.img=b.img.clone()),i=b.img[0],i.naturalWidth>0?b.hasSize=!0:i.width||(b.hasSize=!1)}return n._parseMarkup(c,{title:M(b),img_replaceWith:b.img},b),n.resizeImage(),b.hasSize?(L&&clearInterval(L),b.loadError?(c.addClass("mfp-loading"),n.updateStatus("error",g.tError.replace("%url%",b.src))):(c.removeClass("mfp-loading"),n.updateStatus("ready")),c):(n.updateStatus("loading"),b.loading=!0,b.hasSize||(b.imgHidden=!0,c.addClass("mfp-loading"),n.findImageSize(b)),c)}}});var N,O=function(){return N===undefined&&(N=document.createElement("p").style.MozTransform!==undefined),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a=n.st.zoom,d=".zoom",e;if(!a.enabled||!n.supportsTransition)return;var f=a.duration,g=function(b){var c=b.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+a.duration/1e3+"s "+a.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,c.css(e),c},h=function(){n.content.css("visibility","visible")},i,j;w("BuildControls"+d,function(){if(n._allowZoom()){clearTimeout(i),n.content.css("visibility","hidden"),e=n._getItemToZoom();if(!e){h();return}j=g(e),j.css(n._getOffset()),n.wrap.append(j),i=setTimeout(function(){j.css(n._getOffset(!0)),i=setTimeout(function(){h(),setTimeout(function(){j.remove(),e=j=null,y("ZoomAnimationEnded")},16)},f)},16)}}),w(c+d,function(){if(n._allowZoom()){clearTimeout(i),n.st.removalDelay=f;if(!e){e=n._getItemToZoom();if(!e)return;j=g(e)}j.css(n._getOffset(!0)),n.wrap.append(j),n.content.css("visibility","hidden"),setTimeout(function(){j.css(n._getOffset())},16)}}),w(b+d,function(){n._allowZoom()&&(h(),j&&j.remove(),e=null)})},_allowZoom:function(){return n.currItem.type==="image"},_getItemToZoom:function(){return n.currItem.hasSize?n.currItem.img:!1},_getOffset:function(b){var c;b?c=n.currItem.img:c=n.st.zoom.opener(n.currItem.el||n.currItem);var d=c.offset(),e=parseInt(c.css("padding-top"),10),f=parseInt(c.css("padding-bottom"),10);d.top-=a(window).scrollTop()-e;var g={width:c.width(),height:(p?c.innerHeight():c[0].offsetHeight)-f-e};return O()?g["-moz-transform"]=g.transform="translate("+d.left+"px,"+d.top+"px)":(g.left=d.left,g.top=d.top),g}}});var P="iframe",Q="//about:blank",R=function(a){if(n.currTemplate[P]){var b=n.currTemplate[P].find("iframe");b.length&&(a||(b[0].src=Q),n.isIE8&&b.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){n.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(b+"."+P,function(){R()})},getIframe:function(b,c){var d=b.src,e=n.st.iframe;a.each(e.patterns,function(){if(d.indexOf(this.index)>-1)return this.id&&(typeof this.id=="string"?d=d.substr(d.lastIndexOf(this.id)+this.id.length,d.length):d=this.id.call(this,d)),d=this.src.replace("%id%",d),!1});var f={};return e.srcAction&&(f[e.srcAction]=d),n._parseMarkup(c,f,b),n.updateStatus("ready"),c}}});var S=function(a){var b=n.items.length;return a>b-1?a-b:a<0?b+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=n.st.gallery,d=".mfp-gallery";n.direction=!0;if(!c||!c.enabled)return!1;u+=" mfp-gallery",w(g+d,function(){c.navigateByImgClick&&n.wrap.on("click"+d,".mfp-img",function(){if(n.items.length>1)return n.next(),!1}),s.on("keydown"+d,function(a){a.keyCode===37?n.prev():a.keyCode===39&&n.next()})}),w("UpdateStatus"+d,function(a,b){b.text&&(b.text=T(b.text,n.currItem.index,n.items.length))}),w(f+d,function(a,b,d,e){var f=n.items.length;d.counter=f>1?T(c.tCounter,e.index,f):""}),w("BuildControls"+d,function(){if(n.items.length>1&&c.arrows&&!n.arrowLeft){var b=c.arrowMarkup,d=n.arrowLeft=a(b.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(m),e=n.arrowRight=a(b.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(m);d.click(function(){n.prev()}),e.click(function(){n.next()}),n.container.append(d.add(e))}}),w(h+d,function(){n._preloadTimeout&&clearTimeout(n._preloadTimeout),n._preloadTimeout=setTimeout(function(){n.preloadNearbyImages(),n._preloadTimeout=null},16)}),w(b+d,function(){s.off(d),n.wrap.off("click"+d),n.arrowRight=n.arrowLeft=null})},next:function(){n.direction=!0,n.index=S(n.index+1),n.updateItemHTML()},prev:function(){n.direction=!1,n.index=S(n.index-1),n.updateItemHTML()},goTo:function(a){n.direction=a>=n.index,n.index=a,n.updateItemHTML()},preloadNearbyImages:function(){var a=n.st.gallery.preload,b=Math.min(a[0],n.items.length),c=Math.min(a[1],n.items.length),d;for(d=1;d<=(n.direction?c:b);d++)n._preloadItem(n.index+d);for(d=1;d<=(n.direction?b:c);d++)n._preloadItem(n.index-d)},_preloadItem:function(b){b=S(b);if(n.items[b].preloaded)return;var c=n.items[b];c.parsed||(c=n.parseEl(b)),y("LazyLoad",c),c.type==="image"&&(c.img=a('<img class="mfp-img" />').on("load.mfploader",function(){c.hasSize=!0}).on("error.mfploader",function(){c.hasSize=!0,c.loadError=!0,y("LazyLoadError",c)}).attr("src",c.src)),c.preloaded=!0}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=n.st.retina,b=a.ratio;b=isNaN(b)?b():b,b>1&&(w("ImageHasSize."+U,function(a,c){c.img.css({"max-width":c.img[0].naturalWidth/b,width:"100%"})}),w("ElementParse."+U,function(c,d){d.src=a.replaceSrc(d,b)}))}}}}),A()})
This diff is collapsed.
(function($) {
"use strict"
///////////////////////////
// Preloader
$(window).on('load', function() {
$("#preloader").delay(600).fadeOut();
});
///////////////////////////
// Scrollspy
$('body').scrollspy({
target: '#nav',
offset: $(window).height() / 2
});
///////////////////////////
// Smooth scroll
$("#nav .main-nav a[href^='#']").on('click', function(e) {
e.preventDefault();
var hash = this.hash;
$('html, body').animate({
scrollTop: $(this.hash).offset().top
}, 600);
});
$('#back-to-top').on('click', function(){
$('body,html').animate({
scrollTop: 0
}, 600);
});
///////////////////////////
// Btn nav collapse
$('#nav .nav-collapse').on('click', function() {
$('#nav').toggleClass('open');
});
///////////////////////////
// Mobile dropdown
$('.has-dropdown a').on('click', function() {
$(this).parent().toggleClass('open-drop');
});
///////////////////////////
// On Scroll
$(window).on('scroll', function() {
var wScroll = $(this).scrollTop();
// Fixed nav
wScroll > 1 ? $('#nav').addClass('fixed-nav') : $('#nav').removeClass('fixed-nav');
// Back To Top Appear
wScroll > 700 ? $('#back-to-top').fadeIn() : $('#back-to-top').fadeOut();
});
///////////////////////////
// magnificPopup
$('.work').magnificPopup({
delegate: '.lightbox',
type: 'image'
});
///////////////////////////
// Owl Carousel
$('#about-slider').owlCarousel({
items:1,
loop:true,
margin:15,
nav: true,
navText : ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
dots : true,
autoplay : true,
animateOut: 'fadeOut'
});
$('#testimonial-slider').owlCarousel({
loop:true,
margin:15,
dots : true,
nav: false,
autoplay : true,
responsive:{
0: {
items:1
},
992:{
items:2
}
}
});
})(jQuery);
This diff is collapsed.
<?php
exec("cd ..; git reset --hard HEAD; git pull", $retArr, $retVal);
if ($retVal == 0) {
print("ok");
exit(0);
}
print("not ok\n");
var_dump($retArr);
var_dump($retVal);
?>
\ No newline at end of file
......@@ -23,10 +23,10 @@ if (isset($session->groups[$permission])) {
$smarty->assign("banana_admin", TRUE);
if ($_REQUEST['action'] == "award") {
if (trim($_POST['why']) !== "") {
$number = intval($_POST['number']);
if (trim($_REQUEST['why']) !== "") {
$number = intval($_REQUEST['number']);
$why = $_POST['why'];
$why = $_REQUEST['why'];
if ((abs($number) <= $maxbanana) && $number) {
......@@ -46,8 +46,8 @@ if (isset($session->groups[$permission])) {
}
} elseif ($session->loggedin) {
if ($_REQUEST['action'] == "award") {
$number = intval($_POST['number']);
$why = $_POST['why'];
$number = intval($_REQUEST['number']);
$why = $_REQUEST['why'];
// Send a mail to someone about them bananas
$msgbody = $session->username . " thinks $who deserves $number bananas:\r\n";
......
......@@ -12,7 +12,7 @@ will return "nope" if the user/pass passed is inavlid
Example usage:
include_once("ldap-auth.php");
require "ldap-auth.php";
isAuthd = ldapAuth("usaername", "password");
......@@ -29,6 +29,8 @@ if (isAuthd == "sucs"){
// we don't care about warnings, we write our own
error_reporting(E_ERROR | E_PARSE);
define(LDAP_OPT_DIAGNOSTIC_MESSAGE, 0x0032);
function ldapAuth($username, $password)
{
......@@ -45,24 +47,29 @@ function ldapAuth($username, $password)
$username = implode("@", $s);
}
// filter out everything but A-Z a-z 0-9 . - _ from username
$safeusername = preg_replace("/[^A-Za-z0-9\.\-\_]/", '', $username);
// if safeusername isn't the same as username just error out
if ($safeusername != $username) {
return "nope";
}
// ldap servers
$sucsLDAPServer = 'silver.sucs.swan.ac.uk';
$lisLDAPServer = 'ccs-suld1.swan.ac.uk';
// lis auth stuffs
$lisUsernameOu = substr($username, -1);
$lisOtherOu = "Moved";
$issLDAPServer = '192.168.10.16';
// how to bind
$sucsBindDn = "uid=$username,ou=People,dc=sucs,dc=org";
$lisBindDn1 = "cn=$username,ou=$lisUsernameOu,ou=Students,ou=SWANSEA,o=SWANUNI";
$lisBindDn2 = "cn=$username,ou=$lisOtherOu,ou=Students,ou=SWANSEA,o=SWANUNI";
$sucsBindDn = "uid=$safeusername,ou=People,dc=sucs,dc=org";
$issBindDn = "cn=$safeusername,ou=Students,ou=Active,ou=Resources,o=Swansea";
// Main auth
// Try and connect to silver
$ldapconnSUCS = ldap_connect($sucsLDAPServer) or die("Could not connect to SUCS LDAP server.");
ldap_set_option($ldapconnSUCS,LDAP_OPT_PROTOCOL_VERSION,3);
if ($ldapconnSUCS) {
//echo "Connected to $sucsLDAPServer <br>";
......@@ -73,28 +80,28 @@ function ldapAuth($username, $password)
if ($ldapbindSUCS) {
//echo "Auth'd as $username using SUCS LDAP<br>";
return "sucs";
// turns out they didn't give us valid sucs creds, lets try lis now
// turns out they didn't give us valid sucs creds, lets try iss now
} else {
// try and connect to the lis ldap server
$ldapconnLIS = ldap_connect($lisLDAPServer) or die("Could not connect to uni LDAP server.");
//echo "Connected to $lisLDAPServer <br>";
// try and connect to the iss ldap server
$ldapconnISS = ldap_connect($issLDAPServer) or die("Could not connect to uni LDAP server.");
// echo "Connected to $issLDAPServer <br>";
ldap_set_option($ldapconnISS,LDAP_OPT_PROTOCOL_VERSION,3);
// lets try and bind to the uni ldap
$ldapbindLIS1 = ldap_bind($ldapconnLIS, $lisBindDn1, $password);
if ($ldapbindLIS1) {
//echo "Auth'd as $username using uni LDAP using ou=$lisUsernameOu<br>";
$ldapbindiss = ldap_bind($ldapconnISS, $issBindDn, $password);
/*if (ldap_get_option($ldapconnISS, LDAP_OPT_DIAGNOSTIC_MESSAGE, $extended_error)) {
echo "Error Binding to LDAP: $extended_error";
}*/
if ($ldapbindiss) {
//echo "Auth'd as $username using uni LDAP using ou=$issUsernameOu<br>";
return "uni";
} else {
$ldapbindLIS2 = ldap_bind($ldapconnLIS, $lisBindDn2, $password);
if ($ldapbindLIS2) {
//echo "Auth'd as $username using uni LDAP using ou=moved<br>";
return "uni";
// shit, couldn't bind to anything
} else {
//exit("Invalid Username or Password");
return "nope";
}
//exit("Invalid Username or Password");
return "nope";
}
}
}
......
<?
<?php
function make_password($length = 8)
{
$vowels = "aeiouy";
......@@ -29,21 +29,43 @@ function make_password($length = 8)
return $password;
}
function findUid($start, $end)
// https://stackoverflow.com/a/44428794
function cryptPassword($password, $salt = "", $rounds = 5000)
{
$ds = ldap_connect("localhost");
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
$r = ldap_bind($ds);
$sr = ldap_search($ds, "dc=sucs,dc=org", "uid=*", array(uidNumber));
$info = ldap_get_entries($ds, $sr);
for ($i = 0; $i < $info[count]; $i++) {
$uids[$info[$i][uidnumber][0]] = true;
}
for ($i = $start; $i < $end; $i++) {
if (!isset($uids[$i])) {
$safeuid = $i;
break;
if ($salt == "") {
// Generate random salt
$salt = substr(bin2hex(openssl_random_pseudo_bytes(16)),0,16);
}
// $6$ specifies SHA512
$hash = crypt($password, sprintf('$6$rounds=%d$%s$', $rounds, $salt));
return $hash;
}
function generateUid()
{
//get the year, this'll be the start/prefix of the uid
$prefix = date("Y");
//generate a uid
//check to see if it's taken/safe to use
$ok = false;
while ($ok == false) {
//generate random number between 00000 and 99999
$uid = sprintf("%05d", mt_rand(0, 99999));
//id return 1 for error (safe to take). 0 for success (taken) not safe
exec("id ".$prefix.$uid, $output, $returnVal);
//check the result of id
if ($returnVal == 1) {
// We have an unused one!
$ok = true;
$safeuid = $prefix.$uid;
}
}
return $safeuid;
......@@ -54,7 +76,7 @@ function generateLdif($uid, $password, $type, $realname, $username)
// explode the realname
$nameexplode = explode(' ', trim($realname));
// hash the password
$ldappassword = "{SHA}" . base64_encode(pack("H*", sha1($password)));
$ldappassword = "{CRYPT}" . cryptPassword($password);
// compile ldif
$ldif = "dn: uid=" . $username . ",ou=People,dc=sucs,dc=org\n";
$ldif .= "uid: " . $username . "\n";
......@@ -117,7 +139,7 @@ function renew_membership($username)
$sucsDB->Execute("UPDATE members SET paid=?, lastupdate=DEFAULT, lastedit=? WHERE username=?", array(paidUntil(time()), "99999", $username));
// Give them their 200 print credits
exec("/usr/local/sbin/printerrenew.apache ${username} 200");
exec("sudo /usr/local/sbin/printerrenew.apache ${username} 200");
// apprently sending them an email confirming so is nice
$message = "Your Swansea University Computer Society (SUCS) membership has been renewed\n\n";
......
......@@ -2,10 +2,10 @@
/* mechanism for members to give us feedback about web pages */
// where do website feedback mails go?
$contact = "imranh@sucs.org";
$contact = "devel@lists.sucs.org";
if ($session->loggedin) {
if ($_REQUEST["action"] == "feedback") {
if ($_REQUEST["action"] == "feedback" && $_REQUEST["feedback"] != "") {
$feedback = $_REQUEST["feedback"];
$msgbody = "{$session->username} had this to say about the page {$_SERVER['REQUEST_URI']}:\r\n\r\n";
......
<?
<?php
function piechart($title, $slice, $itemName, $fsizes = 0)
{
......
<?
<?php
function sanitizePhone($phone)
{
return preg_replace("/[ ()]/", "", $phone);
......
<?
<?php
// To use:
// include_once "session.php"
// $mysession = new Session;
......@@ -116,7 +116,15 @@ class Session
// Is this a login attempt ?
if ($submit != '' && $session_user != '' && $session_pass != '') {
$this->session_init($session_user, $session_pass);
// filter out everything but A-Z a-z 0-9 . - _ from username
$safeusername = preg_replace("/[^A-Za-z0-9\.\-\_]/", '', $session_user);
if ($safeusername != $session_user) {
trigger_error("Invalid username", E_USER_NOTICE);
$this->newsession();
return;
} elseif ($safeusername == $session_user) {
$this->session_init($safeusername, $session_pass);
}
}
// Retrieve session information
......@@ -228,7 +236,7 @@ class Session
// the bash script returns 0 for no and 1 for yes, takes one arg, username
$this->email = shell_exec("../plugins/sucsunreadmail $user");
if (file_exists($info['homedirectory'][0] . "/.forward")) {
if (file_exists($info['homedirectory'][0] . "/.forward") && ! is_link($info['homedirectory'][0] . "/.forward")) {
$forward = file($info['homedirectory'][0] . "/.forward");
$this->email_forward = preg_replace("/\n/", "", $forward[0]);
}
......
......@@ -31,12 +31,29 @@ $membership_data = $formated_raw_data["table1"]["table1_Product_Collection"]["ta
// make a new array that just contains *every* member no matter what they bought
$just_members = array();
foreach ($membership_data as $typeOfMember) {
foreach ($typeOfMember["Detail_Collection"]["Detail"] as $member) {
array_push($just_members, $member["@attributes"]);
}
function filter_array($data){
global $just_members;
// we have more than one type of member if this is true
if (count($data[0]["Detail_Collection"]["Detail"][0]["@attributes"]) == 7){
//split them up then feed them back
foreach ($data as $membershipType){
filter_array($membershipType);
}
// we have more then 1 of the same type of member if this is true
} else if (count($data["Detail_Collection"]["Detail"][0]["@attributes"]) == 7) {
//wack them onto the used array
foreach ($data["Detail_Collection"]["Detail"] as $member) {
array_push($just_members, $member["@attributes"]);
}
// we have 1 member :(
} else if (count($data["Detail_Collection"]["Detail"]["@attributes"]) == 7) {
array_push($just_members, $data["Detail_Collection"]["Detail"]["@attributes"]);
}
}
filter_array($membership_data);
/* You can now use $just_members to probe member detials. It's an array of arrays which each contain:
* transaction_id (recepit id)
* purchaser (full name)
......
<?
<?php
require_once("validationData.php");
require_once("sanitization.php");
/* useful validation functions */
......@@ -7,18 +7,22 @@ require_once("sanitization.php");
function validEmail($email)
{
global $error;
//split user and domain
list($user, $domain) = explode("@", $email);
// check for bad characters, and check for zero length user & domain
if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i", $email) or !$user or !$domain) {
$error = 'an invalid email address (syntax)';
// check for valid syntax
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$error = 'Invalid email address (syntax)';
return false;
}
// Syntax OK
// domain consists of any character after a '@' and cannot contain '@'
// therefore any character after the last '@' is part of the domain
$domain = substr($email, strrpos($email, '@') + 1);
// Check for an mail server
elseif (!getmxrr($domain, $mx) or !gethostbyname($domain)) {
$error = "no mail servers listed for '$domain'";
if (!getmxrr($domain, $mx) or !gethostbyname($domain)) {
$error = "No mail servers listed for '$domain'";
return false;
} else {
// Email address valid from technical point of view
......@@ -26,41 +30,6 @@ function validEmail($email)
}
}
// test whether a password is considered Strong Enough
// ideally we'd want to use cracklib or something here, but no RPM for the php bindings :-(
// dont use this, use weakPassword instead it uses cracklib
function strongPassword($pass)
{
// you call this a password? my cat could bruteforce this.
if (strlen($pass) < 6) {
return false;
}
// start at 0, and increment for certain features
$score = 0;
// greater than 8 characters
if (strlen($pass) > 8) $score++;
// includes lowercase characters
if (preg_match("/[a-z]/", $pass)) $score++;
// includes uppercase characters
if (preg_match("/[A-Z]/", $pass)) $score++;
// includes digits
if (preg_match("/\d/", $pass)) $score++;
// includes "non-word" characters
if (preg_match("/\W/", $pass)) $score++;
// I reckons if it has at least 3 of the above it should be... adequate
// better if it checked for dictionary words too though
if ($score > 3) {
return true;
} else {
return false;
}
}
# Use cracklib to check for weak passwords.
# returns FALSE if the password is good i.e. not weak
# otherwise returns a string saying why its weak
......@@ -112,7 +81,7 @@ function isAlias($username)
return $ok;
}
//check if a user with a sid already exsists
//check if a user with a sid already exists
function sidUsed($sid)
{
$sucsDB = NewADOConnection('postgres8');
......@@ -127,12 +96,12 @@ function sidUsed($sid)
function validUsername($username)
{
global $error;
// check if uname is sytactically valid
// check if uname is syntactically valid
$syntax = preg_match("/^[a-z][a-z0-9_]*$/", $username);
if (!$syntax || (strlen($username) < 2)) {
$error = "Usernames must start with a letter, only contain lowercase letter, numbers 0-9 and underscores (_) and be at least 2 characters.";
$error = "Usernames must start with a letter, only contain lowercase letters, numbers 0-9 and underscores (_) and be at least 2 characters.";
return false;
} // check if the username already exsists
} // check if the username already exists
elseif (posix_getpwnam($username)) {
$error = "Username already taken";
return false;
......@@ -156,14 +125,14 @@ function validSID($SID, $override)
return true;
}
} else {
if (!preg_match("/^[0-9]*$/", $SID) || strlen($SID) != 6) {
if (!preg_match("/^[0-9]{6,}$/", $SID)) {
$error = "Invalid student ID";
return false;
} elseif (sidUsed($SID)) {
$error = "A user with that student ID already exists, email <a href=\"mailto:admin@sucs.org\">admin@sucs.org</a> if this is an error.";
return false;
} elseif (lookupSID($SID) == " ") {
$error = "Student not found, email<a href=\"mailto:admin@sucs.org\">admin@sucs.org</a> if this is an error.";
$error = "Student not found, email <a href=\"mailto:admin@sucs.org\">admin@sucs.org</a> if this is an error.";
return false;
} else {
return true;
......@@ -171,7 +140,7 @@ function validSID($SID, $override)
}
}
function validRealName($realName, $override)
function validName($realName, $override)
{
global $error;
if ($override) {
......@@ -182,56 +151,12 @@ function validRealName($realName, $override)
return true;
}
} else {
//check for enough names for real name (we insist on at least 2
if (count(explode(" ", $realName)) < 2) {
$error = "Too few names given, please give at least two.";
return false;
} //check for a sane realname, see comment below
elseif (!preg_match("/^([A-Z]([.]+ +[A-Z])*([\']+[A-Z])*[a-z]+[ -]*)+$/", $realName)) {
$error = "Name incorrectly formatted, email <a href=\"mailto:admin@sucs.org\">admin@sucs.org</a> if this is an error.";
return false;
} /*
* This should force sane real names, with capitals for the first letter of each word,
* Whist alowing for complex names such as Robin M. O'Leary
*
* break down of regexp
*
* (
* [A-Z] - start with a single capital
* ([.]+ +[A-Z])* - zero or more of, (at least one "." followed by at least one space then another single capital) //we dont expect people to have initals at the end of there names so this is alright
* ([\']+[A-Z])* - zero or more of, (at least one "'"s followed by a single capital letter)
* [a-z]+ - One or more lower case letters, this forces initals to be followed by a "."
*[ -]* - zero or more " "s or "-"s so double barreled names are supported
* )
*
* In its current state
* Robin M. O'Leary is valid
* Robin M O'Leary is not
* Robin M. OLeary is Not
* Robin M. O'LeaRy is valid (though its not meant to be.. bad side effect of not requireing at least one space...)
* BUT... this alows for McSmith's... which is rather nice :)... and of course delibrate
* RObin M O'Leary is not
*
*/
else {
return true;
}
}
}
function validSocName($socname, $override)
{
global $error;
if ($override) {
if ($socname == "") {
$error = "You MUST provide some sort of name";
return false;
} else {
return true;
}
} else {
if (!preg_match('/^[A-Z1-9]/', $socname) || strlen($socname) < 2) {
$error = "Must start with a capital letter or a number and be more than 1 character";
// names can legally be really weird so just check that it is at least 1 visible character
// followed by any number of non-control characters
$realName = trim($realName);
if (!preg_match("/^[[:graph:]][[:print:]]*$/", $realName)) {
$error = "Invalid name";
return false;
} else {
return true;
......@@ -243,9 +168,11 @@ function validAddress($address)
{
global $error;
$address = sanitizeAddress($address);
$regex = "/^([A-Z0-9]([[:alnum:]]|[ .\/'-])*\n)+[A-Z0-9]([[:alnum:]]|[ .\/'-])*$/";
// check that they at least entered in something. Address doesn't need to be as strict when the postcode is.
$regex = "/^.{5,}+$/s";
if (!preg_match($regex, $address)) {
$error = "Please supply at least two valid lines of address.";
$error = "Please supply a valid address.";
return false;
} else {
return true;
......@@ -255,7 +182,10 @@ function validAddress($address)
function validPostcode($postcode)
{
$postcode = sanitizePostcode($postcode);
if (!preg_match('/^[A-Z]{1,2}[0-9]{1,2}[A-Z]{0,1} [0-9][A-Z]{2}$/', $postcode)) {
// matches all postcodes following the valid format described in a 2012 government published document
$postcodeRegex = "/^([A-Z](([0-9][0-9]?)|([A-Z][0-9][0-9]?)|([A-Z]?[0-9][A-Z])) ?[0-9][ABD-HJLNP-UW-Z]{2})$/";
if (!preg_match($postcodeRegex, $postcode)) {
return false;
} else {
return $postcode;
......
<?
<?php
// lookup real names from sid's using campus ldap
function lookupSID($sid)
{
$ds = ldap_connect("ccs-suld1.swan.ac.uk");
$ldappw = file_get_contents("/etc/unildap.secret");
$ldappw = trim($ldappw);
ldap_bind($ds, "cn=SUCS-BIND,ou=ServiceAccount,o=SWANUNI", $ldappw);
$sr = ldap_search($ds, "ou=students,ou=Swansea,o=swanuni", "uid=" . $sid);
$ds = ldap_connect("192.168.10.16");
ldap_set_option($ds, LDAP_OPT_NETWORK_TIMEOUT, 10); /* 10 second timeout */
ldap_bind($ds);
$sr = ldap_search($ds, "ou=Active,ou=Resources,o=Swansea", "EDUPERSONTARGETEDID=" . $sid);
$info = ldap_get_entries($ds, $sr);
ldap_unbind($ds);
return ucwords(strtolower($info[0]['givenname'][0] . " " . $info[0]['sn'][0]));
......
......@@ -8,7 +8,7 @@ Date: May 2002</p>
<ol>
<li>Members of Swansea University Computer Society are entitled to an account on the SUCS network. For all except life members, membership will only be granted on payment of the appropriate fee.</li>
<li>All members agree not to do anything to bring the Society into disrepute, and to abide by the Terms and Conditions of the Society, as noted below and as may be subsequently amended. Non-compliance with these rules may result in membership being withdrawn.</li>
<li>Members must comply with the regulations of the network(s) over which they access the SUCS network. This will always include the UK Joint Academic Network (JANET), the Acceptable Use Policy of which can be found at <a href="http://www.ja.net/services/publications/policy/aup.html">http://www.ja.net/services/publications/policy/aup.html</a>.</li>
<li>Members must comply with the regulations of the network(s) over which they access the SUCS network. This will always include the UK Joint Academic Network (JANET), the Acceptable Use Policy of which can be found at <a href="https://community.jisc.ac.uk/library/acceptable-use-policy">https://community.jisc.ac.uk/library/acceptable-use-policy</a>.</li>
<li>Except when explicitly set up for clubs or groups within the University, accounts on the SUCS network are strictly for use by one person only. Multiple use of personal accounts is prohibited, and may result in the offending owner's account being withdrawn. 'Multiple use' includes the owner of the account making known his/her password to others, as well as allowing others access to the account by other means.</li>
<li>Members must take into account the relevant laws of England and Wales as they apply to their use of the SUCS network. These include, but are not limited to, the Data Protection Act (1984), the Copyright, Designs and Patents Act (1988), the Obscene Publications Act (1959 &amp; 1964 etc), the Telecommunications Act (1984), and the Computer Misuse Act (1990).</li>
<li>Members must always use the SUCS network in a manner that does not adversely affect its use by others. In particular, disproportionate use of system resources (including, but not limited to, disc space, network bandwidth and processor time), may result in offending processes and/or files being terminated and/or removed without warning.</li>
......
<h1>Swansea University Computer Society Data Policy</h1>
<p>Date: May 2018</p>
<p>GDPR (EU regulation 2016/679) replaces the Data Protection Directive
(EU directive 95/46/EC) on 25/05/2018. As per articles 12, 13, and 14 here is
our policy on data.</p></p>
<p>This is aimed to be the one and only place with regards to data within
Swansea University Computer Society, henceforth refereed to as SUCS.
This is written in as simple language as possible therefore may include some
informal phrasing.</p>
<h1>Clarifications:</h1>
<h3>Interested groups:</h3>
<ul>
<li/>
<p>Swansea University Computer Society (SUCS). SUCS is <b>not</b>
a legal entity. We are a ‘group’ of unpaid volunteers within a
larger charity. SUCS does not have a data protection officer. We are able to
deal with data related queries directly via the email address
<a href="mailto:admin@sucs.org">admin@sucs.org</a></p>
<p>In this document we consider “our” stuff to be any computer
system or network we manage, even if we do not directly own such
system or network.</p>
<li/>
<p>Swansea University Students' Union (Charity number:
1149941). Is the organisation we are a part of, legally no
difference between us (SUCS) and them. You may contact them via
<a href="mailto:info@swansea-union.co.uk">info@swansea-union.co.uk</a> for
any queries.</p>
<li/>
<p>Swansea University (Charity Number: 1138342). You may contact them via
<a href="mailto:dataprotection@swansea.ac.uk">dataprotection@swansea.ac.uk</a>
for any queries.</p>
<li/>
<p>You, the ‘data subject’, just by reading this (it’s
only available via our website) we have collected personal data on
you.</p>
</ul>
<p><br/>
<br/>
</p>
<h1></h1>
<h1>Data:</h1>
<h3>Non-members:</h3>
<p>SUCS stores data about your interactions with our systems as per
Article 6, Paragraph 1, Point F, Recital 49 of GDPR. It is not used
for purposes other than described in Recital 49.</p>
<p>Such data is exempt from Right To Be Forgotten (Article 17)
requests as per Article 17, Paragraph 3, Point E.</p>
<p>It may be shared with Swansea University ISS Networking Team and
Law Enforcement upon request.</p>
<p>No other data is stored.</p>
<h3>Members:</h3>
<p>SUCS stores data about all your interactions with our systems as
per Article 6, Paragraph 1, Point F, Recital 49 of GDPR. It is not
used for purposes other than described in Recital 49.</p>
<p>Such data is exempt from Right To Be Forgotten (Article 17)
requests as per Article 17, Paragraph 3, Point E.</p>
<p>It may be shared with Swansea University ISS Networking Team and
Law Enforcement upon request.</p>
<p>SUCS only starts to store other personal data until a member has
created a account on our systems.</p>
<p>Once you have created a account we hold the following personal
data that you give us:</p>
<ul>
<li/>
<p>Name</p>
<li/>
<p>Contact Details</p>
<ul>
<li/>
<p>Phone number</p>
<li/>
<p>Address</p>
<li/>
<p>Email address</p>
</ul>
<li/>
<p>SUCS Username</p>
<li/>
<p>SUCS UID</p>
<li/>
<p>Swansea University ID</p>
<li/>
<p>CCTV images &amp; video</p>
</ul>
<p>SUCS username is used to identify and address you.</p>
<p>SUCS UID is used in reference to GDPR Recital 49.</p>
<p>Swansea University ID is used to verify membership eligibility and
linkage when interfacing with Swansea University Students’ Union
and Swansea University.</p>
<p>CCTV is used in a non-monitoring fashion, history is only accessed
by staff when there is reasonable need. CCTV may be shared with
Swansea University (Estates and Facilities – Security) and law
enforcement.</p>
<p>Other stored details are used for contact purposes. They are not
shared with any third party outside of SUCS. However, they may be
shared with law enforcement when required.</p>
<p>We do not share data with third parties, that includes the
Students’ Union unless otherwise stated.</p>
<h1>Data Requests:</h1>
<h3>Non-members:</h3>
<p>You may send data requests for your data to <a href="mailto:admin@sucs.org">admin@sucs.org</a></p>
<h3>Members:
</h3>
<p>You may send data requests for your data to <a href="mailto:admin@sucs.org">admin@sucs.org</a></p>
<h3>Students’ Union Staff:</h3>
<p>We do not share data directly, if you would like some data please
speak to us at <a href="mailto:admin@sucs.org">admin@sucs.org</a></p>
<h3>Swansea University Staff:</h3>
<p>ISS Networking Team - You may send data requests to <a href="mailto:admin@sucs.org">admin@sucs.org</a></p>
<p>Estates Security - You may send data requests to <a href="mailto:admin@sucs.org">admin@sucs.org</a></p>
<p>Other – We do not share data directly.</p>
<h3>Law Enforcement:</h3>
<p>You may send data requests to <a href="mailto:admin@sucs.org">admin@sucs.org</a>.
If you wish to have a specific person to liaise with, please say so
in the original email.</p>
\ No newline at end of file
<h2>Donations Policy</h2>
<ol>
<li> All donations to the society are final, and non-returnable. Any equipment loaned to the society must have the terms of the loan (e.g. time period and/or conditions of fair use) laid out clearly before the loan is accepted.</li>
<li>The society shall not feel obligated to reimburse a donator in any way. Donations should be given freely for the benefit of the society and its members, not for personal gain.</li>
<li>Only equipment that has a direct and immediate use, or a clearly defined planned near-future use, shall be accepted. We simply do not have the storage capacity to collect items that 'may be useful someday'.</li>
<li>A clear log shall be kept of who, what and when equipment was donated, and kept in a prominent place so as to honour our benefactors.</li>
<li> The Society can not be held responsible for the safe keeping of any items loaned or otherwise to it. Whilst every effort will be maintained to protect it, any subsequent damage or theft is entirely at your own risk.</li>
<li> The Society retains the right to return or dispose of any item that threatens, or is believed to threaten the safety rules laid down by the Student Union and the University.</li>
<li> The Society may use, or dispose of donated equipment (non-loan items) in any manner that benefits the society, this includes potentially selling items in order to raise funds to purchase more directly useful items, or donating or swapping equipment with others for good will and favour towards the society.</li>
</ol>
<h2>Donated Equipment List</h2>
<p> This list is incomplete</p>
<table border="0" class="border wide">
<tbody>
<tr>
<th>Who</th><th>Date</th><th>Type</th><th>Items</th>
</tr>
<tr>
<td>Arthur</td>
<td>Sept 99</td>
<td>Loan</td>
<td>Deskjet 540 colour printer</td>
</tr>
<tr>
<td>Zaphod &amp; Spook</td>
<td>2000</td>
<td>Loan</td>
<td>Sun Workstations</td>
</tr>
<tr>
<td>Anarchy</td>
<td>2000</td>
<td>Loan</td>
<td>Motherboard, CPU, and RAM for Platinum</td>
</tr>
<tr>
<td>Milamber</td>
<td>2001</td>
<td>Loan</td>
<td>Brother Mono Laser Printer.</td>
</tr>
<tr>
<td>Weazel</td>
<td>Sep 2002</td>
<td>Loan</td>
<td>120Gb IDE Hard disk for Silver</td>
</tr>
<tr>
<td>Rohan</td>
<td>Jan 2003</td>
<td>Donated</td>
<td>PII 350MHz machine to be used as Cobalt<br /> Dual CPU machine<br /> Empty 1U Rack Case </td>
</tr>
<tr>
<td>Anarchy</td>
<td>Feb 2003</td>
<td>Donated</td>
<td>17" Dell Monitor for Cobalt</td>
</tr>
<tr>
<td>Anarchy &amp; Dick</td>
<td>Feb 2003</td>
<td>Donated</td>
<td>Profits from 2002 BT lecture, presented as components to build 2 new workstations</td>
</tr>
<tr>
<td>Anarchy</td>
<td>Dec 2003</td>
<td>Loan</td>
<td>Pentium to replace the router, a Cyrix machine for workstation</td>
</tr>
<tr>
<td>jk</td>
<td>June 2005</td>
<td>Donated</td>
<td>PIII 1GHz + Board + Memory, used to create thorium</td>
</tr>
<tr>
<td>aeternus</td>
<td>Nov 2005</td>
<td>Donated</td>
<td>19" monitor. Used to replace platinum's old small one</td>
</tr>
<tr>
<td>Rohan</td>
<td>Nov 2005</td>
<td>Donated</td>
<td>Dual PIII 1GHz machine with SCSI disk<br /> 2 other boxes (expand on this..)</td>
</tr>
<tr>
<td>EMC via Rohan</td>
<td>Nov 2005</td>
<td>Donated</td>
<td>PIII 800MHz 1U box with 4x80GB disks</td>
</tr>
<tr>
<td>gimbo</td>
<td>Feb 2006</td>
<td>Donated</td>
<td>17" monitor. Used to replace zinc's old one.</td>
</tr>
<tr>
<td>mattaw</td>
<td>Sep 2006</td>
<td>Donated</td>
<td>Athlon PC</td>
</tr>
<tr>
<td>Rohan<br /></td>
<td>Summer 2006<br /></td>
<td>Donated<br /></td>
<td>Another Dual PIII 1GHz machine with SCSI disk</td>
</tr>
<tr>
<td>Rohan<br /></td>
<td>August 2011<br /></td>
<td>Loan<br /></td>
<td>
<p>UPS (Smart-UPS 1400) and Switch (3Com 3870)</p>
</td>
</tr>
<tr>
<td>Problaze<br /></td>
<td>September 2012<br /></td>
<td>Donated<br /></td>
<td>
<p>Dell Poweredge 1950</p>
</td>
</tr>
</tbody>
<h2>Donations Policy</h2>
<ol>
<li> All donations to the society are final, and non-returnable. Any equipment loaned to the society must have the terms of the loan (e.g. time period and/or conditions of fair use) laid out clearly before the loan is accepted.</li>
<li>The society shall not feel obligated to reimburse a donator in any way. Donations should be given freely for the benefit of the society and its members, not for personal gain.</li>
<li>Only equipment that has a direct and immediate use, or a clearly defined planned near-future use, shall be accepted. We simply do not have the storage capacity to collect items that 'may be useful someday'.</li>
<li>A clear log shall be kept of who, what and when equipment was donated, and kept in a prominent place so as to honour our benefactors.</li>
<li> The Society can not be held responsible for the safe keeping of any items loaned or otherwise to it. Whilst every effort will be maintained to protect it, any subsequent damage or theft is entirely at your own risk.</li>
<li> The Society retains the right to return or dispose of any item that threatens, or is believed to threaten the safety rules laid down by the Student Union and the University.</li>
<li> The Society may use, or dispose of donated equipment (non-loan items) in any manner that benefits the society, this includes potentially selling items in order to raise funds to purchase more directly useful items, or donating or swapping equipment with others for good will and favour towards the society.</li>
</ol>
<h2>Donated Equipment List</h2>
<p> This list is incomplete</p>
<table border="0" class="border wide">
<tbody>
<tr>
<th>Who</th><th>Date</th><th>Type</th><th>Items</th>
</tr>
<tr>
<td>Arthur</td>
<td>Sept 99</td>
<td>Loan</td>
<td>Deskjet 540 colour printer</td>
</tr>
<tr>
<td>Zaphod &amp; Spook</td>
<td>2000</td>
<td>Loan</td>
<td>Sun Workstations</td>
</tr>
<tr>
<td>Anarchy</td>
<td>2000</td>
<td>Loan</td>
<td>Motherboard, CPU, and RAM for Platinum</td>
</tr>
<tr>
<td>Milamber</td>
<td>2001</td>
<td>Loan</td>
<td>Brother Mono Laser Printer.</td>
</tr>
<tr>
<td>Weazel</td>
<td>Sep 2002</td>
<td>Loan</td>
<td>120Gb IDE Hard disk for Silver</td>
</tr>
<tr>
<td>Rohan</td>
<td>Jan 2003</td>
<td>Donated</td>
<td>PII 350MHz machine to be used as Cobalt<br /> Dual CPU machine<br /> Empty 1U Rack Case </td>
</tr>
<tr>
<td>Anarchy</td>
<td>Feb 2003</td>
<td>Donated</td>
<td>17" Dell Monitor for Cobalt</td>
</tr>
<tr>
<td>Anarchy &amp; Dick</td>
<td>Feb 2003</td>
<td>Donated</td>
<td>Profits from 2002 BT lecture, presented as components to build 2 new workstations</td>
</tr>
<tr>
<td>Anarchy</td>
<td>Dec 2003</td>
<td>Loan</td>
<td>Pentium to replace the router, a Cyrix machine for workstation</td>
</tr>
<tr>
<td>jk</td>
<td>June 2005</td>
<td>Donated</td>
<td>PIII 1GHz + Board + Memory, used to create thorium</td>
</tr>
<tr>
<td>aeternus</td>
<td>Nov 2005</td>
<td>Donated</td>
<td>19" monitor. Used to replace platinum's old small one</td>
</tr>
<tr>
<td>Rohan</td>
<td>Nov 2005</td>
<td>Donated</td>
<td>Dual PIII 1GHz machine with SCSI disk<br /> 2 other boxes (expand on this..)</td>
</tr>
<tr>
<td>EMC via Rohan</td>
<td>Nov 2005</td>
<td>Donated</td>
<td>PIII 800MHz 1U box with 4x80GB disks</td>
</tr>
<tr>
<td>gimbo</td>
<td>Feb 2006</td>
<td>Donated</td>
<td>17" monitor. Used to replace zinc's old one.</td>
</tr>
<tr>
<td>mattaw</td>
<td>Sep 2006</td>
<td>Donated</td>
<td>Athlon PC</td>
</tr>
<tr>
<td>Rohan<br /></td>
<td>Summer 2006<br /></td>
<td>Donated<br /></td>
<td>Another Dual PIII 1GHz machine with SCSI disk</td>
</tr>
<tr>
<td>Rohan<br /></td>
<td>August 2011<br /></td>
<td>Loan<br /></td>
<td>
<p>UPS (Smart-UPS 1400) and Switch (3Com 3870)</p>
</td>
</tr>
<tr>
<td>Problaze<br /></td>
<td>September 2012<br /></td>
<td>Donated<br /></td>
<td>
<p>Dell Poweredge 1950</p>
</td>
</tr>
<tr>
<td>imranh<br /></td>
<td>June 2017<br /></td>
<td>Donated<br /></td>
<td>
<p>PlayStation 2</p>
</td>
</tr>
</tbody>
</table>
\ No newline at end of file
......@@ -13,14 +13,52 @@
<th>Gaming</th>
</tr>
<tr>
<td><p>2019</p></td>
<td><a href="/~colours/">colours</a> (Declan Morbey)</td>
<td><a href="/~elbows/">elbows</a> (Laurence Sebastian Bowes)</td>
<td><a href="/~mr_miyagi_420/">mr_miyagi_420</a> (Rafal Gajewski)</td>
<td><a href="/~vectre/">vectre</a> (Alexander Moras)</td>
<td><a href="/~mpg/">mpg</a> (Maxwell Michael Gisborne)</td>
</tr>
<tr>
<td>
<p>2018</p>
</td>
<td><a href="/~vectre">vectre</a> (Alexander Moras)</td>
<td><a href="/~elbows">elbows</a> (Laurence Sebastian Bowes)</td>
<td><a href="/~xray_effect">xray_effect</a> (Ryan Williams)</td>
<td><em>None</em></td>
<td><a href="/~arcryalis">arcryalis</a> (Gwen Williams)</td>
</tr>
<tr>
<td>
<p>2017</p>
</td>
<td><a href="/~andy">andy</a> (Andrew Vincent Pover)</td>
<td><a href="/~eggnog">eggnog</a> (George Henry Woolley)</td>
<td><a href="/~sgelfod98">sgelfod98</a> (Megan Warren-Davis)</td>
<td><em>None</em></td>
<td><a href="/~crox">crox</a> (Ciaran Crocker)</td>
</tr>
<tr>
<td>
<p><strong>2015</strong></p>
<p>2016</p>
</td>
<td><strong><a href="/~imranh">imranh</a> (Imran Hussain)</strong></td>
<td><strong><a href="/~stig">stig</a> (Priyan Gami)</strong></td>
<td><strong><a href="/~sockitwench">sockitwench</a> (Courtney Simone Vasile)</strong></td>
<td><strong><a href="/~andy">andy</a> (Andrew Vincent Pover)</strong></td>
<td><strong><a href="/~unreturnable">unreturnable</a> (Isabel Jenkins)</strong></td>
<td><a href="/~elbows">elbows</a> (Laurence Sebastian Bowes)</td>
<td><a href="/~unreturnable">unreturnable</a> (Isabel Jenkins)</td>
<td><a href="/~coatlus">coatlus</a> (Quetzal Mac Creamer Shorey)</td>
<td><a href="/~andy">andy</a> (Andrew Vincent Pover)</td>
<td><a href="/~gigosaurus">gigosaurus</a> (Christopher Lindsay Manners)</td>
</tr>
<tr>
<td>
<p>2015</p>
</td>
<td><a href="/~imranh">imranh</a> (Imran Hussain)</td>
<td><a href="/~stig">stig</a> (Priyan Gami)</td>
<td><a href="/~sockitwench">sockitwench</a> (Courtney Simone Vasile)</td>
<td><a href="/~andy">andy</a> (Andrew Vincent Pover)</td>
<td><a href="/~unreturnable">unreturnable</a> (Isabel Jenkins)</td>
</tr>
<tr>
<td>
......@@ -250,4 +288,4 @@
</tr>
</tbody>
</table>
<p>In 2001, the elections were moved so that the committee now stays in position for one calendar year.</p>
\ No newline at end of file
<p>In 2001, the elections were moved so that the committee now stays in position for one calendar year.</p>
<p>Below are links to the Rules and Regulations of the society:</p> <h2>Conditions of Membership</h2> <p>All SUCS members must adhere to the society&#39;s <a href="Conditions">Terms and Conditions</a>, which incorporate the <a href="https://community.jisc.ac.uk/library/acceptable-use-policy">JANET acceptable use policy</a> governing use of the SUCS network connection.</p> <h2>Room Rules</h2> <p>There is an additional set of rules covering the use of the <a href="Room">SUCS Computer Room</a>. Please take note of the <a href="Room%20Rules">Rules of the Room</a> if you plan to make use of this facility.</p> <h2>Constitution</h2> <p>The <a href="Constitution">SUCS Constitution</a> states the aims and objectives of the society, along with basic rules about how it is run.</p>
\ No newline at end of file
<p>Below are links to the Rules and Regulations of the society:</p>
<h2>Data/Privacy Policy/Notice</h2>
<p>
SUCS stores and processes data, details of which can be found in our
<a href="Data">Data Policy</a>.
</p>
<h2>Conditions of Membership</h2>
<p>
All SUCS members must adhere to the society&#39;s
<a href="Conditions">Terms and Conditions</a>, which incorporate the
<a href="https://community.jisc.ac.uk/library/acceptable-use-policy">JANET
acceptable use policy</a> governing use of the SUCS network connection.
</p>
<h2>Room Rules</h2>
<p>
There is an additional set of rules covering the use of the
<a href="Room">SUCS Computer Room</a>. Please take note of the
<a href="Room%20Rules">Rules of the Room</a> if you plan to make use of this
facility.</p> <h2>Constitution</h2> <p>The <a href="Constitution">SUCS
Constitution</a> states the aims and objectives of the society, along with
basic rules about how it is run.
</p>
\ No newline at end of file