<% Response.expires = 0 Response.expiresabsolute = Now() - 1 Response.addHeader "pragma", "no-cache" Response.addHeader "cache-control", "private" Response.addHeader "cache-control", "no-cache" Response.addHeader "cache-control", "no-store" Response.CacheControl = "no-cache" %> <% ewCurSec = 0 ' Initialise ' User levels Const ewAllowAdd = 1 Const ewAllowDelete = 2 Const ewAllowEdit = 4 Const ewAllowView = 8 Const ewAllowList = 8 Const ewAllowReport = 8 Const ewAllowSearch = 8 Const ewAllowAdmin = 16 %> <% ' Initialize common variables x_id = Null: ox_id = Null x_Names = Null: ox_Names = Null x_Sex = Null: ox_Sex = Null x_Address = Null: ox_Address = Null x_Phone = Null: ox_Phone = Null x_Email = Null: ox_Email = Null x_Country = Null: ox_Country = Null x_Occupation = Null: ox_Occupation = Null x_support = Null: ox_support = Null x_financial = Null: ox_financial = Null x_material = Null: ox_material = Null x_contact = Null: ox_contact = Null %> <% Response.Buffer = True ' Load key from QueryString bCopy = True x_id = Request.QueryString("id") If x_id = "" Or IsNull(x_id) Then bCopy = False End If ' Get action sAction = Request.Form("a_add") If (sAction = "" Or IsNull(sAction)) Then If bCopy Then sAction = "C" ' Copy record Else sAction = "I" ' Display blank record End If Else ' Get fields from form x_id = Request.Form("x_id") x_Names = Request.Form("x_Names") x_Sex = Request.Form("x_Sex") x_Address = Request.Form("x_Address") x_Phone = Request.Form("x_Phone") x_Email = Request.Form("x_Email") x_Country = Request.Form("x_Country") x_Occupation = Request.Form("x_Occupation") x_support = Request.Form("x_support") x_financial = Request.Form("x_financial") x_material = Request.Form("x_material") x_contact = Request.Form("x_contact") End If ' Open connection to the database Set conn = Server.CreateObject("ADODB.Connection") conn.Open xDb_Conn_Str Select Case sAction Case "C": ' Get a record to display If Not LoadData() Then ' Load Record based on key Session("ewmsg") = "No records found" conn.Close ' Close Connection Set conn = Nothing Response.Clear Response.Redirect "partnersMSG.asp" End If Case "A": ' Add If AddData() Then ' Add New Record Session("ewmsg") = "Add New Record Successful" conn.Close ' Close Connection Set conn = Nothing Response.Clear Response.Redirect "partnersMSG.asp" Else End If End Select %> Be a Partner
Elifeonline.net: Published since 2005
*
Bookmark and Share
Be A Partner
Be Our Partner

Publishing this magazine on the internet is a great deal of effort.

No doubt, we enjoy doing this work as it is our joy to inform you on happenings in the gospel terrain in Nigeria and Africa at large.

But we cannot do this alone. We need people to work with us in various areas. We need you to do this work better.

Most important among our needs is getting stories from all Africa.

We intend to cover the whole of Christian Africa so that people like you could sit in the comfort of your homes and know what is happening to Christians and Christianity in Cape Coast, Cairo, Addis Ababa, Lagos, Accra, Darkar, etc.

We also desire you to partner with us in financial terms so that services and editorial contributions made could be requitted, engage relevant technologies to monitor stories as they break and knit enough defences for the existence of this web site.

If you desire to join us in this work, please fill the form opposite this column.

The Lord bless you real good.

Contact Information

Field marked * are compulsory.

Names*
">
Sex*
Address*
">
Phone
">
Email*
">
Country*
Occupation ">
I will give support Financial Material Adverts
If financial, how much ">
If material, what? ">
Can we contact you? Yes, call me right away. No, I will contact you.

No, I will credit your account.

Our Account Numbers:
Oceanic Bank:
0380001021397
GTBank: 2238658261590

 

