<%@LANGUAGE="VBSCRIPT" CODEPAGE="CP_ACP"%>

Page variables
Variable Name | Type | Value / Description
strSiteOwner | string | First name in the strWebMaster string
strDBNTUserName | string | Member user name - Blank for guests
strUserMemberID | integer | Current member ID - Value of -1 for guests
mLev - deprecated | integer | Member level - Values: 0=guest 2-4=members
arrGroups(x,x) | array | Array holding group id's that member is part of
intIsSuperAdmin | integer (0-1) | boolian - Is current member in the strWebMaster string
strCurDateAdjust |  | = DateAdd("h", strTimeAdjust , Now()) returns: 11/18/2005 11:47:51 comment: Returns the SERVER time offset that is set in the admin area. Member offsets are based on this date/time
strCurDateString | String | = DateToStr2(strCurDateAdjust) returns: "20060218173402" comment: ISO format This is the variable you use to insert the "current date" into the database when submitting or changing items. ALL database 'inserts' that need a current date/time should use this variable.
strForumTimeAdjust |  | = strToDate(strCurDateString) returns: 11/18/2005 11:47:51 comment: Holds the current 'long date' display for the Member.
strForumDateAdjust |  | ChkDate(strCurDateString) returns: 11/18/2005 comment: Holds the current 'short date' display for the Member date
tempArr(x) |  | array holding the strWebMaster names
strOnlinePathInfo |  | Request.ServerVariables("Path_Info")
strOnlineUser |  | Member username or 'Guest'
strOnlineUserIP |  | Current users IP. Not valid if intIsSuperAdmin = true
strOnlineDate strOnlineCheckInTime |  | DateToStr(Date) DateToStr(strForumTimeAdjust)
onlinecount strOnlineUsersCount |  | Count of members and guests currently online
Guests strOnlineGuestsCount |  | Number of GUESTS currently online
Members strOnlineMembersCount |  | Number of MEMBERS currently online
CurPageTitle |  | CurPageType with capitalised first letter
pmimage |  | Holds the <img> tag for the blinking PM icon or a spacer
pmCount |  | Count of your current unread PMs
tmpPageTitle |  | Value for the <title> tag
strReferrer |  | chkString(Request.ServerVariables("HTTP_REFERER"), "refer")
mmImages[0] |  | [JS] "Themes/<%= strTheme %>/icon_max.gif"
mmImages[1] |  | [JS] "Themes/<%= strTheme %>/icon_min.gif"
## Functions
showUpdResult(strMsg)
Displays a themeblock with the message passed (strMsg)
chkIsAdmin(member_ID)
Returns: 0=false 1=true
chkIsSuperAdmin(type,chk)
type: 1=you are passing the member_ID 2=you are passing the member name chk: Either the member_ID or member_name depending on the type you set Returns: 0=false or 1=true
chkIsMbr(fName, fPassword)
Returns 0 if not a member and 1 if they are a member. Used for validating login blocks.
randomNum(9000)
Returns: Random number between 1 and the number passed Use: iVar = randomNum(9000)
shoBreadCrumb arg1,arg2,arg3,arg4,arg5,arg6
arg1 = "Admin|admin_home.asp" arg2 = "Upload Manager|admin_config_uploads.asp" arg3 = "" arg4 = "" arg5 = "" arg6 = "" shoBreadCrumb arg1,arg2,arg3,arg4,arg5,arg6
displayName(rs("M_NAME"),rs("M_GLOW"))
Displays the member name with the appropriate 'glow'
sendOutEmail s_email_to, s_subject, s_msg, s_footer_type, s_format
s_format - 0=plain text 1=HTML s_footer_type = adds predefined footer code to the email (This email generated by SkyPortal) Use like this for plain text emails sendOutEmail eml_reciepient,s_subject,s_msg,2,0 Populate the variables and send it.. uses the site default as the sender.
showPasswordBlock(1,"Themeblock Title",strBlockMessage,0,0) showPasswordBlock(tb_type,tb_title_text,str_Message,show_save-password,show_reg-now)
tb_type = boolian: show a themeblock: 0 = no : 1 = yes tb_title_text = Optional - Themeblock Title text str_Message = Optional - Text to display above the textboxes. show_save-password = boolian: show the save-password option: 0 = no : 1 = yes show_reg-now = boolian: show the "register now" link if they are not a member: 0 = no : 1 = yes -------------------------------------------------------------------- <form action="somewhere.asp" name="form_"> <input type="hidden" value="some_value" name="some_name"> <% strBlockMessage = "Text_here appears above the login fields" showPasswordBlock(1,"Edit Profile",strBlockMessage,0,0) %> </form>
showPasswordBlock2(1,"Themeblock Title",strBlockMessage,0,0,0) showPasswordBlock2(1,"","",0,0,0) showPasswordBlock2(tb_type,tb_title_text,str_Message,show_save-password,show_reg-now,show_secImg)
tb_type = boolian: show a themeblock: 0 = no : 1 = yes tb_title_text = Optional - Themeblock Title text str_Message = Optional - Text to display above the textboxes. show_save-password = boolian: show the save-password option: 0 = no : 1 = yes show_reg-now = boolian: show the "register now" link if they are not a member: 0 = no : 1 = yes show_secImg = boolian: show the security image: 0 = no : 1 = yes -------------------------------------------------------------------- <form action="somewhere.asp" name="form_"> <input type="hidden" value="some_value" name="some_name"> <% strBlockMessage = "Text_here appears above the login fields" showPasswordBlock(1,"Edit Profile",strBlockMessage,0,0,0) %> </form>
"GROUPS" FUNCTIONS
hasAccess("2,4")
Boolian - Returns "true" or "false" Checks the member groups against the allowed group list (comma delimited or an array) that is passed to the function.
getAppPerms(app, perm_type, type)
Returns comma delimited string of groups with access app = can be either the app_id or the app iNAME. perm_type = Which type of access. "read", "write", "full" type = Type of app variable being passed. "id" or "" Uses: picWriteGroup = getAppPerms("pictures","write","") picReadGroup = getAppPerms(intAppID,"read","id") if hasAccess(getAppPerms(intAppID,"read","id")) then ... if hasAccess(getAppPerms("pictures","read","")) then ... if hasAccess(picReadGroup) then ...
setAppPerms(app,fld)
Sets 3 variables to the app read/write/full groups. This function should only be called on individual module pages. It populates the variables for use within the rest of the module. app = can be either the app_id or the app iNAME fld = Type of app variable being passed. "id" or "" intAppID = Module App_ID sAppRead = comma delimited string of groups with READ access sAppWrite = comma delimited string of groups with WRITE access sAppFull = comma delimited string of groups with FULL access bAppRead = true/false - member has READ access bAppWrite = true/false - member has WRITE access bAppFull = true/false - member has FULL access intSubscriptions = integer - 0/1 - (off/on) - allow module Subscriptions intBookmarks = integer - 0/1 (off/on) - allow module Bookmarks intSecCode = integer - 0/1(off/on) - require SecureImage for submitting items
DATE - TIME FUNCTIONS
dispDays = DateDiff("d", chkDate2(rsLink("POST_DATE")), chkDate2(rsLink("END_DATE"))) dateSince = DateDiff("d", chkDate2(rsLink("POST_DATE")), strCurDateAdjust)
strCurDateAdjust = DateAdd("h", strTimeAdjust , Now()) strCurDateString = DateToStr2(strCurDateAdjust) strForumTimeAdjust = strToDate(strCurDateString) strForumDateAdjust = ChkDate(strCurDateString)
getDateDiff(date_string1,date_string2)
Usage: current_date = strCurDateString intDateDifference = getDateDiff(current_date, past_date) '= returns: positive number intDateDifference = getDateDiff(current_date, future_date) '= returns: negative number intDateDifference = getDateDiff( future_date, current_date) '= returns: positive number intDateDifference = getDateDiff( past_date, current_date) '= returns: negative number intDateDifference = getDateDiff( future_date, past_date) '= returns: positive number intDateDifference = getDateDiff( past_date, future_date) '= returns: negative number
strToDate(strDateString)
Returns the current "long date" of the string being passed
chkDate(strDateString)
Returns the current "short date" of the string being passed
chkTime(strDateString)
Returns the current 'time' of the string being passed
JavaScript
<img src="images/thingy.gif" onclick="javascript:document[formname][hidden field name'].value='[value that button would have if you used it]';submit()">
<td onclick="document.location.href='pm.asp'">