[Introduces ChkNet tony@tonywhitmore.co.uk**20041017213811] { adddir ./chknet addfile ./chknet/intro.php adddir ./includes/STORM/chknet adddir ./includes/STORM/chknet/misc addfile ./includes/STORM/chknet/functions.inc addfile ./includes/STORM/chknet/misc/functions.inc adddir ./includes/STORM/chknet/html addfile ./includes/STORM/chknet/html/banner.inc addfile ./includes/STORM/chknet/html/admin_nav.inc addfile ./includes/STORM/chknet/html/users_nav.inc addfile ./includes/STORM/chknet/html/ict_nav.inc addfile ./chknet/device.php addfile ./chknet/group.php addfile ./chknet/help.php hunk ./CHANGELOG 1 +Development - 17/10/2004 +======================== +* Added chknet directory + hunk ./TODO 38 +* Check input field lengths against database field type + +ChkNet +====== +* Build in error handling when a group is deleted with devices assigned to it + hunk ./TODO 54 +* Change to "Get help with MODULE" +* Remove all those extra \"" instances hunk ./chknet/device.php 1 - +You cannot give a device a blank name!

\n"; + } + if ( $array['grp'] == "" ) + { + $errmsg .= "

You did not select a group for the device!

\n"; + } + if ( $errmsg != "" ) + { + echo "

The following errors were detected:

\n"; + echo $errmsg; + device_detail_form($array,$array['new']); + exit(); + } + // Add or update the device entry + if ( $array['new'] == "0" ) + { + $query = "UPDATE chknet_dev SET name='" . $array['name'] . "',grp='" . $array['grp'] . "',hostname='" . $array['hostname'] . + "' WHERE id='" . $array['id'] . "'"; + } + else + { + $query = "INSERT INTO chknet_dev (name,grp,hostname) VALUES ('" + . $array['name'] . "','" . $array['grp'] . "','" . $array['hostname'] . "')"; + } + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + + echo "

Saved!

"; + navbutton("intro.php","OK"); + } + +function device_detail_form($array,$new) { + echo "
\n"; + if ( $array != "" ) + { + extract($array); + } + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "ID No.:\n"; + echo "\n"; + echo ""; + if ( isset($id) ) + { + echo $id; + } + echo ""; + echo "
\n"; + echo "Device Name:\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "Hostname/IP address:\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "Group:\n"; + echo "\n"; + if ( isset($grp) ) + { + group_drop_list($grp); + } + else + { + group_drop_list(""); + } + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + +// Check for a valid session and access level. +sessionchk(); +$accesslevel = "3"; +accesschk("EQuip",$accesslevel); + +// Include the connection to the database server details. +include ("STORM/common/db/connectadmin.inc"); + +// Include the navigation options. +include ("STORM/chknet/html/admin_nav.inc"); + +if ( isset($_POST['not_new']) AND isset($_POST['del']) ) + { + // Prepare the initial SQL query for removing the item from the database. + $query = "DELETE FROM chknet_dev WHERE id='" . $_POST['id'] . "'"; + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + + echo "

Device Deleted!

"; + // Produce a button to delete another device + navbutton("intro.php","OK"); + } +elseif ( isset($_POST['del']) AND !isset($_POST['not_new']) ) + { + echo "

Delete Device

"; + + echo "\n"; + echo "\n"; + echo "
\n"; + echo "Please confirm that you wish to delete device " . $_POST['id'] . ": " . $_POST['name'] . ""; + echo "

Caution: Deleting a device cannot be undone!

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "\n"; + echo "
\n"; + + echo "
\n"; + } +elseif ( isset($_POST['not_new']) AND !isset($POST['del']) ) + { + device_form_process($_POST); + } +elseif ( isset($_POST['id']) AND isset($_POST['name']) ) + { + //Query the database to get the information for the device. + $query = "SELECT * FROM chknet_dev WHERE id='" . $_POST['id'] . "'"; + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + $row = $result->fetchRow(); + echo "

Edit Device

"; + device_detail_form($row,"0"); + } +else + { + echo "

Add Device

"; + device_detail_form("","1"); + } + +?> hunk ./chknet/group.php 1 - +\n"; + if ( $array != "" ) + { + extract($array); + } + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "ID No.:\n"; + echo "\n"; + echo ""; + if ( isset($id) ) + { + echo $id; + } + echo ""; + echo "
\n"; + echo "Group Name:\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "Order:\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + +function group_form_process($array) { + // Call the database connection + global $db; + $errmsg = ""; + // Validate the data fields. + if ( $array['name'] == "" ) + { + $errmsg .= "

You cannot give a group a blank name!

\n"; + } + if ( $array['ordr'] == "" ) + { + $errmsg .= "

You did not enter an order value for the group!

\n"; + } + if ( $errmsg != "" ) + { + echo "

The following errors were detected:

\n"; + echo $errmsg; + group_detail_form($array,$array['new']); + exit(); + } + // Add or update the device entry + if ( $array['new'] == "0" ) + { + $query = "UPDATE chknet_grp SET name='" . $array['name'] . "',ordr='" . $array['ordr'] . + "' WHERE id='" . $array['id'] . "'"; + } + else + { + $query = "INSERT INTO chknet_grp (name,ordr) VALUES ('" + . $array['name'] . "','" . $array['ordr'] . "')"; + } + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + + echo "

Saved!

"; + navbutton("group.php","OK"); + } + +// The page proper + +if ( isset($_POST['del']) AND isset($_POST['not_new']) ) + { + // Remove all devices in the group + $query = "DELETE FROM chknet_dev WHERE grp='" . $_POST['id'] . "'"; + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + + // Remove the group from the database. + $query = "DELETE FROM chknet_grp WHERE id='" . $_POST['id'] . "'"; + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + + echo "

Group and Member Devices Deleted!

"; + // Produce a button to delete another group + navbutton("group.php","OK"); + exit(); + } +elseif ( isset($_POST['del']) AND !isset($_POST['not_new']) ) + { + echo "

Delete Group

"; + + echo "\n"; + echo "\n"; + echo "
\n"; + echo "Please confirm that you wish to delete group " . $_POST['id'] . ": " . $_POST['name'] . " and all devices in that group!"; + echo "

Caution: Deleting a group and it's member devices cannot be undone!

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "\n"; + echo "
\n"; + + echo "
\n"; + exit(); + } +elseif ( isset($_POST['edit']) and !isset($_POST['not_new']) ) + { + //Query the database to get the information for the device. + $query = "SELECT * FROM chknet_grp WHERE id='" . $_POST['id'] . "'"; + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + $row = $result->fetchRow(); + echo "

Edit Group

"; + group_detail_form($row,"0"); + exit(); + } +elseif ( isset($_POST['not_new']) AND isset($_POST['new']) ) + { + group_form_process($_POST); + exit(); + } +elseif ( isset($_POST['new']) ) + { + echo "

Add Group

"; + group_detail_form("",$_POST['new']); + exit(); + } + + + +// Produce a page header. +echo "
\n"; +echo "

Groups

\n"; +// Produce a button to add a device. +echo "

\n"; +echo "

\n"; +echo "
\n"; +echo ""; +echo "\n"; +echo "
\n"; +echo "
\n"; +echo "

\n"; + +// Include the file that produces the table containing the details of the current items. +all_group_table(); + +// Produce a button to add a device. +echo "

\n"; +echo "

\n"; +echo "
\n"; +echo ""; +echo "\n"; +echo "
\n"; +echo "
\n"; +echo "

\n"; + +?> hunk ./chknet/help.php 1 - +ChkNet Help Page + + + + \n"; + +// Start the cell for the navigation element. + echo "\n"; + +// Start and end the spacer cell between navigation elements. + echo "\n"; + +// Start the cell for the navigation element. + echo "\n"; + +// Start and end the spacer cell between navigation elements. + echo "\n"; + +// Start the cell for the sixth navigation element. + echo "\n"; + +// End the row containing the navigational elements. + echo "\n"; +// End the table containing the navigational elements. + echo "
+

What does SATYR stand for? +
+ Submit And Track Your Request. SATYR lets you submit support requests from any computer and track them as + the ICT Support Team deal with them. Support requests can be problems with computer hardware or software, requests + for help using computers, requests for new computer equipment or any other issue you want to raise with the + ICT Support Team.

+ +

How do I use SATYR? +
Move between the various pages using the navigation links near the top of the page. Support requests are categorised as either + New, Open or Closed. "New" support requests have been submitted but have yet to be evaluated by the ICT Support Team. "Open" + support requests have been evaluated by the ICT Support Team and are being worked on. The team member who evaluated the job will + have added comments to the request that will give you information about how your request is being dealt with. Further information + may be added as work on the support request continues. "Closed" support requests have been fully resolved and are no + longer being worked on by the ICT Support Team.

+ +

What does the start page show? +
When you first log in to SATYR, you will see two tables. The first table will show any new or open + support requests submitted attached to your username. This may include support requests submitted on your behalf by the ICT + Support Team. The second table will show support requests attached to your username that have been closed in the last + 14 days. At the bottom of the start page, there is a link to a page that shows all the closed support requests attached to + your username, including ones that were closed more than 14 days ago.

+ +

How do I submit a new support request? +
Click on the Submit a new support request link on the toolbar. + Fill in the form to sumbit your support request. +

    +
  • In the Request Name box, enter a "nickname" for the support request. + This will help you identify the support request in a list, and remind you what the support request is about. + This name does not have to be unique, and is mainly for your use and convenience.
  • +
  • From the Room (if applicable) drop-down box, select the room that relates to the support request. + In addition to the ICT suites and the classrooms with most computers in, there is an option for "My Office". + If none of the options listed applies, leave the box set to "Not Applicable".
  • +
  • In the Machine Number (if applicable) box, enter the number of the computer, if it has one. + For example, computers in the ICT suites all have numbers next to them. This is the number you should enter if your + support request relates to a computer in an ICT suite.
  • +
  • From the Your rating of the urgency of the support request drop-down box, indicate how urgent you consider the support request to be. + Please try to be accurate in this assessment, as it will affect how the ICT Support Team resolve the support request.
  • +
  • In the Request Details box, enter information about the support request. Include as much information as you can, + giving any details you may not have been able to include elsewhere on the page. Also include any error messages that have been shown. + The more information you can give, the quicker the problem can be diagnosed.
  • +
  • When you have filled in the form, click on the Submit Support Request button. You will see a message confirming that + your support request has been made.
  • +
+ +

How can I find more details on a support request? +
Click on the Request Name of any support request shown in a table to see full details on the support request. + You will be able to see your original support request and other information added by the ICT Support Team. +

"; + } +elseif ( $_SESSION['chknet'] == "2" ) + { + // Include the navigation options. + include ("STORM/chknet/html/ict_nav.inc"); + // Produce the HTML for the help page. + echo "

ChkNet Help Page

+ + + + \n"; + +// Start the cell for the navigation element. + echo "\n"; + +// Start and end the spacer cell between navigation elements. + echo "\n"; + +// Start the cell for the navigation element. + echo "\n"; + +// Start and end the spacer cell between navigation elements. + echo "\n"; + +// Start the cell for the navigation element. + echo "\n"; + +// Start and end the spacer cell between navigation elements. + echo "\n"; + +// Start the cell for the navigation element. + echo "\n"; + +// End the row containing the navigational elements. + echo "\n"; +// End the table containing the navigational elements. + echo "
+

What does SATYR stand for? +
+ Submit And Track Your Request. SATYR lets users submit support requests from any computer and track them as + you, the ICT Support Team, deal with them. Support requests can be problems with computer hardware or software, requests + for help using computers, requests for new computer equipment or any other issue users want to raise with the + ICT Support Team.

+ +

How do I use SATYR? +
Move between the various pages using the navigation links near the top of the page. Support requests are categorised as either + New, Open or Closed. "New" support requests have been submitted but have yet to be evaluated, "Open" + support requests have been evaluated and are being worked on. "Closed" support requests have been fully resolved and are no + longer being worked on by the ICT Support Team.

+ +

What does the start page show? +
When you first log in to SATYR, you will see two tables. The first table will show any new or open + support requests submitted assigned to you for action. The second table will show support requests assigned to you that have been closed in the last + 14 days. At the bottom of the start page, there is a link to a page that shows all the closed support requests assigned to you, including ones that were closed more than 14 days ago.

+ +

How can I find more details on a support request? +
Click on the Request Name of any support request shown in a table to see full details on the support request. + You will be able to see your original support request and other information added by the ICT Support Team. + Any support request can be updated by clicking on the "Update" button from the detailed view of the support request. +

+ +

What does the "Evaluate new Support Requests" button do? +
This feature allows members of the ICT Support Team to evaluate new support requests that users have submitted. + The page shows support requests that are categorised as "New" and unevaluated. The page will automatically + refresh every 60 seconds to ensure that the latest submitted support requests are shown. +
+
+ If you click on the Request Name field of a support request you will be shown a form allowing you to evaluate the + support request. If you enter any information in the "Evaluation" or "Further Comments" fields, the support request + will be submitted as "Open". If you select the tick box at the bottom of the form, the support request + will be submitted as "Closed". + +

What does the "Search for a Support Request" button do? +
This feature allows members of the ICT Support Team to search for support requests against many possible criteria. + You can select or enter one or more of the search criteria shown. Remember that search terms are case sensitive. + Once you have entered the search criteria you wish to use, click on the "Search..." button. + A table showing all the results from the search will be shown. + +

What does the "Submit a new Support Request" button do? +
This feature allows members of the ICT Support Team to submit a support request on behalf of a user. + If you want to submit the support request as "New", only complete the fields in the top half of the form. + If you enter any information in the "Evaluation" or "Further Comments" fields, the support request + will be submitted as "Open". If you select the tick box at the bottom of the form, the support request + will be submitted as "Closed"."; + } +elseif ( $_SESSION['chknet'] == "3" ) + { + // Include the navigation options. + include ("STORM/chknet/html/admin_nav.inc"); + // Produce the HTML for the help page. + echo "

ChkNet Help Page

+ + + + \n"; + } + function produce_cell($name) + { + global $db; + echo "\n"; + } + global $db; + $query = "SELECT * FROM chknet_grp ORDER BY 'ordr'"; + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + while ( $row = $result->fetchRow() ) + { // For every group + echo "

" . $row['name'] . "

\n"; + echo "
+

What does SATYR stand for? +
+ Submit And Track Your Request. SATYR lets users submit support requests from any computer and track them as + the ICT Support Team deal with them. Support request can be problems with computer hardware or software, requests + for help using computers, requests for new computer equipment or any other issue they want to raise with the + ICT Support Team.

+ +

How do I use SATYR? +
Move between the various pages using the navigation links near the top of the page. Support requests are categorised as either + New, Open or Closed. "New" support requests have been submitted but have yet to be evaluated by the ICT Support Team. "Open" + support requests have been evaluated by the ICT Support Team and are being worked on. The team member who evaluated the job will + have added comments to the request that will give you information about how your request is being dealt with. Further information + may be added as work on the support request continues. "Closed" support requests have been fully resolved and are no + longer being worked on by the ICT Support Team.

+ +

What does the start page show? +
When you first log in to SATYR, you will see a summary of information about the SATYR system, how it is operating and how many + support requests have been dealt with recently.

+ +

What does the "Unlock/lock a Support Request" button do? +
This feature allows the SATYR administrator to lock or unlock a support request. When a support request is "locked" + it cannot be edited by the ICT Support Team. Information from the support request is available only to view. A support request is locked + automatically when a member of the ICT Support Team is editing it, preventing another member of the team from inadvertently overwriting another person's + changes. When the ICT Support Team member commits the changes to the support request to the database, the support request is unlocked, allowing + another team member to edit it. However, if the web browser or computer that the ICT Support Team member is using crashes before the changes to the + support request are submitted to the database, the support request will not be unlocked. This will prevent any member of the ICT Support Team from + editing that support request until it is unlocked. +

+ To view the status of a support request and lock or unlock it as necessary: +

    +
  • Click on the Unlock/lock a Support Request button on the navigation bar.
  • +
  • In the Request Number box, enter the number for the support request of which you wish to query the "lock" status.
  • +
  • Click on the Show Current Lock Status... button.
  • +
  • The screen will change to show the current status of the support request.
  • +
  • If you wish to unlock or lock the support request, select the appropriate radio button.
  • +
  • Click the Unlock/lock... button.
  • +
  • The screen will change to show the old and current lock status of the support request.
  • +
+ +

What does the "Delete a Support Request" button do? +
This feature allows the SATYR administrator to delete a support request from the database. There may be circumstances where the SATYR + system has been abused and false, offensive or just rubbish support requests have been submitted. +

+ To delete a support request from the database: +

    +
  • Click on the Delete a Support Request button on the navigation bar.
  • +
  • In the Enter the number of the support request to be deleted: box, enter the number for the support request which you want to delete.
  • +
  • Click on the Delete... button.
  • +
  • The screen will change to show a message confirming the deletion of the support request.
  • +
+ +

What does the "SATYR Statistics" button do? +
This feature allows the SATYR administrator to view detailed statistics on the SATYR system. This information could be useful when writing + report or preparing presentations on SATYR, and for monitoring the performance of the ICT Support Team. +

+ To view SATYR statistics: +

    +
  • Click on the SATYR statistics button on the navigation bar.
  • +
  • The screen will show a variety of statistics on the SATYR system.
  • +
"; + } +else + { + exit(); + } + +?> hunk ./chknet/intro.php 1 - +\n"; + } + function end_row() + { + echo "
query($query); + if (DB::isError($db)) {die($db->getMessage());} + $row = $result->fetchRow(); + $pingpath = $row['value']; + $query = "SELECT value FROM settings WHERE function = 'pingoptions'"; + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + $row = $result->fetchRow(); + $pingoptions = $row['value']; + // Do the ping check + $return = "alive"; + if ( $return == "alive" ) + { + echo "#33FF33"; + } + else + { + echo "#FF0000"; + } + echo "'>\n"; + echo $name . "\n"; + echo "
\n"; + // Extract all devices in that group + $query2 = "SELECT id,name,hostname FROM chknet_dev WHERE grp='" . $row['id'] . "' ORDER BY id"; + $result2 = $db->query($query2); + if (DB::isError($db)) {die($db->getMessage());} + // Set counting variable + $j = 0; + while ( $row2 = $result2->fetchRow() ) + { + if ( $j = 0 ) + { + start_row(); + } + elseif ( $j % 7 == 0 ) + { + start_row(); + } + produce_cell($row2['name']); + $j++; + if ( $j % 7 == 6) + { + end_row(); + } + } + if ( $j % 7 != 6) + { + end_row(); + } + echo "
\n"; + } + + } + +// Check for access level +if ( $_SESSION['chknet'] == "2" ) + { + // Include the connection to the database server details. + include ("STORM/common/db/connectict.inc"); + // Include the navigation options. + include ("STORM/chknet/html/ict_nav.inc"); + // Refresh the page + refresh_page("intro.php"); + // Produce the information page + echo "

Connectivity Check Results

\n"; + echo "

Please remember that this page is designed only as a simple connectivity test. The results show only + that a device on a hostname or IP address has responded to an ICMP request. + It does not guarantee that a particular port is open on the system, nor that any specific services are running.

\n"; + produce_ping_table(); + } +elseif ( $_SESSION['chknet'] == "3" ) + { + // Include the connection to the database server details. + include ("STORM/common/db/connectadmin.inc"); + // Include the navigation options. + include ("STORM/chknet/html/admin_nav.inc"); + // Produce a page header. + echo "
\n"; + echo "

Registered Devices

\n"; + // Produce a button to add a device. + navbutton("device.php","Add Device"); + // Include the file that produces the table containing the details of the current items. + all_device_table(); + // Produce a button to add a device. + navbutton("device.php","Add Device"); + } +else + { + exit(); + } + +?> hunk ./equip/bookbyweek.php 22 -// Page that display's a week's bookings +// Page that display's a week's bookings and availability hunk ./equip/bookbyweek.php 58 -// Set parent variables. These are used to pass the return page to cancelbook.php +// Set parent variables. These are used to pass the return page to cancel.php hunk ./equip/catalogue.php 213 - echo ""; + echo ""; rmfile ./includes/STORM/chknet/functions.inc hunk ./includes/STORM/chknet/html/admin_nav.inc 1 +\n"; +// Start the row containing the navigation elements. +echo "
\n"; + echo "\n"; + echo "ChkNet
Start Page\n"; + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "Manage
Groups\n"; + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "Get help
with ChkNet\n"; + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "Back to
STORM Menu\n"; + echo "
\n"; + echo "
\n"; + +?> hunk ./includes/STORM/chknet/html/banner.inc 1 +ChkNet Repsonse Checker\n"; + +// Produce HTML banner. + echo "

ChkNet

\n"; + echo "
\n"; + +?> hunk ./includes/STORM/chknet/html/ict_nav.inc 1 +\n"; +// Start the row containing the navigation elements. + echo "
\n"; + echo "\n"; + echo "ChkNet
Start Page\n"; + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "Get help
with ChkNet\n"; + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "Back to
STORM Menu\n"; + echo "
\n"; + echo "
\n"; + +?> hunk ./includes/STORM/chknet/html/users_nav.inc 1 +\n"; +// Start the row containing the navigation elements. + echo "\n"; + +// Start the cell for the first navigation element. + echo "\n"; + echo "\n"; + echo "SATYR
Start Page\n"; + echo "
\n"; +// End the cell for the first navigation element. + echo "\n"; + +// Start and end the spacer cell between navigation elements. + echo "\n"; + +// Start the cell for the second navigation element. + echo "\n"; + echo "\n"; + echo "Submit a new\n"; + echo "
\n"; + echo "Support Request\n"; + echo "
\n"; +// End the cell for the second navigation element. + echo "\n"; + +// Start and end the spacer cell between navigation elements. + echo "\n"; + +// Start the cell for the third navigation element. + echo "\n"; + echo "\n"; + echo "Get help on
using SATYR\n"; + echo "
\n"; +// End the cell for the third navigation element. + echo "\n"; + +// Start and end the spacer cell between navigation elements. + echo "\n"; + +// Start the cell for the fourth navigation element. + echo "\n"; + echo "\n"; + echo "Back to
STORM Menu\n"; + echo "
\n"; +// End the cell for the fourth navigation element. + echo "\n"; + +// End the row containing the navigational elements. + echo "\n"; +// End the table containing the navigational elements. + echo "\n"; + +?> hunk ./includes/STORM/chknet/misc/functions.inc 1 - +query($query); + if (DB::isError($db)) {die($db->getMessage());} + + // Produce the HTML for the table. + // Start the table that holds the data table for formatting purposes. + echo "\n +
\n"; + // Start the table that holds the data. + echo "\n"; + // Produce the table headers. + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + // Evaluate the number of rows in the table. + $num_rows = $result->numRows(); + if ( $num_rows != "0" ) + { + // Extract the rows from the resulting array. + while ( $row = $result->fetchRow() ) + { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + // "Hidden" form for Edit button + echo "\n"; + echo "\n"; + echo "\n"; + //"Hidden" form for Delete button + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + } + else + { + echo ""; + } + // Close the two tables. + echo "
ID No.Device NameHostname/IP addressCategory
\n"; + echo $row['id']; + echo "\n"; + echo $row['name']; + echo "\n"; + echo $row['hostname']; + echo "\n"; + // Query for group name + $query2 = "SELECT name FROM chknet_grp WHERE id='". $row['grp'] . "'"; + $result2 = $db->query($query2); + if (DB::isError($db)) {die($db->getMessage());} + $row2 = $result2->fetchRow(); + echo $row2['name']; + echo "
\n"; + echo "\n"; + echo "\n"; + echo ""; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo "
There are no devices registered!
\n"; + echo "
\n"; + } + +function group_drop_list($grp) + { + // Call database connection + global $db; + $query = "SELECT name FROM chknet_grp WHERE id='" . $grp . "'"; + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + $row = $result->fetchRow(); + + echo "\n"; + } + +function all_group_table() { + global $db; + // Query the database for information on all devices. + $query = "SELECT * FROM chknet_grp ORDER BY 'id'"; + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + + // Produce the HTML for the table. + // Start the table that holds the data table for formatting purposes. + echo "\n +
\n"; + // Start the table that holds the data. + echo "\n"; + // Produce the table headers. + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + // Evaluate the number of rows in the table. + $num_rows = $result->numRows(); + if ( $num_rows != "0" ) + { + // Extract the rows from the resulting array. + while ( $row = $result->fetchRow() ) + { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + // "Hidden" form for Edit button + echo "\n"; + echo "\n"; + echo "\n"; + //"Hidden" form for Delete button + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + } + else + { + echo ""; + } + // Close the two tables. + echo "
ID No.Group NameOrder
\n"; + echo $row['id']; + echo "\n"; + echo $row['name']; + echo "\n"; + echo $row['ordr']; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo "
There are no groups registered!
\n"; + echo "
\n"; + } + +function refresh_page($target) + { + // Call database connection + global $db; + $query = "SELECT value FROM settings WHERE function='chknetrefresh'"; + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + $row = $result->fetchRow(); + echo "\n"; + } + +?> hunk ./includes/STORM/login/html/modulenav.inc 75 + +// Assess the access rights to the EQuip module and include the appropriate table cell. +if ( $_SESSION['chknet'] > "0" ) + { + if ( $_SESSION['chknet'] == "1" ) + { + echo ""; + } + elseif ( $_SESSION['chknet'] == "2" ) + { + echo ""; + } + elseif ($_SESSION['chknet'] == "3" ) + { + echo ""; + } + echo "ChkNet\n"; + echo "\n"; + } +else + { + echo "\n"; + } hunk ./login/editaccess.php 109 - echo "\n"; + echo "\n"; hunk ./login/editaccess.php 113 - echo "\n"; + echo "\n"; hunk ./login/editaccess.php 117 - echo "\n"; + echo "\n"; hunk ./login/editaccess.php 121 + echo "\n"; + echo "ChkNet\n"; + echo "\n"; + hunk ./login/editaccess.php 137 + echo "\n"; hunk ./login/editaccess.php 147 + echo "\n"; hunk ./login/editaccess.php 157 + echo "\n"; hunk ./login/editaccess.php 159 + echo "\n"; + echo "\n"; hunk ./login/editaccess.php 168 + hunk ./login/editaccess.php 215 - EQuip='" . $_POST['EQuip'] . "' + EQuip='" . $_POST['EQuip'] . "', + chknet='" . $_POST['chknet'] . "' hunk ./login/login.php 42 +unset($_SESSION['chknet']); hunk ./login/menu.php 106 + $_SESSION['chknet'] = $row['chknet']; hunk ./login/moduledefaults.php 71 + // Check for changes in the module access level defaults and update tables where needed + if ( $_POST['chknetoldval'] != $_POST['chknetnewval'] ) + { + altercolumndefault("users","chknet",$_POST['chknetnewval']); + if ( isset($_POST['affectusers'])) + { + affectusers("users","chknet",$_POST['chknetnewval']); + } + } + hunk ./login/moduledefaults.php 174 + echo "\n"; + echo "\n"; + + // The ChkNet Module + // Fetch the information for the ChkNet module + $query = "DESCRIBE users chknet"; + $result = $db->query($query); + if (DB::isError($db)) {die($db->getMessage());} + // Data from the returned array is passed into a row + $row = $result->fetchRow(); + // Set the variable defaultval to the default value + $chknetoldval = $row['Default']; + // Produce the HTML for the table row + echo "\n"; + echo "ChkNet\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; hunk ./login/settings.php 332 - } + } + elseif ( $function == "pingpath" ) + { + echo "Full path to ping executable"; + } + elseif ( $function == "pingoptions" ) + { + echo "Options to be passed to ping before list of hostname"; + } + elseif ( $function == "chknetrefresh" ) + { + echo "Automatic refresh period for ChkNet status page (in seconds)"; + } hunk ./login/settings.php 352 - echo "\n"; + echo "\n"; }