<% conn.Close ' Close Connection Set conn = Nothing %> <% '------------------------------------------------------------------------------- ' Function LoadData ' - Load Data based on Key Value ' - Variables setup: field variables Function LoadData() Dim sSql, rs, sWhere, sGroupBy, sHaving, sOrderBy sSql = "SELECT * FROM [partners]" sWhere = "" sGroupBy = "" sHaving = "" sOrderBy = "" If sWhere <> "" Then sWhere = sWhere & " AND " sWhere = sWhere & "([id] = " & AdjustSql(x_id) & ")" sSql = sSql & " WHERE " & sWhere If sGroupBy <> "" Then sSql = sSql & " GROUP BY " & sGroupBy End If If sHaving <> "" Then sSql = sSql & " HAVING " & sHaving End If If sOrderBy <> "" Then sSql = sSql & " ORDER BY " & sOrderBy End If Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sSql, conn If rs.Eof Then LoadData = False Else LoadData = True rs.MoveFirst ' Get the field contents x_id = rs("id") x_Names = rs("Names") x_Sex = rs("Sex") x_Address = rs("Address") x_Phone = rs("Phone") x_Email = rs("Email") x_Country = rs("Country") x_Occupation = rs("Occupation") x_support = rs("support") x_financial = rs("financial") x_material = rs("material") x_contact = rs("contact") End If rs.Close Set rs = Nothing End Function %> <% '------------------------------------------------------------------------------- ' Function AddData ' - Add Data ' - Variables used: field variables Function AddData() Dim sSql, rs, sWhere, sGroupBy, sHaving, sOrderBy Dim bCheckKey, sSqlChk, sWhereChk sSql = "SELECT * FROM [partners]" sWhere = "" sGroupBy = "" sHaving = "" sOrderBy = "" ' Check for duplicate key bCheckKey = True sWhereChk = sWhere If x_id = "" Or IsNull(x_id) Then bCheckKey = False Else If sWhereChk <> "" Then sWhereChk = sWhereChk & " AND " sWhereChk = sWhereChk & "([id] = " & AdjustSql(x_id) & ")" End If If bCheckKey Then sSqlChk = sSql & " WHERE " & sWhereChk Set rsChk = conn.Execute(sSqlChk) If Not rsChk.Eof Then Session("ewmsg") = "Duplicate value for primary key" rsChk.Close Set rsChk = Nothing AddData = False Exit Function End If rsChk.Close Set rsChk = Nothing End If ' Add New Record If sWhere <> "" Then sWhere = sWhere & " AND " sWhere = sWhere & "(0 = 1)" sSql = sSql & " WHERE " & sWhere If sGroupBy <> "" Then sSql = sSql & " GROUP BY " & sGroupBy End If If sHaving <> "" Then sSql = sSql & " HAVING " & sHaving End If If sOrderBy <> "" Then sSql = sSql & " ORDER BY " & sOrderBy End If Set rs = Server.CreateObject("ADODB.Recordset") rs.CursorLocation = 3 rs.Open sSql, conn, 1, 2 rs.AddNew ' Field Names sTmp = Trim(x_Names) If Trim(sTmp) = "" Then sTmp = Null rs("Names") = sTmp ' Field Sex sTmp = Trim(x_Sex) If Trim(sTmp) = "" Then sTmp = Null rs("Sex") = sTmp ' Field Address sTmp = Trim(x_Address) If Trim(sTmp) = "" Then sTmp = Null rs("Address") = sTmp ' Field Phone sTmp = Trim(x_Phone) If Trim(sTmp) = "" Then sTmp = Null rs("Phone") = sTmp ' Field Email sTmp = Trim(x_Email) If Trim(sTmp) = "" Then sTmp = Null rs("Email") = sTmp ' Field Country sTmp = Trim(x_Country) If Trim(sTmp) = "" Then sTmp = Null rs("Country") = sTmp ' Field Occupation sTmp = Trim(x_Occupation) If Trim(sTmp) = "" Then sTmp = Null rs("Occupation") = sTmp ' Field support sTmp = Trim(x_support) If Trim(sTmp) = "" Then sTmp = Null rs("support") = sTmp ' Field financial sTmp = Trim(x_financial) If Trim(sTmp) = "" Then sTmp = Null rs("financial") = sTmp ' Field material sTmp = Trim(x_material) If Trim(sTmp) = "" Then sTmp = Null rs("material") = sTmp ' Field contact sTmp = Trim(x_contact) If Trim(sTmp) = "" Then sTmp = Null rs("contact") = sTmp rs.Update rs.Close Set rs = Nothing AddData = True End Function %>