<?php
###############################################################
# Landing script with HTML is second section below
#
# 2020.10.16 whh
# 2020.10.22 whh separted clock code
# 2022.10.17 whh
#
###############################################################
###############################################################
# Page Password Protect 2.13
###############################################################
# Visit http://www.zubrag.com/scripts/ for updates
###############################################################
#
# Usage:
# Set usernames / passwords below between SETTINGS START and SETTINGS END.
# Open it in browser with "help" parameter to get the code
# to add to all files being protected.
#    Example: password_protect.php?help
# Include protection string which it gave you into every file that needs to be protected
#
# Add following HTML code to your page where you want to have logout link
# <a href="http://www.example.com/path/to/protected/page.php?logout=1">Logout</a>
#
###############################################################
## log information on client accessing the site
###############################################################

$log = array(
  'IP' => $_SERVER['REMOTE_ADDR'],
  // 're' => $_SERVER['HTTP_REFERER'],
  'AGENT' => $_SERVER['HTTP_USER_AGENT'],
  'dateTime' => date("Y-m-d h:i:s",time())
);
$jsonLog = json_encode($log) . "\n";



$timestamp = $_SERVER['REQUEST_TIME'] ;
$timedate = gmdate("Y-m-d\TH:i:s\Z", $timestamp);

$clientLog =  "<br> " .
      "<strong>Agent:</strong> " . $_SERVER['HTTP_USER_AGENT']  . "<br> " .
      "<strong>Remote Addr:</strong> " . $_SERVER['REMOTE_ADDR']  . "<br> " .
      "<strong>Request URI:</strong> " . $_SERVER['REQUEST_URI']  . "<br> " .
      "<strong>Request Time:</strong> " . $timedate . "<br> " .
      "<strong>Http Connnection:</strong> " . $_SERVER['HTTP_CONNECTION']  . "<br><br> ";


$datei99 = fopen("data/access.log","a") or die("Cannot open file:" . "data/access.log"); //implicitly creates file if it doesn't exist
fwrite($datei99, $clientLog );
fclose($datei99);

/*
-------------------------------------------------------------------
SAMPLE if you only want to request login and password on login form.
Each row represents different user.

$LOGIN_INFORMATION = array(
  'zubrag' => 'root',
  'test' => 'testpass',
  'admin' => 'passwd'
);

--------------------------------------------------------------------
SAMPLE if you only want to request only password on login form.
Note: only passwords are listed

$LOGIN_INFORMATION = array(
  'root',
  'testpass',
  'passwd'
);

--------------------------------------------------------------------
*/

##################################################################
#  SETTINGS START
##################################################################

require_once 'junk/what.foo';

// request login? true - show login and password boxes, false - password box only
define('USE_USERNAME', false);

// User will be redirected to this page after logout
define('LOGOUT_URL', 'index.php');

// time out after NN minutes of inactivity. Set to 0 to not timeout
define('TIMEOUT_MINUTES', 1440); // set for 24 hours or 1440 minutes

// This parameter is only useful when TIMEOUT_MINUTES is not zero
// true - timeout time from last activity, false - timeout time from login
define('TIMEOUT_CHECK_ACTIVITY', true);

##################################################################
#  SETTINGS END
##################################################################


///////////////////////////////////////////////////////
// do not change code below
///////////////////////////////////////////////////////

// show usage example
if(isset($_GET['help'])) {
  die('Include following code into every page you would like to protect, at the very beginning (first line):<br>&lt;?php include("' . str_replace('\\','\\\\',__FILE__) . '"); ?&gt;');
}

// timeout in seconds
$timeout = (TIMEOUT_MINUTES == 0 ? 0 : time() + TIMEOUT_MINUTES * 60);

// logout?
if(isset($_GET['logout'])) {
  setcookie("verify", '', $timeout, '/'); // clear password;
  header('Location: ' . LOGOUT_URL);
  exit();
}

