public function Save(HighValueRule $highValueRule)
 {
     try {
         $SQL = self::$INSERT;
         if ($highValueRule->getSeq() != null && $highValueRule->getSeq() != "" && $highValueRule->getSeq() > 0) {
             $SQL = self::$UPDATE;
         }
         $conn = self::$db->getConnection();
         $stmt = $conn->prepare($SQL);
         $stmt->bindValue(':folderseq', $highValueRule->getFolderSeq());
         $stmt->bindValue(':email', $highValueRule->getEmail());
         $stmt->bindValue(':mobile', $highValueRule->getMobile());
         $stmt->bindValue(':parameterchannelno', $highValueRule->getParameter());
         $stmt->bindValue(':highvalue', $highValueRule->getHighValue());
         $stmt->bindValue(':frequency', $highValueRule->getFrequency());
         $isActive = 0;
         if ($highValueRule->getIsActive() == "true" || $highValueRule->getIsActive() == 1) {
             $isActive = 1;
         }
         $stmt->bindValue(':isactive', $isActive);
         $stmt->bindValue(':rulehits', $highValueRule->getRuleHits());
         $type = $highValueRule->getStationType();
         $maxSeq = $highValueRule->getLastRuleHitFileDataSeq();
         $seq = $highValueRule->getSeq();
         if (empty($seq)) {
             if ($type == "stack" || $type == "effluent") {
                 $wqdsds = WQDStackDataStore::getInstance();
                 $maxSeq = $wqdsds->getMaxSeq();
             } else {
                 $WQDDS = WQDDataDataStore::getInstance();
                 $maxSeq = $WQDDS->getMaxSeq();
             }
         }
         $highValueRule->setLastRuleHitFileDataSeq($maxSeq);
         //$stmt->bindValue(':lastrulehitwqdfiledataseq',$maxSeq);
         $stmt->bindValue(':lastrulehitwqdfiledataseq', $highValueRule->getLastRuleHitFileDataSeq());
         if ($SQL == self::$UPDATE) {
             $stmt->bindValue(':seq', $highValueRule->getSeq());
         } else {
             $stmt->bindValue(':rulestartwqdfiledataseq', $maxSeq);
         }
         $stmt->execute();
         $error = $stmt->errorInfo();
         if ($error[2] != "") {
             throw new Exception($error[2]);
         }
     } catch (Exception $e) {
         $logger = Logger::getLogger($ConstantsArray["logger"]);
         $logger->error("Error During Save High Value Rule : - " . $e->getMessage());
     }
 }
    <body>
      <div id="wrapper">       
            <?php 
include "leftButtons.php";
$locSeq = $managerSession['locSeq'];
$FDS = FolderDataStore::getInstance();
$LDS = LocationDataStore::getInstance();
$CCDS = ChannelConfigurationDataStore::getInstance();
$locationSeqs = $LDS->FindLocationsByUser($managerSession["seq"]);
if (!in_array($locSeq, $locationSeqs)) {
    array_push($locationSeqs, $locSeq);
}
$folders = $FDS->FindByLocation(implode(",", $locationSeqs));
$folDDown = DropDownUtils::getFoldersDropDownWithStationName($folders, "folder", "changeStation()", $highValueRule->getFolderSeq());
$chDDown = "Select a Station to load Parameters";
if ($highValueRule->getParameter() != null) {
    $channelConfigs = $CCDS->FindByFolder($highValueRule->getFolderSeq());
    $chDDown = DropDownUtils::getChannelsDropDown($channelConfigs, "channelNames", "", $highValueRule->getParameter());
}
?>
            <div class="wrapper wrapper-content animated fadeInRight">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <h5>Create HighValue Rule</h5>
                            </div>  
                            <div class="ibox-content">
                                 <form name="frm1" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>