-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added in the new fields for the linked list of panels and updated the…
… input screen. Leaving the Power Source in for now since we won't have time to remove all elements of that before 4.0-release. Also wrote a conversion script to create panels that match the existing sources and set the ParentPanelID on all of the children to point that way. In the next release we'll drop the column from the db and remove the table for PowerSource. #553
- Loading branch information
1 parent
eaf1bee
commit cc6ffc0
Showing
4 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
require_once( "db.inc.php" ); | ||
require_once( "facilities.inc.php" ); | ||
|
||
$ss = $dbh->prepare( "select * from fac_PowerSource" ); | ||
$ss->setFetchMode( PDO::FETCH_CLASS, "PowerSource" ); | ||
$ss->execute(); | ||
|
||
$ps = $dbh->prepare( "insert into fac_PowerPanel set PanelLabel=:PanelLabel" ); | ||
$us = $dbh->prepare( "update fac_PowerPanel set ParentPanelID=:PanelID where PowerSourceID=:SourceID" ); | ||
while ( $row = $ss->fetch() ) { | ||
$ps->execute( array( ":PanelLabel"=>$row->SourceName )); | ||
$us->execute( array( ":PanelID"=>$dbh->LastInsertId(), ":SourceID"=>$row->PowerSourceID ) ); | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<html> | ||
<head> | ||
<title>Unauthorized</title> | ||
</head> | ||
<body> | ||
<h1>UserID not found in the database for authorized access. Please contact your site administrator if this is in error.</h1> | ||
</body> | ||
</html> |