diff --git a/cabinets.php b/cabinets.php
index 0af9f4a6a..f90536150 100644
--- a/cabinets.php
+++ b/cabinets.php
@@ -53,6 +53,7 @@
$cab->CabRowID=$_POST['cabrowid'];
$cab->CabinetHeight=$_POST['cabinetheight'];
$cab->Model=$_POST['model'];
+ $cab->SerialNo=isset($_POST['serialno'])?$_POST['serialno']:'';
$cab->Keylock=$_POST['keylock'];
$cab->MaxKW=$_POST['maxkw'];
$cab->MaxWeight=$_POST['maxweight'];
@@ -315,6 +316,10 @@
',__("Model"),'
+
+
',__("Cabinet Serial Number"),'
+
+
',__("Key/Lock Information"),'
diff --git a/cabnavigator.php b/cabnavigator.php
index 6e9753d81..404380cbb 100644
--- a/cabnavigator.php
+++ b/cabnavigator.php
@@ -48,6 +48,7 @@ function renderCabinetProps($cab, $audit, $AuditorName){
$renderedHTML="\t\t
\t\t| ".__("Last Audit").": | $audit->AuditStamp$AuditorName |
\t\t| ".__("Model").": | $cab->Model |
+ \t\t| ".__("SerialNo").": | $cab->SerialNo |
\t\t| ".__("Data Center").": | $tmpDC->Name |
\t\t| ".__("Install Date").": | $cab->InstallationDate |
\n";
diff --git a/classes/Cabinet.class.php b/classes/Cabinet.class.php
index c34d1878e..68b8081b4 100644
--- a/classes/Cabinet.class.php
+++ b/classes/Cabinet.class.php
@@ -40,6 +40,7 @@ class Cabinet {
var $CabRowID; //JMGA: Row of this cabinet
var $CabinetHeight;
var $Model;
+ var $SerialNo;
var $Keylock;
var $MaxKW;
var $MaxWeight;
@@ -62,6 +63,7 @@ function MakeSafe() {
$this->CabRowID=intval($this->CabRowID);
$this->CabinetHeight=intval($this->CabinetHeight);
$this->Model=sanitize($this->Model);
+ $this->SerialNo=sanitize($this->SerialNo);
$this->Keylock=sanitize($this->Keylock);
$this->MaxKW=float_sqlsafe(floatval($this->MaxKW));
$this->MaxWeight=intval($this->MaxWeight);
@@ -97,6 +99,7 @@ static function RowToObject($dbRow,$filterrights=true){
$cab->CabRowID=$dbRow["CabRowID"];
$cab->CabinetHeight=$dbRow["CabinetHeight"];
$cab->Model=$dbRow["Model"];
+ $cab->SerialNo=$dbRow["SerialNo"];
$cab->Keylock=$dbRow["Keylock"];
$cab->MaxKW=$dbRow["MaxKW"];
$cab->MaxWeight=$dbRow["MaxWeight"];
@@ -188,7 +191,7 @@ function CreateCabinet($deferTreeRebuild=false){
$sql="INSERT INTO fac_Cabinet SET DataCenterID=$this->DataCenterID,
Location=\"$this->Location\", LocationSortable=\"$this->LocationSortable\",
AssignedTo=$this->AssignedTo, ZoneID=$this->ZoneID, CabRowID=$this->CabRowID,
- CabinetHeight=$this->CabinetHeight, Model=\"$this->Model\",
+ CabinetHeight=$this->CabinetHeight, Model=\"$this->Model\", SerialNo=\"$this->SerialNo\",
Keylock=\"$this->Keylock\", MaxKW=$this->MaxKW, MaxWeight=$this->MaxWeight,
InstallationDate=\"".date("Y-m-d", strtotime($this->InstallationDate))."\",
MapX1=$this->MapX1, MapY1=$this->MapY1,
@@ -225,7 +228,7 @@ function UpdateCabinet(){
$sql="UPDATE fac_Cabinet SET DataCenterID=$this->DataCenterID,
Location=\"$this->Location\", LocationSortable=\"$this->LocationSortable\",
AssignedTo=$this->AssignedTo, ZoneID=$this->ZoneID, CabRowID=$this->CabRowID,
- CabinetHeight=$this->CabinetHeight, Model=\"$this->Model\",
+ CabinetHeight=$this->CabinetHeight, Model=\"$this->Model\", SerialNo=\"$this->SerialNo\",
Keylock=\"$this->Keylock\", MaxKW=$this->MaxKW, MaxWeight=$this->MaxWeight,
InstallationDate=\"".date("Y-m-d", strtotime($this->InstallationDate))."\",
MapX1=$this->MapX1, MapY1=$this->MapY1,
diff --git a/create.sql b/create.sql
index 3144611dc..c642adce5 100644
--- a/create.sql
+++ b/create.sql
@@ -13,6 +13,7 @@ CREATE TABLE fac_Cabinet (
CabRowID int(11) NOT NULL,
CabinetHeight int(11) NOT NULL,
Model varchar(80) NOT NULL,
+ SerialNo varchar(30) NOT NULL,
Keylock varchar(30) NOT NULL,
MaxKW float(11) NOT NULL,
MaxWeight int(11) NOT NULL,
diff --git a/custom_search.php b/custom_search.php
index bc1a26fc5..3aaaa85ce 100644
--- a/custom_search.php
+++ b/custom_search.php
@@ -221,4 +221,4 @@ function newtab(searchlink){