if(!function_exists('showLoginPasswordProtect')) {

// show login form
function showLoginPasswordProtect($error_msg) {
?>
<html>
<head>
  <title>NEW</title>
  <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
  <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
    <link rel="icon" href="clock/favicon.ico">
    <link rel="stylesheet" href="clock/css/css3clock.css" />

</head>
<body style="background-color:black; color:white;">
  <style>
    input { border: 1px solid white; font-family: Arial; font-size:1.5em; background-color:grey; padding:2%; border-radius:5px;}
  </style>
  <div style="width:500px; margin-left:auto; margin-right:auto; text-align:center">
  <form method="post">
    <br />
    <h1 style="color:grey; font-family: Arial;">put it on the line</h1>
    <br />
    <font color="red"><?php echo $error_msg; ?></font><br />
<?php if (USE_USERNAME) echo '<br />Who:<br /><input style="font-size:1.5em;" type="input" name="access_login" /><br /><br />Credentials:<br />'; ?>
    <input  type="password" name="access_password" /><p><br /></p><input type="submit" name="Submit" value="Submit" />
  </form>
  <br /><br /><br />
  <!-- <a style="font-size:9px; color: #B0B0B0; font-family: Verdana, Arial;" href="http://www.zubrag.com/scripts/password-protect.php" title="Download Password Protector">Powered by Password Protect</a> -->
  <!-- Clock -->
      <div class="row justify-content-center" style="padding-top:30px;">

        <div class="flexBox" style="display: flex; flex-flow: row wrap; justify-content: center;">
          <div id="liveclock2" class="outer_face">
            <div class="marker oneseven"></div>
            <div class="marker twoeight"></div>
            <div class="marker fourten"></div>
            <div class="marker fiveeleven"></div>

            <div class="inner_face">
              <div class="hand hour"></div>
              <div class="hand minute"></div>
              <div class="hand second"></div>
            </div>
        </div>
      </div>
    </div> <!-- END CLock -->


  </div>

  <script src="dist/vendor/jquery-3.4.1.min.js"></script>
  <script src="sms/js/clock.js"></script>

</body>
</html>

<?php
  // stop at this point
  die();
}
}

// user provided password
if (isset($_POST['access_password'])) {

  $login = isset($_POST['access_login']) ? $_POST['access_login'] : '';
  $pass = $_POST['access_password'];
  if (!USE_USERNAME && !in_array($pass, $LOGIN_INFORMATION)
  || (USE_USERNAME && ( !array_key_exists($login, $LOGIN_INFORMATION) || $LOGIN_INFORMATION[$login] != $pass ) )
  ) {
    showLoginPasswordProtect("Incorrect password.");
  }
  else {
    // set cookie if password was validated
    setcookie("verify", md5($login.'%'.$pass), $timeout, '/');

    // Some programs (like Form1 Bilder) check $_POST array to see if parameters passed
    // So need to clear password protector variables
    unset($_POST['access_login']);
    unset($_POST['access_password']);
    unset($_POST['Submit']);

// set session variable for running other PHP files if user is logged in
    session_start();
    $_SESSION['logged_in'] = true;

  }

}

else {

  // check if password cookie is set
  if (!isset($_COOKIE['verify'])) {
    showLoginPasswordProtect("");
  }

  // check if cookie is good
  $found = false;
  foreach($LOGIN_INFORMATION as $key=>$val) {
    $lp = (USE_USERNAME ? $key : '') .'%'.$val;
    if ($_COOKIE['verify'] == md5($lp)) {
      $found = true;
      // prolong timeout
      if (TIMEOUT_CHECK_ACTIVITY) {
        setcookie("verify", md5($lp), $timeout, '/');
      }
      break;
    }
  }
  if (!$found) {
    showLoginPasswordProtect("");
  }

}

?>

<!DOCTYPE HTML>
<html lang="en">
  <head>
<!-- whh 2019.08.26 SMS for DIDWW -->
<!-- whh 2019.11.19 logging messages and viewing-->
<!-- whh 2019.11.21 added json data file for clients -->
<!-- whh 2019.11.24 tidied up formatting for top margin and scrolling -->
<!-- whh 2019.11.28 added read sms messages -->
<!-- whh 2019.12.08 moved show messages to under send message and log at the end -->
<!-- whh 2019.12.09 renamed sms.css to sms1.css to get Android webview to not use it's cache-->
<!-- whh 2019.12.11 renamed back to sms1.css to sms1.css and cleanup code -->
<!-- whh 2019.12.14 made password and SMS all the same page -->
<!-- whh 2019.12.15 set up cookies so a refresh will not ask for password
                       only new browser contact require password -->
