MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/sb_web/b1536/advancedfunctions.co/
File Upload :
Current < : //hermes/sb_web/b1536/advancedfunctions.co/GoogleMeet(Host)QRPortalLinkGenerator.html

<!DOCTYPE html>
<html>
    <head>
        <title>Google Meet (Host) QR Portal Link Generator</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
            .grid-container{
                display: grid;
                grid-template-columns: 120px auto;
grid-gap:20px;
            }
.form-group{padding-top:10px;
}

.container{
max-width: 700px;
}


</style>
    </head>
    <body>

        <h1 id="title" style="font-size: 3vw;color: steelblue;" align="center"><img src="windsorLogo.png"/> <br></h1>
        <h2 id="status" style="font-size: 20px;color: steelblue; padding-bottom:30px" align="center">Google Meet (Host) QR Portal Link Generator</h2>
       
        <div class="container" >
            <form action="javascript:send()">
            

                <div class="form-group">   <div class="grid-container"> <span class="label"  style="font-size: 20px; background-color: lightsteelblue; width: 120px;" >step <span class="badge" style="color: lightsteelblue;background-color: white;" >1</span></span>
                    <input class="form-control" style="width: 100%;" id="className"  placeholder="Enter Class Name (e.g. Physics CIE 900, SAT 1)">
                </div>
</div>

             

                <div class="form-group">  <div class="grid-container"><span class="label "  style="font-size: 20px; background-color: lightsteelblue; width: 120px;">step <span class="badge" style="color: lightsteelblue;background-color: white;" >2</span></span>
<a href="https://meet.google.com/" target="_blank" >Create Your Own Google Meet Link</a>
                 </div>
</div>

            

                <div class="form-group">   <div class="grid-container" >  <span class="label "  style="font-size: 20px; background-color: lightsteelblue; width: 120px;" >step <span class="badge" style="color: lightsteelblue;background-color: white;" >3</span></span>
                    <input class="form-control" id="gClass" placeholder="Paste Google Meet Link Here (E.g. meet.google.com/zyx-wvut-srq)">
                </div>
</div>

                <button type="submit" class="btn btn-default ">Generate Google Classroom Link</button>
<div class="form-group">
<h3>Copy Google Classroom Link Below</h3>
                    <input class="form-control" id="generatedLink" style="max-width:710px" placeholder="URL">
              </div>
            </form> 

<div>


        
        <script>
var classNameToSend;
var googleLink;
var processedLink;
   
function send(){
classNameToSend=document.getElementById("className").value;
googleLink=document.getElementById("gClass").value;
var errorFound=false;

 while(classNameToSend.indexOf(" ")!=-1){
      classNameToSend=classNameToSend.replace(" ","_");
      }

 while(googleLink.indexOf(" ")!=-1){
      googleLink=googleLink.replace(" ","");
      }

if(googleLink.indexOf("meet.google.com/")==-1){errorFound=true;
document.getElementById("generatedLink").value="Invalid Google Meet Link";}

if(classNameToSend.length<4){errorFound=true;
document.getElementById("generatedLink").value="Invalid Class Name";}

processedLink="https://advancedfunctions.co/qrscanner3.html?class="+classNameToSend+"&gClass="+
                                       googleLink.substring(googleLink.indexOf("meet.google.com/")+16,googleLink.length);



if(!errorFound){sendDataToLog();}

}

function sendDataToLog() {

jQuery.post('https://script.google.com/macros/s/AKfycbyL-nKci90nn2JACAiXA-iIcI6Ro-i6__4pgSiOFXY46vEQOh4/exec', {
                    linkGenerated: processedLink
                }

                ).done(function (data) {
document.getElementById("generatedLink").value=data;
document.getElementById("generatedLink").select();
document.getElementById("generatedLink").setSelectionRange(0,99999);
document.execCommand("copy");

                    if (data === "Approved") {
                     
                    } else {
                   
                    }
                })

}

        </script>
    </body>
</html>