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 |
| |
| |
| |
| |
| |
|