<!-- whh 2019.12.17 adding read yes/no and view all new messages beside the number -->
<!-- whh 2019.12.27 naming form fields access -->
<!-- whh 2020.01.08 clean up -->
<!-- whh 2020.01.28 clean up -->
<!-- whh 2020.02.03 set login to password only and improved appearence -->
<!-- whh 2020.02.25 set class to plain Container rather then Container-fluid to remove the slider a the bottom of the screen -->
<!-- whh 2020.03.10 changed send button to a full width bar button remove Horzline -->
<!-- whh 2020.10.16  -->
<!-- whh 2020.xx.xx  -->
<!-- whh 2020.xx.xx  -->
<!-- whh 2020.xx.xx -->


    <meta charset="utf-8">
    <meta http-equiv=”Pragma” content=”no-cache”>
    <meta http-equiv=”Expires” content=”-1″>
    <meta http-equiv=”CACHE-CONTROL” content=”NO-CACHE”>
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0 shrink-to-fit=no">
    <meta name="description" content="xr0">
    <meta name="author" content="Toston Design">
    <link rel="icon" href="clock/favicon.ico">

    <title>NEW</title>

    <link rel="stylesheet" href="dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="sms/css/font-awesome.min.css">
    <link rel="stylesheet" href="sms/css/message_styles.css">
    <link rel="stylesheet" href="sms/css/sms.css"> <!-- this page specific formattimg -->
    <link rel="stylesheet" href="clock/css/css3clock.css" />
    <link rel="stylesheet" href="sms/css/buttons.css" />
    <link rel="stylesheet" href="sms/css/glyphicons.css" />

    <script src="sms/js/startup.js"></script>  <!-- has to be at start -->
    <script src="sms/js/loadContacts.js"></script>
    <script src="sms/js/newMessages.js"></script>
    <script src="sms/js/phonesNumbersList.js"></script>
    <script src="sms/js/contactsMessages.js"></script>
    <script src="sms/js/editContacts.js"></script>
    <script src="sms/js/loadContactData.js"></script>
    <script src="sms/js/newcontactMessages.js"></script>
    <script src="sms/js/sendUsingContacts.js"></script>
    <script src="sms/js/loadPhoneNumbers.js"></script>
    <script src="sms/js/loadPhoneNumberData.js"></script>
    <script src="sms/js/phonesNumbersListAll.js"></script>

</head>

<!-- load function to call functions to population Select Fields with clients.js -->

<body onload="openingSite()">


<div id="Page_Wrapper" style="display:none;">

<div class="container">
<!-- Buttons at the bootom of the screen for REFRESH and TOP -->
<div style="position: fixed; z-index:999999; background-color:transparent;">

    <button class="upreload" onclick="topFunction()" id="myBtn" style="background-color:rgba(0,0,0,0)"   title="Go to top"><span class="glyphicon glyphicon-arrow-up"></span></button>
    <button class="upreload" onclick="refreshPageFunction()" id="myBtnB" style="background-color:rgba(0,0,0,0); "   title="Refresh Page"><span class="glyphicon glyphicon-refresh"></span></button>

</div>

<!-- Your available Phone Numbers Window  -->
<!-- Your available Phone Numbers Window  -->
<div id="phone" >
  <div class="row phonenumbers horzline" style="padding-top: 5%; ">
    <div class="col-9 ">
      <span class="headingbtn">Your Phone Numbers</span>
    </div>
    <div class="col-3">
        <span class="smsbtn">Messages</span>
    </div>
  </div>
  <div class="row phonenumbers horzline" style="padding-top: 2%;">
    <div class="col-9" style="color:white;">
      <input id="s1" class="myphonebtns"  style="width:100%;" type="button" value="16132875415" onClick="phonesNumbersList(16132875415)">
    </div>
    <div class="col-3">
      <input id="ph1" class= "smsbtn" type="button" value="0"></input>
    </div>
  </div>
  <div class="row phonenumbers horzline">
    <div class="col-9">
      <input id="s2" class="myphonebtns" type="button" value="16132875411" onClick="phonesNumbersList(16132875411)">
    </div>
    <div class="col-3">
      <input  id="ph2" class= "smsbtn" type="button" value="0"></input>
    </div>
  </div>
  <div class="row phonenumbers horzline" >
     <div class="col-9">
      <input id="s3" class="myphonebtns"  type="button" value="16135013414" onClick="phonesNumbersList(16135013414)">
    </div>
    <div class="col-3">
      <input id="ph3" class="smsbtn" type="button" value="0"></input>
    </div>
