Jump to content

rory

Member
  • Content Count

    20
  • Joined

  • Last visited

Everything posted by rory

  1. please PM me, i have a site in development using Divs & CSS as opposed to tables and I just want to see if it works or not on different browsers and platforms .. if it does it will mean it will load alot faster .. i can use the original version that has tables based on the type of browser but id rather not if it works with at least a few recent versions .. i think only really old browsers wont view it .. like from 2001 and less .. thanks. Rory
  2. Yeah we dont want clients to worry about crime .. remember its paradise
  3. rory

    Some Script Code Here

    Here's another one for those using classic ASP .. highlites multiple keywords in a search results with either a font color, span background color, or bold text. ':: FUNCTION: highlites multiple keywords ':: from ASP Search Results ':: ':: AUTHOR: BahamasSecurity.com ':: COPYRIGHT: 2004-2006 ':: ':: RESULT: Search Result/s ':: KEYWORD: Search Keyword/s ':: TYPE: 0 = Bold, 1 = Font, 2 = Span ':: COLOR: #color, color Private Function highlightQuery(byVal sResult, _ byVal sKeyword, _ byVal sType, _ byVal sColor) Dim c, eKey, eArr Dim typeOpen, typeClose Dim searchQueryLength Dim startPosition Dim querySectionToReplace Dim highlightQueryTemp Dim SearchWordsCount Select Case sType Case 1 typeOpen = "<font color=""" & sColor & """>" typeClose = "</font>" Case 2 typeOpen = "<span style=""background-color: " & sColor & """>" typeClose = "</span>" Case Else typeOpen = "<b>" typeClose = "</b>" End Select eKey = sKeyword eKey = Replace(eKey,"'","") eKey = Replace(eKey,"+"," ") eArr = Split(eKey," ") highlightQueryTemp = sResult SearchWordsCount = Ubound(eArr) FOR c = 0 TO SearchWordsCount searchQueryLength = LEN(eArr(c)) startPosition = INSTR(1,highlightQueryTemp,eArr(c),1) IF startPosition >= 1 THEN querySectionToReplace = MID(highlightQueryTemp,startPosition,searchQueryLength) highlightQueryTemp = REPLACE(highlightQueryTemp,querySectionToReplace,typeOpen & querySectionToReplace & typeClose,1) END IF NEXT highlightQuery = highlightQueryTemp End Function Example Usage: (With Bold) Not tested just written from scratch but should work. Live Example here: (BOLD) http://www.bahamassecurity.com/wb/default.asp?go=search&keyword=Bahamas+Island (RED FONT) http://www.knowlesrealty.com/Search.htm?go=-1&keyword=Beach+Island ' '// Example Database = DBFile.mdb '// Example Table = Table '// Example Field = Details Dim strKeyword Dim objConn, objRs Dim strResults strKeyword = Request("keyword") If strKeyword <> "" Then Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=DBFile.mdb" Set objRs = objConn.Execute("Select Details From Table Where Details Like '%" & strKeyword & "%';") If Not objRs.Eof Then Do Until objRs.Eof If Not IsNull(objRs("Details")) And objRs("Details") <> "" Then strResults = objRs("Details") Response.Write "<p>" & highlightQuery(strResults, strKeyword, 0, 0) & "</p>" End If objRs.MoveNext Loop Else Response.Write "<p>No Results Found</p>" End If objConn.CLOSE Set objConn = Nothing Else Response.Write "<p>No Results Found</p>" End If '// Example Red Font: '// strResults = highlightQuery(strResults, strKeyword, 1, "red") '
  4. rory

    Some Script Code Here

    Use it for whatever you like, its free .. Nothing to do with CCTV but it may come in handy. Deletes All Files and SubFolders in a Specific Folder or SubFolder. Input box pops up and asks for the Full Path of the folder. Some learning material if anything. Converted from ASP to standalone Vbscript. Copy text into a new text file and save as a .vbs file. If you want the ASP script let me know. ' This script was developed by Rory Knowles ' FREEWARE - Produced by BahamasSecurity.com ' Note, save this script as a .vbs file. '---------------------------- Option Explicit '---------------------------- '// PROGRAM SETTINGS Const ProgTitle = "Delete Files & Folders" '---------------------------- '// DECLARATIONS Dim fso, f Dim FileCnt Dim FolderCnt Dim folderName FileCnt = 0 FolderCnt = 0 '---------------------------- '// GET FOLDER & PERFORM TASKS Sub ParseFolder() Set fso=CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(folderName) Call DeleteFiles(f) Call DeleteFolders(f) Set f = Nothing Set fso = nothing Call EndMessage() End Sub '---------------------------- '// CHECK IF FOLDER EXISTS Function DoesFolderExist() Dim fso Dim var Set fso = CreateObject("Scripting.FileSystemObject") If (fso.FolderExists(folderName)) Then DoesFolderExist = True end if Set fso = nothing End function '---------------------------- '// DELETE FILES Function DeleteFiles(byVal f) Dim file Dim Files Set Files = f.Files For Each file In Files file.delete FileCnt = FileCnt + 1 Next Set Files = Nothing End function '---------------------------- '// DELETE FOLDERS Function DeleteFolders(byVal f) Dim SingleFolder Dim SubFolders Set SubFolders = f.Subfolders For Each SingleFolder in SubFolders SingleFolder.delete FolderCnt = FolderCnt + 1 Next Set SubFolders = nothing End function '---------------------------- '// FOLDER NOT EXIST Sub badFolder() msgBox("Folder: " & folderName &", does not exist! Operation Cancelled", vbOkOnly, ProgTitle) End Sub '---------------------------- '// END MESSAGE Sub EndMessage() Call MsgBox("Deleted " & FileCnt & _ " Files and " & FolderCnt & _ " SubFolders From: " & folderName, _ vbOkOnly, ProgTitle) End Sub '---------------------------- '// CANCEL BY USER Sub operationCancelled() Call MsgBox("User Cancelled", vbOkOnly, ProgTitle) End Sub '---------------------------- '// CHECK INPUT BOX ENTRY Sub CheckFolderEntry() folderName = InputBox("Enter Folder Path (eg: c:\test)", ProgTitle) if folderName <>"" then if DoesFolderExist() = True then call ParseFolder() else call badFolder() end if else call operationCancelled() end if End Sub '---------------------------- '// START PROGRAM Sub startRoutines() Call CheckFolderEntry() End Sub '---------------------------- call startRoutines()
  5. rory

    Some Script Code Here

    Search & Replace Text within Files '' FREEWARE - Produced by BahamasSecurity.com ' Note, save this script as a .vbs file. '---------------------------- Public Function DoesFolderExist(byVal folderName) dim fso dim var Set fso = CreateObject("Scripting.FileSystemObject") If (fso.FolderExists(folderName)) Then DoesFolderExist ="true" end if Set fso = nothing End function '---------------------------- Sub badFolder(byVal folderName) msgBox("Folder: " & folderName &", does not exist! Operation Cancelled") End Sub '---------------------------- Sub operationCancelled() msgBox("Replace operation cancelled!") End Sub '---------------------------- Sub ParseFile(byVal objFile, byVal strOld, byVal strNew, byRef replaceCNT) ' Developed by Ryan Trudelle-Schwarz for www.mamanze.com const ForReading = 1 const ForWriting = 2 Dim objTextStream Dim strInclude ' Grab all the text out of the file. Set objTextStream = objFile.OpenAsTextStream(ForReading) strInclude = objTextStream.ReadAll objTextStream.Close Set objTextStream = Nothing ' Check to see if the string we want to replace is even in the file, if ' not then don't waste the time on replacing it. If InStr(strInclude,strOld) > 0 Then ' Do the Replace strInclude = Replace(strInclude,strOld,strNew) ' count how many files replaced replaceCNT = replaceCNT + 1 ' Update the file Set objTextStream = objFile.OpenAsTextStream(ForWriting) objTextStream.Write strInclude objTextSTream.Close Set objTextStream = Nothing End If End Sub '---------------------------- Sub ReplaceFolder(byRef objFolder, byVal strOld, byVal strNew, byRef replaceCNT) Dim objFile, objSubFolder ' Loop through the files and parse each one. For Each objFile in objFolder.Files Call ParseFile(objFile, strOld, strNew, replaceCNT) next'objFile ' Loop through the sub folders and call self on each folder. For Each objSubFolder in objFolder.SubFolders Call ReplaceFolder(objSubFolder, strOld, strNew, replaceCNT) Next'objSubFolder End Sub '---------------------------- Sub ReplaceAll(byVal strFolder, byVal strOld, byVal strNew, byRef replaceCNT) dim objFSO, objFolder ' Setup the FSO Object Set objFSO = CreateObject("Scripting.FileSystemObject") ' Get the root folder Set objFolder = objFSO.GetFolder(strFolder) ' Do the Replace on the root folder. Call ReplaceFolder(objFolder, strOld, strNew, replaceCNT) End Sub '----------------------------- Sub CheckstrNew(byVal strFolder, byVal strOld) dim strNew strNew = InputBox("New Word:","New Word - Search and Replace") if strNew <>"" then dim replaceCNT replaceCNT = 0 call ReplaceAll(strFolder, strOld, strNew, replaceCNT) if replaceCNT <> 0 then msgBox(replaceCNT &" files containing the old word:" & strOld &", were edited with the new word:" & strNew) else msgBox("No files contained the old word:" & strOld &", nothing was replaced") end if else call operationCancelled() end if End Sub '----------------------------- Sub CheckstrOld(byVal strFolder) dim strOld strOld = InputBox("Old Word:","Old Word - Search and Replace") if strOld <>"" then call CheckstrNew(strFolder, strOld) else call operationCancelled() end if End Sub '----------------------------- Sub CheckFolderEntry() dim strFolder strFolder = InputBox("Enter Folder To Search (eg: c:\test)","Enter Folder - Search and Replace") if strFolder <>"" then if DoesFolderExist(strFolder) ="true" then call CheckstrOld(strFolder) else call badFolder(strFolder) end if else call operationCancelled() end if End Sub '------------------------------ Sub startRoutines() Call CheckFolderEntry() End Sub '------------------------------- call startRoutines()
  6. rory

    PIR Cameras

    Do you really want to trust that for your alarm system?
  7. Yeah im sure IE7 will work, looking mostly for mac users, older browsers, etc. I did download a few other versions of the latest ones and they seem to do the same mostly, opera and netscape have some issues with popups thats about all I can see so far, and found fixes for that .. anyway thanks for the offer ..
  8. I dont know what Line Interactive is but if it has Voltage Regulation it will say AVR or Automatic Voltage Regulation, on the newer UPS. Older UPS never had Voltage Regulation built in. Voltage Regulation (for electronics) also known as Line Conditioning (for PCs) controls the under and over voltage ... The main thing for any electronics is Voltage Regulation or Line Conditioning, Back up batteries are nice to have for security and software issues, but wont save your hardware. Remember a UPS alone is simply battery back up, nothing more. Recently they had added in AVR to them for actual protection. PS. we get long periods of low voltage here, which fry almost anything that is plugged in .. low voltage is a common thing here .. every day .. and when they finally pump the power up ...
  9. rory

    GE DVRME PRO Questions

    its RTOS Nucleus which is on Chip.
  10. rory

    Geo Vision GV-1000

    Arghh .. you're right .. what made me think only the specified HTTP ports could be used .. oh well .. yeah 8234 works just tested it .. learn something new everyday huh ... someone needs to email GRC and let them know ..
  11. rory

    GE DVRME PRO Questions

    I believe Email is it .. here are some screen shots of WaveReader so you can take a look through it and get a better idea. http://www.bahamassecurity.com/Gallery/Systems/Kalatel.htm Generally they dont give out any info on repairs unless you are factory certified but depending on what you want to do you should be able to do general repairs like replacing HDDs and upgrading Firmware (must be the right version bin file and they can be obtained from GE or their reps).
  12. rory

    Geo Vision GV-1000

    Hi Bob, Yes thats spot on. Enter the Ip with the colon then the port number. You can only use HTTP ports if you are going to use the browser though. Here is further info on ports accepted by the web browsers: http://www.grc.com/port_81.htm
  13. Yeah UPS is needed for PC based, but for RTOS not essential .. however, he should have had a Line Condioner / Voltage Regulator, which are very cheap now .. actually he had a UPS but that doesnt protect you against the power problems we have in this country Regular Surge Protectors dont help us down here .. Ive seen UPS's fried to the ground before .. ive also seen where the brownouts or spikes went right through the UPS left it alone and fried everything else .. (3rd world power down here remember). Ive never used a UPS myself for any of my own computers (couldnt afford them) and never had an issue except for lately with the firefox profile which is software related ... ive used the same triplite 600watts Line Conditioner since 1996 .. that says something for Triplite We are actually now using the Tripplite UPS with Voltage Regulation on every system as of recently, before it was the other brand but a local PC store has great prices on them now. PS. we just got a new 12 million $ Generator so hopefully will be less power spikes and black outs this summer .. though it was off for 2 hours last Saturday Night ..
  14. rory

    help choosing unobtrusive cams

    freeflyer, if need extreme cctv prices in the UK PM me and Ill find a retailer for you. The IR company in the UK is Derwent but Extreme recently opened a base in the UK also to supply and support all their products. The IRs are actually originally made by Derwent and Extreme then aquired Derwent. The price maybe out of your ballpark but we wont know until you let us know .. PS. CCTVgeek im not following you though it may seem so
  15. rory

    PTZ HELP

    What he said .. also it isnt that easy with an IR remote as it is with the Keyboard controller .. something like the KTD-405 from GE with the CyberDome is really cool .. fast control .. it has its onboard joystick ..and it integrates into the Geo and many other DVRs .. There are other brands also with the keyboard w/ joystick just mentioning what ive used ..
  16. Cool, let me know, i always liked their wall mount DVRs, are perfect for matching up with a Burglar Alarm .. just they wanted me to fill out a bunch of forms sent from a rep, before i could get an idea of pricing, so i basically forgot about it at the time .. I was ready to switch to them from GE a couple years ago .. The GE thing is the HDD issue and that they want you to send everything back to them for service .. while people like us in other countries really need to service them ourselves .. so thats always been my biggest issue with them from the Kalatel Days .. i got 2 DSRs we have to send back as I cant add HDDs myself .. can do it with the DVMRes but not the DSRs .. they dont have any upgrade software for them .. One is over 5 years old BTW, HDD crashed as it was never on a line conditioner but amazingly lasted this long LOL .. bought 2 new 5400rpm maxtors like the ones it had but no go .. board probably fried too .. anyway ..
  17. rory

    How do I create a live feed to a web page?

    what do you want .. exactly .. did you try the webcam browser page yet for the DVR ..? It is all customizable even without the full SDK btw .. let me know .. Rory
  18. yeah that Pano a nice camera .. the neverfocus reminds me of the provideo so called high res indoor domes .. they must use the same OEM .. ) which everfocus model is it BTW ..?
  19. Yep, all electronics can lock up, even something as simple as a cell phone or burglar alarm .. seen a few of them freeze ... never seen the GE units lock up ..or Kalatel .. but it is ofcourse possible .. only heard of 2 and they originated from GE australia. . Id like to hear how march works out for you. Do you have to travel to Canada or do they have a rep in your area? PS. Phillips use to sell the Kalatel DVRs BTW .. also the RTOS isnt on the HDD with the GE Kalatel units ..
  20. rory

    Wrestling video

    no spyware or malware in it .. ive installed it hundreds of times .. anyway, other option to get the DivX codec is use this Klite pack .. no spyware also http://www.free-codecs.com/download/K_Lite_Codec_Pack.htm
  21. rory

    Wrestling video

    The AVI file definately uses "DivX Decoder Filter" Did you restart? iF so check this link .. http://www.updatexp.com/divx-codec-for-windows-media-player.html
  22. rory

    Wrestling video

    i just checked the avi file, you need the DivX codec .. should be in windows Media Player 9 and XP SP2 otherwise http://www.divxmovies.com/codec/
  23. rory

    Wrestling video

    works for me .. and yeah its funny you guys got XP SP1 or SP2?
  24. rory

    Please Help - DIGIMERGE

    i just use the one built into Ewido .. for connections to my PC at least.
  25. The leading Power Supply manufacturer at least for North America, is Altronix. You'll find everything you need from them.
×