<%checkUserLogin()%> <% Dim AccountTypes Dim ProfTypes Dim theStates Dim paymentOptions Dim isStudent, isNCFreeTrial, hidePaymentFields, isNewsletter, isCoupon, isCIEBfreeTrial, isCIEB ' *** accountLevel variable used in account_info_form.inc as a function parameter sent to getSubscriptionTypes below ' *** also set in subscription_manage_code.inc accountLevel = request("a") ' subscription_type_id for student is -3 ' subscription_type_id for free trial is 11 isStudent = false isNCFreeTrial = false isNewsletter = false isCIEBfreeTrial = false isCIEB = false IF accountLevel = "-2" THEN isStudent = true hidePaymentFields = true ELSEIF accountLevel = "12" THEN isNCFreeTrial = true hidePaymentFields = true ELSEIF accountLevel = "11" THEN isNewsletter = true hidePaymentFields = true ELSEIF accountLevel = "99" or accountLevel = "98" or accountLevel = "15" THEN ' added 98 for CIEB coupon isCoupon = true hidePaymentFields = true ELSEIF accountLevel = "13" THEN isCIEBfreeTrial = true hidePaymentFields = true ELSEIF accountLevel = "14" THEN isCIEB = true END IF FUNCTION checkGGnotifyUpdate(CN) ' see if they have any active subscriptions Dim rsSub, findActiveSubSql, ggResponse, transID, projectCount, sendEmail ggResponse = 0 ggNote = "" set rsSub = server.createobject("adodb.recordset") findActiveSubSql = "SELECT subscription_type_id, trans_id, project_count FROM gbi2_subscriptions " & _ " WHERE project_count <> 0 " & _ " AND subscription_status_type_id = " & SUBSCRIPTION_STATUS_ACTIVE & _ " AND acct_id = " & currentID rsSub.open findActiveSubSql, cn IF NOT rsSub.eof THEN nc_count = 0 cieb_count = 0 DO WHILE NOT rsSub.EOF transID = rsSub("trans_id") select case rsSub("subscription_type_id") case "-3" nc_count = nc_count + 3 case "1" nc_count = nc_count + 1 case "2" nc_count = nc_count + 3 case "3" nc_count = nc_count + 10 case "11" nc_count = nc_count + 1 case "12" cieb_count = cieb_count + 1 case "13" cieb_count = cieb_count + cInt(rsSub("project_count")) case "14" nc_count = nc_count + 1 case "15" nc_count = cieb_count + 1 case else ' end select rsSub.MoveNext Loop ' we need to notify GG IF Session("email") = new_email_address THEN ' email hasn't changed sendEmail = "" ELSE sendEmail = new_email_address END IF ' make transID unique Randomize transID = transID & "_" & Int(10000*Rnd) insertGGnotifySql = "INSERT INTO gbi2_gg_projects_notify (acct_id, when_added, ncCount, ciebCount, trans_id, is_notified, try_notify, notification_type_id) VALUES (" & _ currentID & ", getDate(), " & nc_Count & ", " & cieb_Count & ", '" & transID & "', 0, 1, " & NOTIFICATION_TYPE_GGCHANGEACCOUNT & ")" CN.Execute(insertGGnotifySql) ggResponse = notify_green_globes_update(CN, currentID, transID, sendEmail) IF ggResponse = 1 THEN checkGGnotifyUpdate = "GreenGlobes was notified of the changes.
" & vbCrLf ELSE checkGGnotifyUpdate = "GreenGlobes could NOT be notified of the changes [" & ggResponse & "].
" & vbCrLf checkGGnotifyUpdate = ggNote & "GreenGlobes will be notified shortly.
" & vbCrLf END IF END IF END FUNCTION ' ************************************ BEGIN DROP DOWN FUNCTIONS ***************************************** SUB getPaymentOptions(conn, pay_type_id) Dim paySQL paymentOptions = "N/A" set rsPayOpts = server.createobject("adodb.recordset") IF inStr(LCase(Request.ServerVariables("path_info")), "subscription") > 0 THEN paySql = "SELECT * FROM gbi2_payment_types WHERE payment_type_id > 0 ORDER BY display_order ASC" ELSE paySql = "SELECT * FROM gbi2_payment_types ORDER BY display_order ASC" END IF rsPayOpts.open paySql, conn IF NOT rsPayOpts.eof = TRUE THEN onChange = "onchange='setHiddenPaymentType();'" paymentOptions = "" & vbCrLf IF pay_type_id <> "" THEN paymentOptions = Replace(paymentOptions, "