</div>

<!-- just diplicate this below to add an additional numnber -->
<!-- just diplicate this below to add an additional numnber -->
<div class="row phonenumbers horzline" >
   <div class="col-9">
    <input id="s4" class="myphonebtns"  type="button" value="16137015558" onClick="phonesNumbersList(16137015558)">
  </div>
  <div class="col-3">
    <input id="ph4" class="smsbtn" type="button" value="0"></input>
  </div>
</div>
<!-- just diplicate this below to add an additional numnber -->
<!-- just diplicate this below to add an additional numnber -->


<div class="row phonenumbers horzline" >
   <div class="col-9">
    <input id="s5" class="myphonebtns"  type="button" value="16136996934" onClick="phonesNumbersList(16136996934)">
  </div>
  <div class="col-3">
    <input id="ph5" class="smsbtn" type="button" value="0"></input>
  </div>
</div>


<div class="row phonenumbers horzline" >
   <div class="col-9">
    <input id="s6" class="myphonebtns"  type="button" value="16139071470" onClick="phonesNumbersList(16139071470)">
  </div>
  <div class="col-3">
    <input id="ph6" class="smsbtn" type="button" value="0"></input>
  </div>
</div>
<br><br>


<!-- edit contacts Button -->
<div class="row">
   <div class="col-12">
     <br><br>
    <input id="ec4" class="btn btn-outline-secondary actionbtn" type="button" value="Manage All Contacts" onClick="editContacts()">
  </div>
</div>

<!-- Logout Button -->
<button class="btn btn-link" type="button"><a class="logout"href="index.php?logout=1"><span class="logoutText">Logout</span><span class="glyphicon glyphicon-retweet"></span></a></button>

<!-- <a href="index.php?logout=1">Logout</a> -->


<div class="row">
<div class="col-1"></div>
    <div class="col-5">
            <script>
            function accesslog(){
                $("#log5").click(function(){
                  $("#trt").load("accessLogAjax.php");
                });
              }
            </script>
        <input id="log5" class="btn btn-outline-secondary actionbtn" type="button" value="Site Access Log" onClick="accesslog()">
      </div>

        <div class="col-5">
            <script>
              function getrunlog(){
                $("#log6").click(function(){
                  $("#getrun").load("runGetLogAjax.php");
                });
              }
              </script>
              <input id="log6" class="btn btn-outline-secondary actionbtn" type="button" value="DIDWW Run Log" onClick="getrunlog()">
        </div>

      </div>
<br>
      <div class="row" >

            <div class="col-12" style="background-color:black; color:lightgrey; font-size: 0.5em; text-align: left; margin-left: 5%;" id="trt" ></div>
            <div class="col-12"style="background-color:black; color:lightgrey; font-size: 0.7em; text-align: center; left: 15%;" id="getrun" ></div>
      </div>
<br><br><br><br><br>

  <!-- glyphicon example <button class="btn btn-link" type="button" onClick="editContacts()"><span class="glyphicon glyphicon-backward"></span></button> -->


</div> <!-- END Your Phone Number Window -->


<!-- The list of phone numeber that have set mesages to one select number from above -->
<!-- The list of phone numeber that have set mesages to one select number from above -->
<center><div id="phoneNumberSource" class="col-12 headingbtn" style="font-size:2em; padding-top:1%; width:100%; display:none;"></div></center>


<div id="newPhoneList" class="row" style="margin-bottom:50px;"></div>
<!-- END -->
</div> <!-- End Containter One

<!-- MAIN PAGE -->
<!-- MAIN PAGE -->
<!-- MAIN PAGE -->
<div id="sms" class="container" style="background-color:#000;">  <!-- Page Container -->

<!-- <img src onerror="loadClientId()">  forces a load of clientIds since no image can be found-->

<!-- display numberbeing used -->
<center><div id="phoneNumber" style="color:grey; font-size:2.5em; width:100%; display:none;" class=" col-12 headingbtn"></div></center>

