// // signed_in > 0 - no, 1 - yes // member_id > // staff > 0 - no, 1 - yes // dash_loaded > 0 - not yet, 1 - non-member, 2 - member, 3 - staff // dash_bg_width > 0 // var access_settings = { signed_in: 0, member_id: 0, staff: 0, dash_loaded: 0, dash_bg_width: 0 }; function access_apply_value(n,v) { access_settings[n] = v; } var User_Access = new Class({ Implements: [Options, Events], options: { }, initialize: function (options) { }, Dashboard: function () { var rez = Tools.rez(); // Dashboard (background) // ---------------------------- if (!$('user_dashboard_bg')) { var dash_bg = PageX.Item('div',{ 'id': 'user_dashboard_bg', 'html': ' ' },document.body,1); dash_bg.style.zIndex = "1101"; dash_bg.style.position = "fixed"; dash_bg.style.visibility = "visible"; dash_bg.style.display = "inline"; dash_bg.style.bottom = "0px"; dash_bg.style.left = "0px"; dash_bg.style.borderStyle = "solid"; dash_bg.style.borderWidth = "1px 0px 0px 0px"; dash_bg.style.borderColor = "#DDDDDD"; dash_bg.style.width = (1*rez[0])+"px"; dash_bg.style.height = "25px"; dash_bg.style.backgroundImage = "url(http://x.gmf.ca/ax10/dash_bg.png)"; } else { var dash_bg = $('user_dashboard_bg'); } if (access_settings.signed_in == 1) { if (access_settings.staff == 1) { // Staff Options // ------------------ } } } }); var Access = new User_Access(); window.addEvent('domready', function() { Access.Dashboard(); });