knowram
Members-
Posts
226 -
Joined
-
Last visited
Everything posted by knowram
-
I am trying to do something like google maps where you can zoom in and out and move around. Anyone know what language they are using? Thanks
-
I have a php/html page that is taking longer to load then i think it should is there a way to see what part of the page is hanging it up? Thanks for the help.
-
cool thanks that did it
-
cool however that seems to double space things
-
I have a text box on my form. If i type something into it and use the enter key to put things on different lines it seems to go into the database correctly. But then if I use an echo or print statement to print the info on the page later it removes the returns. how can fix this problem? Thanks for the help
-
This is my first attempt to get data using these functions. Here is my code: $a = snmpget("192.168.85.2", "associa#1", "1.3.6.1.4.1.9.3.6.11.1.3"); echo $a; and here are the errors that I am getting Warning: snmpget() [function.snmpget]: Error in packet: (noSuchName) There is no such variable name in this MIB. in C:\Program Files\Ipswitch\Associainfo\test\Adding.php on line 494 Warning: snmpget() [function.snmpget]: This name does not exist: .iso.3.6.1.2.1.1.3.6.1.4.1.9.3.6.7 in C:\Program Files\Ipswitch\Associainfo\test\Adding.php on line 494 This is a cisco mib that I am trying to use. And I have added it to the php/mib folder. Is there anything else I have to do? Thanks for the help.
-
I am new to mssql and am trying to move my info from a mysql database to a mssql database. I have just about everything figured out but the INSERT INTO part. what do you used to separate rows. Here is what I have so far INSERT INTO Associa_Networkinfo (Member_Company, Office, Address, Domain, Network_Connection, Device_Name, Serial_Number, Device_Type, Interface, IP_Address, Mask, IAF, Description) VALUES ('Community Archives', 'Community Archives - Tucson, AZ', '7580 N. La Cholla Blvd|Tucson|AZ|85741', 'CA', 'Point to Point', 'CA-2821-B-7580', '', 'Router', 'Serial0/0/0|GigabitEthernet0/0.2|', '192.168.255.2|192.168.58.1|', '/30|/24|', '||', 'Router - P2P Link|Router - Data VLAN|'), ('Community Management Corporation', 'CMC - Fairfax, VA (HQ)', '12701 Fair Lakes Circle Suite 400|Fairfax|VA|22033', 'CMC', 'NVPN', 'cmc_main', '', 'Router', 'GigabitEthernet0/0|Serial0/1/0|Serial0/0/0:0.2|Serial0/0/0:0.3|', '172.16.111.254|66.10.156.142|192.168.254.9|192.168.254.1|', '/24|/30|/30|/30|', '|1138940|||', 'Router - Data VLAN|Router - NVPN Link|Router - P2P Link|Router - P2P Link|'); And I am getting an error on , between the rows. Thanks for the help
-
I followed the really cool how to at http://www.phpfreaks.com/tutorials/114/0.php but I had to change some things to get it to stop giving me errors. After I did that It seemed to work great but it put everything into one cell in the excel document. Any ideas? Here is what I had to change. for ($i = 0; $i < $fields; $i++) { $header .= mssql_field_name($export, $i) . "\t"; } TO for ($i = 0; $i < $fields; $i++) { if (empty($header)){ $header = mssql_field_name($export, $i) . "\t"; }else{ $header .= mssql_field_name($export, $i) . "\t"; } } And while($row = mssql_fetch_row($export)) { $line = ''; foreach($row as $value) { if ((!isset($value)) OR ($value == "")) { $value = "\t"; } else { $value = str_replace('"', '""', $value); $value = '"' . $value . '"' . "\t"; } $line .= $value; } $data .= trim($line)."\n"; } $data = str_replace("\r","",$data); TO while($row = mssql_fetch_row($export)) { $line = ''; foreach($row as $value) { if ((!isset($value)) OR ($value == "")) { $value = "\t"; } else { $value = str_replace('"', '""', $value); $value = '"' . $value . '"' . "\t"; } $line .= $value; } if (empty($data)){ $data = trim($line)."\n"; }else{ $data .= trim($line)."\n"; } } $data = str_replace("\r","",$data); Thanks for the help
-
my code on page b.php or on page a.php to page b.php? page a.php is 687 lines long and page b.php is 930 lines long so i am guessing you don't want the whole page. pleas be more specific.
-
I am not setting the form to submit to page b.php because I have two submit buttons in the same form and depending on which is used it either has to reload its self or go to page b.php looks good however now on page b.php I am getting a Permission denied (13) error. Any ideas?
-
I am using the header function to redirect a page. Which works great except when I want to send info to the redirected page. example: 2 pages a.php b.php If I am on page a.php which has a form on it and I hit submit there which normal refreshes back to its self but one of the check boxes are checked I have it redirecting to page b.php. The redirect works great but I would also like the rest of the variables that where submitted in the form to be accessed on page b.php. Is that at all possible? Thanks for the help
-
right thanks i know it was something simple like that
-
Here is a simpler example of what my problem is. $Int = "Pix 'outside' Interface"; $resultSIIID = mssql_query(" SELECT StatisticalInterfaceIdentification.nStatisticalInterfaceIdentificationID FROM StatisticalInterfaceIdentification WHERE StatisticalInterfaceIdentification.sIfDescr = '$Int'") or die ("can't select StatisticalInterface"); $rowSIIID = mssql_fetch_array($resultSIIID, MSSQL_ASSOC); I get this error Incorrect syntax near 'outside'. (severity 15) the problem is that "Pix 'outside' Interface" is the value of the field that I am trying to pull and I can't change that value. hope that helps
-
Ok I know there must be a function to do this but I can't seem to find it. If you have an array. array( 'a' => 'Apple', 'b' => 'Blue', 'c' => 'Cat' ) Is there a function to remove 'b' => 'Blue'? Or do I have to take the array apart and rebuild it? I have found functions to remove variable of the end and front of arrays but not one to take one out of the middle. I would have thought there would be one that would allow you to do that if you know the key. Any ideas? Thanks for the help
-
I guess I am not really sure. But I would have guessed given that that part seems to work fine. Again though I don't think that has anything to do with the problem that I am having. but I will try adding the parenthesis anyway.
-
Maybe I am just slow or something but I am still not understanding you fenway. Are you talking about the results of the query. If so I am not sure how that would help salve the syntax error question. Illusion- are you talking about single or double quotes? I thought I had all the right quotes in the right places in my query statement. I am really new to query statements and this is my first one with the join feature. From what I know you encased the entire query with double quotes and the the equal to variables in single quotes.
-
And or is there a what to check to see if that $time variable was on say Sunday?
-
Ok here is the whole thing. There is some extra info which is why I didn't post it all in the first place. foreach ($Print_Order as $P_key){ $dev = explode("|", $P_key); foreach ($dev as $key){ $Interfaces = explode("|",$Interface[$key]); unset($tempsiiid); foreach ($Interfaces as $Int){ $intadd = $Int.'-802.1Q vLAN subif'; $resultSIIID = mssql_query(" SELECT StatisticalInterfaceIdentification.nStatisticalInterfaceIdentificationID FROM StatisticalInterfaceIdentification INNER JOIN PivotStatisticalMonitorTypeToDevice ON StatisticalInterfaceIdentification.nPivotStatisticalMonitorTypeToDeviceID = PivotStatisticalMonitorTypeToDevice.nPivotStatisticalMonitorTypeToDeviceID INNER JOIN Device ON PivotStatisticalMonitorTypeToDevice.nDeviceID = Device.nDeviceID WHERE Device.sDisplayName = '$Device_Name[$key]' AND Device.nDeviceTypeID = '3' AND PivotStatisticalMonitorTypeToDevice.nStatisticalMonitorTypeID = '1' AND StatisticalInterfaceIdentification.sIfDescr = '$Int' OR Device.sDisplayName = '$Device_Name[$key]' AND Device.nDeviceTypeID = '3' AND PivotStatisticalMonitorTypeToDevice.nStatisticalMonitorTypeID = '1' AND StatisticalInterfaceIdentification.sIfDescr = '$intadd'") or die ("can't select StatisticalInterface"); $rowSIIID = mssql_fetch_array($resultSIIID, MSSQL_ASSOC); if (empty($tempsiiid) && $rowSIIID['nStatisticalInterfaceIdentific'] != ""){ $tempsiiid = array('1' => $rowSIIID['nStatisticalInterfaceIdentific']); } else if ($rowSIIID['nStatisticalInterfaceIdentific'] != ""){ array_push($tempsiiid, $rowSIIID['nStatisticalInterfaceIdentific']); } } if (empty($SIIID) && isset($tempsiiid)){ $SIIID = array($key => $tempsiiid); } else if (isset($tempsiiid)) { $temp = array($key => $tempsiiid); array_push_associative($SIIID, $temp); } } } This runs through an array of devices finds the interfaces for each device and then finds that nStatisticalInterfaceIdentificationID for each interface if fails when it gets to the interface PIX Firewall 'outside' interface Hope that helps. I am not sure what you mean by "final query strying"
-
Lets say I have a variable $time = 'Apr 30 2007 7:00AM'. Is there a function that I can use or a way of using the strtotime function to see if that variable $time is between the hours of 7am and 7pm?
-
Looks like i missed some when i was copy pasting $resultSIIID = mssql_query(" SELECT StatisticalInterfaceIdentification.nStatisticalInterfaceIdentificationID FROM StatisticalInterfaceIdentification INNER JOIN PivotStatisticalMonitorTypeToDevice ON StatisticalInterfaceIdentification.nPivotStatisticalMonitorTypeToDeviceID = PivotStatisticalMonitorTypeToDevice.nPivotStatisticalMonitorTypeToDeviceID INNER JOIN Device ON PivotStatisticalMonitorTypeToDevice.nDeviceID = Device.nDeviceID WHERE Device.sDisplayName = '$Device_Name[$key]' AND Device.nDeviceTypeID = '3' AND PivotStatisticalMonitorTypeToDevice.nStatisticalMonitorTypeID = '1' AND StatisticalInterfaceIdentification.sIfDescr = '$Int' OR Device.sDisplayName = '$Device_Name[$key]' AND Device.nDeviceTypeID = '3' AND PivotStatisticalMonitorTypeToDevice.nStatisticalMonitorTypeID = '1' AND StatisticalInterfaceIdentification.sIfDescr = '$intadd'") or die ("can't select StatisticalInterface");
-
Sorry again for the double post the pop up telling me that my first post had gotten moved was blocked.
-
I am using a select statement to find some information in a big table using other info form different tables as criteria. My problem is that one of the items has signal quotes in the name. So I get a syntax error. I have tried commenting the signal quotes out in the databases where that name is pulled form but that didn't seem to work. Any ideas. here is what my code looks like. SELECT StatisticalInterfaceIdentification.nStatisticalInterfaceIdentificationID FROM StatisticalInterfaceIdentification INNER JOIN PivotStatisticalMonitorTypeToDevice ON StatisticalInterfaceIdentification.nPivotStatisticalMonitorTypeToDeviceID = PivotStatisticalMonitorTypeToDevice.nPivotStatisticalMonitorTypeToDeviceID INNER JOIN Device ON PivotStatisticalMonitorTypeToDevice.nDeviceID = Device.nDeviceID WHERE Device.sDisplayName = '$Device_Name[$key]' AND Device.nDeviceTypeID = '3' AND PivotStatisticalMonitorTypeToDevice.nStatisticalMonitorTypeID = '1' AND StatisticalInterfaceIdentification.sIfDescr = '$Int' OR Device.sDisplayName = '$Device_Name[$key]' AND Device.nDeviceTypeID = '3' AND PivotStatisticalMonitorTypeToDevice.nStatisticalMonitorTypeID = '1' AND StatisticalInterfaceIdentification.sIfDescr = '$intadd'") or die ("can't select StatisticalInterface"); At one point $Int is equal to PIX Firewall 'outside' interface I have also tried PIX Firewall \'outside\' interface :-\ any ideas Thanks for the help
-
All good figured that one out. Thanks for the help
-
Or if there is a way to start an array with the key of 1 instead of 0 that would work to