<%Function WOLogAction(WOID, ActivityDateTime, Activity, ActivityBy) SQL = "SELECT tblWorkOrderActions.* From tblWorkOrderActions Where (WOID = 0)" Set rsAct = Server.CreateObject("ADODB.RecordSet") With rsAct .CursorType = 1 .LockType = 3 .Open SQL, strConnectPI End With rsAct.addnew rsAct("WOID")=WOID rsAct("ActivityDateTime")=ActivityDateTime rsAct("Activity")=Activity rsAct("ActivityBy")=ActivityBy rsAct.Update rsAct.CLose set rsAct = nothing End Function%> <%Function WOLogActionEMail(WOID, ActivityDateTime, Activity, ActivityBy, ThreadID, ThreadHistory) SQL = "SELECT tblWorkOrderActions.* From tblWorkOrderActions Where (WOID = 0)" Set rsAct = Server.CreateObject("ADODB.RecordSet") With rsAct .CursorType = 1 .LockType = 3 .Open SQL, strConnectPI End With rsAct.addnew rsAct("WOID")=WOID rsAct("ActivityDateTime")=ActivityDateTime rsAct("Activity")=Activity rsAct("ActivityBy")=ActivityBy rsAct("ThreadID")=ThreadID rsAct("ThreadHistory")=ThreadHistory rsAct.Update rsAct.CLose set rsAct = nothing End Function%> <%Function FindEmailaddress(EmpName) set rs = gbconn.Execute ("SELECT * FROM Personnel WHERE Display = '" & EmpName & "'") If rs.eof = False then if isnull(rs("EmailAddress"))= False then if LEN(rs("EmailAddress"))>0 then FindEmailaddress=rs("EmailAddress") END IF end if end if rs.close set rs = nothing End Function Function FindTeamLeader(Category) set rs = gbconn.Execute ("SELECT * FROM tblMainCategory WHERE (Category = '" & Category & "')") If rs.eof = False then responsiblePerson=rs("CategoryLeader") FindTeamLeader=rs("CategoryEmail") end if rs.close set rs = nothing End Function Function FindAssignedTo(woid) FindAssignedTo="" set rs = gbconn.Execute ("SELECT tblWorkOrderDetails.* From tblWorkOrderDetails Where (WOID = " & woid & ") ORder by SOrtOrder, DetailID") If rs.eof = False then do until rs.eof if len(FindAssignedTo)>0 then if instr(1,FindAssignedTo,rs("AssignedTo"))=0 then FindAssignedTo = FindAssignedTo & ", " & rs("AssignedTo") end if else FindAssignedTo = rs("AssignedTo") end if rs.movenext loop end if rs.close set rs = nothing End Function Function FindCapInvName(CapInvID) set rs = gbconn.Execute ("SELECT ID, Description, CapNum FROM PropCapInventory WHERE (ID = " & CapInvID & ")") If rs.eof = False then if isnull(rs("CapNum"))=true then FindCapInvName =rs("Description") elseif len(rs("CapNum"))=0 then FindCapInvName =rs("Description") else FindCapInvName =rs("CapNum") & "-" & rs("Description") end if end if rs.close set rs = nothing End Function %> <%Function UpdateApostrophe(FieldData) ' '10/16/2003, 9:31:21 AM, Barry Belford On Error Resume Next ' Dim CheckField Dim Y, x x = 1 CheckField = FieldData Do Until InStr(x, CheckField, "'") = 0 Y = InStr(x, CheckField, "'") CheckField = Left(CheckField, Y) & "'" & Right(CheckField, Len(CheckField) - Y) x = Y + 2 Loop UpdateApostrophe = CheckField End Function%> <%sub createVCS(event_id, dtstart, dtend, summary, description, due) Const ForAppending = 8 Dim fname 'fname = "path\" & event_id & ".vcs" fname = Server.mapPath("/workordersnew/files/" & event_id & ".vcs") 'not, i usually mappath the page... it's up to you as to where to save it. it's up to you if you want to check it it exists or not here..... Dim FSO set FSO = CreateObject("Scripting.FileSystemObject") 'if FSO.fileexists(fname) then ' response.write "ERROR: VCS creation conflict 'else Dim TS Set TS = FSO.createtextfile(fname) dim line line = "BEGIN: VCALENDAR" & vbcrlf & _ "VERSION: 1.0" & vbcrlf & _ "BEGIN: VEVENT" & vbcrlf & _ "SUMMARY;ENCODING=QUOTED-PRINTABLE: " & summary & vbcrlf & _ "DESCRIPTION;ENCODING=QUOTED-PRINTABLE:"& description & vbcrlf & _ "LOCATION: TEST" & vbcrlf & _ "DTSTART: " & iso8601date(dtstart & " 08:00") & vbcrlf & _ "DTEND: " & iso8601date(dtend & " 08:30") & vbcrlf & _ "UID:" & iso8601date(dtstart) & iso8601date(dtend) & summary & vbcrlf & _ "PRIORITY:3" & vbcrlf & _ "END: VEVENT" & vbcrlf & _ "END: VCALENDAR" '"DUE: 18991230T000000" & vbcrlf & _ '"COMPLETED: 18991230T000000" & vbcrlf & _ '"DCREATED: 18991230T000000" & vbcrlf & _ '"ATTENDEE: " & vbcrlf & _ '"DESCRIPTION: " & description & " " & href_loc & vbcrlf & _ response.write line TS.writeline line TS.close 'end if end sub '------------------------------------------------------------------------ sub write_VCS(event_id, dtstart, dtend, summary, description, due) //got all the values into variables here. end sub Function iso8601date(dLocal) Dim d offset =-6 ' tell us what date you want d = dLocal ' find first Sunday in April for i = 14 to 8 step -1 if weekday("3/" & i & "/" & year(d))=1 then endDST = cdate("3/" & i & "/" & year(d)) exit for end if next ' find last Sunday in October for i = 1 to 7 if weekday("11/" & i & "/" & year(d))=1 then startDST = cdate("11/" & i & "/" & year(d)) exit for end if next ' subtract hour from offset if within DST if cdate(od) >= startDST and cdate(od) < endDST then offset = offset - 1 end if ' convert local time into UTC d = DateAdd("H",-1 * offset ,dLocal) ' compose the date iso8601date = Year(d) & "" & Right("0" & Month(d),2) & "" & Right("0" & Day(d),2) & "T" & _ Right("0" & Hour(d),2) & "" & Right("0" & Minute(d),2) & "" & Right("0" & Second(d),2) & "Z" End Function %> <%Function BuildVCalendar(event_id, dtstart2, dtend2, summary, description, due) ' - configure our Time Zone Factor. Set this to the value ' - that needs to be added/subtracted from the date/time ' - to convert the event date/time to GMT time ' - base it on your Web Server's time zone ' - In my case, Eastern Time is 5.5 hours behind GMT so ' - to get GMT, I need to add 5.5 hours CONST TIMEZ0NE_FACTOR = +6.5 Dim dtStart, dtEnd , strSubject, strLocation, strDesc ' -- Assuming Event_Begin_Date and Event_End_Date hold ' -- Date and Time values 'dtStart = DateAdd("h",TIMEZONE_FACTOR, dtstart) 'dtEnd = DateAdd("h",TIMEZONE_FACTOR, dtend) ' -- Format it properly as YYYYMMDDThhmmssZ dtStart = iso8601date(cdate(dtStart2 & " 08:00:00")) dtEnd = iso8601date(dtEnd2 & " 08:00") ' -- strSubject = summary strLocation = "Test" strDesc = description BuildVCalendar = _ "BEGIN:VCALENDAR" & vbCrlf & _ "VERSION:1.0" & vbCrlf & _ "BEGIN: VEVENT" & vbCrlf & _ "DTStart:" & dtStart & vbCrlf & _ "DTEnd:" & dtEnd & vbCrlf & _ "SUMMARY;ENCODING=QUOTED-PRINTABLE:" & strSubject & vbCrlf & _ "DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" & strDesc & vbCrlf & _ "Location;ENCODING=QUOTED-PRINTABLE:" & strLocation & vbCrlf & _ "UID:" & event_id & dtStart & strSubject & vbCrlf & _ "PRIORITY:3" & vbCrlf & _ "End:VEVENT" & vbCrlf & _ "End:VCALENDAR" & vbCrlf End Function %> <%DIm vcsFIle Select Case request("type") case "workflow" SQL = "SELECT @@IDENTITY as [LastIdentity], tblWorkOrderDetailTasks.* From tblWorkOrderDetailTasks Where (ID = " & request("id") & ")" Set rs = Server.CreateObject("ADODB.RecordSet") With rs .CursorType = 1 .LockType = 3 .Open SQL, strConnectPI End With Dim strvCalendar strvCalendar = BuildVCalendar (rs("ID"), rs("TaskDueDate"), rs("TaskDueDate"), rs("Task"), rs("TaskNote"), rs("TaskDueDate")) 'createVCS rs("ID"), rs("TaskDueDate"), rs("TaskDueDate"), rs("Task"), rs("TaskNote"), rs("TaskDueDate") rs.close gbConn.Close Response.ContentType = "text/x-vCalendar" Response.AddHeader "Content-Disposition", _ "filename=Event" & request("id") & ".vcs;" Response.Write strvCalendar Response.End End Select%>