<!-- Begin page view/send content --> <!-- Begin page view/send content -->
<form  id="ajax-contact" class="form-group" action="didww.php"  method="post" validate>

<!-- uses contacts.json for select data and loaded from loadClients.js -->
    <div id="selectNUM" class="row" style="padding-left:1.5em; padding-right:1.5em; margin-bottom:-2em;">

        <div id="selectContact" class="col-md p-2">
            <select onChange="loadData.call(this, event);" class="form-control" id="selected" type='text' name='selected' placeholder="Select a Contact">
            </select>
          <p class="text-right"> Select a Client </p>
       </div>

    </div>

    <!-- uses contacts.json for select data and loaded from loadPhoneNumber.js -->
        <div id="selectPhoneNumber" class="row" style="padding-left:1.5em; padding-right:1.5em; margin-bottom:-2em;">

            <div id="selectNumber" class="col-md p-2">
                <select onChange="loadPhoneNumberData.call(this, event);" class="form-control" id="selectedPhone" type='text' name='selectedPhone' placeholder="Select a Phone Number">
                </select>
              <p class="text-right"> Select a Phone Number </p>
           </div>

        </div>

<div id="backContact"></div>
  <!-- This is the Numeric Keypad -->
    <div id="numpad" class="row p-4" style="display:none;">
       <div class="col-md p-3">
          <input class="form-control" id="recipient" type='text' placeholder="ENTER a Number" name='recipient' required = 'false'>
       </div>
       <div class="col-md ">
         <input type="button" class="fbutton" name="1" value="1" id="1" onClick=addNumber(this); />
         <input type="button" class="fbutton" name="2" value="2" id="2" onClick=addNumber(this); />
         <input type="button" class="fbutton" name="3" value="3" id="3" onClick=addNumber(this); />
         <input type="button" class="fbutton" name="4" value="4" id="4" onClick=addNumber(this); />
         <input type="button" class="fbutton" name="5" value="5" id="5" onClick=addNumber(this); />
         <input type="button" class="fbutton" name="6" value="6" id="6" onClick=addNumber(this); />
         <input type="button" class="fbutton" name="7" value="7" id="7" onClick=addNumber(this); />
         <input type="button" class="fbutton" name="8" value="8" id="8" onClick=addNumber(this); />
         <input type="button" class="fbutton" name="9" value="9" id="9" onClick=addNumber(this); />
         <input type="button" class="fbutton" name="0" value="0" id="0" onClick=addNumber(this); />
         <input type="button" class="dbutton" name="delete" value="Delete" id="10" onClick=deleteNumber(this); />

         <script>
         function addNumber(element){
           document.getElementById('recipient').value = document.getElementById('recipient').value+element.value;
         }
         </script>

         <script>
        function deleteNumber(element){
         var value2 = document.getElementById('recipient').value;
         var value2 = value2.slice(0, value2.length - 1);
         document.getElementById('recipient').value = value2;
        }
        </script>

      </div> <!-- End Numeric Keypad -->
    </div>

  <div  class="row p-4">
    <div class="col-6 p-2">
       <input id="firstName" class="form-control" id="first" type='text' placeholder="First Name" name='firstName'>
    </div>
    <div class="col-6 p-2">
       <input id="lastName" class="form-control" id="last" type='text' placeholder="Last Name" name='lastName'>
    </div>
  </div>

<div class="row p-3">
    <div id="showMail" class="col-6 p-2">
       <input id="mail" class="form-control" id="mail" type='text' placeholder="Email" name='mail'>
    </div>
    <div id="showNotes" class="col-6  p-2">
       <textarea id="notes" class="form-control" id="notes" type='text' placeholder="Notes" name='notes'></textarea>
    </div>
</div>

<div id="typeDelete">
  <div class="row p-3" >
    <div class="col-6 p-2">
       <select id="type" class="form-control" type="text" name="type" placeholder="Type of Phone">
        <option></option>
        <option>Mobile</option>
        <option>Home</option>
        <option>Business</option>
        <option>Fax</option>
       </select>
     <p id="typeText" class="text-right"> Select Type of Phone </p>
    </div>

    <!-- Button for modify or delete -->
    <div id="contactAction" class="col-6 p-2">
      <select id="contactDelete" class="form-control" style="background-color:lightblue;" type='text' name='contactDelete' placeholder="Action">
        <option>Add</option>
        <option>Modify</option>
        <option>Delete</option>
        </select>
      <p id="deleteText" class="text-right">Modify or Delete</p>
    </div>
 </div> <!-- END ROW -->
