Announcement

Collapse
No announcement yet.

[asp] mriDownloads

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [asp] mriDownloads

    Well, I wanted to learn some more about using Access databases from ASP pages, her is my result.

    This is a package including an MS Access database and a hand full of asp pages to give you a fully functional downloads page on you own homeseer website.

    This package makes it easy to add new downlaods to the page and tracks how many times each is downloaded.

    I have it hosted on my site:
    http://misraels.no-ip.biz/mriDownloads/mriDownloads.asp

    Nothing all that fancy, but if you want a downloads page, here is one.

    Feel free to use it out and comment. This is my homeseer site so use guest/guest to access.
    Last edited by misraels; February 23, 2008, 01:24 PM.
    HS Install Date: Feb. 16, 2007

    HS3 Pro, Z-Wave, Insteon, BLStat, HS Touch Server, MyQ

    WeatherXML, BLBackup, BLLAN, BLLock, Restart, CaddX, OpenSprinkler

    #2
    Your link takes me to some kind of a web search summary.

    Could you please be more specific about what you are trying to do! Are you talking about the database program from Microsoft?

    Steve Q
    HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
    2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

    Comment


      #3
      Originally posted by Steve Q View Post
      Your link takes me to some kind of a web search summary.

      Could you please be more specific about what you are trying to do! Are you talking about the database program from Microsoft?

      Steve Q

      Sorry, typo in the link, cant' test the link from inside my home. I updated the first post to correct it.

      Yes, it is Microsoft Access.

      This is simply a web page that can be added to your homeseer site to host downloads for others to grab.
      Last edited by misraels; February 23, 2008, 01:07 PM.
      HS Install Date: Feb. 16, 2007

      HS3 Pro, Z-Wave, Insteon, BLStat, HS Touch Server, MyQ

      WeatherXML, BLBackup, BLLAN, BLLock, Restart, CaddX, OpenSprinkler

      Comment


        #4
        Does anyone find this useful?

        I am thinking about some added functionality, if people are interested I will make them configurable via a config page, otherwise, i will just hard code them.
        HS Install Date: Feb. 16, 2007

        HS3 Pro, Z-Wave, Insteon, BLStat, HS Touch Server, MyQ

        WeatherXML, BLBackup, BLLAN, BLLock, Restart, CaddX, OpenSprinkler

        Comment


          #5
          Originally posted by misraels View Post
          Does anyone find this useful?

          I am thinking about some added functionality, if people are interested I will make them configurable via a config page, otherwise, i will just hard code them.
          I have not run it, yet.

          For it to work for I, I would require the ability to designate which drive and folder the files are in.

          Is this possible?

          My reasoning behind this is that I do not wish to clutter the C: drive with the actual files, rather keep then on another drive.

          What do you think?
          sigpic
          A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

          Comment


            #6
            different folders within the html folder is easy, it is really designed to point to files that are accessible via an http link. Are you thinking of setting up a virtual directory in IIS? If so, that could be made to work, but I won't be able to point to d:\something for example.


            Originally posted by Gogs View Post
            I have not run it, yet.

            For it to work for I, I would require the ability to designate which drive and folder the files are in.

            Is this possible?

            My reasoning behind this is that I do not wish to clutter the C: drive with the actual files, rather keep then on another drive.

            What do you think?
            HS Install Date: Feb. 16, 2007

            HS3 Pro, Z-Wave, Insteon, BLStat, HS Touch Server, MyQ

            WeatherXML, BLBackup, BLLAN, BLLock, Restart, CaddX, OpenSprinkler

            Comment


              #7
              Originally posted by misraels View Post
              different folders within the html folder is easy, it is really designed to point to files that are accessible via an http link. Are you thinking of setting up a virtual directory in IIS? If so, that could be made to work, but I won't be able to point to d:\something for example.
              Pitty, as I would not wish the files on the main drive, they have a folder on a drive all to there own at this point.
              sigpic
              A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

              Comment


                #8
                Originally posted by Gogs View Post
                Pitty, as I would not wish the files on the main drive, they have a folder on a drive all to there own at this point.

                I have done some testing, and if you work with your IIS server you can set up either another web site on a different port or a virtual directory pretty easily. This will work with the asp package with a slight mod and allow you to store the downloads on different drives or even iis servers.
                HS Install Date: Feb. 16, 2007

                HS3 Pro, Z-Wave, Insteon, BLStat, HS Touch Server, MyQ

                WeatherXML, BLBackup, BLLAN, BLLock, Restart, CaddX, OpenSprinkler

                Comment


                  #9
                  Update to 1.10

                  I have made a number of changes and rolled them all into a new version, 1.10.

                  This version includes the following updates:
                  - added a config page to specify different options including:
                  -- image to use for download icon
                  -- image to use for Popular downloads
                  -- hit count to use to determine a download is Popular
                  -- image to use for New downloads
                  -- quantity of days to use to determine if a download is new
                  -- image to use for table header background
                  -- image to use as row seperator between download records
                  -- color to use for table background
                  -- option to specify whether guest user sees the hit count
                  - also added an optional Link field, this can be used to specify folder or virtual directory of the download instead of using the mriDownloads folder, this field can also hold an http link to an outside website or download
                  - added a Show Guest View button to display the page as a guest would
                  - changed the layout of the main page
                  - added a Short Description field, this now show on the main page, and when you click on the title it will show you the long description in a new window

                  This new version is also hosted on my site:
                  http://misraels.no-ip.biz/mriDownloads/mriDownloads.asp
                  HS Install Date: Feb. 16, 2007

                  HS3 Pro, Z-Wave, Insteon, BLStat, HS Touch Server, MyQ

                  WeatherXML, BLBackup, BLLAN, BLLock, Restart, CaddX, OpenSprinkler

                  Comment


                    #10
                    download error message

                    I get this error when I try to download the new verison

                    Script error: Cannot use parentheses when calling a Subhs.writelog("mriDownloads",dl_file & " is being downloaded.")

                    Comment


                      #11
                      Originally posted by pscott View Post
                      I get this error when I try to download the new verison

                      Script error: Cannot use parentheses when calling a Subhs.writelog("mriDownloads",dl_file & " is being downloaded.")

                      Sorry, this is working again, I was playing with some changes for the next version.
                      HS Install Date: Feb. 16, 2007

                      HS3 Pro, Z-Wave, Insteon, BLStat, HS Touch Server, MyQ

                      WeatherXML, BLBackup, BLLAN, BLLock, Restart, CaddX, OpenSprinkler

                      Comment


                        #12
                        misraels,
                        I belive you have a couple of errors in downloadit.asp
                        one is the first strSQL call:
                        strSQL = "SELECT * FROM app WHERE app = '" & dl_file &"';"
                        Should be:
                        strSQL = "SELECT * FROM app WHERE App = '" & dl_file &"';"
                        Also it never calls the Link, When using another folder other than mriDownloads
                        Should there be logic to choose either App or Link passed through the post?
                        I changed it to:
                        strSQL = "SELECT * FROM app WHERE Link ='" & dl_file & "';"
                        and it worked sort of
                        It seems that HS 1.7 does not support response.redirect
                        I know that this is for HS 2 but is there a workaround?
                        ...JG
                        3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

                        Comment


                          #13
                          thanks for commenting, I can make the first select statement change pretty simply, basic laziness on my part to not watch all the caps, but it is interesting because on my system it doesnt seem to pay attention to the case.

                          You are right, the Link option does not seem to be working correctly, the problem looks to be coming from the page calling downloadit.asp.

                          I am no really familiar with HS 1.7, I started with 2.1. Anyway, response.redirect is asp, perhaps based on .net. Are you running Windows 2000 or higher on your server?
                          HS Install Date: Feb. 16, 2007

                          HS3 Pro, Z-Wave, Insteon, BLStat, HS Touch Server, MyQ

                          WeatherXML, BLBackup, BLLAN, BLLock, Restart, CaddX, OpenSprinkler

                          Comment


                            #14
                            I figured it out
                            In downloadit.asp I changed:
                            response.redirect dl_file
                            to
                            response.redirect "'" & dl_file & "'"
                            and it now sends the file.
                            Now I am getting the HS response header as shown:
                            Attached Files
                            3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

                            Comment


                              #15
                              Excellent!

                              misraels,
                              This is an excellent download package for HS. Great for HS2 and easy to mod for HS1. I have made the downloadit.asp pop up to a small window and is self closing with a little jscript. Nice job!
                              .....JJG
                              Attached Files
                              3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

                              Comment

                              Working...
                              X