GET LUCKY!
Roaring Twenties Themed
Casino Night 2008
 

Join us at the Fayetteville Town Center

8 p.m. till midnight on Saturday on February 9, 2008.

Enjoy live music by Big Uns while enjoying casino style games such as: Roulette, Craps, Black Jack, and Texas Hold'em.
*no actual currency used

Complimentary beer, wine and heavy hor d'oevres are included.

Live auctions & outstanding raffle prizes.
Event Sponsor: Courthouse Concepts www.courthouseconcepts.com.

All proceeds benefit local charities and
scholarships for local students.

Tickets are $50.00 per person, and can be bought at the door or from any Northside Rotarian.  You may also e-mail Travis at travis@nationalcrimesearch.com.
Click here to pay by credit card.
 

 

Thanks to our Sponsors

PRESENTING SPONSOR

CourtHouse Concepts
www.courthouseconcepts.com

GOLD SPONSORS
 

MEDIA SPONSORS

Silver Sponsors

Catering Unlimited
Greenwood & Associates
McGoodwin, William, Yates Engineering

Bronze Sponsors

Arkansas Western Gas Company
Bank of Arkansas
Bank of Fayetteville
First Federal Bank
Friday Eldridge & Clark
Liberty Bank
McDonald Eye Associates
Ozarks Electric Cooperative
Stephens Inc.
Upchurch Electrical Supply
United Bank