- Jun 13, 2004
- 7,044
- 0
- 0
Edit:
I worked on it over VPN tonight and I think I got it working for the most part. It's probably not that clean, but meh, who's counting?
There's a few bugs with PC's showing up as "online" if the ping response is "Destination Unreachable," which I'll have to work that out. Also I want the page that pops up (the history spreadsheet) to stay on top even when a JS alert pops up saying the computer is online/offline. Any quick ideas on how to do that?
----------------------------------------------------------------
I need help writing an event handler for a little script I've been working on at work. We use a software called Landesk which gives us a very effective way to control nearly everything on every PC (all 10,000+ of them) and give us very detailed information on each one. With it comes a little web script called Landesk History, which queries an SQL table on the Landesk server and uses ASP to display a detailed spreadsheet of everything you ever wanted to know about a given PC. We mainly have use for only 3 of the search fields, however: User ID, User Name, and PC Name. With any one of those put in, 99% of the information we need is retrieved.
So I made a little form that you can enter either the User ID, User Name, or the PC Name, hit search, and it will query the database to retrieve them and sort them in the way I like. All fine and dandy.
But I wanted to add a little more functionality to the script. What if I could see if the computer was on at the time of the search? I wrote a script that uses the exec() function in php to ping the computer and come back with it being either online or offline.
So both of my scripts work fine independently... the only problem is, how do I make them work together? I have the $PCName being passed to my "event handler" now (whose only functionality at the moment is to ping the pc), but how can I get it passed yet again to the query page? If possible, I want the ping script to open up in a new window on top of the retrieved Landesk History. I was playing around with the form in my search page, but like I said, the only way I could get it to work was either changing the action of the form to "ping.php" or "{landesk server}/history.asp?"
Any ideas on how to get them to work together and what code I could add to my event handler to pass an existing variable TO the ASP script that retrieves the information?
I worked on it over VPN tonight and I think I got it working for the most part. It's probably not that clean, but meh, who's counting?
----------------------------------------------------------------
I need help writing an event handler for a little script I've been working on at work. We use a software called Landesk which gives us a very effective way to control nearly everything on every PC (all 10,000+ of them) and give us very detailed information on each one. With it comes a little web script called Landesk History, which queries an SQL table on the Landesk server and uses ASP to display a detailed spreadsheet of everything you ever wanted to know about a given PC. We mainly have use for only 3 of the search fields, however: User ID, User Name, and PC Name. With any one of those put in, 99% of the information we need is retrieved.
So I made a little form that you can enter either the User ID, User Name, or the PC Name, hit search, and it will query the database to retrieve them and sort them in the way I like. All fine and dandy.
But I wanted to add a little more functionality to the script. What if I could see if the computer was on at the time of the search? I wrote a script that uses the exec() function in php to ping the computer and come back with it being either online or offline.
So both of my scripts work fine independently... the only problem is, how do I make them work together? I have the $PCName being passed to my "event handler" now (whose only functionality at the moment is to ping the pc), but how can I get it passed yet again to the query page? If possible, I want the ping script to open up in a new window on top of the retrieved Landesk History. I was playing around with the form in my search page, but like I said, the only way I could get it to work was either changing the action of the form to "ping.php" or "{landesk server}/history.asp?"
Any ideas on how to get them to work together and what code I could add to my event handler to pass an existing variable TO the ASP script that retrieves the information?