</div><!-- END field wrapper to make it visable and not -->

<!-- Button for viewing messages
    <div id="viewMessagesButton" class="col-md">
      <center><input id="messageview" class="btn btn-outline-secondary actionbtn" data-role="button" style="width:55%;" type=button name=button value=View-Messsages></center>
    </div>
-->
    <!-- Sent and Received message div/boxes are built with Java Script and output here-->
    <!-- Sent and Received message div/boxes are built with Java Script and output here-->
    <!-- Sent and Received message div/boxes are built with Java Script and output here-->

    <!-- DElete Message windoe popup -->

    <div id="deletedMessage" style="position: relative; z-index:9999999;  margin-left: 25%; color:red;"></div>

<div id="newWindows" style="position: relative; z-index:888888;"></div> <!-- messages are displayed from newClientSMS.js and viewSMSmessages.js -->




<div id="view3"></div>

  <div id="messageText">
    <div class="row p-3">

<!-- Message Text Field of Form -->

       <div class="col-12">
          <textarea class="form-control" id="message" rows=4  placeholder="Type a New Message" name='message' ></textarea>
       </div>
    </div>

    <div class="row p-1">
       <!-- Button for sending messages-->
        <div class="col-12">
          <button id="messagesent" class="form-control smsSendactionbtn btn btn-outline-secondary actionbtn" data-role="button"  type=submit name=submit ><span class="glyphicon glyphicon-send"></span></button>
        </div>
    </div>
  </div>

    <!-- Button for submitting Contact changes-->
    <div class="row">
      <div class="col-md">
        <center><input id="contactSubmit" class="btn btn-outline-secondary actionbtn" data-role="button" style="width:55%;" type=submit name=submit value=Submit></center>
      </div>
    </div>


    <div id="viewSent"></div> <!-- goto ID for JS -->
      <!-- shows sent messages form the From -->
         <div class="row p-4">
          <div class="col-12">
           <center><div id="form-messages" class="col-md" style=" font-size: 0.75em; text-align: left; border-radius: 15px; background-color:#bdbdbd; color:black; position: relative; z-index:9999;"></div></center> <!-- Error or Sent Message -->
          </div>
        </div>
</form>


<hr>

  </div> <!-- End Container -->

</div><!-- End Page Wrapper -->
   <!-- Bootstrap v4 2018 core & JavaScripts 2018-->
   <!-- ================================================== -->
   <!--  Placed at the end of the document so the pages load faster -->
       <script src="dist/vendor/jquery-3.4.1.min.js"></script>
   <!--  Bootstrap Main-->
       <script src="dist/js/bootstrap.min.js"></script>
   <!--  Bootstrap supplied addons-->
       <script src="dist/js/bootstrap.bundle.min.js"></script>
       <script> window.jQuery || document.write('<script src="dist/vendor/jquery-3.4.1.min.js"><\/script>')</script>
       <script src="dist/js/moment.js"></script>
       <script src="dist/js/popper.js"></script>

       <script src="sms/js/clock.js"></script>
   <!--Mail error message handler to show PHP errors on the page -->
       <script src="sms/js/formSubmit.js"></script>

  <!-- scripts to display SMSmesages.json data based on SENDER Phone Number -->
       <script src="sms/js/viewSMSmessages.js"></script>


   <!-- scripts to population phone number select field -->

 <!-- script to enable Refresh and back to the Top buttons-->
 <!-- actual functions are in client.js -->


<script>
// When the user scrolls down 20px from the top of the document, show the buttons
window.onscroll = function() {scrollFunction()};

function scrollFunction() {

  if (document.body.scrollTop > 10 || document.documentElement.scrollTop > 10) {
    document.getElementById("myBtn").style.display = "block";
    document.getElementById("myBtnB").style.display = "block";

  } else {
    document.getElementById("myBtn").style.display = "none";
    document.getElementById("myBtnB").style.display = "none";

  }
}
</script>

 </body>
</html>
